@momentum-ui/web-components 3.0.0-beta.1 → 3.0.0-beta.11

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 (150) hide show
  1. package/dist/1013.js +1 -1
  2. package/dist/109.js +3 -3
  3. package/dist/1323.js +2 -2
  4. package/dist/1625.js +1 -1
  5. package/dist/2186.js +1 -1
  6. package/dist/2547.js +25 -25
  7. package/dist/2555.js +29 -10
  8. package/dist/2669.js +1 -1
  9. package/dist/3192.js +4 -4
  10. package/dist/3739.js +1 -1
  11. package/dist/4363.js +1 -1
  12. package/dist/4659.js +1 -1
  13. package/dist/6273.js +27 -19
  14. package/dist/6283.js +1 -1
  15. package/dist/6408.js +29 -17
  16. package/dist/679.js +1 -1
  17. package/dist/6798.js +3 -3
  18. package/dist/6865.js +1 -1
  19. package/dist/7292.js +1 -1
  20. package/dist/750.js +1 -0
  21. package/dist/7833.js +1 -1
  22. package/dist/8028.js +1 -1
  23. package/dist/8161.js +1 -1
  24. package/dist/836.js +1 -1
  25. package/dist/9409.js +1 -1
  26. package/dist/comp/md-accordion-item-entry.js +1 -1
  27. package/dist/comp/md-accordion-item.js +1 -1
  28. package/dist/comp/md-activity-button-entry.js +1 -1
  29. package/dist/comp/md-activity-button.js +1 -1
  30. package/dist/comp/md-advance-list-entry.js +19 -19
  31. package/dist/comp/md-alert-banner-entry.js +1 -1
  32. package/dist/comp/md-alert-banner.js +1 -1
  33. package/dist/comp/md-alert-entry.js +45 -39
  34. package/dist/comp/md-alert.js +1 -1
  35. package/dist/comp/md-audio-player-entry.js +1 -1
  36. package/dist/comp/md-audio-player.js +1 -1
  37. package/dist/comp/md-avatar-entry.js +3 -3
  38. package/dist/comp/md-avatar.js +1 -1
  39. package/dist/comp/md-button-entry.js +3 -3
  40. package/dist/comp/md-button.js +1 -1
  41. package/dist/comp/md-card-ai-entry.js +1 -1
  42. package/dist/comp/md-card-ai.js +1 -1
  43. package/dist/comp/md-card-entry.js +3 -3
  44. package/dist/comp/md-card-v2-entry.js +1 -1
  45. package/dist/comp/md-card-v2.js +1 -1
  46. package/dist/comp/md-card.js +1 -1
  47. package/dist/comp/md-chat-message-entry.js +18 -13
  48. package/dist/comp/md-chat-message.js +1 -1
  49. package/dist/comp/md-checkbox-entry.js +1 -1
  50. package/dist/comp/md-checkbox.js +1 -1
  51. package/dist/comp/md-chip-entry.js +9 -9
  52. package/dist/comp/md-coachmark-entry.js +1 -1
  53. package/dist/comp/md-coachmark-popover-entry.js +1 -1
  54. package/dist/comp/md-coachmark-popover.js +1 -1
  55. package/dist/comp/md-coachmark.js +1 -1
  56. package/dist/comp/md-combobox-entry.js +26 -26
  57. package/dist/comp/md-combobox.js +1 -1
  58. package/dist/comp/md-country-code-picker-entry.js +1 -1
  59. package/dist/comp/md-country-code-picker.js +1 -1
  60. package/dist/comp/md-date-range-picker-entry.js +1 -1
  61. package/dist/comp/md-date-range-picker.js +1 -1
  62. package/dist/comp/md-date-time-picker-entry.js +1 -1
  63. package/dist/comp/md-date-time-picker.js +1 -1
  64. package/dist/comp/md-datepicker-calendar-entry.js +33 -14
  65. package/dist/comp/md-datepicker-calendar.js +1 -1
  66. package/dist/comp/md-datepicker-day-entry.js +1 -1
  67. package/dist/comp/md-datepicker-day.js +1 -1
  68. package/dist/comp/md-datepicker-entry.js +27 -19
  69. package/dist/comp/md-datepicker-month-entry.js +1 -1
  70. package/dist/comp/md-datepicker-month.js +1 -1
  71. package/dist/comp/md-datepicker-week-entry.js +1 -1
  72. package/dist/comp/md-datepicker-week.js +1 -1
  73. package/dist/comp/md-datepicker.js +1 -1
  74. package/dist/comp/md-dropdown-entry.js +2 -2
  75. package/dist/comp/md-dropdown.js +1 -1
  76. package/dist/comp/md-editable-field-entry.js +5 -6
  77. package/dist/comp/md-editable-field.js +1 -1
  78. package/dist/comp/md-favorite-entry.js +1 -1
  79. package/dist/comp/md-favorite.js +1 -1
  80. package/dist/comp/md-floating-minimize-entry.js +6 -4
  81. package/dist/comp/md-floating-minimize.js +1 -1
  82. package/dist/comp/md-floating-modal-entry.js +12 -7
  83. package/dist/comp/md-floating-modal.js +1 -1
  84. package/dist/comp/md-grabber-entry.js +1 -1
  85. package/dist/comp/md-grabber.js +1 -1
  86. package/dist/comp/md-help-text-entry.js +3 -3
  87. package/dist/comp/md-help-text.js +1 -1
  88. package/dist/comp/md-icon-entry.js +1 -1
  89. package/dist/comp/md-icon.js +1 -1
  90. package/dist/comp/md-inpu.js +1 -1
  91. package/dist/comp/md-input-entry.js +17 -5
  92. package/dist/comp/md-input-file.js +1 -1
  93. package/dist/comp/md-input.js +1 -1
  94. package/dist/comp/md-link-entry.js +36 -36
  95. package/dist/comp/md-list-entry.js +1 -1
  96. package/dist/comp/md-list-item-entry.js +3 -3
  97. package/dist/comp/md-meeting-alert-entry.js +1 -1
  98. package/dist/comp/md-meeting-alert.js +1 -1
  99. package/dist/comp/md-menu-overlay-entry.js +2 -2
  100. package/dist/comp/md-modal-entry.js +1 -1
  101. package/dist/comp/md-modal.js +1 -1
  102. package/dist/comp/md-pagination-entry.js +1 -1
  103. package/dist/comp/md-pagination.js +1 -1
  104. package/dist/comp/md-phone-input-entry.js +1 -1
  105. package/dist/comp/md-phone-input.js +1 -1
  106. package/dist/comp/md-popover-entry.js +1 -1
  107. package/dist/comp/md-popover.js +1 -1
  108. package/dist/comp/md-presence-entry.js +1 -1
  109. package/dist/comp/md-presence.js +1 -1
  110. package/dist/comp/md-radio-entry.js +11 -4
  111. package/dist/comp/md-radio.js +1 -1
  112. package/dist/comp/md-table-advanced-entry.js +1 -1
  113. package/dist/comp/md-table-advanced.js +1 -1
  114. package/dist/comp/md-table-entry.js +1 -1
  115. package/dist/comp/md-table.js +1 -1
  116. package/dist/comp/md-tabs-entry.js +1 -2
  117. package/dist/comp/md-tabs.js +1 -1
  118. package/dist/comp/md-task-item-entry.js +1 -2
  119. package/dist/comp/md-task-item.js +1 -1
  120. package/dist/comp/md-timepicker-entry.js +1 -1
  121. package/dist/comp/md-timepicker.js +1 -1
  122. package/dist/comp/md-tooltip-entry.js +1 -1
  123. package/dist/index-entry.js +403 -301
  124. package/dist/index.js +1 -1
  125. package/dist/types/components/avatar/Avatar.constants.d.ts +1 -1
  126. package/dist/types/components/button/Button.d.ts +6 -1
  127. package/dist/types/components/chat-message/ChatMessage.d.ts +1 -0
  128. package/dist/types/components/chip/Chip.d.ts +3 -5
  129. package/dist/types/components/combobox/ComboBox.d.ts +1 -1
  130. package/dist/types/components/datepicker/DatePicker.d.ts +4 -0
  131. package/dist/types/components/datepicker/datepicker-calendar/DatePickerCalendar.d.ts +10 -1
  132. package/dist/types/components/dropdown/Dropdown.d.ts +14 -2
  133. package/dist/types/components/form/FormArray.d.ts +6 -1
  134. package/dist/types/components/form/FormControl.d.ts +3 -0
  135. package/dist/types/components/form/index.d.ts +1 -0
  136. package/dist/types/components/form/validators.array.d.ts +12 -0
  137. package/dist/types/components/form/validators.d.ts +1 -0
  138. package/dist/types/components/input/Input.d.ts +6 -2
  139. package/dist/types/components/link/Link.d.ts +7 -0
  140. package/dist/types/components/list/ListItem.d.ts +1 -1
  141. package/dist/types/components/list-v2/list-item-v2.d.ts +67 -0
  142. package/dist/types/components/list-v2/list-v2.d.ts +56 -0
  143. package/dist/types/components/menu-overlay/MenuOverlay.d.ts +1 -0
  144. package/dist/types/components/radio/Radio.d.ts +5 -0
  145. package/dist/types/components/slider/Slider.d.ts +11 -0
  146. package/dist/types/components/tooltip/Tooltip.d.ts +3 -0
  147. package/dist/types/index.d.ts +3 -1
  148. package/dist/types/utils/keyboard.d.ts +1 -0
  149. package/package.json +2 -2
  150. package/dist/6633.js +0 -1
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,a=i(90195),o=i(31890),n=i(32972),r=i(4313),l=(i(32022),i(87161)),p=i(70429),d=i(85125),h=i(20291),u=i(58175),m=i(10318),c=i(13739),y=function(e,t,i,s){var a,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,n.y)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="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.ariaRole=void 0,this.messageArr=[],this.min=void 0,this.max=void 0,this.maxLength=void 0,this.multi=!1,this.multiline=!1,this.name="",this.nestedLevel=0,this.placeholder="",this.readOnly=!1,this.required=!1,this.searchable=!1,this.secondaryLabel="",this.selectWhenInFocus=!1,this.shape="",this.type="text",this.value="",this.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}handleOutsideClick(e){let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||(this.input.blur(),this.isEditing=!1))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleFocus(e){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleMouseDown(e){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleChange(e){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleClear(e){if("keydown"===e.type){const{code:t}=e;if(t!==a.Uz.Space&&t!==a.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[`${this.containerSize}`]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,[`md-${this.messageType}`]:!!this.messageType,[`md-input--nested-${this.nestedLevel}`]:!!this.nestedLevel,"md-multi":this.multi,"md-new-momentum":this.newMomentum}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[`${this.inputSize}`]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,[`md-input--${this.shape}`]:!!this.shape,"md-input--compact":this.compact,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}inputTemplate(){var e;return this.multiline?l.html`
2
2
  <textarea
