@momentum-ui/web-components 2.7.47 → 2.7.48

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([[15],{24:function(e,t,i){"use strict";i.r(t),i.d(t,"containerSize",(function(){return g})),i.d(t,"inputSize",(function(){return y})),i.d(t,"inputType",(function(){return f})),i.d(t,"inputShape",(function(){return v})),i.d(t,"iconNames",(function(){return _})),i.d(t,"iconPosition",(function(){return x})),i.d(t,"nestedLevel",(function(){return w})),i.d(t,"ariaInvalidType",(function(){return k})),i.d(t,"Input",(function(){return O}));i(50),i(15),i(51),i(48);var n=i(1),r=i(5),o=i(33),d=i(4),a=i(10),l=i(0),s=i(2),p=i(3),m=i(6),c=i(14),u=i(9),h=l.css`@font-face{font-display:fallback;font-family:"CiscoSansTT Regular";font-style:normal;font-weight:400;src:url(/fonts/CiscoSansTTRegular.woff2) format("woff2"),url(/fonts/CiscoSansTTRegular.woff) format("woff")}[class*=md] *,[class*=md] ::after,[class*=md] ::before,[class*=md] button,[class*=md] input,[class*=md] select,[class*=md] textarea{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit;font-size:var(--rem-base)}[class*=md] button,[class*=md] input{overflow:visible}[class*=md] textarea{line-height:1.2rem;max-height:2.25rem;max-width:100%;overflow:auto;padding-bottom:.375rem;padding-top:.375rem;resize:none}[class*=md] textarea[rows]{height:auto}[class*=md] [type=submit]{appearance:none}[class*=md] input[type=file]{margin:0 0 1rem 0;width:100%}[class*=md] input::-webkit-inner-spin-button,[class*=md] input::-webkit-outer-spin-button{appearance:none;margin:0}[class*=md] input[type=number]{moz-appearance:textfield}[class*=md] [type=number]{appearance:textfield}[class*=md] [type=number]::-webkit-inner-spin-button,[class*=md] [type=number]::-webkit-outer-spin-button{height:auto}[class*=md] [type=search]::-webkit-search-cancel-button,[class*=md] [type=search]::-webkit-search-decoration{appearance:none}[class*=md] ::input-placeholder{color:inherit;opacity:.6}[class*=md] ::-webkit-file-upload-button{appearance:button;font:inherit}.md-input-container{align-content:normal;align-items:normal;display:flex;flex-flow:column wrap;justify-content:normal;box-sizing:border-box;line-height:0;margin-bottom:1rem;position:relative;width:100%}.md-input-container .md-input{background-color:var(--input-default-bg-color,#fff);color:var(--md-secondary-text-color,#545454);border-color:var(--input-default-border-color,#ccc)}.md-input-container .md-input::placeholder{color:#545454;opacity:1}.md-input-container .md-input.md-hover,.md-input-container .md-input:hover{background-color:var(--input-default-hover-bg-color,#ccc)}.md-input-container .md-input.md-hover:active,.md-input-container .md-input:hover:active{background-color:var(--input-default-pressed-bg-color,#ccc);border-color:var(--input-default-pressed-border-color,#ccc)}.md-input-container .md-input.md-disabled,.md-input-container .md-input:disabled{background-color:var(--input-default-read-only-bg-color,#ededed);border-color:transparent;color:var(--input-disabled-text-color,#b2b2b2)}.md-input-container .md-input.md-disabled::placeholder,.md-input-container .md-input:disabled::placeholder{color:var(--input-disabled-text-color,#b2b2b2)}.md-input-container .md-input.md-disabled:hover,.md-input-container .md-input:disabled:hover{background-color:var(--input-default-read-only-bg-color,#ededed)}.md-input-container .md-input.md-readonly,.md-input-container .md-input[readonly]{background-color:var(--input-default-read-only-bg-color,#ededed);border-color:transparent;color:var(--md-primary-text-color,#121212)}.md-input-container .md-input.md-readonly:hover,.md-input-container .md-input[readonly]:hover{background-color:var(--input-default-read-only-bg-color,#ededed)}.md-input-container .md-input__after,.md-input-container .md-input__before{color:var(--md-secondary-text-color,#545454);fill:var(--md-secondary-text-color,#545454)}.md-input-container .md-input__after .md-spinner,.md-input-container .md-input__before .md-spinner{border:1px solid #b2b2b2}.md-input-container .md-input__after .md-spinner::after,.md-input-container .md-input__before .md-spinner::after{border-bottom:1px solid transparent;border-left:1px solid var(--md-secondary-text-color,#545454);border-right:1px solid transparent;border-top:1px solid transparent}.md-input-container .md-input__icon-clear{background-color:transparent;color:var(--md-secondary-text-color,#545454);fill:var(--md-secondary-text-color,#545454);display:flex}.md-input-container .md-input__icon-clear:focus,.md-input-container .md-input__icon-clear:hover{background-color:transparent;color:#545454;fill:#545454}.md-input-container.md-disabled .md-input__before{color:var(--input-disabled-text-color,#b2b2b2);fill:var(--input-disabled-text-color,#b2b2b2)}.md-input-container.md-disabled .md-input__before .md-spinner{border:1px solid #b2b2b2}.md-input-container.md-disabled .md-input__before .md-spinner::after{border-bottom:1px solid transparent;border-left:1px solid var(--input-disabled-text-color,#b2b2b2);border-right:1px solid transparent;border-top:1px solid transparent}.md-input-container .md-input__messages{display:block}.md-input-container .md-input__help-text,.md-input-container .md-input__secondary-label{color:#545454}.md-input-container.md-multi{display:inline-flex;flex:1 1 100%;margin-bottom:0}.md-input-container .md-input.md-input--multi{background-color:var(--input-default-bg-color,#fff);border-color:var(--input-default-border-color,#ccc);box-shadow:transparent}.md-input-container .md-input.md-input--multi:hover{background-color:var(--input-default-hover-bg-color,#ccc)}.md-input-container .md-input__before.md-input__content{width:auto}.md-input-container.column,.md-input-container.columns{padding:0}.md-input-container.md-error .md-input{background-color:var(--input-error-bg-color,#ffe8e3);border-color:var(--input-error-hover-border-color,#f7644a)}.md-input-container.md-error .md-input::placeholder{opacity:1}.md-input-container.md-error .md-input.md-hover,.md-input-container.md-error .md-input:hover{background-color:var(--input-error-hover-bg-color,#ffd5cc)}.md-input-container.md-error .md-input.md-hover:active,.md-input-container.md-error .md-input:hover:active{background-color:var(--input-error-pressed-bg-color,#ffbbad)}.md-input-container.md-error .md-input.md-disabled,.md-input-container.md-error .md-input:disabled{border-color:transparent}.md-input-container.md-error .md-input.md-readonly,.md-input-container.md-error .md-input[readonly]{border-color:transparent}.md-input-container.md-error .md-input__icon-clear{background-color:transparent;display:flex}.md-input-container.md-error .md-input__icon-clear:focus,.md-input-container.md-error .md-input__icon-clear:hover{background-color:transparent}.md-input-container.md-error .md-input__messages{display:block}.md-input-container.md-error:focus{border-color:var(--input-error-focus-border-color,#f7644a);outline:0;transition:border ease-in .15s}.md-input-container.md-error .md-input__message{color:var(--input-error-message-text-color,#a12512)}.md-input-container.md-error .md-input__message::before{content:"\\f38d"}.md-input-container.md-warning .md-input{background-color:var(--md-alert-warning-bg-color,#ffecc2);border-color:var(--input-warning-border-color,#fc9d03)}.md-input-container.md-warning .md-input::placeholder{opacity:1}.md-input-container.md-warning .md-input.md-hover,.md-input-container.md-warning .md-input:hover{background-color:var(--md-alert-warning-bg-color,#ffecc2)}.md-input-container.md-warning .md-input.md-disabled,.md-input-container.md-warning .md-input:disabled{border-color:transparent}.md-input-container.md-warning .md-input.md-readonly,.md-input-container.md-warning .md-input[readonly]{border-color:transparent}.md-input-container.md-warning .md-input__icon-clear{background-color:transparent;display:flex}.md-input-container.md-warning .md-input__icon-clear:focus,.md-input-container.md-warning .md-input__icon-clear:hover{background-color:transparent}.md-input-container.md-warning .md-input__messages{display:block}.md-input-container.md-warning .md-input__message::before{content:"\\fca1"}.md-input-container.md-success .md-input{background-color:var(--md-alert-success-bg-color,#78f5b8);border-color:var(--input-success-border-color,#00ab50)}.md-input-container.md-success .md-input::placeholder{opacity:1}.md-input-container.md-success .md-input.md-hover,.md-input-container.md-success .md-input:hover{background-color:var(--md-alert-success-bg-color,#78f5b8)}.md-input-container.md-success .md-input.md-disabled,.md-input-container.md-success .md-input:disabled{border-color:transparent}.md-input-container.md-success .md-input.md-readonly,.md-input-container.md-success .md-input[readonly]{border-color:transparent}.md-input-container.md-success .md-input__icon-clear{background-color:transparent;display:flex}.md-input-container.md-success .md-input__icon-clear:focus,.md-input-container.md-success .md-input__icon-clear:hover{background-color:transparent}.md-input-container.md-success .md-input__messages{display:block}.md-input-container.md-success .md-input__message::before{content:"\\f37e"}.md-input-container.md-input--filled .md-input{background-color:var(--input-filled-bg-color,#ededed);border:none}.md-input-container.md-input--filled .md-input::placeholder{opacity:1}.md-input-container.md-input--filled .md-input.md-hover,.md-input-container.md-input--filled .md-input:hover{background-color:var(--input-filled-hover-bg-color,#dedede)}.md-input-container.md-input--filled .md-input.md-disabled,.md-input-container.md-input--filled .md-input:disabled{background-color:var(--input-filled-disabled-bg-color,#ededed);border-color:transparent}.md-input-container.md-input--filled .md-input.md-disabled:hover,.md-input-container.md-input--filled .md-input:disabled:hover{background-color:var(--input-filled-disabled-bg-color,#ededed)}.md-input-container.md-input--filled .md-input.md-readonly,.md-input-container.md-input--filled .md-input[readonly]{background-color:var(--input-filled-disabled-bg-color,#ededed);border-color:transparent}.md-input-container.md-input--filled .md-input.md-readonly:hover,.md-input-container.md-input--filled .md-input[readonly]:hover{background-color:var(--input-filled-disabled-bg-color,#ededed)}.md-input-container.md-input--filled .md-input__icon-clear{background-color:transparent;display:flex}.md-input-container.md-input--filled .md-input__icon-clear:focus,.md-input-container.md-input--filled .md-input__icon-clear:hover{background-color:transparent}.md-input-container.md-input--filled .md-input__messages{display:block}.md-input{border:.0625rem solid;border-radius:4px;font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;height:2.125rem;padding:0 1rem;transition:box-shadow ease-out .15s;width:100%}.md-input.md-dirty{padding-right:2.1875rem}.md-input--nested-1{padding-left:2rem}.md-input--nested-2{padding-left:4rem}.md-input--nested-3{padding-left:6rem}.md-input::-ms-clear,.md-input::-ms-reveal{height:0;width:0}.md-input.md-focus,.md-input:focus{border-color:#007aa3;outline:0;transition:border ease-in .15s}.md-input.md-readonly,.md-input[readonly]{cursor:default}.md-input.md-disabled,.md-input:disabled{cursor:not-allowed}.md-input__after{left:auto;right:0}.md-input__before{left:0;right:auto}.md-input__after,.md-input__before{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;height:100%;position:absolute;top:0;width:2.75rem}.md-input__after md-icon::part(icon),.md-input__before md-icon::part(icon){display:flex}.md-input__help-text,.md-input__label,.md-input__messages{font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;width:100%}.md-input__label{margin-bottom:.5rem}.md-input__messages{display:none;font-size:.75rem;line-height:1.375rem;padding-left:1rem;padding-top:.5rem}.md-input__message{display:inline-flex;line-height:1.375rem;width:100%}.md-input__message md-icon{margin-right:.5em}.md-input__message--error{color:var(--input-error-mesage-text-color,#f7644a);font-size:.75rem;line-height:1.375rem;padding-left:1rem;position:relative;top:-.5rem}.md-input__message--error::before{content:"\\f38d"}.md-input__message::before{float:left;font-family:momentum-ui-icons;font-size:1rem;margin-right:.5rem}.md-input__wrapper{box-sizing:border-box;display:block;flex-grow:1;height:auto;padding:0;position:relative}.md-input--after{padding-right:2.75rem}.md-input--before{padding-left:2.75rem}.md-input--pill{border-radius:18px}.md-input--multiline{min-height:4.3125rem;padding-right:2.75rem}.md-input__icon-clear{border:none;cursor:pointer}.md-input[type=search]{width:100%}.md-input[type=search].md-input--milti{border-color:transparent}.md-input[type=search].md-input--milti:hover{background-color:#dedede}:host .md-input__label{width:100%}::slotted(*){display:flex}.md-spinner-container{align-items:center;display:flex;line-height:1}.md-input__message md-icon{margin-right:.5em}`,b=function(e,t,i,n){var r,o=arguments.length,d=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(d=(o<3?r(d):o>3?r(t,i,d):r(t,i))||d);return o>3&&d&&Object.defineProperty(t,i,d),d};const g=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],y=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],f=["text","number","password","email","tel","checkbox"],v=["none","pill"],_=a,x=["before","after"],w=[0,1,2,3],k=["grammar","false","spelling","true"];var O;!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends(Object(o.a)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="input",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.messageArr=[],this.min=void 0,this.max=void 0,this.maxLength=void 0,this.multi=!1,this.multiline=!1,this.name="",this.nestedLevel=0,this.placeholder="",this.readOnly=!1,this.required=!1,this.searchable=!1,this.secondaryLabel="",this.selectWhenInFocus=!1,this.shape="",this.type="text",this.value="",this.isEditing=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){this.input.select()}handleOutsideClick(e){let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||(this.input.blur(),this.isEditing=!1))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleFocus(e){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleMouseDown(e){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleChange(e){this.value=e.target.value,this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleClear(e){if("keydown"===e.type){const{code:t}=e;if(t!==n.b.Space&&t!==n.b.Enter)return;e.preventDefault()}this.input.focus(),this.handleChange(e)}handleLabelClick(){this.input.focus()}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[""+this.containerSize]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,["md-"+this.messageType]:!!this.messageType,["md-input--nested-"+this.nestedLevel]:!!this.nestedLevel,"md-multi":this.multi}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[""+this.inputSize]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,["md-input--"+this.shape]:!!this.shape,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disabled":this.disabled,"md-dirty":!!this.value}}inputTemplate(){return this.multiline?l.html`
1
+ (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[15],{24:function(e,t,i){"use strict";i.r(t),i.d(t,"containerSize",(function(){return g})),i.d(t,"inputSize",(function(){return y})),i.d(t,"inputType",(function(){return f})),i.d(t,"inputShape",(function(){return v})),i.d(t,"iconNames",(function(){return _})),i.d(t,"iconPosition",(function(){return x})),i.d(t,"nestedLevel",(function(){return w})),i.d(t,"ariaInvalidType",(function(){return k})),i.d(t,"Input",(function(){return $}));i(50),i(15),i(51),i(48);var n=i(1),r=i(5),o=i(33),d=i(4),a=i(10),l=i(0),s=i(2),p=i(3),m=i(6),c=i(14),u=i(9),h=l.css`@font-face{font-display:fallback;font-family:"CiscoSansTT Regular";font-style:normal;font-weight:400;src:url(/fonts/CiscoSansTTRegular.woff2) format("woff2"),url(/fonts/CiscoSansTTRegular.woff) format("woff")}[class*=md] *,[class*=md] ::after,[class*=md] ::before,[class*=md] button,[class*=md] input,[class*=md] select,[class*=md] textarea{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit;font-size:var(--rem-base)}[class*=md] button,[class*=md] input{overflow:visible}[class*=md] textarea{line-height:1.2rem;max-height:2.25rem;max-width:100%;overflow:auto;padding-bottom:.375rem;padding-top:.375rem;resize:none}[class*=md] textarea[rows]{height:auto}[class*=md] [type=submit]{appearance:none}[class*=md] input[type=file]{margin:0 0 1rem 0;width:100%}[class*=md] input::-webkit-inner-spin-button,[class*=md] input::-webkit-outer-spin-button{appearance:none;margin:0}[class*=md] input[type=number]{moz-appearance:textfield}[class*=md] [type=number]{appearance:textfield}[class*=md] [type=number]::-webkit-inner-spin-button,[class*=md] [type=number]::-webkit-outer-spin-button{height:auto}[class*=md] [type=search]::-webkit-search-cancel-button,[class*=md] [type=search]::-webkit-search-decoration{appearance:none}[class*=md] ::input-placeholder{color:inherit;opacity:.6}[class*=md] ::-webkit-file-upload-button{appearance:button;font:inherit}.md-input-container{align-content:normal;align-items:normal;display:flex;flex-flow:column wrap;justify-content:normal;box-sizing:border-box;line-height:0;margin-bottom:1rem;position:relative;width:100%}.md-input-container .md-input{background-color:var(--input-default-bg-color,#fff);color:var(--md-secondary-text-color,#545454);border-color:var(--input-default-border-color,#ccc)}.md-input-container .md-input::placeholder{color:#545454;opacity:1}.md-input-container .md-input.md-hover,.md-input-container .md-input:hover{background-color:var(--input-default-hover-bg-color,#ccc)}.md-input-container .md-input.md-hover:active,.md-input-container .md-input:hover:active{background-color:var(--input-default-pressed-bg-color,#ccc);border-color:var(--input-default-pressed-border-color,#ccc)}.md-input-container .md-input.md-disabled,.md-input-container .md-input:disabled{background-color:var(--input-default-read-only-bg-color,#ededed);border-color:transparent;color:var(--input-disabled-text-color,#b2b2b2)}.md-input-container .md-input.md-disabled::placeholder,.md-input-container .md-input:disabled::placeholder{color:var(--input-disabled-text-color,#b2b2b2)}.md-input-container .md-input.md-disabled:hover,.md-input-container .md-input:disabled:hover{background-color:var(--input-default-read-only-bg-color,#ededed)}.md-input-container .md-input.md-readonly,.md-input-container .md-input[readonly]{background-color:var(--input-default-read-only-bg-color,#ededed);border-color:transparent;color:var(--md-primary-text-color,#121212)}.md-input-container .md-input.md-readonly:hover,.md-input-container .md-input[readonly]:hover{background-color:var(--input-default-read-only-bg-color,#ededed)}.md-input-container .md-input__after,.md-input-container .md-input__before{color:var(--md-secondary-text-color,#545454);fill:var(--md-secondary-text-color,#545454)}.md-input-container .md-input__after .md-spinner,.md-input-container .md-input__before .md-spinner{border:1px solid #b2b2b2}.md-input-container .md-input__after .md-spinner::after,.md-input-container .md-input__before .md-spinner::after{border-bottom:1px solid transparent;border-left:1px solid var(--md-secondary-text-color,#545454);border-right:1px solid transparent;border-top:1px solid transparent}.md-input-container .md-input__icon-clear{background-color:transparent;color:var(--md-secondary-text-color,#545454);fill:var(--md-secondary-text-color,#545454);display:flex}.md-input-container .md-input__icon-clear:focus,.md-input-container .md-input__icon-clear:hover{background-color:transparent;color:#545454;fill:#545454}.md-input-container.md-disabled .md-input__before{color:var(--input-disabled-text-color,#b2b2b2);fill:var(--input-disabled-text-color,#b2b2b2)}.md-input-container.md-disabled .md-input__before .md-spinner{border:1px solid #b2b2b2}.md-input-container.md-disabled .md-input__before .md-spinner::after{border-bottom:1px solid transparent;border-left:1px solid var(--input-disabled-text-color,#b2b2b2);border-right:1px solid transparent;border-top:1px solid transparent}.md-input-container .md-input__messages{display:block}.md-input-container .md-input__help-text,.md-input-container .md-input__secondary-label{color:#545454}.md-input-container.md-multi{display:inline-flex;flex:1 1 100%;margin-bottom:0}.md-input-container .md-input.md-input--multi{background-color:var(--input-default-bg-color,#fff);border-color:var(--input-default-border-color,#ccc);box-shadow:transparent}.md-input-container .md-input.md-input--multi:hover{background-color:var(--input-default-hover-bg-color,#ccc)}.md-input-container .md-input__before.md-input__content{width:auto}.md-input-container.column,.md-input-container.columns{padding:0}.md-input-container.md-error .md-input{background-color:var(--input-error-bg-color,#ffe8e3);border-color:var(--input-error-hover-border-color,#f7644a)}.md-input-container.md-error .md-input::placeholder{opacity:1}.md-input-container.md-error .md-input.md-hover,.md-input-container.md-error .md-input:hover{background-color:var(--input-error-hover-bg-color,#ffd5cc)}.md-input-container.md-error .md-input.md-hover:active,.md-input-container.md-error .md-input:hover:active{background-color:var(--input-error-pressed-bg-color,#ffbbad)}.md-input-container.md-error .md-input.md-disabled,.md-input-container.md-error .md-input:disabled{border-color:transparent}.md-input-container.md-error .md-input.md-readonly,.md-input-container.md-error .md-input[readonly]{border-color:transparent}.md-input-container.md-error .md-input__icon-clear{background-color:transparent;display:flex}.md-input-container.md-error .md-input__icon-clear:focus,.md-input-container.md-error .md-input__icon-clear:hover{background-color:transparent}.md-input-container.md-error .md-input__messages{display:block}.md-input-container.md-error:focus{border-color:var(--input-error-focus-border-color,#f7644a);outline:0;transition:border ease-in .15s}.md-input-container.md-error .md-input__message{color:var(--input-error-message-text-color,#a12512)}.md-input-container.md-error .md-input__message::before{content:"\\f38d"}.md-input-container.md-warning .md-input{background-color:var(--md-alert-warning-bg-color,#ffecc2);border-color:var(--input-warning-border-color,#fc9d03)}.md-input-container.md-warning .md-input::placeholder{opacity:1}.md-input-container.md-warning .md-input.md-hover,.md-input-container.md-warning .md-input:hover{background-color:var(--md-alert-warning-bg-color,#ffecc2)}.md-input-container.md-warning .md-input.md-disabled,.md-input-container.md-warning .md-input:disabled{border-color:transparent}.md-input-container.md-warning .md-input.md-readonly,.md-input-container.md-warning .md-input[readonly]{border-color:transparent}.md-input-container.md-warning .md-input__icon-clear{background-color:transparent;display:flex}.md-input-container.md-warning .md-input__icon-clear:focus,.md-input-container.md-warning .md-input__icon-clear:hover{background-color:transparent}.md-input-container.md-warning .md-input__messages{display:block}.md-input-container.md-warning .md-input__message::before{content:"\\fca1"}.md-input-container.md-success .md-input{background-color:var(--md-alert-success-bg-color,#78f5b8);border-color:var(--input-success-border-color,#00ab50)}.md-input-container.md-success .md-input::placeholder{opacity:1}.md-input-container.md-success .md-input.md-hover,.md-input-container.md-success .md-input:hover{background-color:var(--md-alert-success-bg-color,#78f5b8)}.md-input-container.md-success .md-input.md-disabled,.md-input-container.md-success .md-input:disabled{border-color:transparent}.md-input-container.md-success .md-input.md-readonly,.md-input-container.md-success .md-input[readonly]{border-color:transparent}.md-input-container.md-success .md-input__icon-clear{background-color:transparent;display:flex}.md-input-container.md-success .md-input__icon-clear:focus,.md-input-container.md-success .md-input__icon-clear:hover{background-color:transparent}.md-input-container.md-success .md-input__messages{display:block}.md-input-container.md-success .md-input__message::before{content:"\\f37e"}.md-input-container.md-input--filled .md-input{background-color:var(--input-filled-bg-color,#ededed);border:none}.md-input-container.md-input--filled .md-input::placeholder{opacity:1}.md-input-container.md-input--filled .md-input.md-hover,.md-input-container.md-input--filled .md-input:hover{background-color:var(--input-filled-hover-bg-color,#dedede)}.md-input-container.md-input--filled .md-input.md-disabled,.md-input-container.md-input--filled .md-input:disabled{background-color:var(--input-filled-disabled-bg-color,#ededed);border-color:transparent}.md-input-container.md-input--filled .md-input.md-disabled:hover,.md-input-container.md-input--filled .md-input:disabled:hover{background-color:var(--input-filled-disabled-bg-color,#ededed)}.md-input-container.md-input--filled .md-input.md-readonly,.md-input-container.md-input--filled .md-input[readonly]{background-color:var(--input-filled-disabled-bg-color,#ededed);border-color:transparent}.md-input-container.md-input--filled .md-input.md-readonly:hover,.md-input-container.md-input--filled .md-input[readonly]:hover{background-color:var(--input-filled-disabled-bg-color,#ededed)}.md-input-container.md-input--filled .md-input__icon-clear{background-color:transparent;display:flex}.md-input-container.md-input--filled .md-input__icon-clear:focus,.md-input-container.md-input--filled .md-input__icon-clear:hover{background-color:transparent}.md-input-container.md-input--filled .md-input__messages{display:block}.md-input{border:.0625rem solid;border-radius:4px;font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;height:2.125rem;padding:0 1rem;transition:box-shadow ease-out .15s;width:100%}.md-input.md-dirty{padding-right:2.1875rem}.md-input--nested-1{padding-left:2rem}.md-input--nested-2{padding-left:4rem}.md-input--nested-3{padding-left:6rem}.md-input::-ms-clear,.md-input::-ms-reveal{height:0;width:0}.md-input.md-focus,.md-input:focus{border-color:#007aa3;outline:0;transition:border ease-in .15s}.md-input.md-readonly,.md-input[readonly]{cursor:default}.md-input.md-disabled,.md-input:disabled{cursor:not-allowed}.md-input__after{left:auto;right:0}.md-input__before{left:0;right:auto}.md-input__after,.md-input__before{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;height:100%;position:absolute;top:0;width:2.75rem}.md-input__after md-icon::part(icon),.md-input__before md-icon::part(icon){display:flex}.md-input__help-text,.md-input__label,.md-input__messages{font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;width:100%}.md-input__label{margin-bottom:.5rem}.md-input__messages{display:none;font-size:.75rem;line-height:1.375rem;padding-left:1rem;padding-top:.5rem}.md-input__message{display:inline-flex;line-height:1.375rem;width:100%}.md-input__message md-icon{margin-right:.5em}.md-input__message--error{color:var(--input-error-mesage-text-color,#f7644a);font-size:.75rem;line-height:1.375rem;padding-left:1rem;position:relative;top:-.5rem}.md-input__message--error::before{content:"\\f38d"}.md-input__message::before{float:left;font-family:momentum-ui-icons;font-size:1rem;margin-right:.5rem}.md-input__wrapper{box-sizing:border-box;display:block;flex-grow:1;height:auto;padding:0;position:relative}.md-input--after{padding-right:2.75rem}.md-input--before{padding-left:2.75rem}.md-input--pill{border-radius:18px}.md-input--multiline{min-height:4.3125rem;padding-right:2.75rem}.md-input__icon-clear{border:none;cursor:pointer}.md-input[type=search]{width:100%}.md-input[type=search].md-input--milti{border-color:transparent}.md-input[type=search].md-input--milti:hover{background-color:#dedede}:host .md-input__label{width:100%}::slotted(*){display:flex}.md-spinner-container{align-items:center;display:flex;line-height:1}.md-input__message md-icon{margin-right:.5em}`,b=function(e,t,i,n){var r,o=arguments.length,d=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(d=(o<3?r(d):o>3?r(t,i,d):r(t,i))||d);return o>3&&d&&Object.defineProperty(t,i,d),d};const g=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],y=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],f=["text","number","password","email","tel","checkbox"],v=["none","pill"],_=a,x=["before","after"],w=[0,1,2,3],k=["grammar","false","spelling","true"];var $;!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends(Object(o.a)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="input",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.messageArr=[],this.min=void 0,this.max=void 0,this.maxLength=void 0,this.multi=!1,this.multiline=!1,this.name="",this.nestedLevel=0,this.placeholder="",this.readOnly=!1,this.required=!1,this.searchable=!1,this.secondaryLabel="",this.selectWhenInFocus=!1,this.shape="",this.type="text",this.value="",this.isEditing=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){this.input.select()}handleOutsideClick(e){let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||(this.input.blur(),this.isEditing=!1))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleFocus(e){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleMouseDown(e){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleChange(e){this.value=e.target.value,this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleClear(e){if("keydown"===e.type){const{code:t}=e;if(t!==n.b.Space&&t!==n.b.Enter)return;e.preventDefault()}this.input.focus(),this.handleChange(e)}handleLabelClick(){this.input.focus()}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[""+this.containerSize]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,["md-"+this.messageType]:!!this.messageType,["md-input--nested-"+this.nestedLevel]:!!this.nestedLevel,"md-multi":this.multi}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[""+this.inputSize]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,["md-input--"+this.shape]:!!this.shape,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disabled":this.disabled,"md-dirty":!!this.value}}inputTemplate(){return this.multiline?l.html`
2
2
  <textarea
3
3
  part="input"
4
4
  class="md-input ${Object(p.classMap)(this.inputTemplateClassMap)}"
@@ -14,7 +14,7 @@
14
14
  ?autofocus=${this.autofocus}
15
15
  aria-label=${this.ariaLabel}
16
16
  aria-invalid=${this.ariaInvalid}
17
- aria-errormessage="default message"
17
+ aria-errormessage="${this.htmlId}-message"
18
18
  ?disabled=${this.disabled}
19
19
  id=${this.htmlId}
20
20
  placeholder=${this.placeholder}
@@ -38,6 +38,7 @@
38
38
  aria-describedby=${this.ariaDescribedBy}
39
39
  aria-label=${this.ariaLabel}
40
40
  aria-invalid=${this.ariaInvalid}
41
+ aria-errormessage="${this.htmlId}-message"
41
42
  ?disabled=${this.disabled}
42
43
  id=${this.htmlId}
43
44
  placeholder=${this.placeholder}
@@ -92,7 +93,7 @@
92
93
  style=${Object(u.styleMap)({width:"100%"})}
93
94
  ></md-help-text>
94
95
  `:s.nothing}messagesTemplate(){return!this.hideMessage&&this.messages&&this.messages.length?l.html`
95
- <div part="message" class="md-input__messages">
96
+ <div id="${this.htmlId}-message" part="message" class="md-input__messages">
96
97
  ${Object(c.repeat)(this.messages,e=>l.html`
97
98
  <md-help-text
98
99
  .message=${e}
@@ -115,4 +116,4 @@
115
116
  </div>
116
117
  ${this.messagesTemplate()} ${this.secondaryLabelTemplate()} ${this.helpTextTemplate()}
117
118
  </div>
118
- `}};b([Object(l.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),b([Object(l.property)({type:String})],i.prototype,"ariaInvalid",void 0),b([Object(l.property)({type:String})],i.prototype,"ariaLabel",void 0),b([Object(l.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),b([Object(l.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"clear",void 0),b([Object(l.property)({type:String})],i.prototype,"clearAriaLabel",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"compact",void 0),b([Object(l.property)({type:String})],i.prototype,"containerSize",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"disabled",void 0),b([Object(l.property)({type:String})],i.prototype,"id",void 0),b([Object(l.property)({type:String})],i.prototype,"inputSize",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"isFilled",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"isLoading",void 0),b([Object(l.property)({type:String})],i.prototype,"label",void 0),b([Object(l.property)({type:String})],i.prototype,"helpText",void 0),b([Object(l.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),b([Object(l.property)({type:String})],i.prototype,"htmlId",void 0),b([Object(l.property)({type:Array})],i.prototype,"messageArr",void 0),b([Object(l.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),b([Object(l.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),b([Object(l.property)({type:Number})],i.prototype,"maxLength",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"multi",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"multiline",void 0),b([Object(l.property)({type:String,reflect:!0})],i.prototype,"name",void 0),b([Object(l.property)({type:Number})],i.prototype,"nestedLevel",void 0),b([Object(l.property)({type:String})],i.prototype,"placeholder",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"readOnly",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"required",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"searchable",void 0),b([Object(l.property)({type:String})],i.prototype,"secondaryLabel",void 0),b([Object(l.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),b([Object(l.property)({type:String})],i.prototype,"shape",void 0),b([Object(l.property)({type:String})],i.prototype,"type",void 0),b([Object(l.property)({type:String,reflect:!0})],i.prototype,"value",void 0),b([Object(l.query)(".md-input")],i.prototype,"input",void 0),b([Object(l.internalProperty)()],i.prototype,"isEditing",void 0),i=b([Object(r.a)("md-input")],i),e.ELEMENT=i}(O||(O={}))}}]);
119
+ `}};b([Object(l.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),b([Object(l.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),b([Object(l.property)({type:String})],i.prototype,"ariaLabel",void 0),b([Object(l.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),b([Object(l.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"clear",void 0),b([Object(l.property)({type:String})],i.prototype,"clearAriaLabel",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"compact",void 0),b([Object(l.property)({type:String})],i.prototype,"containerSize",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"disabled",void 0),b([Object(l.property)({type:String})],i.prototype,"id",void 0),b([Object(l.property)({type:String})],i.prototype,"inputSize",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"isFilled",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"isLoading",void 0),b([Object(l.property)({type:String})],i.prototype,"label",void 0),b([Object(l.property)({type:String})],i.prototype,"helpText",void 0),b([Object(l.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),b([Object(l.property)({type:String})],i.prototype,"htmlId",void 0),b([Object(l.property)({type:Array})],i.prototype,"messageArr",void 0),b([Object(l.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),b([Object(l.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),b([Object(l.property)({type:Number})],i.prototype,"maxLength",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"multi",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"multiline",void 0),b([Object(l.property)({type:String,reflect:!0})],i.prototype,"name",void 0),b([Object(l.property)({type:Number})],i.prototype,"nestedLevel",void 0),b([Object(l.property)({type:String})],i.prototype,"placeholder",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"readOnly",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"required",void 0),b([Object(l.property)({type:Boolean})],i.prototype,"searchable",void 0),b([Object(l.property)({type:String})],i.prototype,"secondaryLabel",void 0),b([Object(l.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),b([Object(l.property)({type:String})],i.prototype,"shape",void 0),b([Object(l.property)({type:String})],i.prototype,"type",void 0),b([Object(l.property)({type:String,reflect:!0})],i.prototype,"value",void 0),b([Object(l.query)(".md-input")],i.prototype,"input",void 0),b([Object(l.internalProperty)()],i.prototype,"isEditing",void 0),i=b([Object(r.a)("md-input")],i),e.ELEMENT=i}($||($={}))}}]);
@@ -1,8 +1,8 @@
1
- (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[35],{68:function(t,e,o){"use strict";o.r(e),o.d(e,"tooltipPlacement",(function(){return d})),o.d(e,"tooltipStrategy",(function(){return h})),o.d(e,"Tooltip",(function(){return u}));var s=o(7),n=o(4),i=o(5),p=o(0),l=o(3),r=o(59),a=o(1),c=function(t,e,o,s){var n,i=arguments.length,p=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,o,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(p=(i<3?n(p):i>3?n(e,o,p):n(e,o))||p);return i>3&&p&&Object.defineProperty(e,o,p),p};const d=["auto","auto-start","auto-end","left-start","left","left-end","right-start","right","right-end","top-start","top","top-end","bottom-start","bottom","bottom-end"],h=["fixed","absolute"];var u;!function(t){let e=class extends(Object(s.a)(p.LitElement)){constructor(){super(...arguments),this.message="",this.placement="auto",this.disabled=!1,this.opened=!1,this.slotContent=null}handleFocusIn(t){super.handleFocusIn&&super.handleFocusIn(t),this.notifyTooltipCreate()}handleFocusOut(t){super.handleFocusOut&&super.handleFocusOut(t),this.notifyTooltipDestroy()}openTooltip(){this.dispatchEvent(new CustomEvent("tooltip-create",{bubbles:!0,composed:!0,detail:Object.assign({placement:this.placement,reference:this.reference,popper:this.popper},!this.message&&{slotContent:this.slotContent})}))}closeTooltip(){this.dispatchEvent(new CustomEvent("tooltip-destroy",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeMessage(){this.dispatchEvent(new CustomEvent("tooltip-message",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeSlotContent(t){this.dispatchEvent(new CustomEvent("tooltip-slot",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper,slotContent:t}}))}notifyTooltipCreate(){this.disabled||(this.opened=!0)}notifyTooltipDestroy(){this.disabled||(this.opened=!1)}handleKeyDown(t){t.code===a.b.Escape&&this.notifyTooltipDestroy()}handleSlotContentChange(t){const e=t.target;if(e){const t=e.assignedElements({flatten:!0});t.length&&(this.slotContent&&this.changeSlotContent(t),this.slotContent=t)}}updated(t){super.updated(t),t.has("opened")&&(this.opened?this.openTooltip():this.closeTooltip()),t.has("message")&&this.changeMessage()}get tooltipClassMap(){return{"md-tooltip--disabled":this.disabled}}render(){return p.html`
2
- <div class="md-tooltip ${Object(l.classMap)(this.tooltipClassMap)}">
1
+ (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[35],{68:function(t,e,o){"use strict";o.r(e),o.d(e,"tooltipPlacement",(function(){return d})),o.d(e,"tooltipStrategy",(function(){return h})),o.d(e,"Tooltip",(function(){return u}));var s=o(1),n=o(7),i=o(5),p=o(4),l=o(0),r=o(3),a=o(59),c=function(t,e,o,s){var n,i=arguments.length,p=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(t,e,o,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(p=(i<3?n(p):i>3?n(e,o,p):n(e,o))||p);return i>3&&p&&Object.defineProperty(e,o,p),p};const d=["auto","auto-start","auto-end","left-start","left","left-end","right-start","right","right-end","top-start","top","top-end","bottom-start","bottom","bottom-end"],h=["fixed","absolute"];var u;!function(t){let e=class extends(Object(n.a)(l.LitElement)){constructor(){super(...arguments),this.message="",this.placement="auto",this.disabled=!1,this.opened=!1,this.slotContent=null,this._keyDownListener=t=>{this.handleKeyDown(t)}}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this._keyDownListener)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._keyDownListener)}handleFocusIn(t){super.handleFocusIn&&super.handleFocusIn(t),this.notifyTooltipCreate()}handleFocusOut(t){super.handleFocusOut&&super.handleFocusOut(t),this.notifyTooltipDestroy()}openTooltip(){this.dispatchEvent(new CustomEvent("tooltip-create",{bubbles:!0,composed:!0,detail:Object.assign({placement:this.placement,reference:this.reference,popper:this.popper},!this.message&&{slotContent:this.slotContent})}))}closeTooltip(){this.dispatchEvent(new CustomEvent("tooltip-destroy",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeMessage(){this.dispatchEvent(new CustomEvent("tooltip-message",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeSlotContent(t){this.dispatchEvent(new CustomEvent("tooltip-slot",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper,slotContent:t}}))}notifyTooltipCreate(){this.disabled||(this.opened=!0)}notifyTooltipDestroy(){this.disabled||(this.opened=!1)}handleKeyDown(t){t.code===s.b.Escape&&this.notifyTooltipDestroy()}handleSlotContentChange(t){const e=t.target;if(e){const t=e.assignedElements({flatten:!0});t.length&&(this.slotContent&&this.changeSlotContent(t),this.slotContent=t)}}updated(t){super.updated(t),t.has("opened")&&(this.opened?this.openTooltip():this.closeTooltip()),t.has("message")&&this.changeMessage()}get tooltipClassMap(){return{"md-tooltip--disabled":this.disabled}}render(){return l.html`
2
+ <div class="md-tooltip ${Object(r.classMap)(this.tooltipClassMap)}">
3
3
  <div class="md-tooltip__popper" role="tooltip" part="tooltip-popper">
4
4
  <div class="md-tooltip__content" part="tooltip-content">
5
- ${this.message?this.message:p.html`
5
+ ${this.message?this.message:l.html`
6
6
  <slot name="tooltip-content" @slotchange=${this.handleSlotContentChange}></slot>
7
7
  `}
8
8
  </div>
@@ -20,4 +20,4 @@
20
20
  <slot></slot>
21
21
  </div>
22
22
  </div>
23
- `}static get styles(){return[n.a,r.a]}};c([Object(p.property)({type:String})],e.prototype,"message",void 0),c([Object(p.property)({type:String,reflect:!0})],e.prototype,"placement",void 0),c([Object(p.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),c([Object(p.property)({type:Boolean,reflect:!0})],e.prototype,"opened",void 0),c([Object(p.query)(".md-tooltip__popper")],e.prototype,"popper",void 0),c([Object(p.query)(".md-tooltip__reference")],e.prototype,"reference",void 0),e=c([Object(i.a)("md-tooltip")],e),t.ELEMENT=e}(u||(u={}))}}]);
23
+ `}static get styles(){return[p.a,a.a]}};c([Object(l.property)({type:String})],e.prototype,"message",void 0),c([Object(l.property)({type:String,reflect:!0})],e.prototype,"placement",void 0),c([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),c([Object(l.property)({type:Boolean,reflect:!0})],e.prototype,"opened",void 0),c([Object(l.query)(".md-tooltip__popper")],e.prototype,"popper",void 0),c([Object(l.query)(".md-tooltip__reference")],e.prototype,"reference",void 0),e=c([Object(i.a)("md-tooltip")],e),t.ELEMENT=e}(u||(u={}))}}]);
@@ -1,21 +1,26 @@
1
- (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[37],{40:function(e,t,a){"use strict";a.r(t),a.d(t,"DatePicker",(function(){return i}));a(70),a(24),a(32);var i,s=a(5),o=a(8),l=a(18),n=a(19),r=a(0),c=a(6),d=a(12),h=function(e,t,a,i){var s,o=arguments.length,l=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,a,i);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(l=(o<3?s(l):o>3?s(t,a,l):s(t,a))||l);return o>3&&l&&Object.defineProperty(t,a,l),l},p=function(e,t,a,i){return new(a||(a=Promise))((function(s,o){function l(e){try{r(i.next(e))}catch(e){o(e)}}function n(e){try{r(i.throw(e))}catch(e){o(e)}}function r(e){var t;e.done?s(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(l,n)}r((i=i.apply(e,t||[])).next())}))};!function(e){e.weekStartDays=["Sunday","Monday"];let t=class extends r.LitElement{constructor(){super(...arguments),this.shouldCloseOnSelect=!1,this.maxDate=void 0,this.minDate=void 0,this.value=void 0,this.weekStart="Sunday",this.placeholder=void 0,this.locale="en-US",this.includesTime=!1,this.disabled=!1,this.customTrigger=!1,this.selectedDate=Object(o.n)(),this.focusedDate=Object(o.n)(),this.filterDate=void 0,this.maxDateData=void 0,this.minDateData=void 0,this.handleDateInputChange=e=>{var t,a;(null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.value)&&(this.value=null===(a=null==e?void 0:e.detail)||void 0===a?void 0:a.value),this.dispatchEvent(new CustomEvent("date-input-change",{bubbles:!0,composed:!0,detail:{sourceEvent:e,value:this.value}}))},this.setOpen=e=>{this.menuOverlay.isOpen=e},this.handleSelect=e=>{const t=e.detail.date,a=e.detail.sourceEvent;this.setPreSelection(t),this.setSelected(t,a),this.shouldCloseOnSelect&&this.setOpen(!1)},this.setSelected=(e,t)=>{const a={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};if(!Object(o.j)(e,a)){const t=this.includesTime?e.startOf("second").toISO({suppressMilliseconds:!0}):e.toISODate();this.selectedDate=e,this.value=t}this.dispatchEvent(new CustomEvent("date-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,data:e}}))},this.setPreSelection=e=>{const t={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};Object(o.j)(e,t)||(this.focusedDate=e)},this.handleKeyDown=e=>{const t=e.detail.sourceEvent;let a=!1;const i=this.focusedDate;switch(!t.shiftKey&&t.code){case"Space":case"Enter":this.handleSelect(e),a=!0;break;case"Escape":this.setOpen(!1);break;case"ArrowUp":this.setPreSelection(Object(o.s)(i,1)),a=!0;break;case"ArrowLeft":this.setPreSelection(Object(o.q)(i,1)),a=!0;break;case"ArrowRight":this.setPreSelection(Object(o.a)(i,1)),a=!0;break;case"ArrowDown":this.setPreSelection(Object(o.c)(i,1)),a=!0}a&&(t.stopPropagation(),t.preventDefault())},this.chosenDateLabel=()=>this.selectedDate?`, Selected date is ${this.selectedDate.weekdayLong} ${this.selectedDate.monthLong} ${this.selectedDate.day}, ${this.selectedDate.year}`:void 0,this.isValueValid=()=>{if(!this.value&&""!==this.value)return!0;const e=Object(l.a)("md-date-range-picker",this),t=e&&e.startDate&&e.endDate?n.a.dateRangeString:this.includesTime?n.a.ISOString:n.a.ISODateString,a=RegExp(t),i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};return this.value&&a.test(this.value)&&!Object(o.j)(d.DateTime.fromISO(this.value,{locale:this.locale}),i)}}connectedCallback(){super.connectedCallback(),this.minDate&&(this.minDateData=d.DateTime.fromISO(this.minDate,{locale:this.locale})),this.maxDate&&(this.maxDateData=d.DateTime.fromISO(this.maxDate,{locale:this.locale}))}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});var a,i;return p(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),""===this.value&&(this.value=this.includesTime?null===(a=this.selectedDate)||void 0===a?void 0:a.startOf("second").toISO({suppressMilliseconds:!0}):null===(i=this.selectedDate)||void 0===i?void 0:i.toISODate())}))}updated(e){if(super.updated(e),this.value&&e.has("value")){if(Object(l.a)("md-date-range-picker",this))return;this.selectedDate=d.DateTime.fromISO(this.value,{locale:this.locale}),this.setPreSelection(this.selectedDate)}e.has("locale")&&this.render(),this.minDate&&e.has("minDate")&&(this.minDateData=d.DateTime.fromISO(this.minDate,{locale:this.locale})),this.maxDate&&e.has("maxDate")&&(this.maxDateData=d.DateTime.fromISO(this.maxDate,{locale:this.locale}))}render(){return r.html`
1
+ (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[37],{40:function(e,t,a){"use strict";a.r(t),a.d(t,"DatePicker",(function(){return i}));a(70),a(24),a(32);var i,s=a(1),o=a(5),r=a(8),l=a(18),n=a(19),c=a(0),d=a(6),h=a(12),p=function(e,t,a,i){var s,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(r=(o<3?s(r):o>3?s(t,a,r):s(t,a))||r);return o>3&&r&&Object.defineProperty(t,a,r),r},u=function(e,t,a,i){return new(a||(a=Promise))((function(s,o){function r(e){try{n(i.next(e))}catch(e){o(e)}}function l(e){try{n(i.throw(e))}catch(e){o(e)}}function n(e){var t;e.done?s(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(r,l)}n((i=i.apply(e,t||[])).next())}))};!function(e){e.weekStartDays=["Sunday","Monday"];let t=class extends c.LitElement{constructor(){super(...arguments),this.shouldCloseOnSelect=!1,this.maxDate=void 0,this.minDate=void 0,this.value=void 0,this.weekStart="Sunday",this.placeholder=void 0,this.locale="en-US",this.includesTime=!1,this.disabled=!1,this.htmlId="",this.label="",this.ariaLabel="Choose Date",this.required=!1,this.errorMessage="",this.customTrigger=!1,this.selectedDate=Object(r.n)(),this.focusedDate=Object(r.n)(),this.filterDate=void 0,this.maxDateData=void 0,this.minDateData=void 0,this.handleDateInputChange=e=>{var t,a;(null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.value)&&(this.value=null===(a=null==e?void 0:e.detail)||void 0===a?void 0:a.value),this.dispatchEvent(new CustomEvent("date-input-change",{bubbles:!0,composed:!0,detail:{sourceEvent:e,value:this.value}}))},this.setOpen=e=>{this.menuOverlay.isOpen=e},this.handleSelect=e=>{const t=e.detail.date,a=e.detail.sourceEvent;this.setPreSelection(t),this.setSelected(t,a),this.shouldCloseOnSelect&&this.setOpen(!1)},this.setSelected=(e,t)=>{const a={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};if(!Object(r.j)(e,a)){const t=this.includesTime?e.startOf("second").toISO({suppressMilliseconds:!0}):e.toISODate();this.selectedDate=e,this.value=t}this.dispatchEvent(new CustomEvent("date-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,data:e}}))},this.setPreSelection=e=>{const t={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};Object(r.j)(e,t)||(this.focusedDate=e)},this.handleInputKeyDown=e=>{e.code===s.b.ArrowDown&&this.setOpen(!0)},this.handleKeyDown=e=>{const t=e.detail.sourceEvent;let a=!1;const i=this.focusedDate;switch(!t.shiftKey&&t.code){case"Space":case"Enter":this.handleSelect(e),a=!0;break;case"Escape":this.setOpen(!1);break;case"ArrowUp":this.setPreSelection(Object(r.s)(i,1)),a=!0;break;case"ArrowLeft":this.setPreSelection(Object(r.q)(i,1)),a=!0;break;case"ArrowRight":this.setPreSelection(Object(r.a)(i,1)),a=!0;break;case"ArrowDown":this.setPreSelection(Object(r.c)(i,1)),a=!0}a&&(t.stopPropagation(),t.preventDefault())},this.chosenDateLabel=()=>this.selectedDate?`, Selected date is ${this.selectedDate.weekdayLong} ${this.selectedDate.monthLong} ${this.selectedDate.day}, ${this.selectedDate.year}`:void 0,this.isValueValid=()=>{if(!this.value&&""!==this.value)return!0;const e=Object(l.a)("md-date-range-picker",this),t=e&&e.startDate&&e.endDate?n.a.dateRangeString:this.includesTime?n.a.ISOString:n.a.ISODateString,a=RegExp(t),i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};return this.value&&a.test(this.value)&&!Object(r.j)(h.DateTime.fromISO(this.value,{locale:this.locale}),i)}}connectedCallback(){super.connectedCallback(),this.minDate&&(this.minDateData=h.DateTime.fromISO(this.minDate,{locale:this.locale})),this.maxDate&&(this.maxDateData=h.DateTime.fromISO(this.maxDate,{locale:this.locale}))}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});var a,i;return u(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),""===this.value&&(this.value=this.includesTime?null===(a=this.selectedDate)||void 0===a?void 0:a.startOf("second").toISO({suppressMilliseconds:!0}):null===(i=this.selectedDate)||void 0===i?void 0:i.toISODate())}))}updated(e){if(super.updated(e),this.value&&e.has("value")){if(Object(l.a)("md-date-range-picker",this))return;this.selectedDate=h.DateTime.fromISO(this.value,{locale:this.locale}),this.setPreSelection(this.selectedDate)}e.has("locale")&&this.render(),this.minDate&&e.has("minDate")&&(this.minDateData=h.DateTime.fromISO(this.minDate,{locale:this.locale})),this.maxDate&&e.has("maxDate")&&(this.maxDateData=h.DateTime.fromISO(this.maxDate,{locale:this.locale}))}render(){return c.html`
2
2
  <md-menu-overlay custom-width="248px" ?disabled=${this.disabled}>
3
- ${this.customTrigger?r.html`
3
+ ${this.customTrigger?c.html`
4
4
  <span slot="menu-trigger">
5
5
  <slot name="date-trigger"></slot>
6
6
  </span>
7
- `:r.html`
7
+ `:c.html`
8
8
  <md-input
9
9
  class="date-input"
10
10
  slot="menu-trigger"
11
11
  placeholder=${this.placeholder?this.placeholder:"YYYY-MM-DD"}
12
- value=${Object(c.ifDefined)(this.value)}
13
- aria-label=${"Choose Date"+this.chosenDateLabel()}
12
+ value=${Object(d.ifDefined)(this.value)}
13
+ htmlId=${this.htmlId}
14
+ label=${this.label}
15
+ aria-label=${this.ariaLabel+this.chosenDateLabel()}
14
16
  auxiliaryContentPosition="before"
17
+ required=${this.required}
18
+ @keydown=${e=>this.handleInputKeyDown(e)}
15
19
  @input-change="${e=>this.handleDateInputChange(e)}"
16
- hide-message
17
20
  ?disabled=${this.disabled}
18
- .messageArr=${[{message:"",type:this.isValueValid()?"":"error"}]}
21
+ hide-message=${!this.errorMessage&&this.isValueValid()}
22
+ ariaInvalid=${!!this.errorMessage||!this.isValueValid()}
23
+ .messageArr=${this.errorMessage?[{message:this.errorMessage,type:"error"}]:[{message:"",type:this.isValueValid()?"":"error"}]}
19
24
  >
20
25
  <md-icon slot="input-section" name="calendar-month_16"></md-icon>
21
26
  </md-input>
@@ -31,4 +36,4 @@
31
36
  <slot name="time-picker"></slot>
32
37
  </div>
33
38
  </md-menu-overlay>
34
- `}};h([Object(r.property)({type:Boolean,attribute:"should-close-on-select"})],t.prototype,"shouldCloseOnSelect",void 0),h([Object(r.property)({type:String})],t.prototype,"maxDate",void 0),h([Object(r.property)({type:String})],t.prototype,"minDate",void 0),h([Object(r.property)({type:String,reflect:!0})],t.prototype,"value",void 0),h([Object(r.property)({type:String})],t.prototype,"weekStart",void 0),h([Object(r.property)({type:String,reflect:!0})],t.prototype,"placeholder",void 0),h([Object(r.property)({type:String})],t.prototype,"locale",void 0),h([Object(r.property)({type:Boolean,reflect:!0,attribute:"includes-time"})],t.prototype,"includesTime",void 0),h([Object(r.property)({type:Boolean})],t.prototype,"disabled",void 0),h([Object(r.property)({type:Boolean,attribute:"custom-trigger"})],t.prototype,"customTrigger",void 0),h([Object(r.internalProperty)()],t.prototype,"selectedDate",void 0),h([Object(r.internalProperty)()],t.prototype,"focusedDate",void 0),h([Object(r.internalProperty)()],t.prototype,"filterDate",void 0),h([Object(r.internalProperty)()],t.prototype,"maxDateData",void 0),h([Object(r.internalProperty)()],t.prototype,"minDateData",void 0),h([Object(r.query)("md-menu-overlay")],t.prototype,"menuOverlay",void 0),t=h([Object(s.a)("md-datepicker")],t),e.ELEMENT=t}(i||(i={}))}}]);
39
+ `}};p([Object(c.property)({type:Boolean,attribute:"should-close-on-select"})],t.prototype,"shouldCloseOnSelect",void 0),p([Object(c.property)({type:String})],t.prototype,"maxDate",void 0),p([Object(c.property)({type:String})],t.prototype,"minDate",void 0),p([Object(c.property)({type:String,reflect:!0})],t.prototype,"value",void 0),p([Object(c.property)({type:String})],t.prototype,"weekStart",void 0),p([Object(c.property)({type:String,reflect:!0})],t.prototype,"placeholder",void 0),p([Object(c.property)({type:String})],t.prototype,"locale",void 0),p([Object(c.property)({type:Boolean,reflect:!0,attribute:"includes-time"})],t.prototype,"includesTime",void 0),p([Object(c.property)({type:Boolean})],t.prototype,"disabled",void 0),p([Object(c.property)({type:String})],t.prototype,"htmlId",void 0),p([Object(c.property)({type:String})],t.prototype,"label",void 0),p([Object(c.property)({type:String})],t.prototype,"ariaLabel",void 0),p([Object(c.property)({type:Boolean})],t.prototype,"required",void 0),p([Object(c.property)({type:String,reflect:!0})],t.prototype,"errorMessage",void 0),p([Object(c.property)({type:Boolean,attribute:"custom-trigger"})],t.prototype,"customTrigger",void 0),p([Object(c.internalProperty)()],t.prototype,"selectedDate",void 0),p([Object(c.internalProperty)()],t.prototype,"focusedDate",void 0),p([Object(c.internalProperty)()],t.prototype,"filterDate",void 0),p([Object(c.internalProperty)()],t.prototype,"maxDateData",void 0),p([Object(c.internalProperty)()],t.prototype,"minDateData",void 0),p([Object(c.query)("md-menu-overlay")],t.prototype,"menuOverlay",void 0),t=p([Object(o.a)("md-datepicker")],t),e.ELEMENT=t}(i||(i={}))}}]);
@@ -1 +1 @@
1
- (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[5],{34:function(e,t,s){"use strict";s.d(t,"a",(function(){return r}));var i=s(1),n=s(0),o=s(16),c=s(33),a=function(e,t,s,i){var n,o=arguments.length,c=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(c=(o<3?n(c):o>3?n(t,s,c):n(t,s))||c);return o>3&&c&&Object.defineProperty(t,s,c),c},l=function(e,t,s,i){return new(s||(s=Promise))((function(n,o){function c(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(c,a)}l((i=i.apply(e,t||[])).next())}))};n.LitElement;const r=e=>{if(Object(o.b)(r,e))return e;class t extends(Object(c.a)(e)){constructor(){super(...arguments),this.focusableElements=[],this.initialFocusComplete=!1,this.focusableTimer=[],this.activeFocusTrap=!1,this.preventClickOutside=!1,this.focusTrapIndex=-1,this.preventScroll=!1,this.handleOutsideTrapClick=e=>{let t=!1;const s=e.composedPath();s.length&&(t=!!s.find(e=>e===this),t||this.preventClickOutside||!this.activeFocusTrap?t&&this.activeFocusTrap&&this.initialFocusComplete&&this.handleClickInsideTrap(e):this.deactivateFocusTrap())},this.updateFocusableElements=()=>{this.focusableTimer&&(clearTimeout(this.focusableTimer),this.focusableElements=[]),this.focusableTimer=setTimeout(()=>{this.setFocusableElements()},10)}}updated(e){if(super.updated(e),e.has("focusTrapIndex")){const t=e.get("focusTrapIndex"),s=this.focusableElements[t];s&&(s.blur(),s.toggleAttribute("focus-visible",!1));const i=this.focusableElements[this.focusTrapIndex];i&&this.tryFocus(i)}}tryFocus(e){requestAnimationFrame(()=>l(this,void 0,void 0,(function*(){this.isElementFocused(e)&&e.focus({preventScroll:this.preventScroll}),void 0!==e.updateComplete&&(yield e.updateComplete),document.hasFocus()&&this.isElementFocused(e)&&e.focus({preventScroll:this.preventScroll}),this.initialFocusComplete||(this.initialFocusComplete=!0)})))}domRectCollection(e){return 0===e.getClientRects().length}viewportPosition(e){const{width:t,height:s}=e.getBoundingClientRect(),{offsetWidth:i,offsetHeight:n}=e;return i+n+s+t===0}isNotVisible(e){return"SLOT"!==e.tagName&&(this.viewportPosition(e)||this.domRectCollection(e))}isHidden(e){return e.hasAttribute("hidden")||e.hasAttribute("aria-hidden")&&"true"===e.getAttribute("aria-hidden")||"none"===e.style.display||"0"===e.style.opacity||"hidden"===e.style.visibility||"collapse"===e.style.visibility||this.isNotVisible(e)||"hidden"===getComputedStyle(e).visibility||"0"===getComputedStyle(e).height}isDisabled(e){return e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}isNotTabbable(e){return"-1"===e.getAttribute("tabindex")}isInteractiveElement(e){return e instanceof HTMLButtonElement||e instanceof HTMLDetailsElement||e instanceof HTMLEmbedElement||e instanceof HTMLIFrameElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||(!!(e instanceof HTMLAnchorElement&&e.hasAttribute("href"))||(e instanceof HTMLInputElement&&"hidden"!==e.type||(!(!(e instanceof HTMLAudioElement||e instanceof HTMLVideoElement)||!e.hasAttribute("controls"))||(!(!(e instanceof HTMLImageElement||e instanceof HTMLObjectElement)||!e.hasAttribute("usemap"))||!!(e.hasAttribute("tabindex")&&e.tabIndex>-1)))))}isFocusable(e){return!(this.isDisabled(e)||this.isHidden(e)||this.isNotTabbable(e))&&!!this.isInteractiveElement(e)}shouldSkipFocus(e){return!!(e.id&&e.id.split&&e.id.split(" ").indexOf("md-combobox-listbox")>-1)}findFocusable(e,t){const s=Array.from(e.children);for(const e of s)if(!this.isHidden(e)){if(this.shouldSkipFocus(e))break;if(this.isFocusable(e)&&t.add(e),e.shadowRoot)this.findFocusable(e.shadowRoot,t);else if("SLOT"===e.tagName){const s=e.assignedNodes().filter(e=>e.nodeType===e.ELEMENT_NODE);if(s.length){const e=s[0].parentElement;e&&this.findFocusable(e,t)}}else this.findFocusable(e,t)}return[...t]}isEqualFocusNode(e,t){return e.nodeType>=0&&(t.isEqualNode(e)&&t==e)}findElement(e){return this.focusableElements.findIndex(t=>this.isEqualFocusNode(e,t))}focusTrap(e){const t=this.getDeepActiveElement(),s=this.findElement(t);if(e)-1===s&&this.focusTrapIndex-1>0?this.focusTrapIndex--:this.focusTrapIndex=s>0?s-1:this.focusableElements.length-1;else if(-1===s&&this.focusTrapIndex+1<this.focusableElements.length)this.focusTrapIndex++;else if(s===this.focusableElements.length-1&&0===this.focusTrapIndex){const e=this.focusableElements[this.focusTrapIndex];e&&this.tryFocus(e)}else this.focusTrapIndex=s+1<this.focusableElements.length?s+1:0}hasAutofocus(e){return e.hasAttribute("autofocus")}setInitialFocus(e=0,t=!1){let s=-1;this.initialFocusComplete=!1,this.focusableElements.length&&!t&&(s=this.focusableElements.findIndex(this.hasAutofocus)),this.focusableElements.length&&-1===s&&("object"==typeof e?s=this.findElement(e):"number"==typeof e&&(s=e)),this.focusableElements[s]&&(this.focusTrapIndex=s)}setFocusableElements(){this.focusableElements=this.findFocusable(this.shadowRoot,new Set)}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return l(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),yield new Promise(e=>setTimeout(e,0)),this.setFocusableElements()}))}handleKeydownFocusTrap(e){e.code!==i.b.Tab||e.shiftKey&&e.code!==i.b.Tab||this.activeFocusTrap&&this.focusableElements.length&&(e.shiftKey?(e.preventDefault(),this.focusTrap(!0)):(e.preventDefault(),this.focusTrap(!1)))}activateFocusTrap(){this.activeFocusTrap=!0}deactivateFocusTrap(){this.activeFocusTrap=!1,this.focusTrapIndex=-1,this.removeAttribute("focus-trap-index")}handleClickInsideTrap(e){const t=e.composedPath(),s=t.findIndex(e=>-1!==this.findElement(e));if(-1!==s){const e=t[s],i=this.findElement(e);-1!==i&&(this.focusTrapIndex=i)}}manageNewElement(e){requestAnimationFrame(()=>{this.setFocusableElements();const t=this.findElement(e);-1!==t&&(this.focusTrapIndex=t)})}handleFocusVisible(e){const t=(e.detail?e.detail.sourceEvent:e).composedPath()[0];-1===(e.detail?this.findElement(t):-1)&&t!==this&&this.manageNewElement(t)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeydownFocusTrap),this.addEventListener("focus-visible",this.handleFocusVisible),document.addEventListener("click",this.handleOutsideTrapClick),document.addEventListener("on-widget-update",this.updateFocusableElements)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeydownFocusTrap),this.removeEventListener("focus-visible",this.handleFocusVisible),document.removeEventListener("click",this.handleOutsideTrapClick),document.removeEventListener("on-widget-update",this.updateFocusableElements),this.focusableTimer&&clearTimeout(this.focusableTimer)}}return a([Object(n.internalProperty)()],t.prototype,"focusableElements",void 0),a([Object(n.internalProperty)()],t.prototype,"initialFocusComplete",void 0),a([Object(n.internalProperty)()],t.prototype,"focusableTimer",void 0),a([Object(n.property)({type:Boolean,reflect:!0,attribute:"active-focus-trap"})],t.prototype,"activeFocusTrap",void 0),a([Object(n.property)({type:Boolean,reflect:!0,attribute:"prevent-click-outside"})],t.prototype,"preventClickOutside",void 0),a([Object(n.property)({type:Number,reflect:!0,attribute:"focus-trap-index"})],t.prototype,"focusTrapIndex",void 0),a([Object(n.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],t.prototype,"preventScroll",void 0),Object(o.a)(r,t),t}}}]);
1
+ (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[5],{34:function(e,t,s){"use strict";s.d(t,"a",(function(){return r}));var i=s(1),n=s(0),o=s(16),a=s(33),c=function(e,t,s,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(a=(o<3?n(a):o>3?n(t,s,a):n(t,s))||a);return o>3&&a&&Object.defineProperty(t,s,a),a},l=function(e,t,s,i){return new(s||(s=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function c(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,c)}l((i=i.apply(e,t||[])).next())}))};n.LitElement;const r=e=>{if(Object(o.b)(r,e))return e;class t extends(Object(a.a)(e)){constructor(){super(...arguments),this.focusableElements=[],this.initialFocusComplete=!1,this.focusableTimer=[],this.activeFocusTrap=!1,this.preventClickOutside=!1,this.focusTrapIndex=-1,this.preventScroll=!1,this.handleOutsideTrapClick=e=>{let t=!1;const s=e.composedPath();s.length&&(t=!!s.find(e=>e===this),t||this.preventClickOutside||!this.activeFocusTrap?t&&this.activeFocusTrap&&this.initialFocusComplete&&this.handleClickInsideTrap(e):this.deactivateFocusTrap())},this.updateFocusableElements=()=>{this.focusableTimer&&(clearTimeout(this.focusableTimer),this.focusableElements=[]),this.focusableTimer=setTimeout(()=>{this.setFocusableElements()},10)},this.handleChildFocusTrap=e=>{e.target!==this&&(e.stopPropagation(),this.deactivateFocusTrap(!1))},this.handleChildFocusUntrap=e=>{e.target!==this&&(e.stopPropagation(),this.activateFocusTrap(!1))}}updated(e){if(super.updated(e),e.has("focusTrapIndex")){const t=e.get("focusTrapIndex"),s=this.focusableElements[t];s&&(s.blur(),s.toggleAttribute("focus-visible",!1));const i=this.focusableElements[this.focusTrapIndex];i&&this.tryFocus(i)}}tryFocus(e){requestAnimationFrame(()=>l(this,void 0,void 0,(function*(){this.isElementFocused(e)&&e.focus({preventScroll:this.preventScroll}),void 0!==e.updateComplete&&(yield e.updateComplete),document.hasFocus()&&this.isElementFocused(e)&&e.focus({preventScroll:this.preventScroll}),this.initialFocusComplete||(this.initialFocusComplete=!0)})))}domRectCollection(e){return 0===e.getClientRects().length}viewportPosition(e){const{width:t,height:s}=e.getBoundingClientRect(),{offsetWidth:i,offsetHeight:n}=e;return i+n+s+t===0}isNotVisible(e){return"SLOT"!==e.tagName&&(this.viewportPosition(e)||this.domRectCollection(e))}isHidden(e){return e.hasAttribute("hidden")||e.hasAttribute("aria-hidden")&&"true"===e.getAttribute("aria-hidden")||"none"===e.style.display||"0"===e.style.opacity||"hidden"===e.style.visibility||"collapse"===e.style.visibility||this.isNotVisible(e)||"hidden"===getComputedStyle(e).visibility||"0"===getComputedStyle(e).height}isDisabled(e){return e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}isNotTabbable(e){return"-1"===e.getAttribute("tabindex")}isInteractiveElement(e){return e instanceof HTMLButtonElement||e instanceof HTMLDetailsElement||e instanceof HTMLEmbedElement||e instanceof HTMLIFrameElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||(!!(e instanceof HTMLAnchorElement&&e.hasAttribute("href"))||(e instanceof HTMLInputElement&&"hidden"!==e.type||(!(!(e instanceof HTMLAudioElement||e instanceof HTMLVideoElement)||!e.hasAttribute("controls"))||(!(!(e instanceof HTMLImageElement||e instanceof HTMLObjectElement)||!e.hasAttribute("usemap"))||!!(e.hasAttribute("tabindex")&&e.tabIndex>-1)))))}isFocusable(e){return!(this.isDisabled(e)||this.isHidden(e)||this.isNotTabbable(e))&&!!this.isInteractiveElement(e)}shouldSkipFocus(e){return!!(e.id&&e.id.split&&e.id.split(" ").indexOf("md-combobox-listbox")>-1)}findFocusable(e,t){const s=Array.from(e.children);for(const e of s)if(!this.isHidden(e)){if(this.shouldSkipFocus(e))break;if(this.isFocusable(e)&&t.add(e),e.shadowRoot)this.findFocusable(e.shadowRoot,t);else if("SLOT"===e.tagName){const s=e.assignedNodes().filter(e=>e.nodeType===e.ELEMENT_NODE);if(s.length){const e=s[0].parentElement;e&&this.findFocusable(e,t)}}else this.findFocusable(e,t)}return[...t]}isEqualFocusNode(e,t){return e.nodeType>=0&&(t.isEqualNode(e)&&t==e)}findElement(e){return this.focusableElements.findIndex(t=>this.isEqualFocusNode(e,t))}focusTrap(e){const t=this.getDeepActiveElement(),s=this.findElement(t);if(e)-1===s&&this.focusTrapIndex-1>0?this.focusTrapIndex--:this.focusTrapIndex=s>0?s-1:this.focusableElements.length-1;else if(-1===s&&this.focusTrapIndex+1<this.focusableElements.length)this.focusTrapIndex++;else if(s===this.focusableElements.length-1&&0===this.focusTrapIndex){const e=this.focusableElements[this.focusTrapIndex];e&&this.tryFocus(e)}else this.focusTrapIndex=s+1<this.focusableElements.length?s+1:0}hasAutofocus(e){return e.hasAttribute("autofocus")}setInitialFocus(e=0,t=!1){let s=-1;this.initialFocusComplete=!1,this.focusableElements.length&&!t&&(s=this.focusableElements.findIndex(this.hasAutofocus)),this.focusableElements.length&&-1===s&&("object"==typeof e?s=this.findElement(e):"number"==typeof e&&(s=e)),this.focusableElements[s]&&(this.focusTrapIndex=s)}setFocusableElements(){this.focusableElements=this.findFocusable(this.shadowRoot,new Set)}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return l(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),yield new Promise(e=>setTimeout(e,0)),this.setFocusableElements()}))}handleKeydownFocusTrap(e){e.code!==i.b.Tab||e.shiftKey&&e.code!==i.b.Tab||this.activeFocusTrap&&this.focusableElements.length&&(e.shiftKey?(e.preventDefault(),this.focusTrap(!0)):(e.preventDefault(),this.focusTrap(!1)))}activateFocusTrap(e=!0){e&&this.dispatchEvent(new CustomEvent("on-focus-trap",{bubbles:!0,composed:!0,cancelable:!0})),this.activeFocusTrap=!0}deactivateFocusTrap(e=!0){this.activeFocusTrap=!1,this.focusTrapIndex=-1,this.removeAttribute("focus-trap-index"),e&&this.dispatchEvent(new CustomEvent("on-focus-untrap",{bubbles:!0,composed:!0,cancelable:!0}))}handleClickInsideTrap(e){const t=e.composedPath(),s=t.findIndex(e=>-1!==this.findElement(e));if(-1!==s){const e=t[s],i=this.findElement(e);-1!==i&&(this.focusTrapIndex=i)}}manageNewElement(e){requestAnimationFrame(()=>{this.setFocusableElements();const t=this.findElement(e);-1!==t&&(this.focusTrapIndex=t)})}handleFocusVisible(e){const t=(e.detail?e.detail.sourceEvent:e).composedPath()[0];-1===(e.detail?this.findElement(t):-1)&&t!==this&&this.manageNewElement(t)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeydownFocusTrap),this.addEventListener("focus-visible",this.handleFocusVisible),this.addEventListener("on-focus-trap",this.handleChildFocusTrap),this.addEventListener("on-focus-untrap",this.handleChildFocusUntrap),document.addEventListener("click",this.handleOutsideTrapClick),document.addEventListener("on-widget-update",this.updateFocusableElements)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeydownFocusTrap),this.removeEventListener("focus-visible",this.handleFocusVisible),this.removeEventListener("on-focus-trap",this.handleChildFocusTrap),this.removeEventListener("on-focus-untrap",this.handleChildFocusUntrap),document.removeEventListener("click",this.handleOutsideTrapClick),document.removeEventListener("on-widget-update",this.updateFocusableElements),this.focusableTimer&&clearTimeout(this.focusableTimer)}}return c([Object(n.internalProperty)()],t.prototype,"focusableElements",void 0),c([Object(n.internalProperty)()],t.prototype,"initialFocusComplete",void 0),c([Object(n.internalProperty)()],t.prototype,"focusableTimer",void 0),c([Object(n.property)({type:Boolean,reflect:!0,attribute:"active-focus-trap"})],t.prototype,"activeFocusTrap",void 0),c([Object(n.property)({type:Boolean,reflect:!0,attribute:"prevent-click-outside"})],t.prototype,"preventClickOutside",void 0),c([Object(n.property)({type:Number,reflect:!0,attribute:"focus-trap-index"})],t.prototype,"focusTrapIndex",void 0),c([Object(n.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],t.prototype,"preventScroll",void 0),Object(o.a)(r,t),t}}}]);
@@ -1,4 +1,4 @@
1
- (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[52],{108:function(e,t,d){"use strict";d.r(t),d.d(t,"Card",(function(){return r}));var r,a=d(4),o=d(5),i=d(0),n=i.css`:host(md-card){display:inline-block}:host(md-card) .md-card{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-tertiary-white-bg-color);border:var(--md-quaternary-bg-color);border-radius:.5rem;box-shadow:0 .125rem .25rem rgba(0,0,0,.16),0 0 .0625rem rgba(0,0,0,.16);color:var(--md-secondary-text-color);cursor:pointer;max-width:26.5rem;padding:calc(.5rem * 2);position:relative;width:100%}:host(md-card) .md-card-header{align-content:flex-start;align-items:flex-start;display:flex;flex-flow:row nowrap;justify-content:space-between;flex:1 0 100%;margin-bottom:.5rem}:host(md-card) .md-card-header md-favorite{padding-top:calc(.5rem * .5)}:host(md-card) .md-card-header-title{display:flex;flex:1 1 100%;flex-direction:column;margin:0 .5rem}:host(md-card) .md-card-header-title h1{color:var(--md-primary-text-color);font-family:CiscoSans-Medium,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:calc(.5rem * 3);margin:0}:host(md-card) .md-card-header-title h2{color:var(--md-secondary-text-color);font-size:12px;line-height:calc(.5rem * 2.25)}:host(md-card) .md-card-header-actions{align-self:stretch;display:inline-flex;position:relative;z-index:1}:host(md-card) .md-card-header-actions .md-card-info-icon,:host(md-card) .md-card-header-actions .md-card-max-icon{padding-right:.5rem}:host(md-card) .md-card-header-actions md-menu-overlay::part(overlay-content){max-width:9rem}:host(md-card) .md-card .md-card-menu-icon{border-radius:calc(.5rem / 2);display:inline-flex}:host(md-card) .md-card .md-card-menu-icon::part(button){padding:calc(.5rem * .25)}:host(md-card) .md-card .md-card-menu-icon:hover{background-color:var(--md-tertiary-bg-color)}:host(md-card) .md-card .md-card-menu-icon:active{background-color:var(--md-quaternary-bg-color)}:host(md-card) .md-card .md-card-menu-list-items{padding:calc(.5rem * .25)}:host(md-card) .md-card-content{background:var(--md-secondary-bg-color);border:var(--md-quaternary-bg-color);border-radius:calc(.5rem / 2);height:14rem;margin-bottom:calc(.5rem * 2);overflow:hidden}:host(md-card) .md-card.full-screen{display:inline-block;height:100%!important;left:0;max-width:100%;position:absolute;top:0;width:100%}:host(md-card) .md-card.full-screen .md-card-content{height:auto}:host(md-card) .md-card-footer{display:flex;flex-wrap:wrap;gap:.5rem}`,c=(d(15),d(17),d(66),d(67),d(76),d(1)),s=d(14),m=d(2),l=function(e,t,d,r){var a,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,d):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,d,r);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(i=(o<3?a(i):o>3?a(t,d,i):a(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};!function(e){let t=class extends i.LitElement{constructor(){super(...arguments),this.title="title",this.subtitle="",this.id="",this.info="",this.infoAriaLabel="Card Info",this.menuAriaLabel="Card Menu",this.menuOptions=[]}static get styles(){return[a.a,n]}handleCardClick(e){this.dispatchEvent(new CustomEvent("card-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardKeyDown(e){e.code!==c.b.Enter&&e.code!==c.b.Space||this.dispatchEvent(new CustomEvent("card-keydown",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardMenuEvent(e,t){e.stopPropagation();const d=t.toLowerCase();this.dispatchEvent(new CustomEvent("card-menu-click",{detail:{id:this.id,type:d},bubbles:!0,composed:!0}))}handleCardMenuKeyDown(e,t){e.preventDefault(),this.dispatchEvent(new CustomEvent("card-menu-keydown",{detail:{id:this.id,type:t.toLowerCase()},bubbles:!0,composed:!0}))}render(){return i.html`
1
+ (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[52],{108:function(e,t,d){"use strict";d.r(t),d.d(t,"Card",(function(){return r}));d(17),d(76),d(15),d(66),d(67);var r,a=d(5),o=d(4),i=d(0),n=d(2),c=d(14),s=d(1),m=i.css`:host(md-card){display:inline-block}:host(md-card) .md-card{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-tertiary-white-bg-color);border:var(--md-quaternary-bg-color);border-radius:.5rem;box-shadow:0 .125rem .25rem rgba(0,0,0,.16),0 0 .0625rem rgba(0,0,0,.16);color:var(--md-secondary-text-color);cursor:pointer;max-width:26.5rem;padding:calc(.5rem * 2);position:relative;width:100%}:host(md-card) .md-card-header{align-content:flex-start;align-items:flex-start;display:flex;flex-flow:row nowrap;justify-content:space-between;flex:1 0 100%;margin-bottom:.5rem}:host(md-card) .md-card-header md-favorite{padding-top:calc(.5rem * .5)}:host(md-card) .md-card-header-title{display:flex;flex:1 1 100%;flex-direction:column;margin:0 .5rem}:host(md-card) .md-card-header-title h1{color:var(--md-primary-text-color);font-family:CiscoSans-Medium,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:calc(.5rem * 3);margin:0}:host(md-card) .md-card-header-title h2{color:var(--md-secondary-text-color);font-size:12px;line-height:calc(.5rem * 2.25)}:host(md-card) .md-card-header-actions{align-self:stretch;display:inline-flex;position:relative;z-index:1}:host(md-card) .md-card-header-actions .md-card-info-icon,:host(md-card) .md-card-header-actions .md-card-max-icon{padding-right:.5rem}:host(md-card) .md-card-header-actions md-menu-overlay::part(overlay-content){max-width:9rem}:host(md-card) .md-card .md-card-menu-icon{border-radius:calc(.5rem / 2);display:inline-flex}:host(md-card) .md-card .md-card-menu-icon::part(button){padding:calc(.5rem * .25)}:host(md-card) .md-card .md-card-menu-icon:hover{background-color:var(--md-tertiary-bg-color)}:host(md-card) .md-card .md-card-menu-icon:active{background-color:var(--md-quaternary-bg-color)}:host(md-card) .md-card .md-card-menu-list-items{padding:calc(.5rem * .25)}:host(md-card) .md-card-content{background:var(--md-secondary-bg-color);border:var(--md-quaternary-bg-color);border-radius:calc(.5rem / 2);height:14rem;margin-bottom:calc(.5rem * 2);overflow:hidden}:host(md-card) .md-card.full-screen{display:inline-block;height:100%!important;left:0;max-width:100%;position:absolute;top:0;width:100%}:host(md-card) .md-card.full-screen .md-card-content{height:auto}:host(md-card) .md-card-footer{display:flex;flex-wrap:wrap;gap:.5rem}`,l=function(e,t,d,r){var a,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,d):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,d,r);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(i=(o<3?a(i):o>3?a(t,d,i):a(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};!function(e){let t=class extends i.LitElement{constructor(){super(...arguments),this.title="title",this.subtitle="",this.id="",this.info="",this.infoAriaLabel="Card Info",this.menuAriaLabel="Card Menu",this.menuOptions=[]}static get styles(){return[o.a,m]}handleCardClick(e){this.dispatchEvent(new CustomEvent("card-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardKeyDown(e){e.code!==s.b.Enter&&e.code!==s.b.Space||this.dispatchEvent(new CustomEvent("card-keydown",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardMenuEvent(e,t){e.stopPropagation();const d=t.toLowerCase();this.dispatchEvent(new CustomEvent("card-menu-click",{detail:{id:this.id,type:d},bubbles:!0,composed:!0}))}handleCardMenuKeyDown(e,t){e.preventDefault(),this.dispatchEvent(new CustomEvent("card-menu-keydown",{detail:{id:this.id,type:t.toLowerCase(),keyCode:e.code},bubbles:!0,composed:!0}))}render(){return i.html`
2
2
  <div
3
3
  class="md-card"
4
4
  id="${this.id}"
@@ -29,7 +29,7 @@
29
29
  <md-icon slot="icon" name="info_16"></md-icon>
30
30
  </md-button>
31
31
  </md-tooltip>
32
- `:m.nothing}
32
+ `:n.nothing}
33
33
  ${this.menuOptions.length?i.html`
34
34
  <md-menu-overlay class="md-card-menu" placement="bottom-start">
35
35
  <md-button
@@ -43,7 +43,7 @@
43
43
  </md-button>
44
44
  <div class="md-card-menu-list-items" style="width: 100%;">
45
45
  <md-list>
46
- ${Object(s.repeat)(this.menuOptions,(e,t)=>i.html`
46
+ ${Object(c.repeat)(this.menuOptions,(e,t)=>i.html`
47
47
  <md-list-item
48
48
  class="${"menu-item-"+t}"
49
49
  slot="list-item"
@@ -55,7 +55,7 @@
55
55
  </md-list>
56
56
  </div>
57
57
  </md-menu-overlay>
58
- `:m.nothing}
58
+ `:n.nothing}
59
59
  </div>
60
60
  </div>
61
61
  <div class="md-card-content">
@@ -65,4 +65,4 @@
65
65
  <slot name="footer"> </slot>
66
66
  </div>
67
67
  </div>
68
- `}};l([Object(i.property)({type:String})],t.prototype,"title",void 0),l([Object(i.property)({type:String})],t.prototype,"subtitle",void 0),l([Object(i.property)({type:String})],t.prototype,"id",void 0),l([Object(i.property)({type:String})],t.prototype,"info",void 0),l([Object(i.property)({type:String,attribute:"info-aria-label"})],t.prototype,"infoAriaLabel",void 0),l([Object(i.property)({type:String,attribute:"menu-aria-label"})],t.prototype,"menuAriaLabel",void 0),l([Object(i.property)({type:Array})],t.prototype,"menuOptions",void 0),t=l([Object(o.a)("md-card")],t),e.ELEMENT=t}(r||(r={}))}}]);
68
+ `}};l([Object(i.property)({type:String})],t.prototype,"title",void 0),l([Object(i.property)({type:String})],t.prototype,"subtitle",void 0),l([Object(i.property)({type:String})],t.prototype,"id",void 0),l([Object(i.property)({type:String})],t.prototype,"info",void 0),l([Object(i.property)({type:String,attribute:"info-aria-label"})],t.prototype,"infoAriaLabel",void 0),l([Object(i.property)({type:String,attribute:"menu-aria-label"})],t.prototype,"menuAriaLabel",void 0),l([Object(i.property)({type:Array})],t.prototype,"menuOptions",void 0),t=l([Object(a.a)("md-card")],t),e.ELEMENT=t}(r||(r={}))}}]);
@@ -1,4 +1,4 @@
1
- (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[63],{113:function(e,t,o){"use strict";o.r(t),o.d(t,"Dropdown",(function(){return u}));o(15);var i=o(1),s=o(7),n=o(4),d=o(0),r=o(2),l=o(13),a=o(36),p=d.css`:host(:focus){box-shadow:none!important;outline:0!important}:host .md-dropdown{display:flex;flex-direction:column;position:relative}:host .md-dropdown-select{display:none}:host .md-dropdown-label{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;background-color:var(--md-primary-bg-color);border:1px solid var(--md-secondary-seperator-color);border-radius:var(--dropdown-group-radius,.25rem);min-height:2rem;padding:0 .75rem}:host .md-dropdown-label--text{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--md-secondary-text-color);line-height:2rem;outline:0;width:6.25rem;flex:1 0 auto}:host .md-dropdown-label--icon{transition:all .15s linear;display:inline-block;background-color:transparent;border:none;cursor:pointer;height:1.75rem;margin:0;margin-left:calc(.25rem * 3);outline:0;padding:0;padding-top:calc(.25rem / 2);position:relative;vertical-align:bottom}:host .md-dropdown-label--icon md-icon{color:var(--md-primary-text-color,#f7f7f7)}:host .md-dropdown-label:hover{background-color:var(--dropdown-bg-color-hover,#dedede)}:host .md-dropdown-label:active{background-color:var(--dropdown-bg-color-active,#ccc)}:host .md-dropdown-list{list-style:none;margin:0;padding:0;display:none;background-color:var(--md-primary-bg-color);border-radius:.5rem;box-shadow:0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16);left:0;overflow:auto;overflow-x:hidden;position:absolute;top:calc(100% + .25rem);width:100%;z-index:99}:host .md-dropdown-option{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;color:var(--md-primary-text-color,#f7f7f7);padding:.4375rem .75rem .5rem}:host .md-dropdown-option .select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;width:calc(100% - 1rem);display:block}:host .md-dropdown-option:hover{background-color:var(--dropdown-list-item-bg-color-hover,#c9f4ff)}:host .md-dropdown-option[focused]{background-color:var(--dropdown-list-item-bg-color-focus,#91ebff)}:host .md-dropdown__expanded .md-dropdown-list{display:block}:host .md-dropdown__expanded .md-dropdown-label--icon{transform:rotate(180deg)}:host .md-dropdown--pill .md-dropdown-label{border-radius:18px}:host([focus-visible]) .md-dropdown .md-dropdown-label{border-color:var(--dropdown-border-color-focus,#005e7d);box-shadow:none}:host([disabled]) .md-dropdown .md-dropdown-label{background-color:var(--md-tertiary-bg-color)}:host([disabled]) .md-dropdown .md-dropdown-label:active,:host([disabled]) .md-dropdown .md-dropdown-label:hover{background-color:var(--md-tertiary-bg-color);pointer-events:none}:host([disabled]) .md-dropdown .md-dropdown-label:active>md-icon,:host([disabled]) .md-dropdown .md-dropdown-label:hover>md-icon{opacity:.3}`,c=function(e,t,o,i){var s,n=arguments.length,d=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,o,i);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(d=(n<3?s(d):n>3?s(t,o,d):s(t,o))||d);return n>3&&d&&Object.defineProperty(t,o,d),d},h=function(e,t,o,i){return new(o||(o=Promise))((function(s,n){function d(e){try{l(i.next(e))}catch(e){n(e)}}function r(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(d,r)}l((i=i.apply(e,t||[])).next())}))};var u;!function(e){let t=class extends(Object(s.a)(d.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.renderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.lastMaxHeight="",this.onOutsideClick=e=>{let t=!1;const o=e.composedPath();o.length&&(t=!!o.find(e=>e===this),t||this.collapse())},this.onKeyDown=e=>{switch(e.code){case i.b.Enter:this.expanded?(this.select(),this.collapse()):this.expand();break;case i.b.ArrowDown:this.expanded?this.focusNext():this.expand();break;case i.b.ArrowUp:this.expanded?this.focusPrev():this.expand();break;case i.b.Home:this.expanded?this.focusFirst():this.expand();break;case i.b.End:this.expanded?this.focusLast():this.expand();break;case i.b.Escape||i.b.Backspace:this.expanded&&this.collapse()}}}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(e){super.firstUpdated(e),this.setAttribute("tabindex","0"),e.forEach((e,t)=>{if("defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}updated(e){super.updated(e),e.forEach((e,t)=>{if("options"===t&&this.updateRenderOptions(),"selectedKey"===t){const e=this.renderOptions.findIndex(e=>e.key===this.selectedKey);-1!==e&&this.focusToIndex(e)}if("expanded"===t&&this.updateListDOM(),"focusedIndex"===t&&this.updateListDOM(),"disabled"===t&&this.setAttribute("tabindex",this.disabled?"-1":"0"),"defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}updateRenderOptions(){const e=[];this.focusReset();const t=this.options.reduce((t,o)=>{const{key:i,value:s}=this.getOptionKeyValuePair(o);return-1!==e.indexOf(i)?console.error(`Dropdown already have option key: "${i}". Ignoring `):i?(e.push(i),t.push({key:i,value:s,option:o})):console.error(`Dropdown key is not defined: "${i}". (value: "${s}"). Ignoring `),t},[]);this.allowUnselected&&t.unshift({key:"",value:this.title}),this.renderOptions=t}updateListDOM(){return h(this,void 0,void 0,(function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))}))}resizeDropdownList(){return h(this,void 0,void 0,(function*(){yield new Promise(e=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const e=[...this.optionsListItems].slice(0,this.visibleOptions).reduce((e,t)=>e+t.offsetHeight,0)+"px";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}else{const e="auto";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}e()}))}))}handleFocusIn(e){this.disabled||super.handleFocusIn&&super.handleFocusIn(e),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(e){super.handleFocusOut&&super.handleFocusOut(e),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.a,p]}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown)}expand(){this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),-1===this.focusedIndex&&this.focusNext()}collapse(){this.expanded=!1}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const e=this.renderOptions[this.focusedIndex],t=e.key;t!==this.selectedKey&&(this.selectedKey=t,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:e.option?e.option:e.key}})))}}onLabelClick(){this.toggle()}focusFirst(){this.renderOptions.length&&(this.focusedIndex=0)}focusLast(){this.renderOptions.length&&(this.focusedIndex=this.renderOptions.length-1)}focusNext(){this.renderOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.renderOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.renderOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(e){this.renderOptions.length&&e>=0&&e<=this.renderOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(e){return h(this,void 0,void 0,(function*(){yield new Promise(t=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&e>=0&&this.optionsListItems.length>e){let t=0;const{top:o,bottom:i}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[e],n=this.optionsListItems[e+1]||s,d=this.optionsListItems[e-1]||s,r=n.getBoundingClientRect(),l=d.getBoundingClientRect();r.bottom>i?t=r.bottom-i+2:l.top<o&&(t=l.top-o-2),this.optionsList.scrollTop+=t}t()})})}))}getOptionKeyValuePair(e){if("string"==typeof e)return{key:e.trim(),value:e};if(e&&"object"==typeof e){const t=Object.keys(e),o=Object.values(e);if(t.length){if(1===t.length||!this.optionId)return{key:t[0],value:o[0]};if(this.optionId)return{key:e[this.optionId],value:e[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const e=this.renderOptions.find(e=>e.key===this.selectedKey);if(e)return e.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded}}render(){return r.html`
1
+ (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[63],{113:function(e,t,o){"use strict";o.r(t),o.d(t,"Dropdown",(function(){return u}));o(15);var i=o(1),s=o(7),n=o(4),d=o(0),r=o(2),l=o(13),a=o(36),p=d.css`:host(:focus){box-shadow:none!important;outline:0!important}:host .md-dropdown{display:flex;flex-direction:column;position:relative}:host .md-dropdown-select{display:none}:host .md-dropdown-label{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;background-color:var(--md-primary-bg-color);border:1px solid var(--md-secondary-seperator-color);border-radius:var(--dropdown-group-radius,.25rem);min-height:2rem;padding:0 .75rem}:host .md-dropdown-label--text{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--md-secondary-text-color);line-height:2rem;outline:0;width:6.25rem;flex:1 0 auto}:host .md-dropdown-label--icon{transition:all .15s linear;display:inline-block;background-color:transparent;border:none;cursor:pointer;height:1.75rem;margin:0;margin-left:calc(.25rem * 3);outline:0;padding:0;padding-top:calc(.25rem / 2);position:relative;vertical-align:bottom}:host .md-dropdown-label--icon md-icon{color:var(--md-primary-text-color,#f7f7f7)}:host .md-dropdown-label:hover{background-color:var(--dropdown-bg-color-hover,#dedede)}:host .md-dropdown-label:active{background-color:var(--dropdown-bg-color-active,#ccc)}:host .md-dropdown-list{list-style:none;margin:0;padding:0;display:none;background-color:var(--md-primary-bg-color);border-radius:.5rem;box-shadow:0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16);left:0;overflow:auto;overflow-x:hidden;position:absolute;top:calc(100% + .25rem);width:100%;z-index:99}:host .md-dropdown-option{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;color:var(--md-primary-text-color,#f7f7f7);padding:.4375rem .75rem .5rem}:host .md-dropdown-option .select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;width:calc(100% - 1rem);display:block}:host .md-dropdown-option:hover{background-color:var(--dropdown-list-item-bg-color-hover,#c9f4ff)}:host .md-dropdown-option[focused]{background-color:var(--dropdown-list-item-bg-color-focus,#91ebff)}:host .md-dropdown__expanded .md-dropdown-list{display:block}:host .md-dropdown__expanded .md-dropdown-label--icon{transform:rotate(180deg)}:host .md-dropdown--pill .md-dropdown-label{border-radius:18px}:host([focus-visible]) .md-dropdown .md-dropdown-label{border-color:var(--dropdown-border-color-focus,#005e7d);box-shadow:none}:host([disabled]) .md-dropdown .md-dropdown-label{background-color:var(--md-tertiary-bg-color)}:host([disabled]) .md-dropdown .md-dropdown-label:active,:host([disabled]) .md-dropdown .md-dropdown-label:hover{background-color:var(--md-tertiary-bg-color);pointer-events:none}:host([disabled]) .md-dropdown .md-dropdown-label:active>md-icon,:host([disabled]) .md-dropdown .md-dropdown-label:hover>md-icon{opacity:.3}`,c=function(e,t,o,i){var s,n=arguments.length,d=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,o,i);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(d=(n<3?s(d):n>3?s(t,o,d):s(t,o))||d);return n>3&&d&&Object.defineProperty(t,o,d),d},h=function(e,t,o,i){return new(o||(o=Promise))((function(s,n){function d(e){try{l(i.next(e))}catch(e){n(e)}}function r(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(d,r)}l((i=i.apply(e,t||[])).next())}))};var u;!function(e){let t=class extends(Object(s.a)(d.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.renderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.lastMaxHeight="",this.onOutsideClick=e=>{let t=!1;const o=e.composedPath();o.length&&(t=!!o.find(e=>e===this),t||this.collapse())},this.onKeyDown=e=>{switch(e.code){case i.b.Enter:this.expanded?(this.select(),this.collapse()):this.expand();break;case i.b.ArrowDown:this.expanded?this.focusNext():this.expand();break;case i.b.ArrowUp:this.expanded?this.focusPrev():this.expand();break;case i.b.Home:this.expanded?this.focusFirst():this.expand();break;case i.b.End:this.expanded?this.focusLast():this.expand();break;case i.b.Escape||i.b.Backspace:this.expanded&&(e.stopPropagation(),this.collapse())}}}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(e){super.firstUpdated(e),this.setAttribute("tabindex","0"),e.forEach((e,t)=>{if("defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}updated(e){super.updated(e),e.forEach((e,t)=>{if("options"===t&&this.updateRenderOptions(),"selectedKey"===t){const e=this.renderOptions.findIndex(e=>e.key===this.selectedKey);-1!==e&&this.focusToIndex(e)}if("expanded"===t&&this.updateListDOM(),"focusedIndex"===t&&this.updateListDOM(),"disabled"===t&&this.setAttribute("tabindex",this.disabled?"-1":"0"),"defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}updateRenderOptions(){const e=[];this.focusReset();const t=this.options.reduce((t,o)=>{const{key:i,value:s}=this.getOptionKeyValuePair(o);return-1!==e.indexOf(i)?console.error(`Dropdown already have option key: "${i}". Ignoring `):i?(e.push(i),t.push({key:i,value:s,option:o})):console.error(`Dropdown key is not defined: "${i}". (value: "${s}"). Ignoring `),t},[]);this.allowUnselected&&t.unshift({key:"",value:this.title}),this.renderOptions=t}updateListDOM(){return h(this,void 0,void 0,(function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))}))}resizeDropdownList(){return h(this,void 0,void 0,(function*(){yield new Promise(e=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const e=[...this.optionsListItems].slice(0,this.visibleOptions).reduce((e,t)=>e+t.offsetHeight,0)+"px";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}else{const e="auto";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}e()}))}))}handleFocusIn(e){this.disabled||super.handleFocusIn&&super.handleFocusIn(e),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(e){super.handleFocusOut&&super.handleFocusOut(e),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.a,p]}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown)}expand(){this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),-1===this.focusedIndex&&this.focusNext()}collapse(){this.expanded=!1}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const e=this.renderOptions[this.focusedIndex],t=e.key;t!==this.selectedKey&&(this.selectedKey=t,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:e.option?e.option:e.key}})))}}onLabelClick(){this.toggle()}focusFirst(){this.renderOptions.length&&(this.focusedIndex=0)}focusLast(){this.renderOptions.length&&(this.focusedIndex=this.renderOptions.length-1)}focusNext(){this.renderOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.renderOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.renderOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(e){this.renderOptions.length&&e>=0&&e<=this.renderOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(e){return h(this,void 0,void 0,(function*(){yield new Promise(t=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&e>=0&&this.optionsListItems.length>e){let t=0;const{top:o,bottom:i}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[e],n=this.optionsListItems[e+1]||s,d=this.optionsListItems[e-1]||s,r=n.getBoundingClientRect(),l=d.getBoundingClientRect();r.bottom>i?t=r.bottom-i+2:l.top<o&&(t=l.top-o-2),this.optionsList.scrollTop+=t}t()})})}))}getOptionKeyValuePair(e){if("string"==typeof e)return{key:e.trim(),value:e};if(e&&"object"==typeof e){const t=Object.keys(e),o=Object.values(e);if(t.length){if(1===t.length||!this.optionId)return{key:t[0],value:o[0]};if(this.optionId)return{key:e[this.optionId],value:e[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const e=this.renderOptions.find(e=>e.key===this.selectedKey);if(e)return e.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded}}render(){return r.html`
2
2
  <div class="md-dropdown ${Object(l.classMap)(this.dropDownClassMap)}" part="dropdown">
3
3
  <label
4
4
  class="md-dropdown-label"
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("luxon"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@interactjs/interact/index"),require("@popperjs/core/lib/popper-lite"),require("nanoid"),require("highlight.js/lib/core"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("sortablejs"),require("papaparse"),require("lit-html/directives/repeat.js"),require("@popperjs/core/lib"),require("lit-html/directives/until.js"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit-html/directives/unsafe-html"),require("lit-virtualizer"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/template-content"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","lit-html/directives/style-map","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","luxon","lit-html/directives/class-map.js","lit-html/directives/repeat","@interactjs/interact/index","@popperjs/core/lib/popper-lite","nanoid","highlight.js/lib/core","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","sortablejs","papaparse","lit-html/directives/repeat.js","@popperjs/core/lib","lit-html/directives/until.js","dompurify","@interactjs/actions/drag","@interactjs/actions/resize","@interactjs/auto-start","@interactjs/modifiers","libphonenumber-js","lit-html/directives/unsafe-html","lit-virtualizer","country-codes-list","country-flags-svg","lit-html/directives/template-content"],t);else{var o="object"==typeof exports?t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("luxon"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@interactjs/interact/index"),require("@popperjs/core/lib/popper-lite"),require("nanoid"),require("highlight.js/lib/core"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("sortablejs"),require("papaparse"),require("lit-html/directives/repeat.js"),require("@popperjs/core/lib"),require("lit-html/directives/until.js"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit-html/directives/unsafe-html"),require("lit-virtualizer"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/template-content")):t(e["lit-element"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["lit-html/directives/style-map"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.luxon,e["lit-html/directives/class-map.js"],e["lit-html/directives/repeat"],e["@interactjs/interact/index"],e["@popperjs/core/lib/popper-lite"],e.nanoid,e["highlight.js/lib/core"],e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e.sortablejs,e.papaparse,e["lit-html/directives/repeat.js"],e["@popperjs/core/lib"],e["lit-html/directives/until.js"],e.dompurify,e["@interactjs/actions/drag"],e["@interactjs/actions/resize"],e["@interactjs/auto-start"],e["@interactjs/modifiers"],e["libphonenumber-js"],e["lit-html/directives/unsafe-html"],e["lit-virtualizer"],e["country-codes-list"],e["country-flags-svg"],e["lit-html/directives/template-content"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(window,(function(e,t,o,r,i,n,c,d,s,l,a,u,p,m,h,f,g,b,j,y,v,x,q,k,w,T,C,P,O,L,A,B,M,D){return function(e){function t(t){for(var r,c,d=t[0],s=t[1],l=t[2],u=0,p=[];u<d.length;u++)c=d[u],Object.prototype.hasOwnProperty.call(i,c)&&i[c]&&p.push(i[c][0]),i[c]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(a&&a(t);p.length;)p.shift()();return n.push.apply(n,l||[]),o()}function o(){for(var e,t=0;t<n.length;t++){for(var o=n[t],r=!0,d=1;d<o.length;d++){var s=o[d];0!==i[s]&&(r=!1)}r&&(n.splice(t--,1),e=c(c.s=o[0]))}return e}var r={},i={341:0,276:0,277:0,278:0,279:0,280:0,281:0,282:0,283:0,284:0,285:0,286:0,287:0,288:0,289:0,290:0,291:0,292:0,293:0,294:0,295:0,296:0,297:0,298:0,299:0,300:0,301:0,302:0,303:0,304:0,305:0,306:0,307:0,308:0,309:0,310:0,311:0,312:0,313:0,314:0,315:0,316:0,317:0,318:0,319:0,320:0,321:0,322:0,323:0,324:0,325:0,326:0,327:0,328:0,329:0,330:0,331:0,332:0,333:0,334:0,335:0,336:0,337:0,338:0,339:0,340:0},n=[];function c(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,c),o.l=!0,o.exports}c.e=function(e){var t=[],o=i[e];if(0!==o)if(o)t.push(o[2]);else{var r=new Promise((function(t,r){o=i[e]=[t,r]}));t.push(o[2]=r);var n,d=document.createElement("script");d.charset="utf-8",d.timeout=120,c.nc&&d.setAttribute("nonce",c.nc),d.src=function(e){return c.p+"chunks/md-"+e+".js"}(e);var s=new Error;n=function(t){d.onerror=d.onload=null,clearTimeout(l);var o=i[e];if(0!==o){if(o){var r=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+r+": "+n+")",s.name="ChunkLoadError",s.type=r,s.request=n,o[1](s)}i[e]=void 0}};var l=setTimeout((function(){n({type:"timeout",target:d})}),12e4);d.onerror=d.onload=n,document.head.appendChild(d)}return Promise.all(t)},c.m=e,c.c=r,c.d=function(e,t,o){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(c.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)c.d(o,r,function(t){return e[t]}.bind(null,r));return o},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/",c.oe=function(e){throw console.error(e),e};var d=window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[],s=d.push.bind(d);d.push=t,d=d.slice();for(var l=0;l<d.length;l++)t(d[l]);var a=s;return n.push([319,43,0,1,2,3,4,5,6,7,8,9,10,11,13,12,14,15,16,17,18,19,21,20,22,23,26,27,25,24,36,39,37,29,42,35,34,31,30,40,41,33,32,28,38,82,80,78,71,56,63,49,83,65,57,81,64,69,73,76,79,72,60,84,52,51,70,61,66,48,44,75,54,45,67,68,47,59,74,50,55,53,46,62,77,58]),o()}({0:function(t,o){t.exports=e},10:function(e,t){e.exports=n},11:function(e,t){e.exports=c},12:function(e,t){e.exports=d},13:function(e,t){e.exports=s},14:function(e,t){e.exports=l},2:function(e,o){e.exports=t},20:function(e,t){e.exports=a},21:function(e,t){e.exports=u},22:function(e,t){e.exports=p},23:function(e,t){e.exports=m},25:function(e,t){e.exports=h},26:function(e,t){e.exports=f},27:function(e,t){e.exports=g},28:function(e,t){e.exports=b},3:function(e,t){e.exports=o},30:function(e,t){e.exports=j},31:function(e,t){e.exports=y},319:function(e,t,o){"use strict";o.r(t),o.d(t,"Accordion",(function(){return i.Accordion})),o.d(t,"AccordionItem",(function(){return n.AccordionItem})),o.d(t,"ActivityButton",(function(){return c.ActivityButton})),o.d(t,"AlertBanner",(function(){return d.AlertBanner})),o.d(t,"Alert",(function(){return s.Alert})),o.d(t,"AudioPlayer",(function(){return l.AudioPlayer})),o.d(t,"Avatar",(function(){return a.Avatar})),o.d(t,"CompositeAvatar",(function(){return u.CompositeAvatar})),o.d(t,"Badge",(function(){return p.Badge})),o.d(t,"Breadcrumb",(function(){return m.Breadcrumb})),o.d(t,"ButtonGroup",(function(){return h.ButtonGroup})),o.d(t,"Button",(function(){return f.Button})),o.d(t,"Card",(function(){return g.Card})),o.d(t,"ChatMessage",(function(){return b.ChatMessage})),o.d(t,"Checkbox",(function(){return j.Checkbox})),o.d(t,"CheckboxGroup",(function(){return y.CheckboxGroup})),o.d(t,"Chip",(function(){return v.Chip})),o.d(t,"Coachmark",(function(){return x.Coachmark})),o.d(t,"CodeEditor",(function(){return r})),o.d(t,"ComboBox",(function(){return A.ComboBox})),o.d(t,"DateRangePicker",(function(){return B.DateRangePicker})),o.d(t,"DateTimePicker",(function(){return M.DateTimePicker})),o.d(t,"DatePicker",(function(){return D.DatePicker})),o.d(t,"DatePickerCalendar",(function(){return I.DatePickerCalendar})),o.d(t,"DatePickerDay",(function(){return S.DatePickerDay})),o.d(t,"DatePickerMonth",(function(){return z.DatePickerMonth})),o.d(t,"DatePickerWeek",(function(){return U.DatePickerWeek})),o.d(t,"Draggable",(function(){return N.Draggable})),o.d(t,"DraggableItem",(function(){return R.DraggableItem})),o.d(t,"Dropdown",(function(){return E.Dropdown})),o.d(t,"EditableTextfield",(function(){return F.EditableTextfield})),o.d(t,"Favorite",(function(){return _.Favorite})),o.d(t,"FloatingModal",(function(){return $.FloatingModal})),o.d(t,"FloatingMinimizedModal",(function(){return G.FloatingMinimizedModal})),o.d(t,"Form",(function(){return V.Form})),o.d(t,"HelpText",(function(){return H.HelpText})),o.d(t,"Icon",(function(){return W.Icon})),o.d(t,"InputFile",(function(){return J.InputFile})),o.d(t,"Input",(function(){return K.Input})),o.d(t,"Label",(function(){return Q.Label})),o.d(t,"Link",(function(){return X.Link})),o.d(t,"List",(function(){return Y.List})),o.d(t,"ListItem",(function(){return Z.ListItem})),o.d(t,"Loading",(function(){return ee.Loading})),o.d(t,"MeetingAlert",(function(){return te.MeetingAlert})),o.d(t,"MenuOverlay",(function(){return oe.MenuOverlay})),o.d(t,"Menu",(function(){return re.Menu})),o.d(t,"MenuItem",(function(){return ie.MenuItem})),o.d(t,"Modal",(function(){return ne.Modal})),o.d(t,"Pagination",(function(){return ce.Pagination})),o.d(t,"PhoneInput",(function(){return de.PhoneInput})),o.d(t,"ProgressBar",(function(){return se.ProgressBar})),o.d(t,"Radio",(function(){return le.Radio})),o.d(t,"RadioGroup",(function(){return ae.RadioGroup})),o.d(t,"Slider",(function(){return ue.Slider})),o.d(t,"Spinner",(function(){return pe.Spinner})),o.d(t,"Table",(function(){return me.Table})),o.d(t,"TableAdvanced",(function(){return he.TableAdvanced})),o.d(t,"Tab",(function(){return fe.Tab})),o.d(t,"TabPanel",(function(){return ge.TabPanel})),o.d(t,"Tabs",(function(){return be.Tabs})),o.d(t,"TaskItem",(function(){return je.TaskItem})),o.d(t,"Theme",(function(){return ye.Theme})),o.d(t,"TimePicker",(function(){return ve.TimePicker})),o.d(t,"ToggleSwitch",(function(){return xe.ToggleSwitch})),o.d(t,"Tooltip",(function(){return qe.Tooltip}));var r,i=o(82),n=o(83),c=o(84),d=o(103),s=o(104),l=o(105),a=o(43),u=o(85),p=o(49),m=o(106),h=o(107),f=o(17),g=o(108),b=o(109),j=o(86),y=o(87),v=o(110),x=o(111),q=o(7),k=o(4),w=o(23),T=o.n(w),C=o(0),P=C.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:0 0;color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}`,O=function(e,t,o,r){var i,n=arguments.length,c=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,r);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(c=(n<3?i(c):n>3?i(t,o,c):i(t,o))||c);return n>3&&c&&Object.defineProperty(t,o,c),c},L=function(e,t,o,r){return new(o||(o=Promise))((function(i,n){function c(e){try{s(r.next(e))}catch(e){n(e)}}function d(e){try{s(r.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(c,d)}s((r=r.apply(e,t||[])).next())}))};!function(e){let t=class extends C.LitElement{constructor(){super(...arguments),this.copyLocalization="cURL",this.copiedLocalization="Copied",this.method="get",this.acceptLanguage="javascript",this.url="javascript",this.disableCopyButton=!0,this.acceptTypes="",this.copied=!1}static get styles(){return[k.a,P]}handleSlotChange(){if(this.slotNodes&&this.slotNodes.length){const e=this.slotNodes.find(e=>"CODE"===e.tagName);if(e){const t=e.textContent;t&&this.highlightBlock(t)}}}handleUrlSlotChange(){if(this.copied=!1,this.slotUrl&&this.slotUrl.length){const e=this.slotUrl.find(e=>e);if(e){const t=e.textContent;t&&this.copyUrl(t)}}}highlightBlock(e){e&&(this.codeBlock.innerText=e),T.a.highlightBlock(this.codeBlock)}copyUrl(e){this.codeUrl.innerText=e,this.disableCopyButton=!1}copyClipboard(){this.disableCopyButton||(this.codeUrl.innerText,this.selectTarget(this.codeUrl))}copyText(){try{document.execCommand("copy"),this.copied=!0}catch(e){console.warn("Copy text failed"),this.copied=!1}}select(e){const t=window.getSelection(),o=document.createRange();o.selectNodeContents(e),t&&(t.removeAllRanges(),t.addRange(o))}selectTarget(e){this.select(e),this.copyText()}importLanguage(e){return L(this,void 0,void 0,(function*(){try{const{default:t}=yield o(88)("./"+e);T.a.registerLanguage(""+e,t),this.setAcceptTypes()}catch(e){console.warn("Please set correct language name")}}))}getAllAcceptTypes(){const e=T.a.listLanguages();return e.length?e.map(e=>T.a.getLanguage(""+e).aliases).map(e=>e.map(e=>"."+e)).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(e){super.updated(e),e.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage),e.has("acceptTypes")&&this.highlightBlock()}render(){return C.html`
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("luxon"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@interactjs/interact/index"),require("@popperjs/core/lib/popper-lite"),require("nanoid"),require("highlight.js/lib/core"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("sortablejs"),require("papaparse"),require("lit-html/directives/repeat.js"),require("@popperjs/core/lib"),require("lit-html/directives/until.js"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit-html/directives/unsafe-html"),require("lit-virtualizer"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/template-content"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","lit-html/directives/style-map","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","luxon","lit-html/directives/class-map.js","lit-html/directives/repeat","@interactjs/interact/index","@popperjs/core/lib/popper-lite","nanoid","highlight.js/lib/core","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","sortablejs","papaparse","lit-html/directives/repeat.js","@popperjs/core/lib","lit-html/directives/until.js","dompurify","@interactjs/actions/drag","@interactjs/actions/resize","@interactjs/auto-start","@interactjs/modifiers","libphonenumber-js","lit-html/directives/unsafe-html","lit-virtualizer","country-codes-list","country-flags-svg","lit-html/directives/template-content"],t);else{var o="object"==typeof exports?t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("luxon"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@interactjs/interact/index"),require("@popperjs/core/lib/popper-lite"),require("nanoid"),require("highlight.js/lib/core"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("sortablejs"),require("papaparse"),require("lit-html/directives/repeat.js"),require("@popperjs/core/lib"),require("lit-html/directives/until.js"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit-html/directives/unsafe-html"),require("lit-virtualizer"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/template-content")):t(e["lit-element"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["lit-html/directives/style-map"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.luxon,e["lit-html/directives/class-map.js"],e["lit-html/directives/repeat"],e["@interactjs/interact/index"],e["@popperjs/core/lib/popper-lite"],e.nanoid,e["highlight.js/lib/core"],e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e.sortablejs,e.papaparse,e["lit-html/directives/repeat.js"],e["@popperjs/core/lib"],e["lit-html/directives/until.js"],e.dompurify,e["@interactjs/actions/drag"],e["@interactjs/actions/resize"],e["@interactjs/auto-start"],e["@interactjs/modifiers"],e["libphonenumber-js"],e["lit-html/directives/unsafe-html"],e["lit-virtualizer"],e["country-codes-list"],e["country-flags-svg"],e["lit-html/directives/template-content"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(window,(function(e,t,o,r,i,n,c,d,s,l,a,u,p,m,h,f,g,b,j,y,v,x,q,k,w,T,C,P,O,L,A,B,M,D){return function(e){function t(t){for(var r,c,d=t[0],s=t[1],l=t[2],u=0,p=[];u<d.length;u++)c=d[u],Object.prototype.hasOwnProperty.call(i,c)&&i[c]&&p.push(i[c][0]),i[c]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(a&&a(t);p.length;)p.shift()();return n.push.apply(n,l||[]),o()}function o(){for(var e,t=0;t<n.length;t++){for(var o=n[t],r=!0,d=1;d<o.length;d++){var s=o[d];0!==i[s]&&(r=!1)}r&&(n.splice(t--,1),e=c(c.s=o[0]))}return e}var r={},i={341:0,276:0,277:0,278:0,279:0,280:0,281:0,282:0,283:0,284:0,285:0,286:0,287:0,288:0,289:0,290:0,291:0,292:0,293:0,294:0,295:0,296:0,297:0,298:0,299:0,300:0,301:0,302:0,303:0,304:0,305:0,306:0,307:0,308:0,309:0,310:0,311:0,312:0,313:0,314:0,315:0,316:0,317:0,318:0,319:0,320:0,321:0,322:0,323:0,324:0,325:0,326:0,327:0,328:0,329:0,330:0,331:0,332:0,333:0,334:0,335:0,336:0,337:0,338:0,339:0,340:0},n=[];function c(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,c),o.l=!0,o.exports}c.e=function(e){var t=[],o=i[e];if(0!==o)if(o)t.push(o[2]);else{var r=new Promise((function(t,r){o=i[e]=[t,r]}));t.push(o[2]=r);var n,d=document.createElement("script");d.charset="utf-8",d.timeout=120,c.nc&&d.setAttribute("nonce",c.nc),d.src=function(e){return c.p+"chunks/md-"+e+".js"}(e);var s=new Error;n=function(t){d.onerror=d.onload=null,clearTimeout(l);var o=i[e];if(0!==o){if(o){var r=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+r+": "+n+")",s.name="ChunkLoadError",s.type=r,s.request=n,o[1](s)}i[e]=void 0}};var l=setTimeout((function(){n({type:"timeout",target:d})}),12e4);d.onerror=d.onload=n,document.head.appendChild(d)}return Promise.all(t)},c.m=e,c.c=r,c.d=function(e,t,o){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(c.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)c.d(o,r,function(t){return e[t]}.bind(null,r));return o},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/",c.oe=function(e){throw console.error(e),e};var d=window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[],s=d.push.bind(d);d.push=t,d=d.slice();for(var l=0;l<d.length;l++)t(d[l]);var a=s;return n.push([319,43,0,1,2,3,4,5,6,7,8,9,10,11,13,12,14,15,16,17,18,19,21,20,22,23,26,27,25,24,36,37,39,29,35,42,34,31,30,40,41,33,32,28,38,82,80,78,71,56,63,49,83,65,57,81,64,69,73,76,79,72,60,84,52,51,70,61,66,48,44,75,54,45,67,68,47,59,74,50,55,53,46,62,77,58]),o()}({0:function(t,o){t.exports=e},10:function(e,t){e.exports=n},11:function(e,t){e.exports=c},12:function(e,t){e.exports=d},13:function(e,t){e.exports=s},14:function(e,t){e.exports=l},2:function(e,o){e.exports=t},20:function(e,t){e.exports=a},21:function(e,t){e.exports=u},22:function(e,t){e.exports=p},23:function(e,t){e.exports=m},25:function(e,t){e.exports=h},26:function(e,t){e.exports=f},27:function(e,t){e.exports=g},28:function(e,t){e.exports=b},3:function(e,t){e.exports=o},30:function(e,t){e.exports=j},31:function(e,t){e.exports=y},319:function(e,t,o){"use strict";o.r(t),o.d(t,"Accordion",(function(){return i.Accordion})),o.d(t,"AccordionItem",(function(){return n.AccordionItem})),o.d(t,"ActivityButton",(function(){return c.ActivityButton})),o.d(t,"AlertBanner",(function(){return d.AlertBanner})),o.d(t,"Alert",(function(){return s.Alert})),o.d(t,"AudioPlayer",(function(){return l.AudioPlayer})),o.d(t,"Avatar",(function(){return a.Avatar})),o.d(t,"CompositeAvatar",(function(){return u.CompositeAvatar})),o.d(t,"Badge",(function(){return p.Badge})),o.d(t,"Breadcrumb",(function(){return m.Breadcrumb})),o.d(t,"ButtonGroup",(function(){return h.ButtonGroup})),o.d(t,"Button",(function(){return f.Button})),o.d(t,"Card",(function(){return g.Card})),o.d(t,"ChatMessage",(function(){return b.ChatMessage})),o.d(t,"Checkbox",(function(){return j.Checkbox})),o.d(t,"CheckboxGroup",(function(){return y.CheckboxGroup})),o.d(t,"Chip",(function(){return v.Chip})),o.d(t,"Coachmark",(function(){return x.Coachmark})),o.d(t,"CodeEditor",(function(){return r})),o.d(t,"ComboBox",(function(){return A.ComboBox})),o.d(t,"DateRangePicker",(function(){return B.DateRangePicker})),o.d(t,"DateTimePicker",(function(){return M.DateTimePicker})),o.d(t,"DatePicker",(function(){return D.DatePicker})),o.d(t,"DatePickerCalendar",(function(){return I.DatePickerCalendar})),o.d(t,"DatePickerDay",(function(){return S.DatePickerDay})),o.d(t,"DatePickerMonth",(function(){return z.DatePickerMonth})),o.d(t,"DatePickerWeek",(function(){return U.DatePickerWeek})),o.d(t,"Draggable",(function(){return N.Draggable})),o.d(t,"DraggableItem",(function(){return R.DraggableItem})),o.d(t,"Dropdown",(function(){return E.Dropdown})),o.d(t,"EditableTextfield",(function(){return F.EditableTextfield})),o.d(t,"Favorite",(function(){return _.Favorite})),o.d(t,"FloatingModal",(function(){return $.FloatingModal})),o.d(t,"FloatingMinimizedModal",(function(){return G.FloatingMinimizedModal})),o.d(t,"Form",(function(){return V.Form})),o.d(t,"HelpText",(function(){return H.HelpText})),o.d(t,"Icon",(function(){return W.Icon})),o.d(t,"InputFile",(function(){return J.InputFile})),o.d(t,"Input",(function(){return K.Input})),o.d(t,"Label",(function(){return Q.Label})),o.d(t,"Link",(function(){return X.Link})),o.d(t,"List",(function(){return Y.List})),o.d(t,"ListItem",(function(){return Z.ListItem})),o.d(t,"Loading",(function(){return ee.Loading})),o.d(t,"MeetingAlert",(function(){return te.MeetingAlert})),o.d(t,"MenuOverlay",(function(){return oe.MenuOverlay})),o.d(t,"Menu",(function(){return re.Menu})),o.d(t,"MenuItem",(function(){return ie.MenuItem})),o.d(t,"Modal",(function(){return ne.Modal})),o.d(t,"Pagination",(function(){return ce.Pagination})),o.d(t,"PhoneInput",(function(){return de.PhoneInput})),o.d(t,"ProgressBar",(function(){return se.ProgressBar})),o.d(t,"Radio",(function(){return le.Radio})),o.d(t,"RadioGroup",(function(){return ae.RadioGroup})),o.d(t,"Slider",(function(){return ue.Slider})),o.d(t,"Spinner",(function(){return pe.Spinner})),o.d(t,"Table",(function(){return me.Table})),o.d(t,"TableAdvanced",(function(){return he.TableAdvanced})),o.d(t,"Tab",(function(){return fe.Tab})),o.d(t,"TabPanel",(function(){return ge.TabPanel})),o.d(t,"Tabs",(function(){return be.Tabs})),o.d(t,"TaskItem",(function(){return je.TaskItem})),o.d(t,"Theme",(function(){return ye.Theme})),o.d(t,"TimePicker",(function(){return ve.TimePicker})),o.d(t,"ToggleSwitch",(function(){return xe.ToggleSwitch})),o.d(t,"Tooltip",(function(){return qe.Tooltip}));var r,i=o(82),n=o(83),c=o(84),d=o(103),s=o(104),l=o(105),a=o(43),u=o(85),p=o(49),m=o(106),h=o(107),f=o(17),g=o(108),b=o(109),j=o(86),y=o(87),v=o(110),x=o(111),q=o(7),k=o(4),w=o(23),T=o.n(w),C=o(0),P=C.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:0 0;color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}`,O=function(e,t,o,r){var i,n=arguments.length,c=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,r);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(c=(n<3?i(c):n>3?i(t,o,c):i(t,o))||c);return n>3&&c&&Object.defineProperty(t,o,c),c},L=function(e,t,o,r){return new(o||(o=Promise))((function(i,n){function c(e){try{s(r.next(e))}catch(e){n(e)}}function d(e){try{s(r.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(c,d)}s((r=r.apply(e,t||[])).next())}))};!function(e){let t=class extends C.LitElement{constructor(){super(...arguments),this.copyLocalization="cURL",this.copiedLocalization="Copied",this.method="get",this.acceptLanguage="javascript",this.url="javascript",this.disableCopyButton=!0,this.acceptTypes="",this.copied=!1}static get styles(){return[k.a,P]}handleSlotChange(){if(this.slotNodes&&this.slotNodes.length){const e=this.slotNodes.find(e=>"CODE"===e.tagName);if(e){const t=e.textContent;t&&this.highlightBlock(t)}}}handleUrlSlotChange(){if(this.copied=!1,this.slotUrl&&this.slotUrl.length){const e=this.slotUrl.find(e=>e);if(e){const t=e.textContent;t&&this.copyUrl(t)}}}highlightBlock(e){e&&(this.codeBlock.innerText=e),T.a.highlightBlock(this.codeBlock)}copyUrl(e){this.codeUrl.innerText=e,this.disableCopyButton=!1}copyClipboard(){this.disableCopyButton||(this.codeUrl.innerText,this.selectTarget(this.codeUrl))}copyText(){try{document.execCommand("copy"),this.copied=!0}catch(e){console.warn("Copy text failed"),this.copied=!1}}select(e){const t=window.getSelection(),o=document.createRange();o.selectNodeContents(e),t&&(t.removeAllRanges(),t.addRange(o))}selectTarget(e){this.select(e),this.copyText()}importLanguage(e){return L(this,void 0,void 0,(function*(){try{const{default:t}=yield o(88)("./"+e);T.a.registerLanguage(""+e,t),this.setAcceptTypes()}catch(e){console.warn("Please set correct language name")}}))}getAllAcceptTypes(){const e=T.a.listLanguages();return e.length?e.map(e=>T.a.getLanguage(""+e).aliases).map(e=>e.map(e=>"."+e)).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(e){super.updated(e),e.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage),e.has("acceptTypes")&&this.highlightBlock()}render(){return C.html`
2
2
  <div class="md-code-editor" part="code-editor">
3
3
  <div class="md-code-editor-header">
4
4
  <div class="md-code-editor-name">
package/dist/index.js CHANGED
@@ -28,11 +28,11 @@ require("./chunks/md-27");
28
28
  require("./chunks/md-25");
29
29
  require("./chunks/md-24");
30
30
  require("./chunks/md-36");
31
- require("./chunks/md-39");
32
31
  require("./chunks/md-37");
32
+ require("./chunks/md-39");
33
33
  require("./chunks/md-29");
34
- require("./chunks/md-42");
35
34
  require("./chunks/md-35");
35
+ require("./chunks/md-42");
36
36
  require("./chunks/md-34");
37
37
  require("./chunks/md-31");
38
38
  require("./chunks/md-30");
@@ -5,12 +5,12 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { LitElement } from "lit-element";
9
- import "@/components/icon/Icon";
10
8
  import "@/components/button/Button";
9
+ import "@/components/favorite/Favorite";
10
+ import "@/components/icon/Icon";
11
11
  import "@/components/list/List";
12
12
  import "@/components/list/ListItem";
13
- import "@/components/favorite/Favorite";
13
+ import { LitElement } from "lit-element";
14
14
  export declare namespace Card {
15
15
  class ELEMENT extends LitElement {
16
16
  title: string;
@@ -8,9 +8,9 @@
8
8
  import "@/components/datepicker/datepicker-calendar/DatePickerCalendar";
9
9
  import "@/components/input/Input";
10
10
  import "@/components/menu-overlay/MenuOverlay";
11
- import { MenuOverlay } from "../menu-overlay/MenuOverlay";
12
11
  import { LitElement, PropertyValues } from "lit-element";
13
12
  import { DateTime } from "luxon";
13
+ import { MenuOverlay } from "../menu-overlay/MenuOverlay";
14
14
  export declare namespace DatePicker {
15
15
  const weekStartDays: string[];
16
16
  class ELEMENT extends LitElement {
@@ -23,6 +23,11 @@ export declare namespace DatePicker {
23
23
  locale: string;
24
24
  includesTime: boolean;
25
25
  disabled: boolean;
26
+ htmlId: string;
27
+ label: string;
28
+ ariaLabel: string;
29
+ required: boolean;
30
+ errorMessage: string;
26
31
  customTrigger: boolean;
27
32
  selectedDate: DateTime;
28
33
  focusedDate: DateTime;
@@ -38,6 +43,7 @@ export declare namespace DatePicker {
38
43
  handleSelect: (e: CustomEvent) => void;
39
44
  setSelected: (date: DateTime, event: Event) => void;
40
45
  setPreSelection: (date: DateTime) => void;
46
+ handleInputKeyDown: (event: KeyboardEvent) => void;
41
47
  handleKeyDown: (e: CustomEvent) => void;
42
48
  chosenDateLabel: () => string | undefined;
43
49
  isValueValid: () => boolean | "";
@@ -26,6 +26,9 @@ export declare namespace Tooltip {
26
26
  popper: HTMLDivElement;
27
27
  reference: HTMLDivElement;
28
28
  private slotContent;
29
+ private _keyDownListener;
30
+ connectedCallback(): void;
31
+ disconnectedCallback(): void;
29
32
  protected handleFocusIn(event: Event): void;
30
33
  protected handleFocusOut(event: Event): void;
31
34
  private openTooltip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "2.7.47",
3
+ "version": "2.7.48",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",