@descope/web-components-ui 3.3.0 → 3.3.2

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.
Files changed (26) hide show
  1. package/dist/cjs/index.cjs.js +18 -9
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +37 -11
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/DescopeDev.js +1 -1
  6. package/dist/umd/DescopeDev.js.map +1 -1
  7. package/dist/umd/descope-date-field-index-js.js +1 -1
  8. package/dist/umd/descope-date-field-index-js.js.map +1 -1
  9. package/dist/umd/descope-hybrid-field-index-js.js +2 -2
  10. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
  11. package/dist/umd/index.js +1 -1
  12. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  13. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -1
  14. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  15. package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
  16. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
  17. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
  18. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  19. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
  20. package/package.json +32 -32
  21. package/src/components/descope-date-field/DateFieldClass.js +12 -7
  22. package/src/components/descope-hybrid-field/HybridFieldClass.js +4 -2
  23. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -0
  24. package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +12 -2
  25. package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -0
  26. package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js +7 -0
package/dist/index.esm.js CHANGED
@@ -8054,8 +8054,10 @@ class RawDateFieldClass extends BaseInputClass$c {
8054
8054
  #adjustPopoverPosition() {
8055
8055
  const popover = this.shadowRoot.querySelector('vaadin-popover').shadowRoot;
8056
8056
 
8057
- // Remove previously added stylesheets
8058
- this.#popoverPosStylesheet?.remove();
8057
+ // Reset any previous transform so getBoundingClientRect measures the natural position
8058
+ this.#popoverPosStylesheet?.replaceSync(
8059
+ `vaadin-popover-overlay::part(overlay) { transform: none; }`
8060
+ );
8059
8061
 
8060
8062
  const windowRect = document.body.getBoundingClientRect();
8061
8063
  const inputRect = this.getBoundingClientRect();
@@ -8073,14 +8075,17 @@ class RawDateFieldClass extends BaseInputClass$c {
8073
8075
  newOffset = Math.min(Math.abs(offset), availableLeft) * -1;
8074
8076
  }
8075
8077
 
8076
- injectStyle(
8077
- `
8078
+ const css = `
8078
8079
  vaadin-popover-overlay::part(overlay) {
8079
8080
  transform: translateX(${newOffset}px);
8080
8081
  }
8081
- `,
8082
- popover
8083
- );
8082
+ `;
8083
+
8084
+ if (this.#popoverPosStylesheet) {
8085
+ this.#popoverPosStylesheet.replaceSync(css);
8086
+ } else {
8087
+ this.#popoverPosStylesheet = injectStyle(css, popover);
8088
+ }
8084
8089
  }
8085
8090
 
8086
8091
  #getPopoverContent() {
@@ -11075,12 +11080,19 @@ const componentName$$ = getComponentName('phone-field-internal');
11075
11080
 
11076
11081
  const commonAttrs$2 = ['disabled', 'size', 'bordered', 'readonly'];
11077
11082
  const countryAttrs = ['country-input-placeholder', 'default-code', 'restrict-countries'];
11078
- const phoneAttrs = ['phone-input-placeholder', 'maxlength', 'autocomplete', 'name'];
11083
+ const phoneAttrs = [
11084
+ 'phone-input-placeholder',
11085
+ 'maxlength',
11086
+ 'autocomplete',
11087
+ 'name',
11088
+ 'phone-input-type',
11089
+ ];
11079
11090
  const labelTypeAttrs$1 = ['label-type', 'country-input-label', 'label'];
11080
11091
  const mapAttrs$1 = {
11081
11092
  'country-input-label': 'label',
11082
11093
  'country-input-placeholder': 'placeholder',
11083
11094
  'phone-input-placeholder': 'placeholder',
11095
+ 'phone-input-type': 'type',
11084
11096
  };
11085
11097
 
11086
11098
  const inputRelatedAttrs$1 = [].concat(commonAttrs$2, countryAttrs, phoneAttrs, labelTypeAttrs$1);
