@momentum-ui/web-components 2.5.8 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[69],{114:function(d,e,m){"use strict";m.r(e),m.d(e,"modalType",(function(){return _})),m.d(e,"Modal",(function(){return f}));m(17),m(15);var o=m(1),a=m(7),l=m(5),t=m(4),i=m(0),r=m(2),n=m(3),s=i.css`.md-modal{color:var(--md-primary-text-color,#121212);display:block;height:100vh;left:0;margin:0 auto;position:fixed;right:0;visibility:visible;width:100vw;width:100vw;max-height:none;top:auto}.md-modal .md-modal__title{color:var(--md-primary-text-color,#707070)}.md-modal .md-modal__content{height:auto;min-height:0;border-radius:var(--modal-main-radius,.5rem);max-height:none}.md-modal:focus{box-shadow:none}.md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Bold","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;line-height:1.5rem;width:100%;flex-shrink:0;padding-bottom:1rem;padding-left:calc(1rem / 2);padding-right:calc(1rem / 2)}.md-modal__header .md-modal__title{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%}.md-modal__header .md-modal__message{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;line-height:1.5rem;width:100%;color:var(--modal-main-text-color,#545454);flex-flow:row wrap;text-align:center}.md-modal__header .md-modal__close{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;border:0;position:absolute}.md-modal__content{background-color:var(--modal-main-bg-color,#fff);box-shadow:0 8px 16px 0 rgba(0,0,0,.16);border:1px solid var(--modal-main-border-color,#dedede);display:flex;flex-direction:column}.md-modal__flex-container{display:flex;flex:1 1 0%;flex-direction:column;max-height:inherit;min-height:inherit;padding:var(--modal-main-padding,1.5rem 1rem);width:100%}.md-modal__body{align-items:stretch;align-self:stretch;background:var(--modal-main-bg-color,#fff);display:flex;flex:1 1 auto;flex-direction:column;margin:0;overflow-x:hidden;overflow-y:auto;padding-left:calc(1rem / 2);padding-right:calc(1rem / 2)}.md-modal__body--padding{padding:0 2rem}.md-modal__footer{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-end;flex-shrink:0;padding-left:calc(1rem / 2);padding-right:calc(1rem / 2);padding-top:1rem;width:100%}.md-modal__footer md-button:not(:first-of-type){margin-left:.75rem}.md-modal__footer ::slotted(md-button){margin-left:.75rem}.md-modal.md-modal--full{width:100vw;max-height:none;top:auto}.md-modal.md-modal--full .md-modal__content{height:100vh;min-height:0;border-radius:0;max-height:none}.md-modal.md-modal--full .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:2.25rem;line-height:3rem;width:100%}.md-modal.md-modal--full .md-modal__header .md-modal__message{font-size:1.25rem;line-height:2rem;padding-top:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close{height:1.25rem;right:1.5rem;top:1.5rem;width:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close::before{font-size:1.25rem}.md-modal.md-modal--full .md-modal__footer{padding-bottom:1.5rem;padding-top:1.5rem}.md-modal.md-modal--large{width:60rem;max-height:calc(100vh - (2.6875rem * 2));top:2.6875rem}.md-modal.md-modal--large .md-modal__content{min-height:45rem;border-radius:var(--modal-main-radius,.5rem);max-height:calc(100vh - (2.6875rem * 2))}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.625rem;line-height:2rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:1rem;line-height:1.5rem;text-align:left}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:1rem;right:1rem;top:1rem;width:1rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:1rem}@media only screen and (min-width:40.0625em) and (max-width:64em){.md-modal.md-modal--large{width:40rem;max-height:calc(100vh - (3.5625rem * 2));top:3.5625rem}.md-modal.md-modal--large .md-modal__content{min-height:30rem;max-height:calc(100vh - (3.5625rem * 2))}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Bold","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;line-height:1.5rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;text-align:center}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:.875rem}}@media only screen and (max-height:50em){.md-modal.md-modal--large .md-modal__content{min-height:auto}}.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:calc(100vh - (2.9375rem * 2));top:2.9375rem}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:calc(100vh - (2.9375rem * 2))}.md-modal.md-modal--default .md-modal__close,.md-modal.md-modal--medium .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--default .md-modal__close::before,.md-modal.md-modal--medium .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em) and (max-width:64em){.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:calc(100vh - (3.5625rem * 2));top:3.5625rem}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:calc(100vh - (3.5625rem * 2))}}@media only screen and (max-height:50em){.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:auto}}.md-modal.md-modal--small{width:27.5rem;max-height:calc(100vh - (2.9375rem * 2));top:2.9375rem}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:calc(100vh - (2.9375rem * 2))}.md-modal.md-modal--small .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--small .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em) and (max-width:64em){.md-modal.md-modal--small{width:27.5rem;max-height:calc(100vh - (3.3125rem * 2));top:3.3125rem}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:calc(100vh - (3.3125rem * 2))}}.md-modal.md-modal--dialog{width:27.5rem;max-height:calc(100vh - (6.25rem * 2));top:6.25rem}.md-modal.md-modal--dialog .md-modal__content{height:auto;min-height:0;border-radius:var(--modal-main-radius,.5rem);max-height:calc(100vh - (6.25rem * 2))}.md-modal.md-modal--dialog .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--dialog .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--dialog .md-modal__content{flex-direction:row}.md-modal.md-modal--dialog .md-modal__content .md-modal__header{align-items:flex-start;padding:0 0 .75rem 0}.md-modal.md-modal--dialog .md-modal__content .md-modal__title{font-family:"CiscoSansTT Bold","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__body{margin-bottom:1.5rem;text-align:left}.md-modal.md-modal--dialog .md-modal__content .md-modal__body>*{font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.375rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__footer{display:flex;justify-content:flex-end;padding:0}@media only screen and (max-width:40em){.md-modal.md-modal--default.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--dialog.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--large.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--medium.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--small.md-modal--dialog .md-modal__flex-container{min-height:calc(100vh - (1.5rem * 2))}}@media only screen and (max-width:40em){.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{width:100vw;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{height:100vh;min-height:0;border-radius:0;max-height:none}.md-modal.md-modal--default .md-modal__flex-container,.md-modal.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full .md-modal__flex-container,.md-modal.md-modal--large .md-modal__flex-container,.md-modal.md-modal--medium .md-modal__flex-container,.md-modal.md-modal--small .md-modal__flex-container{min-height:100vh}.md-modal.md-modal--default .md-modal__header,.md-modal.md-modal--dialog .md-modal__header,.md-modal.md-modal--full .md-modal__header,.md-modal.md-modal--large .md-modal__header,.md-modal.md-modal--medium .md-modal__header,.md-modal.md-modal--small .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Bold","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;line-height:1.5rem;width:100%}.md-modal.md-modal--default .md-modal__header .md-modal__message,.md-modal.md-modal--dialog .md-modal__header .md-modal__message,.md-modal.md-modal--full .md-modal__header .md-modal__message,.md-modal.md-modal--large .md-modal__header .md-modal__message,.md-modal.md-modal--medium .md-modal__header .md-modal__message,.md-modal.md-modal--small .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;padding-top:.75rem}.md-modal.md-modal--default .md-modal__header .md-modal__close,.md-modal.md-modal--dialog .md-modal__header .md-modal__close,.md-modal.md-modal--full .md-modal__header .md-modal__close,.md-modal.md-modal--large .md-modal__header .md-modal__close,.md-modal.md-modal--medium .md-modal__header .md-modal__close,.md-modal.md-modal--small .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--default .md-modal__header .md-modal__close::before,.md-modal.md-modal--dialog .md-modal__header .md-modal__close::before,.md-modal.md-modal--full .md-modal__header .md-modal__close::before,.md-modal.md-modal--large .md-modal__header .md-modal__close::before,.md-modal.md-modal--medium .md-modal__header .md-modal__close::before,.md-modal.md-modal--small .md-modal__header .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--default .md-modal__footer,.md-modal.md-modal--dialog .md-modal__footer,.md-modal.md-modal--full .md-modal__footer,.md-modal.md-modal--large .md-modal__footer,.md-modal.md-modal--medium .md-modal__footer,.md-modal.md-modal--small .md-modal__footer{padding:var(--modal-main-padding,1.5rem 1rem);padding-right:1.5rem}.md-modal.md-modal--default .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--dialog .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--full .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--large .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--medium .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--small .md-modal__footer md-button:not(:first-of-type){margin-left:1rem}}.md-modal__backdrop{background:rgba(0,0,0,.45);bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:1040}.md-modal__backdrop .md-modal_overlay{bottom:0;position:absolute;top:0;width:100%}.md-close{color:#545454;float:right;font-size:21px;font-weight:700;line-height:1;text-shadow:0 1px 0 #fff}.md-close:focus,.md-close:hover{color:#064157;cursor:pointer;text-decoration:none}.md-close{background:0 0;border-radius:0;cursor:pointer;font-weight:400;min-width:initial;padding:0}.md-close::before{font-family:momentum-ui-icons;vertical-align:middle}.md-close:hover{color:#005e7d}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}`,h=function(d,e,m,o){var a,l=arguments.length,t=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,m):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)t=Reflect.decorate(d,e,m,o);else for(var i=d.length-1;i>=0;i--)(a=d[i])&&(t=(l<3?a(t):l>3?a(e,m,t):a(e,m))||t);return l>3&&t&&Object.defineProperty(e,m,t),t},c=function(d,e,m,o){return new(m||(m=Promise))((function(a,l){function t(d){try{r(o.next(d))}catch(d){l(d)}}function i(d){try{r(o.throw(d))}catch(d){l(d)}}function r(d){var e;d.done?a(d.value):(e=d.value,e instanceof m?e:new m((function(d){d(e)}))).then(t,i)}r((o=o.apply(d,e||[])).next())}))};const _=["default","full","large","small","dialog"];var f;!function(d){let e=class extends(Object(a.b)(i.LitElement)){constructor(){super(...arguments),this.show=!1,this.headerLabel="",this.headerMessage="",this.htmlId="",this.ariaLabel="modal",this.ariaLabelledBy="",this.ariaLabelClose="Close Modal",this.ariaLabelCancel="Cancel Modal",this.ariaLabelSubmit="Submit Modal",this.ariaDescription="",this.showCloseButton=!1,this.backdropClickExit=!1,this.noExitOnEsc=!1,this.size="default",this.closeBtnName="",this.hideFooter=!1,this.hideHeader=!1,this.animating=!1,this.handleCloseOutside=d=>{d.code===o.a.Escape&&(d.preventDefault(),this.show&&!this.noExitOnEsc&&(this.show=!1,this.notifyModalClose()))}}static get styles(){return[t.a,s]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleCloseOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleCloseOutside)}update(d){super.update(d),d.has("show")&&(this.show?this.modalFadeIn():!0===d.get("show")&&this.modalFadeOut())}notifyModalClose(){this.dispatchEvent(new CustomEvent("close-modal",{composed:!0,bubbles:!0}))}focusInsideModal(){this.focusableElements&&this.focusableElements.length&&this.setInitialFocus()}handleKeyDown(d){d.code!==o.a.Enter&&d.code!==o.a.Space||this.show&&(this.show=!0)}transitionPromise(d){return new Promise(e=>{const m=()=>{d.removeEventListener("transitionend",m),this.activateFocusTrap(),this.setFocusableElements(),requestAnimationFrame(()=>{e()})},o=()=>{d.removeEventListener("transitioncancel",o),this.deactivateFocusTrap(),this.modalFadeOut(),e()};d.addEventListener("transitionend",m),d.addEventListener("transitioncancel",o),setTimeout(()=>{this.animating=!0},13)})}modalFadeIn(){return c(this,void 0,void 0,(function*(){this.backDrop&&(yield this.transitionPromise(this.backDrop),this.focusInsideModal())}))}modalFadeOut(){this.animating=!1,this.deactivateFocusTrap(),setTimeout(()=>{this.notifyModalClose()},150)}handleCloseBackdrop(){this.backdropClickExit&&(this.show=!1,this.notifyModalClose())}topCloseBtnTemplate(){return i.html`
1
+ (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[69],{114:function(d,e,m){"use strict";m.r(e),m.d(e,"modalType",(function(){return _})),m.d(e,"Modal",(function(){return p}));m(17),m(15);var o=m(1),a=m(7),l=m(5),t=m(4),i=m(0),r=m(2),n=m(3),s=i.css`.md-modal{color:var(--md-primary-text-color,#121212);display:block;height:100vh;left:0;margin:0 auto;position:fixed;right:0;visibility:visible;width:100vw;width:100vw;max-height:none;top:auto}.md-modal .md-modal__title{color:var(--md-primary-text-color,#707070)}.md-modal .md-modal__content{height:auto;min-height:0;border-radius:var(--modal-main-radius,.5rem);max-height:none}.md-modal:focus{box-shadow:none}.md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Bold","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;line-height:1.5rem;width:100%;flex-shrink:0;padding-bottom:1rem;padding-left:calc(1rem / 2);padding-right:calc(1rem / 2)}.md-modal__header .md-modal__title{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%}.md-modal__header .md-modal__message{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;line-height:1.5rem;width:100%;color:var(--modal-main-text-color,#545454);flex-flow:row wrap;text-align:center}.md-modal__header .md-modal__close{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;border:0;position:absolute}.md-modal__content{background-color:var(--modal-main-bg-color,#fff);box-shadow:0 8px 16px 0 rgba(0,0,0,.16);border:1px solid var(--modal-main-border-color,#dedede);display:flex;flex-direction:column}.md-modal__flex-container{display:flex;flex:1 1 0%;flex-direction:column;max-height:inherit;min-height:inherit;padding:var(--modal-main-padding,1.5rem 1rem);width:100%}.md-modal__body{align-items:stretch;align-self:stretch;background:var(--modal-main-bg-color,#fff);display:flex;flex:1 1 auto;flex-direction:column;margin:0;overflow-x:hidden;overflow-y:auto;padding-left:calc(1rem / 2);padding-right:calc(1rem / 2)}.md-modal__body--padding{padding:0 2rem}.md-modal__footer{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-end;flex-shrink:0;padding-left:calc(1rem / 2);padding-right:calc(1rem / 2);padding-top:1rem;width:100%}.md-modal__footer md-button:not(:first-of-type){margin-left:.75rem}.md-modal__footer ::slotted(md-button){margin-left:.75rem}.md-modal.md-modal--full{width:100vw;max-height:none;top:auto}.md-modal.md-modal--full .md-modal__content{height:100vh;min-height:0;border-radius:0;max-height:none}.md-modal.md-modal--full .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:2.25rem;line-height:3rem;width:100%}.md-modal.md-modal--full .md-modal__header .md-modal__message{font-size:1.25rem;line-height:2rem;padding-top:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close{height:1.25rem;right:1.5rem;top:1.5rem;width:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close::before{font-size:1.25rem}.md-modal.md-modal--full .md-modal__footer{padding-bottom:1.5rem;padding-top:1.5rem}.md-modal.md-modal--large{width:60rem;max-height:calc(100vh - (2.6875rem * 2));top:2.6875rem}.md-modal.md-modal--large .md-modal__content{min-height:45rem;border-radius:var(--modal-main-radius,.5rem);max-height:calc(100vh - (2.6875rem * 2))}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.625rem;line-height:2rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:1rem;line-height:1.5rem;text-align:left}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:1rem;right:1rem;top:1rem;width:1rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:1rem}@media only screen and (min-width:40.0625em) and (max-width:64em){.md-modal.md-modal--large{width:40rem;max-height:calc(100vh - (3.5625rem * 2));top:3.5625rem}.md-modal.md-modal--large .md-modal__content{min-height:30rem;max-height:calc(100vh - (3.5625rem * 2))}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Bold","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;line-height:1.5rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;text-align:center}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:.875rem}}@media only screen and (max-height:50em){.md-modal.md-modal--large .md-modal__content{min-height:auto}}.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:calc(100vh - (2.9375rem * 2));top:2.9375rem}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:calc(100vh - (2.9375rem * 2))}.md-modal.md-modal--default .md-modal__close,.md-modal.md-modal--medium .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--default .md-modal__close::before,.md-modal.md-modal--medium .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em) and (max-width:64em){.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:calc(100vh - (3.5625rem * 2));top:3.5625rem}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:calc(100vh - (3.5625rem * 2))}}@media only screen and (max-height:50em){.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:auto}}.md-modal.md-modal--small{width:27.5rem;max-height:calc(100vh - (2.9375rem * 2));top:2.9375rem}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:calc(100vh - (2.9375rem * 2))}.md-modal.md-modal--small .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--small .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em) and (max-width:64em){.md-modal.md-modal--small{width:27.5rem;max-height:calc(100vh - (3.3125rem * 2));top:3.3125rem}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:calc(100vh - (3.3125rem * 2))}}.md-modal.md-modal--dialog{width:27.5rem;max-height:calc(100vh - (6.25rem * 2));top:6.25rem}.md-modal.md-modal--dialog .md-modal__content{height:auto;min-height:0;border-radius:var(--modal-main-radius,.5rem);max-height:calc(100vh - (6.25rem * 2))}.md-modal.md-modal--dialog .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--dialog .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--dialog .md-modal__content{flex-direction:row}.md-modal.md-modal--dialog .md-modal__content .md-modal__header{align-items:flex-start;padding:0 0 .75rem 0}.md-modal.md-modal--dialog .md-modal__content .md-modal__title{font-family:"CiscoSansTT Bold","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__body{margin-bottom:1.5rem;text-align:left}.md-modal.md-modal--dialog .md-modal__content .md-modal__body>*{font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.375rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__footer{display:flex;justify-content:flex-end;padding:0}@media only screen and (max-width:40em){.md-modal.md-modal--default.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--dialog.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--large.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--medium.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--small.md-modal--dialog .md-modal__flex-container{min-height:calc(100vh - (1.5rem * 2))}}@media only screen and (max-width:40em){.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{width:100vw;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{height:100vh;min-height:0;border-radius:0;max-height:none}.md-modal.md-modal--default .md-modal__flex-container,.md-modal.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full .md-modal__flex-container,.md-modal.md-modal--large .md-modal__flex-container,.md-modal.md-modal--medium .md-modal__flex-container,.md-modal.md-modal--small .md-modal__flex-container{min-height:100vh}.md-modal.md-modal--default .md-modal__header,.md-modal.md-modal--dialog .md-modal__header,.md-modal.md-modal--full .md-modal__header,.md-modal.md-modal--large .md-modal__header,.md-modal.md-modal--medium .md-modal__header,.md-modal.md-modal--small .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:"CiscoSansTT Bold","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;line-height:1.5rem;width:100%}.md-modal.md-modal--default .md-modal__header .md-modal__message,.md-modal.md-modal--dialog .md-modal__header .md-modal__message,.md-modal.md-modal--full .md-modal__header .md-modal__message,.md-modal.md-modal--large .md-modal__header .md-modal__message,.md-modal.md-modal--medium .md-modal__header .md-modal__message,.md-modal.md-modal--small .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;padding-top:.75rem}.md-modal.md-modal--default .md-modal__header .md-modal__close,.md-modal.md-modal--dialog .md-modal__header .md-modal__close,.md-modal.md-modal--full .md-modal__header .md-modal__close,.md-modal.md-modal--large .md-modal__header .md-modal__close,.md-modal.md-modal--medium .md-modal__header .md-modal__close,.md-modal.md-modal--small .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:.75rem;width:.875rem}.md-modal.md-modal--default .md-modal__header .md-modal__close::before,.md-modal.md-modal--dialog .md-modal__header .md-modal__close::before,.md-modal.md-modal--full .md-modal__header .md-modal__close::before,.md-modal.md-modal--large .md-modal__header .md-modal__close::before,.md-modal.md-modal--medium .md-modal__header .md-modal__close::before,.md-modal.md-modal--small .md-modal__header .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--default .md-modal__footer,.md-modal.md-modal--dialog .md-modal__footer,.md-modal.md-modal--full .md-modal__footer,.md-modal.md-modal--large .md-modal__footer,.md-modal.md-modal--medium .md-modal__footer,.md-modal.md-modal--small .md-modal__footer{padding:var(--modal-main-padding,1.5rem 1rem);padding-right:1.5rem}.md-modal.md-modal--default .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--dialog .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--full .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--large .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--medium .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--small .md-modal__footer md-button:not(:first-of-type){margin-left:1rem}}.md-modal__backdrop{background:rgba(0,0,0,.45);bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:1040}.md-modal__backdrop .md-modal_overlay{bottom:0;position:absolute;top:0;width:100%}.md-close{color:#545454;float:right;font-size:21px;font-weight:700;line-height:1;text-shadow:0 1px 0 #fff}.md-close:focus,.md-close:hover{color:#064157;cursor:pointer;text-decoration:none}.md-close{background:0 0;border-radius:0;cursor:pointer;font-weight:400;min-width:initial;padding:0}.md-close::before{font-family:momentum-ui-icons;vertical-align:middle}.md-close:hover{color:#005e7d}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}`,h=function(d,e,m,o){var a,l=arguments.length,t=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,m):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)t=Reflect.decorate(d,e,m,o);else for(var i=d.length-1;i>=0;i--)(a=d[i])&&(t=(l<3?a(t):l>3?a(e,m,t):a(e,m))||t);return l>3&&t&&Object.defineProperty(e,m,t),t},c=function(d,e,m,o){return new(m||(m=Promise))((function(a,l){function t(d){try{r(o.next(d))}catch(d){l(d)}}function i(d){try{r(o.throw(d))}catch(d){l(d)}}function r(d){var e;d.done?a(d.value):(e=d.value,e instanceof m?e:new m((function(d){d(e)}))).then(t,i)}r((o=o.apply(d,e||[])).next())}))};const _=["default","full","large","small","dialog"];var p;!function(d){let e=class extends(Object(a.b)(i.LitElement)){constructor(){super(...arguments),this.show=!1,this.headerLabel="",this.headerMessage="",this.htmlId="",this.ariaLabel="modal",this.ariaLabelledBy="",this.ariaLabelClose="Close Modal",this.ariaLabelCancel="Cancel Modal",this.ariaLabelSubmit="Submit Modal",this.ariaDescription="",this.showCloseButton=!1,this.backdropClickExit=!1,this.noExitOnEsc=!1,this.size="default",this.closeBtnName="",this.hideFooter=!1,this.hideHeader=!1,this.disableInitialFocus=!1,this.animating=!1,this.handleCloseOutside=d=>{d.code===o.a.Escape&&(d.preventDefault(),this.show&&!this.noExitOnEsc&&(this.show=!1,this.notifyModalClose()))}}static get styles(){return[t.a,s]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleCloseOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleCloseOutside)}update(d){super.update(d),d.has("show")&&(this.show?this.modalFadeIn():!0===d.get("show")&&this.modalFadeOut())}notifyModalClose(){this.dispatchEvent(new CustomEvent("close-modal",{composed:!0,bubbles:!0}))}focusInsideModal(){this.focusableElements&&this.focusableElements.length&&this.setInitialFocus()}handleKeyDown(d){d.code!==o.a.Enter&&d.code!==o.a.Space||this.show&&(this.show=!0)}transitionPromise(d){return new Promise(e=>{const m=()=>{d.removeEventListener("transitionend",m),this.activateFocusTrap(),this.setFocusableElements(),requestAnimationFrame(()=>{e()})},o=()=>{d.removeEventListener("transitioncancel",o),this.deactivateFocusTrap(),this.modalFadeOut(),e()};d.addEventListener("transitionend",m),d.addEventListener("transitioncancel",o),setTimeout(()=>{this.animating=!0},13)})}modalFadeIn(){return c(this,void 0,void 0,(function*(){this.backDrop&&(yield this.transitionPromise(this.backDrop),this.disableInitialFocus||this.focusInsideModal())}))}modalFadeOut(){this.animating=!1,this.deactivateFocusTrap(),setTimeout(()=>{this.notifyModalClose()},150)}handleCloseBackdrop(){this.backdropClickExit&&(this.show=!1,this.notifyModalClose())}topCloseBtnTemplate(){return i.html`
2
2
  ${this.showCloseButton?i.html`
3
3
  <md-button
4
4
  hasRemoveStyle
@@ -74,4 +74,4 @@
74
74
  </div>
75
75
  </div>
76
76
  `:r.nothing}
77
- `}};h([Object(i.property)({type:Boolean})],e.prototype,"show",void 0),h([Object(i.property)({type:String})],e.prototype,"headerLabel",void 0),h([Object(i.property)({type:String})],e.prototype,"headerMessage",void 0),h([Object(i.property)({type:String})],e.prototype,"htmlId",void 0),h([Object(i.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),h([Object(i.property)({type:String,attribute:"aria-labelled-by"})],e.prototype,"ariaLabelledBy",void 0),h([Object(i.property)({type:String})],e.prototype,"ariaLabelClose",void 0),h([Object(i.property)({type:String})],e.prototype,"ariaLabelCancel",void 0),h([Object(i.property)({type:String})],e.prototype,"ariaLabelSubmit",void 0),h([Object(i.property)({type:String})],e.prototype,"ariaDescription",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"showCloseButton",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"backdropClickExit",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"noExitOnEsc",void 0),h([Object(i.property)({type:String})],e.prototype,"size",void 0),h([Object(i.property)({type:String})],e.prototype,"closeBtnName",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"hideFooter",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"hideHeader",void 0),h([Object(i.internalProperty)()],e.prototype,"animating",void 0),h([Object(i.query)(".md-modal__backdrop")],e.prototype,"backDrop",void 0),e=h([Object(l.a)("md-modal")],e),d.ELEMENT=e}(f||(f={}))}}]);
77
+ `}};h([Object(i.property)({type:Boolean})],e.prototype,"show",void 0),h([Object(i.property)({type:String})],e.prototype,"headerLabel",void 0),h([Object(i.property)({type:String})],e.prototype,"headerMessage",void 0),h([Object(i.property)({type:String})],e.prototype,"htmlId",void 0),h([Object(i.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),h([Object(i.property)({type:String,attribute:"aria-labelled-by"})],e.prototype,"ariaLabelledBy",void 0),h([Object(i.property)({type:String})],e.prototype,"ariaLabelClose",void 0),h([Object(i.property)({type:String})],e.prototype,"ariaLabelCancel",void 0),h([Object(i.property)({type:String})],e.prototype,"ariaLabelSubmit",void 0),h([Object(i.property)({type:String})],e.prototype,"ariaDescription",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"showCloseButton",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"backdropClickExit",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"noExitOnEsc",void 0),h([Object(i.property)({type:String})],e.prototype,"size",void 0),h([Object(i.property)({type:String})],e.prototype,"closeBtnName",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"hideFooter",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"hideHeader",void 0),h([Object(i.property)({type:Boolean})],e.prototype,"disableInitialFocus",void 0),h([Object(i.internalProperty)()],e.prototype,"animating",void 0),h([Object(i.query)(".md-modal__backdrop")],e.prototype,"backDrop",void 0),e=h([Object(l.a)("md-modal")],e),d.ELEMENT=e}(p||(p={}))}}]);
@@ -14,7 +14,7 @@
14
14
  <span>${t.name}</span>
