@momentum-ui/web-components 2.7.1 → 2.7.4
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/chunks/md-13.js +1 -1
- package/dist/chunks/md-36.js +30 -5
- package/dist/chunks/md-62.js +1 -1
- package/dist/chunks/md-72.js +1 -1
- package/dist/chunks/md-83.js +10 -5
- package/dist/index-entry.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/components/combobox/ComboBox.d.ts +13 -0
- package/dist/types/components/timepicker/TimePicker.d.ts +1 -1
- package/dist/types/components/toggle-switch/ToggleSwitch.d.ts +4 -0
- package/package.json +1 -1
package/dist/chunks/md-13.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[13],{51:function(e,o,r){"use strict";r.r(o),r.d(o,"Label",(function(){return t}));var t,l=r(4),d=r(5),i=r(0),a=r(13),c=i.css`:host(:focus){box-shadow:none;outline:0}:host(md-checkbox){border-radius:.25rem;cursor:pointer;display:inline-flex;position:relative;vertical-align:middle}:host(md-checkbox) .checkbox-input{height:calc(1.25rem + .25rem);position:absolute;visibility:hidden;width:100%}:host(md-checkbox) .checkbox-label{cursor:pointer;display:inline-block;padding-left:2.25rem;padding-right:calc(.25rem / 2);position:relative;width:100%;z-index:1}:host(md-checkbox) .checkbox-label::before{background:var(--checkbox-bg-color,#fff);border:.0625rem solid var(--checkbox-border-color,#dedede);border-radius:.25rem;height:1.25rem;width:1.25rem}:host(md-checkbox) .checkbox-label::after,:host(md-checkbox) .checkbox-label::before{content:"";left:calc(.75rem * 1.25);position:absolute;top:50%;transform:translate(-50%,-50%)}:host([focus-visible]:not([disabled])){box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}:host(:hover:not([disabled])) .checkbox-label::before{background:var(--checkbox-hover-bg-color,#ededed);border:.0625rem solid var(--checkbox-hover-border-color,#dedede)}:host(:active:not([disabled])) .checkbox-label::before{background:var(--checkbox-pressed-bg-color,#dedede);border:.0625rem solid var(--checkbox-pressed-border-color,#ccc)}:host([disabled]){opacity:.4}:host([disabled]) .checkbox-label{cursor:not-allowed}:host([disabled]) .checkbox-label::before{background:var(--checkbox-hover-bg-color,#ededed);border:.0625rem solid var(--checkbox-hover-border-color,#dedede)}:host([aria-checked=true]) .checkbox-label::after{border:solid #fff;border-width:0 .12em .12em 0;display:block;height:.6em;transform:translateY(-65%) translateX(-50%) rotate(45deg);width:.35em}:host([aria-checked=true]) .checkbox-label::before{background:var(--checkbox-selected-bg-color,#00a0d1);border:.0625rem solid var(--checkbox-selected-border-color,#00a0d1)}:host([indeterminate]) .checkbox-label::after{border:solid #fff;border-width:0 0 .12em;display:block;height:.2em;transform:translateY(-85%) translateX(-50%) rotate(0);width:.75em}:host([indeterminate]) .checkbox-label::before{background:var(--checkbox-selected-bg-color,#00a0d1);border:.0625rem solid var(--checkbox-selected-border-color,#00a0d1)}:host([aria-checked=true]:hover:not([disabled])) .checkbox-label::before,:host([indeterminate]:hover:not([disabled])) .checkbox-label::before{background:var(--checkbox-selected-hover-bg-color,#007aa3);border-color:var(--checkbox-selected-hover-border-color,#007aa3)}:host([aria-checked=true]:active:not([disabled])) .checkbox-label::before,:host([indeterminate]:active:not([disabled])) .checkbox-label::before{background:var(--checkbox-selected-pressed-bg-color,#005e7d);border-color:var(--checkbox-selected-pressed-border-color,#005e7d)}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-checkbox:not(:last-child)){margin-bottom:calc(.25rem * 6)}:host([alignment=horizontal]) div{display:flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-checkbox:not(:last-child)){margin-right:calc(.25rem * 10)}:host{--radio-label-text-color:var(--radio-input-text-color, $lm-radio-input-text-color-light)}:host(md-radio) .md-radio-wrapper{max-height:1.4375rem;display:inline-flex}:host(md-radio) .md-radio-input{height:1.4375rem;position:absolute;visibility:hidden;width:100%}:host(md-radio) .md-radio-label{color:var(--md-primary-text-color,#121212);cursor:pointer;font-size:14px;line-height:1.4375rem;padding-left:calc(1.25rem * 1.8);padding-right:calc(.25rem / 2);pointer-events:none;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:calc(100%)}:host(md-radio) .md-radio-label::before{content:"";position:absolute;border:.0625rem solid var(--radio-input-border-color,#ccc);border-top-left-radius:50%;border-top-right-radius:50%;border-bottom-left-radius:50%;border-bottom-right-radius:50%;box-shadow:inset 0 0 0 .36rem var(--radio-input-bg-color,#fff),inset 0 0 0 1.25rem var(--radio-input-bg-color,#fff);box-sizing:border-box;height:1.25rem;left:.125rem;top:.0625rem;width:1.25rem}:host(:focus){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])){box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}:host(:hover:not([disabled])) .md-radio-label:before{border:.0625rem solid var(--radio-input-hover-border-color,#dedede);box-shadow:inset 0 0 0 .36rem var(--radio-input-hover-bg-color,#ccc),inset 0 0 0 1.25rem var(--radio-input-hover-bg-color,#ccc)}:host(:active:not([disabled])) .md-radio-label:before{border:.0625rem solid var(--radio-input-pressed-border-color,#ccc);box-shadow:inset 0 0 0 .36rem var(--radio-input-pressed-bg-color,#dedede),inset 0 0 0 1.25rem var(--radio-input-pressed-bg-color,#dedede)}:host([disabled]){cursor:not-allowed;opacity:.4}:host([disabled]) .md-radio-label:before{border:.0625rem solid var(--radio-input-hover-border-color,#dedede);box-shadow:inset 0 0 0 .36rem var(--radio-input-hover-bg-color,#ccc),inset 0 0 0 1.25rem var(--radio-input-hover-bg-color,#ccc)}:host([aria-checked=true]) .md-radio-label:before{border-color:var(--radio-input-selected-border-color,#00a0d1);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-bg-color,#00a0d1),inset 0 0 0 1.25rem #fff}:host([aria-checked=true]:hover:not([disabled])) .md-radio-label:before{border-color:var(--radio-input-selected-hover-border-color,#007aa3);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-hover-bg-color,#007aa3),inset 0 0 0 1.25rem #fff}:host([aria-checked=true]:active:not([disabled])) .md-radio-label:before{border-color:var(--radio-input-selected-pressed-border-color,#005e7d);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-pressed-bg-color,#005e7d),inset 0 0 0 1.25rem #fff}:host(md-radiogroup){display:flex}:host(md-radio){border-radius:.25rem;display:inline!important}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-radio){margin-bottom:calc(.25rem * 3)}:host([alignment=horizontal]) div{display:inline-flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-radio){margin-right:calc(.25rem * 8)}:host(md-label) .md-label{color:var(--label-color,#000);font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;line-height:1.25rem;display:flex}:host(md-label) .md-label.right{float:none!important;text-align:right}:host(md-label) .md-label.inline{margin:0 0 1rem 0;padding:.50391rem 0}:host(md-label) .md-label small{text-transform:capitalize}:host(md-label) .md-label span{font-size:inherit}:host(md-label) .md-secondary-label{color:var(--label-secondary,#545454);display:flex;flex-grow:1;font-size:.875rem;line-height:1.125rem;padding:.25rem 1rem 0}:host(.md-input__label.disabled) label,:host(.md-input__secondary-label.disabled) label{cursor:not-allowed}`,s=function(e,o,r,t){var l,d=arguments.length,i=d<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,o,r,t);else for(var a=e.length-1;a>=0;a--)(l=e[a])&&(i=(d<3?l(i):d>3?l(o,r,i):l(o,r))||i);return d>3&&i&&Object.defineProperty(o,r,i),i};!function(e){let o=class extends i.LitElement{constructor(){super(...arguments),this.label="",this.theme="",this.radioLabel=!1,this.checkboxLabel=!1,this.toggleSwitchLabel=!1,this.htmlFor="",this.active=!1,this.disabled=!1,this.indeterminate=!1,this.secondaryLabel=!1}static get styles(){return[l.a,c]}setFocus(){this.dispatchEvent(new CustomEvent("setFocus"))}get labelClassMap(){return{["md-label--"+this.theme]:!!this.theme,"md-radio__label":this.radioLabel,"md-checkbox__label":this.checkboxLabel,"md-secondary-label":this.secondaryLabel,active:this.active,disabled:this.disabled,indeterminate:this.indeterminate}}handleClick(e){this.setFocus(),this.dispatchEvent(new CustomEvent("label-click",{composed:!0,bubbles:!0,detail:{htmlFor:this.htmlFor}}))}render(){return i.html`
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[13],{51:function(e,o,r){"use strict";r.r(o),r.d(o,"Label",(function(){return t}));var t,l=r(4),d=r(5),i=r(0),a=r(13),c=i.css`:host(:focus){box-shadow:none;outline:0}:host(md-checkbox){border-radius:.25rem;cursor:pointer;display:inline-flex;position:relative;vertical-align:middle}:host(md-checkbox) .checkbox-input{height:calc(1.25rem + .25rem);position:absolute;visibility:hidden;width:100%}:host(md-checkbox) .checkbox-label{cursor:pointer;display:inline-block;padding-left:2.25rem;padding-right:calc(.25rem / 2);position:relative;width:100%;z-index:1}:host(md-checkbox) .checkbox-label::before{background:var(--checkbox-bg-color,#fff);border:.0625rem solid var(--checkbox-border-color,#dedede);border-radius:.25rem;height:1.25rem;width:1.25rem}:host(md-checkbox) .checkbox-label::after,:host(md-checkbox) .checkbox-label::before{content:"";left:calc(.75rem * 1.25);position:absolute;top:50%;transform:translate(-50%,-50%)}:host([focus-visible]:not([disabled])){box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}:host(:hover:not([disabled])) .checkbox-label::before{background:var(--checkbox-hover-bg-color,#ededed);border:.0625rem solid var(--checkbox-hover-border-color,#dedede)}:host(:active:not([disabled])) .checkbox-label::before{background:var(--checkbox-pressed-bg-color,#dedede);border:.0625rem solid var(--checkbox-pressed-border-color,#ccc)}:host([disabled]){opacity:.4}:host([disabled]) .checkbox-label{cursor:not-allowed}:host([disabled]) .checkbox-label::before{background:var(--checkbox-hover-bg-color,#ededed);border:.0625rem solid var(--checkbox-hover-border-color,#dedede)}:host([aria-checked=true]) .checkbox-label::after{border:solid #fff;border-width:0 .12em .12em 0;display:block;height:.6em;transform:translateY(-65%) translateX(-50%) rotate(45deg);width:.35em}:host([aria-checked=true]) .checkbox-label::before{background:var(--checkbox-selected-bg-color,#00a0d1);border:.0625rem solid var(--checkbox-selected-border-color,#00a0d1)}:host([indeterminate]) .checkbox-label::after{border:solid #fff;border-width:0 0 .12em;display:block;height:.2em;transform:translateY(-85%) translateX(-50%) rotate(0);width:.75em}:host([indeterminate]) .checkbox-label::before{background:var(--checkbox-selected-bg-color,#00a0d1);border:.0625rem solid var(--checkbox-selected-border-color,#00a0d1)}:host([aria-checked=true]:hover:not([disabled])) .checkbox-label::before,:host([indeterminate]:hover:not([disabled])) .checkbox-label::before{background:var(--checkbox-selected-hover-bg-color,#007aa3);border-color:var(--checkbox-selected-hover-border-color,#007aa3)}:host([aria-checked=true]:active:not([disabled])) .checkbox-label::before,:host([indeterminate]:active:not([disabled])) .checkbox-label::before{background:var(--checkbox-selected-pressed-bg-color,#005e7d);border-color:var(--checkbox-selected-pressed-border-color,#005e7d)}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-checkbox:not(:last-child)){margin-bottom:calc(.25rem * 6)}:host([alignment=horizontal]) div{display:flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-checkbox:not(:last-child)){margin-right:calc(.25rem * 10)}:host{--radio-label-text-color:var(--radio-input-text-color, $lm-radio-input-text-color-light)}:host(md-radio) .md-radio-wrapper{max-height:1.4375rem;display:inline-flex}:host(md-radio) .md-radio-input{height:1.4375rem;position:absolute;visibility:hidden;width:100%}:host(md-radio) .md-radio-label{color:var(--md-primary-text-color,#121212);cursor:pointer;font-size:14px;line-height:1.4375rem;padding-left:calc(1.25rem * 1.8);padding-right:calc(.25rem / 2);pointer-events:none;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:calc(100%)}:host(md-radio) .md-radio-label::before{content:"";position:absolute;border:.0625rem solid var(--radio-input-border-color,#ccc);border-top-left-radius:50%;border-top-right-radius:50%;border-bottom-left-radius:50%;border-bottom-right-radius:50%;box-shadow:inset 0 0 0 .36rem var(--radio-input-bg-color,#fff),inset 0 0 0 1.25rem var(--radio-input-bg-color,#fff);box-sizing:border-box;height:1.25rem;left:.125rem;top:.0625rem;width:1.25rem}:host(:focus){box-shadow:none;outline:0}:host([focus-visible]:not([disabled])){box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}:host(:hover:not([disabled])) .md-radio-label:before{border:.0625rem solid var(--radio-input-hover-border-color,#dedede);box-shadow:inset 0 0 0 .36rem var(--radio-input-hover-bg-color,#ccc),inset 0 0 0 1.25rem var(--radio-input-hover-bg-color,#ccc)}:host(:active:not([disabled])) .md-radio-label:before{border:.0625rem solid var(--radio-input-pressed-border-color,#ccc);box-shadow:inset 0 0 0 .36rem var(--radio-input-pressed-bg-color,#dedede),inset 0 0 0 1.25rem var(--radio-input-pressed-bg-color,#dedede)}:host([disabled]){cursor:not-allowed;opacity:.4}:host([disabled]) .md-radio-label:before{border:.0625rem solid var(--radio-input-hover-border-color,#dedede);box-shadow:inset 0 0 0 .36rem var(--radio-input-hover-bg-color,#ccc),inset 0 0 0 1.25rem var(--radio-input-hover-bg-color,#ccc)}:host([aria-checked=true]) .md-radio-label:before{border-color:var(--radio-input-selected-border-color,#00a0d1);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-bg-color,#00a0d1),inset 0 0 0 1.25rem #fff}:host([aria-checked=true]:hover:not([disabled])) .md-radio-label:before{border-color:var(--radio-input-selected-hover-border-color,#007aa3);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-hover-bg-color,#007aa3),inset 0 0 0 1.25rem #fff}:host([aria-checked=true]:active:not([disabled])) .md-radio-label:before{border-color:var(--radio-input-selected-pressed-border-color,#005e7d);box-shadow:inset 0 0 0 .36rem var(--radio-input-selected-pressed-bg-color,#005e7d),inset 0 0 0 1.25rem #fff}:host(md-radiogroup){display:flex}:host(md-radio){border-radius:.25rem;display:inline!important}:host([alignment=vertical]) div{display:inline-flex;flex-direction:column}:host([alignment=vertical]) div ::slotted(md-radio){margin-bottom:calc(.25rem * 3)}:host([alignment=horizontal]) div{display:inline-flex;flex-direction:row}:host([alignment=horizontal]) div ::slotted(md-radio){margin-right:calc(.25rem * 8)}:host(md-label) .md-label{color:var(--label-color,#000);font-family:"CiscoSansTT Regular","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;line-height:1.25rem;display:flex;align-items:center}:host(md-label) .md-label.right{float:none!important;text-align:right}:host(md-label) .md-label.inline{margin:0 0 1rem 0;padding:.50391rem 0}:host(md-label) .md-label small{text-transform:capitalize}:host(md-label) .md-label span{font-size:inherit}:host(md-label) .md-secondary-label{color:var(--label-secondary,#545454);display:flex;flex-grow:1;font-size:.875rem;line-height:1.125rem;padding:.25rem 1rem 0}:host(.md-input__label.disabled) label,:host(.md-input__secondary-label.disabled) label{cursor:not-allowed}`,s=function(e,o,r,t){var l,d=arguments.length,i=d<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,o,r,t);else for(var a=e.length-1;a>=0;a--)(l=e[a])&&(i=(d<3?l(i):d>3?l(o,r,i):l(o,r))||i);return d>3&&i&&Object.defineProperty(o,r,i),i};!function(e){let o=class extends i.LitElement{constructor(){super(...arguments),this.label="",this.theme="",this.radioLabel=!1,this.checkboxLabel=!1,this.toggleSwitchLabel=!1,this.htmlFor="",this.active=!1,this.disabled=!1,this.indeterminate=!1,this.secondaryLabel=!1}static get styles(){return[l.a,c]}setFocus(){this.dispatchEvent(new CustomEvent("setFocus"))}get labelClassMap(){return{["md-label--"+this.theme]:!!this.theme,"md-radio__label":this.radioLabel,"md-checkbox__label":this.checkboxLabel,"md-secondary-label":this.secondaryLabel,active:this.active,disabled:this.disabled,indeterminate:this.indeterminate}}handleClick(e){this.setFocus(),this.dispatchEvent(new CustomEvent("label-click",{composed:!0,bubbles:!0,detail:{htmlFor:this.htmlFor}}))}render(){return i.html`
|
|
2
2
|
<label
|
|
3
3
|
@click="${e=>this.handleClick(e)}"
|
|
4
4
|
class="md-label ${Object(a.classMap)(this.labelClassMap)}"
|
package/dist/chunks/md-36.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[36],{77:function(t,e,o){"use strict";o.r(e),o.d(e,"ComboBox",(function(){return i}));o(50),o(15);var i,s=o(1),l=o(7),n=o(5),r=o(18),c=o(4),a=o(0),d=o(2),p=o(3),h=o(6),u=o(14),b=o(9),m=o(123),x=a.css`:host{--combobox-input-clear-bg:var(--combobox-group-button-bg-color, $lm-combobox-group-button-bg-color-light)}:host() .group{background:var(--combobox-bg-color,#fff)}:host(:focus){box-shadow:none!important;outline:0!important}:host([focus-visible]) .group{border-color:var(--combobox-focus-border-color,#005e7d);box-shadow:none}:host([disabled]) .group,:host([disabled]) .group:active,:host([disabled]) .group:hover{background:var(--combobox-disabled-bg-color,#ededed);pointer-events:none}:host([disabled]) .group:active>md-icon,:host([disabled]) .group:hover>md-icon,:host([disabled]) .group>md-icon{opacity:.3}:host([expanded]) .md-combobox-button.arrow-down{transform:rotate(180deg)}:host([invalid]) .group,:host([invalid]) .group:active,:host([invalid]) .group:hover{background:var(--combobox-invalid-bg-color,#ffe8e3);border-color:var(--combobox-invalid-border-color,#f7644a)}:host([invalid]) .md-combobox-error{padding:.1875rem 0 0 .75rem}.md-combobox-list{position:relative;height:2rem}.md-combobox .group{align-items:start;background:var(--combobox-bg-color,#fff);border:1px solid var(--combobox-border-color,#b2b2b2);border-radius:var(--combobox-group-radius,.25rem);display:flex;padding:0 .75rem;height:2.125rem}.md-combobox .group md-icon{color:var(--md-secondary-text-color,#545454);cursor:pointer;fill:var(--md-secondary-text-color,#545454);height:1.75rem;padding:calc(.25rem / 2)}.md-combobox .group md-icon:focus{box-shadow:none;outline:0;box-shadow:0 0 0 .125rem var(--md-focus-border-color,#91ebff)}.md-combobox .group:hover{background:var(--combobox-hover-bg-color,#dedede)}.md-combobox .group:active{background:var(--combobox-pressed-bg-color,#ccc)}.md-combobox .group.multiselect:hover{background:var(--combobox-bg-color,#fff)}.md-combobox .group.multiselect:active{background:var(--combobox-bg-color,#fff)}.md-combobox .md-combobox-button[disabled] md-icon{color:var(--md-disabled-text-color,#b2b2b2)}.md-combobox--pill .group{border-radius:18px}.md-combobox-button{transition:all .15s linear;background:0 0;border:0;cursor:pointer;margin:0;margin-left:calc(.25rem * 2);outline:0;padding:0;padding-top:calc(.25rem / 2);position:relative;vertical-align:bottom;height:inherit;display:flex}.md-combobox-button .md-input__icon-clear{display:flex;align-items:center;height:inherit}.md-combobox-button md-icon{color:var(--combobox-dropdown-item-icon-color,#121212)}.md-combobox-button.arrow-down:focus,.md-combobox-button.clear:focus{outline:2px solid var(--button-focus-ring-color,#007aa3)}ul{background-color:var(--combobox-dropdown-bg-color,#fff);border:1px solid var(--combobox-border-color,#b2b2b2);border-radius:.5rem;box-shadow:0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16);box-sizing:border-box;font-size:14px;left:0;list-style:none;margin:0;overflow:auto;overflow-x:hidden;padding:0;position:absolute;top:calc(100% + .25rem);width:100%}ul .no-result{padding:.4375rem .75rem .5rem}.md-combobox-multi-input{width:initial}.highlight-text{font-weight:700}.selected-label-text{white-space:pre-wrap}.group-label{font-weight:400;font-size:14px;line-height:19px;color:var(--combobox-group-label-color);padding:9px 16px;border-top:1px solid var(--combobox-group-label-border-color);border-bottom:1px solid var(--combobox-group-label-border-color);display:block;width:100%;background-color:var(--combobox-group-label-bg-color)}.group-label:hover{background:unset}.md-combobox-option{align-items:center;color:var(--md-primary-text-color,#f7f7f7);display:flex;margin:0;outline:0;padding:.4375rem .75rem .5rem;width:100%}.md-combobox-option .select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;display:block;letter-spacing:normal;width:calc(100% - 1.25rem)}.md-combobox-option .select-label span{margin-right:-.25rem;white-space:nowrap}.md-combobox-option .select-option{background:var(--combobox-dropdown-item-select-bg-color,#fff);border:1px solid var(--combobox-border-color,#b2b2b2);border-radius:calc(.5rem / 2);box-sizing:border-box;cursor:pointer;display:inline-block;height:1.25rem;margin-right:1rem;min-width:1.25rem;position:relative}.md-combobox-option .select-option md-icon{height:1.125rem;left:.125rem;position:absolute;top:-.1875rem;vertical-align:top;visibility:hidden}.md-combobox-option .indeterminate{background:var(--combobox-dropdown-item-checked-bg-color,#00a0d1);border:1px solid var(--combobox-dropdown-item-checked-bg-color,#00a0d1)}.md-combobox-option .indeterminate md-icon{color:var(--combobox-dropdown-item-checked-icon-color,#fff);visibility:visible}.md-combobox-option:hover{background:var(--combobox-dropdown-item-hover-bg-color,#c9f4ff)}.md-combobox-option.md-combobox-multiselect{border-bottom:1px solid var(--md-button-tertiary-outline-color,#545454)}.md-combobox-option[aria-checked=true] .select-option{background:var(--combobox-dropdown-item-checked-bg-color,#00a0d1);border:1px solid var(--combobox-dropdown-item-checked-bg-color,#00a0d1)}.md-combobox-option[aria-checked=true] .select-option md-icon{color:var(--combobox-dropdown-item-checked-icon-color,#fff);visibility:visible}.md-combobox-option[focused]{background:var(--combobox-dropdown-item-focus-bg-color,#91ebff)}.md-combobox__multiwrap{align-items:center;display:inline-flex;flex:1 1 auto;margin-left:0;max-height:calc(1.25rem * 4.5)}.md-combobox__multiwrap .selected-count{color:var(--md-primary-text-color,#f7f7f7)}.md-combobox__multiwrap .md-combobox-selected-item{align-items:center;background:var(--combobox-selected-bg-color,#dedede);border:1px solid var(--combobox-selected-border-color,#ccc);border-radius:.875rem;box-sizing:border-box;cursor:pointer;display:flex;font-size:12px;margin-bottom:calc(.25rem / 2);margin-right:.25rem;margin-top:.25rem;max-height:1.5rem;padding:0 .75rem}.md-combobox__multiwrap .md-combobox-selected-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;max-width:calc(1.25rem * 4)}.md-combobox__multiwrap .md-combobox-selected-item .remove-item{height:1.5rem}.md-combobox__multiwrap .md-combobox-selected-item:hover{background:var(--combobox-selected-hover,#b2b2b2)}.md-combobox__multiwrap .md-combobox-selected-item[selected]{background:var(--combobox-selected-hover,#b2b2b2)}.md-combobox__multiwrap input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;color:var(--md-secondary-text-color,#545454);display:inline-block;flex:1 1 auto;height:2rem;outline:0}.md-combobox__multiwrap ::input-placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:calc(100%)}.md-combobox__multiwrap .remove-item{padding-left:calc(.25rem * 3)}.md-combobox-searchable .md-combobox__multiwrap{margin-left:calc(.25rem * 3)}`,g=function(t,e,o,i){var s,l=arguments.length,n=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,i);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,o,n):s(e,o))||n);return l>3&&n&&Object.defineProperty(e,o,n),n},f=function(t,e,o,i){return new(o||(o=Promise))((function(s,l){function n(t){try{c(i.next(t))}catch(t){l(t)}}function r(t){try{c(i.throw(t))}catch(t){l(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(n,r)}c((i=i.apply(t,e||[])).next())}))};!function(t){let e=class extends(Object(l.a)(a.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="Combobox Input",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showSelectedCount=!1,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=Object(r.b)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.notifyInputValueChanged=Object(r.b)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}}))},250),this.handleOutsideClick=t=>{let e=!1;const o=t.composedPath();o.length&&(e=!!o.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){const e=this._focusedIndex;if(this.lists){const o=this.lists[e];o&&o.toggleAttribute("focused",!1);const i=this.lists[t];i&&i.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",e)}firstUpdated(t){super.firstUpdated(t),this.setAttribute("tabindex","0"),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&this.expanded&&this.resizeListbox(),t.has("focusedIndex")&&this.focusedIndex>=0&&this.scrollToOption(),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox())}handleFocusIn(t){this.disabled||(requestAnimationFrame(()=>{this.input.focus()}),this.selectWhenInFocus&&this.input.select(),super.handleFocusIn&&super.handleFocusIn(t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){super.handleFocusOut&&super.handleFocusOut(t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const t=this.value[0],e=this.findFilteredOption(t);-1!==e&&(this.setSelectedOption(t),this.setInputValue(this.getOptionValue(t)),this.focusedIndex=e)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")];let e=[];for(const o of t){const t=o.getAttribute("label"),i=[...o.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const o of i){const i=o.getAttribute("aria-label"),s=o.getAttribute("display-value"),l=o.getAttribute("slot");i&&s&&e.push({[this.optionId]:i,[this.optionValue]:s,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),o=t.getAttribute("display-value");if(e&&o)return{[this.optionId]:e,[this.optionValue]:o}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();return[...this.lists].findIndex(t=>e.includes(t))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?e.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel){return!!e.find(e=>{if("string"!=typeof t&&"string"!=typeof e)return t.groupName===e.groupName&&"false"===e.isLabel})}return!0}):e}return this.options}resizeListbox(){this.updateOnNextFrame(()=>{var t;if(this.lists){const t=[...this.lists].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0);this.listBox&&(this.listBox.style.maxHeight=t+"px")}if(this.labels&&this.lists){const t=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),e=[...this.lists].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0);this.listBox&&(this.listBox.style.maxHeight=e+t+"px")}if(this.showCustomError){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=e.clientHeight+"px",this.listBox.style.maxHeight=e.clientHeight+"px")}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let o=0;const{top:i,bottom:s}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();n.bottom>s?o=n.bottom-s+2:r.top<i&&(o=r.top-i-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=o})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return f(this,void 0,void 0,(function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()})}))}handleSelectAll(){return f(this,void 0,void 0,(function*(){(0===this.selectedOptions.length||this.isSelectAllSelected())&&(this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions}))}))}handleInputKeyUp(t){switch(t.code){case s.a.Escape:return;case s.a.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case s.a.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e,this.notifyInputValueChanged(e)}removeAllSelected(){this.focusedIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),o=this.filteredOptions.indexOf(t);-1!==o&&this.unCheckedOption(o),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus()})}selectedChange(t){const{event:e}=t.detail;let o=this.findOptionIndex(e);if(-1!==o){this.focusedIndex=o,this.isMulti&&this.allowSelectAll&&(o-=1);const t=this.getFocusedItem(o);t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):this.setInputValue(this.getOptionValue(t)))}}shouldChangeButton(){return this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{this.focusedIndex=this.filteredOptions.length-1;const t=this.getFocusedItem(this.focusedIndex);t&&this.setInputValue(this.getOptionValue(t))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleInputKeyDown(t){switch(t.code){case s.a.Backspace:this.focusedIndex=-1;break;case s.a.Tab:case s.a.Enter:this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{const t=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);if(this.allowCustomValue&&this.input&&this.input.value.length){if(-1===this.findFilteredOption(this.inputValue))return void this.setCustomValue()}t&&(this.setSelectedOption(t),this.showSelectedCount||this.setInputValue(this.getOptionValue(t))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()});break;case s.a.ArrowDown:this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const t=this.getFocusedItem(this.focusedIndex);!this.showSelectedCount&&t&&this.setInputValue(this.getOptionValue(t))});break;case s.a.ArrowUp:this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const t=this.getFocusedItem(this.focusedIndex);t&&!this.showSelectedCount&&this.setInputValue(this.getOptionValue(t))});break;case s.a.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),this.focusedIndex=-1,this.removeAllSelected());break;case s.a.Home:this.setInputSelectionRange(0,0);break;case s.a.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case s.a.Space:if(this.isMulti){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||this.setInputValue()),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,o;if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const i=null===(o=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===o?void 0:o.parentElement;if(i){const t=i.querySelector(".md-combobox-listbox");Object(m.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):this.setVisualListbox(!0),this.input.focus()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents();this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[c.a,x]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"false"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{["md-combobox--"+this.shape]:!!this.shape,"md-combobox-searchable":this.searchable}}searchIconTemplate(){return a.html`
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[36],{77:function(t,e,o){"use strict";o.r(e),o.d(e,"ComboBox",(function(){return i}));o(50),o(15);var i,s=o(1),l=o(7),n=o(5),r=o(18),c=o(4),a=o(0),d=o(2),p=o(3),h=o(6),u=o(14),b=o(9),m=o(123),x=a.css`:host{--combobox-input-clear-bg:var(--combobox-group-button-bg-color, $lm-combobox-group-button-bg-color-light)}:host() .group{background:var(--combobox-bg-color,#fff)}:host(:focus){box-shadow:none!important;outline:0!important}:host([focus-visible]) .group{border-color:var(--combobox-focus-border-color,#005e7d);box-shadow:none}:host([disabled]) .group,:host([disabled]) .group:active,:host([disabled]) .group:hover{background:var(--combobox-disabled-bg-color,#ededed);pointer-events:none}:host([disabled]) .group:active>md-icon,:host([disabled]) .group:hover>md-icon,:host([disabled]) .group>md-icon{opacity:.3}:host([expanded]) .md-combobox-button.arrow-down{transform:rotate(180deg)}:host([invalid]) .group,:host([invalid]) .group:active,:host([invalid]) .group:hover{background:var(--combobox-invalid-bg-color,#ffe8e3);border-color:var(--combobox-invalid-border-color,#f7644a)}:host([invalid]) .md-combobox-error{padding:.1875rem 0 0 .75rem}.md-combobox-list{position:relative;height:2rem}.md-combobox .group{align-items:start;background:var(--combobox-bg-color,#fff);border:1px solid var(--combobox-border-color,#b2b2b2);border-radius:var(--combobox-group-radius,.25rem);display:flex;padding:0 .75rem;height:2.125rem}.md-combobox .group md-icon{color:var(--md-secondary-text-color,#545454);cursor:pointer;fill:var(--md-secondary-text-color,#545454);height:1.75rem;padding:calc(.25rem / 2)}.md-combobox .group md-icon:focus{box-shadow:none;outline:0;box-shadow:0 0 0 .125rem var(--md-focus-border-color,#91ebff)}.md-combobox .group:hover{background:var(--combobox-hover-bg-color,#dedede)}.md-combobox .group:active{background:var(--combobox-pressed-bg-color,#ccc)}.md-combobox .group.multiselect:hover{background:var(--combobox-bg-color,#fff)}.md-combobox .group.multiselect:active{background:var(--combobox-bg-color,#fff)}.md-combobox .md-combobox-button[disabled] md-icon{color:var(--md-disabled-text-color,#b2b2b2)}.md-combobox--pill .group{border-radius:18px}.md-combobox-button{transition:all .15s linear;background:0 0;border:0;cursor:pointer;margin:0;margin-left:calc(.25rem * 2);outline:0;padding:0;padding-top:calc(.25rem / 2);position:relative;vertical-align:bottom;height:inherit;display:flex}.md-combobox-button .md-input__icon-clear{display:flex;align-items:center;height:inherit}.md-combobox-button md-icon{color:var(--combobox-dropdown-item-icon-color,#121212)}.md-combobox-button.arrow-down:focus,.md-combobox-button.clear:focus{outline:2px solid var(--button-focus-ring-color,#007aa3)}ul{background-color:var(--combobox-dropdown-bg-color,#fff);border:1px solid var(--combobox-border-color,#b2b2b2);border-radius:.5rem;box-shadow:0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16);box-sizing:border-box;font-size:14px;left:0;list-style:none;margin:0;overflow:auto;overflow-x:hidden;padding:0;position:absolute;top:calc(100% + .25rem);width:100%}ul .no-result{padding:.4375rem .75rem .5rem}.md-combobox-multi-input{width:initial}.highlight-text{font-weight:700}.selected-label-text{white-space:pre-wrap}.group-label{justify-content:space-between;font-weight:400;font-size:14px;line-height:19px;color:var(--combobox-group-label-color);padding:.4375rem .75rem .5rem;border-bottom:1px solid var(--combobox-group-label-border-color);display:flex;width:100%;background-color:var(--combobox-group-label-bg-color)}.group-label:hover{background:unset}.group-label[focused]{background:var(--combobox-dropdown-item-focus-bg-color,#91ebff)}.md-combobox-option{align-items:center;color:var(--md-primary-text-color,#f7f7f7);display:flex;margin:0;outline:0;padding:.4375rem .75rem .5rem;width:100%}.md-combobox-option .select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;display:block;letter-spacing:normal;width:calc(100% - 1.25rem)}.md-combobox-option .select-label span{margin-right:-.25rem;white-space:nowrap}.md-combobox-option .select-option{background:var(--combobox-dropdown-item-select-bg-color,#fff);border:1px solid var(--combobox-border-color,#b2b2b2);border-radius:calc(.5rem / 2);box-sizing:border-box;cursor:pointer;display:inline-block;height:1.25rem;margin-right:1rem;min-width:1.25rem;position:relative}.md-combobox-option .select-option md-icon{height:1.125rem;left:.125rem;position:absolute;top:-.1875rem;vertical-align:top;visibility:hidden}.md-combobox-option .indeterminate{background:var(--combobox-dropdown-item-checked-bg-color,#00a0d1);border:1px solid var(--combobox-dropdown-item-checked-bg-color,#00a0d1)}.md-combobox-option .indeterminate md-icon{color:var(--combobox-dropdown-item-checked-icon-color,#fff);visibility:visible}.md-combobox-option:hover{background:var(--combobox-dropdown-item-hover-bg-color,#c9f4ff)}.md-combobox-option.md-combobox-multiselect{border-bottom:1px solid var(--md-button-tertiary-outline-color,#545454)}.md-combobox-option[aria-checked=true] .select-option{background:var(--combobox-dropdown-item-checked-bg-color,#00a0d1);border:1px solid var(--combobox-dropdown-item-checked-bg-color,#00a0d1)}.md-combobox-option[aria-checked=true] .select-option md-icon{color:var(--combobox-dropdown-item-checked-icon-color,#fff);visibility:visible}.md-combobox-option[focused]{background:var(--combobox-dropdown-item-focus-bg-color,#91ebff)}.md-combobox__multiwrap{align-items:center;display:inline-flex;flex:1 1 auto;margin-left:0;max-height:calc(1.25rem * 4.5)}.md-combobox__multiwrap .selected-count{color:var(--md-primary-text-color,#f7f7f7)}.md-combobox__multiwrap .md-combobox-selected-item{align-items:center;background:var(--combobox-selected-bg-color,#dedede);border:1px solid var(--combobox-selected-border-color,#ccc);border-radius:.875rem;box-sizing:border-box;cursor:pointer;display:flex;font-size:12px;margin-bottom:calc(.25rem / 2);margin-right:.25rem;margin-top:.25rem;max-height:1.5rem;padding:0 .75rem}.md-combobox__multiwrap .md-combobox-selected-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;max-width:calc(1.25rem * 4)}.md-combobox__multiwrap .md-combobox-selected-item .remove-item{height:1.5rem}.md-combobox__multiwrap .md-combobox-selected-item:hover{background:var(--combobox-selected-hover,#b2b2b2)}.md-combobox__multiwrap .md-combobox-selected-item[selected]{background:var(--combobox-selected-hover,#b2b2b2)}.md-combobox__multiwrap input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;color:var(--md-secondary-text-color,#545454);display:inline-block;flex:1 1 auto;height:2rem;outline:0}.md-combobox__multiwrap ::input-placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:calc(100%)}.md-combobox__multiwrap .remove-item{padding-left:calc(.25rem * 3)}.md-combobox-searchable .md-combobox__multiwrap{margin-left:calc(.25rem * 3)}`,g=function(t,e,o,i){var s,l=arguments.length,n=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,i);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,o,n):s(e,o))||n);return l>3&&n&&Object.defineProperty(e,o,n),n},f=function(t,e,o,i){return new(o||(o=Promise))((function(s,l){function n(t){try{c(i.next(t))}catch(t){l(t)}}function r(t){try{c(i.throw(t))}catch(t){l(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(n,r)}c((i=i.apply(t,e||[])).next())}))};!function(t){let e=class extends(Object(l.a)(a.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="Combobox Input",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showSelectedCount=!1,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=Object(r.b)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>{if("string"!=typeof e&&"true"===e.isLabel){return!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel})}return!0})},this.notifyInputValueChanged=Object(r.b)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}}))},250),this.handleOutsideClick=t=>{let e=!1;const o=t.composedPath();o.length&&(e=!!o.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){const e=this._focusedIndex;if(this.lists){const o=this.lists[e];o&&o.toggleAttribute("focused",!1);const i=this.lists[t];i&&i.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",e)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const o=this.labels[e];o&&o.toggleAttribute("focused",!1);const i=this.labels[t];i&&(i.toggleAttribute("focused",!0),i.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}firstUpdated(t){super.firstUpdated(t),this.setAttribute("tabindex","0"),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&this.expanded&&this.resizeListbox(),t.has("focusedIndex")&&this.focusedIndex>=0&&this.scrollToOption(),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){this.disabled||(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select(),super.handleFocusIn&&super.handleFocusIn(t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){super.handleFocusOut&&super.handleFocusOut(t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const t=this.value[0],e=this.findFilteredOption(t);-1!==e&&(this.setSelectedOption(t),this.setInputValue(this.getOptionValue(t)),this.focusedIndex=e,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const o of t){const t=o.getAttribute("label"),i=[...o.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const o of i){const i=o.getAttribute("aria-label"),s=o.getAttribute("display-value"),l=o.getAttribute("slot");i&&s&&e.push({[this.optionId]:i,[this.optionValue]:s,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),o=t.getAttribute("display-value");if(e&&o)return{[this.optionId]:e,[this.optionValue]:o}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();return[...this.lists].findIndex(t=>e.includes(t))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,o=0;if(this.lists&&(e=[...this.lists].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.labels&&(o=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=e+o+10+"px"),this.showCustomError){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=e.clientHeight+2+"px",this.listBox.style.maxHeight=e.clientHeight+2+"px")}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let o=0;const{top:i,bottom:s}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>s?o=n.bottom-s+2:(null==r?void 0:r.top)<i&&(o=r.top-i-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=o})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return f(this,void 0,void 0,(function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}))}handleSelectAll(){return f(this,void 0,void 0,(function*(){(0===this.selectedOptions.length||this.isSelectAllSelected())&&(this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions}))}))}handleInputKeyUp(t){switch(t.code){case s.a.Escape:return;case s.a.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case s.a.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e,this.notifyInputValueChanged(e)}removeAllSelected(){this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),o=this.filteredOptions.indexOf(t);-1!==o&&this.unCheckedOption(o),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){const{event:e}=t.detail;let o=this.findOptionIndex(e);if(-1!==o){this.focusedIndex=o,this.isMulti&&this.allowSelectAll&&(o-=1);const t=this.getFocusedItem(o);t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):this.setInputValue(this.getOptionValue(t)))}}shouldChangeButton(){return this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{this.focusedIndex=this.filteredOptions.length-1;const t=this.getFocusedItem(this.focusedIndex);t&&this.setInputValue(this.getOptionValue(t))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){switch(t.code){case s.a.Backspace:this.focusedIndex=-1;break;case s.a.Tab:case s.a.Enter:this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{const t=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);if(this.allowCustomValue&&this.input&&this.input.value.length){if(-1===this.findFilteredOption(this.inputValue))return void this.setCustomValue()}t&&(this.setSelectedOption(t),this.showSelectedCount||this.setInputValue(this.getOptionValue(t))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()});break;case s.a.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const t=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(t)],!this.showSelectedCount&&t&&this.setInputValue(this.getOptionValue(t)),this.focusedGroupIndex=-1});break;case s.a.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const t=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(t)],t&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(t)),this.focusedGroupIndex=-1)});break;case s.a.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected());break;case s.a.Home:this.setInputSelectionRange(0,0);break;case s.a.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case s.a.Space:if(this.isMulti){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||this.setInputValue()),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}break;default:this.setVisualListbox(!0)}}handleGroupLabelKeyDown(t,e){switch(t.code){case s.a.Tab:this.handleGroupFocus();break;case s.a.Enter:case s.a.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{const t=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);t&&(this.setSelectedOption(t),this.showSelectedCount||(this.setInputValue(this.getOptionValue(t)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case s.a.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const t=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(t)],!this.showSelectedCount&&t&&this.setInputValue(this.getOptionValue(t)),this.focusedGroupIndex=-1});break;case s.a.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const t=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(t)],t&&!this.showSelectedCount&&this.setInputValue(this.getOptionValue(t))});break;case s.a.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,o;if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const i=null===(o=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===o?void 0:o.parentElement;if(i){const t=i.querySelector(".md-combobox-listbox");Object(m.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):this.setVisualListbox(!0),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents();this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[c.a,x]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{["md-combobox--"+this.shape]:!!this.shape,"md-combobox-searchable":this.searchable}}searchIconTemplate(){return a.html`
|
|
2
2
|
<md-icon name="icon-search_16" @click=${this.toggleVisualListBox}></md-icon>
|
|
3
3
|
`}selectedOptionTemplate(t){return a.html`
|
|
4
4
|
<div class="md-combobox-selected-item">
|
|
@@ -31,6 +31,18 @@
|
|
|
31
31
|
>
|
|
32
32
|
<span><md-icon name="icon-arrow-down_16"></md-icon> </span>
|
|
33
33
|
</button>
|
|
34
|
+
`}groupArrowButtonTemplate(t){const e=this.groupExpandedList.includes(t)?"icon-arrow-up_12":"icon-arrow-down_12";return a.html`
|
|
35
|
+
<button
|
|
36
|
+
type="button"
|
|
37
|
+
class="md-combobox-button"
|
|
38
|
+
aria-label=${this.arrowAriaLabel}
|
|
39
|
+
aria-controls="md-combobox-listbox"
|
|
40
|
+
tabindex="-1"
|
|
41
|
+
?disabled=${this.disabled}
|
|
42
|
+
@click=${e=>this.toggleGroupListBox(e,t)}
|
|
43
|
+
>
|
|
44
|
+
<span><md-icon name=${e}></md-icon> </span>
|
|
45
|
+
</button>
|
|
34
46
|
`}getSelectAllOption(){return a.html`
|
|
35
47
|
<li
|
|
36
48
|
id="selectAll"
|
|
@@ -109,8 +121,21 @@
|
|
|
109
121
|
>
|
|
110
122
|
${this.isMulti&&this.allowSelectAll?this.getSelectAllOption():d.nothing}
|
|
111
123
|
${Object(u.repeat)(this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue),t=>this.getOptionId(t),(t,e)=>"string"!=typeof t&&this.isOptGroup&&"true"===t.isLabel?a.html`
|
|
112
|
-
<
|
|
113
|
-
|
|
124
|
+
<div
|
|
125
|
+
part="group-label"
|
|
126
|
+
class="group-label"
|
|
127
|
+
role="listbox"
|
|
128
|
+
aria-controls="md-combobox-listbox"
|
|
129
|
+
aria-label=${t.value}
|
|
130
|
+
@click=${e=>this.toggleGroupListBox(e,t.value)}
|
|
131
|
+
@keydown=${e=>{this.handleGroupLabelKeyDown(e,t)}}
|
|
132
|
+
tabindex="1"
|
|
133
|
+
aria-selected=${this.getAriaState(e)}
|
|
134
|
+
>
|
|
135
|
+
<span part="group-label">${t.value}</span>
|
|
136
|
+
${this.groupArrowButtonTemplate(t.value)}
|
|
137
|
+
</div>
|
|
138
|
+
`:!this.isOptGroup||this.groupExpandedList.includes(this.getOptionGroupName(t))?a.html`
|
|
114
139
|
<li
|
|
115
140
|
id=${this.getOptionId(t)}
|
|
116
141
|
title="${this.getOptionValue(t)}"
|
|
@@ -136,7 +161,7 @@
|
|
|
136
161
|
`)}
|
|
137
162
|
</span>
|
|
138
163
|
</li>
|
|
139
|
-
|
|
164
|
+
`:void 0)}
|
|
140
165
|
${this.options.length&&0===this.filteredOptions.length&&this.inputValue&&!this.allowCustomValue?a.html`
|
|
141
166
|
<li class="no-result" role="option" aria-selected="false" tabindex="-1">
|
|
142
167
|
${this.resultsTextLocalization.trim()}
|
|
@@ -155,4 +180,4 @@
|
|
|
155
180
|
<md-help-text .message=${this.invalidText} messageType="error"></md-help-text>
|
|
156
181
|
</div>
|
|
157
182
|
`:d.nothing}
|
|
158
|
-
`}};g([Object(a.property)({type:String})],e.prototype,"label",void 0),g([Object(a.property)({type:Array})],e.prototype,"options",void 0),g([Object(a.property)({type:Array,attribute:"custom-options"})],e.prototype,"customOptions",void 0),g([Object(a.property)({type:String})],e.prototype,"placeholder",void 0),g([Object(a.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"ordered",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"compact",void 0),g([Object(a.property)({type:Boolean,attribute:"no-clear-icon"})],e.prototype,"noClearIcon",void 0),g([Object(a.property)({type:Boolean,attribute:"select-when-in-focus"})],e.prototype,"selectWhenInFocus",void 0),g([Object(a.property)({type:Array})],e.prototype,"selectedOptions",void 0),g([Object(a.property)({type:Number,attribute:"visible-option",reflect:!0})],e.prototype,"visibleOptions",void 0),g([Object(a.property)({type:String,attribute:"option-id",reflect:!0})],e.prototype,"optionId",void 0),g([Object(a.property)({type:String,attribute:"option-value",reflect:!0})],e.prototype,"optionValue",void 0),g([Object(a.property)({type:Boolean,attribute:"with-custom-content"})],e.prototype,"isCustomContent",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"searchable",void 0),g([Object(a.property)({type:String})],e.prototype,"shape",void 0),g([Object(a.property)({type:Array})],e.prototype,"value",void 0),g([Object(a.property)({type:String,attribute:"input-value",reflect:!0})],e.prototype,"inputValue",void 0),g([Object(a.property)({type:Boolean,attribute:"allow-custom-value",reflect:!0})],e.prototype,"allowCustomValue",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),g([Object(a.property)({type:String,attribute:"no-results-i18n"})],e.prototype,"resultsTextLocalization",void 0),g([Object(a.property)({type:String,attribute:"no-options-i18n"})],e.prototype,"optionsTextLocalization",void 0),g([Object(a.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],e.prototype,"trimSpace",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"invalid",void 0),g([Object(a.property)({type:String,reflect:!0,attribute:"invalid-text-i18n"})],e.prototype,"invalidText",void 0),g([Object(a.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),g([Object(a.property)({type:String,attribute:"clear-aria-label"})],e.prototype,"clearAriaLabel",void 0),g([Object(a.property)({type:String,attribute:"arrow-aria-label"})],e.prototype,"arrowAriaLabel",void 0),g([Object(a.property)({type:String,attribute:"all-i18n"})],e.prototype,"allTextLocalization",void 0),g([Object(a.property)({type:String,attribute:"select-all-i18n"})],e.prototype,"selectAllTextLocalization",void 0),g([Object(a.property)({type:String,attribute:"selected-all-i18n"})],e.prototype,"selectedTextLocalization",void 0),g([Object(a.property)({type:Boolean,attribute:"allow-select-all",reflect:!0})],e.prototype,"allowSelectAll",void 0),g([Object(a.property)({type:Boolean,attribute:"show-custom-error",reflect:!0})],e.prototype,"showCustomError",void 0),g([Object(a.property)({type:Boolean,attribute:"show-selected-count",reflect:!0})],e.prototype,"showSelectedCount",void 0),g([Object(a.property)({type:Number,attribute:!1}),Object(a.internalProperty)()],e.prototype,"isOptGroup",void 0),g([Object(a.internalProperty)()],e.prototype,"isSelectAllChecked",void 0),g([Object(a.query)(".group")],e.prototype,"group",void 0),g([Object(a.query)(".md-combobox-listbox")],e.prototype,"input",void 0),g([Object(a.query)(".md-combobox-button")],e.prototype,"button",void 0),g([Object(a.query)("ul[role='listbox'")],e.prototype,"listBox",void 0),g([Object(a.queryAll)("li[role='option']")],e.prototype,"lists",void 0),g([Object(a.queryAll)(".group-label")],e.prototype,"labels",void 0),g([Object(a.queryAll)(".md-combobox-selected-item")],e.prototype,"selected",void 0),e=g([Object(n.a)("md-combobox")],e),t.ELEMENT=e}(i||(i={}))}}]);
|
|
183
|
+
`}};g([Object(a.property)({type:String})],e.prototype,"label",void 0),g([Object(a.property)({type:Array})],e.prototype,"options",void 0),g([Object(a.property)({type:Array,attribute:"custom-options"})],e.prototype,"customOptions",void 0),g([Object(a.property)({type:String})],e.prototype,"placeholder",void 0),g([Object(a.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"ordered",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),g([Object(a.property)({type:Array,reflect:!0})],e.prototype,"groupExpandedList",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"searchItem",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"compact",void 0),g([Object(a.property)({type:Boolean,attribute:"no-clear-icon"})],e.prototype,"noClearIcon",void 0),g([Object(a.property)({type:Boolean,attribute:"select-when-in-focus"})],e.prototype,"selectWhenInFocus",void 0),g([Object(a.property)({type:Array})],e.prototype,"selectedOptions",void 0),g([Object(a.property)({type:Number,attribute:"visible-option",reflect:!0})],e.prototype,"visibleOptions",void 0),g([Object(a.property)({type:String,attribute:"option-id",reflect:!0})],e.prototype,"optionId",void 0),g([Object(a.property)({type:String,attribute:"option-value",reflect:!0})],e.prototype,"optionValue",void 0),g([Object(a.property)({type:Boolean,attribute:"with-custom-content"})],e.prototype,"isCustomContent",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"searchable",void 0),g([Object(a.property)({type:String})],e.prototype,"shape",void 0),g([Object(a.property)({type:Array})],e.prototype,"value",void 0),g([Object(a.property)({type:String,attribute:"input-value",reflect:!0})],e.prototype,"inputValue",void 0),g([Object(a.property)({type:Boolean,attribute:"allow-custom-value",reflect:!0})],e.prototype,"allowCustomValue",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),g([Object(a.property)({type:String,attribute:"no-results-i18n"})],e.prototype,"resultsTextLocalization",void 0),g([Object(a.property)({type:String,attribute:"no-options-i18n"})],e.prototype,"optionsTextLocalization",void 0),g([Object(a.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],e.prototype,"trimSpace",void 0),g([Object(a.property)({type:Boolean,reflect:!0})],e.prototype,"invalid",void 0),g([Object(a.property)({type:String,reflect:!0,attribute:"invalid-text-i18n"})],e.prototype,"invalidText",void 0),g([Object(a.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),g([Object(a.property)({type:String,attribute:"clear-aria-label"})],e.prototype,"clearAriaLabel",void 0),g([Object(a.property)({type:String,attribute:"arrow-aria-label"})],e.prototype,"arrowAriaLabel",void 0),g([Object(a.property)({type:String,attribute:"all-i18n"})],e.prototype,"allTextLocalization",void 0),g([Object(a.property)({type:String,attribute:"select-all-i18n"})],e.prototype,"selectAllTextLocalization",void 0),g([Object(a.property)({type:String,attribute:"selected-all-i18n"})],e.prototype,"selectedTextLocalization",void 0),g([Object(a.property)({type:Boolean,attribute:"allow-select-all",reflect:!0})],e.prototype,"allowSelectAll",void 0),g([Object(a.property)({type:Boolean,attribute:"show-custom-error",reflect:!0})],e.prototype,"showCustomError",void 0),g([Object(a.property)({type:Boolean,attribute:"show-selected-count",reflect:!0})],e.prototype,"showSelectedCount",void 0),g([Object(a.property)({type:Number,attribute:!1}),Object(a.internalProperty)()],e.prototype,"isOptGroup",void 0),g([Object(a.internalProperty)()],e.prototype,"isSelectAllChecked",void 0),g([Object(a.query)(".group")],e.prototype,"group",void 0),g([Object(a.query)(".md-combobox-listbox")],e.prototype,"input",void 0),g([Object(a.query)(".md-combobox-button")],e.prototype,"button",void 0),g([Object(a.query)("ul[role='listbox'")],e.prototype,"listBox",void 0),g([Object(a.queryAll)("li[role='option']")],e.prototype,"lists",void 0),g([Object(a.queryAll)(".group-label")],e.prototype,"labels",void 0),g([Object(a.queryAll)(".md-combobox-selected-item")],e.prototype,"selected",void 0),e=g([Object(n.a)("md-combobox")],e),t.ELEMENT=e}(i||(i={}))}}]);
|
package/dist/chunks/md-62.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[62],{111:function(e,t,o){"use strict";o.r(t),o.d(t,"Dropdown",(function(){return u}));o(15);var i=o(1),s=o(7),n=o(4),d=o(0),r=o(2),l=o(13),a=o(36),p=d.css`:host(:focus){box-shadow:none!important;outline:0!important}:host .md-dropdown{display:flex;flex-direction:column;position:relative}:host .md-dropdown-select{display:none}:host .md-dropdown-label{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;background-color:var(--md-primary-bg-color);border:1px solid var(--md-secondary-seperator-color);border-radius:var(--dropdown-group-radius,.25rem);min-height:2rem;padding:0 .75rem}:host .md-dropdown-label--text{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--md-secondary-text-color);line-height:2rem;outline:0;width:6.25rem;flex:1 0 auto}:host .md-dropdown-label--icon{transition:all .15s linear;display:inline-block;background-color:transparent;border:none;cursor:pointer;height:1.75rem;margin:0;margin-left:calc(.25rem * 3);outline:0;padding:0;padding-top:calc(.25rem / 2);position:relative;vertical-align:bottom}:host .md-dropdown-label--icon md-icon{color:var(--md-primary-text-color,#f7f7f7)}:host .md-dropdown-label:hover{background-color:var(--dropdown-bg-color-hover,#dedede)}:host .md-dropdown-label:active{background-color:var(--dropdown-bg-color-active,#ccc)}:host .md-dropdown-list{list-style:none;margin:0;padding:0;display:none;background-color:var(--md-primary-bg-color);border-radius:.5rem;box-shadow:0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16);left:0;overflow:auto;overflow-x:hidden;position:absolute;top:calc(100% + .25rem);width:100%;z-index:1}:host .md-dropdown-option{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;color:var(--md-primary-text-color,#f7f7f7);padding:.4375rem .75rem .5rem}:host .md-dropdown-option .select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;width:calc(100% - 1rem);display:block}:host .md-dropdown-option:hover{background-color:var(--dropdown-list-item-bg-color-hover,#c9f4ff)}:host .md-dropdown-option[focused]{background-color:var(--dropdown-list-item-bg-color-focus,#91ebff)}:host .md-dropdown__expanded .md-dropdown-list{display:block}:host .md-dropdown__expanded .md-dropdown-label--icon{transform:rotate(180deg)}:host .md-dropdown--pill .md-dropdown-label{border-radius:18px}:host([focus-visible]) .md-dropdown .md-dropdown-label{border-color:var(--dropdown-border-color-focus,#005e7d);box-shadow:none}:host([disabled]) .md-dropdown .md-dropdown-label{background-color:var(--md-tertiary-bg-color)}:host([disabled]) .md-dropdown .md-dropdown-label:active,:host([disabled]) .md-dropdown .md-dropdown-label:hover{background-color:var(--md-tertiary-bg-color);pointer-events:none}:host([disabled]) .md-dropdown .md-dropdown-label:active>md-icon,:host([disabled]) .md-dropdown .md-dropdown-label:hover>md-icon{opacity:.3}`,c=function(e,t,o,i){var s,n=arguments.length,d=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,o,i);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(d=(n<3?s(d):n>3?s(t,o,d):s(t,o))||d);return n>3&&d&&Object.defineProperty(t,o,d),d},h=function(e,t,o,i){return new(o||(o=Promise))((function(s,n){function d(e){try{l(i.next(e))}catch(e){n(e)}}function r(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(d,r)}l((i=i.apply(e,t||[])).next())}))};var u;!function(e){let t=class extends(Object(s.a)(d.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.allowUnselected=!1,this.visibleOptions=8,this.renderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.lastMaxHeight="",this.onOutsideClick=e=>{let t=!1;const o=e.composedPath();o.length&&(t=!!o.find(e=>e===this),t||this.collapse())},this.onKeyDown=e=>{switch(e.code){case i.a.Enter:this.expanded?(this.select(),this.collapse()):this.expand();break;case i.a.ArrowDown:this.expanded?this.focusNext():this.expand();break;case i.a.ArrowUp:this.expanded?this.focusPrev():this.expand();break;case i.a.Home:this.expanded?this.focusFirst():this.expand();break;case i.a.End:this.expanded?this.focusLast():this.expand();break;case i.a.Escape||i.a.Backspace:this.expanded&&this.collapse()}}}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(e){super.firstUpdated(e),this.setAttribute("tabindex","0"),e.forEach((e,t)=>{if("defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}updated(e){super.updated(e),e.forEach((e,t)=>{if("options"===t&&this.updateRenderOptions(),"selectedKey"===t){const e=this.renderOptions.findIndex(e=>e.key===this.selectedKey);-1!==e&&this.focusToIndex(e)}"expanded"===t&&this.updateListDOM(),"focusedIndex"===t&&this.updateListDOM(),"disabled"===t&&this.setAttribute("tabindex",this.disabled?"-1":"0")})}updateRenderOptions(){const e=[];this.focusReset();const t=this.options.reduce((t,o)=>{const{key:i,value:s}=this.getOptionKeyValuePair(o);return-1!==e.indexOf(i)?console.error(`Dropdown already have option key: "${i}". Ignoring `):i?(e.push(i),t.push({key:i,value:s,option:o})):console.error(`Dropdown key is not defined: "${i}". (value: "${s}"). Ignoring `),t},[]);this.allowUnselected&&t.unshift({key:"",value:this.title}),this.renderOptions=t}updateListDOM(){return h(this,void 0,void 0,(function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))}))}resizeDropdownList(){return h(this,void 0,void 0,(function*(){yield new Promise(e=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const e=[...this.optionsListItems].slice(0,this.visibleOptions).reduce((e,t)=>e+t.offsetHeight,0)+"px";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}else{const e="auto";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}e()}))}))}handleFocusIn(e){this.disabled||super.handleFocusIn&&super.handleFocusIn(e),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(e){super.handleFocusOut&&super.handleFocusOut(e),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.a,p]}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown)}expand(){this.expanded=!0,-1===this.focusedIndex&&this.focusNext()}collapse(){this.expanded=!1}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const e=this.renderOptions[this.focusedIndex],t=e.key;t!==this.selectedKey&&(this.selectedKey=t,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:e.option?e.option:e.key}})))}}onLabelClick(){this.toggle()}focusFirst(){this.renderOptions.length&&(this.focusedIndex=0)}focusLast(){this.renderOptions.length&&(this.focusedIndex=this.renderOptions.length-1)}focusNext(){this.renderOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.renderOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.renderOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(e){this.renderOptions.length&&e>=0&&e<=this.renderOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(e){return h(this,void 0,void 0,(function*(){yield new Promise(t=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&e>=0&&this.optionsListItems.length>e){let t=0;const{top:o,bottom:i}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[e],n=this.optionsListItems[e+1]||s,d=this.optionsListItems[e-1]||s,r=n.getBoundingClientRect(),l=d.getBoundingClientRect();r.bottom>i?t=r.bottom-i+2:l.top<o&&(t=l.top-o-2),this.optionsList.scrollTop+=t}t()})})}))}getOptionKeyValuePair(e){if("string"==typeof e)return{key:e.trim(),value:e};if(e&&"object"==typeof e){const t=Object.keys(e),o=Object.values(e);if(t.length){if(1===t.length||!this.optionId)return{key:t[0],value:o[0]};if(this.optionId)return{key:e[this.optionId],value:e[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const e=this.renderOptions.find(e=>e.key===this.selectedKey);if(e)return e.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded}}render(){return r.html`
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[62],{111:function(e,t,o){"use strict";o.r(t),o.d(t,"Dropdown",(function(){return u}));o(15);var i=o(1),s=o(7),n=o(4),d=o(0),r=o(2),l=o(13),a=o(36),p=d.css`:host(:focus){box-shadow:none!important;outline:0!important}:host .md-dropdown{display:flex;flex-direction:column;position:relative}:host .md-dropdown-select{display:none}:host .md-dropdown-label{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;background-color:var(--md-primary-bg-color);border:1px solid var(--md-secondary-seperator-color);border-radius:var(--dropdown-group-radius,.25rem);min-height:2rem;padding:0 .75rem}:host .md-dropdown-label--text{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--md-secondary-text-color);line-height:2rem;outline:0;width:6.25rem;flex:1 0 auto}:host .md-dropdown-label--icon{transition:all .15s linear;display:inline-block;background-color:transparent;border:none;cursor:pointer;height:1.75rem;margin:0;margin-left:calc(.25rem * 3);outline:0;padding:0;padding-top:calc(.25rem / 2);position:relative;vertical-align:bottom}:host .md-dropdown-label--icon md-icon{color:var(--md-primary-text-color,#f7f7f7)}:host .md-dropdown-label:hover{background-color:var(--dropdown-bg-color-hover,#dedede)}:host .md-dropdown-label:active{background-color:var(--dropdown-bg-color-active,#ccc)}:host .md-dropdown-list{list-style:none;margin:0;padding:0;display:none;background-color:var(--md-primary-bg-color);border-radius:.5rem;box-shadow:0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16);left:0;overflow:auto;overflow-x:hidden;position:absolute;top:calc(100% + .25rem);width:100%;z-index:1}:host .md-dropdown-option{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;color:var(--md-primary-text-color,#f7f7f7);padding:.4375rem .75rem .5rem}:host .md-dropdown-option .select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;width:calc(100% - 1rem);display:block}:host .md-dropdown-option:hover{background-color:var(--dropdown-list-item-bg-color-hover,#c9f4ff)}:host .md-dropdown-option[focused]{background-color:var(--dropdown-list-item-bg-color-focus,#91ebff)}:host .md-dropdown__expanded .md-dropdown-list{display:block}:host .md-dropdown__expanded .md-dropdown-label--icon{transform:rotate(180deg)}:host .md-dropdown--pill .md-dropdown-label{border-radius:18px}:host([focus-visible]) .md-dropdown .md-dropdown-label{border-color:var(--dropdown-border-color-focus,#005e7d);box-shadow:none}:host([disabled]) .md-dropdown .md-dropdown-label{background-color:var(--md-tertiary-bg-color)}:host([disabled]) .md-dropdown .md-dropdown-label:active,:host([disabled]) .md-dropdown .md-dropdown-label:hover{background-color:var(--md-tertiary-bg-color);pointer-events:none}:host([disabled]) .md-dropdown .md-dropdown-label:active>md-icon,:host([disabled]) .md-dropdown .md-dropdown-label:hover>md-icon{opacity:.3}`,c=function(e,t,o,i){var s,n=arguments.length,d=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,o,i);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(d=(n<3?s(d):n>3?s(t,o,d):s(t,o))||d);return n>3&&d&&Object.defineProperty(t,o,d),d},h=function(e,t,o,i){return new(o||(o=Promise))((function(s,n){function d(e){try{l(i.next(e))}catch(e){n(e)}}function r(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(d,r)}l((i=i.apply(e,t||[])).next())}))};var u;!function(e){let t=class extends(Object(s.a)(d.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.allowUnselected=!1,this.visibleOptions=8,this.renderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.lastMaxHeight="",this.onOutsideClick=e=>{let t=!1;const o=e.composedPath();o.length&&(t=!!o.find(e=>e===this),t||this.collapse())},this.onKeyDown=e=>{switch(e.code){case i.a.Enter:this.expanded?(this.select(),this.collapse()):this.expand();break;case i.a.ArrowDown:this.expanded?this.focusNext():this.expand();break;case i.a.ArrowUp:this.expanded?this.focusPrev():this.expand();break;case i.a.Home:this.expanded?this.focusFirst():this.expand();break;case i.a.End:this.expanded?this.focusLast():this.expand();break;case i.a.Escape||i.a.Backspace:this.expanded&&this.collapse()}}}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(e){super.firstUpdated(e),this.setAttribute("tabindex","0"),e.forEach((e,t)=>{if("defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}updated(e){super.updated(e),e.forEach((e,t)=>{if("options"===t&&this.updateRenderOptions(),"selectedKey"===t){const e=this.renderOptions.findIndex(e=>e.key===this.selectedKey);-1!==e&&this.focusToIndex(e)}if("expanded"===t&&this.updateListDOM(),"focusedIndex"===t&&this.updateListDOM(),"disabled"===t&&this.setAttribute("tabindex",this.disabled?"-1":"0"),"defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}updateRenderOptions(){const e=[];this.focusReset();const t=this.options.reduce((t,o)=>{const{key:i,value:s}=this.getOptionKeyValuePair(o);return-1!==e.indexOf(i)?console.error(`Dropdown already have option key: "${i}". Ignoring `):i?(e.push(i),t.push({key:i,value:s,option:o})):console.error(`Dropdown key is not defined: "${i}". (value: "${s}"). Ignoring `),t},[]);this.allowUnselected&&t.unshift({key:"",value:this.title}),this.renderOptions=t}updateListDOM(){return h(this,void 0,void 0,(function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))}))}resizeDropdownList(){return h(this,void 0,void 0,(function*(){yield new Promise(e=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const e=[...this.optionsListItems].slice(0,this.visibleOptions).reduce((e,t)=>e+t.offsetHeight,0)+"px";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}else{const e="auto";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}e()}))}))}handleFocusIn(e){this.disabled||super.handleFocusIn&&super.handleFocusIn(e),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(e){super.handleFocusOut&&super.handleFocusOut(e),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.a,p]}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown)}expand(){this.expanded=!0,-1===this.focusedIndex&&this.focusNext()}collapse(){this.expanded=!1}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const e=this.renderOptions[this.focusedIndex],t=e.key;t!==this.selectedKey&&(this.selectedKey=t,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:e.option?e.option:e.key}})))}}onLabelClick(){this.toggle()}focusFirst(){this.renderOptions.length&&(this.focusedIndex=0)}focusLast(){this.renderOptions.length&&(this.focusedIndex=this.renderOptions.length-1)}focusNext(){this.renderOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.renderOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.renderOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(e){this.renderOptions.length&&e>=0&&e<=this.renderOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(e){return h(this,void 0,void 0,(function*(){yield new Promise(t=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&e>=0&&this.optionsListItems.length>e){let t=0;const{top:o,bottom:i}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[e],n=this.optionsListItems[e+1]||s,d=this.optionsListItems[e-1]||s,r=n.getBoundingClientRect(),l=d.getBoundingClientRect();r.bottom>i?t=r.bottom-i+2:l.top<o&&(t=l.top-o-2),this.optionsList.scrollTop+=t}t()})})}))}getOptionKeyValuePair(e){if("string"==typeof e)return{key:e.trim(),value:e};if(e&&"object"==typeof e){const t=Object.keys(e),o=Object.values(e);if(t.length){if(1===t.length||!this.optionId)return{key:t[0],value:o[0]};if(this.optionId)return{key:e[this.optionId],value:e[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const e=this.renderOptions.find(e=>e.key===this.selectedKey);if(e)return e.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded}}render(){return r.html`
|
|
2
2
|
<div class="md-dropdown ${Object(l.classMap)(this.dropDownClassMap)}" part="dropdown">
|
|
3
3
|
<label
|
|
4
4
|
class="md-dropdown-label"
|
package/dist/chunks/md-72.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<span>${t.name}</span>
|
|
15
15
|
<span>+${t.value}</span>
|
|
16
16
|
</div>
|
|
17
|
-
`}validateNumber(){this.isValid=!this.value||Object(l.isValidNumberForRegion)(this.value,this.countryCode)}handleCountryChange(t){var e;
|
|
17
|
+
`}validateNumber(){this.isValid=!this.value||Object(l.isValidNumberForRegion)(this.value,this.countryCode)}handleCountryChange(t){var e,o;t.detail.value&&(null===(e=t.detail.value)||void 0===e?void 0:e.id)?(this.countryCallingCode=t.detail.value.id,this.countryCode=null===(o=t.detail.value.id.split(",")[2])||void 0===o?void 0:o.trim()):(this.countryCode="US",this.countryCallingCode=""),this.validateNumber(),this.dispatchEvent(new CustomEvent("countrycode-change",{bubbles:!0,composed:!0,detail:{srcEvent:t,isValid:this.isValid}}))}handlePhoneChange(t){this.value=t.detail.value,t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-change",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}handleKeydown(t){this.isValid=!0,t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}handleBlur(t){this.validateInput(this.value),this.validateNumber(),t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-blur",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}validateInput(t){this.formattedValue=new l.AsYouType(this.countryCode).input(t)}getFormatedCountryCallingCode(){var t;return{id:this.countryCallingCode,value:null===(t=this.countryCallingCode.split(",")[0])||void 0===t?void 0:t.trim()}}getModStyle(){return p.html`
|
|
18
18
|
<style>
|
|
19
19
|
.md-phone-input__container md-combobox {
|
|
20
20
|
width: 5.625rem;
|
package/dist/chunks/md-83.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[83],{122:function(t,e,l){"use strict";l.r(e),l.d(e,"ToggleSwitch",(function(){return
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[83],{122:function(t,e,l){"use strict";l.r(e),l.d(e,"alignLabel",(function(){return a})),l.d(e,"ToggleSwitch",(function(){return h}));l(51);var o=l(7),i=l(4),g=l(5),c=l(0),d=l(3),s=c.css`.md-toggle-switch .md-toggle-switch__input+.md-toggle-switch__label .md-toggle-switch__label__container{background-color:var(--toggle-switch-bg-color,#ccc)}.md-toggle-switch .md-toggle-switch__input+.md-toggle-switch__label .md-toggle-switch__label__container::after{background-color:var(--toggle-switch-slider-color,#fff)}.md-toggle-switch .md-toggle-switch__input+.md-toggle-switch__label:hover .md-toggle-switch__label__container{background-color:var(--toggle-switch-bg-color--hover,#b2b2b2)}.md-toggle-switch .md-toggle-switch__input.focus+.md-toggle-switch__label .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input:focus+.md-toggle-switch__label .md-toggle-switch__label__container{outline:2px solid var(--md-focus-border-color,#005e7d)}.md-toggle-switch .md-toggle-switch__input.checked+.md-toggle-switch__label .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input:checked+.md-toggle-switch__label .md-toggle-switch__label__container{background-color:var(--toggle-switch-bg-color--checked,#007aa3)}.md-toggle-switch .md-toggle-switch__input.checked+.md-toggle-switch__label:hover .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input:checked+.md-toggle-switch__label:hover .md-toggle-switch__label__container{background-color:var(--toggle-switch-bg-color--checked-hover,#005e7d)}.md-toggle-switch .md-toggle-switch__input.disabled+.md-toggle-switch__label .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input:disabled+.md-toggle-switch__label .md-toggle-switch__label__container{background-color:var(--toggle-switch-bg-color--disabled,#ededed)}.md-toggle-switch .md-toggle-switch__input.disabled+.md-toggle-switch__label .md-toggle-switch__label__container::after,.md-toggle-switch .md-toggle-switch__input:disabled+.md-toggle-switch__label .md-toggle-switch__label__container::after{background-color:var(--toggle-switch-slider-color-disabled,#f7f7f7)}.md-toggle-switch .md-toggle-switch__input.disabled+.md-toggle-switch__label:hover .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input:disabled+.md-toggle-switch__label:hover .md-toggle-switch__label__container{background-color:var(--toggle-switch-bg-color--disabled,#ededed)}.md-toggle-switch .md-toggle-switch__input.disabled.checked+.md-toggle-switch__label .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input.disabled:checked+.md-toggle-switch__label .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input:disabled.checked+.md-toggle-switch__label .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input:disabled:checked+.md-toggle-switch__label .md-toggle-switch__label__container{background-color:var(--toggle-switch-bg-color--disabled--checked,#c9f4ff)}.md-toggle-switch .md-toggle-switch__input.disabled.checked+.md-toggle-switch__label .md-toggle-switch__label__container::after,.md-toggle-switch .md-toggle-switch__input.disabled:checked+.md-toggle-switch__label .md-toggle-switch__label__container::after,.md-toggle-switch .md-toggle-switch__input:disabled.checked+.md-toggle-switch__label .md-toggle-switch__label__container::after,.md-toggle-switch .md-toggle-switch__input:disabled:checked+.md-toggle-switch__label .md-toggle-switch__label__container::after{background-color:var(--toggle-switch-slider-color-disabled--checked,#fff)}.md-toggle-switch .md-toggle-switch__input.disabled.checked+.md-toggle-switch__label:hover .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input.disabled:checked+.md-toggle-switch__label:hover .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input:disabled.checked+.md-toggle-switch__label:hover .md-toggle-switch__label__container,.md-toggle-switch .md-toggle-switch__input:disabled:checked+.md-toggle-switch__label:hover .md-toggle-switch__label__container{background-color:var(--toggle-switch-bg-color--disabled--checked,#c9f4ff)}.md-toggle-switch__input{margin-left:-9999px;opacity:0;position:absolute}.md-toggle-switch__input.disabled+.md-toggle-switch__label,.md-toggle-switch__input:disabled+.md-toggle-switch__label{cursor:default}.md-toggle-switch__input.disabled+.md-toggle-switch__label .md-toggle-switch__label__container,.md-toggle-switch__input:disabled+.md-toggle-switch__label .md-toggle-switch__label__container{cursor:default}.md-toggle-switch__input:checked+.md-toggle-switch__label .md-toggle-switch__label__container::after{left:calc(100% - 2px);transform:translateX(-100%)}.md-toggle-switch__label{cursor:pointer;display:inline-flex;line-height:1.5rem}.md-toggle-switch__label__container{background-clip:padding-box;border:none;border-radius:24px;cursor:pointer;display:block;height:24px;margin-right:.75rem;position:relative;transition:background 350ms;width:2.5rem}.md-toggle-switch__label__container__left{margin-right:0;margin-left:.75rem}@media screen and (-ms-high-contrast:active){.md-toggle-switch__label__container{filter:brightness(1) contrast(1) saturate(1.5)}}.md-toggle-switch__label__container::after{border-radius:100%;bottom:2px;box-shadow:0 1px 2px 0 rgba(0,0,0,.32);content:"";height:1.25rem;left:2px;position:absolute;top:2px;transition:350ms;width:1.25rem}.md-toggle-switch--small .md-toggle-switch__label__container{height:1.375rem;width:2.25rem}.md-toggle-switch--small .md-toggle-switch__label__container::after{height:1.125rem;width:1.125rem}.md-toggle-switch--smaller .md-toggle-switch__label__container{height:1.25rem;width:2rem}.md-toggle-switch--smaller .md-toggle-switch__label__container::after{height:1rem;width:1rem}`,_=function(t,e,l,o){var i,g=arguments.length,c=g<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,l):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,l,o);else for(var d=t.length-1;d>=0;d--)(i=t[d])&&(c=(g<3?i(c):g>3?i(e,l,c):i(e,l))||c);return g>3&&c&&Object.defineProperty(e,l,c),c};const a=["left","right"];var h;!function(t){let e=class extends(Object(o.a)(c.LitElement)){constructor(){super(...arguments),this.htmlId="",this.label="toggle",this.checked=!1,this.disabled=!1,this.small=!1,this.smaller=!1,this.alignLabel="right",this.autofocus=!1}handleClick(){this.disabled||(this.checked=!this.checked)}get toggleSwitchClassMap(){return{"md-toggle-switch--small":this.small,"md-toggle-switch--smaller":this.smaller}}switchTemplate(){return"left"===this.alignLabel?c.html`
|
|
2
|
+
<slot></slot>
|
|
3
|
+
<span class="md-toggle-switch__label__container md-toggle-switch__label__container__left" part="toggle-label"></span>
|
|
4
|
+
`:c.html`
|
|
5
|
+
<span class="md-toggle-switch__label__container" part="toggle-label"></span>
|
|
6
|
+
<slot></slot>
|
|
7
|
+
`}render(){return c.html`
|
|
2
8
|
<div
|
|
3
|
-
class="md-input-container md-toggle-switch ${Object(
|
|
9
|
+
class="md-input-container md-toggle-switch ${Object(d.classMap)(this.toggleSwitchClassMap)}"
|
|
4
10
|
@click=${this.handleClick}
|
|
5
11
|
>
|
|
6
12
|
<input
|
|
@@ -14,8 +20,7 @@
|
|
|
14
20
|
tabindex=${this.disabled?-1:0}
|
|
15
21
|
/>
|
|
16
22
|
<md-label .htmlFor=${this.htmlId} class="md-toggle-switch__label">
|
|
17
|
-
|
|
18
|
-
<slot></slot>
|
|
23
|
+
${this.switchTemplate()}
|
|
19
24
|
</md-label>
|
|
20
25
|
</div>
|
|
21
|
-
`}static get styles(){return[
|
|
26
|
+
`}static get styles(){return[i.a,s]}};_([Object(c.property)({type:String})],e.prototype,"htmlId",void 0),_([Object(c.property)({type:String})],e.prototype,"label",void 0),_([Object(c.property)({type:Boolean})],e.prototype,"checked",void 0),_([Object(c.property)({type:Boolean})],e.prototype,"disabled",void 0),_([Object(c.property)({type:Boolean})],e.prototype,"small",void 0),_([Object(c.property)({type:Boolean})],e.prototype,"smaller",void 0),_([Object(c.property)({type:String})],e.prototype,"alignLabel",void 0),_([Object(c.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),e=_([Object(g.a)("md-toggle-switch")],e),t.ELEMENT=e}(h||(h={}))}}]);
|
package/dist/index-entry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("luxon"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@interactjs/interact/index"),require("@popperjs/core/lib/popper-lite"),require("nanoid"),require("highlight.js/lib/core"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("sortablejs"),require("papaparse"),require("lit-html/directives/repeat.js"),require("@popperjs/core/lib"),require("lit-html/directives/until.js"),require("dompurify"),require("@interactjs/auto-start"),require("@interactjs/actions/drag"),require("@interactjs/modifiers"),require("@interactjs/actions/resize"),require("libphonenumber-js"),require("lit-html/directives/unsafe-html"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/template-content"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","lit-html/directives/style-map","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","luxon","lit-html/directives/class-map.js","lit-html/directives/repeat","@interactjs/interact/index","@popperjs/core/lib/popper-lite","nanoid","highlight.js/lib/core","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","sortablejs","papaparse","lit-html/directives/repeat.js","@popperjs/core/lib","lit-html/directives/until.js","dompurify","@interactjs/auto-start","@interactjs/actions/drag","@interactjs/modifiers","@interactjs/actions/resize","libphonenumber-js","lit-html/directives/unsafe-html","country-codes-list","country-flags-svg","lit-html/directives/template-content"],t);else{var o="object"==typeof exports?t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("luxon"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@interactjs/interact/index"),require("@popperjs/core/lib/popper-lite"),require("nanoid"),require("highlight.js/lib/core"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("sortablejs"),require("papaparse"),require("lit-html/directives/repeat.js"),require("@popperjs/core/lib"),require("lit-html/directives/until.js"),require("dompurify"),require("@interactjs/auto-start"),require("@interactjs/actions/drag"),require("@interactjs/modifiers"),require("@interactjs/actions/resize"),require("libphonenumber-js"),require("lit-html/directives/unsafe-html"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/template-content")):t(e["lit-element"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["lit-html/directives/style-map"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.luxon,e["lit-html/directives/class-map.js"],e["lit-html/directives/repeat"],e["@interactjs/interact/index"],e["@popperjs/core/lib/popper-lite"],e.nanoid,e["highlight.js/lib/core"],e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e.sortablejs,e.papaparse,e["lit-html/directives/repeat.js"],e["@popperjs/core/lib"],e["lit-html/directives/until.js"],e.dompurify,e["@interactjs/auto-start"],e["@interactjs/actions/drag"],e["@interactjs/modifiers"],e["@interactjs/actions/resize"],e["libphonenumber-js"],e["lit-html/directives/unsafe-html"],e["country-codes-list"],e["country-flags-svg"],e["lit-html/directives/template-content"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(window,(function(e,t,o,r,i,n,c,s,d,l,a,u,p,m,h,f,g,b,j,y,v,x,q,k,w,T,C,P,O,L,A,B,M){return function(e){function t(t){for(var r,c,s=t[0],d=t[1],l=t[2],u=0,p=[];u<s.length;u++)c=s[u],Object.prototype.hasOwnProperty.call(i,c)&&i[c]&&p.push(i[c][0]),i[c]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(a&&a(t);p.length;)p.shift()();return n.push.apply(n,l||[]),o()}function o(){for(var e,t=0;t<n.length;t++){for(var o=n[t],r=!0,s=1;s<o.length;s++){var d=o[s];0!==i[d]&&(r=!1)}r&&(n.splice(t--,1),e=c(c.s=o[0]))}return e}var r={},i={339:0,275:0,276:0,277:0,278:0,279:0,280:0,281:0,282:0,283:0,284:0,285:0,286:0,287:0,288:0,289:0,290:0,291:0,292:0,293:0,294:0,295:0,296:0,297:0,298:0,299:0,300:0,301:0,302:0,303:0,304:0,305:0,306:0,307:0,308:0,309:0,310:0,311:0,312:0,313:0,314:0,315:0,316:0,317:0,318:0,319:0,320:0,321:0,322:0,323:0,324:0,325:0,326:0,327:0,328:0,329:0,330:0,331:0,332:0,333:0,334:0,335:0,336:0,337:0,338:0},n=[];function c(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,c),o.l=!0,o.exports}c.e=function(e){var t=[],o=i[e];if(0!==o)if(o)t.push(o[2]);else{var r=new Promise((function(t,r){o=i[e]=[t,r]}));t.push(o[2]=r);var n,s=document.createElement("script");s.charset="utf-8",s.timeout=120,c.nc&&s.setAttribute("nonce",c.nc),s.src=function(e){return c.p+"chunks/md-"+e+".js"}(e);var d=new Error;n=function(t){s.onerror=s.onload=null,clearTimeout(l);var o=i[e];if(0!==o){if(o){var r=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+r+": "+n+")",d.name="ChunkLoadError",d.type=r,d.request=n,o[1](d)}i[e]=void 0}};var l=setTimeout((function(){n({type:"timeout",target:s})}),12e4);s.onerror=s.onload=n,document.head.appendChild(s)}return Promise.all(t)},c.m=e,c.c=r,c.d=function(e,t,o){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(c.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)c.d(o,r,function(t){return e[t]}.bind(null,r));return o},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/",c.oe=function(e){throw console.error(e),e};var s=window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[],d=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var a=d;return n.push([317,43,0,1,2,3,4,5,6,7,8,9,10,11,13,12,14,15,16,17,18,19,21,20,22,23,26,27,25,24,36,39,37,29,42,34,31,35,30,40,41,33,32,28,38,81,79,77,70,55,62,82,64,56,80,63,68,75,78,72,71,59,51,50,83,69,60,65,48,44,74,53,45,66,67,47,58,73,49,54,52,46,61,76,57]),o()}({0:function(t,o){t.exports=e},10:function(e,t){e.exports=n},11:function(e,t){e.exports=c},12:function(e,t){e.exports=s},13:function(e,t){e.exports=d},14:function(e,t){e.exports=l},2:function(e,o){e.exports=t},20:function(e,t){e.exports=a},21:function(e,t){e.exports=u},22:function(e,t){e.exports=p},23:function(e,t){e.exports=m},25:function(e,t){e.exports=h},26:function(e,t){e.exports=f},27:function(e,t){e.exports=g},28:function(e,t){e.exports=b},3:function(e,t){e.exports=o},30:function(e,t){e.exports=j},31:function(e,t){e.exports=y},317:function(e,t,o){"use strict";o.r(t),o.d(t,"Accordion",(function(){return i.Accordion})),o.d(t,"AccordionItem",(function(){return n.AccordionItem})),o.d(t,"ActivityButton",(function(){return c.ActivityButton})),o.d(t,"AlertBanner",(function(){return s.AlertBanner})),o.d(t,"Alert",(function(){return d.Alert})),o.d(t,"Avatar",(function(){return l.Avatar})),o.d(t,"CompositeAvatar",(function(){return a.CompositeAvatar})),o.d(t,"Badge",(function(){return u.Badge})),o.d(t,"Breadcrumb",(function(){return p.Breadcrumb})),o.d(t,"ButtonGroup",(function(){return m.ButtonGroup})),o.d(t,"Button",(function(){return h.Button})),o.d(t,"Card",(function(){return f.Card})),o.d(t,"ChatMessage",(function(){return g.ChatMessage})),o.d(t,"Checkbox",(function(){return b.Checkbox})),o.d(t,"CheckboxGroup",(function(){return j.CheckboxGroup})),o.d(t,"Chip",(function(){return y.Chip})),o.d(t,"Coachmark",(function(){return v.Coachmark})),o.d(t,"CodeEditor",(function(){return r})),o.d(t,"ComboBox",(function(){return L.ComboBox})),o.d(t,"DateRangePicker",(function(){return A.DateRangePicker})),o.d(t,"DateTimePicker",(function(){return B.DateTimePicker})),o.d(t,"DatePicker",(function(){return M.DatePicker})),o.d(t,"DatePickerCalendar",(function(){return D.DatePickerCalendar})),o.d(t,"DatePickerDay",(function(){return I.DatePickerDay})),o.d(t,"DatePickerMonth",(function(){return S.DatePickerMonth})),o.d(t,"DatePickerWeek",(function(){return U.DatePickerWeek})),o.d(t,"Draggable",(function(){return z.Draggable})),o.d(t,"DraggableItem",(function(){return N.DraggableItem})),o.d(t,"Dropdown",(function(){return R.Dropdown})),o.d(t,"EditableTextfield",(function(){return E.EditableTextfield})),o.d(t,"Favorite",(function(){return F.Favorite})),o.d(t,"FloatingModal",(function(){return _.FloatingModal})),o.d(t,"FloatingMinimizedModal",(function(){return $.FloatingMinimizedModal})),o.d(t,"Form",(function(){return G.Form})),o.d(t,"HelpText",(function(){return V.HelpText})),o.d(t,"Icon",(function(){return H.Icon})),o.d(t,"InputFile",(function(){return W.InputFile})),o.d(t,"Input",(function(){return J.Input})),o.d(t,"Label",(function(){return K.Label})),o.d(t,"Link",(function(){return Q.Link})),o.d(t,"List",(function(){return X.List})),o.d(t,"ListItem",(function(){return Y.ListItem})),o.d(t,"Loading",(function(){return Z.Loading})),o.d(t,"MeetingAlert",(function(){return ee.MeetingAlert})),o.d(t,"MenuOverlay",(function(){return te.MenuOverlay})),o.d(t,"Menu",(function(){return oe.Menu})),o.d(t,"MenuItem",(function(){return re.MenuItem})),o.d(t,"Modal",(function(){return ie.Modal})),o.d(t,"Pagination",(function(){return ne.Pagination})),o.d(t,"PhoneInput",(function(){return ce.PhoneInput})),o.d(t,"ProgressBar",(function(){return se.ProgressBar})),o.d(t,"Radio",(function(){return de.Radio})),o.d(t,"RadioGroup",(function(){return le.RadioGroup})),o.d(t,"Slider",(function(){return ae.Slider})),o.d(t,"Spinner",(function(){return ue.Spinner})),o.d(t,"Table",(function(){return pe.Table})),o.d(t,"TableAdvanced",(function(){return me.TableAdvanced})),o.d(t,"Tab",(function(){return he.Tab})),o.d(t,"TabPanel",(function(){return fe.TabPanel})),o.d(t,"Tabs",(function(){return ge.Tabs})),o.d(t,"TaskItem",(function(){return be.TaskItem})),o.d(t,"Theme",(function(){return je.Theme})),o.d(t,"TimePicker",(function(){return ye.TimePicker})),o.d(t,"ToggleSwitch",(function(){return ve.ToggleSwitch})),o.d(t,"Tooltip",(function(){return xe.Tooltip}));var r,i=o(81),n=o(82),c=o(83),s=o(102),d=o(103),l=o(43),a=o(84),u=o(49),p=o(104),m=o(105),h=o(17),f=o(106),g=o(107),b=o(85),j=o(86),y=o(108),v=o(109),x=o(7),q=o(4),k=o(23),w=o.n(k),T=o(0),C=T.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:0 0;color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}`,P=function(e,t,o,r){var i,n=arguments.length,c=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(c=(n<3?i(c):n>3?i(t,o,c):i(t,o))||c);return n>3&&c&&Object.defineProperty(t,o,c),c},O=function(e,t,o,r){return new(o||(o=Promise))((function(i,n){function c(e){try{d(r.next(e))}catch(e){n(e)}}function s(e){try{d(r.throw(e))}catch(e){n(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(c,s)}d((r=r.apply(e,t||[])).next())}))};!function(e){let t=class extends T.LitElement{constructor(){super(...arguments),this.copyLocalization="cURL",this.copiedLocalization="Copied",this.method="get",this.acceptLanguage="javascript",this.url="javascript",this.disableCopyButton=!0,this.acceptTypes="",this.copied=!1}static get styles(){return[q.a,C]}handleSlotChange(){if(this.slotNodes&&this.slotNodes.length){const e=this.slotNodes.find(e=>"CODE"===e.tagName);if(e){const t=e.textContent;t&&this.highlightBlock(t)}}}handleUrlSlotChange(){if(this.copied=!1,this.slotUrl&&this.slotUrl.length){const e=this.slotUrl.find(e=>e);if(e){const t=e.textContent;t&&this.copyUrl(t)}}}highlightBlock(e){e&&(this.codeBlock.innerText=e),w.a.highlightBlock(this.codeBlock)}copyUrl(e){this.codeUrl.innerText=e,this.disableCopyButton=!1}copyClipboard(){this.disableCopyButton||(this.codeUrl.innerText,this.selectTarget(this.codeUrl))}copyText(){try{document.execCommand("copy"),this.copied=!0}catch(e){console.warn("Copy text failed"),this.copied=!1}}select(e){const t=window.getSelection(),o=document.createRange();o.selectNodeContents(e),t&&(t.removeAllRanges(),t.addRange(o))}selectTarget(e){this.select(e),this.copyText()}importLanguage(e){return O(this,void 0,void 0,(function*(){try{const{default:t}=yield o(87)("./"+e);w.a.registerLanguage(""+e,t),this.setAcceptTypes()}catch(e){console.warn("Please set correct language name")}}))}getAllAcceptTypes(){const e=w.a.listLanguages();return e.length?e.map(e=>w.a.getLanguage(""+e).aliases).map(e=>e.map(e=>"."+e)).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(e){super.updated(e),e.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage),e.has("acceptTypes")&&this.highlightBlock()}render(){return T.html`
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("luxon"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@interactjs/interact/index"),require("@popperjs/core/lib/popper-lite"),require("nanoid"),require("highlight.js/lib/core"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("sortablejs"),require("papaparse"),require("lit-html/directives/repeat.js"),require("@popperjs/core/lib"),require("lit-html/directives/until.js"),require("dompurify"),require("@interactjs/auto-start"),require("@interactjs/actions/drag"),require("@interactjs/modifiers"),require("@interactjs/actions/resize"),require("libphonenumber-js"),require("lit-html/directives/unsafe-html"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/template-content"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","lit-html/directives/style-map","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","luxon","lit-html/directives/class-map.js","lit-html/directives/repeat","@interactjs/interact/index","@popperjs/core/lib/popper-lite","nanoid","highlight.js/lib/core","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","sortablejs","papaparse","lit-html/directives/repeat.js","@popperjs/core/lib","lit-html/directives/until.js","dompurify","@interactjs/auto-start","@interactjs/actions/drag","@interactjs/modifiers","@interactjs/actions/resize","libphonenumber-js","lit-html/directives/unsafe-html","country-codes-list","country-flags-svg","lit-html/directives/template-content"],t);else{var o="object"==typeof exports?t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("luxon"),require("lit-html/directives/class-map.js"),require("lit-html/directives/repeat"),require("@interactjs/interact/index"),require("@popperjs/core/lib/popper-lite"),require("nanoid"),require("highlight.js/lib/core"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("sortablejs"),require("papaparse"),require("lit-html/directives/repeat.js"),require("@popperjs/core/lib"),require("lit-html/directives/until.js"),require("dompurify"),require("@interactjs/auto-start"),require("@interactjs/actions/drag"),require("@interactjs/modifiers"),require("@interactjs/actions/resize"),require("libphonenumber-js"),require("lit-html/directives/unsafe-html"),require("country-codes-list"),require("country-flags-svg"),require("lit-html/directives/template-content")):t(e["lit-element"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["lit-html/directives/style-map"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.luxon,e["lit-html/directives/class-map.js"],e["lit-html/directives/repeat"],e["@interactjs/interact/index"],e["@popperjs/core/lib/popper-lite"],e.nanoid,e["highlight.js/lib/core"],e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e.sortablejs,e.papaparse,e["lit-html/directives/repeat.js"],e["@popperjs/core/lib"],e["lit-html/directives/until.js"],e.dompurify,e["@interactjs/auto-start"],e["@interactjs/actions/drag"],e["@interactjs/modifiers"],e["@interactjs/actions/resize"],e["libphonenumber-js"],e["lit-html/directives/unsafe-html"],e["country-codes-list"],e["country-flags-svg"],e["lit-html/directives/template-content"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(window,(function(e,t,o,r,i,n,c,s,d,l,a,u,p,m,h,f,g,b,j,y,v,x,q,k,w,T,C,P,O,L,A,B,M){return function(e){function t(t){for(var r,c,s=t[0],d=t[1],l=t[2],u=0,p=[];u<s.length;u++)c=s[u],Object.prototype.hasOwnProperty.call(i,c)&&i[c]&&p.push(i[c][0]),i[c]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(a&&a(t);p.length;)p.shift()();return n.push.apply(n,l||[]),o()}function o(){for(var e,t=0;t<n.length;t++){for(var o=n[t],r=!0,s=1;s<o.length;s++){var d=o[s];0!==i[d]&&(r=!1)}r&&(n.splice(t--,1),e=c(c.s=o[0]))}return e}var r={},i={339:0,275:0,276:0,277:0,278:0,279:0,280:0,281:0,282:0,283:0,284:0,285:0,286:0,287:0,288:0,289:0,290:0,291:0,292:0,293:0,294:0,295:0,296:0,297:0,298:0,299:0,300:0,301:0,302:0,303:0,304:0,305:0,306:0,307:0,308:0,309:0,310:0,311:0,312:0,313:0,314:0,315:0,316:0,317:0,318:0,319:0,320:0,321:0,322:0,323:0,324:0,325:0,326:0,327:0,328:0,329:0,330:0,331:0,332:0,333:0,334:0,335:0,336:0,337:0,338:0},n=[];function c(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,c),o.l=!0,o.exports}c.e=function(e){var t=[],o=i[e];if(0!==o)if(o)t.push(o[2]);else{var r=new Promise((function(t,r){o=i[e]=[t,r]}));t.push(o[2]=r);var n,s=document.createElement("script");s.charset="utf-8",s.timeout=120,c.nc&&s.setAttribute("nonce",c.nc),s.src=function(e){return c.p+"chunks/md-"+e+".js"}(e);var d=new Error;n=function(t){s.onerror=s.onload=null,clearTimeout(l);var o=i[e];if(0!==o){if(o){var r=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+r+": "+n+")",d.name="ChunkLoadError",d.type=r,d.request=n,o[1](d)}i[e]=void 0}};var l=setTimeout((function(){n({type:"timeout",target:s})}),12e4);s.onerror=s.onload=n,document.head.appendChild(s)}return Promise.all(t)},c.m=e,c.c=r,c.d=function(e,t,o){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(c.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)c.d(o,r,function(t){return e[t]}.bind(null,r));return o},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/",c.oe=function(e){throw console.error(e),e};var s=window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[],d=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var a=d;return n.push([317,43,0,1,2,3,4,5,6,7,8,9,10,11,13,12,14,15,16,17,18,19,21,20,22,23,26,27,25,24,36,39,37,29,42,34,31,35,30,40,41,33,32,28,38,81,79,77,70,55,62,82,64,56,80,63,68,75,78,72,71,59,83,51,50,69,60,65,48,44,74,53,45,66,67,47,58,73,49,54,52,46,61,76,57]),o()}({0:function(t,o){t.exports=e},10:function(e,t){e.exports=n},11:function(e,t){e.exports=c},12:function(e,t){e.exports=s},13:function(e,t){e.exports=d},14:function(e,t){e.exports=l},2:function(e,o){e.exports=t},20:function(e,t){e.exports=a},21:function(e,t){e.exports=u},22:function(e,t){e.exports=p},23:function(e,t){e.exports=m},25:function(e,t){e.exports=h},26:function(e,t){e.exports=f},27:function(e,t){e.exports=g},28:function(e,t){e.exports=b},3:function(e,t){e.exports=o},30:function(e,t){e.exports=j},31:function(e,t){e.exports=y},317:function(e,t,o){"use strict";o.r(t),o.d(t,"Accordion",(function(){return i.Accordion})),o.d(t,"AccordionItem",(function(){return n.AccordionItem})),o.d(t,"ActivityButton",(function(){return c.ActivityButton})),o.d(t,"AlertBanner",(function(){return s.AlertBanner})),o.d(t,"Alert",(function(){return d.Alert})),o.d(t,"Avatar",(function(){return l.Avatar})),o.d(t,"CompositeAvatar",(function(){return a.CompositeAvatar})),o.d(t,"Badge",(function(){return u.Badge})),o.d(t,"Breadcrumb",(function(){return p.Breadcrumb})),o.d(t,"ButtonGroup",(function(){return m.ButtonGroup})),o.d(t,"Button",(function(){return h.Button})),o.d(t,"Card",(function(){return f.Card})),o.d(t,"ChatMessage",(function(){return g.ChatMessage})),o.d(t,"Checkbox",(function(){return b.Checkbox})),o.d(t,"CheckboxGroup",(function(){return j.CheckboxGroup})),o.d(t,"Chip",(function(){return y.Chip})),o.d(t,"Coachmark",(function(){return v.Coachmark})),o.d(t,"CodeEditor",(function(){return r})),o.d(t,"ComboBox",(function(){return L.ComboBox})),o.d(t,"DateRangePicker",(function(){return A.DateRangePicker})),o.d(t,"DateTimePicker",(function(){return B.DateTimePicker})),o.d(t,"DatePicker",(function(){return M.DatePicker})),o.d(t,"DatePickerCalendar",(function(){return D.DatePickerCalendar})),o.d(t,"DatePickerDay",(function(){return I.DatePickerDay})),o.d(t,"DatePickerMonth",(function(){return S.DatePickerMonth})),o.d(t,"DatePickerWeek",(function(){return U.DatePickerWeek})),o.d(t,"Draggable",(function(){return z.Draggable})),o.d(t,"DraggableItem",(function(){return N.DraggableItem})),o.d(t,"Dropdown",(function(){return R.Dropdown})),o.d(t,"EditableTextfield",(function(){return E.EditableTextfield})),o.d(t,"Favorite",(function(){return F.Favorite})),o.d(t,"FloatingModal",(function(){return _.FloatingModal})),o.d(t,"FloatingMinimizedModal",(function(){return $.FloatingMinimizedModal})),o.d(t,"Form",(function(){return G.Form})),o.d(t,"HelpText",(function(){return V.HelpText})),o.d(t,"Icon",(function(){return H.Icon})),o.d(t,"InputFile",(function(){return W.InputFile})),o.d(t,"Input",(function(){return J.Input})),o.d(t,"Label",(function(){return K.Label})),o.d(t,"Link",(function(){return Q.Link})),o.d(t,"List",(function(){return X.List})),o.d(t,"ListItem",(function(){return Y.ListItem})),o.d(t,"Loading",(function(){return Z.Loading})),o.d(t,"MeetingAlert",(function(){return ee.MeetingAlert})),o.d(t,"MenuOverlay",(function(){return te.MenuOverlay})),o.d(t,"Menu",(function(){return oe.Menu})),o.d(t,"MenuItem",(function(){return re.MenuItem})),o.d(t,"Modal",(function(){return ie.Modal})),o.d(t,"Pagination",(function(){return ne.Pagination})),o.d(t,"PhoneInput",(function(){return ce.PhoneInput})),o.d(t,"ProgressBar",(function(){return se.ProgressBar})),o.d(t,"Radio",(function(){return de.Radio})),o.d(t,"RadioGroup",(function(){return le.RadioGroup})),o.d(t,"Slider",(function(){return ae.Slider})),o.d(t,"Spinner",(function(){return ue.Spinner})),o.d(t,"Table",(function(){return pe.Table})),o.d(t,"TableAdvanced",(function(){return me.TableAdvanced})),o.d(t,"Tab",(function(){return he.Tab})),o.d(t,"TabPanel",(function(){return fe.TabPanel})),o.d(t,"Tabs",(function(){return ge.Tabs})),o.d(t,"TaskItem",(function(){return be.TaskItem})),o.d(t,"Theme",(function(){return je.Theme})),o.d(t,"TimePicker",(function(){return ye.TimePicker})),o.d(t,"ToggleSwitch",(function(){return ve.ToggleSwitch})),o.d(t,"Tooltip",(function(){return xe.Tooltip}));var r,i=o(81),n=o(82),c=o(83),s=o(102),d=o(103),l=o(43),a=o(84),u=o(49),p=o(104),m=o(105),h=o(17),f=o(106),g=o(107),b=o(85),j=o(86),y=o(108),v=o(109),x=o(7),q=o(4),k=o(23),w=o.n(k),T=o(0),C=T.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:0 0;color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}`,P=function(e,t,o,r){var i,n=arguments.length,c=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(c=(n<3?i(c):n>3?i(t,o,c):i(t,o))||c);return n>3&&c&&Object.defineProperty(t,o,c),c},O=function(e,t,o,r){return new(o||(o=Promise))((function(i,n){function c(e){try{d(r.next(e))}catch(e){n(e)}}function s(e){try{d(r.throw(e))}catch(e){n(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(c,s)}d((r=r.apply(e,t||[])).next())}))};!function(e){let t=class extends T.LitElement{constructor(){super(...arguments),this.copyLocalization="cURL",this.copiedLocalization="Copied",this.method="get",this.acceptLanguage="javascript",this.url="javascript",this.disableCopyButton=!0,this.acceptTypes="",this.copied=!1}static get styles(){return[q.a,C]}handleSlotChange(){if(this.slotNodes&&this.slotNodes.length){const e=this.slotNodes.find(e=>"CODE"===e.tagName);if(e){const t=e.textContent;t&&this.highlightBlock(t)}}}handleUrlSlotChange(){if(this.copied=!1,this.slotUrl&&this.slotUrl.length){const e=this.slotUrl.find(e=>e);if(e){const t=e.textContent;t&&this.copyUrl(t)}}}highlightBlock(e){e&&(this.codeBlock.innerText=e),w.a.highlightBlock(this.codeBlock)}copyUrl(e){this.codeUrl.innerText=e,this.disableCopyButton=!1}copyClipboard(){this.disableCopyButton||(this.codeUrl.innerText,this.selectTarget(this.codeUrl))}copyText(){try{document.execCommand("copy"),this.copied=!0}catch(e){console.warn("Copy text failed"),this.copied=!1}}select(e){const t=window.getSelection(),o=document.createRange();o.selectNodeContents(e),t&&(t.removeAllRanges(),t.addRange(o))}selectTarget(e){this.select(e),this.copyText()}importLanguage(e){return O(this,void 0,void 0,(function*(){try{const{default:t}=yield o(87)("./"+e);w.a.registerLanguage(""+e,t),this.setAcceptTypes()}catch(e){console.warn("Please set correct language name")}}))}getAllAcceptTypes(){const e=w.a.listLanguages();return e.length?e.map(e=>w.a.getLanguage(""+e).aliases).map(e=>e.map(e=>"."+e)).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(e){super.updated(e),e.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage),e.has("acceptTypes")&&this.highlightBlock()}render(){return T.html`
|
|
2
2
|
<div class="md-code-editor" part="code-editor">
|
|
3
3
|
<div class="md-code-editor-header">
|
|
4
4
|
<div class="md-code-editor-name">
|
package/dist/index.js
CHANGED
|
@@ -59,9 +59,9 @@ require("./chunks/md-78");
|
|
|
59
59
|
require("./chunks/md-72");
|
|
60
60
|
require("./chunks/md-71");
|
|
61
61
|
require("./chunks/md-59");
|
|
62
|
+
require("./chunks/md-83");
|
|
62
63
|
require("./chunks/md-51");
|
|
63
64
|
require("./chunks/md-50");
|
|
64
|
-
require("./chunks/md-83");
|
|
65
65
|
require("./chunks/md-69");
|
|
66
66
|
require("./chunks/md-60");
|
|
67
67
|
require("./chunks/md-65");
|
|
@@ -15,6 +15,7 @@ export declare namespace ComboBox {
|
|
|
15
15
|
const ELEMENT_base: typeof LitElement & import("../../mixins/FocusMixin").AnyConstructor<import("../../mixins/FocusMixin").FocusClass>;
|
|
16
16
|
export class ELEMENT extends ELEMENT_base {
|
|
17
17
|
private _focusedIndex;
|
|
18
|
+
private _focusedGroupIndex;
|
|
18
19
|
label: string;
|
|
19
20
|
options: (string | OptionMember)[];
|
|
20
21
|
customOptions: never[];
|
|
@@ -23,6 +24,8 @@ export declare namespace ComboBox {
|
|
|
23
24
|
disabled: boolean;
|
|
24
25
|
ordered: boolean;
|
|
25
26
|
expanded: boolean;
|
|
27
|
+
groupExpandedList: any;
|
|
28
|
+
searchItem: boolean;
|
|
26
29
|
compact: boolean;
|
|
27
30
|
noClearIcon: boolean;
|
|
28
31
|
selectWhenInFocus: boolean;
|
|
@@ -55,6 +58,8 @@ export declare namespace ComboBox {
|
|
|
55
58
|
private isSelectAllChecked;
|
|
56
59
|
get focusedIndex(): number;
|
|
57
60
|
set focusedIndex(index: number);
|
|
61
|
+
get focusedGroupIndex(): number;
|
|
62
|
+
set focusedGroupIndex(index: number);
|
|
58
63
|
private multiSelectedIndex;
|
|
59
64
|
private multiSelected;
|
|
60
65
|
private customContent;
|
|
@@ -74,15 +79,18 @@ export declare namespace ComboBox {
|
|
|
74
79
|
private isOptionObject;
|
|
75
80
|
private setOptionCustomContent;
|
|
76
81
|
private getOptionValue;
|
|
82
|
+
private getOptionGroupName;
|
|
77
83
|
private getOptionId;
|
|
78
84
|
private getFocusedItem;
|
|
79
85
|
private setupEvents;
|
|
80
86
|
private teardownEvents;
|
|
81
87
|
private setVisualListbox;
|
|
88
|
+
private setGroupList;
|
|
82
89
|
private findSelectedOption;
|
|
83
90
|
private findOptionIndex;
|
|
84
91
|
private setSelectedOption;
|
|
85
92
|
private notifySelectedChange;
|
|
93
|
+
private handleGroupFilter;
|
|
86
94
|
private filterOptions;
|
|
87
95
|
private resizeListbox;
|
|
88
96
|
private setInputValue;
|
|
@@ -116,8 +124,11 @@ export declare namespace ComboBox {
|
|
|
116
124
|
private selectedChange;
|
|
117
125
|
private shouldChangeButton;
|
|
118
126
|
private setCustomValue;
|
|
127
|
+
handleGroupFocus(): void;
|
|
119
128
|
handleInputKeyDown(event: KeyboardEvent): void;
|
|
129
|
+
handleGroupLabelKeyDown(event: KeyboardEvent, option: OptionMember): void;
|
|
120
130
|
toggleVisualListBox(e: any): void;
|
|
131
|
+
toggleGroupListBox(e: Event, data: string): void;
|
|
121
132
|
handleRemoveAll(event: MouseEvent): void;
|
|
122
133
|
handleOutsideClick: (event: MouseEvent) => void;
|
|
123
134
|
connectedCallback(): void;
|
|
@@ -127,6 +138,7 @@ export declare namespace ComboBox {
|
|
|
127
138
|
"md-combobox-multiselect": boolean;
|
|
128
139
|
};
|
|
129
140
|
get filteredOptions(): (string | OptionMember)[];
|
|
141
|
+
get filteredGroupOptions(): (string | OptionMember)[];
|
|
130
142
|
get comboBoxTemplateClassMap(): {
|
|
131
143
|
[x: string]: boolean;
|
|
132
144
|
"md-combobox-searchable": boolean;
|
|
@@ -135,6 +147,7 @@ export declare namespace ComboBox {
|
|
|
135
147
|
selectedOptionTemplate(selectedOption: string | OptionMember): import("lit-element").TemplateResult;
|
|
136
148
|
clearButtonTemplate(): import("lit-element").TemplateResult;
|
|
137
149
|
arrowButtonTemplate(): import("lit-element").TemplateResult;
|
|
150
|
+
groupArrowButtonTemplate(data: string): import("lit-element").TemplateResult;
|
|
138
151
|
getSelectAllOption(): import("lit-element").TemplateResult;
|
|
139
152
|
getSelctedCount(): {};
|
|
140
153
|
getCustomErrorContent(): Element | null;
|
|
@@ -36,7 +36,7 @@ export declare namespace TimePicker {
|
|
|
36
36
|
handleTimeBlur(event: CustomEvent, unit: TimePicker.TimeUnit): void;
|
|
37
37
|
static get styles(): import("lit-element").CSSResult[];
|
|
38
38
|
formatTimeUnit: (unit: TimePicker.TimeUnit) => void;
|
|
39
|
-
messageType: (isValid: boolean) => "
|
|
39
|
+
messageType: (isValid: boolean) => "" | "error";
|
|
40
40
|
generateTimeBox: (unit: TimePicker.TimeUnit) => import("lit-element").TemplateResult;
|
|
41
41
|
generateAmPmComboBox: () => import("lit-element").TemplateResult;
|
|
42
42
|
render(): import("lit-element").TemplateResult;
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import "@/components/label/Label";
|
|
9
9
|
import { LitElement } from "lit-element";
|
|
10
|
+
export declare const alignLabel: readonly ["left", "right"];
|
|
10
11
|
export declare namespace ToggleSwitch {
|
|
12
|
+
export type alignLabel = typeof alignLabel[number];
|
|
11
13
|
const ELEMENT_base: typeof LitElement & import("../../mixins/FocusMixin").AnyConstructor<import("../../mixins/FocusMixin").FocusClass>;
|
|
12
14
|
export class ELEMENT extends ELEMENT_base {
|
|
13
15
|
htmlId: string;
|
|
@@ -16,12 +18,14 @@ export declare namespace ToggleSwitch {
|
|
|
16
18
|
disabled: boolean;
|
|
17
19
|
small: boolean;
|
|
18
20
|
smaller: boolean;
|
|
21
|
+
alignLabel: ToggleSwitch.alignLabel;
|
|
19
22
|
autofocus: boolean;
|
|
20
23
|
handleClick(): void;
|
|
21
24
|
get toggleSwitchClassMap(): {
|
|
22
25
|
"md-toggle-switch--small": boolean;
|
|
23
26
|
"md-toggle-switch--smaller": boolean;
|
|
24
27
|
};
|
|
28
|
+
switchTemplate(): import("lit-element").TemplateResult;
|
|
25
29
|
render(): import("lit-element").TemplateResult;
|
|
26
30
|
static get styles(): import("lit-element").CSSResult[];
|
|
27
31
|
}
|