@descope/web-components-ui 1.36.0 → 1.37.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
@@ -5654,7 +5654,7 @@ const nextMonth = (timestamp) => {
5654
5654
 
5655
5655
  const componentName$12 = getComponentName$1('calendar');
5656
5656
 
5657
- const observedAttrs$4 = [
5657
+ const observedAttrs$5 = [
5658
5658
  'initial-value',
5659
5659
  'initial-year',
5660
5660
  'initial-month',
@@ -5673,7 +5673,7 @@ const BaseInputClass$b = createBaseInputClass$1({ componentName: componentName$1
5673
5673
 
5674
5674
  class RawCalendar extends BaseInputClass$b {
5675
5675
  static get observedAttributes() {
5676
- return [].concat(BaseInputClass$b.observedAttributes || [], observedAttrs$4, calendarUiAttrs);
5676
+ return [].concat(BaseInputClass$b.observedAttributes || [], observedAttrs$5, calendarUiAttrs);
5677
5677
  }
5678
5678
 
5679
5679
  // preview state timestamp
@@ -6446,12 +6446,12 @@ var textFieldMappings = {
6446
6446
 
6447
6447
  const componentName$11 = getComponentName$1('text-field');
6448
6448
 
6449
- const observedAttrs$3 = ['type', 'label-type', 'copy-to-clipboard'];
6449
+ const observedAttrs$4 = ['type', 'label-type', 'copy-to-clipboard'];
6450
6450
 
6451
6451
  const customMixin$e = (superclass) =>
6452
6452
  class TextFieldClass extends superclass {
6453
6453
  static get observedAttributes() {
6454
- return observedAttrs$3.concat(superclass.observedAttributes || []);
6454
+ return observedAttrs$4.concat(superclass.observedAttributes || []);
6455
6455
  }
6456
6456
 
6457
6457
  icon;
@@ -6712,7 +6712,7 @@ const BaseInputClass$a = createBaseInputClass$1({ componentName: componentName$1
6712
6712
 
6713
6713
  const dateFieldAttrs = ['format', 'opened', 'initial-value', 'readonly'];
6714
6714
  const calendarAttrs = ['years-range', 'calendar-months', 'calendar-weekdays'];
6715
- const observedAttrs$2 = [...dateFieldAttrs, ...calendarAttrs];
6715
+ const observedAttrs$3 = [...dateFieldAttrs, ...calendarAttrs];
6716
6716
 
6717
6717
  class RawDateFieldClass extends BaseInputClass$a {
6718
6718
  timestamp = '';
@@ -6728,7 +6728,7 @@ class RawDateFieldClass extends BaseInputClass$a {
6728
6728
  ];
6729
6729
 
6730
6730
  static get observedAttributes() {
6731
- return [].concat(BaseInputClass$a.observedAttributes || [], observedAttrs$2);
6731
+ return [].concat(BaseInputClass$a.observedAttributes || [], observedAttrs$3);
6732
6732
  }
6733
6733
 
6734
6734
  constructor() {
@@ -14613,14 +14613,19 @@ customElements.define(componentName$s, BadgeClass);
14613
14613
 
14614
14614
  const componentName$r = getComponentName$1('modal');
14615
14615
 
14616
+ const observedAttrs$2 = ['opened'];
14617
+
14616
14618
  const customMixin$7 = (superclass) =>
14617
14619
  class ModalMixinClass extends superclass {
14620
+ static get observedAttributes() {
14621
+ return [].concat(superclass.observedAttributes || [], observedAttrs$2);
14622
+ }
14623
+
14618
14624
  get opened() {
14619
14625
  return this.getAttribute('opened') === 'true';
14620
14626
  }
14621
14627
 
14622
14628
  handleOpened() {
14623
- forwardAttrs$1(this, this.baseElement, { includeAttrs: ['opened'] });
14624
14629
  if (this.opened) {
14625
14630
  this.style.display = '';
14626
14631
  } else {
@@ -14628,6 +14633,14 @@ const customMixin$7 = (superclass) =>
14628
14633
  }
14629
14634
  }
14630
14635
 
14636
+ attributeChangedCallback(name, oldValue, newValue) {
14637
+ super.attributeChangedCallback?.(name, oldValue, newValue);
14638
+
14639
+ if (name === 'opened') {
14640
+ this.handleOpened();
14641
+ }
14642
+ }
14643
+
14631
14644
  init() {
14632
14645
  super.init?.();
14633
14646
  this.style.display = 'none';
@@ -14644,6 +14657,7 @@ const customMixin$7 = (superclass) =>
14644
14657
  .appendChild(document.createElement('slot'));
14645
14658
 
14646
14659
  this.#overrideOverlaySettings();
14660
+ forwardAttrs$1(this, this.baseElement, { includeAttrs: ['opened'] });
14647
14661
 
14648
14662
  // we need to always open the modal in `opened=false`
14649
14663
  // to prevent it from rendering outside the dialog