3
3
  part="input"
4
4
  class="md-input ${(0,d.classMap)(this.inputTemplateClassMap)}"
@@ -20,8 +20,9 @@
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
- `:p.html`
25
+ `:l.html`
25
26
  <input
26
27
  part="input"
27
28
  class="md-input ${(0,d.classMap)(this.inputTemplateClassMap)}"
@@ -43,23 +44,24 @@
43
44
  aria-errormessage=${`${this.htmlId}-message`}
44
45
  aria-disabled=${(0,h.ifDefined)(this.disabled||void 0)}
45
46
  id=${this.htmlId}
46
- role=${this.role}
47
+ role=${(0,h.ifDefined)(this.ariaRole)}
47
48
  placeholder=${this.placeholder}
48
49
  ?readonly=${this.readOnly||this.disabled||this.disableUserTextInput}
49
50
  min=${(0,h.ifDefined)(this.min)}
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
- `}inputLeftTemplate(){return this.searchable?p.html`
56
+ `}inputLeftTemplate(){return this.searchable?l.html`
55
57
  <div class="md-input__before">
56
- ${this.isLoading?p.html` <md-spinner size="20"></md-spinner> `:p.html` <md-icon ariaHidden="true" name="search-bold" size="16" iconSet="momentumDesign"></md-icon> `}
58
+ ${this.isLoading?l.html` <md-spinner size="20"></md-spinner> `:l.html` <md-icon ariaHidden="true" name="search-bold" size="16" iconSet="momentumDesign"></md-icon> `}
57
59
  </div>
