@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.
@@ -3909,18 +3909,21 @@ var numberField$1 = /*#__PURE__*/Object.freeze({
3909
3909
 
3910
3910
  const componentName$M = getComponentName('email-field');
3911
3911
 
3912
+ const defaultPattern = "^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$";
3913
+ const defaultAutocomplete = 'username';
3914
+
3912
3915
  const customMixin$8 = (superclass) =>
3913
3916
  class EmailFieldMixinClass extends superclass {
3914
3917
  init() {
3915
3918
  super.init?.();
3916
3919
 
3917
- this.baseElement.setAttribute('pattern', '^[\\w\\.\\%\\+\\-]+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$');
3918
-
3919
- this.setAttribute('autocomplete', this.getAutocompleteType());
3920
- }
3920
+ if (!this.getAttribute('pattern')) {
3921
+ this.setAttribute('pattern', defaultPattern);
3922
+ }
3921
3923
 
3922
- getAutocompleteType() {
3923
- return this.getAttribute('autocomplete') || 'username';
3924
+ if (!this.getAttribute('autocomplete')) {
3925
+ this.setAttribute('autocomplete', defaultAutocomplete);
3926
+ }
3924
3927
  }
3925
3928
  };
3926
3929
 
@@ -3952,7 +3955,7 @@ const EmailFieldClass = compose(
3952
3955
 
3953
3956
  vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {
3954
3957
  opacity: 0;
3955
- }
3958
+ }
3956
3959
  vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {
3957
3960
  opacity: 0;
3958
3961
  }