@descope/web-components-ui 3.1.8 → 3.1.9

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/index.esm.js CHANGED
@@ -19119,7 +19119,11 @@ class RawHybridField extends BaseClass$6 {
19119
19119
 
19120
19120
  onValueChange() {
19121
19121
  this.#selectionStart = this.activeInputEle.selectionStart;
19122
- this.handleActiveInput(this.activeInput.value);
19122
+ // phone components expose an API to their inputElement; in case of phone variants like
19123
+ // phone-input-box-field, we want to make sure that the value being passed
19124
+ // is raw value from input, and not the value with a dial-code prefix, or other decorations
19125
+ // applied behind the scenes by the phone components
19126
+ this.handleActiveInput(this.activeInputEle.value || this.activeInput.value);
19123
19127
  }
19124
19128
 
19125
19129
  handleActiveInput(val) {
@@ -19131,7 +19135,12 @@ class RawHybridField extends BaseClass$6 {
19131
19135
  }
19132
19136
 
19133
19137
  setActiveInput(expectedActiveInput) {
19134
- const val = this.activeInput.value;
19138
+ // phone components expose an API to their inputElement; in case of phone variants like
19139
+ // phone-input-box-field, we want to make sure that the value being passed
19140
+ // is raw value from input, and not the value with a dial-code prefix, or other decorations
19141
+ // applied behind the scenes by the phone components
19142
+ const val = this.activeInputEle.value || this.activeInput.value;
19143
+
19135
19144
  this.activeInput = expectedActiveInput;
19136
19145
  this.setActiveInputValue(val);
19137
19146
  if (this.#isReportedValidity) this.activeInput.reportValidity();