@descope/web-components-ui 1.90.0 → 1.91.0

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.
package/dist/index.esm.js CHANGED
@@ -6645,7 +6645,7 @@ const componentName$14 = getComponentName$1('date-field');
6645
6645
  const BASE_SELECTOR = 'vaadin-popover';
6646
6646
  const BaseInputClass$a = createBaseInputClass$1({ componentName: componentName$14, baseSelector: BASE_SELECTOR });
6647
6647
 
6648
- const dateFieldAttrs = ['format', 'opened', 'initial-value', 'readonly'];
6648
+ const dateFieldAttrs = ['format', 'opened', 'initial-value', 'readonly', 'disable-calendar'];
6649
6649
  const calendarAttrs = ['years-range', 'calendar-months', 'calendar-weekdays'];
6650
6650
  const observedAttrs$3 = [...dateFieldAttrs, ...calendarAttrs];
6651
6651
 
@@ -6735,6 +6735,10 @@ class RawDateFieldClass extends BaseInputClass$a {
6735
6735
  :host([readonly="true"]) .toggle-calendar {
6736
6736
  pointer-events: none;
6737
6737
  }
6738
+
6739
+ .hidden {
6740
+ display: none;
6741
+ }
6738
6742
  `,
6739
6743
  this
6740
6744
  );
@@ -6820,6 +6824,10 @@ class RawDateFieldClass extends BaseInputClass$a {
6820
6824
  return this.dateCounters.some((dc) => !dc.isInRange(dc.numberValue));
6821
6825
  }
6822
6826
 
6827
+ get disableCalendar() {
6828
+ return this.getAttribute('disable-calendar') === 'true';
6829
+ }
6830
+
6823
6831
  reportValidity() {
6824
6832
  this.inputElement.reportValidity();
6825
6833
  }
@@ -6980,6 +6988,7 @@ class RawDateFieldClass extends BaseInputClass$a {
6980
6988
  }
6981
6989
 
6982
6990
  openPopover() {
6991
+ if (this.disableCalendar) return;
6983
6992
  this.setAttribute('opened', 'true');
6984
6993
  }
6985
6994
 
@@ -7233,6 +7242,14 @@ class RawDateFieldClass extends BaseInputClass$a {
7233
7242
  }
7234
7243
  }
7235
7244
 
7245
+ togglePopoverAccess(visibility) {
7246
+ if (visibility) {
7247
+ this.popoverToggleButton.classList.remove('hidden');
7248
+ } else {
7249
+ this.popoverToggleButton.classList.add('hidden');
7250
+ }
7251
+ }
7252
+
7236
7253
  attributeChangedCallback(attrName, oldValue, newValue) {
7237
7254
  super.attributeChangedCallback?.(attrName, oldValue, newValue);
7238
7255
 
@@ -7240,6 +7257,9 @@ class RawDateFieldClass extends BaseInputClass$a {
7240
7257
  if (attrName === 'years-range') {
7241
7258
  this.setYearRange(newValue);
7242
7259
  }
7260
+ if (attrName === 'disable-calendar') {
7261
+ this.togglePopoverAccess(newValue !== 'true');
7262
+ }
7243
7263
  if (dateFieldAttrs.includes(attrName)) {
7244
7264
  if (newValue && attrName === 'format') {
7245
7265
  this.onFormatUpdate(newValue);