@react-aria/overlays 3.7.4 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +298 -292
- package/dist/main.js.map +1 -1
- package/dist/module.js +292 -286
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -9
- package/src/DismissButton.tsx +8 -3
- package/src/usePreventScroll.ts +3 -1
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 $k7QOs$react, {useState as $k7QOs$useState, useCallback as $k7QOs$useCallback, useRef as $k7QOs$useRef, useEffect as $k7QOs$useEffect, useContext as $k7QOs$useContext, useMemo as $k7QOs$useMemo} from "react";
|
|
2
|
+
import {useLayoutEffect as $k7QOs$useLayoutEffect, useId as $k7QOs$useId, isIOS as $k7QOs$isIOS, chain as $k7QOs$chain, getScrollParent as $k7QOs$getScrollParent, useLabels as $k7QOs$useLabels} from "@react-aria/utils";
|
|
3
|
+
import {useLocale as $k7QOs$useLocale, useMessageFormatter as $k7QOs$useMessageFormatter} from "@react-aria/i18n";
|
|
4
|
+
import $k7QOs$domhelpersstyle from "dom-helpers/style";
|
|
5
|
+
import $k7QOs$domhelpersqueryoffset from "dom-helpers/query/offset";
|
|
6
|
+
import $k7QOs$domhelpersqueryposition from "dom-helpers/query/position";
|
|
7
|
+
import $k7QOs$domhelpersqueryscrollLeft from "dom-helpers/query/scrollLeft";
|
|
8
|
+
import $k7QOs$domhelpersqueryscrollTop from "dom-helpers/query/scrollTop";
|
|
9
|
+
import $k7QOs$domhelpersownerDocument from "dom-helpers/ownerDocument";
|
|
10
|
+
import {useInteractOutside as $k7QOs$useInteractOutside, useFocusWithin as $k7QOs$useFocusWithin} from "@react-aria/interactions";
|
|
11
|
+
import $k7QOs$reactdom from "react-dom";
|
|
12
|
+
import {VisuallyHidden as $k7QOs$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 $2a41e45df1593e64$exports = {};
|
|
21
21
|
|
|
22
|
-
$parcel$export($
|
|
22
|
+
$parcel$export($2a41e45df1593e64$exports, "useOverlayPosition", () => $2a41e45df1593e64$export$d39e1813b3bdd0e1);
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
const $
|
|
29
|
+
const $edcf132a9284368a$var$AXIS = {
|
|
30
30
|
top: 'top',
|
|
31
31
|
bottom: 'top',
|
|
32
32
|
left: 'left',
|
|
33
33
|
right: 'left'
|
|
34
34
|
};
|
|
35
|
-
const $
|
|
35
|
+
const $edcf132a9284368a$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 $edcf132a9284368a$var$CROSS_AXIS = {
|
|
42
42
|
top: 'left',
|
|
43
43
|
left: 'top'
|
|
44
44
|
};
|
|
45
|
-
const $
|
|
45
|
+
const $edcf132a9284368a$var$AXIS_SIZE = {
|
|
46
46
|
top: 'height',
|
|
47
47
|
left: 'width'
|
|
48
48
|
};
|
|
49
|
-
const $
|
|
49
|
+
const $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {
|
|
50
50
|
};
|
|
51
51
|
// @ts-ignore
|
|
52
|
-
let $
|
|
53
|
-
function $
|
|
52
|
+
let $edcf132a9284368a$var$visualViewport = typeof window !== 'undefined' && window.visualViewport;
|
|
53
|
+
function $edcf132a9284368a$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 = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.width) !== null && ref !== void 0 ? ref : document.documentElement.clientWidth;
|
|
60
|
+
var ref1;
|
|
61
|
+
height = (ref1 = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.height) !== null && ref1 !== void 0 ? ref1 : document.documentElement.clientHeight;
|
|
62
|
+
scroll.top = $k7QOs$domhelpersqueryscrollTop($k7QOs$domhelpersownerDocument(containerNode).documentElement) || $k7QOs$domhelpersqueryscrollTop(containerNode);
|
|
63
|
+
scroll.left = $k7QOs$domhelpersqueryscrollLeft($k7QOs$domhelpersownerDocument(containerNode).documentElement) || $k7QOs$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 } = $k7QOs$domhelpersqueryoffset(containerNode));
|
|
66
|
+
scroll.top = $k7QOs$domhelpersqueryscrollTop(containerNode);
|
|
67
|
+
scroll.left = $k7QOs$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 $edcf132a9284368a$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 $edcf132a9284368a$var$getDelta(axis, offset, size, containerDimensions, padding) {
|
|
84
86
|
let containerScroll = containerDimensions.scroll[axis];
|
|
85
|
-
let containerHeight = containerDimensions[$
|
|
87
|
+
let containerHeight = containerDimensions[$edcf132a9284368a$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 $edcf132a9284368a$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 $edcf132a9284368a$var$parsePlacement(input) {
|
|
104
|
+
if ($edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input]) return $edcf132a9284368a$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 = $edcf132a9284368a$var$AXIS[placement] || 'right';
|
|
107
|
+
let crossAxis = $edcf132a9284368a$var$CROSS_AXIS[axis];
|
|
108
|
+
if (!$edcf132a9284368a$var$AXIS[crossPlacement]) crossPlacement = 'center';
|
|
109
|
+
let size = $edcf132a9284368a$var$AXIS_SIZE[axis];
|
|
110
|
+
let crossSize = $edcf132a9284368a$var$AXIS_SIZE[crossAxis];
|
|
111
|
+
$edcf132a9284368a$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 $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input];
|
|
118
120
|
}
|
|
119
|
-
function $
|
|
121
|
+
function $edcf132a9284368a$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[$edcf132a9284368a$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 $edcf132a9284368a$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 $edcf132a9284368a$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[$edcf132a9284368a$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[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
|
|
162
164
|
}
|
|
163
|
-
function $
|
|
164
|
-
let placementInfo = $
|
|
165
|
+
function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight) {
|
|
166
|
+
let placementInfo = $edcf132a9284368a$var$parsePlacement(placementInput);
|
|
165
167
|
let { size: size , crossAxis: crossAxis , crossSize: crossSize , placement: placement , crossPlacement: crossPlacement } = placementInfo;
|
|
166
|
-
let position = $
|
|
168
|
+
let position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned);
|
|
167
169
|
let normalizedOffset = offset;
|
|
168
|
-
let space = $
|
|
170
|
+
let space = $edcf132a9284368a$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 = $edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[placement]} ${crossPlacement}`);
|
|
174
|
+
let flippedPosition = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned);
|
|
175
|
+
let flippedSpace = $edcf132a9284368a$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 = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, padding);
|
|
182
184
|
position[crossAxis] += delta;
|
|
183
|
-
let maxHeight = $
|
|
185
|
+
let maxHeight = $edcf132a9284368a$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 = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned);
|
|
189
|
+
delta = $edcf132a9284368a$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 $edcf132a9284368a$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 ? $k7QOs$domhelpersqueryoffset(targetNode) : $k7QOs$domhelpersqueryposition(targetNode, container);
|
|
207
209
|
if (!isBodyContainer) {
|
|
208
|
-
childOffset.top += parseInt($
|
|
209
|
-
childOffset.left += parseInt($
|
|
210
|
+
childOffset.top += parseInt($k7QOs$domhelpersstyle(targetNode, 'marginTop'), 10) || 0;
|
|
211
|
+
childOffset.left += parseInt($k7QOs$domhelpersstyle(targetNode, 'marginLeft'), 10) || 0;
|
|
210
212
|
}
|
|
211
|
-
let overlaySize = $
|
|
212
|
-
let margins = $
|
|
213
|
+
let overlaySize = $k7QOs$domhelpersqueryoffset(overlayNode);
|
|
214
|
+
let margins = $edcf132a9284368a$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 = $edcf132a9284368a$var$getScroll(scrollNode);
|
|
218
|
+
let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement);
|
|
219
|
+
let containerOffsetWithBoundary = boundaryElement.tagName === 'BODY' ? $k7QOs$domhelpersqueryoffset(container) : $k7QOs$domhelpersqueryposition(container, boundaryElement);
|
|
220
|
+
return $edcf132a9284368a$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 $dd149f63282afbbf$export$f6211563215e3b37 = new WeakMap();
|
|
227
|
+
function $dd149f63282afbbf$export$18fc8428861184da(opts) {
|
|
226
228
|
let { triggerRef: triggerRef , isOpen: isOpen , onClose: onClose } = opts;
|
|
227
|
-
$
|
|
229
|
+
$k7QOs$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 || $dd149f63282afbbf$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 $2a41e45df1593e64$var$visualViewport = typeof window !== 'undefined' && window.visualViewport;
|
|
255
|
+
function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
256
|
+
let { direction: direction } = $k7QOs$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] = $k7QOs$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 = $k7QOs$useCallback(()=>{
|
|
280
282
|
if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !scrollRef.current || !boundaryElement) return;
|
|
281
|
-
setPosition($
|
|
282
|
-
placement: $
|
|
283
|
+
setPosition($edcf132a9284368a$export$b3ceb0cbf1056d98({
|
|
284
|
+
placement: $2a41e45df1593e64$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
|
+
$k7QOs$useLayoutEffect(updatePosition, deps);
|
|
296
298
|
// Update position on window resize
|
|
297
|
-
$
|
|
299
|
+
$2a41e45df1593e64$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 = $k7QOs$useRef(false);
|
|
303
|
+
$k7QOs$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
|
+
$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.addEventListener('resize', onResize);
|
|
312
314
|
return ()=>{
|
|
313
|
-
$
|
|
315
|
+
$2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.removeEventListener('resize', onResize);
|
|
314
316
|
};
|
|
315
317
|
}, [
|
|
316
318
|
updatePosition
|
|
317
319
|
]);
|
|
318
|
-
let close = $
|
|
320
|
+
let close = $k7QOs$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
|
+
$dd149f63282afbbf$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 $2a41e45df1593e64$var$useResize(onResize) {
|
|
353
|
+
$k7QOs$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 $2a41e45df1593e64$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 $a11501f3d1d39e6c$exports = {};
|
|
367
369
|
|
|
368
|
-
$parcel$export($
|
|
370
|
+
$parcel$export($a11501f3d1d39e6c$exports, "useOverlay", () => $a11501f3d1d39e6c$export$ea8f71083e90600f);
|
|
369
371
|
|
|
370
372
|
|
|
371
|
-
const $
|
|
372
|
-
function $
|
|
373
|
+
const $a11501f3d1d39e6c$var$visibleOverlays = [];
|
|
374
|
+
function $a11501f3d1d39e6c$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
|
+
$k7QOs$useEffect(()=>{
|
|
378
|
+
if (isOpen) $a11501f3d1d39e6c$var$visibleOverlays.push(ref);
|
|
377
379
|
return ()=>{
|
|
378
|
-
let index = $
|
|
379
|
-
if (index >= 0) $
|
|
380
|
+
let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);
|
|
381
|
+
if (index >= 0) $a11501f3d1d39e6c$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 ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$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 ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$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 ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$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
|
+
$k7QOs$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 } = $k7QOs$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 $628037886ba31236$exports = {};
|
|
442
444
|
|
|
443
|
-
$parcel$export($
|
|
445
|
+
$parcel$export($628037886ba31236$exports, "useOverlayTrigger", () => $628037886ba31236$export$f9d5c8beee7d008d);
|
|
444
446
|
|
|
445
447
|
|
|
446
448
|
|
|
447
|
-
function $
|
|
449
|
+
function $628037886ba31236$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
|
+
$k7QOs$useEffect(()=>{
|
|
455
|
+
if (ref && ref.current) $dd149f63282afbbf$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 = $k7QOs$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 $49c51c25361d4cd2$exports = {};
|
|
477
479
|
|
|
478
|
-
$parcel$export($
|
|
480
|
+
$parcel$export($49c51c25361d4cd2$exports, "usePreventScroll", () => $49c51c25361d4cd2$export$ee0f7cc6afcd1c18);
|
|
479
481
|
|
|
480
482
|
// @ts-ignore
|
|
481
|
-
const $
|
|
483
|
+
const $49c51c25361d4cd2$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 $49c51c25361d4cd2$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 $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {
|
|
495
497
|
}) {
|
|
496
498
|
let { isDisabled: isDisabled } = options;
|
|
497
|
-
$
|
|
499
|
+
$k7QOs$useLayoutEffect(()=>{
|
|
498
500
|
if (isDisabled) return;
|
|
499
|
-
if ($
|
|
500
|
-
else return $
|
|
501
|
+
if ($k7QOs$isIOS()) return $49c51c25361d4cd2$var$preventScrollMobileSafari();
|
|
502
|
+
else return $49c51c25361d4cd2$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 $49c51c25361d4cd2$var$preventScrollStandard() {
|
|
510
|
+
return $k7QOs$chain($49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$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 $49c51c25361d4cd2$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 = $k7QOs$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,8 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
560
562
|
};
|
|
561
563
|
let onTouchEnd = (e)=>{
|
|
562
564
|
let target = e.target;
|
|
563
|
-
if
|
|
565
|
+
// Apply this change if we're not already focused on the target element
|
|
566
|
+
if (target instanceof HTMLInputElement && !$49c51c25361d4cd2$var$nonTextInputTypes.has(target.type) && target !== document.activeElement) {
|
|
564
567
|
e.preventDefault();
|
|
565
568
|
// Apply a transform to trick Safari into thinking the input is at the top of the page
|
|
566
569
|
// so it doesn't try to scroll it into view. When tapping on an input, this needs to
|
|
@@ -574,7 +577,7 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
574
577
|
};
|
|
575
578
|
let onFocus = (e)=>{
|
|
576
579
|
let target = e.target;
|
|
577
|
-
if (target instanceof HTMLInputElement && !$
|
|
580
|
+
if (target instanceof HTMLInputElement && !$49c51c25361d4cd2$var$nonTextInputTypes.has(target.type)) {
|
|
578
581
|
// Transform also needs to be applied in the focus event in cases where focus moves
|
|
579
582
|
// other than tapping on an input directly, e.g. the next/previous buttons in the
|
|
580
583
|
// software keyboard. In these cases, it seems applying the transform in the focus event
|
|
@@ -584,15 +587,15 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
584
587
|
target.style.transform = '';
|
|
585
588
|
// This will have prevented the browser from scrolling the focused element into view,
|
|
586
589
|
// so we need to do this ourselves in a way that doesn't cause the whole page to scroll.
|
|
587
|
-
if ($
|
|
588
|
-
if ($
|
|
590
|
+
if ($49c51c25361d4cd2$var$visualViewport) {
|
|
591
|
+
if ($49c51c25361d4cd2$var$visualViewport.height < window.innerHeight) // If the keyboard is already visible, do this after one additional frame
|
|
589
592
|
// to wait for the transform to be removed.
|
|
590
593
|
requestAnimationFrame(()=>{
|
|
591
|
-
$
|
|
594
|
+
$49c51c25361d4cd2$var$scrollIntoView(target);
|
|
592
595
|
});
|
|
593
596
|
else // Otherwise, wait for the visual viewport to resize before scrolling so we can
|
|
594
597
|
// measure the correct position to scroll to.
|
|
595
|
-
$
|
|
598
|
+
$49c51c25361d4cd2$var$visualViewport.addEventListener('resize', ()=>$49c51c25361d4cd2$var$scrollIntoView(target)
|
|
596
599
|
, {
|
|
597
600
|
once: true
|
|
598
601
|
});
|
|
@@ -610,19 +613,19 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
610
613
|
// enable us to scroll the window to the top, which is required for the rest of this to work.
|
|
611
614
|
let scrollX = window.pageXOffset;
|
|
612
615
|
let scrollY = window.pageYOffset;
|
|
613
|
-
let restoreStyles = $
|
|
616
|
+
let restoreStyles = $k7QOs$chain($49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'), $49c51c25361d4cd2$var$setStyle(document.body, 'marginTop', `-${scrollY}px`));
|
|
614
617
|
// Scroll to the top. The negative margin on the body will make this appear the same.
|
|
615
618
|
window.scrollTo(0, 0);
|
|
616
|
-
let removeEvents = $
|
|
619
|
+
let removeEvents = $k7QOs$chain($49c51c25361d4cd2$var$addEvent(document, 'touchstart', onTouchStart, {
|
|
617
620
|
passive: false,
|
|
618
621
|
capture: true
|
|
619
|
-
}), $
|
|
622
|
+
}), $49c51c25361d4cd2$var$addEvent(document, 'touchmove', onTouchMove, {
|
|
620
623
|
passive: false,
|
|
621
624
|
capture: true
|
|
622
|
-
}), $
|
|
625
|
+
}), $49c51c25361d4cd2$var$addEvent(document, 'touchend', onTouchEnd, {
|
|
623
626
|
passive: false,
|
|
624
627
|
capture: true
|
|
625
|
-
}), $
|
|
628
|
+
}), $49c51c25361d4cd2$var$addEvent(document, 'focus', onFocus, true), $49c51c25361d4cd2$var$addEvent(window, 'scroll', onWindowScroll));
|
|
626
629
|
return ()=>{
|
|
627
630
|
// Restore styles and scroll the page back to where it was.
|
|
628
631
|
restoreStyles();
|
|
@@ -631,7 +634,7 @@ function $48168a03440bff21$var$preventScrollMobileSafari() {
|
|
|
631
634
|
};
|
|
632
635
|
}
|
|
633
636
|
// Sets a CSS property on an element, and returns a function to revert it to the previous value.
|
|
634
|
-
function $
|
|
637
|
+
function $49c51c25361d4cd2$var$setStyle(element, style, value) {
|
|
635
638
|
let cur = element.style[style];
|
|
636
639
|
element.style[style] = value;
|
|
637
640
|
return ()=>{
|
|
@@ -639,15 +642,15 @@ function $48168a03440bff21$var$setStyle(element, style, value) {
|
|
|
639
642
|
};
|
|
640
643
|
}
|
|
641
644
|
// Adds an event listener to an element, and returns a function to remove it.
|
|
642
|
-
function $
|
|
645
|
+
function $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {
|
|
643
646
|
target.addEventListener(event, handler, options);
|
|
644
647
|
return ()=>{
|
|
645
648
|
target.removeEventListener(event, handler, options);
|
|
646
649
|
};
|
|
647
650
|
}
|
|
648
|
-
function $
|
|
651
|
+
function $49c51c25361d4cd2$var$scrollIntoView(target) {
|
|
649
652
|
// Find the parent scrollable element and adjust the scroll position if the target is not already in view.
|
|
650
|
-
let scrollable = $
|
|
653
|
+
let scrollable = $k7QOs$getScrollParent(target);
|
|
651
654
|
if (scrollable !== document.documentElement && scrollable !== document.body) {
|
|
652
655
|
let scrollableTop = scrollable.getBoundingClientRect().top;
|
|
653
656
|
let targetTop = target.getBoundingClientRect().top;
|
|
@@ -656,21 +659,21 @@ function $48168a03440bff21$var$scrollIntoView(target) {
|
|
|
656
659
|
}
|
|
657
660
|
|
|
658
661
|
|
|
659
|
-
var $
|
|
662
|
+
var $f57aed4a881a3485$exports = {};
|
|
660
663
|
|
|
661
|
-
$parcel$export($
|
|
662
|
-
$parcel$export($
|
|
663
|
-
$parcel$export($
|
|
664
|
-
$parcel$export($
|
|
665
|
-
$parcel$export($
|
|
664
|
+
$parcel$export($f57aed4a881a3485$exports, "ModalProvider", () => $f57aed4a881a3485$export$178405afcd8c5eb);
|
|
665
|
+
$parcel$export($f57aed4a881a3485$exports, "useModalProvider", () => $f57aed4a881a3485$export$d9aaed4c3ece1bc0);
|
|
666
|
+
$parcel$export($f57aed4a881a3485$exports, "OverlayProvider", () => $f57aed4a881a3485$export$bf688221f59024e5);
|
|
667
|
+
$parcel$export($f57aed4a881a3485$exports, "OverlayContainer", () => $f57aed4a881a3485$export$b47c3594eab58386);
|
|
668
|
+
$parcel$export($f57aed4a881a3485$exports, "useModal", () => $f57aed4a881a3485$export$33ffd74ebf07f060);
|
|
666
669
|
|
|
667
670
|
|
|
668
|
-
const $
|
|
669
|
-
function $
|
|
671
|
+
const $f57aed4a881a3485$var$Context = /*#__PURE__*/ $k7QOs$react.createContext(null);
|
|
672
|
+
function $f57aed4a881a3485$export$178405afcd8c5eb(props) {
|
|
670
673
|
let { children: children } = props;
|
|
671
|
-
let parent = $
|
|
672
|
-
let [modalCount, setModalCount] = $
|
|
673
|
-
let context = $
|
|
674
|
+
let parent = $k7QOs$useContext($f57aed4a881a3485$var$Context);
|
|
675
|
+
let [modalCount, setModalCount] = $k7QOs$useState(0);
|
|
676
|
+
let context = $k7QOs$useMemo(()=>({
|
|
674
677
|
parent: parent,
|
|
675
678
|
modalCount: modalCount,
|
|
676
679
|
addModal () {
|
|
@@ -688,12 +691,12 @@ function $698c70f6640041fb$export$178405afcd8c5eb(props) {
|
|
|
688
691
|
parent,
|
|
689
692
|
modalCount
|
|
690
693
|
]);
|
|
691
|
-
return(/*#__PURE__*/ $
|
|
694
|
+
return(/*#__PURE__*/ $k7QOs$react.createElement($f57aed4a881a3485$var$Context.Provider, {
|
|
692
695
|
value: context
|
|
693
696
|
}, children));
|
|
694
697
|
}
|
|
695
|
-
function $
|
|
696
|
-
let context = $
|
|
698
|
+
function $f57aed4a881a3485$export$d9aaed4c3ece1bc0() {
|
|
699
|
+
let context = $k7QOs$useContext($f57aed4a881a3485$var$Context);
|
|
697
700
|
return {
|
|
698
701
|
modalProviderProps: {
|
|
699
702
|
'aria-hidden': context && context.modalCount > 0 ? true : null
|
|
@@ -702,33 +705,33 @@ function $698c70f6640041fb$export$d9aaed4c3ece1bc0() {
|
|
|
702
705
|
}
|
|
703
706
|
/**
|
|
704
707
|
* Creates a root node that will be aria-hidden if there are other modals open.
|
|
705
|
-
*/ function $
|
|
706
|
-
let { modalProviderProps: modalProviderProps } = $
|
|
707
|
-
return(/*#__PURE__*/ $
|
|
708
|
+
*/ function $f57aed4a881a3485$var$OverlayContainerDOM(props) {
|
|
709
|
+
let { modalProviderProps: modalProviderProps } = $f57aed4a881a3485$export$d9aaed4c3ece1bc0();
|
|
710
|
+
return(/*#__PURE__*/ $k7QOs$react.createElement("div", {
|
|
708
711
|
"data-overlay-container": true,
|
|
709
712
|
...props,
|
|
710
713
|
...modalProviderProps
|
|
711
714
|
}));
|
|
712
715
|
}
|
|
713
|
-
function $
|
|
714
|
-
return(/*#__PURE__*/ $
|
|
716
|
+
function $f57aed4a881a3485$export$bf688221f59024e5(props) {
|
|
717
|
+
return(/*#__PURE__*/ $k7QOs$react.createElement($f57aed4a881a3485$export$178405afcd8c5eb, null, /*#__PURE__*/ $k7QOs$react.createElement($f57aed4a881a3485$var$OverlayContainerDOM, props)));
|
|
715
718
|
}
|
|
716
|
-
function $
|
|
719
|
+
function $f57aed4a881a3485$export$b47c3594eab58386(props) {
|
|
717
720
|
let { portalContainer: portalContainer = document.body , ...rest } = props;
|
|
718
|
-
$
|
|
721
|
+
$k7QOs$react.useEffect(()=>{
|
|
719
722
|
if (portalContainer.closest('[data-overlay-container]')) throw new Error('An OverlayContainer must not be inside another container. Please change the portalContainer prop.');
|
|
720
723
|
}, [
|
|
721
724
|
portalContainer
|
|
722
725
|
]);
|
|
723
|
-
let contents = /*#__PURE__*/ $
|
|
724
|
-
return(/*#__PURE__*/ $
|
|
726
|
+
let contents = /*#__PURE__*/ $k7QOs$react.createElement($f57aed4a881a3485$export$bf688221f59024e5, rest);
|
|
727
|
+
return(/*#__PURE__*/ $k7QOs$reactdom.createPortal(contents, portalContainer));
|
|
725
728
|
}
|
|
726
|
-
function $
|
|
729
|
+
function $f57aed4a881a3485$export$33ffd74ebf07f060(options) {
|
|
727
730
|
// Add aria-hidden to all parent providers on mount, and restore on unmount.
|
|
728
|
-
let context = $
|
|
731
|
+
let context = $k7QOs$useContext($f57aed4a881a3485$var$Context);
|
|
729
732
|
if (!context) throw new Error('Modal is not contained within a provider');
|
|
730
|
-
$
|
|
731
|
-
if (options
|
|
733
|
+
$k7QOs$useEffect(()=>{
|
|
734
|
+
if ((options === null || options === void 0 ? void 0 : options.isDisabled) || !context || !context.parent) return;
|
|
732
735
|
// The immediate context is from the provider containing this modal, so we only
|
|
733
736
|
// want to trigger aria-hidden on its parents not on the modal provider itself.
|
|
734
737
|
context.parent.addModal();
|
|
@@ -738,214 +741,216 @@ function $698c70f6640041fb$export$33ffd74ebf07f060(options) {
|
|
|
738
741
|
}, [
|
|
739
742
|
context,
|
|
740
743
|
context.parent,
|
|
741
|
-
options
|
|
744
|
+
options === null || options === void 0 ? void 0 : options.isDisabled
|
|
742
745
|
]);
|
|
743
746
|
return {
|
|
744
747
|
modalProps: {
|
|
745
|
-
'data-ismodal': !options
|
|
748
|
+
'data-ismodal': !(options === null || options === void 0 ? void 0 : options.isDisabled)
|
|
746
749
|
}
|
|
747
750
|
};
|
|
748
751
|
}
|
|
749
752
|
|
|
750
753
|
|
|
751
|
-
var $
|
|
754
|
+
var $86ea4cb521eb2e37$exports = {};
|
|
752
755
|
|
|
753
|
-
$parcel$export($
|
|
754
|
-
var $
|
|
755
|
-
var $
|
|
756
|
-
$
|
|
756
|
+
$parcel$export($86ea4cb521eb2e37$exports, "DismissButton", () => $86ea4cb521eb2e37$export$2317d149ed6f78c4);
|
|
757
|
+
var $61fe14465afefc5e$exports = {};
|
|
758
|
+
var $773d5888b972f1cf$exports = {};
|
|
759
|
+
$773d5888b972f1cf$exports = JSON.parse("{\"dismiss\":\"تجاهل\"}");
|
|
757
760
|
|
|
758
761
|
|
|
759
|
-
var $
|
|
760
|
-
$
|
|
762
|
+
var $d11f19852b941573$exports = {};
|
|
763
|
+
$d11f19852b941573$exports = JSON.parse("{\"dismiss\":\"Отхвърляне\"}");
|
|
761
764
|
|
|
762
765
|
|
|
763
|
-
var $
|
|
764
|
-
$
|
|
766
|
+
var $b983974c2ee1efb3$exports = {};
|
|
767
|
+
$b983974c2ee1efb3$exports = JSON.parse("{\"dismiss\":\"Odstranit\"}");
|
|
765
768
|
|
|
766
769
|
|
|
767
|
-
var $
|
|
768
|
-
$
|
|
770
|
+
var $5809cc9d4e92de73$exports = {};
|
|
771
|
+
$5809cc9d4e92de73$exports = JSON.parse("{\"dismiss\":\"Luk\"}");
|
|
769
772
|
|
|
770
773
|
|
|
771
|
-
var $
|
|
772
|
-
$
|
|
774
|
+
var $c68c2e4fc74398d1$exports = {};
|
|
775
|
+
$c68c2e4fc74398d1$exports = JSON.parse("{\"dismiss\":\"Schließen\"}");
|
|
773
776
|
|
|
774
777
|
|
|
775
|
-
var $
|
|
776
|
-
$
|
|
778
|
+
var $0898b4c153db2b77$exports = {};
|
|
779
|
+
$0898b4c153db2b77$exports = JSON.parse("{\"dismiss\":\"Απόρριψη\"}");
|
|
777
780
|
|
|
778
781
|
|
|
779
|
-
var $
|
|
780
|
-
$
|
|
782
|
+
var $6d74810286a15183$exports = {};
|
|
783
|
+
$6d74810286a15183$exports = JSON.parse("{\"dismiss\":\"Dismiss\"}");
|
|
781
784
|
|
|
782
785
|
|
|
783
|
-
var $
|
|
784
|
-
$
|
|
786
|
+
var $309d73dc65f78055$exports = {};
|
|
787
|
+
$309d73dc65f78055$exports = JSON.parse("{\"dismiss\":\"Descartar\"}");
|
|
785
788
|
|
|
786
789
|
|
|
787
|
-
var $
|
|
788
|
-
$
|
|
790
|
+
var $44ad94f7205cf593$exports = {};
|
|
791
|
+
$44ad94f7205cf593$exports = JSON.parse("{\"dismiss\":\"Lõpeta\"}");
|
|
789
792
|
|
|
790
793
|
|
|
791
|
-
var $
|
|
792
|
-
$
|
|
794
|
+
var $7c28f5687f0779a9$exports = {};
|
|
795
|
+
$7c28f5687f0779a9$exports = JSON.parse("{\"dismiss\":\"Hylkää\"}");
|
|
793
796
|
|
|
794
797
|
|
|
795
|
-
var $
|
|
796
|
-
$
|
|
798
|
+
var $e6d75df4b68bd73a$exports = {};
|
|
799
|
+
$e6d75df4b68bd73a$exports = JSON.parse("{\"dismiss\":\"Rejeter\"}");
|
|
797
800
|
|
|
798
801
|
|
|
799
|
-
var $
|
|
800
|
-
$
|
|
802
|
+
var $87505c9dab186d0f$exports = {};
|
|
803
|
+
$87505c9dab186d0f$exports = JSON.parse("{\"dismiss\":\"התעלם\"}");
|
|
801
804
|
|
|
802
805
|
|
|
803
|
-
var $
|
|
804
|
-
$
|
|
806
|
+
var $553439c3ffb3e492$exports = {};
|
|
807
|
+
$553439c3ffb3e492$exports = JSON.parse("{\"dismiss\":\"Odbaci\"}");
|
|
805
808
|
|
|
806
809
|
|
|
807
|
-
var $
|
|
808
|
-
$
|
|
810
|
+
var $74cf411061b983a2$exports = {};
|
|
811
|
+
$74cf411061b983a2$exports = JSON.parse("{\"dismiss\":\"Elutasítás\"}");
|
|
809
812
|
|
|
810
813
|
|
|
811
|
-
var $
|
|
812
|
-
$
|
|
814
|
+
var $e933f298574dc435$exports = {};
|
|
815
|
+
$e933f298574dc435$exports = JSON.parse("{\"dismiss\":\"Ignora\"}");
|
|
813
816
|
|
|
814
817
|
|
|
815
|
-
var $
|
|
816
|
-
$
|
|
818
|
+
var $ac91fc9fe02f71f6$exports = {};
|
|
819
|
+
$ac91fc9fe02f71f6$exports = JSON.parse("{\"dismiss\":\"閉じる\"}");
|
|
817
820
|
|
|
818
821
|
|
|
819
|
-
var $
|
|
820
|
-
$
|
|
822
|
+
var $52b96f86422025af$exports = {};
|
|
823
|
+
$52b96f86422025af$exports = JSON.parse("{\"dismiss\":\"무시\"}");
|
|
821
824
|
|
|
822
825
|
|
|
823
|
-
var $
|
|
824
|
-
$
|
|
826
|
+
var $c0d724c3e51dafa6$exports = {};
|
|
827
|
+
$c0d724c3e51dafa6$exports = JSON.parse("{\"dismiss\":\"Atmesti\"}");
|
|
825
828
|
|
|
826
829
|
|
|
827
|
-
var $
|
|
828
|
-
$
|
|
830
|
+
var $c92899672a3fe72e$exports = {};
|
|
831
|
+
$c92899672a3fe72e$exports = JSON.parse("{\"dismiss\":\"Nerādīt\"}");
|
|
829
832
|
|
|
830
833
|
|
|
831
|
-
var $
|
|
832
|
-
$
|
|
834
|
+
var $9f576b39d8e7a9d6$exports = {};
|
|
835
|
+
$9f576b39d8e7a9d6$exports = JSON.parse("{\"dismiss\":\"Lukk\"}");
|
|
833
836
|
|
|
834
837
|
|
|
835
|
-
var $
|
|
836
|
-
$
|
|
838
|
+
var $9d025808aeec81a7$exports = {};
|
|
839
|
+
$9d025808aeec81a7$exports = JSON.parse("{\"dismiss\":\"Negeren\"}");
|
|
837
840
|
|
|
838
841
|
|
|
839
|
-
var $
|
|
840
|
-
$
|
|
842
|
+
var $fce709921e2c0fa6$exports = {};
|
|
843
|
+
$fce709921e2c0fa6$exports = JSON.parse("{\"dismiss\":\"Zignoruj\"}");
|
|
841
844
|
|
|
842
845
|
|
|
843
|
-
var $
|
|
844
|
-
$
|
|
846
|
+
var $2599cf0c4ab37f59$exports = {};
|
|
847
|
+
$2599cf0c4ab37f59$exports = JSON.parse("{\"dismiss\":\"Descartar\"}");
|
|
845
848
|
|
|
846
849
|
|
|
847
|
-
var $
|
|
848
|
-
$
|
|
850
|
+
var $3c220ae7ef8a35fd$exports = {};
|
|
851
|
+
$3c220ae7ef8a35fd$exports = JSON.parse("{\"dismiss\":\"Dispensar\"}");
|
|
849
852
|
|
|
850
853
|
|
|
851
|
-
var $
|
|
852
|
-
$
|
|
854
|
+
var $93562b5094072f54$exports = {};
|
|
855
|
+
$93562b5094072f54$exports = JSON.parse("{\"dismiss\":\"Revocare\"}");
|
|
853
856
|
|
|
854
857
|
|
|
855
|
-
var $
|
|
856
|
-
$
|
|
858
|
+
var $cd9e2abd0d06c7b4$exports = {};
|
|
859
|
+
$cd9e2abd0d06c7b4$exports = JSON.parse("{\"dismiss\":\"Пропустить\"}");
|
|
857
860
|
|
|
858
861
|
|
|
859
|
-
var $
|
|
860
|
-
$
|
|
862
|
+
var $45375701f409adf1$exports = {};
|
|
863
|
+
$45375701f409adf1$exports = JSON.parse("{\"dismiss\":\"Zrušiť\"}");
|
|
861
864
|
|
|
862
865
|
|
|
863
|
-
var $
|
|
864
|
-
$
|
|
866
|
+
var $27fab53a576de9dd$exports = {};
|
|
867
|
+
$27fab53a576de9dd$exports = JSON.parse("{\"dismiss\":\"Opusti\"}");
|
|
865
868
|
|
|
866
869
|
|
|
867
|
-
var $
|
|
868
|
-
$
|
|
870
|
+
var $4438748d9952e7c7$exports = {};
|
|
871
|
+
$4438748d9952e7c7$exports = JSON.parse("{\"dismiss\":\"Odbaci\"}");
|
|
869
872
|
|
|
870
873
|
|
|
871
|
-
var $
|
|
872
|
-
$
|
|
874
|
+
var $0936d7347ef4da4c$exports = {};
|
|
875
|
+
$0936d7347ef4da4c$exports = JSON.parse("{\"dismiss\":\"Avvisa\"}");
|
|
873
876
|
|
|
874
877
|
|
|
875
|
-
var $
|
|
876
|
-
$
|
|
878
|
+
var $29700c92185d38f8$exports = {};
|
|
879
|
+
$29700c92185d38f8$exports = JSON.parse("{\"dismiss\":\"Kapat\"}");
|
|
877
880
|
|
|
878
881
|
|
|
879
|
-
var $
|
|
880
|
-
$
|
|
882
|
+
var $662ccaf2be4c25b3$exports = {};
|
|
883
|
+
$662ccaf2be4c25b3$exports = JSON.parse("{\"dismiss\":\"Скасувати\"}");
|
|
881
884
|
|
|
882
885
|
|
|
883
|
-
var $
|
|
884
|
-
$
|
|
886
|
+
var $d80a27deda7cdb3c$exports = {};
|
|
887
|
+
$d80a27deda7cdb3c$exports = JSON.parse("{\"dismiss\":\"取消\"}");
|
|
885
888
|
|
|
886
889
|
|
|
887
|
-
var $
|
|
888
|
-
$
|
|
890
|
+
var $2b2734393847c884$exports = {};
|
|
891
|
+
$2b2734393847c884$exports = JSON.parse("{\"dismiss\":\"關閉\"}");
|
|
889
892
|
|
|
890
893
|
|
|
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": $
|
|
894
|
+
$61fe14465afefc5e$exports = {
|
|
895
|
+
"ar-AE": $773d5888b972f1cf$exports,
|
|
896
|
+
"bg-BG": $d11f19852b941573$exports,
|
|
897
|
+
"cs-CZ": $b983974c2ee1efb3$exports,
|
|
898
|
+
"da-DK": $5809cc9d4e92de73$exports,
|
|
899
|
+
"de-DE": $c68c2e4fc74398d1$exports,
|
|
900
|
+
"el-GR": $0898b4c153db2b77$exports,
|
|
901
|
+
"en-US": $6d74810286a15183$exports,
|
|
902
|
+
"es-ES": $309d73dc65f78055$exports,
|
|
903
|
+
"et-EE": $44ad94f7205cf593$exports,
|
|
904
|
+
"fi-FI": $7c28f5687f0779a9$exports,
|
|
905
|
+
"fr-FR": $e6d75df4b68bd73a$exports,
|
|
906
|
+
"he-IL": $87505c9dab186d0f$exports,
|
|
907
|
+
"hr-HR": $553439c3ffb3e492$exports,
|
|
908
|
+
"hu-HU": $74cf411061b983a2$exports,
|
|
909
|
+
"it-IT": $e933f298574dc435$exports,
|
|
910
|
+
"ja-JP": $ac91fc9fe02f71f6$exports,
|
|
911
|
+
"ko-KR": $52b96f86422025af$exports,
|
|
912
|
+
"lt-LT": $c0d724c3e51dafa6$exports,
|
|
913
|
+
"lv-LV": $c92899672a3fe72e$exports,
|
|
914
|
+
"nb-NO": $9f576b39d8e7a9d6$exports,
|
|
915
|
+
"nl-NL": $9d025808aeec81a7$exports,
|
|
916
|
+
"pl-PL": $fce709921e2c0fa6$exports,
|
|
917
|
+
"pt-BR": $2599cf0c4ab37f59$exports,
|
|
918
|
+
"pt-PT": $3c220ae7ef8a35fd$exports,
|
|
919
|
+
"ro-RO": $93562b5094072f54$exports,
|
|
920
|
+
"ru-RU": $cd9e2abd0d06c7b4$exports,
|
|
921
|
+
"sk-SK": $45375701f409adf1$exports,
|
|
922
|
+
"sl-SI": $27fab53a576de9dd$exports,
|
|
923
|
+
"sr-SP": $4438748d9952e7c7$exports,
|
|
924
|
+
"sv-SE": $0936d7347ef4da4c$exports,
|
|
925
|
+
"tr-TR": $29700c92185d38f8$exports,
|
|
926
|
+
"uk-UA": $662ccaf2be4c25b3$exports,
|
|
927
|
+
"zh-CN": $d80a27deda7cdb3c$exports,
|
|
928
|
+
"zh-TW": $2b2734393847c884$exports
|
|
926
929
|
};
|
|
927
930
|
|
|
928
931
|
|
|
929
932
|
|
|
930
933
|
|
|
931
934
|
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
let
|
|
935
|
+
|
|
936
|
+
function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
|
|
937
|
+
let { onDismiss: onDismiss , ...otherProps } = props;
|
|
938
|
+
let formatMessage = $k7QOs$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($61fe14465afefc5e$exports)));
|
|
939
|
+
let labels = $k7QOs$useLabels(otherProps, formatMessage('dismiss'));
|
|
935
940
|
let onClick = ()=>{
|
|
936
941
|
if (onDismiss) onDismiss();
|
|
937
942
|
};
|
|
938
|
-
return(/*#__PURE__*/ $
|
|
943
|
+
return(/*#__PURE__*/ $k7QOs$react.createElement($k7QOs$VisuallyHidden, null, /*#__PURE__*/ $k7QOs$react.createElement("button", {
|
|
944
|
+
...labels,
|
|
939
945
|
tabIndex: -1,
|
|
940
|
-
"aria-label": formatMessage('dismiss'),
|
|
941
946
|
onClick: onClick
|
|
942
947
|
})));
|
|
943
948
|
}
|
|
944
949
|
|
|
945
950
|
|
|
946
|
-
var $
|
|
951
|
+
var $5e3802645cc19319$exports = {};
|
|
947
952
|
|
|
948
|
-
$parcel$export($
|
|
953
|
+
$parcel$export($5e3802645cc19319$exports, "ariaHideOutside", () => $5e3802645cc19319$export$1c3ebcada18427bf);
|
|
949
954
|
/*
|
|
950
955
|
* Copyright 2020 Adobe. All rights reserved.
|
|
951
956
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -958,8 +963,8 @@ $parcel$export($bf241ecdd7b50fca$exports, "ariaHideOutside", () => $bf241ecdd7b5
|
|
|
958
963
|
* governing permissions and limitations under the License.
|
|
959
964
|
*/ // Keeps a ref count of all hidden elements. Added to when hiding an element, and
|
|
960
965
|
// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.
|
|
961
|
-
let $
|
|
962
|
-
function $
|
|
966
|
+
let $5e3802645cc19319$var$refCountMap = new WeakMap();
|
|
967
|
+
function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body) {
|
|
963
968
|
let visibleNodes = new Set(targets);
|
|
964
969
|
let hiddenNodes = new Set();
|
|
965
970
|
let walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {
|
|
@@ -979,13 +984,14 @@ function $bf241ecdd7b50fca$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
979
984
|
}
|
|
980
985
|
});
|
|
981
986
|
let hide = (node)=>{
|
|
982
|
-
|
|
987
|
+
var ref;
|
|
988
|
+
let refCount = (ref = $5e3802645cc19319$var$refCountMap.get(node)) !== null && ref !== void 0 ? ref : 0;
|
|
983
989
|
// If already aria-hidden, and the ref count is zero, then this element
|
|
984
990
|
// was already hidden and there's nothing for us to do.
|
|
985
991
|
if (node.getAttribute('aria-hidden') === 'true' && refCount === 0) return;
|
|
986
992
|
if (refCount === 0) node.setAttribute('aria-hidden', 'true');
|
|
987
993
|
hiddenNodes.add(node);
|
|
988
|
-
$
|
|
994
|
+
$5e3802645cc19319$var$refCountMap.set(node, refCount + 1);
|
|
989
995
|
};
|
|
990
996
|
let node1 = walker.nextNode();
|
|
991
997
|
while(node1 != null){
|
|
@@ -1014,11 +1020,11 @@ function $bf241ecdd7b50fca$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
1014
1020
|
return ()=>{
|
|
1015
1021
|
observer.disconnect();
|
|
1016
1022
|
for (let node of hiddenNodes){
|
|
1017
|
-
let count = $
|
|
1023
|
+
let count = $5e3802645cc19319$var$refCountMap.get(node);
|
|
1018
1024
|
if (count === 1) {
|
|
1019
1025
|
node.removeAttribute('aria-hidden');
|
|
1020
|
-
$
|
|
1021
|
-
} else $
|
|
1026
|
+
$5e3802645cc19319$var$refCountMap.delete(node);
|
|
1027
|
+
} else $5e3802645cc19319$var$refCountMap.set(node, count - 1);
|
|
1022
1028
|
}
|
|
1023
1029
|
};
|
|
1024
1030
|
}
|
|
@@ -1026,5 +1032,5 @@ function $bf241ecdd7b50fca$export$1c3ebcada18427bf(targets, root = document.body
|
|
|
1026
1032
|
|
|
1027
1033
|
|
|
1028
1034
|
|
|
1029
|
-
export {$
|
|
1035
|
+
export {$2a41e45df1593e64$export$d39e1813b3bdd0e1 as useOverlayPosition, $a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay, $628037886ba31236$export$f9d5c8beee7d008d as useOverlayTrigger, $49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as usePreventScroll, $f57aed4a881a3485$export$178405afcd8c5eb as ModalProvider, $f57aed4a881a3485$export$d9aaed4c3ece1bc0 as useModalProvider, $f57aed4a881a3485$export$bf688221f59024e5 as OverlayProvider, $f57aed4a881a3485$export$b47c3594eab58386 as OverlayContainer, $f57aed4a881a3485$export$33ffd74ebf07f060 as useModal, $86ea4cb521eb2e37$export$2317d149ed6f78c4 as DismissButton, $5e3802645cc19319$export$1c3ebcada18427bf as ariaHideOutside};
|
|
1030
1036
|
//# sourceMappingURL=module.js.map
|