15
15
  <span>+${t.value}</span>
16
16
  </div>
17
- `}validateNumber(){this.isValid=!!this.value&&Object(l.isValidNumberForRegion)(this.value,this.countryCode)}handleCountryChange(t){var e;if(!t.detail.value||!t.detail.value.id)return this.countryCode="US",this.countryCallingCode="",void this.validateNumber();this.countryCallingCode=t.detail.value.id,this.countryCode=null===(e=t.detail.value.id.split(",")[2])||void 0===e?void 0:e.trim(),this.validateNumber()}handlePhoneChange(t){this.value=t.detail.value,this.validateInput(this.value),t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-change",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}handleKeydown(t){this.isValid=!0,t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}handleBlur(t){this.validateNumber(),t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-blur",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}validateInput(t){this.formattedValue=new l.AsYouType(this.countryCode).input(t)}getFormatedCountryCallingCode(){var t;return{id:this.countryCallingCode,value:null===(t=this.countryCallingCode.split(",")[0])||void 0===t?void 0:t.trim()}}getModStyle(){return p.html`
17
+ `}validateNumber(){this.isValid=!this.value||Object(l.isValidNumberForRegion)(this.value,this.countryCode)}handleCountryChange(t){var e;if(!t.detail.value||!t.detail.value.id)return this.countryCode="US",this.countryCallingCode="",void this.validateNumber();this.countryCallingCode=t.detail.value.id,this.countryCode=null===(e=t.detail.value.id.split(",")[2])||void 0===e?void 0:e.trim(),this.validateNumber()}handlePhoneChange(t){this.value=t.detail.value,t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-change",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}handleKeydown(t){this.isValid=!0,t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}handleBlur(t){this.validateInput(this.value),this.validateNumber(),t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-blur",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}validateInput(t){this.formattedValue=new l.AsYouType(this.countryCode).input(t)}getFormatedCountryCallingCode(){var t;return{id:this.countryCallingCode,value:null===(t=this.countryCallingCode.split(",")[0])||void 0===t?void 0:t.trim()}}getModStyle(){return p.html`
18
18
  <style>
19
19
  .md-phone-input__container md-combobox {
20
20
  width: 5.625rem;
@@ -37,6 +37,7 @@ export declare namespace Modal {
37
37
  closeBtnName: string;
38
38
  hideFooter: boolean;
39
39
  hideHeader: boolean;
40
+ disableInitialFocus: boolean;
40
41
  private animating;
41
42
  backDrop: HTMLElement;
42
43
  static get styles(): import("lit-element").CSSResult[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "2.5.8",
3
+ "version": "2.6.1",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",