@momentum-ui/web-components 3.0.0-beta.3 → 3.0.0-beta.5

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.
Files changed (111) hide show
  1. package/dist/2547.js +1 -1
  2. package/dist/2669.js +1 -1
  3. package/dist/3192.js +4 -4
  4. package/dist/4659.js +1 -1
  5. package/dist/6283.js +1 -1
  6. package/dist/6408.js +4 -2
  7. package/dist/6798.js +3 -3
  8. package/dist/6865.js +1 -1
  9. package/dist/8493.js +1 -0
  10. package/dist/comp/md-accordion-item-entry.js +1 -1
  11. package/dist/comp/md-accordion-item.js +1 -1
  12. package/dist/comp/md-activity-button-entry.js +1 -1
  13. package/dist/comp/md-activity-button.js +1 -1
  14. package/dist/comp/md-alert-banner-entry.js +1 -1
  15. package/dist/comp/md-alert-banner.js +1 -1
  16. package/dist/comp/md-alert-entry.js +37 -37
  17. package/dist/comp/md-alert.js +1 -1
  18. package/dist/comp/md-audio-player-entry.js +1 -1
  19. package/dist/comp/md-audio-player.js +1 -1
  20. package/dist/comp/md-avatar-entry.js +1 -1
  21. package/dist/comp/md-avatar.js +1 -1
  22. package/dist/comp/md-button-entry.js +3 -3
  23. package/dist/comp/md-button.js +1 -1
  24. package/dist/comp/md-card-ai-entry.js +1 -1
  25. package/dist/comp/md-card-ai.js +1 -1
  26. package/dist/comp/md-card-entry.js +1 -1
  27. package/dist/comp/md-card-v2-entry.js +1 -1
  28. package/dist/comp/md-card-v2.js +1 -1
  29. package/dist/comp/md-card.js +1 -1
  30. package/dist/comp/md-chat-message-entry.js +1 -1
  31. package/dist/comp/md-chat-message.js +1 -1
  32. package/dist/comp/md-checkbox-entry.js +1 -1
  33. package/dist/comp/md-checkbox.js +1 -1
  34. package/dist/comp/md-coachmark-entry.js +1 -1
  35. package/dist/comp/md-coachmark-popover-entry.js +1 -1
  36. package/dist/comp/md-coachmark-popover.js +1 -1
  37. package/dist/comp/md-coachmark.js +1 -1
  38. package/dist/comp/md-combobox-entry.js +2 -2
  39. package/dist/comp/md-combobox.js +1 -1
  40. package/dist/comp/md-country-code-picker-entry.js +1 -1
  41. package/dist/comp/md-country-code-picker.js +1 -1
  42. package/dist/comp/md-date-range-picker-entry.js +1 -1
  43. package/dist/comp/md-date-range-picker.js +1 -1
  44. package/dist/comp/md-date-time-picker-entry.js +1 -1
  45. package/dist/comp/md-date-time-picker.js +1 -1
  46. package/dist/comp/md-datepicker-calendar-entry.js +1 -1
  47. package/dist/comp/md-datepicker-calendar.js +1 -1
  48. package/dist/comp/md-datepicker-day-entry.js +1 -1
  49. package/dist/comp/md-datepicker-day.js +1 -1
  50. package/dist/comp/md-datepicker-entry.js +1 -1
  51. package/dist/comp/md-datepicker-month-entry.js +1 -1
  52. package/dist/comp/md-datepicker-month.js +1 -1
  53. package/dist/comp/md-datepicker-week-entry.js +1 -1
  54. package/dist/comp/md-datepicker-week.js +1 -1
  55. package/dist/comp/md-datepicker.js +1 -1
  56. package/dist/comp/md-dropdown-entry.js +1 -1
  57. package/dist/comp/md-dropdown.js +1 -1
  58. package/dist/comp/md-editable-field-entry.js +1 -1
  59. package/dist/comp/md-editable-field.js +1 -1
  60. package/dist/comp/md-favorite-entry.js +1 -1
  61. package/dist/comp/md-favorite.js +1 -1
  62. package/dist/comp/md-floating-minimize-entry.js +6 -4
  63. package/dist/comp/md-floating-minimize.js +1 -1
  64. package/dist/comp/md-floating-modal-entry.js +12 -7
  65. package/dist/comp/md-floating-modal.js +1 -1
  66. package/dist/comp/md-grabber-entry.js +1 -1
  67. package/dist/comp/md-grabber.js +1 -1
  68. package/dist/comp/md-icon-entry.js +1 -1
  69. package/dist/comp/md-icon.js +1 -1
  70. package/dist/comp/md-inpu.js +1 -1
  71. package/dist/comp/md-input-entry.js +4 -2
  72. package/dist/comp/md-input-file.js +1 -1
  73. package/dist/comp/md-input.js +1 -1
  74. package/dist/comp/md-link-entry.js +36 -36
  75. package/dist/comp/md-meeting-alert-entry.js +1 -1
  76. package/dist/comp/md-meeting-alert.js +1 -1
  77. package/dist/comp/md-modal-entry.js +1 -1
  78. package/dist/comp/md-modal.js +1 -1
  79. package/dist/comp/md-pagination-entry.js +1 -1
  80. package/dist/comp/md-pagination.js +1 -1
  81. package/dist/comp/md-phone-input-entry.js +1 -1
  82. package/dist/comp/md-phone-input.js +1 -1
  83. package/dist/comp/md-popover-entry.js +1 -1
  84. package/dist/comp/md-popover.js +1 -1
  85. package/dist/comp/md-presence-entry.js +1 -1
  86. package/dist/comp/md-presence.js +1 -1
  87. package/dist/comp/md-table-advanced-entry.js +1 -1
  88. package/dist/comp/md-table-advanced.js +1 -1
  89. package/dist/comp/md-table-entry.js +1 -1
  90. package/dist/comp/md-table.js +1 -1
  91. package/dist/comp/md-tabs-entry.js +1 -1
  92. package/dist/comp/md-tabs.js +1 -1
  93. package/dist/comp/md-task-item-entry.js +1 -1
  94. package/dist/comp/md-task-item.js +1 -1
  95. package/dist/comp/md-timepicker-entry.js +1 -1
  96. package/dist/comp/md-timepicker.js +1 -1
  97. package/dist/comp/md-tooltip-entry.js +1 -1
  98. package/dist/index-entry.js +294 -236
  99. package/dist/index.js +1 -1
  100. package/dist/types/components/button/Button.d.ts +6 -1
  101. package/dist/types/components/dropdown/Dropdown.d.ts +14 -2
  102. package/dist/types/components/input/Input.d.ts +3 -1
  103. package/dist/types/components/link/Link.d.ts +7 -0
  104. package/dist/types/components/list-v2/list-item-v2.d.ts +67 -0
  105. package/dist/types/components/list-v2/list-v2.d.ts +56 -0
  106. package/dist/types/components/slider/Slider.d.ts +11 -0
  107. package/dist/types/components/tooltip/Tooltip.d.ts +3 -0
  108. package/dist/types/index.d.ts +2 -0
  109. package/dist/types/utils/keyboard.d.ts +1 -0
  110. package/package.json +2 -2
  111. package/dist/6633.js +0 -1
package/dist/2547.js CHANGED
@@ -21,7 +21,7 @@
21
21
  ${this.isCustomContent?this.getCustomContent(t):this.highlightingSearchedText(t)}
22
22
  </span>
23
23
  </div>
24
- `}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e,i,s,o;const l=this._focusedIndex;if(this.checkForVirtualScroll()){let l;l=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const n=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===l):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),n&&(null==n||n.toggleAttribute("focused",!0));const r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("lit-virtualizer");r&&(-1===t?null===(s=r.element(t))||void 0===s||s.scrollIntoView({block:"start"}):null===(o=r.element(t))||void 0===o||o.scrollIntoView({block:"center"}))}else if(this.lists){const e=this.lists[l];e&&e.toggleAttribute("focused",!1);const i=this.lists[t];i&&i.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",l)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}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}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),l=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==r?void 0:r.top)<s&&(i=r.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return x(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return x(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,b.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[h.A,g.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return a.html`
24
+ `}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e,i,s,o;const l=this._focusedIndex;if(this.checkForVirtualScroll()){let l;l=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const n=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===l):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),n&&(null==n||n.toggleAttribute("focused",!0));const r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("lit-virtualizer");r&&(-1===t?null===(s=r.element(t))||void 0===s||s.scrollIntoView({block:"start"}):null===(o=r.element(t))||void 0===o||o.scrollIntoView({block:"center"}))}else if(this.lists){const e=this.lists[l];e&&e.toggleAttribute("focused",!1);const i=this.lists[t];i&&i.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",l)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}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}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("options")&&this.expanded&&this.checkForVirtualScroll()&&this.updateOnNextFrame(()=>{this.resizeListbox()}),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),l=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==r?void 0:r.top)<s&&(i=r.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return x(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return x(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,b.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[h.A,g.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return a.html`
25
25
  <md-icon
