@webitel/ui-sdk 26.8.49 → 26.8.50

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.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @author @HlukhovYe
3
+ *
4
+ * https://webitel.atlassian.net/browse/WTEL-10175
5
+ *
6
+ * PrimeVue's DatePicker only closes its overlay on window resize or on scroll
7
+ * of the input's scrollable ancestors — it has no way to notice the input
8
+ * itself disappearing (e.g. a tab switch, a `v-if`, or a collapsing parent
9
+ * that doesn't fire scroll/resize). When that happens the overlay is left
10
+ * open and detached from its anchor.
11
+ *
12
+ * Watches the datepicker's root element with an IntersectionObserver, which
13
+ * also fires when the element is hidden via `display: none` or detached from
14
+ * the layout, and force-closes the overlay when that happens.
15
+ */
16
+ export declare function useCloseOnAnchorHidden(getAnchor: () => HTMLElement | null, getDatepicker: () => {
17
+ overlayVisible?: boolean;
18
+ } | null): {
19
+ watch: () => void;
20
+ unwatch: () => void;
21
+ };
@@ -12,6 +12,7 @@
12
12
  export declare function useDatepicker(getInput: () => HTMLInputElement | null, getDatepicker: () => {
13
13
  rawValue: Date | null;
14
14
  updateModel: (v: Date) => void;
15
+ overlayVisible?: boolean;
15
16
  } | null, showTime: () => boolean, isClearable: () => boolean): {
16
17
  onBlur: () => void;
17
18
  lockOverlay: (panel: HTMLElement) => void;