@narmi/design_system 6.19.6 → 6.19.7
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.
|
@@ -4,12 +4,22 @@
|
|
|
4
4
|
* Detection strategy:
|
|
5
5
|
* 1. CSS.supports() checks for property/value support (fast path).
|
|
6
6
|
* 2. A separate exported constant `HAS_SCROLL_CONTAINER_BUG` runs a runtime
|
|
7
|
-
* test to detect Safari's broken anchor
|
|
8
|
-
*
|
|
7
|
+
* test to detect Safari's broken anchor sizing and placement inside scroll
|
|
8
|
+
* containers. Components opt into this check via
|
|
9
9
|
* `polyfillScrollBug: true` on useDropdownLayer.
|
|
10
10
|
*
|
|
11
11
|
* Both checks run once at module load and are cached.
|
|
12
12
|
*/
|
|
13
|
+
/**
|
|
14
|
+
* Runtime check for Safari's specific scroll container bug.
|
|
15
|
+
*
|
|
16
|
+
* Creates 3 hidden elements (scroll container + anchor + positioned layer),
|
|
17
|
+
* measures the anchor and layer, and cleans up. If the layer doesn't match the
|
|
18
|
+
* anchor's width and position, the browser has the bug.
|
|
19
|
+
*
|
|
20
|
+
* Only called when cssChecksPass() is true (browser claims support).
|
|
21
|
+
*/
|
|
22
|
+
export declare const isAnchorLayoutValid: (anchorRect: Pick<DOMRect, "width" | "left" | "bottom">, layerRect: Pick<DOMRect, "width" | "left" | "top">) => boolean;
|
|
13
23
|
/**
|
|
14
24
|
* Whether the browser has the Safari scroll-container bug where
|
|
15
25
|
* anchor-size() and position-try-fallbacks fail inside overflow:auto ancestors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSupportsAnchorPositioning/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSupportsAnchorPositioning/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgBH;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,EACtD,WAAW,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,KACjD,OAOF,CAAC;AA4BF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,OACoB,CAAC;AAE5D;;;GAGG;AACH,QAAA,MAAM,4BAA4B,QAAO,OAAsC,CAAC;AAEhF,eAAe,4BAA4B,CAAC"}
|