@openremote/or-attribute-picker 1.12.0-snapshot.20251212152633 → 1.12.0-snapshot.20251212165311

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/umd/index.js CHANGED
@@ -141,6 +141,9 @@
141
141
  display: flex;
142
142
  flex-direction: column;
143
143
  }
144
+ .mdc-form-field:has(> .mdc-radio) {
145
+ height: 56px !important;
146
+ }
144
147
  .mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) + .mdc-text-field-helper-line .mdc-text-field-helper-text {
145
148
  color: var(--mdc-theme-error, #b00020)
146
149
  }
@@ -260,30 +263,28 @@
260
263
  .mdc-list-item__graphic > or-icon {
261
264
  pointer-events: none;
262
265
  }
263
- `,is=class extends th{constructor(){super(...arguments),this.readonly=!1,this.required=!1,this.checked=!1,this.indeterminate=!1,this.multiple=!1,this.searchLabel="search",this.compact=!1,this.comfortable=!1,this.raised=!1,this.action=!1,this.unElevated=!1,this.outlined=!1,this.rounded=!1,this.disableSliderNumberInput=!1,this.fullWidth=!1,this.helperPersistent=!1,this.autoValidate=!1,this.charCounter=!1,this.disabled=!1,this.continuous=!1,this.resizeVertical=!1,this.censored=!1,this.advertised=!1,this._selectedIndex=-1,this.isUiValid=!0}static get styles(){return[c`${o(n5)}`,c`${o(n1)}`,c`${o(n2)}`,c`${o(n4)}`,c`${o(n3)}`,c`${o(n7)}`,c`${o(n6)}`,c`${o(n8)}`,c`${o(n9)}`,c`${o(it)}`,c`${o(ie)}`,c`${o(ii)}`,c`${o(ir)}`,c`${o(io)}`,c`${o(ia)}`,c`${o(il)}`,ic]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var t,e;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null==(t=this._menuObserver)||t.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null==(e=this._menuObserver)||e.disconnect())}shouldUpdate(t){return t.has("indeterminate")&&this._mdcComponent&&this.type===tA.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),t.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===tA.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),t.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===tA.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=tA.DATETIME:"boolean"==typeof this.value?this.type=tA.CHECKBOX:"number"==typeof this.value?this.type=tA.NUMBER:"string"==typeof this.value?this.type=tA.TEXT:this.type=tA.JSON),!0}focus(){this.type===tA.RANGE&&this._mdcComponent2&&"function"==typeof this._mdcComponent2.focus?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){if(this.type){let t=!this.fullWidth&&this.label,e=!this.fullWidth&&this.outlined,n=!!this.helperText,i=!this.isUiValid&&(!!this.errorMessage||!!this.validationMessage),r={"mdc-text-field-helper-text--persistent":!i&&this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},a=null!==this.value&&void 0!==this.value||!1===this.value,o=t?J`<span class="mdc-floating-label ${a?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case tA.RADIO:let l=this.resolveOptions(this.options);return this._selectedIndex=-1,J`
266
+ `,is=class extends th{constructor(){super(...arguments),this.readonly=!1,this.required=!1,this.checked=!1,this.indeterminate=!1,this.multiple=!1,this.searchLabel="search",this.compact=!1,this.comfortable=!1,this.raised=!1,this.action=!1,this.unElevated=!1,this.outlined=!1,this.rounded=!1,this.disableSliderNumberInput=!1,this.fullWidth=!1,this.helperPersistent=!1,this.autoValidate=!1,this.charCounter=!1,this.disabled=!1,this.continuous=!1,this.resizeVertical=!1,this.censored=!1,this.advertised=!1,this._selectedIndex=-1,this.isUiValid=!0}static get styles(){return[c`${o(n5)}`,c`${o(n1)}`,c`${o(n2)}`,c`${o(n4)}`,c`${o(n3)}`,c`${o(n7)}`,c`${o(n6)}`,c`${o(n8)}`,c`${o(n9)}`,c`${o(it)}`,c`${o(ie)}`,c`${o(ii)}`,c`${o(ir)}`,c`${o(io)}`,c`${o(ia)}`,c`${o(il)}`,ic]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var t,e;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null==(t=this._menuObserver)||t.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null==(e=this._menuObserver)||e.disconnect())}shouldUpdate(t){return t.has("indeterminate")&&this._mdcComponent&&this.type===tA.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),t.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===tA.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),t.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===tA.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=tA.DATETIME:"boolean"==typeof this.value?this.type=tA.CHECKBOX:"number"==typeof this.value?this.type=tA.NUMBER:"string"==typeof this.value?this.type=tA.TEXT:this.type=tA.JSON),!0}focus(){this.type===tA.RANGE&&this._mdcComponent2&&"function"==typeof this._mdcComponent2.focus?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){if(this.type){let t=!this.fullWidth&&this.label,e=!this.fullWidth&&this.outlined,n=!!this.helperText,i=!this.isUiValid&&(!!this.errorMessage||!!this.validationMessage),r={"mdc-text-field-helper-text--persistent":!i&&this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},a=null!==this.value&&void 0!==this.value||!1===this.value,o=t?J`<span class="mdc-floating-label ${a?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case tA.RADIO:let l=this.resolveOptions(this.options);return J`
264
267
  <div class="mdc-radio-container">
265
- ${l?l.map(([t,e],n)=>(this.value===t&&(this._selectedIndex=n),J`
268
+ ${l?l.map(([t,e])=>J`
266
269
  <div id="field" class="mdc-form-field">
267
270
  <div class="mdc-radio">
268
- <input type="radio"
271
+ <input type="radio"
269
272
  id="elem-${t}"
270
273
  name="${this.name??Z}"
271
274
  value="${t}"
272
- ?checked="${this.value&&this.value.includes(t)}"
275
+ .checked="${this.value===t}"
273
276
  ?required="${this.required}"
274
- ?disabled="${this.disabled||this.readonly}"
277
+ ?disabled="${this.disabled||this.readonly}"
275
278
  @change="${e=>this.onValueChange(e.target,t)}"
276
279
  class="mdc-radio__native-control"/>
277
- <div class="mdc-radio__background">
278
- <div class="mdc-radio__outer-circle"></div>
279
- <div class="mdc-radio__inner-circle"></div>
280
- </div>
280
+ <div class="mdc-radio__background">
281
+ <div class="mdc-radio__outer-circle"></div>
282
+ <div class="mdc-radio__inner-circle"></div>
283
+ </div>
281
284
  <div class="mdc-radio__ripple"></div>
282
285
  </div>
283
286
  <label for="elem-${t}"><or-translate value="${e}"></or-translate></label>
284
- </div>
285
-
286
- `)):""}
287
+ </div>`):""}
287
288
  </div>
288
289
  `;case tA.SWITCH:let d={"mdc-switch--disabled":this.disabled||this.readonly,"mdc-switch--full-width":this.fullWidth,"mdc-switch--checked":this.value};return J`
289
290
  <span id="wrapper">