58
- `:"before"===this.auxiliaryContentPosition?p.html`
60
+ `:"before"===this.auxiliaryContentPosition?l.html`
59
61
  <div class="md-input__before">
60
62
  <slot name="input-section"> </slot>
61
63
  </div>
62
- `:p.nothing}get inputRightTemplateClassMap(){return{"md-input__after":!0,hidden:!this.hasRightIcon}}inputRightTemplate(){return this.clear&&!this.disabled&&this.value&&!this.readOnly?p.html`
64
+ `:l.nothing}get inputRightTemplateClassMap(){return{"md-input__after":!0,hidden:!this.hasRightIcon}}inputRightTemplate(){return this.clear&&!this.disabled&&this.value&&!this.readOnly?l.html`
63
65
  <div class="md-input__after">
64
66
  <md-button
65
67
  hasRemoveStyle
@@ -79,12 +81,12 @@
79
81
  </md-button>
80
82
  ${this.comboBoxButtonTemplate}
81
83
  </div>
82
- `:this.compact?this.showDropdown?p.html` <div class=${(0,d.classMap)(this.inputRightTemplateClassMap)}>${this.comboBoxButtonTemplate}</div> `:void 0:p.html`
84
+ `:this.compact?this.showDropdown?l.html` <div class=${(0,d.classMap)(this.inputRightTemplateClassMap)}>${this.comboBoxButtonTemplate}</div> `:void 0:l.html`
83
85
  <div class=${(0,d.classMap)(this.inputRightTemplateClassMap)}>