@@ -11116,7 +11128,10 @@ let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$a {
11116
11128
  this.inputs = [this.comboBox, this.textField];
11117
11129
 
11118
11130
  forwardAttrs(this, this.comboBox, { includeAttrs: ['label-type'] });
11119
- forwardAttrs(this, this.textField, { includeAttrs: ['label-type', 'required'] });
11131
+ forwardAttrs(this, this.textField, {
11132
+ includeAttrs: ['label-type', 'required', 'phone-input-type'],
11133
+ mapAttrs: { 'phone-input-type': 'type' },
11134
+ });
11120
11135
 
11121
11136
  // override combo box setter to display dialCode value in input
11122
11137
  this.comboBox.customValueTransformFn = (val) => {
@@ -11486,6 +11501,7 @@ const customMixin$b = (superclass) =>
11486
11501
  'allow-alphanumeric-input',
11487
11502
  'format-value',
11488
11503
  'strict-validation',
11504
+ 'phone-input-type',
11489
11505
  ],
11490
11506
  });
11491
11507
  }
@@ -11765,9 +11781,11 @@ const observedAttributes$4 = [
11765
11781
  'maxlength',
11766
11782
  'autocomplete',
11767
11783
  'label-type',
11784
+ 'phone-input-type',
11768
11785
  ];
11769
11786
  const mapAttrs = {
11770
11787
  'phone-input-placeholder': 'placeholder',
11788
+ 'phone-input-type': 'type',
11771
11789
  };
11772
11790
 
11773
11791
  const BaseInputClass$9 = createBaseInputClass({ componentName: componentName$Z, baseSelector: 'div' });
@@ -11861,6 +11879,11 @@ class PhoneFieldInternal extends BaseInputClass$9 {
11861
11879
  this.handleFocusEventsDispatching([this.textField]);
11862
11880
 
11863
11881
  forwardAttrs$1(this.textField, this, { includeAttrs: ['has-value'] });
11882
+
11883
+ forwardAttrs$1(this, this.textField, {
11884
+ includeAttrs: ['phone-input-type'],
11885
+ mapAttrs: { 'phone-input-type': 'type' },
11886
+ });
11864
11887
  }
11865
11888
 
11866
11889
  getValidity() {
@@ -12063,6 +12086,7 @@ const customMixin$a = (superclass) =>
12063
12086
  'format-value',
12064
12087
  'strict-validation',
12065
12088
  'data-errormessage-type-mismatch',
12089
+ 'phone-input-type',
12066
12090
  ],
12067
12091
  });
12068
12092
  }
@@ -19025,6 +19049,7 @@ const attrs = {
19025
19049
  'phone-minlength',
19026
19050
  'phone-format-value',
19027
19051
  'phone-strict-validation',
19052
+ 'phone-input-type',
19028
19053
  'data-errormessage-value-missing-phone',
19029
19054
  ],
19030
19055
  inputBox: [
@@ -19033,6 +19058,7 @@ const attrs = {
19033
19058
  'phone-minlength',
19034
19059
  'phone-format-value',
19035
19060
  'phone-strict-validation',
19061
+ 'phone-input-type',
19036
19062
  'data-errormessage-value-missing-phone',
19037
19063
  ],
19038
19064
  },
@@ -19072,8 +19098,8 @@ class RawHybridField extends BaseClass$6 {
19072
19098
  this.attachShadow({ mode: 'open' }).innerHTML = `
19073
19099
  <div class="wrapper">
19074
19100
  <descope-email-field external-input="${this.isExternalInput}"></descope-email-field>
19075
- <descope-phone-field allow-alphanumeric-input="true"></descope-phone-field>
19076
- <descope-phone-input-box-field allow-alphanumeric-input="true"></descope-phone-input-box-field>
19101
+ <descope-phone-field allow-alphanumeric-input="true" phone-input-type="text"></descope-phone-field>
19102
+ <descope-phone-input-box-field allow-alphanumeric-input="true" phone-input-type="text"></descope-phone-input-box-field>
19077
19103
  </div>
19078
19104
  `;
19079
19105