26
26
  name=${t}
27
27
  class=${e}
package/dist/2669.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[2669],{2669:(t,e,o)=>{o.d(e,{A:()=>a});const a=o(87161).css`:host{box-sizing:border-box}:host(:focus){box-shadow:none!important;outline:0}:host(:focus) .md-tab-content{outline:2px solid var(--tabs-default-focus-border);outline-offset:-.125rem;box-shadow:var(--tabs-default-focus-shadow);border-radius:.25rem .25rem 0 0}:host(:focus) .md-tab-content.newMomentum{outline:0;box-shadow:var(--tabs-default-focus-shadow-inner),var(--tabs-default-focus-shadow-middle),var(--tabs-default-focus-shadow-outer)!important}:host(:focus) .md-tab-content.rounded{border-radius:.5rem}:host(:focus) .md-tab-content.pill{border-radius:1rem}:host::part(indicator){width:100%;height:2px;bottom:0;position:absolute;visibility:hidden}:host([selected]) .md-tab-content{border-radius:.25rem .25rem 0 0;color:var(--tabs-default-active);font-family:var(--brand-font-bold);font-weight:var(--brand-font-weight-bold)}:host([selected]) .md-tab-content:active{border-radius:.25rem .25rem 0 0}:host([selected]) .md-tab-content.pill{box-shadow:none;border-radius:1rem;background-color:var(--tabs-default-pressed)}:host([selected]) .md-tab-content.pill:active{border-radius:1rem}:host([selected]) .md-tab-content.rounded{box-shadow:inset 0 0 0 0 var(--tabs-default-active-border);border-radius:.5rem}:host([selected]) .md-tab-content.rounded:active{border-radius:.5rem}:host([selected]) .md-tab-content.primary{font-family:var(--brand-font-bold);font-weight:var(--brand-font-weight-bold);background-color:var(--tabs-primary-bg-color);color:var(--tabs-primary-text-color)}:host([selected]) .md-tab-content.primary:hover{background-color:var(--tabs-primary-hover-bg-color)}:host([selected]) .md-tab-content.primary:active{background-color:var(--tabs-primary-pressed-bg-color)}:host([selected]) .md-tab-content.primary.disabled,:host([selected]) .md-tab-content.primary:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([selected]) .md-tab-content.primary.line{background:rgba(0,0,0,0);color:var(--tabs-default-active)}:host([selected]) .md-tab-content.primary.line:hover{background-color:var(--tabs-default-hover);color:var(--tabs-default-active)}:host([selected]) .md-tab-content.primary.line:active{background-color:var(--tabs-default-pressed);color:var(--tabs-default-active);outline:0}:host([selected]) .md-tab-content.primary.line.disabled,:host([selected]) .md-tab-content.primary.line:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([selected]) .md-tab-content.pill.onlyIcon{border-radius:100%}:host([selected]) .md-tab-content.pill.onlyIcon:active{border-radius:100%}:host([selected][type=line][visible-tab])::part(indicator){visibility:visible!important;background-color:var(--tabs-default-active)}.test-compatibility-button{display:none}.md-tab-content.primary{color:var(--tabs-default-text-color);font-family:var(--brand-font-medium);font-weight:var(--brand-font-weight-medium)}.md-tab-content.primary.line{background:rgba(0,0,0,0)}.md-tab-content.primary.line:hover{background-color:var(--tabs-default-hover);color:var(--tabs-default-active)}.md-tab-content.primary.line:active{background-color:var(--tabs-default-pressed);color:var(--tabs-default-active);outline:0}.md-tab-content.primary.line.disabled,.md-tab-content.primary.line:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([vertical]) .md-tab-content{text-align:start!important;justify-content:flex-start}:host([vertical]) .md-tab-content .tab-slot{justify-content:flex-start}:host([vertical][type=line]) .md-tab-content{border-radius:0 .25rem .25rem 0}:host([selected][vertical])::part(indicator){visibility:hidden}:host([selected][vertical]) .md-tab-content{border-radius:0 .25rem .25rem 0;box-shadow:var(--tabs-default-active-vertical-border,inset 2px 0 0 0 var(--tabs-default-active-border))}:host([selected][vertical]) .md-tab-content:active{border-radius:0 .25rem .25rem 0}:host([selected][vertical]) .md-tab-content.rounded{box-shadow:inset 0 0 0 0 var(--tabs-default-active-border);border-radius:.5rem}:host([selected][vertical]) .md-tab-content.rounded:active{border-radius:.5rem}:host([selected][vertical]) .md-tab-content.pill{border-radius:1rem;box-shadow:none}:host([selected][vertical]) .md-tab-content.pill:active{border-radius:1rem}:host([selected][vertical]) .md-tab-content.pill.onlyIcon{border-radius:100%}:host([selected][vertical]) .md-tab-content.pill.onlyIcon:active{border-radius:100%}:host(:focus[selected]){background:rgba(0,0,0,0)}:host([viewporthidden]){display:none;height:auto!important;pointer-events:none;position:absolute;inset-inline-end:0;top:0;visibility:hidden;width:auto!important;z-index:-1}:host([measuringrealwidth]){width:auto!important}.tab-slot{display:inline-flex;justify-content:center;align-items:center;gap:.5rem;max-width:100%;height:100%}md-tooltip{display:inline-flex;align-items:center}::part(tooltip_reference){display:flex;align-items:center}slot .tab-content{align-items:center;display:flex}slot .tab-content img,slot .tab-content md-icon{margin-inline-end:.5rem}slot .tab-content img{height:1rem;width:1rem}.tab-action-button{display:inline-flex;align-items:center;justify-content:center;margin-inline-start:calc(.125rem*4);height:16px;width:16px}.tab-action-button:hover{cursor:pointer}.closable{display:flex;justify-content:space-between;align-items:center}md-icon:focus{border-radius:calc(.25rem/2);box-shadow:none;outline:0;box-shadow:0 0 0 .09375rem var(--md-focus-border-color)}.md-tab-content{font-family:var(--brand-font-medium);font-weight:var(--brand-font-weight-medium);background:rgba(0,0,0,0);border:none;border-radius:.25rem;color:var(--tabs-default-text-color);display:inline-flex;height:100%;min-height:2.8125rem;padding:.3rem .75rem;position:relative;text-align:center;text-decoration:none;white-space:nowrap;width:100%;justify-content:center;align-items:center;user-select:none}.md-tab-content.disabled,.md-tab-content:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important;cursor:not-allowed}@media screen and (forced-colors:active){.md-tab-content.disabled,.md-tab-content:disabled{filter:brightness(1) contrast(1) saturate(1.5)}}.md-tab-content.disabled:hover,.md-tab-content:disabled:hover{background:0 0}.md-tab-content.disabled:focus,.md-tab-content:disabled:focus{outline:0!important;border:none!important}.md-tab-content ::slotted(span){display:flex;align-items:center;justify-content:center;gap:.5rem}.md-tab-content span{display:flex;align-items:center;justify-content:center;gap:.5rem}.md-tab-content:hover{border-radius:.25rem .25rem 0 0;background-color:var(--tabs-default-hover)}.md-tab-content:active{background-color:var(--tabs-default-pressed);outline:0}.md-tab-content:focus{outline:0}.md-tab-content.rounded{border-radius:.5rem}.md-tab-content.pill{border-radius:1rem}.md-tab-content.pill.onlyIcon{border-radius:100%}.md-tab-content.newMomentum{cursor:pointer;transition:background-color .2s,color .2s,border-color .2s;min-height:1.75rem}@media(forced-colors:active){:host{background-color:Canvas;box-shadow:none}:host .md-tab-content{border:none}:host([selected]) .md-tab-content{border-radius:.25rem .25rem 0 0;color:HighlightText!important;background-color:Highlight!important;forced-color-adjust:none}:host([selected]) .md-tab-content:active{border-radius:.25rem}:host(:focus) .md-tab-content{outline:2px solid Highlight!important;outline-offset:-2px;box-shadow:none;border:none}:host(:focus[selected]){background:Canvas}.md-tab-content:hover{outline:1px solid Highlight;outline-offset:-1px}.md-tab-content:focus:not(.disabled){outline:1px solid Highlight;outline-offset:-1px}.md-tab-content.disabled{forced-color-adjust:none;background-color:none;color:GrayText}}:host{display:flex;flex-direction:column;font-size:var(--font-size-body-midsize,14px);height:100%;padding:0;position:relative}.visible-tabs-slot{display:block;height:0;visibility:hidden;width:0}.visible-tabs-container{display:flex;flex-direction:row;width:100%}.visible-new-tabs:not(.md-tab__justified){width:auto;gap:4px}.md-tab__list{display:inline-flex;height:3rem;min-height:3rem;padding-inline-start:.125rem;padding-top:.125rem;text-align:center;width:100%}.md-tab__list .md-menu-overlay__more{height:100%;margin-inline-start:auto;width:auto;max-width:128.5px}.md-tab__list .md-menu-overlay__more .md-menu-overlay__overflow-label{display:inline-block;max-width:80px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.md-tab__list .md-menu-overlay__more.md-menu-overlay__more--hidden{display:none;pointer-events:none;visibility:hidden;width:0!important;z-index:-1}.md-tab__list .md-menu-overlay__more_tab{min-height:2.8125rem}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--measuring{opacity:0}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--hidden:not(.md-menu-overlay__more_tab--measuring){pointer-events:none;visibility:hidden;z-index:-1}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--hidden:not(.md-menu-overlay__more_tab--measuring)::part(tab){padding:0;border:none}.md-tab__list .md-menu-overlay__more_list{display:flex;flex-direction:column;padding:8px;height:auto;max-width:100%;width:100%;overflow-x:hidden}.md-tab__list .md-menu-overlay__more_list md-tab::part(tab){text-align:start;padding-inline-start:16px;padding-inline-end:16px;box-shadow:none;justify-content:flex-start}.md-tab__list .md-menu-overlay__more_list md-tab[selected]::part(tab){background-color:var(--md-menu-active-background-color);color:var(--tabs-default-active)}.md-tab__list.tab-new-momentum .md-menu-overlay__more_tab[size="28"]{height:1.75rem;min-height:1.75rem}.md-tab__list.tab-new-momentum .md-menu-overlay__more_tab[size="32"]{height:2rem;min-height:2rem}.md-tab__list md-menu-overlay::part(overlay){top:-.8125rem}.tab-new-momentum{padding:0}.tab-new-momentum[size="28"]{height:1.75rem;min-height:1.75rem}.tab-new-momentum[size="32"]{height:2rem;min-height:2rem}.tab-new-momentum img,.tab-new-momentum md-icon{margin-inline-end:0!important}.md-tab__content{height:100%;overflow:hidden auto;padding:.125rem}md-menu-overlay md-tab md-tooltip{width:170px;position:relative;display:inline-flex;min-height:28px;align-items:center;overflow:hidden}md-menu-overlay md-tab md-tooltip .text-ellipsis{display:inline-block;vertical-align:middle;width:100%;max-width:100%;position:relative;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.md-tab__list ::slotted([slot=tab]){display:inline-block}.visible-tabs-container.md-tab__justified{display:flex;justify-content:space-between;padding-inline-end:.125rem}.visible-tabs-container.md-tab__justified md-tab{display:inline-block;width:100%}.visible-tabs-container.md-tab__justified.md-tab__hug md-tab{width:auto}.md-tab__list ::slotted([slot=tab][selected]),.md-tab__list md-tab[selected]{color:var(--tabs-default-active)}.md-tab__list ::slotted([slot=tab][disabled]),.md-tab__list md-tab[disabled]{color:var(--tabs-default-disabled)}.md-tab__list ::slotted([slot=tab]:focus),.md-tab__list md-tab:focus{box-shadow:none}.md-tab__content ::slotted([slot=panel]){display:none;visibility:hidden}.md-tab__content ::slotted([slot=panel][selected]){display:block;visibility:visible}.md-tab__content ::slotted([slot=panel][selected][focus-visible]:focus-visible){outline:2px solid var(--tabs-default-focus-border);outline-offset:calc(.125rem solid transparent*-2);outline-style:solid}.md-tab__content ::slotted([slot=panel][selected][focus-visible]:not(:focus-visible)){outline:0;outline-offset:none;outline-style:none}.md-tab__content{display:block;flex:1 1 auto}.no-tabs-visible{display:none!important}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper{display:flex;align-items:center;justify-content:space-between;width:100%;height:2.25rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .tabs-left-arrow{margin-inline-end:.75rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .tabs-right-arrow{margin-inline-start:.75rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list{overflow-x:auto;white-space:nowrap;scroll-behavior:smooth;position:relative;display:inline-flex;gap:.5rem;-webkit-overflow-scrolling:touch;scrollbar-width:none}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list[size="28"]{height:calc(2.25rem + 2px);padding:.3125rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list[size="32"]{height:calc(2.5rem + 2px);padding:.3125rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list::-webkit-scrollbar{display:none}:host([direction=vertical]){flex-direction:row}:host([direction=vertical]) .md-tab__list{border-right:1px solid var(--tabs-default-border-color);display:inline-flex;flex-direction:column;justify-content:flex-start;height:100%;gap:.25rem;width:auto}:host([direction=vertical]) .md-tab__list ::slotted([slot=tab]){border-left:.125rem solid transparent;display:block;text-align:left}:host([direction=vertical]) .md-tab__list ::slotted([slot=tab])[selected]{color:var(--tabs-default-active)}:host([direction=vertical]) .md-tab__list.tab-new-momentum{padding:0}:host([direction=vertical]) .md-tab__list.tab-new-momentum[size="28"] ::slotted([slot=tab]){height:1.75rem;min-height:1.75rem}:host([direction=vertical]) .md-tab__list.tab-new-momentum[size="32"] ::slotted([slot=tab]){height:2rem;min-height:2rem}:host([direction=vertical]) .md-tab__content ::slotted([slot=panel]){padding-inline-start:.625rem}@media(forced-colors:active){:host{--tabs-default-border-color:ButtonFace}}`}}]);
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[2669],{2669:(t,e,o)=>{o.d(e,{A:()=>a});const a=o(87161).css`:host{box-sizing:border-box}:host(:focus){box-shadow:none!important;outline:0}:host(:focus) .md-tab-content{outline:2px solid var(--tabs-default-focus-border);outline-offset:-.125rem;box-shadow:var(--tabs-default-focus-shadow);border-radius:.25rem .25rem 0 0}:host(:focus) .md-tab-content.newMomentum{outline:0;box-shadow:var(--tabs-default-focus-shadow-inner),var(--tabs-default-focus-shadow-middle),var(--tabs-default-focus-shadow-outer)!important}:host(:focus) .md-tab-content.rounded{border-radius:.5rem}:host(:focus) .md-tab-content.pill{border-radius:1rem}:host::part(indicator){width:100%;height:2px;bottom:0;position:absolute;visibility:hidden}:host([selected]) .md-tab-content{border-radius:.25rem .25rem 0 0;color:var(--tabs-default-active);font-family:var(--brand-font-bold);font-weight:var(--brand-font-weight-bold)}:host([selected]) .md-tab-content:active{border-radius:.25rem .25rem 0 0}:host([selected]) .md-tab-content.pill{box-shadow:none;border-radius:1rem;background-color:var(--tabs-default-pressed)}:host([selected]) .md-tab-content.pill:active{border-radius:1rem}:host([selected]) .md-tab-content.rounded{box-shadow:inset 0 0 0 0 var(--tabs-default-active-border);border-radius:.5rem}:host([selected]) .md-tab-content.rounded:active{border-radius:.5rem}:host([selected]) .md-tab-content.primary{font-family:var(--brand-font-bold);font-weight:var(--brand-font-weight-bold);background-color:var(--tabs-primary-bg-color);color:var(--tabs-primary-text-color)}:host([selected]) .md-tab-content.primary:hover{background-color:var(--tabs-primary-hover-bg-color)}:host([selected]) .md-tab-content.primary:active{background-color:var(--tabs-primary-pressed-bg-color)}:host([selected]) .md-tab-content.primary.disabled,:host([selected]) .md-tab-content.primary:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([selected]) .md-tab-content.primary.line{background:rgba(0,0,0,0);color:var(--tabs-default-active)}:host([selected]) .md-tab-content.primary.line:hover{background-color:var(--tabs-default-hover);color:var(--tabs-default-active)}:host([selected]) .md-tab-content.primary.line:active{background-color:var(--tabs-default-pressed);color:var(--tabs-default-active);outline:0}:host([selected]) .md-tab-content.primary.line.disabled,:host([selected]) .md-tab-content.primary.line:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([selected]) .md-tab-content.pill.onlyIcon{border-radius:100%}:host([selected]) .md-tab-content.pill.onlyIcon:active{border-radius:100%}:host([selected][type=line][visible-tab])::part(indicator){visibility:visible!important;background-color:var(--tabs-default-active)}.test-compatibility-button{display:none}.md-tab-content.primary{color:var(--tabs-default-text-color);font-family:var(--brand-font-medium);font-weight:var(--brand-font-weight-medium)}.md-tab-content.primary.line{background:rgba(0,0,0,0)}.md-tab-content.primary.line:hover{background-color:var(--tabs-default-hover);color:var(--tabs-default-active)}.md-tab-content.primary.line:active{background-color:var(--tabs-default-pressed);color:var(--tabs-default-active);outline:0}.md-tab-content.primary.line.disabled,.md-tab-content.primary.line:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important}:host([vertical]) .md-tab-content{text-align:start!important;justify-content:flex-start}:host([vertical]) .md-tab-content .tab-slot{justify-content:flex-start}:host([vertical][type=line]) .md-tab-content{border-radius:0 .25rem .25rem 0}:host([selected][vertical])::part(indicator){visibility:hidden}:host([selected][vertical]) .md-tab-content{border-radius:0 .25rem .25rem 0;box-shadow:var(--tabs-default-active-vertical-border,inset 2px 0 0 0 var(--tabs-default-active-border))}:host([selected][vertical]) .md-tab-content:active{border-radius:0 .25rem .25rem 0}:host([selected][vertical]) .md-tab-content.rounded{box-shadow:inset 0 0 0 0 var(--tabs-default-active-border);border-radius:.5rem}:host([selected][vertical]) .md-tab-content.rounded:active{border-radius:.5rem}:host([selected][vertical]) .md-tab-content.pill{border-radius:1rem;box-shadow:none}:host([selected][vertical]) .md-tab-content.pill:active{border-radius:1rem}:host([selected][vertical]) .md-tab-content.pill.onlyIcon{border-radius:100%}:host([selected][vertical]) .md-tab-content.pill.onlyIcon:active{border-radius:100%}:host(:focus[selected]){background:rgba(0,0,0,0)}:host([viewporthidden]){display:none;height:auto!important;pointer-events:none;position:absolute;inset-inline-end:0;top:0;visibility:hidden;width:auto!important;z-index:-1}:host([measuringrealwidth]){width:auto!important}.tab-slot{display:inline-flex;justify-content:center;align-items:center;gap:.5rem;max-width:100%;height:100%}md-tooltip{display:inline-flex;align-items:center}::part(tooltip_reference){display:flex;align-items:center}slot .tab-content{align-items:center;display:flex}slot .tab-content img,slot .tab-content md-icon{margin-inline-end:.5rem}slot .tab-content img{height:1rem;width:1rem}.tab-action-button{display:inline-flex;align-items:center;justify-content:center;margin-inline-start:calc(.125rem*4);height:16px;width:16px}.tab-action-button:hover{cursor:pointer}.closable{display:flex;justify-content:space-between;align-items:center}md-icon:focus{border-radius:calc(.25rem/2);box-shadow:none;outline:0;box-shadow:0 0 0 .09375rem var(--md-focus-border-color)}.md-tab-content{font-family:var(--brand-font-medium);font-weight:var(--brand-font-weight-medium);background:rgba(0,0,0,0);border:none;border-radius:.25rem;color:var(--tabs-default-text-color);display:inline-flex;height:100%;min-height:2.8125rem;padding:.3rem .75rem;position:relative;text-align:center;text-decoration:none;white-space:nowrap;width:100%;justify-content:center;align-items:center;user-select:none}.md-tab-content.disabled,.md-tab-content:disabled{background:rgba(0,0,0,0);color:var(--tabs-default-disabled)!important;cursor:not-allowed}@media screen and (forced-colors:active){.md-tab-content.disabled,.md-tab-content:disabled{filter:brightness(1) contrast(1) saturate(1.5)}}.md-tab-content.disabled:hover,.md-tab-content:disabled:hover{background:0 0}.md-tab-content.disabled:focus,.md-tab-content:disabled:focus{outline:0!important;border:none!important}.md-tab-content ::slotted(span){display:flex;align-items:center;justify-content:center;gap:.5rem}.md-tab-content span{display:flex;align-items:center;justify-content:center;gap:.5rem}.md-tab-content:hover{border-radius:.25rem .25rem 0 0;background-color:var(--tabs-default-hover)}.md-tab-content:active{background-color:var(--tabs-default-pressed);outline:0}.md-tab-content:focus{outline:0}.md-tab-content.rounded{border-radius:.5rem}.md-tab-content.pill{border-radius:1rem}.md-tab-content.pill.onlyIcon{border-radius:100%}.md-tab-content.newMomentum{cursor:pointer;transition:background-color .2s,color .2s,border-color .2s;min-height:1.75rem}@media(forced-colors:active){:host{background-color:Canvas;box-shadow:none}:host .md-tab-content{border:none}:host([selected]) .md-tab-content{border-radius:.25rem .25rem 0 0;color:HighlightText!important;background-color:Highlight!important;forced-color-adjust:none}:host([selected]) .md-tab-content:active{border-radius:.25rem}:host(:focus) .md-tab-content{outline:2px solid Highlight!important;outline-offset:-2px;box-shadow:none;border:none}:host(:focus[selected]){background:Canvas}.md-tab-content:hover{outline:1px solid Highlight;outline-offset:-1px}.md-tab-content:focus:not(.disabled){outline:1px solid Highlight;outline-offset:-1px}.md-tab-content.disabled{forced-color-adjust:none;background-color:none;color:GrayText}}:host{display:flex;flex-direction:column;font-size:var(--font-size-body-midsize,14px);height:100%;padding:0;position:relative}.visible-tabs-slot{display:block;height:0;visibility:hidden;width:0}.visible-tabs-container{display:flex;flex-direction:row;width:100%}.visible-new-tabs:not(.md-tab__justified){width:auto;gap:4px}.md-tab__list{display:inline-flex;height:3rem;min-height:3rem;padding-inline-start:.125rem;padding-top:.125rem;text-align:center;width:100%}.md-tab__list .md-menu-overlay__more{height:100%;margin-inline-start:auto;width:auto;max-width:128.5px}.md-tab__list .md-menu-overlay__more .md-menu-overlay__overflow-label{display:inline-block;max-width:80px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.md-tab__list .md-menu-overlay__more.md-menu-overlay__more--hidden{display:none;pointer-events:none;visibility:hidden;width:0!important;z-index:-1}.md-tab__list .md-menu-overlay__more_tab{min-height:2.8125rem}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--measuring{opacity:0}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--hidden:not(.md-menu-overlay__more_tab--measuring){pointer-events:none;visibility:hidden;z-index:-1}.md-tab__list .md-menu-overlay__more_tab.md-menu-overlay__more_tab--hidden:not(.md-menu-overlay__more_tab--measuring)::part(tab){padding:0;border:none}.md-tab__list .md-menu-overlay__more_list{display:flex;flex-direction:column;padding:8px;height:auto;max-width:100%;width:100%;overflow-x:hidden}.md-tab__list .md-menu-overlay__more_list md-tab span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:inline-block}.md-tab__list .md-menu-overlay__more_list md-tab::part(tab){text-align:start;padding-inline-start:16px;padding-inline-end:16px;box-shadow:none;justify-content:flex-start}.md-tab__list .md-menu-overlay__more_list md-tab[selected]::part(tab){background-color:var(--md-menu-active-background-color);color:var(--tabs-default-active)}.md-tab__list.tab-new-momentum .md-menu-overlay__more_tab[size="28"]{height:1.75rem;min-height:1.75rem}.md-tab__list.tab-new-momentum .md-menu-overlay__more_tab[size="32"]{height:2rem;min-height:2rem}.md-tab__list md-menu-overlay::part(overlay){top:-.8125rem}.tab-new-momentum{padding:0}.tab-new-momentum[size="28"]{height:1.75rem;min-height:1.75rem}.tab-new-momentum[size="32"]{height:2rem;min-height:2rem}.tab-new-momentum img,.tab-new-momentum md-icon{margin-inline-end:0!important}.md-tab__content{height:100%;overflow:hidden auto;padding:.125rem}md-menu-overlay md-tab md-tooltip{width:170px;position:relative;display:inline-flex;min-height:28px;align-items:center;overflow:hidden}md-menu-overlay md-tab md-tooltip .text-ellipsis{display:inline-block;vertical-align:middle;width:100%;max-width:100%;position:relative;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.md-tab__list ::slotted([slot=tab]){display:inline-block}.visible-tabs-container.md-tab__justified{display:flex;justify-content:space-between;padding-inline-end:.125rem}.visible-tabs-container.md-tab__justified md-tab{display:inline-block;width:100%}.visible-tabs-container.md-tab__justified.md-tab__hug md-tab{width:auto}.md-tab__list ::slotted([slot=tab][selected]),.md-tab__list md-tab[selected]{color:var(--tabs-default-active)}.md-tab__list ::slotted([slot=tab][disabled]),.md-tab__list md-tab[disabled]{color:var(--tabs-default-disabled)}.md-tab__list ::slotted([slot=tab]:focus),.md-tab__list md-tab:focus{box-shadow:none}.md-tab__content ::slotted([slot=panel]){display:none;visibility:hidden}.md-tab__content ::slotted([slot=panel][selected]){display:block;visibility:visible}.md-tab__content ::slotted([slot=panel][selected][focus-visible]:focus-visible){outline:2px solid var(--tabs-default-focus-border);outline-offset:calc(.125rem solid transparent*-2);outline-style:solid}.md-tab__content ::slotted([slot=panel][selected][focus-visible]:not(:focus-visible)){outline:0;outline-offset:none;outline-style:none}.md-tab__content{display:block;flex:1 1 auto}.no-tabs-visible{display:none!important}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper{display:flex;align-items:center;justify-content:space-between;width:100%;height:2.25rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .tabs-left-arrow{margin-inline-end:.75rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .tabs-right-arrow{margin-inline-start:.75rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list{overflow-x:auto;white-space:nowrap;scroll-behavior:smooth;position:relative;display:inline-flex;gap:.5rem;-webkit-overflow-scrolling:touch;scrollbar-width:none}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list[size="28"]{height:calc(2.25rem + 2px);padding:.3125rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list[size="32"]{height:calc(2.5rem + 2px);padding:.3125rem}:host([direction=horizontal][scroll-arrow]) .md-tabs-wrapper .md-tab__list::-webkit-scrollbar{display:none}:host([direction=vertical]){flex-direction:row}:host([direction=vertical]) .md-tab__list{border-right:1px solid var(--tabs-default-border-color);display:inline-flex;flex-direction:column;justify-content:flex-start;height:100%;gap:.25rem;width:auto}:host([direction=vertical]) .md-tab__list ::slotted([slot=tab]){border-left:.125rem solid transparent;display:block;text-align:left}:host([direction=vertical]) .md-tab__list ::slotted([slot=tab])[selected]{color:var(--tabs-default-active)}:host([direction=vertical]) .md-tab__list.tab-new-momentum{padding:0}:host([direction=vertical]) .md-tab__list.tab-new-momentum[size="28"] ::slotted([slot=tab]){height:1.75rem;min-height:1.75rem}:host([direction=vertical]) .md-tab__list.tab-new-momentum[size="32"] ::slotted([slot=tab]){height:2rem;min-height:2rem}:host([direction=vertical]) .md-tab__content ::slotted([slot=panel]){padding-inline-start:.625rem}@media(forced-colors:active){:host{--tabs-default-border-color:ButtonFace}}`}}]);
package/dist/3192.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[3192],{83192:(e,t,o)=>{var s,n=o(90195),i=o(3001),l=o(31890),p=o(66677),r=o(4313),d=o(87161),a=o(70429),c=o(85125),h=o(62848),u=function(e,t,o,s){var n,i=arguments.length,l=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,s);else for(var p=e.length-1;p>=0;p--)(n=e[p])&&(l=(i<3?n(l):i>3?n(t,o,l):n(t,o))||l);return i>3&&l&&Object.defineProperty(t,o,l),l};!function(e){let t=class extends((0,i.UM)((0,i.yC)(d.LitElement))){constructor(){super(...arguments),this.message="",this.placement="auto",this.disabled=!1,this.opened=!1,this.slotToTooltip=!1,this.slotContent=null,this._keyDownListener=e=>{this.handleKeyDown(e)},this._wheelListener=e=>{this.opened&&this.notifyTooltipDestroy()}}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this._keyDownListener),window.addEventListener("wheel",this._wheelListener,{passive:!0})}disconnectedCallback(){this.notifyTooltipDisconnected(),super.disconnectedCallback(),document.removeEventListener("keydown",this._keyDownListener),window.removeEventListener("wheel",this._wheelListener)}handleResize(e){var t;null===(t=super.handleResize)||void 0===t||t.call(this,e),(0,p.sg)(()=>{this.slotToTooltip&&(this.disabled=this.reference&&!this.isContentTruncated(this.reference))},100)()}handleFocusIn(e){super.handleFocusIn&&super.handleFocusIn(e),this.notifyTooltipCreate()}handleFocusOut(e){super.handleFocusOut&&super.handleFocusOut(e),this.notifyTooltipDestroy()}openTooltip(){this.dispatchEvent(new CustomEvent("tooltip-create",{bubbles:!0,composed:!0,detail:Object.assign({placement:this.placement,reference:this.reference,popper:this.popper},!this.message&&{slotContent:this.slotContent})}))}notifyTooltipDisconnected(){document.dispatchEvent(new CustomEvent("tooltip-disconnected",{bubbles:!0,composed:!0,detail:{}}))}closeTooltip(){this.dispatchEvent(new CustomEvent("tooltip-destroy",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeMessage(){this.dispatchEvent(new CustomEvent("tooltip-message",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeSlotContent(e){this.dispatchEvent(new CustomEvent("tooltip-slot",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper,slotContent:e}}))}notifyTooltipCreate(){this.disabled||(this.opened=!0)}notifyTooltipDestroy(){this.disabled||(this.opened=!1)}handleKeyDown(e){e.code===n.Uz.Escape&&this.notifyTooltipDestroy()}handleSlotContentChange(e){const t=e.target;if(t){const e=t.assignedElements({flatten:!0});e.length&&(this.slotContent&&this.changeSlotContent(e),this.slotContent=e)}}updated(e){super.updated(e),e.has("opened")&&(this.opened?this.openTooltip():this.closeTooltip()),e.has("message")&&this.changeMessage(),e.has("disabled")&&this.opened&&(this.opened=!1)}handleSlotChanged(e){const t=e.target;if(this.slotToTooltip&&t){const e=t.assignedNodes({flatten:!0}).map(e=>e.textContent).join(" ").trim();this.message=e,this.disabled=this.reference&&!this.isContentTruncated(this.reference)}}isContentTruncated(e){return e.scrollWidth>e.clientWidth}get tooltipClassMap(){return{"md-tooltip--disabled":this.disabled}}render(){return d.html`
2
- <div class="md-tooltip ${(0,c.classMap)(this.tooltipClassMap)}">
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[3192],{83192:(e,t,o)=>{var s,n=o(90195),i=o(3001),l=o(31890),p=o(66677),r=o(4313),a=o(87161),d=o(70429),h=o(85125),c=o(62848),u=function(e,t,o,s){var n,i=arguments.length,l=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,s);else for(var p=e.length-1;p>=0;p--)(n=e[p])&&(l=(i<3?n(l):i>3?n(t,o,l):n(t,o))||l);return i>3&&l&&Object.defineProperty(t,o,l),l};!function(e){let t=class extends((0,i.UM)((0,i.yC)(a.LitElement))){constructor(){super(...arguments),this.message="",this.placement="auto",this.disabled=!1,this.opened=!1,this.slotToTooltip=!1,this.slotContent=null,this._keyDownListener=e=>{this.handleKeyDown(e)},this._wheelListener=e=>{this.opened&&this.notifyTooltipDestroy()}}hasMessage(){return this.message&&this.message.trim().length>0}hasSlotContent(){return this.slotContent&&this.slotContent.length>0}get hasTooltipContent(){return this.hasMessage()||this.hasSlotContent()}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this._keyDownListener),window.addEventListener("wheel",this._wheelListener,{passive:!0})}disconnectedCallback(){this.notifyTooltipDisconnected(),super.disconnectedCallback(),document.removeEventListener("keydown",this._keyDownListener),window.removeEventListener("wheel",this._wheelListener)}handleResize(e){var t;null===(t=super.handleResize)||void 0===t||t.call(this,e),(0,p.sg)(()=>{this.slotToTooltip&&(this.disabled=this.reference&&!this.isContentTruncated(this.reference))},100)()}handleFocusIn(e){super.handleFocusIn&&super.handleFocusIn(e),this.notifyTooltipCreate()}handleFocusOut(e){super.handleFocusOut&&super.handleFocusOut(e),this.notifyTooltipDestroy()}openTooltip(){this.dispatchEvent(new CustomEvent("tooltip-create",{bubbles:!0,composed:!0,detail:Object.assign({placement:this.placement,reference:this.reference,popper:this.popper},!this.message&&{slotContent:this.slotContent})}))}notifyTooltipDisconnected(){document.dispatchEvent(new CustomEvent("tooltip-disconnected",{bubbles:!0,composed:!0,detail:{}}))}closeTooltip(){this.dispatchEvent(new CustomEvent("tooltip-destroy",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeMessage(){this.dispatchEvent(new CustomEvent("tooltip-message",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeSlotContent(e){this.dispatchEvent(new CustomEvent("tooltip-slot",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper,slotContent:e}}))}notifyTooltipCreate(){!this.disabled&&this.hasTooltipContent&&(this.opened=!0)}notifyTooltipDestroy(){this.disabled||(this.opened=!1)}handleKeyDown(e){e.code===n.Uz.Escape&&this.notifyTooltipDestroy()}handleSlotContentChange(e){const t=e.target;if(t){const e=t.assignedElements({flatten:!0});e.length&&(this.slotContent&&this.changeSlotContent(e),this.slotContent=e)}}updated(e){super.updated(e),e.has("opened")&&(this.opened?this.openTooltip():this.closeTooltip()),e.has("message")&&this.changeMessage(),e.has("disabled")&&this.opened&&(this.opened=!1)}handleSlotChanged(e){const t=e.target;if(this.slotToTooltip&&t){const e=t.assignedNodes({flatten:!0}).map(e=>e.textContent).join(" ").trim();this.message=e,this.disabled=this.reference&&!this.isContentTruncated(this.reference)}}isContentTruncated(e){return e.scrollWidth>e.clientWidth}get tooltipClassMap(){return{"md-tooltip--disabled":this.disabled}}render(){return a.html`
2
+ <div class="md-tooltip ${(0,h.classMap)(this.tooltipClassMap)}">
3
3
  <div class="md-tooltip__popper" role="tooltip" part="tooltip-popper">
4
4
  <div id="md-tooltip__content" class="md-tooltip__content" part="tooltip-content">
5
- ${this.message||d.html` <slot name="tooltip-content" @slotchange=${this.handleSlotContentChange}></slot> `}
5
+ ${this.message||a.html` <slot name="tooltip-content" @slotchange=${this.handleSlotContentChange}></slot> `}
6
6
  </div>
7
7
  <div id="arrow" class="md-tooltip__arrow" data-popper-arrow></div>
8
8
  </div>
@@ -19,4 +19,4 @@
19
19
  <slot @slotchange=${this.handleSlotChanged}></slot>
20
20
  </div>
21
21
  </div>
22
- `}static get styles(){return[r.A,h.A]}};u([(0,a.property)({type:String})],t.prototype,"message",void 0),u([(0,a.property)({type:String,reflect:!0})],t.prototype,"placement",void 0),u([(0,a.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",void 0),u([(0,a.property)({type:Boolean,reflect:!0})],t.prototype,"opened",void 0),u([(0,a.property)({type:Boolean,reflect:!0,attribute:"slot-to-tooltip"})],t.prototype,"slotToTooltip",void 0),u([(0,a.query)(".md-tooltip__popper")],t.prototype,"popper",void 0),u([(0,a.query)(".md-tooltip__reference")],t.prototype,"reference",void 0),t=u([(0,l.w)("md-tooltip")],t),e.ELEMENT=t}(s||(s={}))}}]);
22
+ `}static get styles(){return[r.A,c.A]}};u([(0,d.property)({type:String})],t.prototype,"message",void 0),u([(0,d.property)({type:String,reflect:!0})],t.prototype,"placement",void 0),u([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",void 0),u([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"opened",void 0),u([(0,d.property)({type:Boolean,reflect:!0,attribute:"slot-to-tooltip"})],t.prototype,"slotToTooltip",void 0),u([(0,d.query)(".md-tooltip__popper")],t.prototype,"popper",void 0),u([(0,d.query)(".md-tooltip__reference")],t.prototype,"reference",void 0),t=u([(0,l.w)("md-tooltip")],t),e.ELEMENT=t}(s||(s={}))}}]);
package/dist/4659.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[4659],{34659:(o,i,e)=>{e.d(i,{A:()=>t});const t=e(87161).css`.md-floating{background-color:var(--floating-modal-main-bg-color,#fff);border:1px solid var(--floating-modal-outer-border-color,#ededed);border-radius:8px;box-shadow:var(--floating-modal-main-box-shadow,0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16));display:flex;flex-direction:column;max-height:100%;max-width:100%;position:absolute;touch-action:none;user-select:none;z-index:1040}.md-floating.fixed{position:fixed}.md-floating.hide{display:block;height:0;visibility:hidden;width:0}.md-floating.md-floating-minimize{background:var(--floating-modal-main-bg-color-alternate,#545454);border-radius:8px;width:100%}.md-floating.md-floating-minimize:focus{box-shadow:0 0 0 .125rem #005e7d;outline:0}.md-floating .md-floating__header{align-items:center;border-bottom:1px solid var(--floating-modal-main-border-color,#dedede);color:var(--floating-modal-main-text-color,#121212);display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;max-height:3rem;padding:.5rem .5rem .5rem .75rem;width:100%}.md-floating .md-floating__header-text{flex:2 1 auto;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:16px;line-height:16px;text-align:left}.md-floating .md-floating__body{height:calc(100% - 3rem);overflow:auto;padding:.75rem 1.25rem}.md-floating .md-floating-body-minimize{display:block;height:0;visibility:hidden}.md-floating .md-floating__header-minimize{border-bottom:0;color:var(--floating-modal-main-text-color-alternate,#f7f7f7);font-size:16px;line-height:24px;width:100%}.md-floating-min-parent{bottom:0;height:3rem;position:absolute;right:0;width:223px}`}}]);
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[4659],{34659:(o,i,e)=>{e.d(i,{A:()=>t});const t=e(87161).css`.md-floating{background-color:var(--floating-modal-main-bg-color);border:1px solid var(--floating-modal-outer-border-color);border-radius:8px;box-shadow:var(--floating-modal-main-box-shadow);display:flex;flex-direction:column;max-height:100%;max-width:100%;position:absolute;touch-action:none;user-select:none;z-index:1040}.md-floating.fixed{position:fixed}.md-floating.hide{display:block;height:0;visibility:hidden;width:0}.md-floating.md-floating-minimize{background:var(--floating-modal-main-bg-color-alternate);border-radius:8px;width:100%}.md-floating.md-floating-minimize:focus{box-shadow:0 0 0 .125rem #005e7d;outline:0}.md-floating .md-floating__header-button{align-items:center;display:inline-flex}.md-floating .md-floating__header{align-items:center;border-bottom:none;color:var(--floating-modal-main-text-color);display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;max-height:3rem;padding:1rem;width:100%;gap:.5rem}.md-floating .md-floating__header-text{flex:2 1 auto;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:16px;line-height:16px;text-align:left;white-space:nowrap;text-overflow:ellipsis;overflow:auto}.md-floating .md-floating__body{height:calc(100% - 3rem);overflow:auto;padding:.75rem 1rem;padding-top:0}.md-floating .md-floating-body-minimize{display:block;height:0;visibility:hidden}.md-floating .md-floating__header-minimize{border-bottom:0;color:var(--floating-modal-main-text-color-alternate);font-size:16px;line-height:24px;width:100%}.md-floating-min-parent{bottom:0;height:3rem;position:absolute;right:0;width:223px}`}}]);
package/dist/6283.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6283],{26283:(e,n,t)=>{t.d(n,{o:()=>o});var m=t(90195);function o(e){return e===m.Uz.Enter||e===m.Uz.Space||e===m.Uz.NumpadEnter}}}]);
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6283],{26283:(e,o,r)=>{r.d(o,{o:()=>t});var n=r(90195);function t(e){return e===n.Uz.Enter||e===n.Uz.Space||e===n.Uz.NumpadEnter}n.Uz.ArrowDown,n.Uz.ArrowUp,n.Uz.ArrowLeft,n.Uz.ArrowRight,n.Uz.Home,n.Uz.End}}]);
package/dist/6408.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6408],{96408:(e,t,i)=>{i(20109),i(61200),i(6396),i(12176);var s,o=i(90195),a=i(31890),n=i(32972),r=i(4313),p=(i(32022),i(87161)),l=i(70429),d=i(85125),h=i(20291),u=i(58175),m=i(10318),c=i(13739),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)(p.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="input",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.role="",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.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",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(){this.input.select()}focus(){this.input.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:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}inputTemplate(){var e;return this.multiline?p.html`
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6408],{96408:(e,t,i)=>{i(20109),i(61200),i(6396),i(12176);var s,o=i(90195),a=i(31890),n=i(32972),r=i(4313),p=(i(32022),i(87161)),l=i(70429),d=i(85125),h=i(20291),u=i(58175),m=i(10318),c=i(13739),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)(p.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="input",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.role="",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.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(){this.input.select()}focus(){this.input.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:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}inputTemplate(){var e;return this.multiline?p.html`
2
2
  <textarea
3
3
  part="input"
4
4
  class="md-input ${(0,d.classMap)(this.inputTemplateClassMap)}"
@@ -20,6 +20,7 @@
20
20
  placeholder=${this.placeholder}
21
21
  ?readonly=${this.readOnly}
22
22
  maxlength=${(0,h.ifDefined)(this.maxLength)}
23
+ autocomplete=${(0,h.ifDefined)(this.autocomplete)}
23
24
  ></textarea>
24
25
  `:p.html`
25
26
  <input
@@ -50,6 +51,7 @@
50
51
  max=${(0,h.ifDefined)(this.max)}
51
52
  maxlength=${(0,h.ifDefined)(this.maxLength)}
52
53
  aria-haspopup=${(0,h.ifDefined)(this.showDropdown?"true":void 0)}
54
+ autocomplete=${(0,h.ifDefined)(this.autocomplete)}
53
55
  />
54
56
  `}inputLeftTemplate(){return this.searchable?p.html`
55
57
  <div class="md-input__before">
@@ -142,4 +144,4 @@
142
144
  </div>
143
145
  ${this.messagesTemplate()} ${this.secondaryLabelTemplate()} ${this.helpTextTemplate()}
144
146
  </div>
145
- `}};y([(0,l.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,l.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,l.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,l.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,l.property)({type:String})],i.prototype,"id",void 0),y([(0,l.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,l.property)({type:String})],i.prototype,"label",void 0),y([(0,l.property)({type:String})],i.prototype,"helpText",void 0),y([(0,l.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,l.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,l.property)({type:String})],i.prototype,"role",void 0),y([(0,l.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,l.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,l.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,l.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,l.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,l.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,l.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,l.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,l.property)({type:String})],i.prototype,"shape",void 0),y([(0,l.property)({type:String})],i.prototype,"type",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,l.property)({type:Object})],i.prototype,"control",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,l.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,l.query)(".md-input")],i.prototype,"input",void 0),y([(0,l.state)()],i.prototype,"isEditing",void 0),y([(0,l.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,l.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
147
+ `}};y([(0,l.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,l.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,l.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,l.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,l.property)({type:String})],i.prototype,"id",void 0),y([(0,l.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,l.property)({type:String})],i.prototype,"label",void 0),y([(0,l.property)({type:String})],i.prototype,"helpText",void 0),y([(0,l.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,l.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,l.property)({type:String})],i.prototype,"role",void 0),y([(0,l.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,l.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,l.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,l.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,l.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,l.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,l.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,l.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,l.property)({type:String})],i.prototype,"shape",void 0),y([(0,l.property)({type:String})],i.prototype,"type",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,l.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,l.property)({type:Object})],i.prototype,"control",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,l.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,l.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,l.query)(".md-input")],i.prototype,"input",void 0),y([(0,l.state)()],i.prototype,"isEditing",void 0),y([(0,l.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,l.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
package/dist/6798.js CHANGED
@@ -1,11 +1,11 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6798],{96798:(t,e,i)=>{var o,a=i(3643),r=(i(12176),i(31890)),s=i(26283),n=i(4313),d=i(87161),p=i(70429),l=i(85125),h=i(20291),y=i(13017),c=function(t,e,i,o){var a,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};!function(t){let e=class extends d.LitElement{constructor(){super(...arguments),this._active=!1,this._tabIndex=0,this.ariaLabel="",this.ariaLabelledBy="",this.ariaLive="",this.ariaExpanded="",this.ariaHaspopup="false",this.ariaPressed="",this.circle=!1,this.rounded=!1,this.color="",this.containerLarge=!1,this.disabled=!1,this.href="",this.id="",this.value="",this.keyboardKey="",this.label="",this.loading=!1,this.outline=!1,this.hasRemoveStyle=!1,this.size="32",this.tag="button",this.type="button",this.role="button",this.variant="secondary",this.width="",this.maxWidth="",this.activityType="",this.iconActive=!1,this.isActive=!1,this.renderWidth=()=>this.width?`width: ${this.width};`:d.nothing,this.renderMaxWidth=()=>this.maxWidth?`max-width: ${this.maxWidth};`:d.nothing,this.getStyles=()=>{if(this.width||this.maxWidth)return d.html`
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6798],{96798:(t,e,i)=>{var o,a=i(3643),r=(i(12176),i(31890)),s=i(26283),n=i(4313),d=i(87161),p=i(70429),l=i(85125),h=i(20291),y=i(13017),c=function(t,e,i,o){var a,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(s=(r<3?a(s):r>3?a(e,i,s):a(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};!function(t){let e=class extends d.LitElement{constructor(){super(...arguments),this._active=!1,this._tabIndex=0,this.ariaLabel="",this.ariaLabelledBy="",this.ariaLive="",this.ariaExpanded="",this.ariaHaspopup="false",this.ariaPressed="",this.circle=!1,this.rounded=!1,this.color="",this.containerLarge=!1,this.disabled=!1,this.href="",this.id="",this.value="",this.keyboardKey="",this.label="",this.loading=!1,this.outline=!1,this.hasRemoveStyle=!1,this.size="32",this.tag="button",this.type="button",this.role="button",this.variant="secondary",this.width="",this.maxWidth="",this.activityType="",this.iconActive=!1,this.isActive=!1,this.autofocus=!1,this.renderWidth=()=>this.width?`width: ${this.width};`:d.nothing,this.renderMaxWidth=()=>this.maxWidth?`max-width: ${this.maxWidth};`:d.nothing,this.getStyles=()=>{if(this.width||this.maxWidth)return d.html`
2
2
  <style>
3
3
  :host .md-button--${this.size} {
4
4
  ${this.renderWidth()};
5
5
  ${this.renderMaxWidth()};
6
6
  }
7
7
  </style>
8
- `},this.iconTemplate=()=>this.loading?d.html` <md-spinner size="16"></md-spinner> `:d.html` <slot name="icon"></slot> `,this.textTemplate=()=>this.circle&&this.hasIcon?d.nothing:d.html` <slot name="text"></slot> `}get active(){return this._active}set active(t){const e=this._active;this._active=t,this.requestUpdate("active",e)}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}handleKeyDown(t){if(this.disabled)return;const{code:e}=t;(0,s.o)(e)&&this.dispatchEvent(new CustomEvent("button-keydown",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleClick(t){var e;this.disabled||(null===(e=this.clickFunction)||void 0===e||e.call(this),this.dispatchEvent(new CustomEvent("button-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})))}static get styles(){return[n.A,y.A,a.A]}get buttonClassMap(){return{"md-button--circle":this.circle,"md-button--rounded":this.rounded,"md-button--none":this.hasRemoveStyle,"md-button--outline":this.outline,active:this.active&&!this.disabled,disabled:this.disabled&&!this.active,isActive:this.isActive,[`md-button--${this.size}`]:!this.hasRemoveStyle,[`md-button--${this.color}`]:!this.hasRemoveStyle&&!!this.color,[`md-activity__${this.activityType}`]:!!this.activityType,"md-activity":!!this.activityType,"md-button--icon":this.iconActive,"md-button--onlyicon":this.hasIcon&&!this.slottedText,"md-button--placeholder-text":!0===this.isPlaceholderText}}get slottedText(){var t;return null===(t=this.querySelector("[slot=text]"))||void 0===t?void 0:t.textContent}get hasIcon(){return null!==this.querySelector("[slot=icon]")||this.loading}childrenTemplate(){return d.html`
8
+ `},this.iconTemplate=()=>this.loading?d.html` <md-spinner size="16"></md-spinner> `:d.html` <slot name="icon"></slot> `,this.textTemplate=()=>this.circle&&this.hasIcon?d.nothing:d.html` <slot name="text"></slot> `}get active(){return this._active}set active(t){const e=this._active;this._active=t,this.requestUpdate("active",e)}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}firstUpdated(t){super.firstUpdated(t),this.autofocus&&requestAnimationFrame(()=>{this.manageAutoFocus()})}manageAutoFocus(t=this){t.focus()}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}blur(){var t;null===(t=this.button)||void 0===t||t.blur()}handleKeyDown(t){if(this.disabled)return;const{code:e}=t;(0,s.o)(e)&&this.dispatchEvent(new CustomEvent("button-keydown",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleClick(t){var e;this.disabled||(null===(e=this.clickFunction)||void 0===e||e.call(this),this.dispatchEvent(new CustomEvent("button-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})))}static get styles(){return[n.A,y.A,a.A]}get buttonClassMap(){return{"md-button--circle":this.circle,"md-button--rounded":this.rounded,"md-button--none":this.hasRemoveStyle,"md-button--outline":this.outline,active:this.active&&!this.disabled,disabled:this.disabled&&!this.active,isActive:this.isActive,[`md-button--${this.size}`]:!this.hasRemoveStyle,[`md-button--${this.color}`]:!this.hasRemoveStyle&&!!this.color,[`md-activity__${this.activityType}`]:!!this.activityType,"md-activity":!!this.activityType,"md-button--icon":this.iconActive,"md-button--onlyicon":this.hasIcon&&!this.slottedText,"md-button--placeholder-text":!0===this.isPlaceholderText}}get slottedText(){var t;return null===(t=this.querySelector("[slot=text]"))||void 0===t?void 0:t.textContent}get hasIcon(){return null!==this.querySelector("[slot=icon]")||this.loading}childrenTemplate(){return d.html`
9
9
  <span part="button-children" class="md-button__children">
10
10
  ${this.iconTemplate()} ${this.textTemplate()}
11
11
  <slot></slot>
@@ -76,4 +76,4 @@
76
76
  <div part="button-label" class="md-button__label">${this.label}</div>
77
77
  </div>
78
78
  `:d.html` ${this.buttonTemplate(this.tag)} `}
79
- `}};c([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"active",null),c([(0,p.property)({type:Number,attribute:"tab-index",reflect:!0})],e.prototype,"tabIndex",null),c([(0,p.property)({type:String})],e.prototype,"ariaLabel",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaLabelledBy",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaLive",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaExpanded",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaHaspopup",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaPressed",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"circle",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"rounded",void 0),c([(0,p.property)({type:String})],e.prototype,"color",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"containerLarge",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,p.property)({type:String})],e.prototype,"href",void 0),c([(0,p.property)({type:String})],e.prototype,"id",void 0),c([(0,p.property)({type:String})],e.prototype,"value",void 0),c([(0,p.property)({type:String})],e.prototype,"keyboardKey",void 0),c([(0,p.property)({type:String})],e.prototype,"label",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"loading",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"outline",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"hasRemoveStyle",void 0),c([(0,p.property)({type:String})],e.prototype,"size",void 0),c([(0,p.property)({type:String})],e.prototype,"tag",void 0),c([(0,p.property)({type:String})],e.prototype,"type",void 0),c([(0,p.property)({type:String})],e.prototype,"role",void 0),c([(0,p.property)({type:String})],e.prototype,"variant",void 0),c([(0,p.property)({type:String})],e.prototype,"width",void 0),c([(0,p.property)({type:String})],e.prototype,"maxWidth",void 0),c([(0,p.property)({type:String})],e.prototype,"activityType",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"iconActive",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"isActive",void 0),c([(0,p.property)({type:String,attribute:"aria-describedby"})],e.prototype,"ariaDescribedBy",void 0),c([(0,p.property)({attribute:!1})],e.prototype,"clickFunction",void 0),c([(0,p.property)({type:Boolean,attribute:"is-placeholder-text"})],e.prototype,"isPlaceholderText",void 0),c([(0,p.query)(".md-button")],e.prototype,"button",void 0),e=c([(0,r.w)("md-button")],e),t.ELEMENT=e}(o||(o={}))}}]);
79
+ `}};c([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"active",null),c([(0,p.property)({type:Number,attribute:"tab-index",reflect:!0})],e.prototype,"tabIndex",null),c([(0,p.property)({type:String})],e.prototype,"ariaLabel",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaLabelledBy",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaLive",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaExpanded",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaHaspopup",void 0),c([(0,p.property)({type:String})],e.prototype,"ariaPressed",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"circle",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"rounded",void 0),c([(0,p.property)({type:String})],e.prototype,"color",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"containerLarge",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,p.property)({type:String})],e.prototype,"href",void 0),c([(0,p.property)({type:String})],e.prototype,"id",void 0),c([(0,p.property)({type:String})],e.prototype,"value",void 0),c([(0,p.property)({type:String})],e.prototype,"keyboardKey",void 0),c([(0,p.property)({type:String})],e.prototype,"label",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"loading",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"outline",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"hasRemoveStyle",void 0),c([(0,p.property)({type:String})],e.prototype,"size",void 0),c([(0,p.property)({type:String})],e.prototype,"tag",void 0),c([(0,p.property)({type:String})],e.prototype,"type",void 0),c([(0,p.property)({type:String})],e.prototype,"role",void 0),c([(0,p.property)({type:String})],e.prototype,"variant",void 0),c([(0,p.property)({type:String})],e.prototype,"width",void 0),c([(0,p.property)({type:String})],e.prototype,"maxWidth",void 0),c([(0,p.property)({type:String})],e.prototype,"activityType",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"iconActive",void 0),c([(0,p.property)({type:Boolean})],e.prototype,"isActive",void 0),c([(0,p.property)({type:String,attribute:"aria-describedby"})],e.prototype,"ariaDescribedBy",void 0),c([(0,p.property)({attribute:!1})],e.prototype,"clickFunction",void 0),c([(0,p.property)({type:Boolean,attribute:"is-placeholder-text"})],e.prototype,"isPlaceholderText",void 0),c([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),c([(0,p.query)(".md-button")],e.prototype,"button",void 0),e=c([(0,r.w)("md-button")],e),t.ELEMENT=e}(o||(o={}))}}]);