@momentum-ui/web-components 3.2.14 → 3.2.15

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.
package/dist/2273.js CHANGED
@@ -113,7 +113,7 @@
113
113
  class="md-combobox-option"
114
114
  aria-posinset=${i}
115
115
  aria-setsize=${s}
116
- role=${this.isMulti?"checkbox":"listitem"}
116
+ role=${this.isMulti?"checkbox":"option"}
117
117
  aria-label="${this.isCustomContent?this.getOptionId(t):this.getOptionValue(t)}${o}"
118
118
  tabindex="-1"
119
119
  @click=${t=>this.handleListClick(t)}
@@ -198,7 +198,7 @@
198
198
  part="combobox-options"
199
199
  aria-label=${this.ariaLabel||this.label}
200
200
  style=${this.addStyle()}
201
- role=${(0,u.ifDefined)(this.checkForVirtualScroll()?void 0:"list")}
201
+ role=${(0,u.ifDefined)(this.checkForVirtualScroll()?void 0:"listbox")}
202
202
  >
203
203
  ${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():a.nothing}
204
204
  ${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:a.nothing:this.renderWithoutVirtualScroll()}
package/dist/7137.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[7137],{7137(e,r,t){t.d(r,{A:()=>a});const a=t(7161).css`:host(md-card-alert){display:block}:host(md-card-alert) .md-card-alert{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-secondary-bg-color);border:1px solid var(--md-quaternary-bg-color);border-radius:.75rem;box-shadow:0 2px 8px rgba(0,0,0,.1);gap:.75rem;padding:.75rem;width:22.9375rem}:host(md-card-alert) .md-card-alert:focus{outline:0}:host(md-card-alert) .md-card-alert-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;flex-wrap:nowrap}:host(md-card-alert) .md-card-alert-chips{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.375rem}:host(md-card-alert) .md-card-alert-timestamp{color:var(--md-secondary-text-color);font-size:.875rem;font-weight:400;flex-shrink:0}:host(md-card-alert) .md-card-alert-live{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);font-size:.875rem;font-weight:400;gap:.25rem;flex-shrink:0}:host(md-card-alert) .md-card-alert-live-icon{color:var(--md-presence-active,#16a34a);animation:live-pulse 2s ease-in-out infinite}@keyframes live-pulse{0%,100%{opacity:1}50%{opacity:.3}}:host(md-card-alert) .md-card-alert-title-section{align-content:center;align-items:flex-start;display:flex;flex-flow:column nowrap;justify-content:flex-start;gap:.125rem}:host(md-card-alert) .md-card-alert-title{color:var(--md-primary-text-color);font-size:1rem;font-weight:700;margin:0;line-height:1.5rem}:host(md-card-alert) .md-card-alert-subtitle{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);font-size:.875rem;gap:.25rem;margin:0}:host(md-card-alert) .md-card-alert-subtitle-icon{flex-shrink:0;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-details{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-background-tertiary,#f3f4f6);border-radius:.5rem;gap:.1875rem;padding:.75rem}:host(md-card-alert) .md-card-alert-details-heading{color:var(--md-secondary-text-color);font-size:.875rem;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-row{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between}:host(md-card-alert) .md-card-alert-detail-label{color:var(--md-primary-text-color);font-size:.875rem;font-weight:700;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value{color:var(--md-primary-text-color);font-size:.875rem;text-align:right;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value--highlighted{color:var(--md-alert-error-text-color,#dc2626)}:host(md-card-alert) .md-card-alert-insight{align-content:center;align-items:flex-start;display:flex;flex-flow:row nowrap;justify-content:flex-start;background:var(--card-ai-blue-bg-color,#eff6ff);border-radius:.5rem;border:1px solid var(--badge-confidence-cobalt-border-color,#dbeafe);color:var(--md-primary-text-color);gap:.5rem;padding:.625rem .75rem}:host(md-card-alert) .md-card-alert-insight-icon{color:var(--badge-status-accent-text-color,#0284c7);flex-shrink:0;margin-top:.0625rem;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-insight-text{font-size:.875rem;line-height:1.25rem}:host(md-card-alert) .md-card-alert-actions{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.5rem}`}}]);
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[7137],{7137(e,t,r){r.d(t,{A:()=>a});const a=r(7161).css`:host(md-card-alert){display:block}:host(md-card-alert) .md-card-alert{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-secondary-bg-color);border:1px solid var(--md-quaternary-bg-color);border-radius:.75rem;box-sizing:border-box;box-shadow:0 2px 8px rgba(0,0,0,.1);gap:.75rem;padding:.75rem;width:22.9375rem}:host(md-card-alert) .md-card-alert--no-insight{height:329px;max-height:329px;min-height:329px}:host(md-card-alert) .md-card-alert:focus{outline:0}:host(md-card-alert) .md-card-alert-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;flex-wrap:nowrap}:host(md-card-alert) .md-card-alert-chips{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.375rem}:host(md-card-alert) .md-card-alert-timestamp{color:var(--md-secondary-text-color);font-size:.875rem;font-weight:400;flex-shrink:0}:host(md-card-alert) .md-card-alert-title-section{align-content:center;align-items:flex-start;display:flex;flex-flow:column nowrap;justify-content:flex-start;gap:.125rem;min-width:0;width:100%}:host(md-card-alert) .md-card-alert-title{-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;color:var(--md-primary-text-color);display:-webkit-box;font-size:1rem;font-weight:700;height:3rem;line-height:1.5rem;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:normal;width:100%}:host(md-card-alert) .md-card-alert-subtitle{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);font-size:.875rem;gap:.25rem;margin:0}:host(md-card-alert) .md-card-alert-subtitle-icon{flex-shrink:0;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-details{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-background-tertiary,#f3f4f6);border-radius:.5rem;gap:.1875rem;padding:.75rem}:host(md-card-alert) .md-card-alert-details-heading{color:var(--md-secondary-text-color);font-size:.875rem;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-row{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between}:host(md-card-alert) .md-card-alert-detail-label{color:var(--md-primary-text-color);font-size:.875rem;font-weight:700;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value{color:var(--md-primary-text-color);font-size:.875rem;text-align:right;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value--highlighted{color:var(--md-alert-error-text-color,#dc2626)}:host(md-card-alert) .md-card-alert-insight{align-content:center;align-items:flex-start;display:flex;flex-flow:row nowrap;justify-content:flex-start;background:var(--card-ai-blue-bg-color,#eff6ff);border-radius:.5rem;border:1px solid var(--badge-confidence-cobalt-border-color,#dbeafe);color:var(--md-primary-text-color);gap:.5rem;padding:.625rem .75rem}:host(md-card-alert) .md-card-alert-insight-icon{color:var(--badge-status-accent-text-color,#0284c7);flex-shrink:0;margin-top:.0625rem;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-insight-text{font-size:.875rem;line-height:1.25rem}:host(md-card-alert) .md-card-alert-actions{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.5rem}`}}]);
package/dist/9189.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[9189],{9189(e,t,i){i(7906),i(1821),i(2369),i(9773);var s,a=i(2900),o=i(9609),n=i(3203),r=i(4084),l=(i(2022),i(7161)),p=i(429),d=i(5125),h=i(291),u=i(8175),m=i(318),c=i(9336),y=function(e,t,i,s){var a,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};!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((0,n.y)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",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.ariaRole=void 0,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.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}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){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),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!==a.Uz.Space&&t!==a.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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,"md-new-momentum":this.newMomentum}}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--compact":this.compact,"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-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?l.html`
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[9189],{9189(e,t,i){i(7906),i(1821),i(2369),i(9773);var s,o=i(2900),a=i(9609),n=i(3203),r=i(4084),l=(i(2022),i(7161)),p=i(429),d=i(5125),h=i(291),u=i(8175),m=i(318),c=i(9336),y=function(e,t,i,s){var o,a=arguments.length,n=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(n=(a<3?o(n):a>3?o(t,i,n):o(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};!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((0,n.y)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",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.ariaRole=void 0,this.ariaAutocomplete=void 0,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.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}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){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),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!==o.Uz.Space&&t!==o.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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,"md-new-momentum":this.newMomentum}}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--compact":this.compact,"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-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:this.showDropdown?`${this.dropdownExpanded}`:void 0}get effectiveAriaAutocomplete(){return this.ariaAutocomplete||(this.showDropdown?"both":void 0)}get effectiveAriaRole(){return this.ariaRole||(this.showDropdown?"combobox":void 0)}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?l.html`
2
2
  <textarea
3
3
  part="input"
4
4
  class="md-input ${(0,d.classMap)(this.inputTemplateClassMap)}"
@@ -37,14 +37,15 @@
37
37
  type=${this.type}
38
38
  .value=${this.value}
39
39
  aria-describedby=${this.ariaDescribedBy}
40
- aria-controls=${this.ariaControls}
40
+ aria-controls=${(0,h.ifDefined)(this.ariaControls||void 0)}
41
+ aria-autocomplete=${(0,h.ifDefined)(this.effectiveAriaAutocomplete)}
41
42
  aria-expanded=${(0,h.ifDefined)(null!==(e=this.ariaExpandedValue)&&void 0!==e?e:void 0)}
42
43
  aria-label=${(0,h.ifDefined)(this.effectiveAriaLabel)}
43
44
  aria-invalid=${this.ariaInvalid}
44
45
  aria-errormessage=${`${this.htmlId}-message`}
45
46
  aria-disabled=${(0,h.ifDefined)(this.disabled||void 0)}
46
47
  id=${this.htmlId}
47
- role=${(0,h.ifDefined)(this.ariaRole)}
48
+ role=${(0,h.ifDefined)(this.effectiveAriaRole)}
48
49
  placeholder=${this.placeholder}
49
50
  ?readonly=${this.readOnly||this.disabled||this.disableUserTextInput}
50
51
  min=${(0,h.ifDefined)(this.min)}
@@ -154,4 +155,4 @@
154
155
  ${this.characterCountLabelTemplate()}
155
156
  </div>
156
157
  </div>
157
- `}};y([(0,p.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,p.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,p.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,p.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,p.property)({type:String})],i.prototype,"id",void 0),y([(0,p.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,p.property)({type:String})],i.prototype,"label",void 0),y([(0,p.property)({type:String})],i.prototype,"helpText",void 0),y([(0,p.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,p.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,p.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,p.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,p.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,p.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,p.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,p.property)({type:String})],i.prototype,"shape",void 0),y([(0,p.property)({type:String})],i.prototype,"type",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,p.property)({type:Object})],i.prototype,"control",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,p.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,p.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,p.query)(".md-input")],i.prototype,"input",void 0),y([(0,p.state)()],i.prototype,"isEditing",void 0),y([(0,p.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,p.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,o.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
158
+ `}};y([(0,p.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,p.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,p.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,p.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,p.property)({type:String})],i.prototype,"id",void 0),y([(0,p.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,p.property)({type:String})],i.prototype,"label",void 0),y([(0,p.property)({type:String})],i.prototype,"helpText",void 0),y([(0,p.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,p.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaAutocomplete",void 0),y([(0,p.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,p.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,p.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,p.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,p.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,p.property)({type:String})],i.prototype,"shape",void 0),y([(0,p.property)({type:String})],i.prototype,"type",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,p.property)({type:Object})],i.prototype,"control",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,p.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,p.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,p.query)(".md-input")],i.prototype,"input",void 0),y([(0,p.state)()],i.prototype,"isEditing",void 0),y([(0,p.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,p.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
@@ -1,16 +1,8 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(self,(t,e,i,o,r,s,n,l)=>(()=>{"use strict";var a,d={4882(t,e,i){i.r(e),i.d(e,{CardAlert:()=>c}),i(5983),i(2583),i(1821);var o=i(9609),r=i(4084),s=i(7161),n=i(429),l=i(5125),a=i(7137),d=function(t,e,i,o){var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const p={critical:{icon:"flag-filled",color:"negative"},warning:{icon:"warning-filled",color:"warning"}},h={live:"Live",dismiss:"Dismiss",justNow:"Just now",minutesAgo:t=>`${t} ${1===t?"min":"mins"} ago`,hoursAgo:t=>`${t} ${1===t?"hour":"hours"} ago`,daysAgo:t=>`${t} ${1===t?"day":"days"} ago`};var c;!function(t){let e=class extends s.LitElement{constructor(){super(...arguments),this.severity="",this.category="",this.timestamp="",this.live=!1,this.title="",this.queueName="",this.details=[],this.insight="",this.primaryActionLabel="Click",this.primaryActionDropdown=!1,this.detailsHeading="",this.showDismiss=!0,this.expanded=!1,this.relativeTime=""}static get styles(){return[r.A,a.A]}get severityIcon(){var t,e;return null!==(e=null===(t=p[this.severity.toLowerCase()])||void 0===t?void 0:t.icon)&&void 0!==e?e:"info-circle-filled"}get severityColor(){var t,e;return null!==(e=null===(t=p[this.severity.toLowerCase()])||void 0===t?void 0:t.color)&&void 0!==e?e:"neutral"}updateRelativeTime(){this.timestamp&&!this.live&&(this.relativeTime=this.formatRelativeTime(this.timestamp))}startTimer(){this.stopTimer(),this.timestamp&&!this.live&&(this.updateRelativeTime(),this.timerInterval=setInterval(()=>this.updateRelativeTime(),6e4))}stopTimer(){this.timerInterval&&(clearInterval(this.timerInterval),this.timerInterval=void 0)}willUpdate(t){(t.has("timestamp")||t.has("live"))&&this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.stopTimer()}formatRelativeTime(t){const e=this.constructor.locale,i=Date.now(),o="number"==typeof t?t:new Date(t).getTime();if(isNaN(o))return"";const r=i-o;if(r<0)return e.justNow;const s=Math.floor(r/6e4);if(s<1)return e.justNow;if(s<60)return e.minutesAgo(s);const n=Math.floor(s/60);if(n<24)return e.hoursAgo(n);const l=Math.floor(n/24);return e.daysAgo(l)}handlePrimaryAction(){this.dispatchEvent(new CustomEvent("primary-action-clicked",{bubbles:!0,composed:!0}))}handleDismiss(){this.dispatchEvent(new CustomEvent("dismiss-clicked",{bubbles:!0,composed:!0}))}renderTimestamp(){const t=this.constructor.locale;return this.live?s.html`<span class="md-card-alert-live"
2
- ><md-icon
3
- name="active-presence-small-filled"
4
- size="10"
5
- iconSet="momentumDesign"
6
- class="md-card-alert-live-icon"
7
- ></md-icon
8
- >${t.live}</span
9
- >`:this.relativeTime?s.html`<span class="md-card-alert-timestamp">${this.relativeTime}</span>`:s.nothing}renderHeader(){return this.severity||this.category||this.timestamp||this.live?s.html`
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx);for(var r in i)("object"==typeof exports?exports:t)[r]=i[r]}}(self,(t,e,i,r,o,s,n,a)=>(()=>{"use strict";var l,d={4882(t,e,i){i.r(e),i.d(e,{CardAlert:()=>m,CardAlertSeverity:()=>r}),i(5983),i(2583),i(1821);var r,o=i(9609),s=i(4084),n=i(7161),a=i(429),l=i(5125),d=i(7137),p=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.CRITICAL="critical",t.MEDIUM="medium"}(r||(r={}));const h={[r.CRITICAL]:{icon:"flag-filled",color:"negative"},[r.MEDIUM]:{icon:"warning-filled",color:"warning"}},c={dismiss:"Dismiss",justNow:"Just now",minutesAgo:t=>`${t} ${1===t?"min":"mins"} ago`,hoursAgo:t=>`${t} ${1===t?"hour":"hours"} ago`,daysAgo:t=>`${t} ${1===t?"day":"days"} ago`};var m;!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.severity="",this.category="",this.timestamp="",this.title="",this.queueName="",this.details=[],this.insight="",this.primaryActionLabel="Click",this.primaryActionDropdown=!1,this.detailsHeading="",this.showDismiss=!1,this.expanded=!1,this.relativeTime=""}static get styles(){return[s.A,d.A]}get normalizedSeverity(){var t;const e=(null!==(t=this.severity)&&void 0!==t?t:"").toLowerCase();return Object.values(r).includes(e)?e:void 0}get severityIcon(){return this.normalizedSeverity?h[this.normalizedSeverity].icon:"info-circle-filled"}get severityColor(){return this.normalizedSeverity?h[this.normalizedSeverity].color:"neutral"}get hasInsight(){var t;return(null!==(t=this.insight)&&void 0!==t?t:"").trim().length>0}get detailRows(){return Array.isArray(this.details)?this.details:[]}updateRelativeTime(){this.timestamp&&(this.relativeTime=this.formatRelativeTime(this.timestamp))}startTimer(){this.stopTimer(),this.timestamp&&(this.updateRelativeTime(),this.timerInterval=setInterval(()=>this.updateRelativeTime(),6e4))}stopTimer(){this.timerInterval&&(clearInterval(this.timerInterval),this.timerInterval=void 0)}willUpdate(t){t.has("timestamp")&&this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.stopTimer()}formatRelativeTime(t){const e=this.constructor.locale,i=Date.now(),r="number"==typeof t?t:new Date(t).getTime();if(isNaN(r))return"";const o=i-r;if(o<0)return e.justNow;const s=Math.floor(o/6e4);if(s<1)return e.justNow;if(s<60)return e.minutesAgo(s);const n=Math.floor(s/60);if(n<24)return e.hoursAgo(n);const a=Math.floor(n/24);return e.daysAgo(a)}handlePrimaryAction(){this.dispatchEvent(new CustomEvent("primary-action-clicked",{bubbles:!0,composed:!0}))}handleDismiss(){this.dispatchEvent(new CustomEvent("dismiss-clicked",{bubbles:!0,composed:!0}))}renderTimestamp(){return this.relativeTime?n.html`<span class="md-card-alert-timestamp">${this.relativeTime}</span>`:n.nothing}renderHeader(){return this.severity||this.category||this.timestamp?n.html`
10
2
  <div class="md-card-alert-header">
11
3
  <div class="md-card-alert-chips">
12
- ${this.severity?s.html`
13
- <md-chip value=${this.severity} color=${this.severityColor} small>
4
+ ${this.severity?n.html`
5
+ <md-chip color=${this.severityColor} small>
14
6
  <md-icon
15
7
  name=${this.severityIcon}
16
8
  size="14"
@@ -18,15 +10,15 @@
18
10
  slot="custom-left-content"
19
11
  ></md-icon>
20
12
  </md-chip>
21
- `:s.nothing}
22
- ${this.category?s.html`<md-chip value=${this.category} color="neutral" small></md-chip>`:s.nothing}
13
+ `:n.nothing}
14
+ ${this.category?n.html`<md-chip value=${this.category} color="neutral" small></md-chip>`:n.nothing}
23
15
  </div>
24
16
  ${this.renderTimestamp()}
25
17
  </div>
26
- `:s.nothing}renderTitleSection(){return this.title||this.queueName?s.html`
18
+ `:n.nothing}renderTitleSection(){return this.title||this.queueName?n.html`
27
19
  <div class="md-card-alert-title-section">
28
- ${this.title?s.html`<h3 class="md-card-alert-title">${this.title}</h3>`:s.nothing}
29
- ${this.queueName?s.html`
20
+ ${this.title?n.html`<h3 class="md-card-alert-title">${this.title}</h3>`:n.nothing}
21
+ ${this.queueName?n.html`
30
22
  <p class="md-card-alert-subtitle">
31
23
  <md-icon
32
24
  name="queue-contact-bold"
@@ -36,12 +28,12 @@
36
28
  ></md-icon>
37
29
  ${this.queueName}
38
30
  </p>
39
- `:s.nothing}
31
+ `:n.nothing}
40
32
  </div>
41
- `:s.nothing}renderDetails(){return this.details&&0!==this.details.length?s.html`
33
+ `:n.nothing}renderDetails(){return 0===this.detailRows.length?n.nothing:n.html`
42
34
  <div class="md-card-alert-details">
43
35
  <span class="md-card-alert-details-heading">${this.detailsHeading}</span>
44
- ${this.details.map(t=>s.html`
36
+ ${this.detailRows.map(t=>n.html`
45
37
  <div class="md-card-alert-detail-row">
46
38
  <span class="md-card-alert-detail-label">${t.label}</span>
47
39
  <span
@@ -51,12 +43,12 @@
51
43
  </div>
52
44
  `)}
53
45
  </div>
54
- `:s.nothing}renderInsight(){return this.insight?s.html`
46
+ `}renderInsight(){return this.hasInsight?n.html`
55
47
  <div class="md-card-alert-insight">
56
48
  <md-icon name="sparkle-filled" iconSet="momentumDesign" class="md-card-alert-insight-icon"></md-icon>
57
49
  <span class="md-card-alert-insight-text">${this.insight}</span>
58
50
  </div>
59
- `:s.nothing}renderActions(){return s.html`
51
+ `:n.nothing}renderActions(){return n.html`
60
52
  <div class="md-card-alert-actions">
61
53
  <md-button
62
54
  size="32"
@@ -66,13 +58,13 @@
66
58
  @click=${this.handlePrimaryAction}
67
59
  >
68
60
  <span slot="text">${this.primaryActionLabel}</span>
69
- ${this.primaryActionDropdown?s.html`<md-icon
61
+ ${this.primaryActionDropdown?n.html`<md-icon
70
62
  name=${this.expanded?"arrow-up-bold":"arrow-down-bold"}
71
63
  size="12"
72
64
  iconSet="momentumDesign"
73
- ></md-icon>`:s.nothing}
65
+ ></md-icon>`:n.nothing}
74
66
  </md-button>
75
- ${this.showDismiss?s.html`
67
+ ${this.showDismiss?n.html`
76
68
  <md-button
77
69
  size="32"
78
70
  variant="secondary"
@@ -83,14 +75,18 @@
83
75
  >
84
76
  <span slot="text">${this.constructor.locale.dismiss}</span>
85
77
  </md-button>
86
- `:s.nothing}
78
+ `:n.nothing}
87
79
  </div>
88
- `}render(){return s.html`
89
- <div class="md-card-alert" part="card" tabindex="0">
80
+ `}render(){return n.html`
81
+ <div
82
+ class=${(0,l.classMap)({"md-card-alert":!0,"md-card-alert--no-insight":!this.hasInsight})}
83
+ part="card"
84
+ tabindex="0"
85
+ >
90
86
  ${this.renderHeader()} ${this.renderTitleSection()} ${this.renderDetails()} ${this.renderInsight()}
91
87
  ${this.renderActions()}
92
88
  </div>
93
- `}};e.locale=Object.assign({},h),d([(0,n.property)({type:String})],e.prototype,"severity",void 0),d([(0,n.property)({type:String})],e.prototype,"category",void 0),d([(0,n.property)({type:String})],e.prototype,"timestamp",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"live",void 0),d([(0,n.property)({type:String})],e.prototype,"title",void 0),d([(0,n.property)({type:String})],e.prototype,"queueName",void 0),d([(0,n.property)({type:Array})],e.prototype,"details",void 0),d([(0,n.property)({type:String})],e.prototype,"insight",void 0),d([(0,n.property)({type:String})],e.prototype,"primaryActionLabel",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"primaryActionDropdown",void 0),d([(0,n.property)({type:String})],e.prototype,"detailsHeading",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"showDismiss",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"expanded",void 0),d([(0,n.state)()],e.prototype,"relativeTime",void 0),e=d([(0,o.w)("md-card-alert")],e),t.ELEMENT=e}(c||(c={}))},2583(t,e,i){i(2708),i(9613);var o,r=i(2900),s=i(9609),n=i(4084),l=i(7161),a=i(429),d=i(5125),p=i(291),h=i(9558),c=function(t,e,i,o){var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.color="",this.bgColor="",this.textColor="",this.height="",this.icon="",this.iconColor="",this.iconSize="",this.role="group",this.id="",this.small=!1,this.readonly=!1,this.selected=!1,this.disabled=!1,this.determinateProgress=0,this.indeterminateProgress=!1,this.tooltipText="",this.tooltipPlacement="auto",this.iconSet="momentumUI",this.suppressDefaultMaxWidth=!1,this.decorative=!1,this.shouldTruncateValue=!0,this.value="",this.textOverflow=!1,this.renderedText="",this.MAXWIDTH=115,this.selectionChange=t=>{this.dispatchEvent(new CustomEvent("chip-selected",{composed:!0,bubbles:!0,detail:{selected:t}}))},this.handleClear=t=>{this.dispatchEvent(new CustomEvent("chip-deleted",{composed:!0,bubbles:!0,detail:{id:t}}))},this.handleSelect=()=>{this.disabled||(this.selected=!0,this.selectionChange(!0))},this.handleDeSelect=()=>{this.selected=!1,this.selectionChange(!1)},this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:l.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:l.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:l.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height?l.html`
89
+ `}};e.locale=Object.assign({},c),p([(0,a.property)({type:String})],e.prototype,"severity",void 0),p([(0,a.property)({type:String})],e.prototype,"category",void 0),p([(0,a.property)({type:String})],e.prototype,"timestamp",void 0),p([(0,a.property)({type:String})],e.prototype,"title",void 0),p([(0,a.property)({type:String})],e.prototype,"queueName",void 0),p([(0,a.property)({type:Array})],e.prototype,"details",void 0),p([(0,a.property)({type:String})],e.prototype,"insight",void 0),p([(0,a.property)({type:String})],e.prototype,"primaryActionLabel",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"primaryActionDropdown",void 0),p([(0,a.property)({type:String})],e.prototype,"detailsHeading",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"showDismiss",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"expanded",void 0),p([(0,a.state)()],e.prototype,"relativeTime",void 0),e=p([(0,o.w)("md-card-alert")],e),t.ELEMENT=e}(m||(m={}))},2583(t,e,i){i(2708),i(9613);var r,o=i(2900),s=i(9609),n=i(4084),a=i(7161),l=i(429),d=i(5125),p=i(291),h=i(9558),c=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.color="",this.bgColor="",this.textColor="",this.height="",this.icon="",this.iconColor="",this.iconSize="",this.role="group",this.id="",this.small=!1,this.readonly=!1,this.selected=!1,this.disabled=!1,this.determinateProgress=0,this.indeterminateProgress=!1,this.tooltipText="",this.tooltipPlacement="auto",this.iconSet="momentumUI",this.suppressDefaultMaxWidth=!1,this.decorative=!1,this.shouldTruncateValue=!0,this.value="",this.textOverflow=!1,this.renderedText="",this.MAXWIDTH=115,this.selectionChange=t=>{this.dispatchEvent(new CustomEvent("chip-selected",{composed:!0,bubbles:!0,detail:{selected:t}}))},this.handleClear=t=>{this.dispatchEvent(new CustomEvent("chip-deleted",{composed:!0,bubbles:!0,detail:{id:t}}))},this.handleSelect=()=>{this.disabled||(this.selected=!0,this.selectionChange(!0))},this.handleDeSelect=()=>{this.selected=!1,this.selectionChange(!1)},this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:a.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:a.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:a.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height?a.html`
94
90
  <style>
95
91
  :host .md-chip {
96
92
  ${this.renderBgColor()};
@@ -98,7 +94,7 @@
98
94
  ${this.renderHeight()};
99
95
  }
100
96
  </style>
101
- `:l.nothing}connectedCallback(){super.connectedCallback(),this.truncStringPortion(this.value),this.setAttribute("role",this.role)}willUpdate(t){super.willUpdate(t),(t.has("value")||t.has("shouldTruncateValue"))&&this.truncStringPortion(this.value)}getTextWidth(t,e){const i=null!=e?e:getComputedStyle(this).font,o=document.createElement("canvas").getContext("2d");return o?(o.font=i,o.measureText(t).width):0}truncStringPortion(t){const e=this.getTextWidth(t);if(!this.shouldTruncateValue||e<this.MAXWIDTH)return this.renderedText=t,void(this.textOverflow=!1);const i=Array.from(t);let o=Math.min(4,i.length),r=Math.min(5,Math.max(0,i.length-o-1)),s=i.slice(0,o).join(""),n=i.slice(-r).join(""),l=`${s}…${n}`;if(this.getTextWidth(l)>this.MAXWIDTH)return this.renderedText=l,void(this.textOverflow=!0);for(;o+r<i.length;){let t=!1;if(o+r<i.length){const e=s+i[o],r=`${e}…${n}`;this.getTextWidth(r)<=this.MAXWIDTH&&(s=e,o+=1,l=r,t=!0)}if(o+r<i.length){const e=i[i.length-r-1]+n,o=`${s}…${e}`;this.getTextWidth(o)<=this.MAXWIDTH&&(n=e,r+=1,l=o,t=!0)}if(!t)break}this.renderedText=l,this.textOverflow=!0}handleClick(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("md-tooltip");null==e||e.dispatchEvent(new CustomEvent("tooltip-destroy",{bubbles:!0,composed:!0,detail:{placement:null==e?void 0:e.placement,reference:null==e?void 0:e.reference,popper:null==e?void 0:e.popper}})),this.dispatchEvent(new CustomEvent("chip-interaction",{composed:!0,bubbles:!0,detail:{id:this.id}}))}handleKeydown(t){switch(t.code){case r.Uz.Space:case r.Uz.Enter:this.handleSelect(),this.handleClick()}}static get styles(){return[n.A,h.A]}loadingTemplate(){return this.determinateProgress||this.indeterminateProgress?this.determinateProgress?l.html`
97
+ `:a.nothing}connectedCallback(){super.connectedCallback(),this.truncStringPortion(this.value),this.setAttribute("role",this.role)}willUpdate(t){super.willUpdate(t),(t.has("value")||t.has("shouldTruncateValue"))&&this.truncStringPortion(this.value)}getTextWidth(t,e){const i=null!=e?e:getComputedStyle(this).font,r=document.createElement("canvas").getContext("2d");return r?(r.font=i,r.measureText(t).width):0}truncStringPortion(t){const e=this.getTextWidth(t);if(!this.shouldTruncateValue||e<this.MAXWIDTH)return this.renderedText=t,void(this.textOverflow=!1);const i=Array.from(t);let r=Math.min(4,i.length),o=Math.min(5,Math.max(0,i.length-r-1)),s=i.slice(0,r).join(""),n=i.slice(-o).join(""),a=`${s}…${n}`;if(this.getTextWidth(a)>this.MAXWIDTH)return this.renderedText=a,void(this.textOverflow=!0);for(;r+o<i.length;){let t=!1;if(r+o<i.length){const e=s+i[r],o=`${e}…${n}`;this.getTextWidth(o)<=this.MAXWIDTH&&(s=e,r+=1,a=o,t=!0)}if(r+o<i.length){const e=i[i.length-o-1]+n,r=`${s}…${e}`;this.getTextWidth(r)<=this.MAXWIDTH&&(n=e,o+=1,a=r,t=!0)}if(!t)break}this.renderedText=a,this.textOverflow=!0}handleClick(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("md-tooltip");null==e||e.dispatchEvent(new CustomEvent("tooltip-destroy",{bubbles:!0,composed:!0,detail:{placement:null==e?void 0:e.placement,reference:null==e?void 0:e.reference,popper:null==e?void 0:e.popper}})),this.dispatchEvent(new CustomEvent("chip-interaction",{composed:!0,bubbles:!0,detail:{id:this.id}}))}handleKeydown(t){switch(t.code){case o.Uz.Space:case o.Uz.Enter:this.handleSelect(),this.handleClick()}}static get styles(){return[n.A,h.A]}loadingTemplate(){return this.determinateProgress||this.indeterminateProgress?this.determinateProgress?a.html`
102
98
  <md-progress-bar
103
99
  class="md-chip--loading"
104
100
  type="determinate"
@@ -106,9 +102,9 @@
106
102
  displayFormat="none"
107
103
  >
108
104
  </md-progress-bar>
109
- `:l.html`
105
+ `:a.html`
110
106
  <md-progress-bar class="md-chip--loading" type="indeterminate" displayFormat="none"></md-progress-bar>
111
- `:l.nothing}iconTemplate(){const t=this.disabled?"":this.iconColor;return this.icon?l.html`
107
+ `:a.nothing}iconTemplate(){const t=this.disabled?"":this.iconColor;return this.icon?a.html`
112
108
  <md-icon
113
109
  class="md-chip--icon"
114
110
  part="chip-icon"
@@ -118,7 +114,7 @@
118
114
  size="${(0,p.ifDefined)(this.iconSize)}"
119
115
  >
120
116
  </md-icon>
121
- `:l.nothing}getToolTipContent(){return this.tooltipText&&this.textOverflow?this.value===this.tooltipText?this.tooltipText:`${this.value}, ${this.tooltipText}`:this.tooltipText?this.tooltipText:this.value}get textContentClassMap(){return{"md-chip--textcontent":!0,"md-chip--suppress-default-max-width":this.suppressDefaultMaxWidth}}get textContentTemplate(){return l.html`<span part="text-content" class=${(0,d.classMap)(this.textContentClassMap)}> ${this.renderedText}</span>`}render(){const t={"md-chip--small":this.small,"md-chip--disabled":this.disabled,[`md-chip--${this.color}`]:this.color,"suppress-max-width":this.suppressDefaultMaxWidth,"md-chip--interactive":!this.decorative},e=this.decorative?void 0:this.selected?"true":"false";return l.html`
117
+ `:a.nothing}getToolTipContent(){return this.tooltipText&&this.textOverflow?this.value===this.tooltipText?this.tooltipText:`${this.value}, ${this.tooltipText}`:this.tooltipText?this.tooltipText:this.value}get textContentClassMap(){return{"md-chip--textcontent":!0,"md-chip--suppress-default-max-width":this.suppressDefaultMaxWidth}}get textContentTemplate(){return a.html`<span part="text-content" class=${(0,d.classMap)(this.textContentClassMap)}> ${this.renderedText}</span>`}render(){const t={"md-chip--small":this.small,"md-chip--disabled":this.disabled,[`md-chip--${this.color}`]:this.color,"suppress-max-width":this.suppressDefaultMaxWidth,"md-chip--interactive":!this.decorative},e=this.decorative?void 0:this.selected?"true":"false";return a.html`
122
118
  ${this.getStyles()}
123
119
  <md-tooltip
124
120
  ?disabled=${!this.tooltipText&&!this.textOverflow}
@@ -137,8 +133,8 @@
137
133
  >
138
134
  ${this.loadingTemplate()} ${this.iconTemplate()}
139
135
  <slot name="custom-left-content" part="chip-left"> </slot>
140
- ${this.renderedText?this.textContentTemplate:l.nothing}
136
+ ${this.renderedText?this.textContentTemplate:a.nothing}
141
137
  <slot name="custom-right-content" part="chip-right"> </slot>
142
138
  </span>
143
139
  </md-tooltip>
144
- `}};c([(0,a.property)({type:String})],e.prototype,"color",void 0),c([(0,a.property)({type:String})],e.prototype,"bgColor",void 0),c([(0,a.property)({type:String})],e.prototype,"textColor",void 0),c([(0,a.property)({type:String})],e.prototype,"height",void 0),c([(0,a.property)({type:String})],e.prototype,"icon",void 0),c([(0,a.property)({type:String})],e.prototype,"iconColor",void 0),c([(0,a.property)({type:String})],e.prototype,"iconSize",void 0),c([(0,a.property)({type:String})],e.prototype,"role",void 0),c([(0,a.property)({type:String,reflect:!0})],e.prototype,"id",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"small",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"readonly",void 0),c([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,a.property)({type:Number})],e.prototype,"determinateProgress",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),c([(0,a.property)({type:String})],e.prototype,"tooltipText",void 0),c([(0,a.property)({type:String})],e.prototype,"tooltipPlacement",void 0),c([(0,a.property)({type:String})],e.prototype,"iconSet",void 0),c([(0,a.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"decorative",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),c([(0,a.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),c([(0,a.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),c([(0,a.state)()],e.prototype,"renderedText",void 0),e=c([(0,s.w)("md-chip")],e),t.ELEMENT=e}(o||(o={}))},2022(t){t.exports=s},554(t){t.exports=n},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=r},318(t){t.exports=o},5314(t){t.exports=l}},p={};function h(t){var e=p[t];if(void 0!==e)return e.exports;var i=p[t]={exports:{}};return d[t](i,i.exports,h),i.exports}h.m=d,a=[],h.O=(t,e,i,o)=>{if(!e){var r=1/0;for(d=0;d<a.length;d++){for(var[e,i,o]=a[d],s=!0,n=0;n<e.length;n++)(!1&o||r>=o)&&Object.keys(h.O).every(t=>h.O[t](e[n]))?e.splice(n--,1):(s=!1,o<r&&(r=o));if(s){a.splice(d--,1);var l=i();void 0!==l&&(t=l)}}return t}o=o||0;for(var d=a.length;d>0&&a[d-1][2]>o;d--)a[d]=a[d-1];a[d]=[e,i,o]},h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},h.d=(t,e)=>{for(var i in e)h.o(e,i)&&!h.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),h.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={8619:0,8894:0};h.O.j=e=>0===t[e];var e=(e,i)=>{var o,r,[s,n,l]=i,a=0;if(s.some(e=>0!==t[e])){for(o in n)h.o(n,o)&&(h.m[o]=n[o]);if(l)var d=l(h)}for(e&&e(i);a<s.length;a++)r=s[a],h.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return h.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var c=h.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5584,8227,2900,2050,6343,7582,9613,5323,6631,9558,2708,7137],()=>h(4882));return h.O(c)})());
140
+ `}};c([(0,l.property)({type:String})],e.prototype,"color",void 0),c([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),c([(0,l.property)({type:String})],e.prototype,"textColor",void 0),c([(0,l.property)({type:String})],e.prototype,"height",void 0),c([(0,l.property)({type:String})],e.prototype,"icon",void 0),c([(0,l.property)({type:String})],e.prototype,"iconColor",void 0),c([(0,l.property)({type:String})],e.prototype,"iconSize",void 0),c([(0,l.property)({type:String})],e.prototype,"role",void 0),c([(0,l.property)({type:String,reflect:!0})],e.prototype,"id",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"readonly",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,l.property)({type:Number})],e.prototype,"determinateProgress",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),c([(0,l.property)({type:String})],e.prototype,"tooltipText",void 0),c([(0,l.property)({type:String})],e.prototype,"tooltipPlacement",void 0),c([(0,l.property)({type:String})],e.prototype,"iconSet",void 0),c([(0,l.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"decorative",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),c([(0,l.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),c([(0,l.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),c([(0,l.state)()],e.prototype,"renderedText",void 0),e=c([(0,s.w)("md-chip")],e),t.ELEMENT=e}(r||(r={}))},2022(t){t.exports=s},554(t){t.exports=n},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=o},318(t){t.exports=r},5314(t){t.exports=a}},p={};function h(t){var e=p[t];if(void 0!==e)return e.exports;var i=p[t]={exports:{}};return d[t](i,i.exports,h),i.exports}h.m=d,l=[],h.O=(t,e,i,r)=>{if(!e){var o=1/0;for(d=0;d<l.length;d++){for(var[e,i,r]=l[d],s=!0,n=0;n<e.length;n++)(!1&r||o>=r)&&Object.keys(h.O).every(t=>h.O[t](e[n]))?e.splice(n--,1):(s=!1,r<o&&(o=r));if(s){l.splice(d--,1);var a=i();void 0!==a&&(t=a)}}return t}r=r||0;for(var d=l.length;d>0&&l[d-1][2]>r;d--)l[d]=l[d-1];l[d]=[e,i,r]},h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},h.d=(t,e)=>{for(var i in e)h.o(e,i)&&!h.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),h.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={8619:0,8894:0};h.O.j=e=>0===t[e];var e=(e,i)=>{var r,o,[s,n,a]=i,l=0;if(s.some(e=>0!==t[e])){for(r in n)h.o(n,r)&&(h.m[r]=n[r]);if(a)var d=a(h)}for(e&&e(i);l<s.length;l++)o=s[l],h.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return h.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var c=h.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5584,8227,2900,2050,6343,7582,9613,5323,6631,9558,2708,7137],()=>h(4882));return h.O(c)})());
@@ -113,7 +113,7 @@
113
113
  class="md-combobox-option"
114
114
  aria-posinset=${i}
115
115
  aria-setsize=${s}
116
- role=${this.isMulti?"checkbox":"listitem"}
116
+ role=${this.isMulti?"checkbox":"option"}
117
117
  aria-label="${this.isCustomContent?this.getOptionId(t):this.getOptionValue(t)}${o}"
118
118
  tabindex="-1"
119
119
  @click=${t=>this.handleListClick(t)}
@@ -198,7 +198,7 @@
198
198
  part="combobox-options"
199
199
  aria-label=${this.ariaLabel||this.label}
200
200
  style=${this.addStyle()}
201
- role=${(0,p.ifDefined)(this.checkForVirtualScroll()?void 0:"list")}
201
+ role=${(0,p.ifDefined)(this.checkForVirtualScroll()?void 0:"listbox")}
202
202
  >
203
203
  ${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():h.nothing}
204
204
  ${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:h.nothing:this.renderWithoutVirtualScroll()}
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,a,o,r,l,n)=>(()=>{"use strict";var d,p={9189(e,t,i){i.r(t),i.d(t,{Input:()=>S,ariaInvalidType:()=>C,containerSize:()=>v,iconNames:()=>$,iconPosition:()=>x,inputShape:()=>f,inputSize:()=>g,inputType:()=>b,nestedLevel:()=>w}),i(7906),i(1821),i(2369),i(9773);var s=i(2900),a=i(9609),o=i(3203),r=i(4084),l=i(2022),n=i(7161),d=i(429),p=i(5125),h=i(291),m=i(8175),u=i(318),c=i(9336),y=function(e,t,i,s){var a,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(o<3?a(r):o>3?a(t,i,r):a(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const v=["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"],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"],b=["text","number","password","email","tel","checkbox"],f=["none","pill"],$=l,x=["before","after"],w=[0,1,2,3],C=["grammar","false","spelling","true"];var S;!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((0,o.y)(n.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",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.ariaRole=void 0,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.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}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){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),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!==s.Uz.Space&&t!==s.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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,"md-new-momentum":this.newMomentum}}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--compact":this.compact,"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-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?n.html`
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,o,a,r,l,n)=>(()=>{"use strict";var d,p={9189(e,t,i){i.r(t),i.d(t,{Input:()=>S,ariaInvalidType:()=>C,containerSize:()=>v,iconNames:()=>$,iconPosition:()=>x,inputShape:()=>f,inputSize:()=>g,inputType:()=>b,nestedLevel:()=>w}),i(7906),i(1821),i(2369),i(9773);var s=i(2900),o=i(9609),a=i(3203),r=i(4084),l=i(2022),n=i(7161),d=i(429),p=i(5125),h=i(291),m=i(8175),u=i(318),c=i(9336),y=function(e,t,i,s){var o,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};const v=["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"],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"],b=["text","number","password","email","tel","checkbox"],f=["none","pill"],$=l,x=["before","after"],w=[0,1,2,3],C=["grammar","false","spelling","true"];var S;!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((0,a.y)(n.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",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.ariaRole=void 0,this.ariaAutocomplete=void 0,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.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}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){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),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!==s.Uz.Space&&t!==s.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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,"md-new-momentum":this.newMomentum}}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--compact":this.compact,"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-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:this.showDropdown?`${this.dropdownExpanded}`:void 0}get effectiveAriaAutocomplete(){return this.ariaAutocomplete||(this.showDropdown?"both":void 0)}get effectiveAriaRole(){return this.ariaRole||(this.showDropdown?"combobox":void 0)}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?n.html`
2
2
  <textarea
3
3
  part="input"
4
4
  class="md-input ${(0,p.classMap)(this.inputTemplateClassMap)}"
@@ -37,14 +37,15 @@
37
37
  type=${this.type}
38
38
  .value=${this.value}
39
39
  aria-describedby=${this.ariaDescribedBy}
40
- aria-controls=${this.ariaControls}
40
+ aria-controls=${(0,h.ifDefined)(this.ariaControls||void 0)}
41
+ aria-autocomplete=${(0,h.ifDefined)(this.effectiveAriaAutocomplete)}
41
42
  aria-expanded=${(0,h.ifDefined)(null!==(e=this.ariaExpandedValue)&&void 0!==e?e:void 0)}
42
43
  aria-label=${(0,h.ifDefined)(this.effectiveAriaLabel)}
43
44
  aria-invalid=${this.ariaInvalid}
44
45
  aria-errormessage=${`${this.htmlId}-message`}
45
46
  aria-disabled=${(0,h.ifDefined)(this.disabled||void 0)}
46
47
  id=${this.htmlId}
47
- role=${(0,h.ifDefined)(this.ariaRole)}
48
+ role=${(0,h.ifDefined)(this.effectiveAriaRole)}
48
49
  placeholder=${this.placeholder}
49
50
  ?readonly=${this.readOnly||this.disabled||this.disableUserTextInput}
50
51
  min=${(0,h.ifDefined)(this.min)}
@@ -154,4 +155,4 @@
154
155
  ${this.characterCountLabelTemplate()}
155
156
  </div>
156
157
  </div>
157
- `}};y([(0,d.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,d.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,d.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,d.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,d.property)({type:String})],i.prototype,"id",void 0),y([(0,d.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,d.property)({type:String})],i.prototype,"label",void 0),y([(0,d.property)({type:String})],i.prototype,"helpText",void 0),y([(0,d.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,d.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,d.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,d.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,d.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,d.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,d.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,d.property)({type:String})],i.prototype,"shape",void 0),y([(0,d.property)({type:String})],i.prototype,"type",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,d.property)({type:Object})],i.prototype,"control",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,d.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,d.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,d.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,d.query)(".md-input")],i.prototype,"input",void 0),y([(0,d.state)()],i.prototype,"isEditing",void 0),y([(0,d.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,d.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(S||(S={}))},2022(e){e.exports=o},554(e){e.exports=r},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=a},8175(e){e.exports=n},318(e){e.exports=s},5314(e){e.exports=l}},h={};function m(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return p[e](i,i.exports,m),i.exports}m.m=p,d=[],m.O=(e,t,i,s)=>{if(!t){var a=1/0;for(n=0;n<d.length;n++){for(var[t,i,s]=d[n],o=!0,r=0;r<t.length;r++)(!1&s||a>=s)&&Object.keys(m.O).every(e=>m.O[e](t[r]))?t.splice(r--,1):(o=!1,s<a&&(a=s));if(o){d.splice(n--,1);var l=i();void 0!==l&&(e=l)}}return e}s=s||0;for(var n=d.length;n>0&&d[n-1][2]>s;n--)d[n]=d[n-1];d[n]=[t,i,s]},m.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return m.d(t,{a:t}),t},m.d=(e,t)=>{for(var i in t)m.o(t,i)&&!m.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1266:0,9189:0};m.O.j=t=>0===e[t];var t=(t,i)=>{var s,a,[o,r,l]=i,n=0;if(o.some(t=>0!==e[t])){for(s in r)m.o(r,s)&&(m.m[s]=r[s]);if(l)var d=l(m)}for(t&&t(i);n<o.length;n++)a=o[n],m.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return m.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var u=m.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,8441,2797,9983,3970,7906,9336,2369],()=>m(9189));return m.O(u)})());
158
+ `}};y([(0,d.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,d.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,d.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,d.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,d.property)({type:String})],i.prototype,"id",void 0),y([(0,d.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,d.property)({type:String})],i.prototype,"label",void 0),y([(0,d.property)({type:String})],i.prototype,"helpText",void 0),y([(0,d.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaAutocomplete",void 0),y([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,d.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,d.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,d.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,d.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,d.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,d.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,d.property)({type:String})],i.prototype,"shape",void 0),y([(0,d.property)({type:String})],i.prototype,"type",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,d.property)({type:Object})],i.prototype,"control",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,d.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,d.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,d.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,d.query)(".md-input")],i.prototype,"input",void 0),y([(0,d.state)()],i.prototype,"isEditing",void 0),y([(0,d.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,d.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,o.w)("md-input")],i),e.ELEMENT=i}(S||(S={}))},2022(e){e.exports=a},554(e){e.exports=r},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=o},8175(e){e.exports=n},318(e){e.exports=s},5314(e){e.exports=l}},h={};function m(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return p[e](i,i.exports,m),i.exports}m.m=p,d=[],m.O=(e,t,i,s)=>{if(!t){var o=1/0;for(n=0;n<d.length;n++){for(var[t,i,s]=d[n],a=!0,r=0;r<t.length;r++)(!1&s||o>=s)&&Object.keys(m.O).every(e=>m.O[e](t[r]))?t.splice(r--,1):(a=!1,s<o&&(o=s));if(a){d.splice(n--,1);var l=i();void 0!==l&&(e=l)}}return e}s=s||0;for(var n=d.length;n>0&&d[n-1][2]>s;n--)d[n]=d[n-1];d[n]=[t,i,s]},m.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return m.d(t,{a:t}),t},m.d=(e,t)=>{for(var i in t)m.o(t,i)&&!m.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1266:0,9189:0};m.O.j=t=>0===e[t];var t=(t,i)=>{var s,o,[a,r,l]=i,n=0;if(a.some(t=>0!==e[t])){for(s in r)m.o(r,s)&&(m.m[s]=r[s]);if(l)var d=l(m)}for(t&&t(i);n<a.length;n++)o=a[n],m.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return m.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var u=m.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,8441,2797,9983,3970,7906,9336,2369],()=>m(9189));return m.O(u)})());
package/dist/esm/2273.js CHANGED
@@ -113,7 +113,7 @@ export const __webpack_esm_id__=2273;export const __webpack_esm_ids__=[2273,4654
113
113
  class="md-combobox-option"
114
114
  aria-posinset=${i}
115
115
  aria-setsize=${s}
116
- role=${this.isMulti?"checkbox":"listitem"}
116
+ role=${this.isMulti?"checkbox":"option"}
117
117
  aria-label="${this.isCustomContent?this.getOptionId(t):this.getOptionValue(t)}${o}"
118
118
  tabindex="-1"
119
119
  @click=${t=>this.handleListClick(t)}
@@ -198,7 +198,7 @@ export const __webpack_esm_id__=2273;export const __webpack_esm_ids__=[2273,4654
198
198
  part="combobox-options"
199
199
  aria-label=${this.ariaLabel||this.label}
200
200
  style=${this.addStyle()}
201
- role=${(0,u.ifDefined)(this.checkForVirtualScroll()?void 0:"list")}
201
+ role=${(0,u.ifDefined)(this.checkForVirtualScroll()?void 0:"listbox")}
202
202
  >
203
203
  ${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():a.nothing}
204
204
  ${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:a.nothing:this.renderWithoutVirtualScroll()}
package/dist/esm/4654.js CHANGED
@@ -113,7 +113,7 @@ export const __webpack_esm_id__=4654;export const __webpack_esm_ids__=[2273,4654
113
113
  class="md-combobox-option"
114
114
  aria-posinset=${i}
115
115
  aria-setsize=${s}
116
- role=${this.isMulti?"checkbox":"listitem"}
116
+ role=${this.isMulti?"checkbox":"option"}
117
117
  aria-label="${this.isCustomContent?this.getOptionId(t):this.getOptionValue(t)}${o}"
118
118
  tabindex="-1"
119
119
  @click=${t=>this.handleListClick(t)}
@@ -198,7 +198,7 @@ export const __webpack_esm_id__=4654;export const __webpack_esm_ids__=[2273,4654
198
198
  part="combobox-options"
199
199
  aria-label=${this.ariaLabel||this.label}
200
200
  style=${this.addStyle()}
201
- role=${(0,u.ifDefined)(this.checkForVirtualScroll()?void 0:"list")}
201
+ role=${(0,u.ifDefined)(this.checkForVirtualScroll()?void 0:"listbox")}
202
202
  >
203
203
  ${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():a.nothing}
204
204
  ${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:a.nothing:this.renderWithoutVirtualScroll()}
package/dist/esm/7137.js CHANGED
@@ -1 +1 @@
1
- export const __webpack_esm_id__=7137;export const __webpack_esm_ids__=[7137];export const __webpack_esm_modules__={7137(e,r,t){t.d(r,{A:()=>a});const a=t(2927).css`:host(md-card-alert){display:block}:host(md-card-alert) .md-card-alert{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-secondary-bg-color);border:1px solid var(--md-quaternary-bg-color);border-radius:.75rem;box-shadow:0 2px 8px rgba(0,0,0,.1);gap:.75rem;padding:.75rem;width:22.9375rem}:host(md-card-alert) .md-card-alert:focus{outline:0}:host(md-card-alert) .md-card-alert-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;flex-wrap:nowrap}:host(md-card-alert) .md-card-alert-chips{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.375rem}:host(md-card-alert) .md-card-alert-timestamp{color:var(--md-secondary-text-color);font-size:.875rem;font-weight:400;flex-shrink:0}:host(md-card-alert) .md-card-alert-live{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);font-size:.875rem;font-weight:400;gap:.25rem;flex-shrink:0}:host(md-card-alert) .md-card-alert-live-icon{color:var(--md-presence-active,#16a34a);animation:live-pulse 2s ease-in-out infinite}@keyframes live-pulse{0%,100%{opacity:1}50%{opacity:.3}}:host(md-card-alert) .md-card-alert-title-section{align-content:center;align-items:flex-start;display:flex;flex-flow:column nowrap;justify-content:flex-start;gap:.125rem}:host(md-card-alert) .md-card-alert-title{color:var(--md-primary-text-color);font-size:1rem;font-weight:700;margin:0;line-height:1.5rem}:host(md-card-alert) .md-card-alert-subtitle{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);font-size:.875rem;gap:.25rem;margin:0}:host(md-card-alert) .md-card-alert-subtitle-icon{flex-shrink:0;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-details{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-background-tertiary,#f3f4f6);border-radius:.5rem;gap:.1875rem;padding:.75rem}:host(md-card-alert) .md-card-alert-details-heading{color:var(--md-secondary-text-color);font-size:.875rem;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-row{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between}:host(md-card-alert) .md-card-alert-detail-label{color:var(--md-primary-text-color);font-size:.875rem;font-weight:700;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value{color:var(--md-primary-text-color);font-size:.875rem;text-align:right;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value--highlighted{color:var(--md-alert-error-text-color,#dc2626)}:host(md-card-alert) .md-card-alert-insight{align-content:center;align-items:flex-start;display:flex;flex-flow:row nowrap;justify-content:flex-start;background:var(--card-ai-blue-bg-color,#eff6ff);border-radius:.5rem;border:1px solid var(--badge-confidence-cobalt-border-color,#dbeafe);color:var(--md-primary-text-color);gap:.5rem;padding:.625rem .75rem}:host(md-card-alert) .md-card-alert-insight-icon{color:var(--badge-status-accent-text-color,#0284c7);flex-shrink:0;margin-top:.0625rem;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-insight-text{font-size:.875rem;line-height:1.25rem}:host(md-card-alert) .md-card-alert-actions{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.5rem}`}};
1
+ export const __webpack_esm_id__=7137;export const __webpack_esm_ids__=[7137];export const __webpack_esm_modules__={7137(e,t,r){r.d(t,{A:()=>a});const a=r(2927).css`:host(md-card-alert){display:block}:host(md-card-alert) .md-card-alert{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-secondary-bg-color);border:1px solid var(--md-quaternary-bg-color);border-radius:.75rem;box-sizing:border-box;box-shadow:0 2px 8px rgba(0,0,0,.1);gap:.75rem;padding:.75rem;width:22.9375rem}:host(md-card-alert) .md-card-alert--no-insight{height:329px;max-height:329px;min-height:329px}:host(md-card-alert) .md-card-alert:focus{outline:0}:host(md-card-alert) .md-card-alert-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;flex-wrap:nowrap}:host(md-card-alert) .md-card-alert-chips{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.375rem}:host(md-card-alert) .md-card-alert-timestamp{color:var(--md-secondary-text-color);font-size:.875rem;font-weight:400;flex-shrink:0}:host(md-card-alert) .md-card-alert-title-section{align-content:center;align-items:flex-start;display:flex;flex-flow:column nowrap;justify-content:flex-start;gap:.125rem;min-width:0;width:100%}:host(md-card-alert) .md-card-alert-title{-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;color:var(--md-primary-text-color);display:-webkit-box;font-size:1rem;font-weight:700;height:3rem;line-height:1.5rem;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:normal;width:100%}:host(md-card-alert) .md-card-alert-subtitle{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);font-size:.875rem;gap:.25rem;margin:0}:host(md-card-alert) .md-card-alert-subtitle-icon{flex-shrink:0;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-details{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-background-tertiary,#f3f4f6);border-radius:.5rem;gap:.1875rem;padding:.75rem}:host(md-card-alert) .md-card-alert-details-heading{color:var(--md-secondary-text-color);font-size:.875rem;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-row{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between}:host(md-card-alert) .md-card-alert-detail-label{color:var(--md-primary-text-color);font-size:.875rem;font-weight:700;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value{color:var(--md-primary-text-color);font-size:.875rem;text-align:right;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value--highlighted{color:var(--md-alert-error-text-color,#dc2626)}:host(md-card-alert) .md-card-alert-insight{align-content:center;align-items:flex-start;display:flex;flex-flow:row nowrap;justify-content:flex-start;background:var(--card-ai-blue-bg-color,#eff6ff);border-radius:.5rem;border:1px solid var(--badge-confidence-cobalt-border-color,#dbeafe);color:var(--md-primary-text-color);gap:.5rem;padding:.625rem .75rem}:host(md-card-alert) .md-card-alert-insight-icon{color:var(--badge-status-accent-text-color,#0284c7);flex-shrink:0;margin-top:.0625rem;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-insight-text{font-size:.875rem;line-height:1.25rem}:host(md-card-alert) .md-card-alert-actions{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.5rem}`}};
package/dist/esm/9189.js CHANGED
@@ -1,4 +1,4 @@
1
- export const __webpack_esm_id__=9189;export const __webpack_esm_ids__=[9189];export const __webpack_esm_modules__={9189(e,t,i){i(7906),i(1821),i(2369),i(9773);var s,a=i(2900),o=i(9609),n=i(3203),r=i(4084),l=(i(9500),i(2927)),p=i(8899),d=i(4955),h=i(3517),u=i(2577),c=i(1156),m=i(9336),y=function(e,t,i,s){var a,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};!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((0,n.y)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",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.ariaRole=void 0,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.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}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){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),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!==a.Uz.Space&&t!==a.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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,"md-new-momentum":this.newMomentum}}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--compact":this.compact,"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-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?l.html`
1
+ export const __webpack_esm_id__=9189;export const __webpack_esm_ids__=[9189];export const __webpack_esm_modules__={9189(e,t,i){i(7906),i(1821),i(2369),i(9773);var s,o=i(2900),a=i(9609),n=i(3203),r=i(4084),l=(i(9500),i(2927)),p=i(8899),d=i(4955),h=i(3517),u=i(2577),c=i(1156),m=i(9336),y=function(e,t,i,s){var o,a=arguments.length,n=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(n=(a<3?o(n):a>3?o(t,i,n):o(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};!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((0,n.y)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",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.ariaRole=void 0,this.ariaAutocomplete=void 0,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.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}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){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),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!==o.Uz.Space&&t!==o.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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,"md-new-momentum":this.newMomentum}}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--compact":this.compact,"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-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:this.showDropdown?`${this.dropdownExpanded}`:void 0}get effectiveAriaAutocomplete(){return this.ariaAutocomplete||(this.showDropdown?"both":void 0)}get effectiveAriaRole(){return this.ariaRole||(this.showDropdown?"combobox":void 0)}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?l.html`
2
2
  <textarea
3
3
  part="input"
4
4
  class="md-input ${(0,d.classMap)(this.inputTemplateClassMap)}"
@@ -37,14 +37,15 @@ export const __webpack_esm_id__=9189;export const __webpack_esm_ids__=[9189];exp
37
37
  type=${this.type}
38
38
  .value=${this.value}
39
39
  aria-describedby=${this.ariaDescribedBy}
40
- aria-controls=${this.ariaControls}
40
+ aria-controls=${(0,h.ifDefined)(this.ariaControls||void 0)}
41
+ aria-autocomplete=${(0,h.ifDefined)(this.effectiveAriaAutocomplete)}
41
42
  aria-expanded=${(0,h.ifDefined)(null!==(e=this.ariaExpandedValue)&&void 0!==e?e:void 0)}
42
43
  aria-label=${(0,h.ifDefined)(this.effectiveAriaLabel)}
43
44
  aria-invalid=${this.ariaInvalid}
44
45
  aria-errormessage=${`${this.htmlId}-message`}
45
46
  aria-disabled=${(0,h.ifDefined)(this.disabled||void 0)}
46
47
  id=${this.htmlId}
47
- role=${(0,h.ifDefined)(this.ariaRole)}
48
+ role=${(0,h.ifDefined)(this.effectiveAriaRole)}
48
49
  placeholder=${this.placeholder}
49
50
  ?readonly=${this.readOnly||this.disabled||this.disableUserTextInput}
50
51
  min=${(0,h.ifDefined)(this.min)}
@@ -154,4 +155,4 @@ export const __webpack_esm_id__=9189;export const __webpack_esm_ids__=[9189];exp
154
155
  ${this.characterCountLabelTemplate()}
155
156
  </div>
156
157
  </div>
157
- `}};y([(0,p.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,p.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,p.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,p.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,p.property)({type:String})],i.prototype,"id",void 0),y([(0,p.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,p.property)({type:String})],i.prototype,"label",void 0),y([(0,p.property)({type:String})],i.prototype,"helpText",void 0),y([(0,p.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,p.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,p.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,p.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,p.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,p.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,p.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,p.property)({type:String})],i.prototype,"shape",void 0),y([(0,p.property)({type:String})],i.prototype,"type",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,p.property)({type:Object})],i.prototype,"control",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,p.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,p.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,p.query)(".md-input")],i.prototype,"input",void 0),y([(0,p.state)()],i.prototype,"isEditing",void 0),y([(0,p.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,p.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,o.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}};
158
+ `}};y([(0,p.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,p.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,p.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,p.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,p.property)({type:String})],i.prototype,"id",void 0),y([(0,p.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,p.property)({type:String})],i.prototype,"label",void 0),y([(0,p.property)({type:String})],i.prototype,"helpText",void 0),y([(0,p.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,p.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaAutocomplete",void 0),y([(0,p.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,p.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,p.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,p.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,p.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,p.property)({type:String})],i.prototype,"shape",void 0),y([(0,p.property)({type:String})],i.prototype,"type",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,p.property)({type:Object})],i.prototype,"control",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,p.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,p.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,p.query)(".md-input")],i.prototype,"input",void 0),y([(0,p.state)()],i.prototype,"isEditing",void 0),y([(0,p.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,p.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}};