@momentum-ui/web-components 2.7.17 → 2.7.19

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.
@@ -88,7 +88,7 @@
88
88
  <span class="highlight-text">${t}</span>
89
89
  `:a.html`
90
90
  <span class="selected-label-text">${t}</span>
91
- `)}addStyle(){const t=!this.expanded||this.options.length&&0===this.filteredOptions.length&&this.inputValue&&this.allowCustomValue;return this.checkForVirtualScroll()?Object(b.styleMap)({visibility:t?"hidden":"visible","z-index":"99"}):Object(b.styleMap)({display:t?"none":"block","z-index":"99"})}renderItem(t,e){return a.html`
91
+ `)}addStyle(){const t=!this.expanded||this.options.length&&0===this.filteredOptions.length&&this.inputValue&&this.allowCustomValue;return this.checkForVirtualScroll()?Object(b.styleMap)({visibility:t?"hidden":"visible","z-index":t?"-1":"99",opacity:t?"0":"1"}):Object(b.styleMap)({display:t?"none":"block","z-index":"99"})}renderItem(t,e){return a.html`
92
92
  <li
93
93
  id=${this.getOptionId(t)}
94
94
  title="${this.getOptionValue(t)}"
@@ -1,5 +1,5 @@
1
- (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[74],{97:function(e,t,s){"use strict";s.r(t),s.d(t,"RadioGroup",(function(){return i}));var i,d=s(1),o=s(7),c=s(4),n=s(5),r=s(0),a=s(64),h=function(e,t,s,i){var d,o=arguments.length,c=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,s,i);else for(var n=e.length-1;n>=0;n--)(d=e[n])&&(c=(o<3?d(c):o>3?d(t,s,c):d(t,s))||c);return o>3&&c&&Object.defineProperty(t,s,c),c};!function(e){let t=class extends(Object(o.d)(r.LitElement)){constructor(){super(...arguments),this.label="group",this.checked=-1,this.alignment="vertical"}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}updated(e){super.updated(e),e.has("slotted")&&this.setFirstChecked()}get selectedRadioValue(){return this.slotted[this.selected].value}notifySelectedChange(){this.dispatchEvent(new CustomEvent("radio-change",{detail:{selected:this.selectedRadioValue},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}setFirstChecked(){-1!==this.checked&&(this.selected=this.checked,this.setChecked(this.checked))}findRadioIndex(e){const t=e.composedPath();return this.slotted.findIndex(e=>t.includes(e))}findCheckedRadioIndex(){return this.slotted.findIndex(e=>e.checked)}setChecked(e){const t=this.findCheckedRadioIndex();-1!==t&&t!==e&&(this.slotted[t].checked=!1),this.slotted[e].checked=!0}switchRadioOnArrowPress(e,t=1){const s=super.getAvailableSelectedIndex(e,t);-1!==s&&(this.selected=s,this.setChecked(s),this.notifySelectedChange())}isRadioDisabled(e){return this.slotted[e].disabled}handleClick(e){const t=this.findRadioIndex(e);-1!==t&&(this.isRadioDisabled(t)||(this.selected=t,this.setChecked(t),this.notifySelectedChange()))}handleKeyDown(e){const{code:t}=e;switch(t){case d.a.Enter:case d.a.Space:this.isRadioDisabled(this.selected)||(this.setChecked(this.selected),this.notifySelectedChange());break;case d.a.ArrowUp:case d.a.ArrowLeft:0===this.selected?this.switchRadioOnArrowPress(this.slotted.length-1,-1):this.switchRadioOnArrowPress(this.selected-1,-1);break;case d.a.ArrowDown:case d.a.ArrowRight:this.selected===this.slotted.length-1?this.switchRadioOnArrowPress(0):this.switchRadioOnArrowPress(this.selected+1)}}get slotElement(){return this.radioSlot}static get styles(){return[c.a,a.a]}render(){return r.html`
1
+ (window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[74],{97:function(e,t,s){"use strict";s.r(t),s.d(t,"RadioGroup",(function(){return i}));var i,d=s(1),c=s(7),o=s(4),n=s(5),r=s(0),h=s(64),a=function(e,t,s,i){var d,c=arguments.length,o=c<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,i);else for(var n=e.length-1;n>=0;n--)(d=e[n])&&(o=(c<3?d(o):c>3?d(t,s,o):d(t,s))||o);return c>3&&o&&Object.defineProperty(t,s,o),o};!function(e){let t=class extends(Object(c.d)(r.LitElement)){constructor(){super(...arguments),this.label="group",this.checked=-1,this.alignment="vertical"}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}updated(e){super.updated(e),(e.has("slotted")||e.has("checked"))&&this.setFirstChecked()}get selectedRadioValue(){return this.slotted[this.selected].value}notifySelectedChange(){this.dispatchEvent(new CustomEvent("radio-change",{detail:{selected:this.selectedRadioValue},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}setFirstChecked(){-1!==this.checked&&(this.selected=this.checked,this.setChecked(this.checked))}findRadioIndex(e){const t=e.composedPath();return this.slotted.findIndex(e=>t.includes(e))}findCheckedRadioIndex(){return this.slotted.findIndex(e=>e.checked)}setChecked(e){const t=this.findCheckedRadioIndex();-1!==t&&t!==e&&(this.slotted[t].checked=!1),this.slotted[e].checked=!0}switchRadioOnArrowPress(e,t=1){const s=super.getAvailableSelectedIndex(e,t);-1!==s&&(this.selected=s,this.setChecked(s),this.notifySelectedChange())}isRadioDisabled(e){return this.slotted[e].disabled}handleClick(e){const t=this.findRadioIndex(e);-1!==t&&(this.isRadioDisabled(t)||(this.selected=t,this.setChecked(t),this.notifySelectedChange()))}handleKeyDown(e){const{code:t}=e;switch(t){case d.a.Enter:case d.a.Space:this.isRadioDisabled(this.selected)||(this.setChecked(this.selected),this.notifySelectedChange());break;case d.a.ArrowUp:case d.a.ArrowLeft:0===this.selected?this.switchRadioOnArrowPress(this.slotted.length-1,-1):this.switchRadioOnArrowPress(this.selected-1,-1);break;case d.a.ArrowDown:case d.a.ArrowRight:this.selected===this.slotted.length-1?this.switchRadioOnArrowPress(0):this.switchRadioOnArrowPress(this.selected+1)}}get slotElement(){return this.radioSlot}static get styles(){return[o.a,h.a]}render(){return r.html`
2
2
  <div>
3
3
  <slot name="radio"></slot>
4
4
  </div>
5
- `}};h([Object(r.property)({type:String,attribute:"group-label"})],t.prototype,"label",void 0),h([Object(r.property)({type:Number,reflect:!0})],t.prototype,"checked",void 0),h([Object(r.property)({type:String,reflect:!0})],t.prototype,"alignment",void 0),h([Object(r.query)("slot[name='radio']")],t.prototype,"radioSlot",void 0),t=h([Object(n.a)("md-radiogroup")],t),e.ELEMENT=t}(i||(i={}))}}]);
5
+ `}};a([Object(r.property)({type:String,attribute:"group-label"})],t.prototype,"label",void 0),a([Object(r.property)({type:Number,reflect:!0})],t.prototype,"checked",void 0),a([Object(r.property)({type:String,reflect:!0})],t.prototype,"alignment",void 0),a([Object(r.query)("slot[name='radio']")],t.prototype,"radioSlot",void 0),t=a([Object(n.a)("md-radiogroup")],t),e.ELEMENT=t}(i||(i={}))}}]);
@@ -159,7 +159,7 @@ export declare namespace ComboBox {
159
159
  checkForVirtualScroll(): boolean;
160
160
  rangeChanged(): void;
161
161
  getCustomErrorContent(): DocumentFragment;
162
- getCustomContent(option: string | OptionMember): DocumentFragment | import("lit-element").TemplateResult;
162
+ getCustomContent(option: string | OptionMember): import("lit-element").TemplateResult | DocumentFragment;
163
163
  renderGroupLabelHeader(option: OptionMember, optionIndex: number): import("lit-element").TemplateResult;
164
164
  renderWithoutVirtualScroll(): import("lit-html").DirectiveFn;
165
165
  highlightingSearchedText(option: OptionMember | string): import("lit-element").TemplateResult[];
@@ -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) => "error" | "";
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "2.7.17",
3
+ "version": "2.7.19",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",