@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.
@@ -16790,7 +16790,7 @@ const componentName$j = getComponentName$1('date-field');
16790
16790
  const BASE_SELECTOR = 'vaadin-popover';
16791
16791
  const BaseInputClass$1 = createBaseInputClass({ componentName: componentName$j, baseSelector: BASE_SELECTOR });
16792
16792
 
16793
- const dateFieldAttrs = ['format', 'opened', 'initial-value', 'readonly'];
16793
+ const dateFieldAttrs = ['format', 'opened', 'initial-value', 'readonly', 'disable-calendar'];
16794
16794
  const calendarAttrs = ['years-range', 'calendar-months', 'calendar-weekdays'];
16795
16795
  const observedAttrs$1 = [...dateFieldAttrs, ...calendarAttrs];
16796
16796
 
@@ -16880,6 +16880,10 @@ class RawDateFieldClass extends BaseInputClass$1 {
16880
16880
  :host([readonly="true"]) .toggle-calendar {
16881
16881
  pointer-events: none;
16882
16882
  }
16883
+
16884
+ .hidden {
16885
+ display: none;
16886
+ }
16883
16887
  `,
16884
16888
  this
16885
16889
  );
@@ -16965,6 +16969,10 @@ class RawDateFieldClass extends BaseInputClass$1 {
16965
16969
  return this.dateCounters.some((dc) => !dc.isInRange(dc.numberValue));
16966
16970
  }
16967
16971
 
16972
+ get disableCalendar() {
16973
+ return this.getAttribute('disable-calendar') === 'true';
16974
+ }
16975
+
16968
16976
  reportValidity() {
16969
16977
  this.inputElement.reportValidity();
16970
16978
  }
@@ -17125,6 +17133,7 @@ class RawDateFieldClass extends BaseInputClass$1 {
17125
17133
  }
17126
17134
 
17127
17135
  openPopover() {
17136
+ if (this.disableCalendar) return;
17128
17137
  this.setAttribute('opened', 'true');
17129
17138
  }
17130
17139
 
@@ -17378,6 +17387,14 @@ class RawDateFieldClass extends BaseInputClass$1 {
17378
17387
  }
17379
17388
  }
17380
17389
 
17390
+ togglePopoverAccess(visibility) {
17391
+ if (visibility) {
17392
+ this.popoverToggleButton.classList.remove('hidden');
17393
+ } else {
17394
+ this.popoverToggleButton.classList.add('hidden');
17395
+ }
17396
+ }
17397
+
17381
17398
  attributeChangedCallback(attrName, oldValue, newValue) {
17382
17399
  super.attributeChangedCallback?.(attrName, oldValue, newValue);
17383
17400
 
@@ -17385,6 +17402,9 @@ class RawDateFieldClass extends BaseInputClass$1 {
17385
17402
  if (attrName === 'years-range') {
17386
17403
  this.setYearRange(newValue);
17387
17404
  }
17405
+ if (attrName === 'disable-calendar') {
17406
+ this.togglePopoverAccess(newValue !== 'true');
17407
+ }
17388
17408
  if (dateFieldAttrs.includes(attrName)) {
17389
17409
  if (newValue && attrName === 'format') {
17390
17410
  this.onFormatUpdate(newValue);