@descope/web-components-ui 1.0.356 → 1.0.358

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -2620,18 +2620,21 @@ var textFieldMappings = {
2620
2620
 
2621
2621
  const componentName$N = getComponentName('email-field');
2622
2622
 
2623
+ const defaultPattern = "^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$";
2624
+ const defaultAutocomplete = 'username';
2625
+
2623
2626
  const customMixin$a = (superclass) =>
2624
2627
  class EmailFieldMixinClass extends superclass {
2625
2628
  init() {
2626
2629
  super.init?.();
2627
2630
 
2628
- this.baseElement.setAttribute('pattern', '^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$');
2629
-
2630
- this.setAttribute('autocomplete', this.getAutocompleteType());
2631
- }
2631
+ if (!this.getAttribute('pattern')) {
2632
+ this.setAttribute('pattern', defaultPattern);
2633
+ }
2632
2634
 
2633
- getAutocompleteType() {
2634
- return this.getAttribute('autocomplete') || 'username';
2635
+ if (!this.getAttribute('autocomplete')) {
2636
+ this.setAttribute('autocomplete', defaultAutocomplete);
2637
+ }
2635
2638
  }
2636
2639
  };
2637
2640
 
@@ -2663,7 +2666,7 @@ const EmailFieldClass = compose(
2663
2666
 
2664
2667
  vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {
2665
2668
  opacity: 0;
2666
- }
2669
+ }
2667
2670
  vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {
2668
2671
  opacity: 0;
2669
2672
  }
@@ -5763,7 +5766,7 @@ let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$6 {
5763
5766
  this.inputs = [this.countryCodeInput, this.phoneNumberInput];
5764
5767
 
5765
5768
  forwardAttrs(this, this.countryCodeInput, { includeAttrs: ['label-type'] });
5766
- forwardAttrs(this, this.phoneNumberInput, { includeAttrs: ['label-type'] });
5769
+ forwardAttrs(this, this.phoneNumberInput, { includeAttrs: ['label-type', 'required'] });
5767
5770
 
5768
5771
  // override combo box setter to display dialCode value in input
5769
5772
  this.countryCodeInput.customValueTransformFn = (val) => {