@react-aria/overlays 3.31.1 → 3.32.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/import.mjs +12 -12
- package/dist/main.js +28 -28
- package/dist/main.js.map +1 -1
- package/dist/module.js +12 -12
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +19 -0
- package/package.json +15 -21
- package/src/index.ts +19 -22
- package/dist/DismissButton.main.js +0 -51
- package/dist/DismissButton.main.js.map +0 -1
- package/dist/DismissButton.mjs +0 -46
- package/dist/DismissButton.module.js +0 -46
- package/dist/DismissButton.module.js.map +0 -1
- package/dist/Overlay.main.js +0 -73
- package/dist/Overlay.main.js.map +0 -1
- package/dist/Overlay.mjs +0 -63
- package/dist/Overlay.module.js +0 -63
- package/dist/Overlay.module.js.map +0 -1
- package/dist/PortalProvider.main.js +0 -41
- package/dist/PortalProvider.main.js.map +0 -1
- package/dist/PortalProvider.mjs +0 -31
- package/dist/PortalProvider.module.js +0 -31
- package/dist/PortalProvider.module.js.map +0 -1
- package/dist/ar-AE.main.js +0 -6
- package/dist/ar-AE.main.js.map +0 -1
- package/dist/ar-AE.mjs +0 -8
- package/dist/ar-AE.module.js +0 -8
- package/dist/ar-AE.module.js.map +0 -1
- package/dist/ariaHideOutside.main.js +0 -152
- package/dist/ariaHideOutside.main.js.map +0 -1
- package/dist/ariaHideOutside.mjs +0 -146
- package/dist/ariaHideOutside.module.js +0 -146
- package/dist/ariaHideOutside.module.js.map +0 -1
- package/dist/bg-BG.main.js +0 -6
- package/dist/bg-BG.main.js.map +0 -1
- package/dist/bg-BG.mjs +0 -8
- package/dist/bg-BG.module.js +0 -8
- package/dist/bg-BG.module.js.map +0 -1
- package/dist/calculatePosition.main.js +0 -414
- package/dist/calculatePosition.main.js.map +0 -1
- package/dist/calculatePosition.mjs +0 -408
- package/dist/calculatePosition.module.js +0 -408
- package/dist/calculatePosition.module.js.map +0 -1
- package/dist/cs-CZ.main.js +0 -6
- package/dist/cs-CZ.main.js.map +0 -1
- package/dist/cs-CZ.mjs +0 -8
- package/dist/cs-CZ.module.js +0 -8
- package/dist/cs-CZ.module.js.map +0 -1
- package/dist/da-DK.main.js +0 -6
- package/dist/da-DK.main.js.map +0 -1
- package/dist/da-DK.mjs +0 -8
- package/dist/da-DK.module.js +0 -8
- package/dist/da-DK.module.js.map +0 -1
- package/dist/de-DE.main.js +0 -6
- package/dist/de-DE.main.js.map +0 -1
- package/dist/de-DE.mjs +0 -8
- package/dist/de-DE.module.js +0 -8
- package/dist/de-DE.module.js.map +0 -1
- package/dist/el-GR.main.js +0 -6
- package/dist/el-GR.main.js.map +0 -1
- package/dist/el-GR.mjs +0 -8
- package/dist/el-GR.module.js +0 -8
- package/dist/el-GR.module.js.map +0 -1
- package/dist/en-US.main.js +0 -6
- package/dist/en-US.main.js.map +0 -1
- package/dist/en-US.mjs +0 -8
- package/dist/en-US.module.js +0 -8
- package/dist/en-US.module.js.map +0 -1
- package/dist/es-ES.main.js +0 -6
- package/dist/es-ES.main.js.map +0 -1
- package/dist/es-ES.mjs +0 -8
- package/dist/es-ES.module.js +0 -8
- package/dist/es-ES.module.js.map +0 -1
- package/dist/et-EE.main.js +0 -6
- package/dist/et-EE.main.js.map +0 -1
- package/dist/et-EE.mjs +0 -8
- package/dist/et-EE.module.js +0 -8
- package/dist/et-EE.module.js.map +0 -1
- package/dist/fi-FI.main.js +0 -6
- package/dist/fi-FI.main.js.map +0 -1
- package/dist/fi-FI.mjs +0 -8
- package/dist/fi-FI.module.js +0 -8
- package/dist/fi-FI.module.js.map +0 -1
- package/dist/fr-FR.main.js +0 -6
- package/dist/fr-FR.main.js.map +0 -1
- package/dist/fr-FR.mjs +0 -8
- package/dist/fr-FR.module.js +0 -8
- package/dist/fr-FR.module.js.map +0 -1
- package/dist/he-IL.main.js +0 -6
- package/dist/he-IL.main.js.map +0 -1
- package/dist/he-IL.mjs +0 -8
- package/dist/he-IL.module.js +0 -8
- package/dist/he-IL.module.js.map +0 -1
- package/dist/hr-HR.main.js +0 -6
- package/dist/hr-HR.main.js.map +0 -1
- package/dist/hr-HR.mjs +0 -8
- package/dist/hr-HR.module.js +0 -8
- package/dist/hr-HR.module.js.map +0 -1
- package/dist/hu-HU.main.js +0 -6
- package/dist/hu-HU.main.js.map +0 -1
- package/dist/hu-HU.mjs +0 -8
- package/dist/hu-HU.module.js +0 -8
- package/dist/hu-HU.module.js.map +0 -1
- package/dist/intlStrings.main.js +0 -108
- package/dist/intlStrings.main.js.map +0 -1
- package/dist/intlStrings.mjs +0 -110
- package/dist/intlStrings.module.js +0 -110
- package/dist/intlStrings.module.js.map +0 -1
- package/dist/it-IT.main.js +0 -6
- package/dist/it-IT.main.js.map +0 -1
- package/dist/it-IT.mjs +0 -8
- package/dist/it-IT.module.js +0 -8
- package/dist/it-IT.module.js.map +0 -1
- package/dist/ja-JP.main.js +0 -6
- package/dist/ja-JP.main.js.map +0 -1
- package/dist/ja-JP.mjs +0 -8
- package/dist/ja-JP.module.js +0 -8
- package/dist/ja-JP.module.js.map +0 -1
- package/dist/ko-KR.main.js +0 -6
- package/dist/ko-KR.main.js.map +0 -1
- package/dist/ko-KR.mjs +0 -8
- package/dist/ko-KR.module.js +0 -8
- package/dist/ko-KR.module.js.map +0 -1
- package/dist/lt-LT.main.js +0 -6
- package/dist/lt-LT.main.js.map +0 -1
- package/dist/lt-LT.mjs +0 -8
- package/dist/lt-LT.module.js +0 -8
- package/dist/lt-LT.module.js.map +0 -1
- package/dist/lv-LV.main.js +0 -6
- package/dist/lv-LV.main.js.map +0 -1
- package/dist/lv-LV.mjs +0 -8
- package/dist/lv-LV.module.js +0 -8
- package/dist/lv-LV.module.js.map +0 -1
- package/dist/nb-NO.main.js +0 -6
- package/dist/nb-NO.main.js.map +0 -1
- package/dist/nb-NO.mjs +0 -8
- package/dist/nb-NO.module.js +0 -8
- package/dist/nb-NO.module.js.map +0 -1
- package/dist/nl-NL.main.js +0 -6
- package/dist/nl-NL.main.js.map +0 -1
- package/dist/nl-NL.mjs +0 -8
- package/dist/nl-NL.module.js +0 -8
- package/dist/nl-NL.module.js.map +0 -1
- package/dist/pl-PL.main.js +0 -6
- package/dist/pl-PL.main.js.map +0 -1
- package/dist/pl-PL.mjs +0 -8
- package/dist/pl-PL.module.js +0 -8
- package/dist/pl-PL.module.js.map +0 -1
- package/dist/pt-BR.main.js +0 -6
- package/dist/pt-BR.main.js.map +0 -1
- package/dist/pt-BR.mjs +0 -8
- package/dist/pt-BR.module.js +0 -8
- package/dist/pt-BR.module.js.map +0 -1
- package/dist/pt-PT.main.js +0 -6
- package/dist/pt-PT.main.js.map +0 -1
- package/dist/pt-PT.mjs +0 -8
- package/dist/pt-PT.module.js +0 -8
- package/dist/pt-PT.module.js.map +0 -1
- package/dist/ro-RO.main.js +0 -6
- package/dist/ro-RO.main.js.map +0 -1
- package/dist/ro-RO.mjs +0 -8
- package/dist/ro-RO.module.js +0 -8
- package/dist/ro-RO.module.js.map +0 -1
- package/dist/ru-RU.main.js +0 -6
- package/dist/ru-RU.main.js.map +0 -1
- package/dist/ru-RU.mjs +0 -8
- package/dist/ru-RU.module.js +0 -8
- package/dist/ru-RU.module.js.map +0 -1
- package/dist/sk-SK.main.js +0 -6
- package/dist/sk-SK.main.js.map +0 -1
- package/dist/sk-SK.mjs +0 -8
- package/dist/sk-SK.module.js +0 -8
- package/dist/sk-SK.module.js.map +0 -1
- package/dist/sl-SI.main.js +0 -6
- package/dist/sl-SI.main.js.map +0 -1
- package/dist/sl-SI.mjs +0 -8
- package/dist/sl-SI.module.js +0 -8
- package/dist/sl-SI.module.js.map +0 -1
- package/dist/sr-SP.main.js +0 -6
- package/dist/sr-SP.main.js.map +0 -1
- package/dist/sr-SP.mjs +0 -8
- package/dist/sr-SP.module.js +0 -8
- package/dist/sr-SP.module.js.map +0 -1
- package/dist/sv-SE.main.js +0 -6
- package/dist/sv-SE.main.js.map +0 -1
- package/dist/sv-SE.mjs +0 -8
- package/dist/sv-SE.module.js +0 -8
- package/dist/sv-SE.module.js.map +0 -1
- package/dist/tr-TR.main.js +0 -6
- package/dist/tr-TR.main.js.map +0 -1
- package/dist/tr-TR.mjs +0 -8
- package/dist/tr-TR.module.js +0 -8
- package/dist/tr-TR.module.js.map +0 -1
- package/dist/types.d.ts +0 -355
- package/dist/types.d.ts.map +0 -1
- package/dist/uk-UA.main.js +0 -6
- package/dist/uk-UA.main.js.map +0 -1
- package/dist/uk-UA.mjs +0 -8
- package/dist/uk-UA.module.js +0 -8
- package/dist/uk-UA.module.js.map +0 -1
- package/dist/useCloseOnScroll.main.js +0 -52
- package/dist/useCloseOnScroll.main.js.map +0 -1
- package/dist/useCloseOnScroll.mjs +0 -46
- package/dist/useCloseOnScroll.module.js +0 -46
- package/dist/useCloseOnScroll.module.js.map +0 -1
- package/dist/useModal.main.js +0 -118
- package/dist/useModal.main.js.map +0 -1
- package/dist/useModal.mjs +0 -105
- package/dist/useModal.module.js +0 -105
- package/dist/useModal.module.js.map +0 -1
- package/dist/useModalOverlay.main.js +0 -57
- package/dist/useModalOverlay.main.js.map +0 -1
- package/dist/useModalOverlay.mjs +0 -52
- package/dist/useModalOverlay.module.js +0 -52
- package/dist/useModalOverlay.module.js.map +0 -1
- package/dist/useOverlay.main.js +0 -111
- package/dist/useOverlay.main.js.map +0 -1
- package/dist/useOverlay.mjs +0 -106
- package/dist/useOverlay.module.js +0 -106
- package/dist/useOverlay.module.js.map +0 -1
- package/dist/useOverlayPosition.main.js +0 -225
- package/dist/useOverlayPosition.main.js.map +0 -1
- package/dist/useOverlayPosition.mjs +0 -220
- package/dist/useOverlayPosition.module.js +0 -220
- package/dist/useOverlayPosition.module.js.map +0 -1
- package/dist/useOverlayTrigger.main.js +0 -54
- package/dist/useOverlayTrigger.main.js.map +0 -1
- package/dist/useOverlayTrigger.mjs +0 -49
- package/dist/useOverlayTrigger.module.js +0 -49
- package/dist/useOverlayTrigger.module.js.map +0 -1
- package/dist/usePopover.main.js +0 -77
- package/dist/usePopover.main.js.map +0 -1
- package/dist/usePopover.mjs +0 -72
- package/dist/usePopover.module.js +0 -72
- package/dist/usePopover.module.js.map +0 -1
- package/dist/usePreventScroll.main.js +0 -215
- package/dist/usePreventScroll.main.js.map +0 -1
- package/dist/usePreventScroll.mjs +0 -210
- package/dist/usePreventScroll.module.js +0 -210
- package/dist/usePreventScroll.module.js.map +0 -1
- package/dist/zh-CN.main.js +0 -6
- package/dist/zh-CN.main.js.map +0 -1
- package/dist/zh-CN.mjs +0 -8
- package/dist/zh-CN.module.js +0 -8
- package/dist/zh-CN.module.js.map +0 -1
- package/dist/zh-TW.main.js +0 -6
- package/dist/zh-TW.main.js.map +0 -1
- package/dist/zh-TW.mjs +0 -8
- package/dist/zh-TW.module.js +0 -8
- package/dist/zh-TW.module.js.map +0 -1
- package/src/DismissButton.tsx +0 -52
- package/src/Overlay.tsx +0 -95
- package/src/PortalProvider.tsx +0 -41
- package/src/ariaHideOutside.ts +0 -221
- package/src/calculatePosition.ts +0 -680
- package/src/useCloseOnScroll.ts +0 -65
- package/src/useModal.tsx +0 -197
- package/src/useModalOverlay.ts +0 -69
- package/src/useOverlay.ts +0 -169
- package/src/useOverlayPosition.ts +0 -327
- package/src/useOverlayTrigger.ts +0 -72
- package/src/usePopover.ts +0 -138
- package/src/usePreventScroll.ts +0 -273
package/dist/sr-SP.mjs
DELETED
package/dist/sr-SP.module.js
DELETED
package/dist/sr-SP.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,MAAM,CAAC;AACvC","sources":["packages/@react-aria/overlays/intl/sr-SP.json"],"sourcesContent":["{\n \"dismiss\": \"Odbaci\"\n}\n"],"names":[],"version":3,"file":"sr-SP.module.js.map"}
|
package/dist/sv-SE.main.js
DELETED
package/dist/sv-SE.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,MAAM,CAAC;AACvC","sources":["packages/@react-aria/overlays/intl/sv-SE.json"],"sourcesContent":["{\n \"dismiss\": \"Avvisa\"\n}\n"],"names":[],"version":3,"file":"sv-SE.main.js.map"}
|
package/dist/sv-SE.mjs
DELETED
package/dist/sv-SE.module.js
DELETED
package/dist/sv-SE.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,MAAM,CAAC;AACvC","sources":["packages/@react-aria/overlays/intl/sv-SE.json"],"sourcesContent":["{\n \"dismiss\": \"Avvisa\"\n}\n"],"names":[],"version":3,"file":"sv-SE.module.js.map"}
|
package/dist/tr-TR.main.js
DELETED
package/dist/tr-TR.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,KAAK,CAAC;AACtC","sources":["packages/@react-aria/overlays/intl/tr-TR.json"],"sourcesContent":["{\n \"dismiss\": \"Kapat\"\n}\n"],"names":[],"version":3,"file":"tr-TR.main.js.map"}
|
package/dist/tr-TR.mjs
DELETED
package/dist/tr-TR.module.js
DELETED
package/dist/tr-TR.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,KAAK,CAAC;AACtC","sources":["packages/@react-aria/overlays/intl/tr-TR.json"],"sourcesContent":["{\n \"dismiss\": \"Kapat\"\n}\n"],"names":[],"version":3,"file":"tr-TR.module.js.map"}
|
package/dist/types.d.ts
DELETED
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
import { DOMAttributes, RefObject, DOMProps, AriaLabelingProps } from "@react-types/shared";
|
|
2
|
-
import { PlacementAxis, PositionProps } from "@react-types/overlays";
|
|
3
|
-
import { AriaButtonProps } from "@react-types/button";
|
|
4
|
-
import { OverlayTriggerState } from "@react-stately/overlays";
|
|
5
|
-
import React, { JSX, ReactNode, AriaAttributes } from "react";
|
|
6
|
-
export interface AriaPositionProps extends PositionProps {
|
|
7
|
-
/**
|
|
8
|
-
* Cross size of the overlay arrow in pixels.
|
|
9
|
-
* @default 0
|
|
10
|
-
*/
|
|
11
|
-
arrowSize?: number;
|
|
12
|
-
/**
|
|
13
|
-
* Element that that serves as the positioning boundary.
|
|
14
|
-
* @default document.body
|
|
15
|
-
*/
|
|
16
|
-
boundaryElement?: Element;
|
|
17
|
-
/**
|
|
18
|
-
* The ref for the element which the overlay positions itself with respect to.
|
|
19
|
-
*/
|
|
20
|
-
targetRef: RefObject<Element | null>;
|
|
21
|
-
/**
|
|
22
|
-
* The ref for the overlay element.
|
|
23
|
-
*/
|
|
24
|
-
overlayRef: RefObject<Element | null>;
|
|
25
|
-
/**
|
|
26
|
-
* The ref for the arrow element.
|
|
27
|
-
*/
|
|
28
|
-
arrowRef?: RefObject<Element | null>;
|
|
29
|
-
/**
|
|
30
|
-
* A ref for the scrollable region within the overlay.
|
|
31
|
-
* @default overlayRef
|
|
32
|
-
*/
|
|
33
|
-
scrollRef?: RefObject<Element | null>;
|
|
34
|
-
/**
|
|
35
|
-
* Whether the overlay should update its position automatically.
|
|
36
|
-
* @default true
|
|
37
|
-
*/
|
|
38
|
-
shouldUpdatePosition?: boolean;
|
|
39
|
-
/** Handler that is called when the overlay should close. */
|
|
40
|
-
onClose?: (() => void) | null;
|
|
41
|
-
/**
|
|
42
|
-
* The maxHeight specified for the overlay element.
|
|
43
|
-
* By default, it will take all space up to the current viewport height.
|
|
44
|
-
*/
|
|
45
|
-
maxHeight?: number;
|
|
46
|
-
/**
|
|
47
|
-
* The minimum distance the arrow's edge should be from the edge of the overlay element.
|
|
48
|
-
* @default 0
|
|
49
|
-
*/
|
|
50
|
-
arrowBoundaryOffset?: number;
|
|
51
|
-
}
|
|
52
|
-
export interface PositionAria {
|
|
53
|
-
/** Props for the overlay container element. */
|
|
54
|
-
overlayProps: DOMAttributes;
|
|
55
|
-
/** Props for the overlay tip arrow if any. */
|
|
56
|
-
arrowProps: DOMAttributes;
|
|
57
|
-
/** Placement of the overlay with respect to the overlay trigger. */
|
|
58
|
-
placement: PlacementAxis | null;
|
|
59
|
-
/** The origin of the target in the overlay's coordinate system. Useful for animations. */
|
|
60
|
-
triggerAnchorPoint: {
|
|
61
|
-
x: number;
|
|
62
|
-
y: number;
|
|
63
|
-
} | null;
|
|
64
|
-
/** Updates the position of the overlay. */
|
|
65
|
-
updatePosition(): void;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Handles positioning overlays like popovers and menus relative to a trigger
|
|
69
|
-
* element, and updating the position when the window resizes.
|
|
70
|
-
*/
|
|
71
|
-
export function useOverlayPosition(props: AriaPositionProps): PositionAria;
|
|
72
|
-
export interface AriaOverlayProps {
|
|
73
|
-
/** Whether the overlay is currently open. */
|
|
74
|
-
isOpen?: boolean;
|
|
75
|
-
/** Handler that is called when the overlay should close. */
|
|
76
|
-
onClose?: () => void;
|
|
77
|
-
/**
|
|
78
|
-
* Whether to close the overlay when the user interacts outside it.
|
|
79
|
-
* @default false
|
|
80
|
-
*/
|
|
81
|
-
isDismissable?: boolean;
|
|
82
|
-
/** Whether the overlay should close when focus is lost or moves outside it. */
|
|
83
|
-
shouldCloseOnBlur?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Whether pressing the escape key to close the overlay should be disabled.
|
|
86
|
-
* @default false
|
|
87
|
-
*/
|
|
88
|
-
isKeyboardDismissDisabled?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* When user interacts with the argument element outside of the overlay ref,
|
|
91
|
-
* return true if onClose should be called. This gives you a chance to filter
|
|
92
|
-
* out interaction with elements that should not dismiss the overlay.
|
|
93
|
-
* By default, onClose will always be called on interaction outside the overlay ref.
|
|
94
|
-
*/
|
|
95
|
-
shouldCloseOnInteractOutside?: (element: Element) => boolean;
|
|
96
|
-
}
|
|
97
|
-
export interface OverlayAria {
|
|
98
|
-
/** Props to apply to the overlay container element. */
|
|
99
|
-
overlayProps: DOMAttributes;
|
|
100
|
-
/** Props to apply to the underlay element, if any. */
|
|
101
|
-
underlayProps: DOMAttributes;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Provides the behavior for overlays such as dialogs, popovers, and menus.
|
|
105
|
-
* Hides the overlay when the user interacts outside it, when the Escape key is pressed,
|
|
106
|
-
* or optionally, on blur. Only the top-most overlay will close at once.
|
|
107
|
-
*/
|
|
108
|
-
export function useOverlay(props: AriaOverlayProps, ref: RefObject<Element | null>): OverlayAria;
|
|
109
|
-
export interface OverlayTriggerProps {
|
|
110
|
-
/** Type of overlay that is opened by the trigger. */
|
|
111
|
-
type: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid';
|
|
112
|
-
}
|
|
113
|
-
export interface OverlayTriggerAria {
|
|
114
|
-
/** Props for the trigger element. */
|
|
115
|
-
triggerProps: AriaButtonProps;
|
|
116
|
-
/** Props for the overlay container element. */
|
|
117
|
-
overlayProps: DOMProps;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Handles the behavior and accessibility for an overlay trigger, e.g. a button
|
|
121
|
-
* that opens a popover, menu, or other overlay that is positioned relative to the trigger.
|
|
122
|
-
*/
|
|
123
|
-
export function useOverlayTrigger(props: OverlayTriggerProps, state: OverlayTriggerState, ref?: RefObject<Element | null>): OverlayTriggerAria;
|
|
124
|
-
interface PreventScrollOptions {
|
|
125
|
-
/** Whether the scroll lock is disabled. */
|
|
126
|
-
isDisabled?: boolean;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Prevents scrolling on the document body on mount, and
|
|
130
|
-
* restores it on unmount. Also ensures that content does not
|
|
131
|
-
* shift due to the scrollbars disappearing.
|
|
132
|
-
*/
|
|
133
|
-
export function usePreventScroll(options?: PreventScrollOptions): void;
|
|
134
|
-
export interface PortalProviderProps {
|
|
135
|
-
/** Should return the element where we should portal to. Can clear the context by passing null. */
|
|
136
|
-
getContainer?: (() => HTMLElement | null) | null;
|
|
137
|
-
/** The content of the PortalProvider. Should contain all children that want to portal their overlays to the element returned by the provided `getContainer()`. */
|
|
138
|
-
children: ReactNode;
|
|
139
|
-
}
|
|
140
|
-
export interface PortalProviderContextValue extends Omit<PortalProviderProps, 'children'> {
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Sets the portal container for all overlay elements rendered by its children.
|
|
144
|
-
*/
|
|
145
|
-
export function UNSAFE_PortalProvider(props: PortalProviderProps): JSX.Element;
|
|
146
|
-
export function useUNSAFE_PortalContext(): PortalProviderContextValue;
|
|
147
|
-
export interface ModalProviderProps extends DOMAttributes {
|
|
148
|
-
children: ReactNode;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Each ModalProvider tracks how many modals are open in its subtree. On mount, the modals
|
|
152
|
-
* trigger `addModal` to increment the count, and trigger `removeModal` on unmount to decrement it.
|
|
153
|
-
* This is done recursively so that all parent providers are incremented and decremented.
|
|
154
|
-
* If the modal count is greater than zero, we add `aria-hidden` to this provider to hide its
|
|
155
|
-
* subtree from screen readers. This is done using React context in order to account for things
|
|
156
|
-
* like portals, which can cause the React tree and the DOM tree to differ significantly in structure.
|
|
157
|
-
*/
|
|
158
|
-
export function ModalProvider(props: ModalProviderProps): JSX.Element;
|
|
159
|
-
export interface ModalProviderAria {
|
|
160
|
-
/**
|
|
161
|
-
* Props to be spread on the container element.
|
|
162
|
-
*/
|
|
163
|
-
modalProviderProps: AriaAttributes;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Used to determine if the tree should be aria-hidden based on how many
|
|
167
|
-
* modals are open.
|
|
168
|
-
*/
|
|
169
|
-
export function useModalProvider(): ModalProviderAria;
|
|
170
|
-
/**
|
|
171
|
-
* An OverlayProvider acts as a container for the top-level application.
|
|
172
|
-
* Any application that uses modal dialogs or other overlays should
|
|
173
|
-
* be wrapped in a `<OverlayProvider>`. This is used to ensure that
|
|
174
|
-
* the main content of the application is hidden from screen readers
|
|
175
|
-
* if a modal or other overlay is opened. Only the top-most modal or
|
|
176
|
-
* overlay should be accessible at once.
|
|
177
|
-
*/
|
|
178
|
-
export function OverlayProvider(props: ModalProviderProps): JSX.Element;
|
|
179
|
-
export interface OverlayContainerProps extends ModalProviderProps {
|
|
180
|
-
/**
|
|
181
|
-
* The container element in which the overlay portal will be placed.
|
|
182
|
-
* @default document.body
|
|
183
|
-
* @deprecated - Use a parent UNSAFE_PortalProvider to set your portal container instead.
|
|
184
|
-
*/
|
|
185
|
-
portalContainer?: Element;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* A container for overlays like modals and popovers. Renders the overlay
|
|
189
|
-
* into a Portal which is placed at the end of the document body.
|
|
190
|
-
* Also ensures that the overlay is hidden from screen readers if a
|
|
191
|
-
* nested modal is opened. Only the top-most modal or overlay should
|
|
192
|
-
* be accessible at once.
|
|
193
|
-
*/
|
|
194
|
-
export function OverlayContainer(props: OverlayContainerProps): React.ReactPortal | null;
|
|
195
|
-
interface ModalAriaProps extends DOMAttributes {
|
|
196
|
-
/** Data attribute marks the dom node as a modal for the aria-modal-polyfill. */
|
|
197
|
-
'data-ismodal': boolean;
|
|
198
|
-
}
|
|
199
|
-
export interface AriaModalOptions {
|
|
200
|
-
isDisabled?: boolean;
|
|
201
|
-
}
|
|
202
|
-
export interface ModalAria {
|
|
203
|
-
/** Props for the modal content element. */
|
|
204
|
-
modalProps: ModalAriaProps;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Hides content outside the current `<OverlayContainer>` from screen readers
|
|
208
|
-
* on mount and restores it on unmount. Typically used by modal dialogs and
|
|
209
|
-
* other types of overlays to ensure that only the top-most modal is
|
|
210
|
-
* accessible at once.
|
|
211
|
-
*/
|
|
212
|
-
export function useModal(options?: AriaModalOptions): ModalAria;
|
|
213
|
-
export interface DismissButtonProps extends AriaLabelingProps, DOMProps {
|
|
214
|
-
/** Called when the dismiss button is activated. */
|
|
215
|
-
onDismiss?: () => void;
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* A visually hidden button that can be used to allow screen reader
|
|
219
|
-
* users to dismiss a modal or popup when there is no visual
|
|
220
|
-
* affordance to do so.
|
|
221
|
-
*/
|
|
222
|
-
export function DismissButton(props: DismissButtonProps): JSX.Element;
|
|
223
|
-
interface AriaHideOutsideOptions {
|
|
224
|
-
root?: Element;
|
|
225
|
-
shouldUseInert?: boolean;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Hides all elements in the DOM outside the given targets from screen readers using aria-hidden,
|
|
229
|
-
* and returns a function to revert these changes. In addition, changes to the DOM are watched
|
|
230
|
-
* and new elements outside the targets are automatically hidden.
|
|
231
|
-
* @param targets - The elements that should remain visible.
|
|
232
|
-
* @param root - Nothing will be hidden above this element.
|
|
233
|
-
* @returns - A function to restore all hidden elements.
|
|
234
|
-
*/
|
|
235
|
-
export function ariaHideOutside(targets: Element[], options?: AriaHideOutsideOptions | Element): () => void;
|
|
236
|
-
export interface AriaPopoverProps extends Omit<AriaPositionProps, 'isOpen' | 'onClose' | 'targetRef' | 'overlayRef'> {
|
|
237
|
-
/**
|
|
238
|
-
* The ref for the element which the popover positions itself with respect to.
|
|
239
|
-
*/
|
|
240
|
-
triggerRef: RefObject<Element | null>;
|
|
241
|
-
/**
|
|
242
|
-
* The ref for the popover element.
|
|
243
|
-
*/
|
|
244
|
-
popoverRef: RefObject<Element | null>;
|
|
245
|
-
/** A ref for the popover arrow element. */
|
|
246
|
-
arrowRef?: RefObject<Element | null>;
|
|
247
|
-
/**
|
|
248
|
-
* An optional ref for a group of popovers, e.g. submenus.
|
|
249
|
-
* When provided, this element is used to detect outside interactions
|
|
250
|
-
* and hiding elements from assistive technologies instead of the popoverRef.
|
|
251
|
-
*/
|
|
252
|
-
groupRef?: RefObject<Element | null>;
|
|
253
|
-
/**
|
|
254
|
-
* Whether the popover is non-modal, i.e. elements outside the popover may be
|
|
255
|
-
* interacted with by assistive technologies.
|
|
256
|
-
*
|
|
257
|
-
* Most popovers should not use this option as it may negatively impact the screen
|
|
258
|
-
* reader experience. Only use with components such as combobox, which are designed
|
|
259
|
-
* to handle this situation carefully.
|
|
260
|
-
*/
|
|
261
|
-
isNonModal?: boolean;
|
|
262
|
-
/**
|
|
263
|
-
* Whether pressing the escape key to close the popover should be disabled.
|
|
264
|
-
*
|
|
265
|
-
* Most popovers should not use this option. When set to true, an alternative
|
|
266
|
-
* way to close the popover with a keyboard must be provided.
|
|
267
|
-
*
|
|
268
|
-
* @default false
|
|
269
|
-
*/
|
|
270
|
-
isKeyboardDismissDisabled?: boolean;
|
|
271
|
-
/**
|
|
272
|
-
* When user interacts with the argument element outside of the popover ref,
|
|
273
|
-
* return true if onClose should be called. This gives you a chance to filter
|
|
274
|
-
* out interaction with elements that should not dismiss the popover.
|
|
275
|
-
* By default, onClose will always be called on interaction outside the popover ref.
|
|
276
|
-
*/
|
|
277
|
-
shouldCloseOnInteractOutside?: (element: Element) => boolean;
|
|
278
|
-
}
|
|
279
|
-
export interface PopoverAria {
|
|
280
|
-
/** Props for the popover element. */
|
|
281
|
-
popoverProps: DOMAttributes;
|
|
282
|
-
/** Props for the popover tip arrow if any. */
|
|
283
|
-
arrowProps: DOMAttributes;
|
|
284
|
-
/** Props to apply to the underlay element, if any. */
|
|
285
|
-
underlayProps: DOMAttributes;
|
|
286
|
-
/** Placement of the popover with respect to the trigger. */
|
|
287
|
-
placement: PlacementAxis | null;
|
|
288
|
-
/** The origin of the target in the overlay's coordinate system. Useful for animations. */
|
|
289
|
-
triggerAnchorPoint: {
|
|
290
|
-
x: number;
|
|
291
|
-
y: number;
|
|
292
|
-
} | null;
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Provides the behavior and accessibility implementation for a popover component.
|
|
296
|
-
* A popover is an overlay element positioned relative to a trigger.
|
|
297
|
-
*/
|
|
298
|
-
export function usePopover(props: AriaPopoverProps, state: OverlayTriggerState): PopoverAria;
|
|
299
|
-
export interface OverlayProps {
|
|
300
|
-
/**
|
|
301
|
-
* The container element in which the overlay portal will be placed.
|
|
302
|
-
* @default document.body
|
|
303
|
-
*/
|
|
304
|
-
portalContainer?: Element;
|
|
305
|
-
/** The overlay to render in the portal. */
|
|
306
|
-
children: ReactNode;
|
|
307
|
-
/**
|
|
308
|
-
* Disables default focus management for the overlay, including containment and restoration.
|
|
309
|
-
* This option should be used very carefully. When focus management is disabled, you must
|
|
310
|
-
* implement focus containment and restoration to ensure the overlay is keyboard accessible.
|
|
311
|
-
*/
|
|
312
|
-
disableFocusManagement?: boolean;
|
|
313
|
-
/**
|
|
314
|
-
* Whether to contain focus within the overlay.
|
|
315
|
-
*/
|
|
316
|
-
shouldContainFocus?: boolean;
|
|
317
|
-
/**
|
|
318
|
-
* Whether the overlay is currently performing an exit animation. When true,
|
|
319
|
-
* focus is allowed to move outside.
|
|
320
|
-
*/
|
|
321
|
-
isExiting?: boolean;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* A container which renders an overlay such as a popover or modal in a portal,
|
|
325
|
-
* and provides a focus scope for the child elements.
|
|
326
|
-
*/
|
|
327
|
-
export function Overlay(props: OverlayProps): React.ReactPortal | null;
|
|
328
|
-
/** @private */
|
|
329
|
-
export function useOverlayFocusContain(): void;
|
|
330
|
-
export interface AriaModalOverlayProps extends Pick<AriaOverlayProps, 'shouldCloseOnInteractOutside'> {
|
|
331
|
-
/**
|
|
332
|
-
* Whether to close the modal when the user interacts outside it.
|
|
333
|
-
* @default false
|
|
334
|
-
*/
|
|
335
|
-
isDismissable?: boolean;
|
|
336
|
-
/**
|
|
337
|
-
* Whether pressing the escape key to close the modal should be disabled.
|
|
338
|
-
* @default false
|
|
339
|
-
*/
|
|
340
|
-
isKeyboardDismissDisabled?: boolean;
|
|
341
|
-
}
|
|
342
|
-
export interface ModalOverlayAria {
|
|
343
|
-
/** Props for the modal element. */
|
|
344
|
-
modalProps: DOMAttributes;
|
|
345
|
-
/** Props for the underlay element. */
|
|
346
|
-
underlayProps: DOMAttributes;
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* Provides the behavior and accessibility implementation for a modal component.
|
|
350
|
-
* A modal is an overlay element which blocks interaction with elements outside it.
|
|
351
|
-
*/
|
|
352
|
-
export function useModalOverlay(props: AriaModalOverlayProps, state: OverlayTriggerState, ref: RefObject<HTMLElement | null>): ModalOverlayAria;
|
|
353
|
-
export type { Placement, PlacementAxis, PositionProps } from '@react-types/overlays';
|
|
354
|
-
|
|
355
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;AEoBA,kCAAmC,SAAQ,aAAa;IACtD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,EAAE,UAAU,OAAO,GAAG,IAAI,CAAC,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,UAAU,OAAO,GAAG,IAAI,CAAC,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,UAAU,OAAO,GAAG,IAAI,CAAC,CAAC;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,UAAU,OAAO,GAAG,IAAI,CAAC,CAAC;IACtC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4DAA4D;IAC5D,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED;IACE,+CAA+C;IAC/C,YAAY,EAAE,aAAa,CAAC;IAC5B,8CAA8C;IAC9C,UAAU,EAAE,aAAa,CAAC;IAC1B,oEAAoE;IACpE,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,0FAA0F;IAC1F,kBAAkB,EAAE;QAAC,CAAC,EAAE,MAAM,CAA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GAAG,WAAW,CAsD3F;ACrHD;IACE;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2CAA2C;IAC3C,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAKD;;;GAGG;AACH,wBAAwB,KAAK,EAAE,YAAY,GAAG,MAAM,WAAW,GAAG,IAAI,CAiCrE;AAED,eAAe;AACf,0CAA0C,IAAI,CAM7C;ACzED,sCAAuC,SAAQ,IAAI,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IACnG;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAA;CACpC;AAED;IACE,mCAAmC;IACnC,UAAU,EAAE,aAAa,CAAC;IAC1B,sCAAsC;IACtC,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED;;;GAGG;AACH,gCAAgC,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,UAAU,WAAW,GAAG,IAAI,CAAC,GAAG,gBAAgB,CAuB9I;ACrCD,YAAY,EAAC,SAAS,EAAE,aAAa,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC","sources":["packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/calculatePosition.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useCloseOnScroll.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useOverlayPosition.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useOverlay.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useOverlayTrigger.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/usePreventScroll.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/PortalProvider.tsx","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useModal.tsx","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/DismissButton.tsx","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/ariaHideOutside.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/usePopover.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/Overlay.tsx","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useModalOverlay.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/index.ts","packages/@react-aria/overlays/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useOverlayPosition} from './useOverlayPosition';\nexport {useOverlay} from './useOverlay';\nexport {useOverlayTrigger} from './useOverlayTrigger';\nexport {usePreventScroll} from './usePreventScroll';\nexport {ModalProvider, useModalProvider, OverlayProvider, OverlayContainer, useModal} from './useModal';\nexport {DismissButton} from './DismissButton';\nexport {ariaHideOutside} from './ariaHideOutside';\nexport {usePopover} from './usePopover';\nexport {useModalOverlay} from './useModalOverlay';\nexport {Overlay, useOverlayFocusContain} from './Overlay';\nexport {UNSAFE_PortalProvider, useUNSAFE_PortalContext} from './PortalProvider';\n\nexport type {AriaPositionProps, PositionAria} from './useOverlayPosition';\nexport type {AriaOverlayProps, OverlayAria} from './useOverlay';\nexport type {OverlayTriggerAria, OverlayTriggerProps} from './useOverlayTrigger';\nexport type {AriaModalOptions, ModalAria, ModalProviderAria, ModalProviderProps, OverlayContainerProps} from './useModal';\nexport type {DismissButtonProps} from './DismissButton';\nexport type {AriaPopoverProps, PopoverAria} from './usePopover';\nexport type {AriaModalOverlayProps, ModalOverlayAria} from './useModalOverlay';\nexport type {OverlayProps} from './Overlay';\nexport type {Placement, PlacementAxis, PositionProps} from '@react-types/overlays';\nexport type {PortalProviderProps, PortalProviderContextValue} from './PortalProvider';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/dist/uk-UA.main.js
DELETED
package/dist/uk-UA.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,+DAAS,CAAC;AAC1C","sources":["packages/@react-aria/overlays/intl/uk-UA.json"],"sourcesContent":["{\n \"dismiss\": \"Скасувати\"\n}\n"],"names":[],"version":3,"file":"uk-UA.main.js.map"}
|
package/dist/uk-UA.mjs
DELETED
package/dist/uk-UA.module.js
DELETED
package/dist/uk-UA.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,+DAAS,CAAC;AAC1C","sources":["packages/@react-aria/overlays/intl/uk-UA.json"],"sourcesContent":["{\n \"dismiss\": \"Скасувати\"\n}\n"],"names":[],"version":3,"file":"uk-UA.module.js.map"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var $f2vao$reactariautils = require("@react-aria/utils");
|
|
2
|
-
var $f2vao$react = require("react");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function $parcel$export(e, n, v, s) {
|
|
6
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
$parcel$export(module.exports, "onCloseMap", () => $9a8aa1b0b336ea3a$export$f6211563215e3b37);
|
|
10
|
-
$parcel$export(module.exports, "useCloseOnScroll", () => $9a8aa1b0b336ea3a$export$18fc8428861184da);
|
|
11
|
-
/*
|
|
12
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
13
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
15
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
*
|
|
17
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
18
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
19
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
20
|
-
* governing permissions and limitations under the License.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
const $9a8aa1b0b336ea3a$export$f6211563215e3b37 = new WeakMap();
|
|
24
|
-
function $9a8aa1b0b336ea3a$export$18fc8428861184da(opts) {
|
|
25
|
-
let { triggerRef: triggerRef, isOpen: isOpen, onClose: onClose } = opts;
|
|
26
|
-
(0, $f2vao$react.useEffect)(()=>{
|
|
27
|
-
if (!isOpen || onClose === null) return;
|
|
28
|
-
let onScroll = (e)=>{
|
|
29
|
-
// Ignore if scrolling an scrollable region outside the trigger's tree.
|
|
30
|
-
let target = e.target;
|
|
31
|
-
// window is not a Node and doesn't have contain, but window contains everything
|
|
32
|
-
if (!triggerRef.current || target instanceof Node && !(0, $f2vao$reactariautils.nodeContains)(target, triggerRef.current)) return;
|
|
33
|
-
// Ignore scroll events on any input or textarea as the cursor position can cause it to scroll
|
|
34
|
-
// such as in a combobox. Clicking the dropdown button places focus on the input, and if the
|
|
35
|
-
// text inside the input extends beyond the 'end', then it will scroll so the cursor is visible at the end.
|
|
36
|
-
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
|
|
37
|
-
let onCloseHandler = onClose || $9a8aa1b0b336ea3a$export$f6211563215e3b37.get(triggerRef.current);
|
|
38
|
-
if (onCloseHandler) onCloseHandler();
|
|
39
|
-
};
|
|
40
|
-
window.addEventListener('scroll', onScroll, true);
|
|
41
|
-
return ()=>{
|
|
42
|
-
window.removeEventListener('scroll', onScroll, true);
|
|
43
|
-
};
|
|
44
|
-
}, [
|
|
45
|
-
isOpen,
|
|
46
|
-
onClose,
|
|
47
|
-
triggerRef
|
|
48
|
-
]);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
//# sourceMappingURL=useCloseOnScroll.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAWM,MAAM,4CAA2C,IAAI;AASrD,SAAS,0CAAiB,IAA0B;IACzD,IAAI,cAAC,UAAU,UAAE,MAAM,WAAE,OAAO,EAAC,GAAG;IAEpC,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,CAAC,UAAU,YAAY,MACzB;QAGF,IAAI,WAAW,CAAC;YACd,uEAAuE;YACvE,IAAI,SAAS,EAAE,MAAM;YACrB,gFAAgF;YAChF,IAAI,CAAC,WAAW,OAAO,IAAK,AAAC,kBAAkB,QAAS,CAAC,CAAA,GAAA,kCAAW,EAAE,QAAQ,WAAW,OAAO,GAC9F;YAGF,8FAA8F;YAC9F,4FAA4F;YAC5F,2GAA2G;YAC3G,IAAI,EAAE,MAAM,YAAY,oBAAoB,EAAE,MAAM,YAAY,qBAC9D;YAGF,IAAI,iBAAiB,WAAW,0CAAW,GAAG,CAAC,WAAW,OAAO;YACjE,IAAI,gBACF;QAEJ;QAEA,OAAO,gBAAgB,CAAC,UAAU,UAAU;QAC5C,OAAO;YACL,OAAO,mBAAmB,CAAC,UAAU,UAAU;QACjD;IACF,GAAG;QAAC;QAAQ;QAAS;KAAW;AAClC","sources":["packages/@react-aria/overlays/src/useCloseOnScroll.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {nodeContains} from '@react-aria/utils';\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\n\n// This behavior moved from useOverlayTrigger to useOverlayPosition.\n// For backward compatibility, where useOverlayTrigger handled hiding the popover on close,\n// it sets a close function here mapped from the trigger element. This way we can avoid\n// forcing users to pass an onClose function to useOverlayPosition which could be considered\n// a breaking change.\nexport const onCloseMap: WeakMap<Element, () => void> = new WeakMap();\n\ninterface CloseOnScrollOptions {\n triggerRef: RefObject<Element | null>,\n isOpen?: boolean,\n onClose?: (() => void) | null\n}\n\n/** @private */\nexport function useCloseOnScroll(opts: CloseOnScrollOptions): void {\n let {triggerRef, isOpen, onClose} = opts;\n\n useEffect(() => {\n if (!isOpen || onClose === null) {\n return;\n }\n\n let onScroll = (e: Event) => {\n // Ignore if scrolling an scrollable region outside the trigger's tree.\n let target = e.target;\n // window is not a Node and doesn't have contain, but window contains everything\n if (!triggerRef.current || ((target instanceof Node) && !nodeContains(target, triggerRef.current))) {\n return;\n }\n\n // Ignore scroll events on any input or textarea as the cursor position can cause it to scroll\n // such as in a combobox. Clicking the dropdown button places focus on the input, and if the\n // text inside the input extends beyond the 'end', then it will scroll so the cursor is visible at the end.\n if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) {\n return;\n }\n\n let onCloseHandler = onClose || onCloseMap.get(triggerRef.current);\n if (onCloseHandler) {\n onCloseHandler();\n }\n };\n\n window.addEventListener('scroll', onScroll, true);\n return () => {\n window.removeEventListener('scroll', onScroll, true);\n };\n }, [isOpen, onClose, triggerRef]);\n}\n"],"names":[],"version":3,"file":"useCloseOnScroll.main.js.map"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {nodeContains as $dRVb8$nodeContains} from "@react-aria/utils";
|
|
2
|
-
import {useEffect as $dRVb8$useEffect} from "react";
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
6
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
-
* governing permissions and limitations under the License.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const $dd149f63282afbbf$export$f6211563215e3b37 = new WeakMap();
|
|
17
|
-
function $dd149f63282afbbf$export$18fc8428861184da(opts) {
|
|
18
|
-
let { triggerRef: triggerRef, isOpen: isOpen, onClose: onClose } = opts;
|
|
19
|
-
(0, $dRVb8$useEffect)(()=>{
|
|
20
|
-
if (!isOpen || onClose === null) return;
|
|
21
|
-
let onScroll = (e)=>{
|
|
22
|
-
// Ignore if scrolling an scrollable region outside the trigger's tree.
|
|
23
|
-
let target = e.target;
|
|
24
|
-
// window is not a Node and doesn't have contain, but window contains everything
|
|
25
|
-
if (!triggerRef.current || target instanceof Node && !(0, $dRVb8$nodeContains)(target, triggerRef.current)) return;
|
|
26
|
-
// Ignore scroll events on any input or textarea as the cursor position can cause it to scroll
|
|
27
|
-
// such as in a combobox. Clicking the dropdown button places focus on the input, and if the
|
|
28
|
-
// text inside the input extends beyond the 'end', then it will scroll so the cursor is visible at the end.
|
|
29
|
-
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
|
|
30
|
-
let onCloseHandler = onClose || $dd149f63282afbbf$export$f6211563215e3b37.get(triggerRef.current);
|
|
31
|
-
if (onCloseHandler) onCloseHandler();
|
|
32
|
-
};
|
|
33
|
-
window.addEventListener('scroll', onScroll, true);
|
|
34
|
-
return ()=>{
|
|
35
|
-
window.removeEventListener('scroll', onScroll, true);
|
|
36
|
-
};
|
|
37
|
-
}, [
|
|
38
|
-
isOpen,
|
|
39
|
-
onClose,
|
|
40
|
-
triggerRef
|
|
41
|
-
]);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export {$dd149f63282afbbf$export$f6211563215e3b37 as onCloseMap, $dd149f63282afbbf$export$18fc8428861184da as useCloseOnScroll};
|
|
46
|
-
//# sourceMappingURL=useCloseOnScroll.module.js.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {nodeContains as $dRVb8$nodeContains} from "@react-aria/utils";
|
|
2
|
-
import {useEffect as $dRVb8$useEffect} from "react";
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
6
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
-
* governing permissions and limitations under the License.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const $dd149f63282afbbf$export$f6211563215e3b37 = new WeakMap();
|
|
17
|
-
function $dd149f63282afbbf$export$18fc8428861184da(opts) {
|
|
18
|
-
let { triggerRef: triggerRef, isOpen: isOpen, onClose: onClose } = opts;
|
|
19
|
-
(0, $dRVb8$useEffect)(()=>{
|
|
20
|
-
if (!isOpen || onClose === null) return;
|
|
21
|
-
let onScroll = (e)=>{
|
|
22
|
-
// Ignore if scrolling an scrollable region outside the trigger's tree.
|
|
23
|
-
let target = e.target;
|
|
24
|
-
// window is not a Node and doesn't have contain, but window contains everything
|
|
25
|
-
if (!triggerRef.current || target instanceof Node && !(0, $dRVb8$nodeContains)(target, triggerRef.current)) return;
|
|
26
|
-
// Ignore scroll events on any input or textarea as the cursor position can cause it to scroll
|
|
27
|
-
// such as in a combobox. Clicking the dropdown button places focus on the input, and if the
|
|
28
|
-
// text inside the input extends beyond the 'end', then it will scroll so the cursor is visible at the end.
|
|
29
|
-
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
|
|
30
|
-
let onCloseHandler = onClose || $dd149f63282afbbf$export$f6211563215e3b37.get(triggerRef.current);
|
|
31
|
-
if (onCloseHandler) onCloseHandler();
|
|
32
|
-
};
|
|
33
|
-
window.addEventListener('scroll', onScroll, true);
|
|
34
|
-
return ()=>{
|
|
35
|
-
window.removeEventListener('scroll', onScroll, true);
|
|
36
|
-
};
|
|
37
|
-
}, [
|
|
38
|
-
isOpen,
|
|
39
|
-
onClose,
|
|
40
|
-
triggerRef
|
|
41
|
-
]);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export {$dd149f63282afbbf$export$f6211563215e3b37 as onCloseMap, $dd149f63282afbbf$export$18fc8428861184da as useCloseOnScroll};
|
|
46
|
-
//# sourceMappingURL=useCloseOnScroll.module.js.map
|