@momentum-ui/web-components 2.26.0 → 2.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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(26272),p=(i(32022),i(41488)),l=i(40333),d=i(23968),h=i(97822),u=i(22818),m=i(8229),c=i(21572),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(26272),p=(i(32022),i(41488)),l=i(40333),d=i(23968),h=i(97822),u=i(22818),m=i(8229),c=i(21572),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,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,"role",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: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.query)(".md-input")],i.prototype,"input",void 0),y([(0,p.internalProperty)()],i.prototype,"isEditing",void 0),y([(0,p.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,p.internalProperty)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
|
|
147
|
+
`}};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,"role",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.query)(".md-input")],i.prototype,"input",void 0),y([(0,p.internalProperty)()],i.prototype,"isEditing",void 0),y([(0,p.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,p.internalProperty)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
|
package/dist/7330.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[7330],{67330:(i,
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[7330],{67330:(o,i,e)=>{e.d(i,{A:()=>t});const t=e(41488).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}`}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html/directives/style-map","lit-html","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/class-map.js","lit-html/directives/repeat"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat")):t(e["lit-element"],e["lit-html/directives/class-map"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/class-map.js"],e["lit-html/directives/repeat"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,a,
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html/directives/style-map","lit-html","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/class-map.js","lit-html/directives/repeat"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat")):t(e["lit-element"],e["lit-html/directives/class-map"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/class-map.js"],e["lit-html/directives/repeat"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,o,a,r,l,n,p)=>(()=>{"use strict";var d,m={8229:e=>{e.exports=i},17518:e=>{e.exports=n},22818:e=>{e.exports=p},23968:e=>{e.exports=t},32022:e=>{e.exports=a},40333:e=>{e.exports=s},41488:t=>{t.exports=e},60554:e=>{e.exports=r},85314:e=>{e.exports=l},96408:(e,t,i)=>{i.r(t),i.d(t,{Input:()=>S,ariaInvalidType:()=>C,containerSize:()=>v,iconNames:()=>$,iconPosition:()=>x,inputShape:()=>f,inputSize:()=>g,inputType:()=>b,nestedLevel:()=>w}),i(20109),i(61200),i(6396),i(12176);var s=i(90195),o=i(31890),a=i(32972),r=i(26272),l=i(32022),n=i(41488),p=i(40333),d=i(23968),m=i(97822),h=i(22818),u=i(8229),c=i(21572),y=function(e,t,i,s){var o,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};const v=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],g=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],b=["text","number","password","email","tel","checkbox"],f=["none","pill"],$=l,x=["before","after"],w=[0,1,2,3],C=["grammar","false","spelling","true"];var S;!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,a.y)(n.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="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!==s.Uz.Space&&t!==s.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[`${this.containerSize}`]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,[`md-${this.messageType}`]:!!this.messageType,[`md-input--nested-${this.nestedLevel}`]:!!this.nestedLevel,"md-multi":this.multi,"md-new-momentum":this.newMomentum}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[`${this.inputSize}`]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,[`md-input--${this.shape}`]:!!this.shape,"md-input--compact":this.compact,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}inputTemplate(){var e;return this.multiline?n.html`
|
|
2
2
|
<textarea
|
|
3
3
|
part="input"
|
|
4
4
|
class="md-input ${(0,d.classMap)(this.inputTemplateClassMap)}"
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
aria-label=${this.ariaLabel}
|
|
16
16
|
aria-invalid=${this.ariaInvalid}
|
|
17
17
|
aria-errormessage="${this.htmlId}-message"
|
|
18
|
-
aria-disabled=${(0,
|
|
18
|
+
aria-disabled=${(0,m.ifDefined)(this.disabled||void 0)}
|
|
19
19
|
id=${this.htmlId}
|
|
20
20
|
placeholder=${this.placeholder}
|
|
21
21
|
?readonly=${this.readOnly}
|
|
22
|
-
maxlength=${(0,
|
|
22
|
+
maxlength=${(0,m.ifDefined)(this.maxLength)}
|
|
23
|
+
autocomplete=${(0,m.ifDefined)(this.autocomplete)}
|
|
23
24
|
></textarea>
|
|
24
25
|
`:n.html`
|
|
25
26
|
<input
|
|
@@ -37,19 +38,20 @@
|
|
|
37
38
|
.value=${this.value}
|
|
38
39
|
aria-describedby=${this.ariaDescribedBy}
|
|
39
40
|
aria-controls=${this.ariaControls}
|
|
40
|
-
aria-expanded=${(0,
|
|
41
|
+
aria-expanded=${(0,m.ifDefined)(null!==(e=this.ariaExpandedValue)&&void 0!==e?e:void 0)}
|
|
41
42
|
aria-label=${this.ariaLabel}
|
|
42
43
|
aria-invalid=${this.ariaInvalid}
|
|
43
44
|
aria-errormessage=${`${this.htmlId}-message`}
|
|
44
|
-
aria-disabled=${(0,
|
|
45
|
+
aria-disabled=${(0,m.ifDefined)(this.disabled||void 0)}
|
|
45
46
|
id=${this.htmlId}
|
|
46
47
|
role=${this.role}
|
|
47
48
|
placeholder=${this.placeholder}
|
|
48
49
|
?readonly=${this.readOnly||this.disabled||this.disableUserTextInput}
|
|
49
|
-
min=${(0,
|
|
50
|
-
max=${(0,
|
|
51
|
-
maxlength=${(0,
|
|
52
|
-
aria-haspopup=${(0,
|
|
50
|
+
min=${(0,m.ifDefined)(this.min)}
|
|
51
|
+
max=${(0,m.ifDefined)(this.max)}
|
|
52
|
+
maxlength=${(0,m.ifDefined)(this.maxLength)}
|
|
53
|
+
aria-haspopup=${(0,m.ifDefined)(this.showDropdown?"true":void 0)}
|
|
54
|
+
autocomplete=${(0,m.ifDefined)(this.autocomplete)}
|
|
53
55
|
/>
|
|
54
56
|
`}inputLeftTemplate(){return this.searchable?n.html`
|
|
55
57
|
<div class="md-input__before">
|
|
@@ -118,7 +120,7 @@
|
|
|
118
120
|
></md-help-text>
|
|
119
121
|
`:p.nothing}messagesTemplate(){return!this.hideMessage&&this.messages&&this.messages.length?n.html`
|
|
120
122
|
<div id="${this.htmlId}-message" part="message" class="md-input__messages">
|
|
121
|
-
${(0,
|
|
123
|
+
${(0,h.repeat)(this.messages,(e,t)=>{var i,s;return n.html`
|
|
122
124
|
<md-help-text
|
|
123
125
|
.message=${e}
|
|
124
126
|
.id=${null!==(i=this.messageArr[t].id)&&void 0!==i?i:""}
|
|
@@ -142,4 +144,4 @@
|
|
|
142
144
|
</div>
|
|
143
145
|
${this.messagesTemplate()} ${this.secondaryLabelTemplate()} ${this.helpTextTemplate()}
|
|
144
146
|
</div>
|
|
145
|
-
`}};y([(0,n.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,n.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,n.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,n.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,n.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,n.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,n.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,n.property)({type:String})],i.prototype,"id",void 0),y([(0,n.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,n.property)({type:String})],i.prototype,"label",void 0),y([(0,n.property)({type:String})],i.prototype,"helpText",void 0),y([(0,n.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,n.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,n.property)({type:String})],i.prototype,"role",void 0),y([(0,n.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,n.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,n.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,n.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,n.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,n.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,n.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,n.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,n.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,n.property)({type:String})],i.prototype,"shape",void 0),y([(0,n.property)({type:String})],i.prototype,"type",void 0),y([(0,n.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,n.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,n.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,n.property)({type:Object})],i.prototype,"control",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,n.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,n.query)(".md-input")],i.prototype,"input",void 0),y([(0,n.internalProperty)()],i.prototype,"isEditing",void 0),y([(0,n.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,n.internalProperty)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,
|
|
147
|
+
`}};y([(0,n.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,n.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,n.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,n.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,n.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,n.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,n.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,n.property)({type:String})],i.prototype,"id",void 0),y([(0,n.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,n.property)({type:String})],i.prototype,"label",void 0),y([(0,n.property)({type:String})],i.prototype,"helpText",void 0),y([(0,n.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,n.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,n.property)({type:String})],i.prototype,"role",void 0),y([(0,n.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,n.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,n.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,n.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,n.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,n.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,n.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,n.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,n.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,n.property)({type:String})],i.prototype,"shape",void 0),y([(0,n.property)({type:String})],i.prototype,"type",void 0),y([(0,n.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,n.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,n.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,n.property)({type:Object})],i.prototype,"control",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,n.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,n.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,n.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,n.query)(".md-input")],i.prototype,"input",void 0),y([(0,n.internalProperty)()],i.prototype,"isEditing",void 0),y([(0,n.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,n.internalProperty)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,o.w)("md-input")],i),e.ELEMENT=i}(S||(S={}))},97822:e=>{e.exports=o}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return m[e](i,i.exports,u),i.exports}u.m=m,d=[],u.O=(e,t,i,s)=>{if(!t){var o=1/0;for(n=0;n<d.length;n++){for(var[t,i,s]=d[n],a=!0,r=0;r<t.length;r++)(!1&s||o>=s)&&Object.keys(u.O).every(e=>u.O[e](t[r]))?t.splice(r--,1):(a=!1,s<o&&(o=s));if(a){d.splice(n--,1);var l=i();void 0!==l&&(e=l)}}return e}s=s||0;for(var n=d.length;n>0&&d[n-1][2]>s;n--)d[n]=d[n-1];d[n]=[t,i,s]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1266:0,6408:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var s,o,[a,r,l]=i,n=0;if(a.some(t=>0!==e[t])){for(s in r)u.o(r,s)&&(u.m[s]=r[s]);if(l)var p=l(u)}for(t&&t(i);n<a.length;n++)o=a[n],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(p)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var c=u.O(void 0,[2237,1890,6272,6325,9217,6283,2176,6798,5830,1200,2576,8210,4977,1270,1598,109,1572,6396],()=>u(96408));return u.O(c)})());
|
package/dist/index-entry.js
CHANGED
|
@@ -1034,7 +1034,7 @@
|
|
|
1034
1034
|
`}getActionTemplate(t){return t.isIconOnly?this.getTooltipCircleButtonTemplate(t):this.getPillButtonTemplate(t)}getActionGroupTemplate(t){return y.html` ${this.separatorTemplate} ${t.actions.map(t=>this.getActionTemplate(t))} `}render(){return y.html`
|
|
1035
1035
|
${this.showCloseButton?this.closeButtonTemplate:it.nothing} ${this.getSecondaryLabelTemplate(this.leadingLabel)}
|
|
1036
1036
|
${this.actions.map(t=>this.getActionGroupTemplate(t))}
|
|
1037
|
-
`}};rt([(0,y.property)({type:String})],nt.prototype,"leadingLabel",void 0),rt([(0,y.property)({type:String})],nt.prototype,"closeButtonAriaLabel",void 0),rt([(0,y.property)({type:Boolean})],nt.prototype,"showCloseButton",void 0),rt([(0,y.property)({type:Array})],nt.prototype,"actions",void 0),nt=rt([(0,y.customElement)("md-floating-button-bar")],nt);var at=i(58871),lt=i(73093);class dt{constructor(){this.listeners=new Set}onChange(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}emitChange(){for(const t of Array.from(this.listeners))t(this)}}class ht extends dt{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.currentValue=t,this.validators=e,this.validate()}get value(){return this.currentValue}markAsTouched(){this.touched=!0,this.validate()}get valid(){return 0===this.validationErrors.length}get errors(){return this.touched?this.validationErrors:[]}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class pt extends dt{constructor(t){var e;super(),this.controls=t;for(const t of Object.keys(this.controls)){const i=this.controls[t];null===(e=i.onChange)||void 0===e||e.call(i,()=>this.emitChange())}}get(t){return this.controls[t]}get value(){const t={};for(const e in this.controls)t[e]=this.controls[e].value;return t}get valid(){return Object.values(this.controls).every(t=>t.valid)}validate(){for(const t of Object.values(this.controls))t.validate();this.emitChange()}markAllAsTouched(){Object.values(this.controls).forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}class ct extends dt{constructor(t){var e;super(),this.controls=t;for(const t of this.controls)null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange())}at(t){return this.controls[t]}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange()),this.emitChange()}removeAt(t){this.controls.splice(t,1),this.emitChange()}get value(){return this.controls.map(t=>t.value)}get valid(){return this.controls.every(t=>t.valid)}get length(){return this.controls.length}getControls(){return this.controls}validate(){this.controls.forEach(t=>t.validate()),this.emitChange()}markAllAsTouched(){this.controls.forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}const ut={required:()=>t=>null==t||"string"==typeof t&&""===t.trim()?{type:"required"}:null,minLength:t=>e=>e.length<t?{type:"minLength",count:t}:null,maxLength:t=>e=>e.length>t?{type:"maxLength",count:t}:null};var mt=i(97866),yt=i(69112),bt=i(20109),vt=i(52619),gt=i(96408),ft=i(6396),wt=i(19026),xt=i(90195),Ct=i(26283);const Et=y.css`:host{--list-item-border-radius:0;--list-item-expand-duration:400ms;--list-item-hover-bg-color:var(--md-button-secondary-hover-bg-color);--list-item-active-bg-color:var(--md-button-secondary-pressed-bg-color);--list-item-disabled-bg-color:none;--list-item-disabled-text-color:var(--md-textColor-disabled);--list-item-primary-label-color:var(--md-textColor-primary);--list-item-secondary-label-color:var(--md-textColor-secondary);--list-item-primary-label-font-size:14px;--list-item-secondary-label-font-size:12px;--list-item-bg-color:none;border-radius:var(--list-item-border-radius);background-color:var(--list-item-bg-color)}:host(:focus-visible){box-shadow:none!important}:host([variant=inset-rectangle]){--list-item-border-radius:0.5rem}:host([variant=inset-pill]){--list-item-border-radius:3.125rem}:host([disabled]){--list-item-primary-label-color:var(--list-item-disabled-text-color);--list-item-secondary-label-color:var(--list-item-disabled-text-color);--list-item-bg-color:var(--list-item-disabled-bg-color)}.header{border-radius:var(--list-item-border-radius);padding:.5rem;display:flex;justify-content:space-between;align-items:center}.header:hover:not(:disabled){background-color:var(--list-item-hover-bg-color)}.header:active:not(:disabled){background-color:var(--list-item-active-bg-color)}:host(:focus-visible) .header{box-shadow:0 0 0 .125rem var(--list-focus-border-color)}:host::part(header-leading),:host::part(header-trailing){display:flex;align-items:center;gap:.5rem}:host::part(primary-label),:host::part(secondary-label),:host::part(tertiary-label){display:block;line-height:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host::part(primary-label){font-size:var(--list-item-primary-label-font-size);color:var(--list-item-primary-label-color)}:host::part(secondary-label),:host::part(tertiary-label){font-size:var(--list-item-secondary-label-font-size);color:var(--list-item-secondary-label-color)}.expand-icon{transition:transform var(--list-item-expand-duration)}.panel-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--list-item-expand-duration) ease-out}.expandable-content{min-height:0;visibility:hidden;transform:translateY(-15px);margin:0 10px;transition:all var(--list-item-expand-duration)}:host([expanded]) .panel-container{padding-top:0;grid-template-rows:1fr}:host([expanded]) .expandable-content{visibility:visible;transform:translateY(0);margin:10px}:host([expanded]) .expand-icon{transform:rotate(90deg)}:host{--md-list-v2-gap:0;--md-list-v2-orientation:column;padding:0;margin:0;display:flex;flex-direction:var(--md-list-v2-orientation);gap:var(--md-list-v2-gap)}:host([orientation=horizontal]){--md-list-v2-orientation:row}:host([gap=sm]){--md-list-v2-gap:0.25rem}:host([gap=md]){--md-list-v2-gap:0.5rem}:host([gap=lg]){--md-list-v2-gap:1rem}`;var St,$t=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1,this.disabled=!1,this.variant="full-width",this.expandLabel="Expand"}render(){return y.html`
|
|
1037
|
+
`}};rt([(0,y.property)({type:String})],nt.prototype,"leadingLabel",void 0),rt([(0,y.property)({type:String})],nt.prototype,"closeButtonAriaLabel",void 0),rt([(0,y.property)({type:Boolean})],nt.prototype,"showCloseButton",void 0),rt([(0,y.property)({type:Array})],nt.prototype,"actions",void 0),nt=rt([(0,y.customElement)("md-floating-button-bar")],nt);var at=i(58871),lt=i(73093);class dt{constructor(){this.listeners=new Set}onChange(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}emitChange(){for(const t of Array.from(this.listeners))t(this)}}class ht extends dt{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.currentValue=t,this.validators=e,this.validate()}get value(){return this.currentValue}markAsTouched(){this.touched=!0,this.validate()}get valid(){return 0===this.validationErrors.length}get errors(){return this.touched?this.validationErrors:[]}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class pt extends dt{constructor(t){var e;super(),this.controls=t;for(const t of Object.keys(this.controls)){const i=this.controls[t];null===(e=i.onChange)||void 0===e||e.call(i,()=>this.emitChange())}}get(t){return this.controls[t]}get value(){const t={};for(const e in this.controls)t[e]=this.controls[e].value;return t}get valid(){return Object.values(this.controls).every(t=>t.valid)}validate(){for(const t of Object.values(this.controls))t.validate();this.emitChange()}markAllAsTouched(){Object.values(this.controls).forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}class ct extends dt{constructor(t){var e;super(),this.controls=t;for(const t of this.controls)null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange())}at(t){return this.controls[t]}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange()),this.emitChange()}removeAt(t){this.controls.splice(t,1),this.emitChange()}get value(){return this.controls.map(t=>t.value)}get valid(){return this.controls.every(t=>t.valid)}get length(){return this.controls.length}getControls(){return this.controls}validate(){this.controls.forEach(t=>t.validate()),this.emitChange()}markAllAsTouched(){this.controls.forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}const ut={required:()=>t=>null==t||"string"==typeof t&&""===t.trim()?{type:"required"}:null,minLength:t=>e=>e.length<t?{type:"minLength",count:t}:null,maxLength:t=>e=>e.length>t?{type:"maxLength",count:t}:null};var mt=i(97866),yt=i(69112),bt=i(20109),vt=i(52619),gt=i(96408),ft=i(6396),wt=i(19026),xt=i(90195),Ct=i(26283);const Et=y.css`:host{--list-item-border-radius:0;--list-item-expand-duration:400ms;--list-item-hover-bg-color:var(--md-button-secondary-hover-bg-color);--list-item-active-bg-color:var(--md-button-secondary-pressed-bg-color);--list-item-disabled-bg-color:none;--list-item-disabled-text-color:var(--md-textColor-disabled);--list-item-primary-label-color:var(--md-textColor-primary);--list-item-secondary-label-color:var(--md-textColor-secondary);--list-item-primary-label-font-size:14px;--list-item-secondary-label-font-size:12px;--list-item-bg-color:none;border-radius:var(--list-item-border-radius);background-color:var(--list-item-bg-color)}:host(:focus-visible){box-shadow:none!important}:host([variant=inset-rectangle]){--list-item-border-radius:0.5rem}:host([variant=inset-pill]){--list-item-border-radius:3.125rem}:host([disabled]){--list-item-primary-label-color:var(--list-item-disabled-text-color);--list-item-secondary-label-color:var(--list-item-disabled-text-color);--list-item-bg-color:var(--list-item-disabled-bg-color)}.header{border-radius:var(--list-item-border-radius);padding:.5rem;display:flex;justify-content:space-between;align-items:center;cursor:pointer}.header:hover:not(:disabled){background-color:var(--list-item-hover-bg-color)}.header:active:not(:disabled){background-color:var(--list-item-active-bg-color)}:host(:focus-visible) .header{box-shadow:0 0 0 .125rem var(--list-focus-border-color)}:host::part(header-leading),:host::part(header-trailing){display:flex;align-items:center;gap:.5rem}:host::part(primary-label),:host::part(secondary-label),:host::part(tertiary-label){display:block;line-height:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host::part(primary-label){font-size:var(--list-item-primary-label-font-size);color:var(--list-item-primary-label-color)}:host::part(secondary-label),:host::part(tertiary-label){font-size:var(--list-item-secondary-label-font-size);color:var(--list-item-secondary-label-color)}.expand-icon{transition:transform var(--list-item-expand-duration)}.panel-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--list-item-expand-duration) ease-out}.expandable-content{min-height:0;visibility:hidden;transform:translateY(-15px);margin:0 10px;transition:all var(--list-item-expand-duration)}:host([expanded]) .panel-container{padding-top:0;grid-template-rows:1fr}:host([expanded]) .expandable-content{visibility:visible;transform:translateY(0);margin:10px}:host([expanded]) .expand-icon{transform:rotate(90deg)}:host{--md-list-v2-gap:0;--md-list-v2-orientation:column;padding:0;margin:0;display:flex;flex-direction:var(--md-list-v2-orientation);gap:var(--md-list-v2-gap)}:host([orientation=horizontal]){--md-list-v2-orientation:row}:host([gap=sm]){--md-list-v2-gap:0.25rem}:host([gap=md]){--md-list-v2-gap:0.5rem}:host([gap=lg]){--md-list-v2-gap:1rem}`;var St,$t=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1,this.disabled=!1,this.variant="full-width",this.expandLabel="Expand"}render(){return y.html`
|
|
1038
1038
|
<slot name="content">
|
|
1039
1039
|
<div class="header">
|
|
1040
1040
|
<div part="header-leading">
|
|
@@ -1051,7 +1051,6 @@
|
|
|
1051
1051
|
<div class="expandable-content">
|
|
1052
1052
|
<slot
|
|
1053
1053
|
name="panel"
|
|
1054
|
-
@click=${this.stopEventPropagation}
|
|
1055
1054
|
@keyup=${this.stopArrowKeyEventPropagation}
|
|
1056
1055
|
@keydown=${this.stopArrowKeyEventPropagation}
|
|
1057
1056
|
></slot>
|
|
@@ -1086,7 +1085,7 @@
|
|
|
1086
1085
|
@click=${this.stopEventPropagation}
|
|
1087
1086
|
@keyup=${this.stopEventPropagation}
|
|
1088
1087
|
@keydown=${this.stopEventPropagation}
|
|
1089
|
-
></slot>`}stopArrowKeyEventPropagation(t){t instanceof KeyboardEvent&&(0,Ct.q)(t.key)&&t.stopPropagation()}isExpandCollapseKey(t){return t===xt.Uz.ArrowRight||t===xt.Uz.ArrowLeft}stopEventPropagation(t){(t instanceof KeyboardEvent&&((0,Ct.o)(t.key)||this.isExpandCollapseKey(t.key))||t instanceof MouseEvent)&&t.stopPropagation()}setExpanded(t){this.expanded=t,this.setAttribute("aria-expanded",String(this.expanded)),this.dispatchEvent(new CustomEvent("list-item-expanded",{bubbles:!0,detail:this.expanded}))}_handleExpand(t){t.stopPropagation(),this.expandable&&this.setExpanded(!this.expanded)}_handleListItemClick(){this.disabled||this.dispatchEvent(new CustomEvent("list-item-click",{bubbles:!0}))}_handleArrowKeyExpand(t){t.key!==xt.Uz.ArrowRight||this.expanded?t.key===xt.Uz.ArrowLeft&&this.expanded&&(t.stopPropagation(),this.setExpanded(!1)):(t.stopPropagation(),this.setExpanded(!0))}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem"),this.setAttribute("tabindex","0"),this.addEventListener("click",this._handleListItemClick),this.expandable&&this.addEventListener("keydown",this._handleArrowKeyExpand)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleListItemClick),this.removeEventListener("keydown",this._handleArrowKeyExpand)}static get styles(){return Et}};$t([(0,y.property)({type:String,reflect:!0})],e.prototype,"label",void 0),$t([(0,y.property)({type:String,reflect:!0,attribute:"secondary-label"})],e.prototype,"secondaryLabel",void 0),$t([(0,y.property)({type:String,reflect:!0,attribute:"tertiary-label"})],e.prototype,"tertiaryLabel",void 0),$t([(0,y.property)({type:Boolean})],e.prototype,"expandable",void 0),$t([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),$t([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),$t([(0,y.property)({type:String})],e.prototype,"variant",void 0),$t([(0,y.property)({type:String,attribute:"expand-label"})],e.prototype,"expandLabel",void 0),e=$t([(0,y.customElement)("md-list-item-v2")],e),t.ELEMENT=e}(St||(St={}));var Tt,kt=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.gap="none",this.orientation="vertical"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.addEventListener("keydown",this.handleKeyDown)}render(){return y.html` <slot @click=${this.handleMouseClick}></slot>`}get listItems(){return Array.from(this.assignedNodes).filter(t=>t instanceof St.ELEMENT&&!t.disabled)}handleMouseClick(t){const e=this.getCurrentIndex(t.target);this.resetTabIndexAndSetActiveTabIndex(e)}getNewIndexBasedOnKey(t,e,i){switch(t){case xt.Uz.ArrowDown:return(e+1)%i;case xt.Uz.ArrowUp:return(e-1+i)%i;case xt.Uz.Home:return 0;case xt.Uz.End:return i-1;default:return}}handleKeyDown(t){const
|
|
1088
|
+
></slot>`}stopArrowKeyEventPropagation(t){t instanceof KeyboardEvent&&(0,Ct.q)(t.key)&&t.stopPropagation()}isExpandCollapseKey(t){return t===xt.Uz.ArrowRight||t===xt.Uz.ArrowLeft}stopEventPropagation(t){(t instanceof KeyboardEvent&&((0,Ct.o)(t.key)||this.isExpandCollapseKey(t.key))||t instanceof MouseEvent)&&t.stopPropagation()}setExpanded(t){this.expanded=t,this.setAttribute("aria-expanded",String(this.expanded)),this.dispatchEvent(new CustomEvent("list-item-expanded",{bubbles:!0,detail:this.expanded}))}_handleExpand(t){t.stopPropagation(),this.expandable&&this.setExpanded(!this.expanded)}_handleListItemClick(t){const e=t.composedPath(),i=e[0];!e.includes(this.header)&&i!==this||this.disabled||this.dispatchEvent(new CustomEvent("list-item-click",{bubbles:!0}))}_handleArrowKeyExpand(t){t.key!==xt.Uz.ArrowRight||this.expanded?t.key===xt.Uz.ArrowLeft&&this.expanded&&(t.stopPropagation(),this.setExpanded(!1)):(t.stopPropagation(),this.setExpanded(!0))}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem"),this.setAttribute("tabindex","0"),this.addEventListener("click",this._handleListItemClick),this.expandable&&this.addEventListener("keydown",this._handleArrowKeyExpand)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleListItemClick),this.removeEventListener("keydown",this._handleArrowKeyExpand)}static get styles(){return Et}};$t([(0,y.property)({type:String,reflect:!0})],e.prototype,"label",void 0),$t([(0,y.property)({type:String,reflect:!0,attribute:"secondary-label"})],e.prototype,"secondaryLabel",void 0),$t([(0,y.property)({type:String,reflect:!0,attribute:"tertiary-label"})],e.prototype,"tertiaryLabel",void 0),$t([(0,y.property)({type:Boolean})],e.prototype,"expandable",void 0),$t([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),$t([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),$t([(0,y.property)({type:String})],e.prototype,"variant",void 0),$t([(0,y.property)({type:String,attribute:"expand-label"})],e.prototype,"expandLabel",void 0),$t([(0,y.query)(".header")],e.prototype,"header",void 0),e=$t([(0,y.customElement)("md-list-item-v2")],e),t.ELEMENT=e}(St||(St={}));var Tt,kt=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.gap="none",this.orientation="vertical"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.addEventListener("keydown",this.handleKeyDown)}render(){return y.html` <slot @click=${this.handleMouseClick}></slot>`}get listItems(){return Array.from(this.assignedNodes).filter(t=>t instanceof St.ELEMENT&&!t.disabled)}handleMouseClick(t){const e=this.getCurrentIndex(t.target);this.resetTabIndexAndSetActiveTabIndex(e)}getNewIndexBasedOnKey(t,e,i){switch(t){case xt.Uz.ArrowDown:return(e+1)%i;case xt.Uz.ArrowUp:return(e-1+i)%i;case xt.Uz.Home:return 0;case xt.Uz.End:return i-1;default:return}}handleKeyDown(t){var e;const i=this.getCurrentIndex(t.target),o=this.getNewIndexBasedOnKey(t.key,i,this.listItems.length);void 0!==o&&(null===(e=this.listItems[o])||void 0===e||e.focus(),this.resetTabIndexAndSetActiveTabIndex(o))}getCurrentIndex(t){return this.listItems.findIndex(e=>e===t||e===t.parentElement)}resetTabIndexAndSetActiveTabIndex(t){this.listItems.forEach((e,i)=>{const o=t===i?"0":"-1";e.setAttribute("tabindex",o)})}static get styles(){return Et}};kt([(0,y.property)({type:String})],e.prototype,"gap",void 0),kt([(0,y.property)({type:String})],e.prototype,"orientation",void 0),kt([(0,y.queryAssignedNodes)()],e.prototype,"assignedNodes",void 0),e=kt([(0,y.customElement)("md-list-v2")],e),t.ELEMENT=e}(Tt||(Tt={}));var At=i(68490),It=i(66245),Lt=i(69788),Ot=i(61997),Mt=i(11323),Dt=i(84032),Pt=i(48171),Rt=i(32252),_t=i(23026),Bt=i(84205),zt=i(71128),Ft=i(15300),Vt=i(58287),Nt=i(81144),jt=i(32217);const Ut=y.css`:host{width:100%;height:100%;display:block;background-color:var(--md-textColor-primary);opacity:.5}:host([variant=circle]){border-radius:50%}:host([variant=rectangular]){border-radius:0}:host([variant=rounded]){border-radius:.5rem}:host([animation=none]){animation:none}:host([animation=pulse]){animation:skeleton-pulse 2s ease-in-out infinite}@keyframes skeleton-pulse{0%{opacity:.5}50%{opacity:.25}100%{opacity:.5}}`;var qt,Ht=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.variant="rounded",this.animation="pulse"}render(){var t,e;return this.style.width=null!==(t=this.width)&&void 0!==t?t:this.style.width,this.style.height=null!==(e=this.height)&&void 0!==e?e:this.style.height,y.html`<slot></slot>`}static get styles(){return[Ut]}};Ht([(0,y.property)({type:String})],e.prototype,"width",void 0),Ht([(0,y.property)({type:String})],e.prototype,"height",void 0),Ht([(0,y.property)({reflect:!0})],e.prototype,"variant",void 0),Ht([(0,y.property)({reflect:!0})],e.prototype,"animation",void 0),e=Ht([(0,y.customElement)("md-skeleton")],e),t.ELEMENT=e}(qt||(qt={}));var Kt=i(25428),Wt=i(12176),Gt=i(77935),Yt=i(40428),Xt=i(16643),Zt=i(97737),Qt=i(50226),Jt=i(86610),te=i(1072),ee=i(49256),ie=i(20331),oe=i(81786),se=i(37719)},25428:(t,e,i)=>{i.d(e,{Slider:()=>o});var o,s=i(90195),r=i(3001),n=i(31890),a=i(26272),l=i(41488),d=i(40333),h=i(97822),p=i(22818),c=i(8229),u=i(61869),m=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends((0,r.yC)(l.LitElement)){constructor(){super(...arguments),this._disabled=!1,this._now=0,this.min=0,this.max=100,this.hideValue=!1,this.text=0,this.label="slider",this.step=0,this.dragging=!1}get now(){return this._now}set now(t){const e=this._now;t<this.min||t>this.max?console.warn("Please select correct value"):(this._now=Math.round(t),this.requestUpdate("now",e))}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.setAttribute("aria-disabled",`${t}`),this.tabIndex=t?-1:0,this.requestUpdate("disabled",e)}get pointerPosition(){const t=this.max-this.min;return(this.now-this.min)/t*100}get isRtl(){return"rtl"===getComputedStyle(this).direction}calculateHandlePosition(t){const{width:e,left:i}=this.getBoundingClientRect(),{clientX:o}=t;let s=(o-i)/e;return this.isRtl&&(s=1-s),this.min+(this.max-this.min)*s}moveSliderTo(t){this.disabled||(t>this.max?this.now=this.max:t<this.min?this.now=this.min:this.now=t)}trackMouseEvent(){if(!this.currentMouseEvent||!this.dragging)return;const t=this.calculateHandlePosition(this.currentMouseEvent),e=this.now;this.moveSliderTo(t),this.notifyChanging(e,this.now),requestAnimationFrame(()=>{this.trackMouseEvent()})}ticksTemplate(){const{min:t,max:e,step:i}=this,o=Math.round((e-t)/i),s=new Array(o+1).fill(0,0,o+1).map((e,o)=>t+o*i).filter(i=>i>=t&&i<=e);return l.html`
|
|
1090
1089
|
<div class="md-slider__hashlabel">${(0,p.repeat)(s,t=>l.html` <div class="tick">${t}</div> `)}</div>
|
|
1091
1090
|
`}displayValueTemplate(){return l.html` <span class="md-slider__value"> ${this.now} </span> `}notifyChanges(){this.dispatchEvent(new CustomEvent("slider-change",{bubbles:!0,composed:!0,detail:{value:this.now}}))}notifyChanging(t,e){t!==e&&this.dispatchEvent(new CustomEvent("slider-changing",{bubbles:!0,composed:!0,detail:{oldValue:t,newValue:e}}))}handleMouseDown(t){if(t.preventDefault(),this.disabled)return;const e=t=>{this.currentMouseEvent=t},i=t=>{this.focus(),this.currentMouseEvent=t,document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",i),requestAnimationFrame(()=>{this.dragging=!1,this.notifyChanges()})};document.addEventListener("mousemove",e),document.addEventListener("mouseup",i),this.focus(),this.dragging=!0,this.currentMouseEvent=t,requestAnimationFrame(()=>{this.trackMouseEvent()})}handleKeyDown(t){const{code:e}=t,i=this.now;switch(e){case s.Uz.ArrowLeft:this.moveSliderTo(this.now+(this.isRtl?1:-1));break;case s.Uz.ArrowRight:this.moveSliderTo(this.now+(this.isRtl?-1:1));break;case s.Uz.ArrowDown:this.moveSliderTo(this.now-1);break;case s.Uz.ArrowUp:this.moveSliderTo(this.now+1);break;case s.Uz.Home:this.moveSliderTo(this.min);break;case s.Uz.End:this.moveSliderTo(this.max)}this.notifyChanging(i,this.now);const o=()=>{document.removeEventListener("keyup",o),this.notifyChanges()};document.addEventListener("keyup",o)}get sliderPointerStyleMap(){return{"inset-inline-start":`${this.pointerPosition}%`}}get sliderSelectionStyleMap(){return{"inset-inline-end":`calc(100% - ${this.pointerPosition}%)`}}static get styles(){return[a.A,u.A]}firstUpdated(t){super.firstUpdated(t),this.setAttribute("tabindex",this.disabled?"-1":"0")}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mousedown",this.handleMouseDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mousedown",this.handleMouseDown)}render(){return l.html`
|
|
1092
1091
|
<div class="md-slider">
|
|
@@ -2659,7 +2658,7 @@
|
|
|
2659
2658
|
</div>
|
|
2660
2659
|
</div>
|
|
2661
2660
|
</div>
|
|
2662
|
-
`}};d([(0,n.property)({type:String})],e.prototype,"title",void 0),d([(0,n.property)({type:String})],e.prototype,"src",void 0),d([(0,n.property)({type:String})],e.prototype,"time",void 0),d([(0,n.property)({type:String})],e.prototype,"label",void 0),d([(0,n.property)({type:String})],e.prototype,"status",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"clickableTimestamp",void 0),d([(0,n.property)({type:String,reflect:!0,attribute:"self-label"})],e.prototype,"selfLabel",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"self",void 0),d([(0,n.property)({type:String,reflect:!0,attribute:"avatar-color"})],e.prototype,"avatarColor",void 0),d([(0,n.property)({type:String,reflect:!0,attribute:"avatar-type"})],e.prototype,"avatarType",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"avatar-size"})],e.prototype,"avatarSize",void 0),e=d([(0,s.w)("md-chat-message")],e),t.ELEMENT=e}(o||(o={}))},96408:(t,e,i)=>{i.d(e,{Input:()=>o}),i(20109),i(61200),i(6396),i(12176);var o,s=i(90195),r=i(31890),n=i(32972),a=i(26272),l=(i(32022),i(41488)),d=i(40333),h=i(23968),p=i(97822),c=i(22818),u=i(8229),m=i(21572),y=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;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.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 e}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(t){let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.input.blur(),this.isEditing=!1))}handleKeyDown(t){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}handleFocus(t){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:t}})))}handleMouseDown(t){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:t}})))}handleChange(t){var e;this.value=t.target.value,null===(e=this.control)||void 0===e||e.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:this.value}}))}handleBlur(t){var e;null===(e=this.control)||void 0===e||e.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}handleClear(t){if("keydown"===t.type){const{code:e}=t;if(e!==s.Uz.Space&&e!==s.Uz.Enter)return;t.preventDefault(),t.stopPropagation()}else"click"===t.type&&(t.preventDefault(),t.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:t}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(t)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var t;this.hasRightSlotContent=(null===(t=this.inputSectionRightSlot)||void 0===t?void 0:t.assignedNodes().length)>0}handleDropdownClick(t){t.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:t,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 t;return this.multiline?l.html`
|
|
2661
|
+
`}};d([(0,n.property)({type:String})],e.prototype,"title",void 0),d([(0,n.property)({type:String})],e.prototype,"src",void 0),d([(0,n.property)({type:String})],e.prototype,"time",void 0),d([(0,n.property)({type:String})],e.prototype,"label",void 0),d([(0,n.property)({type:String})],e.prototype,"status",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"clickableTimestamp",void 0),d([(0,n.property)({type:String,reflect:!0,attribute:"self-label"})],e.prototype,"selfLabel",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"self",void 0),d([(0,n.property)({type:String,reflect:!0,attribute:"avatar-color"})],e.prototype,"avatarColor",void 0),d([(0,n.property)({type:String,reflect:!0,attribute:"avatar-type"})],e.prototype,"avatarType",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"avatar-size"})],e.prototype,"avatarSize",void 0),e=d([(0,s.w)("md-chat-message")],e),t.ELEMENT=e}(o||(o={}))},96408:(t,e,i)=>{i.d(e,{Input:()=>o}),i(20109),i(61200),i(6396),i(12176);var o,s=i(90195),r=i(31890),n=i(32972),a=i(26272),l=(i(32022),i(41488)),d=i(40333),h=i(23968),p=i(97822),c=i(22818),u=i(8229),m=i(21572),y=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;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.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 e}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(t){let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.input.blur(),this.isEditing=!1))}handleKeyDown(t){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}handleFocus(t){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:t}})))}handleMouseDown(t){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:t}})))}handleChange(t){var e;this.value=t.target.value,null===(e=this.control)||void 0===e||e.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:this.value}}))}handleBlur(t){var e;null===(e=this.control)||void 0===e||e.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}handleClear(t){if("keydown"===t.type){const{code:e}=t;if(e!==s.Uz.Space&&e!==s.Uz.Enter)return;t.preventDefault(),t.stopPropagation()}else"click"===t.type&&(t.preventDefault(),t.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:t}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(t)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var t;this.hasRightSlotContent=(null===(t=this.inputSectionRightSlot)||void 0===t?void 0:t.assignedNodes().length)>0}handleDropdownClick(t){t.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:t,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 t;return this.multiline?l.html`
|
|
2663
2662
|
<textarea
|
|
2664
2663
|
part="input"
|
|
2665
2664
|
class="md-input ${(0,h.classMap)(this.inputTemplateClassMap)}"
|
|
@@ -2681,6 +2680,7 @@
|
|
|
2681
2680
|
placeholder=${this.placeholder}
|
|
2682
2681
|
?readonly=${this.readOnly}
|
|
2683
2682
|
maxlength=${(0,p.ifDefined)(this.maxLength)}
|
|
2683
|
+
autocomplete=${(0,p.ifDefined)(this.autocomplete)}
|
|
2684
2684
|
></textarea>
|
|
2685
2685
|
`:l.html`
|
|
2686
2686
|
<input
|
|
@@ -2711,6 +2711,7 @@
|
|
|
2711
2711
|
max=${(0,p.ifDefined)(this.max)}
|
|
2712
2712
|
maxlength=${(0,p.ifDefined)(this.maxLength)}
|
|
2713
2713
|
aria-haspopup=${(0,p.ifDefined)(this.showDropdown?"true":void 0)}
|
|
2714
|
+
autocomplete=${(0,p.ifDefined)(this.autocomplete)}
|
|
2714
2715
|
/>
|
|
2715
2716
|
`}inputLeftTemplate(){return this.searchable?l.html`
|
|
2716
2717
|
<div class="md-input__before">
|
|
@@ -2803,7 +2804,7 @@
|
|
|
2803
2804
|
</div>
|
|
2804
2805
|
${this.messagesTemplate()} ${this.secondaryLabelTemplate()} ${this.helpTextTemplate()}
|
|
2805
2806
|
</div>
|
|
2806
|
-
`}};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.internalProperty)()],i.prototype,"isEditing",void 0),y([(0,l.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,l.internalProperty)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,r.w)("md-input")],i),t.ELEMENT=i}(o||(o={}))},96798:(t,e,i)=>{i.d(e,{Button:()=>o});var o,s=i(73940),r=(i(12176),i(31890)),n=i(26283),a=i(26272),l=i(41488),d=i(40333),h=i(23968),p=i(97822),c=i(11740),u=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends l.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 l.html`
|
|
2807
|
+
`}};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.internalProperty)()],i.prototype,"isEditing",void 0),y([(0,l.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,l.internalProperty)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,r.w)("md-input")],i),t.ELEMENT=i}(o||(o={}))},96798:(t,e,i)=>{i.d(e,{Button:()=>o});var o,s=i(73940),r=(i(12176),i(31890)),n=i(26283),a=i(26272),l=i(41488),d=i(40333),h=i(23968),p=i(97822),c=i(11740),u=function(t,e,i,o){var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends l.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 l.html`
|
|
2807
2808
|
<style>
|
|
2808
2809
|
:host .md-button--${this.size} {
|
|
2809
2810
|
${this.renderWidth()};
|
|
@@ -20,7 +20,7 @@ export declare const iconPosition: string[];
|
|
|
20
20
|
export declare const nestedLevel: number[];
|
|
21
21
|
export declare const ariaInvalidType: string[];
|
|
22
22
|
export declare namespace Input {
|
|
23
|
-
export type Type = "text" | "number" | "password" | "email" | "tel" | "checkbox";
|
|
23
|
+
export type Type = "text" | "number" | "password" | "email" | "tel" | "checkbox" | "search";
|
|
24
24
|
export type MessageType = "error" | "success" | "warning" | "priority";
|
|
25
25
|
export type Message = {
|
|
26
26
|
type: MessageType;
|
|
@@ -33,6 +33,7 @@ export declare namespace Input {
|
|
|
33
33
|
export type InputType = typeof inputSize;
|
|
34
34
|
export type shape = typeof inputShape;
|
|
35
35
|
export type AriaInvalidType = (typeof ariaInvalidType)[number];
|
|
36
|
+
export type Autocomplete = "on" | "off";
|
|
36
37
|
export class MessageController {
|
|
37
38
|
determineMessageType(array: Input.Message[]): MessageType;
|
|
38
39
|
filterMessagesByType(array: Input.Message[], value: string): string[];
|
|
@@ -103,6 +104,7 @@ export declare namespace Input {
|
|
|
103
104
|
newMomentum: boolean;
|
|
104
105
|
control?: FormControl<unknown>;
|
|
105
106
|
disableUserTextInput: boolean;
|
|
107
|
+
autocomplete?: Autocomplete;
|
|
106
108
|
showDropdown: boolean;
|
|
107
109
|
dropdownExpanded: boolean;
|
|
108
110
|
dropdownAriaLabel: string;
|
|
@@ -3,6 +3,10 @@ import "@/components/icon/Icon";
|
|
|
3
3
|
import { LitElement } from "lit-element";
|
|
4
4
|
export declare namespace ListItemV2 {
|
|
5
5
|
type Variant = "full-width" | "inset-pill" | "inset-rectangle";
|
|
6
|
+
/**
|
|
7
|
+
* @fires list-item-click
|
|
8
|
+
* @fires list-item-expanded
|
|
9
|
+
*/
|
|
6
10
|
class ELEMENT extends LitElement {
|
|
7
11
|
/**
|
|
8
12
|
* The primary label of the list item.
|
|
@@ -39,6 +43,7 @@ export declare namespace ListItemV2 {
|
|
|
39
43
|
* The ARIA label for the expand button. Only use if `expandable` is true.
|
|
40
44
|
*/
|
|
41
45
|
expandLabel: string;
|
|
46
|
+
header: HTMLElement;
|
|
42
47
|
render(): import("lit-element").TemplateResult;
|
|
43
48
|
private renderExpandButton;
|
|
44
49
|
private renderLeadingControls;
|