@rivet-health/design-system 41.1.0 → 41.1.1

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.
@@ -6127,11 +6127,16 @@ var DateComponent = class DateComponent extends InputLabelComponent {
6127
6127
  }
6128
6128
  onDocumentMouseDown(target) {
6129
6129
  if (!this.open$.getValue() || !(target instanceof Element)) return;
6130
- if (this.host.nativeElement.contains(target)) return;
6131
- if (target.closest(".callout, .scrim, .overlay-container")) return;
6130
+ if (this.isInsidePicker(target)) return;
6132
6131
  this.open$.next(false);
6133
6132
  this.cdr.markForCheck();
6134
6133
  }
6134
+ isInsidePicker(target) {
6135
+ const host = this.host.nativeElement;
6136
+ if (host.contains(target)) return true;
6137
+ const layer = target.closest(".callout, .scrim, .overlay-container");
6138
+ return !!layer && !layer.contains(host);
6139
+ }
6135
6140
  clearValue() {
6136
6141
  this.commit(void 0);
6137
6142
  this.open$.next(false);
@@ -6162,7 +6167,7 @@ var DateComponent = class DateComponent extends InputLabelComponent {
6162
6167
  else this.syncInputText();
6163
6168
  this.previewValue = void 0;
6164
6169
  const nextTarget = event?.relatedTarget;
6165
- if (!(nextTarget instanceof Element && (this.host.nativeElement.contains(nextTarget) || !!nextTarget.closest(".callout, .scrim, .overlay-container")))) this.open$.next(false);
6170
+ if (!(nextTarget instanceof Element && this.isInsidePicker(nextTarget))) this.open$.next(false);
6166
6171
  this.cdr.markForCheck();
6167
6172
  }
6168
6173
  onDateSelect(date) {
@@ -12774,7 +12779,7 @@ i0.ɵɵngDeclareClassMetadata({
12774
12779
  "select:not([disabled])",
12775
12780
  "textarea:not([disabled])",
12776
12781
  "[contenteditable=\"true\"]"
12777
- ].map((field) => `.body ${field}`).join(", ");
12782
+ ].map((field) => `.body ${field}:not([aria-haspopup])`).join(", ");
12778
12783
  function focusInitial(dialog) {
12779
12784
  if (!dialog.contains(document.activeElement)) (dialog.querySelector(initialFocusSelector) ?? dialog).focus();
12780
12785
  }