84
86
  <slot name="input-section-right" @slotchange=${this.handleRighSlotChange}></slot>
85
87
  ${this.comboBoxButtonTemplate}
86
88
  </div>
87
- `}get comboBoxButtonTemplate(){return this.showDropdown?p.html`
89
+ `}get comboBoxButtonTemplate(){return this.showDropdown?l.html`
88
90
  <button
89
91
  class="md-input__dropdown-button"
90
92
  tabindex="-1"
@@ -102,7 +104,12 @@
102
104
  >
103
105
  </md-icon>
104
106
  </button>
105
- `:p.nothing}secondaryLabelTemplate(){return this.secondaryLabel?p.html`
107
+ `:l.nothing}characterCountLabelTemplate(){return!this.maxSuggestedLength||this.disabled||this.readOnly?l.nothing:l.html`<div class="md-input__character-count-label-container">
108
+ <span
109
+ class="md-input__character-count-label ${(0,d.classMap)({error:this.value.length>this.maxSuggestedLength})}"
110
+ >${this.value.length}/${this.maxSuggestedLength}</span
111
+ >
112
+ </div> `}secondaryLabelTemplate(){return this.secondaryLabel?l.html`
106
113
  <md-label
107
114
  class="md-input__secondary-label ${(0,d.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
108
115
  secondaryLabel
@@ -110,15 +117,15 @@
110
117
  .label=${this.secondaryLabel}
111
118
  @label-click=${()=>this.handleLabelClick()}
112
119
  ></md-label>
113
- `:p.nothing}helpTextTemplate(){return this.helpText?p.html`
120
+ `:l.nothing}helpTextTemplate(){return this.helpText?l.html`
114
121
  <md-help-text
115
122
  class="help-text ${(0,d.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
116
123
  .message=${this.helpText}
117
124
  style=${(0,m.styleMap)({width:"100%"})}
118
125
  ></md-help-text>
119
- `:p.nothing}messagesTemplate(){return!this.hideMessage&&this.messages&&this.messages.length?p.html`
126
+ `:l.nothing}messagesTemplate(){return!this.hideMessage&&this.messages&&this.messages.length?l.html`
120
127
  <div id="${this.htmlId}-message" part="message" class="md-input__messages">
