@descope/web-components-ui 3.1.8 → 3.1.10

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.
@@ -24157,7 +24157,11 @@ class RawHybridField extends BaseClass$2 {
24157
24157
 
24158
24158
  onValueChange() {
24159
24159
  this.#selectionStart = this.activeInputEle.selectionStart;
24160
- this.handleActiveInput(this.activeInput.value);
24160
+ // phone components expose an API to their inputElement; in case of phone variants like
24161
+ // phone-input-box-field, we want to make sure that the value being passed
24162
+ // is raw value from input, and not the value with a dial-code prefix, or other decorations
24163
+ // applied behind the scenes by the phone components
24164
+ this.handleActiveInput(this.activeInputEle.value || this.activeInput.value);
24161
24165
  }
24162
24166
 
24163
24167
  handleActiveInput(val) {
@@ -24169,7 +24173,12 @@ class RawHybridField extends BaseClass$2 {
24169
24173
  }
24170
24174
 
24171
24175
  setActiveInput(expectedActiveInput) {
24172
- const val = this.activeInput.value;
24176
+ // phone components expose an API to their inputElement; in case of phone variants like
24177
+ // phone-input-box-field, we want to make sure that the value being passed
24178
+ // is raw value from input, and not the value with a dial-code prefix, or other decorations
24179
+ // applied behind the scenes by the phone components
24180
+ const val = this.activeInputEle.value || this.activeInput.value;
24181
+
24173
24182
  this.activeInput = expectedActiveInput;
24174
24183
  this.setActiveInputValue(val);
24175
24184
  if (this.#isReportedValidity) this.activeInput.reportValidity();