@descope/web-components-ui 1.0.357 → 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
  }