121
- ${(0,u.repeat)(this.messages,(e,t)=>{var i,s;return p.html`
128
+ ${(0,u.repeat)(this.messages,(e,t)=>{var i,s;return l.html`
122
129
  <md-help-text
123
130
  .message=${e}
124
131
  .id=${null!==(i=this.messageArr[t].id)&&void 0!==i?i:""}
@@ -127,19 +134,24 @@
127
134
  ></md-help-text>
128
135
  `})}
129
136
  </div>
130
- `:p.nothing}labelTemplate(){return this.label?p.html`
137
+ `:l.nothing}labelTemplate(){return this.label?l.html`
131
138
  <md-label
132
139
  class="md-input__label ${(0,d.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
133
140
  .htmlFor=${this.htmlId}
134
141
  .label=${this.label}
135
142
  @label-click=${()=>this.handleLabelClick()}
136
143
  ></md-label>
137
- `:p.nothing}static get styles(){return[r.A,c.A]}render(){return p.html`
144
+ `:l.nothing}static get styles(){return[r.A,c.A]}render(){return l.html`
138
145
  <div class="md-input-container ${(0,d.classMap)(this.inputClassMap)}" part="md-input-container">
139
146
  ${this.labelTemplate()}
140
147
  <div class="md-input__wrapper ${(0,d.classMap)(this.inputWrapperClassMap)}">
141
148
  ${this.inputLeftTemplate()} ${this.inputTemplate()} ${this.inputRightTemplate()}
142
149
  </div>
143
- ${this.messagesTemplate()} ${this.secondaryLabelTemplate()} ${this.helpTextTemplate()}
150
+ <div class="md-input__all-sub-labels-container">
151
+ <div class="md-input__info-and-error-labels-container">
152
+ ${this.messagesTemplate()} ${this.secondaryLabelTemplate()} ${this.helpTextTemplate()}
153
+ </div>
154
+ ${this.characterCountLabelTemplate()}
155
+ </div>
144
156
  </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={}))}}]);
157
+ `}};y([(0,p.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,p.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,p.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,p.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,p.property)({type:String})],i.prototype,"id",void 0),y([(0,p.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,p.property)({type:String})],i.prototype,"label",void 0),y([(0,p.property)({type:String})],i.prototype,"helpText",void 0),y([(0,p.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,p.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,p.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,p.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,p.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,p.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,p.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,p.property)({type:String})],i.prototype,"shape",void 0),y([(0,p.property)({type:String})],i.prototype,"type",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,p.property)({type:Object})],i.prototype,"control",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,p.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,p.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,p.query)(".md-input")],i.prototype,"input",void 0),y([(0,p.state)()],i.prototype,"isEditing",void 0),y([(0,p.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,p.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,o.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
package/dist/679.js CHANGED
@@ -5,7 +5,7 @@
5
5
  presence-type=${null!=t?t:""}
6
6
  newMomentum
7
7
  >${null!=o?o:a.nothing}</md-avatar
8
- >`,s=(e,t,i,n)=>{switch(e.toLowerCase()){case o.r.PROGRESSIVE_CAMPAIGN:case o.r.CALLBACK:case o.r.TELEPHONY:return m(t,i,"channel-call");case o.r.OUTBOUND_TELEPHONY:return m(t,i,"channel-callback");case o.r.INBOUND_TELEPHONY:return m(t,i,"channel-call-inbound");case o.r.APPLE_MESSAGES:return m(t,i,"channel-apple-chat");case o.r.OUTBOUND_CAMPAIGN:return m(t,i,"channel-campaign");case o.r.CHAT:return m(t,i,"channel-chat");case o.r.EMAIL:return m(t,i,"channel-email-inbound");case o.r.SMS:return m(t,i,"channel-sms-inbound");case o.r.FACEBOOK:return m(t,i,"channel-fb-messenger");case o.r.WHATSAPP:return m(t,i,"channel-whats-app");case o.r.MESSENGER:return m(t,i,"channel-facebook");case o.r.MIDCALL_TELEPHONY:return m(t,i,"channel-monitoring");case o.r.OUTBOUND_EMAIL:return m(t,i,"channel-email-outbound");case o.r.OUTBOUND_SMS:return m(t,i,"channel-sms-outbound");case o.r.SOCIAL_X:return m(t,i,"channel-twitter-x");case o.r.VIBER:return m(t,i,"channel-viber");case o.r.WECHAT:return m(t,i,"channel-we-chat");case o.r.WEBEX:return m(t,i,"channel-webex");case o.r.OUTBOUND_CHAT:return m(t,i,"channel-chat-outbound");case o.r.GOOGLE_MESSAGES:return m(t,i,"channel-custom",a.html`<img height="32px" width="32px" src="${n}" />`);case o.r.ICON_SRC:return m(t,i,"channel-custom",a.html`<img height="20px" width="20px" src="${n}" />`);default:return m(t,i,"channel-custom",a.html`<slot name="task-type"></slot>`)}},r=e=>{switch(e){case o.j.CONSULTING:return a.html` <md-icon name="headset-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.PLAY:return a.html` <md-icon name="play-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.HOLD:return a.html` <md-icon name="pause-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.CONFERENCE:return a.html` <md-icon name="meet-bold" size="16" iconSet="momentumDesign"></md-icon> `;case o.j.TRANSFERED:return a.html` <md-icon name="assign-privilege-bold" size="16" iconSet="momentumDesign"></md-icon> `;case o.j.COURTESY_CALLBACK:return a.html` <md-icon name="callrate-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.CAMPAIGN:return a.html` <md-icon name="announcement-bold" size="12" iconSet="momentumDesign"></md-icon> `;default:return a.html` <slot name="task-status"></slot> `}},l=(e,t,i)=>{switch(e.toLowerCase()){case o.r.TELEPHONY:return a.html`
8
+ >`,s=(e,t,i,n)=>{switch(e.toLowerCase()){case o.r.PROGRESSIVE_CAMPAIGN:case o.r.CALLBACK:return m(t,i,"channel-callback-v2");case o.r.TELEPHONY:return m(t,i,"channel-call");case o.r.OUTBOUND_TELEPHONY:return m(t,i,"channel-callback");case o.r.INBOUND_TELEPHONY:return m(t,i,"channel-call-inbound");case o.r.APPLE_MESSAGES:return m(t,i,"channel-apple-chat");case o.r.OUTBOUND_CAMPAIGN:return m(t,i,"channel-campaign");case o.r.CHAT:return m(t,i,"channel-chat");case o.r.EMAIL:return m(t,i,"channel-email-inbound");case o.r.SMS:return m(t,i,"channel-sms-inbound");case o.r.FACEBOOK:return m(t,i,"channel-fb-messenger");case o.r.WHATSAPP:return m(t,i,"channel-whats-app");case o.r.MESSENGER:return m(t,i,"channel-facebook");case o.r.MIDCALL_TELEPHONY:return m(t,i,"channel-monitoring");case o.r.OUTBOUND_EMAIL:return m(t,i,"channel-email-outbound");case o.r.OUTBOUND_SMS:return m(t,i,"channel-sms-outbound");case o.r.SOCIAL_X:return m(t,i,"channel-twitter-x");case o.r.VIBER:return m(t,i,"channel-viber");case o.r.WECHAT:return m(t,i,"channel-we-chat");case o.r.WEBEX:return m(t,i,"channel-webex");case o.r.OUTBOUND_CHAT:return m(t,i,"channel-chat-outbound");case o.r.GOOGLE_MESSAGES:return m(t,i,"channel-custom",a.html`<img height="32px" width="32px" src="${n}" />`);case o.r.ICON_SRC:return m(t,i,"channel-custom",a.html`<img height="20px" width="20px" src="${n}" />`);default:return m(t,i,"channel-custom",a.html`<slot name="task-type"></slot>`)}},r=e=>{switch(e){case o.j.CONSULTING:return a.html` <md-icon name="headset-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.PLAY:return a.html` <md-icon name="play-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.HOLD:return a.html` <md-icon name="pause-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.CONFERENCE:return a.html` <md-icon name="meet-bold" size="16" iconSet="momentumDesign"></md-icon> `;case o.j.TRANSFERED:return a.html` <md-icon name="assign-privilege-bold" size="16" iconSet="momentumDesign"></md-icon> `;case o.j.COURTESY_CALLBACK:return a.html` <md-icon name="callrate-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.CAMPAIGN:return a.html` <md-icon name="announcement-bold" size="12" iconSet="momentumDesign"></md-icon> `;default:return a.html` <slot name="task-status"></slot> `}},l=(e,t,i)=>{switch(e.toLowerCase()){case o.r.TELEPHONY:return a.html`
9
9
  <md-badge color="green" circle>
10
10
  <md-icon name="handset-filled" size="20" iconSet="momentumDesign"></md-icon>
11
11
  </md-badge>
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={}))}}]);