@momentum-design/components 0.104.3 → 0.104.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.
@@ -211,7 +211,7 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
211
211
  * @param option - The option element in DOM which gets selected.
212
212
  */
213
213
  setSelectedOption(option) {
214
- var _a, _b;
214
+ var _a, _b, _c;
215
215
  // set the attribute 'selected' on the option in HTML and remove it from others
216
216
  this.updateSelectedInChildOptions(option);
217
217
  // update the tabindex for all options
@@ -221,7 +221,7 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
221
221
  // update all form related values
222
222
  this.value = (_b = (_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
223
223
  this.internals.setFormValue(this.value);
224
- this.inputElement.setAttribute('value', this.value);
224
+ (_c = this.inputElement) === null || _c === void 0 ? void 0 : _c.setAttribute('value', this.value);
225
225
  this.setInputValidity();
226
226
  }
227
227
  /**
@@ -269,11 +269,12 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
269
269
  * @internal
270
270
  */
271
271
  setInputValidity() {
272
+ var _a, _b;
272
273
  if (!this.selectedOption && this.required && this.validationMessage) {
273
- this.inputElement.setCustomValidity(this.validationMessage);
274
+ (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.setCustomValidity(this.validationMessage);
274
275
  }
275
276
  else {
276
- this.inputElement.setCustomValidity('');
277
+ (_b = this.inputElement) === null || _b === void 0 ? void 0 : _b.setCustomValidity('');
277
278
  }
278
279
  this.setValidity();
279
280
  }
@@ -469,6 +470,9 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
469
470
  updateState() {
470
471
  var _a;
471
472
  const newSelectedOption = this.getFirstSelectedOption();
473
+ if (!this.inputElement) {
474
+ return;
475
+ }
472
476
  if (!newSelectedOption) {
473
477
  this.setSelectedOption(this.placeholder ? null : this.getFirstValidOption());
474
478
  }
@@ -581,7 +585,7 @@ __decorate([
581
585
  __metadata("design:type", String)
582
586
  ], Select.prototype, "placement", void 0);
583
587
  __decorate([
584
- property({ type: Boolean, attribute: 'soft-disabled' }),
588
+ property({ type: Boolean, attribute: 'soft-disabled', reflect: true }),
585
589
  __metadata("design:type", Boolean)
586
590
  ], Select.prototype, "softDisabled", void 0);
587
591
  __decorate([