@react-aria/overlays 3.7.4 → 3.7.5
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/main.js +293 -290
- package/dist/main.js.map +1 -1
- package/dist/module.js +287 -284
- package/dist/module.js.map +1 -1
- package/package.json +9 -9
package/dist/module.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import $
|
|
2
|
-
import {useLayoutEffect as $
|
|
3
|
-
import {useLocale as $
|
|
4
|
-
import $
|
|
5
|
-
import $
|
|
6
|
-
import $
|
|
7
|
-
import $
|
|
8
|
-
import $
|
|
9
|
-
import $
|
|
10
|
-
import {useInteractOutside as $
|
|
11
|
-
import $
|
|
12
|
-
import {VisuallyHidden as $
|
|
1
|
+
import $j5iPF$react, {useState as $j5iPF$useState, useCallback as $j5iPF$useCallback, useRef as $j5iPF$useRef, useEffect as $j5iPF$useEffect, useContext as $j5iPF$useContext, useMemo as $j5iPF$useMemo} from "react";
|
|
2
|
+
import {useLayoutEffect as $j5iPF$useLayoutEffect, useId as $j5iPF$useId, isIOS as $j5iPF$isIOS, chain as $j5iPF$chain, getScrollParent as $j5iPF$getScrollParent} from "@react-aria/utils";
|
|
3
|
+
import {useLocale as $j5iPF$useLocale, useMessageFormatter as $j5iPF$useMessageFormatter} from "@react-aria/i18n";
|
|
4
|
+
import $j5iPF$domhelpersstyle from "dom-helpers/style";
|
|
5
|
+
import $j5iPF$domhelpersqueryoffset from "dom-helpers/query/offset";
|
|
6
|
+
import $j5iPF$domhelpersqueryposition from "dom-helpers/query/position";
|
|
7
|
+
import $j5iPF$domhelpersqueryscrollLeft from "dom-helpers/query/scrollLeft";
|
|
8
|
+
import $j5iPF$domhelpersqueryscrollTop from "dom-helpers/query/scrollTop";
|
|
9
|
+
import $j5iPF$domhelpersownerDocument from "dom-helpers/ownerDocument";
|
|
10
|
+
import {useInteractOutside as $j5iPF$useInteractOutside, useFocusWithin as $j5iPF$useFocusWithin} from "@react-aria/interactions";
|
|
11
|
+
import $j5iPF$reactdom from "react-dom";
|
|
12
|
+
import {VisuallyHidden as $j5iPF$VisuallyHidden} from "@react-aria/visually-hidden";
|
|
13
13
|
|
|
14
14
|
function $parcel$export(e, n, v, s) {
|
|
15
15
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
@@ -17,52 +17,54 @@ function $parcel$export(e, n, v, s) {
|
|
|
17
17
|
function $parcel$interopDefault(a) {
|
|
18
18
|
return a && a.__esModule ? a.default : a;
|
|
19
19
|
}
|
|
20
|
-
var $
|
|
20
|
+
var $406a41f4517fdb30$exports = {};
|
|
21
21
|
|
|
22
|
-
$parcel$export($
|
|
22
|
+
$parcel$export($406a41f4517fdb30$exports, "useOverlayPosition", () => $406a41f4517fdb30$export$d39e1813b3bdd0e1);
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
const $
|
|
29
|
+
const $b0f5ccedd88ed20a$var$AXIS = {
|
|
30
30
|
top: 'top',
|
|
31
31
|
bottom: 'top',
|
|
32
32
|
left: 'left',
|
|
33
33
|
right: 'left'
|
|
34
34
|
};
|
|
35
|
-
const $
|
|
35
|
+
const $b0f5ccedd88ed20a$var$FLIPPED_DIRECTION = {
|
|
36
36
|
top: 'bottom',
|
|
37
37
|
bottom: 'top',
|
|
38
38
|
left: 'right',
|
|
39
39
|
right: 'left'
|
|
40
40
|
};
|
|
41
|
-
const $
|
|
41
|
+
const $b0f5ccedd88ed20a$var$CROSS_AXIS = {
|
|
42
42
|
top: 'left',
|
|
43
43
|
left: 'top'
|
|
44
44
|
};
|
|
45
|
-
const $
|
|
45
|
+
const $b0f5ccedd88ed20a$var$AXIS_SIZE = {
|
|
46
46
|
top: 'height',
|
|
47
47
|
left: 'width'
|
|
48
48
|
};
|
|
49
|
-
const $
|
|
49
|
+
const $b0f5ccedd88ed20a$var$PARSED_PLACEMENT_CACHE = {
|
|
50
50
|
};
|
|
51
51
|
// @ts-ignore
|
|
52
|
-
let $
|
|
53
|
-
function $
|
|
52
|
+
let $b0f5ccedd88ed20a$var$visualViewport = typeof window !== 'undefined' && window.visualViewport;
|
|
53
|
+
function $b0f5ccedd88ed20a$var$getContainerDimensions(containerNode) {
|
|
54
54
|
let width = 0, height = 0, top = 0, left = 0;
|
|
55
55
|
let scroll = {
|
|
56
56
|
};
|
|
57
57
|
if (containerNode.tagName === 'BODY') {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
var ref;
|
|
59
|
+
width = (ref = $b0f5ccedd88ed20a$var$visualViewport === null || $b0f5ccedd88ed20a$var$visualViewport === void 0 ? void 0 : $b0f5ccedd88ed20a$var$visualViewport.width) !== null && ref !== void 0 ? ref : document.documentElement.clientWidth;
|
|
60
|
+
var ref1;
|
|
61
|
+
height = (ref1 = $b0f5ccedd88ed20a$var$visualViewport === null || $b0f5ccedd88ed20a$var$visualViewport === void 0 ? void 0 : $b0f5ccedd88ed20a$var$visualViewport.height) !== null && ref1 !== void 0 ? ref1 : document.documentElement.clientHeight;
|
|
62
|
+
scroll.top = $j5iPF$domhelpersqueryscrollTop($j5iPF$domhelpersownerDocument(containerNode).documentElement) || $j5iPF$domhelpersqueryscrollTop(containerNode);
|
|
63
|
+
scroll.left = $j5iPF$domhelpersqueryscrollLeft($j5iPF$domhelpersownerDocument(containerNode).documentElement) || $j5iPF$domhelpersqueryscrollLeft(containerNode);
|
|
62
64
|
} else {
|
|
63
|
-
({ width: width , height: height , top: top , left: left } = $
|
|
64
|
-
scroll.top = $
|
|
65
|
-
scroll.left = $
|
|
65
|
+
({ width: width , height: height , top: top , left: left } = $j5iPF$domhelpersqueryoffset(containerNode));
|
|
66
|
+
scroll.top = $j5iPF$domhelpersqueryscrollTop(containerNode);
|
|
67
|
+
scroll.left = $j5iPF$domhelpersqueryscrollLeft(containerNode);
|
|
66
68
|
}
|
|
67
69
|
return {
|
|
68
70
|
width: width,
|
|
@@ -72,7 +74,7 @@ function $9510af50157ce9d5$var$getContainerDimensions(containerNode) {
|
|
|
72
74
|
left: left
|
|
73
75
|
};
|
|
74
76
|
}
|
|
75
|
-
function $
|
|
77
|
+
function $b0f5ccedd88ed20a$var$getScroll(node) {
|
|
76
78
|
return {
|
|
77
79
|
top: node.scrollTop,
|
|
78
80
|
left: node.scrollLeft,
|
|
@@ -80,16 +82,16 @@ function $9510af50157ce9d5$var$getScroll(node) {
|
|
|
80
82
|
height: node.scrollHeight
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
|
-
function $
|
|
85
|
+
function $b0f5ccedd88ed20a$var$getDelta(axis, offset, size, containerDimensions, padding) {
|
|
84
86
|
let containerScroll = containerDimensions.scroll[axis];
|
|
85
|
-
let containerHeight = containerDimensions[$
|
|
87
|
+
let containerHeight = containerDimensions[$b0f5ccedd88ed20a$var$AXIS_SIZE[axis]];
|
|
86
88
|
let startEdgeOffset = offset - padding - containerScroll;
|
|
87
89
|
let endEdgeOffset = offset + padding - containerScroll + size;
|
|
88
90
|
if (startEdgeOffset < 0) return -startEdgeOffset;
|
|
89
91
|
else if (endEdgeOffset > containerHeight) return Math.max(containerHeight - endEdgeOffset, -startEdgeOffset);
|
|
90
92
|
else return 0;
|
|
91
93
|
}
|
|
92
|
-
function $
|
|
94
|
+
function $b0f5ccedd88ed20a$var$getMargins(node) {
|
|
93
95
|
let style = window.getComputedStyle(node);
|
|
94
96
|
return {
|
|
95
97
|
top: parseInt(style.marginTop, 10) || 0,
|
|
@@ -98,15 +100,15 @@ function $9510af50157ce9d5$var$getMargins(node) {
|
|
|
98
100
|
right: parseInt(style.marginRight, 10) || 0
|
|
99
101
|
};
|
|
100
102
|
}
|
|
101
|
-
function $
|
|
102
|
-
if ($
|
|
103
|
+
function $b0f5ccedd88ed20a$var$parsePlacement(input) {
|
|
104
|
+
if ($b0f5ccedd88ed20a$var$PARSED_PLACEMENT_CACHE[input]) return $b0f5ccedd88ed20a$var$PARSED_PLACEMENT_CACHE[input];
|
|
103
105
|
let [placement, crossPlacement] = input.split(' ');
|
|
104
|
-
let axis = $
|
|
105
|
-
let crossAxis = $
|
|
106
|
-
if (!$
|
|
107
|
-
let size = $
|
|
108
|
-
let crossSize = $
|
|
109
|
-
$
|
|
106
|
+
let axis = $b0f5ccedd88ed20a$var$AXIS[placement] || 'right';
|
|
107
|
+
let crossAxis = $b0f5ccedd88ed20a$var$CROSS_AXIS[axis];
|
|
108
|
+
if (!$b0f5ccedd88ed20a$var$AXIS[crossPlacement]) crossPlacement = 'center';
|
|
109
|
+
let size = $b0f5ccedd88ed20a$var$AXIS_SIZE[axis];
|
|
110
|
+
let crossSize = $b0f5ccedd88ed20a$var$AXIS_SIZE[crossAxis];
|
|
111
|
+
$b0f5ccedd88ed20a$var$PARSED_PLACEMENT_CACHE[input] = {
|
|
110
112
|
placement: placement,
|
|
111
113
|
crossPlacement: crossPlacement,
|
|
112
114
|
axis: axis,
|
|
@@ -114,9 +116,9 @@ function $9510af50157ce9d5$var$parsePlacement(input) {
|
|
|
114
116
|
size: size,
|
|
115
117
|
crossSize: crossSize
|
|
116
118
|
};
|
|
117
|
-
return $
|
|
119
|
+
return $b0f5ccedd88ed20a$var$PARSED_PLACEMENT_CACHE[input];
|
|
118
120
|
}
|
|
119
|
-
function $
|
|
121
|
+
function $b0f5ccedd88ed20a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned) {
|
|
120
122
|
let { placement: placement , crossPlacement: crossPlacement , axis: axis , crossAxis: crossAxis , size: size , crossSize: crossSize } = placementInfo;
|
|
121
123
|
let position = {
|
|
122
124
|
};
|
|
@@ -146,31 +148,31 @@ function $9510af50157ce9d5$var$computePosition(childOffset, boundaryDimensions,
|
|
|
146
148
|
// then it can only be the `document.body`, and `bottom` will be relative to _its_
|
|
147
149
|
// container, which should be as large as boundaryDimensions.
|
|
148
150
|
const containerHeight = isContainerPositioned ? containerOffsetWithBoundary[size] : boundaryDimensions[size];
|
|
149
|
-
position[$
|
|
151
|
+
position[$b0f5ccedd88ed20a$var$FLIPPED_DIRECTION[axis]] = Math.floor(containerHeight - childOffset[axis] + offset);
|
|
150
152
|
} else position[axis] = Math.floor(childOffset[axis] + childOffset[size] + offset);
|
|
151
153
|
return position;
|
|
152
154
|
}
|
|
153
|
-
function $
|
|
155
|
+
function $b0f5ccedd88ed20a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding) {
|
|
154
156
|
return position.top != null ? Math.max(0, boundaryDimensions.height + boundaryDimensions.top + boundaryDimensions.scroll.top - (containerOffsetWithBoundary.top + position.top) - (margins.top + margins.bottom + padding) // save additional space for margin and padding
|
|
155
157
|
) : Math.max(0, childOffset.top + containerOffsetWithBoundary.top - (boundaryDimensions.top + boundaryDimensions.scroll.top) - (margins.top + margins.bottom + padding) // save additional space for margin and padding
|
|
156
158
|
);
|
|
157
159
|
}
|
|
158
|
-
function $
|
|
160
|
+
function $b0f5ccedd88ed20a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo) {
|
|
159
161
|
let { placement: placement , axis: axis , size: size } = placementInfo;
|
|
160
|
-
if (placement === axis) return Math.max(0, childOffset[axis] - boundaryDimensions[axis] - boundaryDimensions.scroll[axis] + containerOffsetWithBoundary[axis] - margins[axis] - margins[$
|
|
161
|
-
return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + boundaryDimensions.scroll[axis] - containerOffsetWithBoundary[axis] - childOffset[axis] - childOffset[size] - margins[axis] - margins[$
|
|
162
|
+
if (placement === axis) return Math.max(0, childOffset[axis] - boundaryDimensions[axis] - boundaryDimensions.scroll[axis] + containerOffsetWithBoundary[axis] - margins[axis] - margins[$b0f5ccedd88ed20a$var$FLIPPED_DIRECTION[axis]] - padding);
|
|
163
|
+
return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + boundaryDimensions.scroll[axis] - containerOffsetWithBoundary[axis] - childOffset[axis] - childOffset[size] - margins[axis] - margins[$b0f5ccedd88ed20a$var$FLIPPED_DIRECTION[axis]] - padding);
|
|
162
164
|
}
|
|
163
|
-
function $
|
|
164
|
-
let placementInfo = $
|
|
165
|
+
function $b0f5ccedd88ed20a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight) {
|
|
166
|
+
let placementInfo = $b0f5ccedd88ed20a$var$parsePlacement(placementInput);
|
|
165
167
|
let { size: size , crossAxis: crossAxis , crossSize: crossSize , placement: placement , crossPlacement: crossPlacement } = placementInfo;
|
|
166
|
-
let position = $
|
|
168
|
+
let position = $b0f5ccedd88ed20a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned);
|
|
167
169
|
let normalizedOffset = offset;
|
|
168
|
-
let space = $
|
|
170
|
+
let space = $b0f5ccedd88ed20a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, placementInfo);
|
|
169
171
|
// Check if the scroll size of the overlay is greater than the available space to determine if we need to flip
|
|
170
172
|
if (flip && scrollSize[size] > space) {
|
|
171
|
-
let flippedPlacementInfo = $
|
|
172
|
-
let flippedPosition = $
|
|
173
|
-
let flippedSpace = $
|
|
173
|
+
let flippedPlacementInfo = $b0f5ccedd88ed20a$var$parsePlacement(`${$b0f5ccedd88ed20a$var$FLIPPED_DIRECTION[placement]} ${crossPlacement}`);
|
|
174
|
+
let flippedPosition = $b0f5ccedd88ed20a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned);
|
|
175
|
+
let flippedSpace = $b0f5ccedd88ed20a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, flippedPlacementInfo);
|
|
174
176
|
// If the available space for the flipped position is greater than the original available space, flip.
|
|
175
177
|
if (flippedSpace > space) {
|
|
176
178
|
placementInfo = flippedPlacementInfo;
|
|
@@ -178,13 +180,13 @@ function $9510af50157ce9d5$export$6839422d1f33cee9(placementInput, childOffset,
|
|
|
178
180
|
normalizedOffset = offset;
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
|
-
let delta = $
|
|
183
|
+
let delta = $b0f5ccedd88ed20a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, padding);
|
|
182
184
|
position[crossAxis] += delta;
|
|
183
|
-
let maxHeight = $
|
|
185
|
+
let maxHeight = $b0f5ccedd88ed20a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding);
|
|
184
186
|
if (userSetMaxHeight && userSetMaxHeight < maxHeight) maxHeight = userSetMaxHeight;
|
|
185
187
|
overlaySize.height = Math.min(overlaySize.height, maxHeight);
|
|
186
|
-
position = $
|
|
187
|
-
delta = $
|
|
188
|
+
position = $b0f5ccedd88ed20a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned);
|
|
189
|
+
delta = $b0f5ccedd88ed20a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, padding);
|
|
188
190
|
position[crossAxis] += delta;
|
|
189
191
|
let arrowPosition = {
|
|
190
192
|
};
|
|
@@ -197,41 +199,41 @@ function $9510af50157ce9d5$export$6839422d1f33cee9(placementInput, childOffset,
|
|
|
197
199
|
placement: placementInfo.placement
|
|
198
200
|
};
|
|
199
201
|
}
|
|
200
|
-
function $
|
|
202
|
+
function $b0f5ccedd88ed20a$export$b3ceb0cbf1056d98(opts) {
|
|
201
203
|
let { placement: placement , targetNode: targetNode , overlayNode: overlayNode , scrollNode: scrollNode , padding: padding , shouldFlip: shouldFlip , boundaryElement: boundaryElement , offset: offset , crossOffset: crossOffset , maxHeight: maxHeight } = opts;
|
|
202
204
|
let container = overlayNode.offsetParent || document.body;
|
|
203
205
|
let isBodyContainer = container.tagName === 'BODY';
|
|
204
206
|
const containerPositionStyle = window.getComputedStyle(container).position;
|
|
205
207
|
let isContainerPositioned = !!containerPositionStyle && containerPositionStyle !== 'static';
|
|
206
|
-
let childOffset = isBodyContainer ? $
|
|
208
|
+
let childOffset = isBodyContainer ? $j5iPF$domhelpersqueryoffset(targetNode) : $j5iPF$domhelpersqueryposition(targetNode, container);
|
|
207
209
|
if (!isBodyContainer) {
|
|
208
|
-
childOffset.top += parseInt($
|
|
209
|
-
childOffset.left += parseInt($
|
|
210
|
+
childOffset.top += parseInt($j5iPF$domhelpersstyle(targetNode, 'marginTop'), 10) || 0;
|
|
211
|
+
childOffset.left += parseInt($j5iPF$domhelpersstyle(targetNode, 'marginLeft'), 10) || 0;
|
|
210
212
|
}
|
|
211
|
-
let overlaySize = $
|
|
212
|
-
let margins = $
|
|
213
|
+
let overlaySize = $j5iPF$domhelpersqueryoffset(overlayNode);
|
|
214
|
+
let margins = $b0f5ccedd88ed20a$var$getMargins(overlayNode);
|
|
213
215
|
overlaySize.width += margins.left + margins.right;
|
|
214
216
|
overlaySize.height += margins.top + margins.bottom;
|
|
215
|
-
let scrollSize = $
|
|
216
|
-
let boundaryDimensions = $
|
|
217
|
-
let containerOffsetWithBoundary = boundaryElement.tagName === 'BODY' ? $
|
|
218
|
-
return $
|
|
217
|
+
let scrollSize = $b0f5ccedd88ed20a$var$getScroll(scrollNode);
|
|
218
|
+
let boundaryDimensions = $b0f5ccedd88ed20a$var$getContainerDimensions(boundaryElement);
|
|
219
|
+
let containerOffsetWithBoundary = boundaryElement.tagName === 'BODY' ? $j5iPF$domhelpersqueryoffset(container) : $j5iPF$domhelpersqueryposition(container, boundaryElement);
|
|
220
|
+
return $b0f5ccedd88ed20a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight);
|
|
219
221
|
}
|
|
220
222
|
|
|
221
223
|
|
|
222
224
|
|
|
223
225
|
|
|
224
|
-
const $
|
|
225
|
-
function $
|
|
226
|
+
const $57cf16c65f4d0c5c$export$f6211563215e3b37 = new WeakMap();
|
|
227
|
+
function $57cf16c65f4d0c5c$export$18fc8428861184da(opts) {
|
|
226
228
|
let { triggerRef: triggerRef , isOpen: isOpen , onClose: onClose } = opts;
|
|
227
|
-
$
|
|
229
|
+
$j5iPF$useEffect(()=>{
|
|
228
230
|
if (!isOpen) return;
|
|
229
231
|
let onScroll = (e)=>{
|
|
230
232
|
// Ignore if scrolling an scrollable region outside the trigger's tree.
|
|
231
233
|
let target = e.target;
|
|
232
234
|
// window is not a Node and doesn't have contain, but window contains everything
|
|
233
235
|
if (!triggerRef.current || target instanceof Node && !target.contains(triggerRef.current)) return;
|
|
234
|
-
let onCloseHandler = onClose || $
|
|
236
|
+
let onCloseHandler = onClose || $57cf16c65f4d0c5c$export$f6211563215e3b37.get(triggerRef.current);
|
|
235
237
|
if (onCloseHandler) onCloseHandler();
|
|
236
238
|
};
|
|
237
239
|
window.addEventListener('scroll', onScroll, true);
|
|
@@ -249,11 +251,11 @@ function $e51657e17bcf89d1$export$18fc8428861184da(opts) {
|
|
|
249
251
|
|
|
250
252
|
|
|
251
253
|
// @ts-ignore
|
|
252
|
-
let $
|
|
253
|
-
function $
|
|
254
|
-
let { direction: direction } = $
|
|
254
|
+
let $406a41f4517fdb30$var$visualViewport = typeof window !== 'undefined' && window.visualViewport;
|
|
255
|
+
function $406a41f4517fdb30$export$d39e1813b3bdd0e1(props) {
|
|
256
|
+
let { direction: direction } = $j5iPF$useLocale();
|
|
255
257
|
let { targetRef: targetRef , overlayRef: overlayRef , scrollRef: scrollRef = overlayRef , placement: placement = 'bottom' , containerPadding: containerPadding = 12 , shouldFlip: shouldFlip = true , boundaryElement: boundaryElement = typeof document !== 'undefined' ? document.body : null , offset: offset = 0 , crossOffset: crossOffset = 0 , shouldUpdatePosition: shouldUpdatePosition = true , isOpen: isOpen = true , onClose: onClose , maxHeight: maxHeight } = props;
|
|
256
|
-
let [position, setPosition] = $
|
|
258
|
+
let [position, setPosition] = $j5iPF$useState({
|
|
257
259
|
position: {
|
|
258
260
|
},
|
|
259
261
|
arrowOffsetLeft: undefined,
|
|
@@ -276,10 +278,10 @@ function $257fdf58e89203e8$export$d39e1813b3bdd0e1(props) {
|
|
|
276
278
|
direction,
|
|
277
279
|
maxHeight
|
|
278
280
|
];
|
|
279
|
-
let updatePosition = $
|
|
281
|
+
let updatePosition = $j5iPF$useCallback(()=>{
|
|
280
282
|
if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !scrollRef.current || !boundaryElement) return;
|
|
281
|
-
setPosition($
|
|
282
|
-
placement: $
|
|
283
|
+
setPosition($b0f5ccedd88ed20a$export$b3ceb0cbf1056d98({
|
|
284
|
+
placement: $406a41f4517fdb30$var$translateRTL(placement, direction),
|
|
283
285
|
overlayNode: overlayRef.current,
|
|
284
286
|
targetNode: targetRef.current,
|
|
285
287
|
scrollNode: scrollRef.current,
|
|
@@ -292,13 +294,13 @@ function $257fdf58e89203e8$export$d39e1813b3bdd0e1(props) {
|
|
|
292
294
|
}));
|
|
293
295
|
}, deps);
|
|
294
296
|
// Update position when anything changes
|
|
295
|
-
$
|
|
297
|
+
$j5iPF$useLayoutEffect(updatePosition, deps);
|
|
296
298
|
// Update position on window resize
|
|
297
|
-
$
|
|
299
|
+
$406a41f4517fdb30$var$useResize(updatePosition);
|
|
298
300
|
// Reposition the overlay and do not close on scroll while the visual viewport is resizing.
|
|
299
301
|
// This will ensure that overlays adjust their positioning when the iOS virtual keyboard appears.
|
|
300
|
-
let isResizing = $
|
|
301
|
-
$
|
|
302
|
+
let isResizing = $j5iPF$useRef(false);
|
|
303
|
+
$j5iPF$useLayoutEffect(()=>{
|
|
302
304
|
let timeout;
|
|
303
305
|
let onResize = ()=>{
|
|
304
306
|
isResizing.current = true;
|
|
@@ -308,14 +310,14 @@ function $257fdf58e89203e8$export$d39e1813b3bdd0e1(props) {
|
|
|
308
310
|
}, 500);
|
|
309
311
|
updatePosition();
|
|
310
312
|
};
|
|
311
|
-
$
|
|
313
|
+
$406a41f4517fdb30$var$visualViewport === null || $406a41f4517fdb30$var$visualViewport === void 0 ? void 0 : $406a41f4517fdb30$var$visualViewport.addEventListener('resize', onResize);
|
|
312
314
|
return ()=>{
|
|
313
|
-
$
|
|
315
|
+
$406a41f4517fdb30$var$visualViewport === null || $406a41f4517fdb30$var$visualViewport === void 0 ? void 0 : $406a41f4517fdb30$var$visualViewport.removeEventListener('resize', onResize);
|
|
314
316
|
};
|
|
315
317
|
}, [
|
|
316
318
|
updatePosition
|
|
317
319
|
]);
|
|
318
|
-
let close = $
|
|
320
|
+
let close = $j5iPF$useCallback(()=>{
|
|
319
321
|
if (!isResizing.current) onClose();
|
|
320
322
|
}, [
|
|
321
323
|
onClose,
|
|
@@ -323,7 +325,7 @@ function $257fdf58e89203e8$export$d39e1813b3bdd0e1(props) {
|
|
|
323
325
|
]);
|
|
324
326
|
// When scrolling a parent scrollable region of the trigger (other than the body),
|
|
325
327
|
// we hide the popover. Otherwise, its position would be incorrect.
|
|
326
|
-
$
|
|
328
|
+
$57cf16c65f4d0c5c$export$18fc8428861184da({
|
|
327
329
|
triggerRef: targetRef,
|
|
328
330
|
isOpen: isOpen,
|
|
329
331
|
onClose: onClose ? close : undefined
|
|
@@ -347,8 +349,8 @@ function $257fdf58e89203e8$export$d39e1813b3bdd0e1(props) {
|
|
|
347
349
|
updatePosition: updatePosition
|
|
348
350
|
};
|
|
349
351
|
}
|
|
350
|
-
function $
|
|
351
|
-
$
|
|
352
|
+
function $406a41f4517fdb30$var$useResize(onResize) {
|
|
353
|
+
$j5iPF$useLayoutEffect(()=>{
|
|
352
354
|
window.addEventListener('resize', onResize, false);
|
|
353
355
|
return ()=>{
|
|
354
356
|
window.removeEventListener('resize', onResize, false);
|
|
@@ -357,26 +359,26 @@ function $257fdf58e89203e8$var$useResize(onResize) {
|
|
|
357
359
|
onResize
|
|
358
360
|
]);
|
|
359
361
|
}
|
|
360
|
-
function $
|
|
362
|
+
function $406a41f4517fdb30$var$translateRTL(position, direction) {
|
|
361
363
|
if (direction === 'rtl') return position.replace('start', 'right').replace('end', 'left');
|
|
362
364
|
return position.replace('start', 'left').replace('end', 'right');
|
|
363
365
|
}
|
|
364
366
|
|
|
365
367
|
|
|
366
|
-
var $
|
|
368
|
+
var $9f79c4b26f87d454$exports = {};
|
|
367
369
|
|
|
368
|
-
$parcel$export($
|
|
370
|
+
$parcel$export($9f79c4b26f87d454$exports, "useOverlay", () => $9f79c4b26f87d454$export$ea8f71083e90600f);
|
|
369
371
|
|
|
370
372
|
|
|
371
|
-
const $
|
|
372
|
-
function $
|
|
373
|
+
const $9f79c4b26f87d454$var$visibleOverlays = [];
|
|
374
|
+
function $9f79c4b26f87d454$export$ea8f71083e90600f(props, ref) {
|
|
373
375
|
let { onClose: onClose , shouldCloseOnBlur: shouldCloseOnBlur , isOpen: isOpen , isDismissable: isDismissable = false , isKeyboardDismissDisabled: isKeyboardDismissDisabled = false , shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;
|
|
374
376
|
// Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.
|
|
375
|
-
$
|
|
376
|
-
if (isOpen) $
|
|
377
|
+
$j5iPF$useEffect(()=>{
|
|
378
|
+
if (isOpen) $9f79c4b26f87d454$var$visibleOverlays.push(ref);
|
|
377
379
|
return ()=>{
|
|
378
|
-
let index = $
|
|
379
|
-
if (index >= 0) $
|
|
380
|
+
let index = $9f79c4b26f87d454$var$visibleOverlays.indexOf(ref);
|
|
381
|
+
if (index >= 0) $9f79c4b26f87d454$var$visibleOverlays.splice(index, 1);
|
|
380
382
|
};
|
|
381
383
|
}, [
|
|
382
384
|
isOpen,
|
|
@@ -384,11 +386,11 @@ function $3e0c6adf4453f3f2$export$ea8f71083e90600f(props, ref) {
|
|
|
384
386
|
]);
|
|
385
387
|
// Only hide the overlay when it is the topmost visible overlay in the stack.
|
|
386
388
|
let onHide = ()=>{
|
|
387
|
-
if ($
|
|
389
|
+
if ($9f79c4b26f87d454$var$visibleOverlays[$9f79c4b26f87d454$var$visibleOverlays.length - 1] === ref && onClose) onClose();
|
|
388
390
|
};
|
|
389
391
|
let onInteractOutsideStart = (e)=>{
|
|
390
392
|
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {
|
|
391
|
-
if ($
|
|
393
|
+
if ($9f79c4b26f87d454$var$visibleOverlays[$9f79c4b26f87d454$var$visibleOverlays.length - 1] === ref) {
|
|
392
394
|
e.stopPropagation();
|
|
393
395
|
e.preventDefault();
|
|
394
396
|
}
|
|
@@ -396,7 +398,7 @@ function $3e0c6adf4453f3f2$export$ea8f71083e90600f(props, ref) {
|
|
|
396
398
|
};
|
|
397
399
|
let onInteractOutside = (e)=>{
|
|
398
400
|
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {
|
|
399
|
-
if ($
|
|
401
|
+
if ($9f79c4b26f87d454$var$visibleOverlays[$9f79c4b26f87d454$var$visibleOverlays.length - 1] === ref) {
|
|
400
402
|
e.stopPropagation();
|
|
401
403
|
e.preventDefault();
|
|
402
404
|
}
|
|
@@ -411,12 +413,12 @@ function $3e0c6adf4453f3f2$export$ea8f71083e90600f(props, ref) {
|
|
|
411
413
|
}
|
|
412
414
|
};
|
|
413
415
|
// Handle clicking outside the overlay to close it
|
|
414
|
-
$
|
|
416
|
+
$j5iPF$useInteractOutside({
|
|
415
417
|
ref: ref,
|
|
416
418
|
onInteractOutside: isDismissable ? onInteractOutside : null,
|
|
417
419
|
onInteractOutsideStart: onInteractOutsideStart
|
|
418
420
|
});
|
|
419
|
-
let { focusWithinProps: focusWithinProps } = $
|
|
421
|
+
let { focusWithinProps: focusWithinProps } = $j5iPF$useFocusWithin({
|
|
420
422
|
isDisabled: !shouldCloseOnBlur,
|
|
421
423
|
onBlurWithin: (e)=>{
|
|
422
424
|
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose();
|
|
@@ -438,19 +440,19 @@ function $3e0c6adf4453f3f2$export$ea8f71083e90600f(props, ref) {
|
|
|
438
440
|
}
|
|
439
441
|
|
|
440
442
|
|
|
441
|
-
var $
|
|
443
|
+
var $d5e25f6b1b375e64$exports = {};
|
|
442
444
|
|
|
443
|
-
$parcel$export($
|
|
445
|
+
$parcel$export($d5e25f6b1b375e64$exports, "useOverlayTrigger", () => $d5e25f6b1b375e64$export$f9d5c8beee7d008d);
|
|
444
446
|
|
|
445
447
|
|
|
446
448
|
|
|
447
|
-
function $
|
|
449
|
+
function $d5e25f6b1b375e64$export$f9d5c8beee7d008d(props, state, ref) {
|
|
448
450
|
let { type: type } = props;
|
|
449
451
|
let { isOpen: isOpen } = state;
|
|
450
452
|
// Backward compatibility. Share state close function with useOverlayPosition so it can close on scroll
|
|
451
453
|
// without forcing users to pass onClose.
|
|
452
|
-
$
|
|
453
|
-
if (ref && ref.current) $
|
|
454
|
+
$j5iPF$useEffect(()=>{
|
|
455
|
+
if (ref && ref.current) $57cf16c65f4d0c5c$export$f6211563215e3b37.set(ref.current, state.close);
|
|
454
456
|
});
|
|
455
457
|
// Aria 1.1 supports multiple values for aria-haspopup other than just menus.
|
|
456
458
|
// https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup
|
|
@@ -459,7 +461,7 @@ function $090c2b640a9525fd$export$f9d5c8beee7d008d(props, state, ref) {
|
|
|
459
461
|
let ariaHasPopup = undefined;
|
|
460
462
|
if (type === 'menu') ariaHasPopup = true;
|
|
461
463
|
else if (type === 'listbox') ariaHasPopup = 'listbox';
|
|
462
|
-
let overlayId = $
|
|
464
|
+
let overlayId = $j5iPF$useId();
|
|
463
465
|
return {
|
|
464
466
|
triggerProps: {
|
|
465
467
|
'aria-haspopup': ariaHasPopup,
|
|
@@ -473,14 +475,14 @@ function $090c2b640a9525fd$export$f9d5c8beee7d008d(props, state, ref) {
|
|
|
473
475
|
}
|
|
474
476
|
|
|
475
477
|
|
|
476
|
-
var $
|
|
478
|
+
var $83f8618cd3e10645$exports = {};
|
|
477
479
|
|
|
478
|
-
$parcel$export($
|
|
480
|
+
$parcel$export($83f8618cd3e10645$exports, "usePreventScroll", () => $83f8618cd3e10645$export$ee0f7cc6afcd1c18);
|
|
479
481
|
|
|
480
482
|
// @ts-ignore
|
|
481
|
-
const $
|
|
483
|
+
const $83f8618cd3e10645$var$visualViewport = typeof window !== 'undefined' && window.visualViewport;
|
|
482
484
|
// HTML input types that do not cause the software keyboard to appear.
|
|
483
|
-
const $
|
|
485
|
+
const $83f8618cd3e10645$var$nonTextInputTypes = new Set([
|
|
484
486
|
'checkbox',
|
|
485
487
|
'radio',
|
|
486
488
|
'range',
|
|
@@ -491,21 +493,21 @@ const $48168a03440bff21$var$nonTextInputTypes = new Set([
|
|
|
491
493
|
'submit',
|
|
492
494
|
'reset'
|
|
493
495
|
]);
|
|
494
|
-
function $
|
|
496
|
+
function $83f8618cd3e10645$export$ee0f7cc6afcd1c18(options = {
|
|
495
497
|
}) {
|
|
496
498
|
let { isDisabled: isDisabled } = options;
|
|
497
|
-
$
|
|
499
|
+
$j5iPF$useLayoutEffect(()=>{
|
|
498
500
|
if (isDisabled) return;
|
|
499
|
-
if ($
|
|
500
|
-
else return $
|
|
501
|
+
if ($j5iPF$isIOS()) return $83f8618cd3e10645$var$preventScrollMobileSafari();
|
|
502
|
+
else return $83f8618cd3e10645$var$preventScrollStandard();
|
|
501
503
|
}, [
|
|
502
504
|
isDisabled
|
|
503
505
|
]);
|
|
504
506
|
}
|
|
505
507
|
// For most browsers, all we need to do is set `overflow: hidden` on the root element, and
|
|
506
508
|
// add some padding to prevent the page from shifting when the scrollbar is hidden.
|
|
507
|
-
function $
|
|
508
|
-
return $
|
|
509
|
+
function $83f8618cd3e10645$var$preventScrollStandard() {
|
|
510
|
+
return $j5iPF$chain($83f8618cd3e10645$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $83f8618cd3e10645$var$setStyle(document.documentElement, 'overflow', 'hidden'));
|
|
509
511
|
}
|
|
510
512
|
// Mobile Safari is a whole different beast. Even with overflow: hidden,
|
|
511
513
|
// it still scrolls the page in many situations:
|
|
@@ -533,12 +535,12 @@ function $48168a03440bff21$var$preventScrollStandard() {
|
|
|
533
535
|
// above work or Safari will still try to scroll the page when focusing an input.
|
|
534
536
|
// 6. As a last resort, handle window scroll events, and scroll back to the top. This can happen when attempting
|
|
535
537
|
// to navigate to an input with the next/previous buttons that's outside a modal.
|
|
536
|
-
function $
|
|
538
|
+
function $83f8618cd3e10645$var$preventScrollMobileSafari() {
|
|
537
539
|
let scrollable;
|
|
538
540
|
let lastY = 0;
|
|
539
541
|
let onTouchStart = (e)=>{
|
|
540
542
|
// Store the nearest scrollable parent element from the element that the user touched.
|
|
541
|
-
scrollable = $
|
|
543
|
+
scrollable = $j5iPF$getScrollParent(e.target);
|
|
542
544
|
if (scrollable === document.documentElement && scrollable === document.body) return;
|
|
543
545
|
lastY = e.changedTouches[0].pageY;
|
|
544
546
|
};
|
|
@@ -560,7 +562,7 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
560
562
|
};
|
|
561
563
|
let onTouchEnd = (e)=>{
|
|
562
564
|
let target = e.target;
|
|
563
|
-
if (target instanceof HTMLInputElement && !$
|
|
565
|
+
if (target instanceof HTMLInputElement && !$83f8618cd3e10645$var$nonTextInputTypes.has(target.type)) {
|
|
564
566
|
e.preventDefault();
|
|
565
567
|
// Apply a transform to trick Safari into thinking the input is at the top of the page
|
|
566
568
|
// so it doesn't try to scroll it into view. When tapping on an input, this needs to
|
|
@@ -574,7 +576,7 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
574
576
|
};
|
|
575
577
|
let onFocus = (e)=>{
|
|
576
578
|
let target = e.target;
|
|
577
|
-
if (target instanceof HTMLInputElement && !$
|
|
579
|
+
if (target instanceof HTMLInputElement && !$83f8618cd3e10645$var$nonTextInputTypes.has(target.type)) {
|
|
578
580
|
// Transform also needs to be applied in the focus event in cases where focus moves
|
|
579
581
|
// other than tapping on an input directly, e.g. the next/previous buttons in the
|
|
580
582
|
// software keyboard. In these cases, it seems applying the transform in the focus event
|
|
@@ -584,15 +586,15 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
584
586
|
target.style.transform = '';
|
|
585
587
|
// This will have prevented the browser from scrolling the focused element into view,
|
|
586
588
|
// so we need to do this ourselves in a way that doesn't cause the whole page to scroll.
|
|
587
|
-
if ($
|
|
588
|
-
if ($
|
|
589
|
+
if ($83f8618cd3e10645$var$visualViewport) {
|
|
590
|
+
if ($83f8618cd3e10645$var$visualViewport.height < window.innerHeight) // If the keyboard is already visible, do this after one additional frame
|
|
589
591
|
// to wait for the transform to be removed.
|
|
590
592
|
requestAnimationFrame(()=>{
|
|
591
|
-
$
|
|
593
|
+
$83f8618cd3e10645$var$scrollIntoView(target);
|
|
592
594
|
});
|
|
593
595
|
else // Otherwise, wait for the visual viewport to resize before scrolling so we can
|
|
594
596
|
// measure the correct position to scroll to.
|
|
595
|
-
$
|
|
597
|
+
$83f8618cd3e10645$var$visualViewport.addEventListener('resize', ()=>$83f8618cd3e10645$var$scrollIntoView(target)
|
|
596
598
|
, {
|
|
597
599
|
once: true
|
|
598
600
|
});
|
|
@@ -610,19 +612,19 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
610
612
|
// enable us to scroll the window to the top, which is required for the rest of this to work.
|
|
611
613
|
let scrollX = window.pageXOffset;
|
|
612
614
|
let scrollY = window.pageYOffset;
|
|
613
|
-
let restoreStyles = $
|
|
615
|
+
let restoreStyles = $j5iPF$chain($83f8618cd3e10645$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $83f8618cd3e10645$var$setStyle(document.documentElement, 'overflow', 'hidden'), $83f8618cd3e10645$var$setStyle(document.body, 'marginTop', `-${scrollY}px`));
|
|
614
616
|
// Scroll to the top. The negative margin on the body will make this appear the same.
|
|
615
617
|
window.scrollTo(0, 0);
|
|
616
|
-
let removeEvents = $
|
|
618
|
+
let removeEvents = $j5iPF$chain($83f8618cd3e10645$var$addEvent(document, 'touchstart', onTouchStart, {
|
|
617
619
|
passive: false,
|
|
618
620
|
capture: true
|
|
619
|
-
}), $
|
|
621
|
+
}), $83f8618cd3e10645$var$addEvent(document, 'touchmove', onTouchMove, {
|
|
620
622
|
passive: false,
|
|
621
623
|
capture: true
|
|
622
|
-
}), $
|
|
624
|
+
}), $83f8618cd3e10645$var$addEvent(document, 'touchend', onTouchEnd, {
|
|
623
625
|
passive: false,
|
|
624
626
|
capture: true
|
|
625
|
-
}), $
|
|
627
|
+
}), $83f8618cd3e10645$var$addEvent(document, 'focus', onFocus, true), $83f8618cd3e10645$var$addEvent(window, 'scroll', onWindowScroll));
|
|
626
628
|
return ()=>{
|
|
627
629
|
// Restore styles and scroll the page back to where it was.
|
|
628
630
|
restoreStyles();
|
|
@@ -631,7 +633,7 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
631
633
|
};
|
|
632
634
|
}
|
|
633
635
|
// Sets a CSS property on an element, and returns a function to revert it to the previous value.
|
|
634
|
-
function $
|
|
636
|
+
function $83f8618cd3e10645$var$setStyle(element, style, value) {
|
|
635
637
|
let cur = element.style[style];
|
|
636
638
|
element.style[style] = value;
|
|
637
639
|
return ()=>{
|
|
@@ -639,15 +641,15 @@ function $48168a03440bff21$var$setStyle(element, style, value) {
|
|
|
639
641
|
};
|
|
640
642
|
}
|
|
641
643
|
// Adds an event listener to an element, and returns a function to remove it.
|
|
642
|
-
function $
|
|
644
|
+
function $83f8618cd3e10645$var$addEvent(target, event, handler, options) {
|
|
643
645
|
target.addEventListener(event, handler, options);
|
|
644
646
|
return ()=>{
|
|
645
647
|
target.removeEventListener(event, handler, options);
|
|
646
648
|
};
|
|
647
649
|
}
|
|
648
|
-
function $
|
|
650
|
+
function $83f8618cd3e10645$var$scrollIntoView(target) {
|
|
649
651
|
// Find the parent scrollable element and adjust the scroll position if the target is not already in view.
|
|
650
|
-
let scrollable = $
|
|
652
|
+
let scrollable = $j5iPF$getScrollParent(target);
|
|
651
653
|
if (scrollable !== document.documentElement && scrollable !== document.body) {
|
|
652
654
|
let scrollableTop = scrollable.getBoundingClientRect().top;
|
|
653
655
|
let targetTop = target.getBoundingClientRect().top;
|
|
@@ -656,21 +658,21 @@ function $48168a03440bff21$var$scrollIntoView(target) {
|
|
|
656
658
|
}
|
|
657
659
|
|
|
658
660
|
|
|
659
|
-
var $
|
|
661
|
+
var $7b14dc4b86354e5c$exports = {};
|
|
660
662
|
|
|
661
|
-
$parcel$export($
|
|
662
|
-
$parcel$export($
|
|
663
|
-
$parcel$export($
|
|
664
|
-
$parcel$export($
|
|
665
|
-
$parcel$export($
|
|
663
|
+
$parcel$export($7b14dc4b86354e5c$exports, "ModalProvider", () => $7b14dc4b86354e5c$export$178405afcd8c5eb);
|
|
664
|
+
$parcel$export($7b14dc4b86354e5c$exports, "useModalProvider", () => $7b14dc4b86354e5c$export$d9aaed4c3ece1bc0);
|
|
665
|
+
$parcel$export($7b14dc4b86354e5c$exports, "OverlayProvider", () => $7b14dc4b86354e5c$export$bf688221f59024e5);
|
|
666
|
+
$parcel$export($7b14dc4b86354e5c$exports, "OverlayContainer", () => $7b14dc4b86354e5c$export$b47c3594eab58386);
|
|
667
|
+
$parcel$export($7b14dc4b86354e5c$exports, "useModal", () => $7b14dc4b86354e5c$export$33ffd74ebf07f060);
|
|
666
668
|
|
|
667
669
|
|
|
668
|
-
const $
|
|
669
|
-
function $
|
|
670
|
+
const $7b14dc4b86354e5c$var$Context = /*#__PURE__*/ $j5iPF$react.createContext(null);
|
|
671
|
+
function $7b14dc4b86354e5c$export$178405afcd8c5eb(props) {
|
|
670
672
|
let { children: children } = props;
|
|
671
|
-
let parent = $
|
|
672
|
-
let [modalCount, setModalCount] = $
|
|
673
|
-
let context = $
|
|
673
|
+
let parent = $j5iPF$useContext($7b14dc4b86354e5c$var$Context);
|
|
674
|
+
let [modalCount, setModalCount] = $j5iPF$useState(0);
|
|
675
|
+
let context = $j5iPF$useMemo(()=>({
|
|
674
676
|
parent: parent,
|
|
675
677
|
modalCount: modalCount,
|
|
676
678
|
addModal () {
|
|
@@ -688,12 +690,12 @@ function $698c70f6640041fb$export$178405afcd8c5eb(props) {
|
|
|
688
690
|
parent,
|
|
689
691
|
modalCount
|
|
690
692
|
]);
|
|
691
|
-
return(/*#__PURE__*/ $
|
|
693
|
+
return(/*#__PURE__*/ $j5iPF$react.createElement($7b14dc4b86354e5c$var$Context.Provider, {
|
|
692
694
|
value: context
|
|
693
695
|
}, children));
|
|
694
696
|
}
|
|
695
|
-
function $
|
|
696
|
-
let context = $
|
|
697
|
+
function $7b14dc4b86354e5c$export$d9aaed4c3ece1bc0() {
|
|
698
|
+
let context = $j5iPF$useContext($7b14dc4b86354e5c$var$Context);
|
|
697
699
|
return {
|
|
698
700
|
modalProviderProps: {
|
|
699
701
|
'aria-hidden': context && context.modalCount > 0 ? true : null
|
|
@@ -702,33 +704,33 @@ function $698c70f6640041fb$export$d9aaed4c3ece1bc0() {
|
|
|
702
704
|
}
|
|
703
705
|
/**
|
|
704
706
|
* Creates a root node that will be aria-hidden if there are other modals open.
|
|
705
|
-
*/ function $
|
|
706
|
-
let { modalProviderProps: modalProviderProps } = $
|
|
707
|
-
return(/*#__PURE__*/ $
|
|
707
|
+
*/ function $7b14dc4b86354e5c$var$OverlayContainerDOM(props) {
|
|
708
|
+
let { modalProviderProps: modalProviderProps } = $7b14dc4b86354e5c$export$d9aaed4c3ece1bc0();
|
|
709
|
+
return(/*#__PURE__*/ $j5iPF$react.createElement("div", {
|
|
708
710
|
"data-overlay-container": true,
|
|
709
711
|
...props,
|
|
710
712
|
...modalProviderProps
|
|
711
713
|
}));
|
|
712
714
|
}
|
|
713
|
-
function $
|
|
714
|
-
return(/*#__PURE__*/ $
|
|
715
|
+
function $7b14dc4b86354e5c$export$bf688221f59024e5(props) {
|
|
716
|
+
return(/*#__PURE__*/ $j5iPF$react.createElement($7b14dc4b86354e5c$export$178405afcd8c5eb, null, /*#__PURE__*/ $j5iPF$react.createElement($7b14dc4b86354e5c$var$OverlayContainerDOM, props)));
|
|
715
717
|
}
|
|
716
|
-
function $
|
|
718
|
+
function $7b14dc4b86354e5c$export$b47c3594eab58386(props) {
|
|
717
719
|
let { portalContainer: portalContainer = document.body , ...rest } = props;
|
|
718
|
-
$
|
|
720
|
+
$j5iPF$react.useEffect(()=>{
|
|
719
721
|
if (portalContainer.closest('[data-overlay-container]')) throw new Error('An OverlayContainer must not be inside another container. Please change the portalContainer prop.');
|
|
720
722
|
}, [
|
|
721
723
|
portalContainer
|
|
722
724
|
]);
|
|
723
|
-
let contents = /*#__PURE__*/ $
|
|
724
|
-
return(/*#__PURE__*/ $
|
|
725
|
+
let contents = /*#__PURE__*/ $j5iPF$react.createElement($7b14dc4b86354e5c$export$bf688221f59024e5, rest);
|
|
726
|
+
return(/*#__PURE__*/ $j5iPF$reactdom.createPortal(contents, portalContainer));
|
|
725
727
|
}
|
|
726
|
-
function $
|
|
728
|
+
function $7b14dc4b86354e5c$export$33ffd74ebf07f060(options) {
|
|
727
729
|
// Add aria-hidden to all parent providers on mount, and restore on unmount.
|
|
728
|
-
let context = $
|
|
730
|
+
let context = $j5iPF$useContext($7b14dc4b86354e5c$var$Context);
|
|
729
731
|
if (!context) throw new Error('Modal is not contained within a provider');
|
|
730
|
-
$
|
|
731
|
-
if (options
|
|
732
|
+
$j5iPF$useEffect(()=>{
|
|
733
|
+
if ((options === null || options === void 0 ? void 0 : options.isDisabled) || !context || !context.parent) return;
|
|
732
734
|
// The immediate context is from the provider containing this modal, so we only
|
|
733
735
|
// want to trigger aria-hidden on its parents not on the modal provider itself.
|
|
734
736
|
context.parent.addModal();
|
|
@@ -738,204 +740,204 @@ function $698c70f6640041fb$export$33ffd74ebf07f060(options) {
|
|
|
738
740
|
}, [
|
|
739
741
|
context,
|
|
740
742
|
context.parent,
|
|
741
|
-
options
|
|
743
|
+
options === null || options === void 0 ? void 0 : options.isDisabled
|
|
742
744
|
]);
|
|
743
745
|
return {
|
|
744
746
|
modalProps: {
|
|
745
|
-
'data-ismodal': !options
|
|
747
|
+
'data-ismodal': !(options === null || options === void 0 ? void 0 : options.isDisabled)
|
|
746
748
|
}
|
|
747
749
|
};
|
|
748
750
|
}
|
|
749
751
|
|
|
750
752
|
|
|
751
|
-
var $
|
|
753
|
+
var $e574ce2210a97860$exports = {};
|
|
752
754
|
|
|
753
|
-
$parcel$export($
|
|
754
|
-
var $
|
|
755
|
-
var $
|
|
756
|
-
$
|
|
755
|
+
$parcel$export($e574ce2210a97860$exports, "DismissButton", () => $e574ce2210a97860$export$2317d149ed6f78c4);
|
|
756
|
+
var $5870ac8a269e6de3$exports = {};
|
|
757
|
+
var $a5a59de44c333ba6$exports = {};
|
|
758
|
+
$a5a59de44c333ba6$exports = JSON.parse("{\"dismiss\":\"تجاهل\"}");
|
|
757
759
|
|
|
758
760
|
|
|
759
|
-
var $
|
|
760
|
-
$
|
|
761
|
+
var $50feebb6bb808224$exports = {};
|
|
762
|
+
$50feebb6bb808224$exports = JSON.parse("{\"dismiss\":\"Отхвърляне\"}");
|
|
761
763
|
|
|
762
764
|
|
|
763
|
-
var $
|
|
764
|
-
$
|
|
765
|
+
var $e83177e29b5408cb$exports = {};
|
|
766
|
+
$e83177e29b5408cb$exports = JSON.parse("{\"dismiss\":\"Odstranit\"}");
|
|
765
767
|
|
|
766
768
|
|
|
767
|
-
var $
|
|
768
|
-
$
|
|
769
|
+
var $e2c182bad6ce2263$exports = {};
|
|
770
|
+
$e2c182bad6ce2263$exports = JSON.parse("{\"dismiss\":\"Luk\"}");
|
|
769
771
|
|
|
770
772
|
|
|
771
|
-
var $
|
|
772
|
-
$
|
|
773
|
+
var $c097e483b797e55c$exports = {};
|
|
774
|
+
$c097e483b797e55c$exports = JSON.parse("{\"dismiss\":\"Schließen\"}");
|
|
773
775
|
|
|
774
776
|
|
|
775
|
-
var $
|
|
776
|
-
$
|
|
777
|
+
var $0d18df414eea1247$exports = {};
|
|
778
|
+
$0d18df414eea1247$exports = JSON.parse("{\"dismiss\":\"Απόρριψη\"}");
|
|
777
779
|
|
|
778
780
|
|
|
779
|
-
var $
|
|
780
|
-
$
|
|
781
|
+
var $6198858cde361b70$exports = {};
|
|
782
|
+
$6198858cde361b70$exports = JSON.parse("{\"dismiss\":\"Dismiss\"}");
|
|
781
783
|
|
|
782
784
|
|
|
783
|
-
var $
|
|
784
|
-
$
|
|
785
|
+
var $d609ce5050619dd3$exports = {};
|
|
786
|
+
$d609ce5050619dd3$exports = JSON.parse("{\"dismiss\":\"Descartar\"}");
|
|
785
787
|
|
|
786
788
|
|
|
787
|
-
var $
|
|
788
|
-
$
|
|
789
|
+
var $56e720a6a6e6a6d1$exports = {};
|
|
790
|
+
$56e720a6a6e6a6d1$exports = JSON.parse("{\"dismiss\":\"Lõpeta\"}");
|
|
789
791
|
|
|
790
792
|
|
|
791
|
-
var $
|
|
792
|
-
$
|
|
793
|
+
var $6fd05be78eeed1b2$exports = {};
|
|
794
|
+
$6fd05be78eeed1b2$exports = JSON.parse("{\"dismiss\":\"Hylkää\"}");
|
|
793
795
|
|
|
794
796
|
|
|
795
|
-
var $
|
|
796
|
-
$
|
|
797
|
+
var $1e8ea0f63ec3ba05$exports = {};
|
|
798
|
+
$1e8ea0f63ec3ba05$exports = JSON.parse("{\"dismiss\":\"Rejeter\"}");
|
|
797
799
|
|
|
798
800
|
|
|
799
|
-
var $
|
|
800
|
-
$
|
|
801
|
+
var $ef8d670a1aff22a8$exports = {};
|
|
802
|
+
$ef8d670a1aff22a8$exports = JSON.parse("{\"dismiss\":\"התעלם\"}");
|
|
801
803
|
|
|
802
804
|
|
|
803
|
-
var $
|
|
804
|
-
$
|
|
805
|
+
var $ebea4bf8cec8a13f$exports = {};
|
|
806
|
+
$ebea4bf8cec8a13f$exports = JSON.parse("{\"dismiss\":\"Odbaci\"}");
|
|
805
807
|
|
|
806
808
|
|
|
807
|
-
var $
|
|
808
|
-
$
|
|
809
|
+
var $c5513e010cc556f7$exports = {};
|
|
810
|
+
$c5513e010cc556f7$exports = JSON.parse("{\"dismiss\":\"Elutasítás\"}");
|
|
809
811
|
|
|
810
812
|
|
|
811
|
-
var $
|
|
812
|
-
$
|
|
813
|
+
var $f18100a5eadc83cd$exports = {};
|
|
814
|
+
$f18100a5eadc83cd$exports = JSON.parse("{\"dismiss\":\"Ignora\"}");
|
|
813
815
|
|
|
814
816
|
|
|
815
|
-
var $
|
|
816
|
-
$
|
|
817
|
+
var $0bd79d95425d9881$exports = {};
|
|
818
|
+
$0bd79d95425d9881$exports = JSON.parse("{\"dismiss\":\"閉じる\"}");
|
|
817
819
|
|
|
818
820
|
|
|
819
|
-
var $
|
|
820
|
-
$
|
|
821
|
+
var $800f1181ddced497$exports = {};
|
|
822
|
+
$800f1181ddced497$exports = JSON.parse("{\"dismiss\":\"무시\"}");
|
|
821
823
|
|
|
822
824
|
|
|
823
|
-
var $
|
|
824
|
-
$
|
|
825
|
+
var $fed9c76a283c706a$exports = {};
|
|
826
|
+
$fed9c76a283c706a$exports = JSON.parse("{\"dismiss\":\"Atmesti\"}");
|
|
825
827
|
|
|
826
828
|
|
|
827
|
-
var $
|
|
828
|
-
$
|
|
829
|
+
var $7f97210b555a8b40$exports = {};
|
|
830
|
+
$7f97210b555a8b40$exports = JSON.parse("{\"dismiss\":\"Nerādīt\"}");
|
|
829
831
|
|
|
830
832
|
|
|
831
|
-
var $
|
|
832
|
-
$
|
|
833
|
+
var $07ec6c245088f2ec$exports = {};
|
|
834
|
+
$07ec6c245088f2ec$exports = JSON.parse("{\"dismiss\":\"Lukk\"}");
|
|
833
835
|
|
|
834
836
|
|
|
835
|
-
var $
|
|
836
|
-
$
|
|
837
|
+
var $e6b11f13579906e7$exports = {};
|
|
838
|
+
$e6b11f13579906e7$exports = JSON.parse("{\"dismiss\":\"Negeren\"}");
|
|
837
839
|
|
|
838
840
|
|
|
839
|
-
var $
|
|
840
|
-
$
|
|
841
|
+
var $383af37754464bc6$exports = {};
|
|
842
|
+
$383af37754464bc6$exports = JSON.parse("{\"dismiss\":\"Zignoruj\"}");
|
|
841
843
|
|
|
842
844
|
|
|
843
|
-
var $
|
|
844
|
-
$
|
|
845
|
+
var $64b26eacf9411054$exports = {};
|
|
846
|
+
$64b26eacf9411054$exports = JSON.parse("{\"dismiss\":\"Descartar\"}");
|
|
845
847
|
|
|
846
848
|
|
|
847
|
-
var $
|
|
848
|
-
$
|
|
849
|
+
var $4d1c371a17c4adab$exports = {};
|
|
850
|
+
$4d1c371a17c4adab$exports = JSON.parse("{\"dismiss\":\"Dispensar\"}");
|
|
849
851
|
|
|
850
852
|
|
|
851
|
-
var $
|
|
852
|
-
$
|
|
853
|
+
var $4863adeed5a723a4$exports = {};
|
|
854
|
+
$4863adeed5a723a4$exports = JSON.parse("{\"dismiss\":\"Revocare\"}");
|
|
853
855
|
|
|
854
856
|
|
|
855
|
-
var $
|
|
856
|
-
$
|
|
857
|
+
var $5d6876e7f91ee10a$exports = {};
|
|
858
|
+
$5d6876e7f91ee10a$exports = JSON.parse("{\"dismiss\":\"Пропустить\"}");
|
|
857
859
|
|
|
858
860
|
|
|
859
|
-
var $
|
|
860
|
-
$
|
|
861
|
+
var $2a5f27f088cb561b$exports = {};
|
|
862
|
+
$2a5f27f088cb561b$exports = JSON.parse("{\"dismiss\":\"Zrušiť\"}");
|
|
861
863
|
|
|
862
864
|
|
|
863
|
-
var $
|
|
864
|
-
$
|
|
865
|
+
var $98bd94c1a0918168$exports = {};
|
|
866
|
+
$98bd94c1a0918168$exports = JSON.parse("{\"dismiss\":\"Opusti\"}");
|
|
865
867
|
|
|
866
868
|
|
|
867
|
-
var $
|
|
868
|
-
$
|
|
869
|
+
var $a332aaab81c34c08$exports = {};
|
|
870
|
+
$a332aaab81c34c08$exports = JSON.parse("{\"dismiss\":\"Odbaci\"}");
|
|
869
871
|
|
|
870
872
|
|
|
871
|
-
var $
|
|
872
|
-
$
|
|
873
|
+
var $d1e8247c80bb74ff$exports = {};
|
|
874
|
+
$d1e8247c80bb74ff$exports = JSON.parse("{\"dismiss\":\"Avvisa\"}");
|
|
873
875
|
|
|
874
876
|
|
|
875
|
-
var $
|
|
876
|
-
$
|
|
877
|
+
var $21b2557498ae9c36$exports = {};
|
|
878
|
+
$21b2557498ae9c36$exports = JSON.parse("{\"dismiss\":\"Kapat\"}");
|
|
877
879
|
|
|
878
880
|
|
|
879
|
-
var $
|
|
880
|
-
$
|
|
881
|
+
var $03c01991b0877864$exports = {};
|
|
882
|
+
$03c01991b0877864$exports = JSON.parse("{\"dismiss\":\"Скасувати\"}");
|
|
881
883
|
|
|
882
884
|
|
|
883
|
-
var $
|
|
884
|
-
$
|
|
885
|
+
var $c39c257709fbcd7a$exports = {};
|
|
886
|
+
$c39c257709fbcd7a$exports = JSON.parse("{\"dismiss\":\"取消\"}");
|
|
885
887
|
|
|
886
888
|
|
|
887
|
-
var $
|
|
888
|
-
$
|
|
889
|
+
var $a1491919fffafb77$exports = {};
|
|
890
|
+
$a1491919fffafb77$exports = JSON.parse("{\"dismiss\":\"關閉\"}");
|
|
889
891
|
|
|
890
892
|
|
|
891
|
-
$
|
|
892
|
-
"ar-AE": $
|
|
893
|
-
"bg-BG": $
|
|
894
|
-
"cs-CZ": $
|
|
895
|
-
"da-DK": $
|
|
896
|
-
"de-DE": $
|
|
897
|
-
"el-GR": $
|
|
898
|
-
"en-US": $
|
|
899
|
-
"es-ES": $
|
|
900
|
-
"et-EE": $
|
|
901
|
-
"fi-FI": $
|
|
902
|
-
"fr-FR": $
|
|
903
|
-
"he-IL": $
|
|
904
|
-
"hr-HR": $
|
|
905
|
-
"hu-HU": $
|
|
906
|
-
"it-IT": $
|
|
907
|
-
"ja-JP": $
|
|
908
|
-
"ko-KR": $
|
|
909
|
-
"lt-LT": $
|
|
910
|
-
"lv-LV": $
|
|
911
|
-
"nb-NO": $
|
|
912
|
-
"nl-NL": $
|
|
913
|
-
"pl-PL": $
|
|
914
|
-
"pt-BR": $
|
|
915
|
-
"pt-PT": $
|
|
916
|
-
"ro-RO": $
|
|
917
|
-
"ru-RU": $
|
|
918
|
-
"sk-SK": $
|
|
919
|
-
"sl-SI": $
|
|
920
|
-
"sr-SP": $
|
|
921
|
-
"sv-SE": $
|
|
922
|
-
"tr-TR": $
|
|
923
|
-
"uk-UA": $
|
|
924
|
-
"zh-CN": $
|
|
925
|
-
"zh-TW": $
|
|
893
|
+
$5870ac8a269e6de3$exports = {
|
|
894
|
+
"ar-AE": $a5a59de44c333ba6$exports,
|
|
895
|
+
"bg-BG": $50feebb6bb808224$exports,
|
|
896
|
+
"cs-CZ": $e83177e29b5408cb$exports,
|
|
897
|
+
"da-DK": $e2c182bad6ce2263$exports,
|
|
898
|
+
"de-DE": $c097e483b797e55c$exports,
|
|
899
|
+
"el-GR": $0d18df414eea1247$exports,
|
|
900
|
+
"en-US": $6198858cde361b70$exports,
|
|
901
|
+
"es-ES": $d609ce5050619dd3$exports,
|
|
902
|
+
"et-EE": $56e720a6a6e6a6d1$exports,
|
|
903
|
+
"fi-FI": $6fd05be78eeed1b2$exports,
|
|
904
|
+
"fr-FR": $1e8ea0f63ec3ba05$exports,
|
|
905
|
+
"he-IL": $ef8d670a1aff22a8$exports,
|
|
906
|
+
"hr-HR": $ebea4bf8cec8a13f$exports,
|
|
907
|
+
"hu-HU": $c5513e010cc556f7$exports,
|
|
908
|
+
"it-IT": $f18100a5eadc83cd$exports,
|
|
909
|
+
"ja-JP": $0bd79d95425d9881$exports,
|
|
910
|
+
"ko-KR": $800f1181ddced497$exports,
|
|
911
|
+
"lt-LT": $fed9c76a283c706a$exports,
|
|
912
|
+
"lv-LV": $7f97210b555a8b40$exports,
|
|
913
|
+
"nb-NO": $07ec6c245088f2ec$exports,
|
|
914
|
+
"nl-NL": $e6b11f13579906e7$exports,
|
|
915
|
+
"pl-PL": $383af37754464bc6$exports,
|
|
916
|
+
"pt-BR": $64b26eacf9411054$exports,
|
|
917
|
+
"pt-PT": $4d1c371a17c4adab$exports,
|
|
918
|
+
"ro-RO": $4863adeed5a723a4$exports,
|
|
919
|
+
"ru-RU": $5d6876e7f91ee10a$exports,
|
|
920
|
+
"sk-SK": $2a5f27f088cb561b$exports,
|
|
921
|
+
"sl-SI": $98bd94c1a0918168$exports,
|
|
922
|
+
"sr-SP": $a332aaab81c34c08$exports,
|
|
923
|
+
"sv-SE": $d1e8247c80bb74ff$exports,
|
|
924
|
+
"tr-TR": $21b2557498ae9c36$exports,
|
|
925
|
+
"uk-UA": $03c01991b0877864$exports,
|
|
926
|
+
"zh-CN": $c39c257709fbcd7a$exports,
|
|
927
|
+
"zh-TW": $a1491919fffafb77$exports
|
|
926
928
|
};
|
|
927
929
|
|
|
928
930
|
|
|
929
931
|
|
|
930
932
|
|
|
931
933
|
|
|
932
|
-
function $
|
|
934
|
+
function $e574ce2210a97860$export$2317d149ed6f78c4(props) {
|
|
933
935
|
let { onDismiss: onDismiss } = props;
|
|
934
|
-
let formatMessage = $
|
|
936
|
+
let formatMessage = $j5iPF$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($5870ac8a269e6de3$exports)));
|
|
935
937
|
let onClick = ()=>{
|
|
936
938
|
if (onDismiss) onDismiss();
|
|
937
939
|
};
|
|
938
|
-
return(/*#__PURE__*/ $
|
|
940
|
+
return(/*#__PURE__*/ $j5iPF$react.createElement($j5iPF$VisuallyHidden, null, /*#__PURE__*/ $j5iPF$react.createElement("button", {
|
|
939
941
|
tabIndex: -1,
|
|
940
942
|
"aria-label": formatMessage('dismiss'),
|
|
941
943
|
onClick: onClick
|
|
@@ -943,9 +945,9 @@ function $c675415561d15622$export$2317d149ed6f78c4(props) {
|
|
|
943
945
|
}
|
|
944
946
|
|
|
945
947
|
|
|
946
|
-
var $
|
|
948
|
+
var $3b8a0076b0513838$exports = {};
|
|
947
949
|
|
|
948
|
-
$parcel$export($
|
|
950
|
+
$parcel$export($3b8a0076b0513838$exports, "ariaHideOutside", () => $3b8a0076b0513838$export$1c3ebcada18427bf);
|
|
949
951
|
/*
|
|
950
952
|
* Copyright 2020 Adobe. All rights reserved.
|
|
951
953
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -958,8 +960,8 @@ $parcel$export($bf241ecdd7b50fca$exports, "ariaHideOutside", () => $bf241ecdd7b5
|
|
|
958
960
|
* governing permissions and limitations under the License.
|
|
959
961
|
*/ // Keeps a ref count of all hidden elements. Added to when hiding an element, and
|
|
960
962
|
// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.
|
|
961
|
-
let $
|
|
962
|
-
function $
|
|
963
|
+
let $3b8a0076b0513838$var$refCountMap = new WeakMap();
|
|
964
|
+
function $3b8a0076b0513838$export$1c3ebcada18427bf(targets, root = document.body) {
|
|
963
965
|
let visibleNodes = new Set(targets);
|
|
964
966
|
let hiddenNodes = new Set();
|
|
965
967
|
let walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {
|
|
@@ -979,13 +981,14 @@ function $bf241ecdd7b50fca$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
979
981
|
}
|
|
980
982
|
});
|
|
981
983
|
let hide = (node)=>{
|
|
982
|
-
|
|
984
|
+
var ref;
|
|
985
|
+
let refCount = (ref = $3b8a0076b0513838$var$refCountMap.get(node)) !== null && ref !== void 0 ? ref : 0;
|
|
983
986
|
// If already aria-hidden, and the ref count is zero, then this element
|
|
984
987
|
// was already hidden and there's nothing for us to do.
|
|
985
988
|
if (node.getAttribute('aria-hidden') === 'true' && refCount === 0) return;
|
|
986
989
|
if (refCount === 0) node.setAttribute('aria-hidden', 'true');
|
|
987
990
|
hiddenNodes.add(node);
|
|
988
|
-
$
|
|
991
|
+
$3b8a0076b0513838$var$refCountMap.set(node, refCount + 1);
|
|
989
992
|
};
|
|
990
993
|
let node1 = walker.nextNode();
|
|
991
994
|
while(node1 != null){
|
|
@@ -1014,11 +1017,11 @@ function $bf241ecdd7b50fca$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
1014
1017
|
return ()=>{
|
|
1015
1018
|
observer.disconnect();
|
|
1016
1019
|
for (let node of hiddenNodes){
|
|
1017
|
-
let count = $
|
|
1020
|
+
let count = $3b8a0076b0513838$var$refCountMap.get(node);
|
|
1018
1021
|
if (count === 1) {
|
|
1019
1022
|
node.removeAttribute('aria-hidden');
|
|
1020
|
-
$
|
|
1021
|
-
} else $
|
|
1023
|
+
$3b8a0076b0513838$var$refCountMap.delete(node);
|
|
1024
|
+
} else $3b8a0076b0513838$var$refCountMap.set(node, count - 1);
|
|
1022
1025
|
}
|
|
1023
1026
|
};
|
|
1024
1027
|
}
|
|
@@ -1026,5 +1029,5 @@ function $bf241ecdd7b50fca$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
1026
1029
|
|
|
1027
1030
|
|
|
1028
1031
|
|
|
1029
|
-
export {$
|
|
1032
|
+
export {$406a41f4517fdb30$export$d39e1813b3bdd0e1 as useOverlayPosition, $9f79c4b26f87d454$export$ea8f71083e90600f as useOverlay, $d5e25f6b1b375e64$export$f9d5c8beee7d008d as useOverlayTrigger, $83f8618cd3e10645$export$ee0f7cc6afcd1c18 as usePreventScroll, $7b14dc4b86354e5c$export$178405afcd8c5eb as ModalProvider, $7b14dc4b86354e5c$export$d9aaed4c3ece1bc0 as useModalProvider, $7b14dc4b86354e5c$export$bf688221f59024e5 as OverlayProvider, $7b14dc4b86354e5c$export$b47c3594eab58386 as OverlayContainer, $7b14dc4b86354e5c$export$33ffd74ebf07f060 as useModal, $e574ce2210a97860$export$2317d149ed6f78c4 as DismissButton, $3b8a0076b0513838$export$1c3ebcada18427bf as ariaHideOutside};
|
|
1030
1033
|
//# sourceMappingURL=module.js.map
|