@react-aria/overlays 3.21.0 → 3.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DismissButton.main.js +51 -0
- package/dist/DismissButton.main.js.map +1 -0
- package/dist/DismissButton.mjs +46 -0
- package/dist/DismissButton.module.js +46 -0
- package/dist/DismissButton.module.js.map +1 -0
- package/dist/Overlay.main.js +73 -0
- package/dist/Overlay.main.js.map +1 -0
- package/dist/Overlay.mjs +63 -0
- package/dist/Overlay.module.js +63 -0
- package/dist/Overlay.module.js.map +1 -0
- package/dist/PortalProvider.main.js +41 -0
- package/dist/PortalProvider.main.js.map +1 -0
- package/dist/PortalProvider.mjs +31 -0
- package/dist/PortalProvider.module.js +31 -0
- package/dist/PortalProvider.module.js.map +1 -0
- package/dist/ar-AE.main.js +6 -0
- package/dist/ar-AE.main.js.map +1 -0
- package/dist/ar-AE.mjs +8 -0
- package/dist/ar-AE.module.js +8 -0
- package/dist/ar-AE.module.js.map +1 -0
- package/dist/ariaHideOutside.main.js +121 -0
- package/dist/ariaHideOutside.main.js.map +1 -0
- package/dist/ariaHideOutside.mjs +116 -0
- package/dist/ariaHideOutside.module.js +116 -0
- package/dist/ariaHideOutside.module.js.map +1 -0
- package/dist/bg-BG.main.js +6 -0
- package/dist/bg-BG.main.js.map +1 -0
- package/dist/bg-BG.mjs +8 -0
- package/dist/bg-BG.module.js +8 -0
- package/dist/bg-BG.module.js.map +1 -0
- package/dist/calculatePosition.main.js +355 -0
- package/dist/calculatePosition.main.js.map +1 -0
- package/dist/calculatePosition.mjs +350 -0
- package/dist/calculatePosition.module.js +350 -0
- package/dist/calculatePosition.module.js.map +1 -0
- package/dist/cs-CZ.main.js +6 -0
- package/dist/cs-CZ.main.js.map +1 -0
- package/dist/cs-CZ.mjs +8 -0
- package/dist/cs-CZ.module.js +8 -0
- package/dist/cs-CZ.module.js.map +1 -0
- package/dist/da-DK.main.js +6 -0
- package/dist/da-DK.main.js.map +1 -0
- package/dist/da-DK.mjs +8 -0
- package/dist/da-DK.module.js +8 -0
- package/dist/da-DK.module.js.map +1 -0
- package/dist/de-DE.main.js +6 -0
- package/dist/de-DE.main.js.map +1 -0
- package/dist/de-DE.mjs +8 -0
- package/dist/de-DE.module.js +8 -0
- package/dist/de-DE.module.js.map +1 -0
- package/dist/el-GR.main.js +6 -0
- package/dist/el-GR.main.js.map +1 -0
- package/dist/el-GR.mjs +8 -0
- package/dist/el-GR.module.js +8 -0
- package/dist/el-GR.module.js.map +1 -0
- package/dist/en-US.main.js +6 -0
- package/dist/en-US.main.js.map +1 -0
- package/dist/en-US.mjs +8 -0
- package/dist/en-US.module.js +8 -0
- package/dist/en-US.module.js.map +1 -0
- package/dist/es-ES.main.js +6 -0
- package/dist/es-ES.main.js.map +1 -0
- package/dist/es-ES.mjs +8 -0
- package/dist/es-ES.module.js +8 -0
- package/dist/es-ES.module.js.map +1 -0
- package/dist/et-EE.main.js +6 -0
- package/dist/et-EE.main.js.map +1 -0
- package/dist/et-EE.mjs +8 -0
- package/dist/et-EE.module.js +8 -0
- package/dist/et-EE.module.js.map +1 -0
- package/dist/fi-FI.main.js +6 -0
- package/dist/fi-FI.main.js.map +1 -0
- package/dist/fi-FI.mjs +8 -0
- package/dist/fi-FI.module.js +8 -0
- package/dist/fi-FI.module.js.map +1 -0
- package/dist/fr-FR.main.js +6 -0
- package/dist/fr-FR.main.js.map +1 -0
- package/dist/fr-FR.mjs +8 -0
- package/dist/fr-FR.module.js +8 -0
- package/dist/fr-FR.module.js.map +1 -0
- package/dist/he-IL.main.js +6 -0
- package/dist/he-IL.main.js.map +1 -0
- package/dist/he-IL.mjs +8 -0
- package/dist/he-IL.module.js +8 -0
- package/dist/he-IL.module.js.map +1 -0
- package/dist/hr-HR.main.js +6 -0
- package/dist/hr-HR.main.js.map +1 -0
- package/dist/hr-HR.mjs +8 -0
- package/dist/hr-HR.module.js +8 -0
- package/dist/hr-HR.module.js.map +1 -0
- package/dist/hu-HU.main.js +6 -0
- package/dist/hu-HU.main.js.map +1 -0
- package/dist/hu-HU.mjs +8 -0
- package/dist/hu-HU.module.js +8 -0
- package/dist/hu-HU.module.js.map +1 -0
- package/dist/import.mjs +12 -1533
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/it-IT.main.js +6 -0
- package/dist/it-IT.main.js.map +1 -0
- package/dist/it-IT.mjs +8 -0
- package/dist/it-IT.module.js +8 -0
- package/dist/it-IT.module.js.map +1 -0
- package/dist/ja-JP.main.js +6 -0
- package/dist/ja-JP.main.js.map +1 -0
- package/dist/ja-JP.mjs +8 -0
- package/dist/ja-JP.module.js +8 -0
- package/dist/ja-JP.module.js.map +1 -0
- package/dist/ko-KR.main.js +6 -0
- package/dist/ko-KR.main.js.map +1 -0
- package/dist/ko-KR.mjs +8 -0
- package/dist/ko-KR.module.js +8 -0
- package/dist/ko-KR.module.js.map +1 -0
- package/dist/lt-LT.main.js +6 -0
- package/dist/lt-LT.main.js.map +1 -0
- package/dist/lt-LT.mjs +8 -0
- package/dist/lt-LT.module.js +8 -0
- package/dist/lt-LT.module.js.map +1 -0
- package/dist/lv-LV.main.js +6 -0
- package/dist/lv-LV.main.js.map +1 -0
- package/dist/lv-LV.mjs +8 -0
- package/dist/lv-LV.module.js +8 -0
- package/dist/lv-LV.module.js.map +1 -0
- package/dist/main.js +28 -1547
- package/dist/main.js.map +1 -1
- package/dist/module.js +12 -1533
- package/dist/module.js.map +1 -1
- package/dist/nb-NO.main.js +6 -0
- package/dist/nb-NO.main.js.map +1 -0
- package/dist/nb-NO.mjs +8 -0
- package/dist/nb-NO.module.js +8 -0
- package/dist/nb-NO.module.js.map +1 -0
- package/dist/nl-NL.main.js +6 -0
- package/dist/nl-NL.main.js.map +1 -0
- package/dist/nl-NL.mjs +8 -0
- package/dist/nl-NL.module.js +8 -0
- package/dist/nl-NL.module.js.map +1 -0
- package/dist/pl-PL.main.js +6 -0
- package/dist/pl-PL.main.js.map +1 -0
- package/dist/pl-PL.mjs +8 -0
- package/dist/pl-PL.module.js +8 -0
- package/dist/pl-PL.module.js.map +1 -0
- package/dist/pt-BR.main.js +6 -0
- package/dist/pt-BR.main.js.map +1 -0
- package/dist/pt-BR.mjs +8 -0
- package/dist/pt-BR.module.js +8 -0
- package/dist/pt-BR.module.js.map +1 -0
- package/dist/pt-PT.main.js +6 -0
- package/dist/pt-PT.main.js.map +1 -0
- package/dist/pt-PT.mjs +8 -0
- package/dist/pt-PT.module.js +8 -0
- package/dist/pt-PT.module.js.map +1 -0
- package/dist/ro-RO.main.js +6 -0
- package/dist/ro-RO.main.js.map +1 -0
- package/dist/ro-RO.mjs +8 -0
- package/dist/ro-RO.module.js +8 -0
- package/dist/ro-RO.module.js.map +1 -0
- package/dist/ru-RU.main.js +6 -0
- package/dist/ru-RU.main.js.map +1 -0
- package/dist/ru-RU.mjs +8 -0
- package/dist/ru-RU.module.js +8 -0
- package/dist/ru-RU.module.js.map +1 -0
- package/dist/sk-SK.main.js +6 -0
- package/dist/sk-SK.main.js.map +1 -0
- package/dist/sk-SK.mjs +8 -0
- package/dist/sk-SK.module.js +8 -0
- package/dist/sk-SK.module.js.map +1 -0
- package/dist/sl-SI.main.js +6 -0
- package/dist/sl-SI.main.js.map +1 -0
- package/dist/sl-SI.mjs +8 -0
- package/dist/sl-SI.module.js +8 -0
- package/dist/sl-SI.module.js.map +1 -0
- package/dist/sr-SP.main.js +6 -0
- package/dist/sr-SP.main.js.map +1 -0
- package/dist/sr-SP.mjs +8 -0
- package/dist/sr-SP.module.js +8 -0
- package/dist/sr-SP.module.js.map +1 -0
- package/dist/sv-SE.main.js +6 -0
- package/dist/sv-SE.main.js.map +1 -0
- package/dist/sv-SE.mjs +8 -0
- package/dist/sv-SE.module.js +8 -0
- package/dist/sv-SE.module.js.map +1 -0
- package/dist/tr-TR.main.js +6 -0
- package/dist/tr-TR.main.js.map +1 -0
- package/dist/tr-TR.mjs +8 -0
- package/dist/tr-TR.module.js +8 -0
- package/dist/tr-TR.module.js.map +1 -0
- package/dist/types.d.ts +8 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.main.js +6 -0
- package/dist/uk-UA.main.js.map +1 -0
- package/dist/uk-UA.mjs +8 -0
- package/dist/uk-UA.module.js +8 -0
- package/dist/uk-UA.module.js.map +1 -0
- package/dist/useCloseOnScroll.main.js +46 -0
- package/dist/useCloseOnScroll.main.js.map +1 -0
- package/dist/useCloseOnScroll.mjs +40 -0
- package/dist/useCloseOnScroll.module.js +40 -0
- package/dist/useCloseOnScroll.module.js.map +1 -0
- package/dist/useModal.main.js +114 -0
- package/dist/useModal.main.js.map +1 -0
- package/dist/useModal.mjs +101 -0
- package/dist/useModal.module.js +101 -0
- package/dist/useModal.module.js.map +1 -0
- package/dist/useModalOverlay.main.js +55 -0
- package/dist/useModalOverlay.main.js.map +1 -0
- package/dist/useModalOverlay.mjs +50 -0
- package/dist/useModalOverlay.module.js +50 -0
- package/dist/useModalOverlay.module.js.map +1 -0
- package/dist/useOverlay.main.js +105 -0
- package/dist/useOverlay.main.js.map +1 -0
- package/dist/useOverlay.mjs +100 -0
- package/dist/useOverlay.module.js +100 -0
- package/dist/useOverlay.module.js.map +1 -0
- package/dist/useOverlayPosition.main.js +181 -0
- package/dist/useOverlayPosition.main.js.map +1 -0
- package/dist/useOverlayPosition.mjs +176 -0
- package/dist/useOverlayPosition.module.js +176 -0
- package/dist/useOverlayPosition.module.js.map +1 -0
- package/dist/useOverlayTrigger.main.js +54 -0
- package/dist/useOverlayTrigger.main.js.map +1 -0
- package/dist/useOverlayTrigger.mjs +49 -0
- package/dist/useOverlayTrigger.module.js +49 -0
- package/dist/useOverlayTrigger.module.js.map +1 -0
- package/dist/usePopover.main.js +66 -0
- package/dist/usePopover.main.js.map +1 -0
- package/dist/usePopover.mjs +61 -0
- package/dist/usePopover.module.js +61 -0
- package/dist/usePopover.module.js.map +1 -0
- package/dist/usePreventScroll.main.js +226 -0
- package/dist/usePreventScroll.main.js.map +1 -0
- package/dist/usePreventScroll.mjs +221 -0
- package/dist/usePreventScroll.module.js +221 -0
- package/dist/usePreventScroll.module.js.map +1 -0
- package/dist/zh-CN.main.js +6 -0
- package/dist/zh-CN.main.js.map +1 -0
- package/dist/zh-CN.mjs +8 -0
- package/dist/zh-CN.module.js +8 -0
- package/dist/zh-CN.module.js.map +1 -0
- package/dist/zh-TW.main.js +6 -0
- package/dist/zh-TW.main.js.map +1 -0
- package/dist/zh-TW.mjs +8 -0
- package/dist/zh-TW.module.js +8 -0
- package/dist/zh-TW.module.js.map +1 -0
- package/package.json +12 -12
- package/src/Overlay.tsx +6 -0
- package/src/PortalProvider.tsx +34 -0
- package/src/index.ts +1 -0
- package/src/useModalOverlay.ts +2 -2
- package/src/useOverlay.ts +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var $90f032faf016e1fb$exports = require("./intlStrings.main.js");
|
|
2
|
+
var $21EvL$react = require("react");
|
|
3
|
+
var $21EvL$reactariautils = require("@react-aria/utils");
|
|
4
|
+
var $21EvL$reactariai18n = require("@react-aria/i18n");
|
|
5
|
+
var $21EvL$reactariavisuallyhidden = require("@react-aria/visually-hidden");
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function $parcel$interopDefault(a) {
|
|
9
|
+
return a && a.__esModule ? a.default : a;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function $parcel$export(e, n, v, s) {
|
|
13
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
$parcel$export(module.exports, "DismissButton", () => $f69bb3e6457495cc$export$2317d149ed6f78c4);
|
|
17
|
+
/*
|
|
18
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
19
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
20
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
21
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
+
*
|
|
23
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
24
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
25
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
|
+
* governing permissions and limitations under the License.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
function $f69bb3e6457495cc$export$2317d149ed6f78c4(props) {
|
|
33
|
+
let { onDismiss: onDismiss, ...otherProps } = props;
|
|
34
|
+
let stringFormatter = (0, $21EvL$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($90f032faf016e1fb$exports))), "@react-aria/overlays");
|
|
35
|
+
let labels = (0, $21EvL$reactariautils.useLabels)(otherProps, stringFormatter.format("dismiss"));
|
|
36
|
+
let onClick = ()=>{
|
|
37
|
+
if (onDismiss) onDismiss();
|
|
38
|
+
};
|
|
39
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($21EvL$react))).createElement((0, $21EvL$reactariavisuallyhidden.VisuallyHidden), null, /*#__PURE__*/ (0, ($parcel$interopDefault($21EvL$react))).createElement("button", {
|
|
40
|
+
...labels,
|
|
41
|
+
tabIndex: -1,
|
|
42
|
+
onClick: onClick,
|
|
43
|
+
style: {
|
|
44
|
+
width: 1,
|
|
45
|
+
height: 1
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=DismissButton.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAoBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,aAAC,SAAS,EAAE,GAAG,YAAW,GAAG;IACjC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,IAAI,SAAS,CAAA,GAAA,+BAAQ,EAAE,YAAY,gBAAgB,MAAM,CAAC;IAE1D,IAAI,UAAU;QACZ,IAAI,WACF;IAEJ;IAEA,qBACE,0DAAC,CAAA,GAAA,6CAAa,uBACZ,0DAAC;QACE,GAAG,MAAM;QACV,UAAU;QACV,SAAS;QACT,OAAO;YAAC,OAAO;YAAG,QAAQ;QAAC;;AAGnC","sources":["packages/@react-aria/overlays/src/DismissButton.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React from 'react';\nimport {useLabels} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\nexport interface DismissButtonProps extends AriaLabelingProps, DOMProps {\n /** Called when the dismiss button is activated. */\n onDismiss?: () => void\n}\n\n/**\n * A visually hidden button that can be used to allow screen reader\n * users to dismiss a modal or popup when there is no visual\n * affordance to do so.\n */\nexport function DismissButton(props: DismissButtonProps) {\n let {onDismiss, ...otherProps} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/overlays');\n\n let labels = useLabels(otherProps, stringFormatter.format('dismiss'));\n\n let onClick = () => {\n if (onDismiss) {\n onDismiss();\n }\n };\n\n return (\n <VisuallyHidden>\n <button\n {...labels}\n tabIndex={-1}\n onClick={onClick}\n style={{width: 1, height: 1}} />\n </VisuallyHidden>\n );\n}\n"],"names":[],"version":3,"file":"DismissButton.main.js.map"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import $iYaQO$intlStringsmodulejs from "./intlStrings.mjs";
|
|
2
|
+
import $iYaQO$react from "react";
|
|
3
|
+
import {useLabels as $iYaQO$useLabels} from "@react-aria/utils";
|
|
4
|
+
import {useLocalizedStringFormatter as $iYaQO$useLocalizedStringFormatter} from "@react-aria/i18n";
|
|
5
|
+
import {VisuallyHidden as $iYaQO$VisuallyHidden} from "@react-aria/visually-hidden";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function $parcel$interopDefault(a) {
|
|
9
|
+
return a && a.__esModule ? a.default : a;
|
|
10
|
+
}
|
|
11
|
+
/*
|
|
12
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
13
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
15
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
18
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
19
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
20
|
+
* governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
|
|
27
|
+
let { onDismiss: onDismiss, ...otherProps } = props;
|
|
28
|
+
let stringFormatter = (0, $iYaQO$useLocalizedStringFormatter)((0, ($parcel$interopDefault($iYaQO$intlStringsmodulejs))), "@react-aria/overlays");
|
|
29
|
+
let labels = (0, $iYaQO$useLabels)(otherProps, stringFormatter.format("dismiss"));
|
|
30
|
+
let onClick = ()=>{
|
|
31
|
+
if (onDismiss) onDismiss();
|
|
32
|
+
};
|
|
33
|
+
return /*#__PURE__*/ (0, $iYaQO$react).createElement((0, $iYaQO$VisuallyHidden), null, /*#__PURE__*/ (0, $iYaQO$react).createElement("button", {
|
|
34
|
+
...labels,
|
|
35
|
+
tabIndex: -1,
|
|
36
|
+
onClick: onClick,
|
|
37
|
+
style: {
|
|
38
|
+
width: 1,
|
|
39
|
+
height: 1
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export {$86ea4cb521eb2e37$export$2317d149ed6f78c4 as DismissButton};
|
|
46
|
+
//# sourceMappingURL=DismissButton.mjs.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import $iYaQO$intlStringsmodulejs from "./intlStrings.module.js";
|
|
2
|
+
import $iYaQO$react from "react";
|
|
3
|
+
import {useLabels as $iYaQO$useLabels} from "@react-aria/utils";
|
|
4
|
+
import {useLocalizedStringFormatter as $iYaQO$useLocalizedStringFormatter} from "@react-aria/i18n";
|
|
5
|
+
import {VisuallyHidden as $iYaQO$VisuallyHidden} from "@react-aria/visually-hidden";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
function $parcel$interopDefault(a) {
|
|
9
|
+
return a && a.__esModule ? a.default : a;
|
|
10
|
+
}
|
|
11
|
+
/*
|
|
12
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
13
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
15
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
18
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
19
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
20
|
+
* governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
|
|
27
|
+
let { onDismiss: onDismiss, ...otherProps } = props;
|
|
28
|
+
let stringFormatter = (0, $iYaQO$useLocalizedStringFormatter)((0, ($parcel$interopDefault($iYaQO$intlStringsmodulejs))), "@react-aria/overlays");
|
|
29
|
+
let labels = (0, $iYaQO$useLabels)(otherProps, stringFormatter.format("dismiss"));
|
|
30
|
+
let onClick = ()=>{
|
|
31
|
+
if (onDismiss) onDismiss();
|
|
32
|
+
};
|
|
33
|
+
return /*#__PURE__*/ (0, $iYaQO$react).createElement((0, $iYaQO$VisuallyHidden), null, /*#__PURE__*/ (0, $iYaQO$react).createElement("button", {
|
|
34
|
+
...labels,
|
|
35
|
+
tabIndex: -1,
|
|
36
|
+
onClick: onClick,
|
|
37
|
+
style: {
|
|
38
|
+
width: 1,
|
|
39
|
+
height: 1
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export {$86ea4cb521eb2e37$export$2317d149ed6f78c4 as DismissButton};
|
|
46
|
+
//# sourceMappingURL=DismissButton.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAoBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,aAAC,SAAS,EAAE,GAAG,YAAW,GAAG;IACjC,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAEhE,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE,YAAY,gBAAgB,MAAM,CAAC;IAE1D,IAAI,UAAU;QACZ,IAAI,WACF;IAEJ;IAEA,qBACE,gCAAC,CAAA,GAAA,qBAAa,uBACZ,gCAAC;QACE,GAAG,MAAM;QACV,UAAU;QACV,SAAS;QACT,OAAO;YAAC,OAAO;YAAG,QAAQ;QAAC;;AAGnC","sources":["packages/@react-aria/overlays/src/DismissButton.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React from 'react';\nimport {useLabels} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\nexport interface DismissButtonProps extends AriaLabelingProps, DOMProps {\n /** Called when the dismiss button is activated. */\n onDismiss?: () => void\n}\n\n/**\n * A visually hidden button that can be used to allow screen reader\n * users to dismiss a modal or popup when there is no visual\n * affordance to do so.\n */\nexport function DismissButton(props: DismissButtonProps) {\n let {onDismiss, ...otherProps} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/overlays');\n\n let labels = useLabels(otherProps, stringFormatter.format('dismiss'));\n\n let onClick = () => {\n if (onDismiss) {\n onDismiss();\n }\n };\n\n return (\n <VisuallyHidden>\n <button\n {...labels}\n tabIndex={-1}\n onClick={onClick}\n style={{width: 1, height: 1}} />\n </VisuallyHidden>\n );\n}\n"],"names":[],"version":3,"file":"DismissButton.module.js.map"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var $d7347c25ab757295$exports = require("./PortalProvider.main.js");
|
|
2
|
+
var $kxJqT$reactariainteractions = require("@react-aria/interactions");
|
|
3
|
+
var $kxJqT$reactariafocus = require("@react-aria/focus");
|
|
4
|
+
var $kxJqT$react = require("react");
|
|
5
|
+
var $kxJqT$reactdom = require("react-dom");
|
|
6
|
+
var $kxJqT$reactariassr = require("@react-aria/ssr");
|
|
7
|
+
var $kxJqT$reactariautils = require("@react-aria/utils");
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
function $parcel$interopDefault(a) {
|
|
11
|
+
return a && a.__esModule ? a.default : a;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function $parcel$export(e, n, v, s) {
|
|
15
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
$parcel$export(module.exports, "Overlay", () => $745edbb83ab4296f$export$c6fdb837b070b4ff);
|
|
19
|
+
$parcel$export(module.exports, "useOverlayFocusContain", () => $745edbb83ab4296f$export$14c98a7594375490);
|
|
20
|
+
/*
|
|
21
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
22
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
23
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
24
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
*
|
|
26
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
27
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
28
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
29
|
+
* governing permissions and limitations under the License.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
const $745edbb83ab4296f$export$a2200b96afd16271 = /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$react))).createContext(null);
|
|
38
|
+
function $745edbb83ab4296f$export$c6fdb837b070b4ff(props) {
|
|
39
|
+
let isSSR = (0, $kxJqT$reactariassr.useIsSSR)();
|
|
40
|
+
let { portalContainer: portalContainer = isSSR ? null : document.body, isExiting: isExiting } = props;
|
|
41
|
+
let [contain, setContain] = (0, $kxJqT$react.useState)(false);
|
|
42
|
+
let contextValue = (0, $kxJqT$react.useMemo)(()=>({
|
|
43
|
+
contain: contain,
|
|
44
|
+
setContain: setContain
|
|
45
|
+
}), [
|
|
46
|
+
contain,
|
|
47
|
+
setContain
|
|
48
|
+
]);
|
|
49
|
+
let { getContainer: getContainer } = (0, $d7347c25ab757295$exports.useUNSTABLE_PortalContext)();
|
|
50
|
+
if (!props.portalContainer && getContainer) portalContainer = getContainer();
|
|
51
|
+
if (!portalContainer) return null;
|
|
52
|
+
let contents = props.children;
|
|
53
|
+
if (!props.disableFocusManagement) contents = /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$react))).createElement((0, $kxJqT$reactariafocus.FocusScope), {
|
|
54
|
+
restoreFocus: true,
|
|
55
|
+
contain: contain && !isExiting
|
|
56
|
+
}, contents);
|
|
57
|
+
contents = /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$react))).createElement($745edbb83ab4296f$export$a2200b96afd16271.Provider, {
|
|
58
|
+
value: contextValue
|
|
59
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$react))).createElement((0, $kxJqT$reactariainteractions.ClearPressResponder), null, contents));
|
|
60
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$reactdom))).createPortal(contents, portalContainer);
|
|
61
|
+
}
|
|
62
|
+
function $745edbb83ab4296f$export$14c98a7594375490() {
|
|
63
|
+
let ctx = (0, $kxJqT$react.useContext)($745edbb83ab4296f$export$a2200b96afd16271);
|
|
64
|
+
let setContain = ctx === null || ctx === void 0 ? void 0 : ctx.setContain;
|
|
65
|
+
(0, $kxJqT$reactariautils.useLayoutEffect)(()=>{
|
|
66
|
+
setContain === null || setContain === void 0 ? void 0 : setContain(true);
|
|
67
|
+
}, [
|
|
68
|
+
setContain
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=Overlay.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA+BM,MAAM,0DAAiB,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAC;AAM3C,SAAS,0CAAQ,KAAmB;IACzC,IAAI,QAAQ,CAAA,GAAA,4BAAO;IACnB,IAAI,mBAAC,kBAAkB,QAAQ,OAAO,SAAS,IAAI,aAAE,SAAS,EAAC,GAAG;IAClE,IAAI,CAAC,SAAS,WAAW,GAAG,CAAA,GAAA,qBAAO,EAAE;IACrC,IAAI,eAAe,CAAA,GAAA,oBAAM,EAAE,IAAO,CAAA;qBAAC;wBAAS;QAAU,CAAA,GAAI;QAAC;QAAS;KAAW;IAE/E,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,mDAAwB;IAC7C,IAAK,CAAC,MAAM,eAAe,IAAI,cAC7B,kBAAkB;IAGpB,IAAI,CAAC,iBACH,OAAO;IAGT,IAAI,WAAW,MAAM,QAAQ;IAC7B,IAAI,CAAC,MAAM,sBAAsB,EAC/B,yBACE,0DAAC,CAAA,GAAA,gCAAS;QAAE,cAAA;QAAa,SAAS,WAAW,CAAC;OAC3C;IAKP,yBACE,0DAAC,0CAAe,QAAQ;QAAC,OAAO;qBAC9B,0DAAC,CAAA,GAAA,gDAAkB,SAChB;IAKP,qBAAO,CAAA,GAAA,yCAAO,EAAE,YAAY,CAAC,UAAU;AACzC;AAGO,SAAS;IACd,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,IAAI,aAAa,gBAAA,0BAAA,IAAK,UAAU;IAChC,CAAA,GAAA,qCAAc,EAAE;QACd,uBAAA,iCAAA,WAAa;IACf,GAAG;QAAC;KAAW;AACjB","sources":["packages/@react-aria/overlays/src/Overlay.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ClearPressResponder} from '@react-aria/interactions';\nimport {FocusScope} from '@react-aria/focus';\nimport React, {ReactNode, useContext, useMemo, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport {useIsSSR} from '@react-aria/ssr';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useUNSTABLE_PortalContext} from './PortalProvider';\n\nexport interface OverlayProps {\n /**\n * The container element in which the overlay portal will be placed.\n * @default document.body\n */\n portalContainer?: Element,\n /** The overlay to render in the portal. */\n children: ReactNode,\n /**\n * Disables default focus management for the overlay, including containment and restoration.\n * This option should be used very carefully. When focus management is disabled, you must\n * implement focus containment and restoration to ensure the overlay is keyboard accessible.\n */\n disableFocusManagement?: boolean,\n /**\n * Whether the overlay is currently performing an exit animation. When true,\n * focus is allowed to move outside.\n */\n isExiting?: boolean\n}\n\nexport const OverlayContext = React.createContext(null);\n\n/**\n * A container which renders an overlay such as a popover or modal in a portal,\n * and provides a focus scope for the child elements.\n */\nexport function Overlay(props: OverlayProps) {\n let isSSR = useIsSSR();\n let {portalContainer = isSSR ? null : document.body, isExiting} = props;\n let [contain, setContain] = useState(false);\n let contextValue = useMemo(() => ({contain, setContain}), [contain, setContain]);\n\n let {getContainer} = useUNSTABLE_PortalContext();\n if (!props.portalContainer && getContainer) {\n portalContainer = getContainer();\n }\n\n if (!portalContainer) {\n return null;\n }\n\n let contents = props.children;\n if (!props.disableFocusManagement) {\n contents = (\n <FocusScope restoreFocus contain={contain && !isExiting}>\n {contents}\n </FocusScope>\n );\n }\n\n contents = (\n <OverlayContext.Provider value={contextValue}>\n <ClearPressResponder>\n {contents}\n </ClearPressResponder>\n </OverlayContext.Provider>\n );\n\n return ReactDOM.createPortal(contents, portalContainer);\n}\n\n/** @private */\nexport function useOverlayFocusContain() {\n let ctx = useContext(OverlayContext);\n let setContain = ctx?.setContain;\n useLayoutEffect(() => {\n setContain?.(true);\n }, [setContain]);\n}\n"],"names":[],"version":3,"file":"Overlay.main.js.map"}
|
package/dist/Overlay.mjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {useUNSTABLE_PortalContext as $96b38030c423d352$export$574e9b0fb070c3b0} from "./PortalProvider.mjs";
|
|
2
|
+
import {ClearPressResponder as $1CM7W$ClearPressResponder} from "@react-aria/interactions";
|
|
3
|
+
import {FocusScope as $1CM7W$FocusScope} from "@react-aria/focus";
|
|
4
|
+
import $1CM7W$react, {useState as $1CM7W$useState, useMemo as $1CM7W$useMemo, useContext as $1CM7W$useContext} from "react";
|
|
5
|
+
import $1CM7W$reactdom from "react-dom";
|
|
6
|
+
import {useIsSSR as $1CM7W$useIsSSR} from "@react-aria/ssr";
|
|
7
|
+
import {useLayoutEffect as $1CM7W$useLayoutEffect} from "@react-aria/utils";
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
11
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
13
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
16
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
17
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
18
|
+
* governing permissions and limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const $337b884510726a0d$export$a2200b96afd16271 = /*#__PURE__*/ (0, $1CM7W$react).createContext(null);
|
|
27
|
+
function $337b884510726a0d$export$c6fdb837b070b4ff(props) {
|
|
28
|
+
let isSSR = (0, $1CM7W$useIsSSR)();
|
|
29
|
+
let { portalContainer: portalContainer = isSSR ? null : document.body, isExiting: isExiting } = props;
|
|
30
|
+
let [contain, setContain] = (0, $1CM7W$useState)(false);
|
|
31
|
+
let contextValue = (0, $1CM7W$useMemo)(()=>({
|
|
32
|
+
contain: contain,
|
|
33
|
+
setContain: setContain
|
|
34
|
+
}), [
|
|
35
|
+
contain,
|
|
36
|
+
setContain
|
|
37
|
+
]);
|
|
38
|
+
let { getContainer: getContainer } = (0, $96b38030c423d352$export$574e9b0fb070c3b0)();
|
|
39
|
+
if (!props.portalContainer && getContainer) portalContainer = getContainer();
|
|
40
|
+
if (!portalContainer) return null;
|
|
41
|
+
let contents = props.children;
|
|
42
|
+
if (!props.disableFocusManagement) contents = /*#__PURE__*/ (0, $1CM7W$react).createElement((0, $1CM7W$FocusScope), {
|
|
43
|
+
restoreFocus: true,
|
|
44
|
+
contain: contain && !isExiting
|
|
45
|
+
}, contents);
|
|
46
|
+
contents = /*#__PURE__*/ (0, $1CM7W$react).createElement($337b884510726a0d$export$a2200b96afd16271.Provider, {
|
|
47
|
+
value: contextValue
|
|
48
|
+
}, /*#__PURE__*/ (0, $1CM7W$react).createElement((0, $1CM7W$ClearPressResponder), null, contents));
|
|
49
|
+
return /*#__PURE__*/ (0, $1CM7W$reactdom).createPortal(contents, portalContainer);
|
|
50
|
+
}
|
|
51
|
+
function $337b884510726a0d$export$14c98a7594375490() {
|
|
52
|
+
let ctx = (0, $1CM7W$useContext)($337b884510726a0d$export$a2200b96afd16271);
|
|
53
|
+
let setContain = ctx === null || ctx === void 0 ? void 0 : ctx.setContain;
|
|
54
|
+
(0, $1CM7W$useLayoutEffect)(()=>{
|
|
55
|
+
setContain === null || setContain === void 0 ? void 0 : setContain(true);
|
|
56
|
+
}, [
|
|
57
|
+
setContain
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
export {$337b884510726a0d$export$a2200b96afd16271 as OverlayContext, $337b884510726a0d$export$c6fdb837b070b4ff as Overlay, $337b884510726a0d$export$14c98a7594375490 as useOverlayFocusContain};
|
|
63
|
+
//# sourceMappingURL=Overlay.mjs.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {useUNSTABLE_PortalContext as $96b38030c423d352$export$574e9b0fb070c3b0} from "./PortalProvider.module.js";
|
|
2
|
+
import {ClearPressResponder as $1CM7W$ClearPressResponder} from "@react-aria/interactions";
|
|
3
|
+
import {FocusScope as $1CM7W$FocusScope} from "@react-aria/focus";
|
|
4
|
+
import $1CM7W$react, {useState as $1CM7W$useState, useMemo as $1CM7W$useMemo, useContext as $1CM7W$useContext} from "react";
|
|
5
|
+
import $1CM7W$reactdom from "react-dom";
|
|
6
|
+
import {useIsSSR as $1CM7W$useIsSSR} from "@react-aria/ssr";
|
|
7
|
+
import {useLayoutEffect as $1CM7W$useLayoutEffect} from "@react-aria/utils";
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
11
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
13
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
16
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
17
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
18
|
+
* governing permissions and limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const $337b884510726a0d$export$a2200b96afd16271 = /*#__PURE__*/ (0, $1CM7W$react).createContext(null);
|
|
27
|
+
function $337b884510726a0d$export$c6fdb837b070b4ff(props) {
|
|
28
|
+
let isSSR = (0, $1CM7W$useIsSSR)();
|
|
29
|
+
let { portalContainer: portalContainer = isSSR ? null : document.body, isExiting: isExiting } = props;
|
|
30
|
+
let [contain, setContain] = (0, $1CM7W$useState)(false);
|
|
31
|
+
let contextValue = (0, $1CM7W$useMemo)(()=>({
|
|
32
|
+
contain: contain,
|
|
33
|
+
setContain: setContain
|
|
34
|
+
}), [
|
|
35
|
+
contain,
|
|
36
|
+
setContain
|
|
37
|
+
]);
|
|
38
|
+
let { getContainer: getContainer } = (0, $96b38030c423d352$export$574e9b0fb070c3b0)();
|
|
39
|
+
if (!props.portalContainer && getContainer) portalContainer = getContainer();
|
|
40
|
+
if (!portalContainer) return null;
|
|
41
|
+
let contents = props.children;
|
|
42
|
+
if (!props.disableFocusManagement) contents = /*#__PURE__*/ (0, $1CM7W$react).createElement((0, $1CM7W$FocusScope), {
|
|
43
|
+
restoreFocus: true,
|
|
44
|
+
contain: contain && !isExiting
|
|
45
|
+
}, contents);
|
|
46
|
+
contents = /*#__PURE__*/ (0, $1CM7W$react).createElement($337b884510726a0d$export$a2200b96afd16271.Provider, {
|
|
47
|
+
value: contextValue
|
|
48
|
+
}, /*#__PURE__*/ (0, $1CM7W$react).createElement((0, $1CM7W$ClearPressResponder), null, contents));
|
|
49
|
+
return /*#__PURE__*/ (0, $1CM7W$reactdom).createPortal(contents, portalContainer);
|
|
50
|
+
}
|
|
51
|
+
function $337b884510726a0d$export$14c98a7594375490() {
|
|
52
|
+
let ctx = (0, $1CM7W$useContext)($337b884510726a0d$export$a2200b96afd16271);
|
|
53
|
+
let setContain = ctx === null || ctx === void 0 ? void 0 : ctx.setContain;
|
|
54
|
+
(0, $1CM7W$useLayoutEffect)(()=>{
|
|
55
|
+
setContain === null || setContain === void 0 ? void 0 : setContain(true);
|
|
56
|
+
}, [
|
|
57
|
+
setContain
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
export {$337b884510726a0d$export$a2200b96afd16271 as OverlayContext, $337b884510726a0d$export$c6fdb837b070b4ff as Overlay, $337b884510726a0d$export$14c98a7594375490 as useOverlayFocusContain};
|
|
63
|
+
//# sourceMappingURL=Overlay.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA+BM,MAAM,0DAAiB,CAAA,GAAA,YAAI,EAAE,aAAa,CAAC;AAM3C,SAAS,0CAAQ,KAAmB;IACzC,IAAI,QAAQ,CAAA,GAAA,eAAO;IACnB,IAAI,mBAAC,kBAAkB,QAAQ,OAAO,SAAS,IAAI,aAAE,SAAS,EAAC,GAAG;IAClE,IAAI,CAAC,SAAS,WAAW,GAAG,CAAA,GAAA,eAAO,EAAE;IACrC,IAAI,eAAe,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;qBAAC;wBAAS;QAAU,CAAA,GAAI;QAAC;QAAS;KAAW;IAE/E,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,yCAAwB;IAC7C,IAAK,CAAC,MAAM,eAAe,IAAI,cAC7B,kBAAkB;IAGpB,IAAI,CAAC,iBACH,OAAO;IAGT,IAAI,WAAW,MAAM,QAAQ;IAC7B,IAAI,CAAC,MAAM,sBAAsB,EAC/B,yBACE,gCAAC,CAAA,GAAA,iBAAS;QAAE,cAAA;QAAa,SAAS,WAAW,CAAC;OAC3C;IAKP,yBACE,gCAAC,0CAAe,QAAQ;QAAC,OAAO;qBAC9B,gCAAC,CAAA,GAAA,0BAAkB,SAChB;IAKP,qBAAO,CAAA,GAAA,eAAO,EAAE,YAAY,CAAC,UAAU;AACzC;AAGO,SAAS;IACd,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,IAAI,aAAa,gBAAA,0BAAA,IAAK,UAAU;IAChC,CAAA,GAAA,sBAAc,EAAE;QACd,uBAAA,iCAAA,WAAa;IACf,GAAG;QAAC;KAAW;AACjB","sources":["packages/@react-aria/overlays/src/Overlay.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ClearPressResponder} from '@react-aria/interactions';\nimport {FocusScope} from '@react-aria/focus';\nimport React, {ReactNode, useContext, useMemo, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport {useIsSSR} from '@react-aria/ssr';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useUNSTABLE_PortalContext} from './PortalProvider';\n\nexport interface OverlayProps {\n /**\n * The container element in which the overlay portal will be placed.\n * @default document.body\n */\n portalContainer?: Element,\n /** The overlay to render in the portal. */\n children: ReactNode,\n /**\n * Disables default focus management for the overlay, including containment and restoration.\n * This option should be used very carefully. When focus management is disabled, you must\n * implement focus containment and restoration to ensure the overlay is keyboard accessible.\n */\n disableFocusManagement?: boolean,\n /**\n * Whether the overlay is currently performing an exit animation. When true,\n * focus is allowed to move outside.\n */\n isExiting?: boolean\n}\n\nexport const OverlayContext = React.createContext(null);\n\n/**\n * A container which renders an overlay such as a popover or modal in a portal,\n * and provides a focus scope for the child elements.\n */\nexport function Overlay(props: OverlayProps) {\n let isSSR = useIsSSR();\n let {portalContainer = isSSR ? null : document.body, isExiting} = props;\n let [contain, setContain] = useState(false);\n let contextValue = useMemo(() => ({contain, setContain}), [contain, setContain]);\n\n let {getContainer} = useUNSTABLE_PortalContext();\n if (!props.portalContainer && getContainer) {\n portalContainer = getContainer();\n }\n\n if (!portalContainer) {\n return null;\n }\n\n let contents = props.children;\n if (!props.disableFocusManagement) {\n contents = (\n <FocusScope restoreFocus contain={contain && !isExiting}>\n {contents}\n </FocusScope>\n );\n }\n\n contents = (\n <OverlayContext.Provider value={contextValue}>\n <ClearPressResponder>\n {contents}\n </ClearPressResponder>\n </OverlayContext.Provider>\n );\n\n return ReactDOM.createPortal(contents, portalContainer);\n}\n\n/** @private */\nexport function useOverlayFocusContain() {\n let ctx = useContext(OverlayContext);\n let setContain = ctx?.setContain;\n useLayoutEffect(() => {\n setContain?.(true);\n }, [setContain]);\n}\n"],"names":[],"version":3,"file":"Overlay.module.js.map"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var $b2rU6$react = require("react");
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
function $parcel$interopDefault(a) {
|
|
5
|
+
return a && a.__esModule ? a.default : a;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function $parcel$export(e, n, v, s) {
|
|
9
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
$parcel$export(module.exports, "UNSTABLE_PortalProvider", () => $d7347c25ab757295$export$db995ea7163b4b67);
|
|
13
|
+
$parcel$export(module.exports, "useUNSTABLE_PortalContext", () => $d7347c25ab757295$export$574e9b0fb070c3b0);
|
|
14
|
+
/*
|
|
15
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
16
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
17
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
18
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
*
|
|
20
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
21
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
22
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
23
|
+
* governing permissions and limitations under the License.
|
|
24
|
+
*/
|
|
25
|
+
const $d7347c25ab757295$export$60d741e20e0aa309 = /*#__PURE__*/ (0, $b2rU6$react.createContext)({});
|
|
26
|
+
function $d7347c25ab757295$export$db995ea7163b4b67(props) {
|
|
27
|
+
let { getContainer: getContainer } = props;
|
|
28
|
+
let { getContainer: ctxGetContainer } = $d7347c25ab757295$export$574e9b0fb070c3b0();
|
|
29
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($b2rU6$react))).createElement($d7347c25ab757295$export$60d741e20e0aa309.Provider, {
|
|
30
|
+
value: {
|
|
31
|
+
getContainer: getContainer === null ? null : getContainer !== null && getContainer !== void 0 ? getContainer : ctxGetContainer
|
|
32
|
+
}
|
|
33
|
+
}, props.children);
|
|
34
|
+
}
|
|
35
|
+
function $d7347c25ab757295$export$574e9b0fb070c3b0() {
|
|
36
|
+
var _useContext;
|
|
37
|
+
return (_useContext = (0, $b2rU6$react.useContext)($d7347c25ab757295$export$60d741e20e0aa309)) !== null && _useContext !== void 0 ? _useContext : {};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=PortalProvider.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AASM,MAAM,0DAAgB,CAAA,GAAA,0BAAY,EAAuB,CAAC;AAE1D,SAAS,0CAAwB,KAAkD;IACxF,IAAI,gBAAC,YAAY,EAAC,GAAG;IACrB,IAAI,EAAC,cAAc,eAAe,EAAC,GAAG;IACtC,qBACE,0DAAC,0CAAc,QAAQ;QAAC,OAAO;YAAC,cAAc,iBAAiB,OAAO,OAAO,yBAAA,0BAAA,eAAgB;QAAe;OACzG,MAAM,QAAQ;AAGrB;AAEO,SAAS;QACP;IAAP,OAAO,CAAA,cAAA,CAAA,GAAA,uBAAS,EAAE,wDAAX,yBAAA,cAA6B,CAAC;AACvC","sources":["packages/@react-aria/overlays/src/PortalProvider.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React, {createContext, ReactNode, useContext} from 'react';\n\nexport interface PortalProviderProps {\n /* Should return the element where we should portal to. Can clear the context by passing null. */\n getContainer?: () => HTMLElement | null\n}\n\nexport const PortalContext = createContext<PortalProviderProps>({});\n\nexport function UNSTABLE_PortalProvider(props: PortalProviderProps & {children: ReactNode}) {\n let {getContainer} = props;\n let {getContainer: ctxGetContainer} = useUNSTABLE_PortalContext();\n return (\n <PortalContext.Provider value={{getContainer: getContainer === null ? null : getContainer ?? ctxGetContainer}}>\n {props.children}\n </PortalContext.Provider>\n );\n}\n\nexport function useUNSTABLE_PortalContext() {\n return useContext(PortalContext) ?? {};\n}\n"],"names":[],"version":3,"file":"PortalProvider.main.js.map"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import $7yuSY$react, {createContext as $7yuSY$createContext, useContext as $7yuSY$useContext} from "react";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
const $96b38030c423d352$export$60d741e20e0aa309 = /*#__PURE__*/ (0, $7yuSY$createContext)({});
|
|
15
|
+
function $96b38030c423d352$export$db995ea7163b4b67(props) {
|
|
16
|
+
let { getContainer: getContainer } = props;
|
|
17
|
+
let { getContainer: ctxGetContainer } = $96b38030c423d352$export$574e9b0fb070c3b0();
|
|
18
|
+
return /*#__PURE__*/ (0, $7yuSY$react).createElement($96b38030c423d352$export$60d741e20e0aa309.Provider, {
|
|
19
|
+
value: {
|
|
20
|
+
getContainer: getContainer === null ? null : getContainer !== null && getContainer !== void 0 ? getContainer : ctxGetContainer
|
|
21
|
+
}
|
|
22
|
+
}, props.children);
|
|
23
|
+
}
|
|
24
|
+
function $96b38030c423d352$export$574e9b0fb070c3b0() {
|
|
25
|
+
var _useContext;
|
|
26
|
+
return (_useContext = (0, $7yuSY$useContext)($96b38030c423d352$export$60d741e20e0aa309)) !== null && _useContext !== void 0 ? _useContext : {};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export {$96b38030c423d352$export$60d741e20e0aa309 as PortalContext, $96b38030c423d352$export$db995ea7163b4b67 as UNSTABLE_PortalProvider, $96b38030c423d352$export$574e9b0fb070c3b0 as useUNSTABLE_PortalContext};
|
|
31
|
+
//# sourceMappingURL=PortalProvider.mjs.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import $7yuSY$react, {createContext as $7yuSY$createContext, useContext as $7yuSY$useContext} from "react";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
const $96b38030c423d352$export$60d741e20e0aa309 = /*#__PURE__*/ (0, $7yuSY$createContext)({});
|
|
15
|
+
function $96b38030c423d352$export$db995ea7163b4b67(props) {
|
|
16
|
+
let { getContainer: getContainer } = props;
|
|
17
|
+
let { getContainer: ctxGetContainer } = $96b38030c423d352$export$574e9b0fb070c3b0();
|
|
18
|
+
return /*#__PURE__*/ (0, $7yuSY$react).createElement($96b38030c423d352$export$60d741e20e0aa309.Provider, {
|
|
19
|
+
value: {
|
|
20
|
+
getContainer: getContainer === null ? null : getContainer !== null && getContainer !== void 0 ? getContainer : ctxGetContainer
|
|
21
|
+
}
|
|
22
|
+
}, props.children);
|
|
23
|
+
}
|
|
24
|
+
function $96b38030c423d352$export$574e9b0fb070c3b0() {
|
|
25
|
+
var _useContext;
|
|
26
|
+
return (_useContext = (0, $7yuSY$useContext)($96b38030c423d352$export$60d741e20e0aa309)) !== null && _useContext !== void 0 ? _useContext : {};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export {$96b38030c423d352$export$60d741e20e0aa309 as PortalContext, $96b38030c423d352$export$db995ea7163b4b67 as UNSTABLE_PortalProvider, $96b38030c423d352$export$574e9b0fb070c3b0 as useUNSTABLE_PortalContext};
|
|
31
|
+
//# sourceMappingURL=PortalProvider.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;AAAA;;;;;;;;;;CAUC;AASM,MAAM,0DAAgB,CAAA,GAAA,oBAAY,EAAuB,CAAC;AAE1D,SAAS,0CAAwB,KAAkD;IACxF,IAAI,gBAAC,YAAY,EAAC,GAAG;IACrB,IAAI,EAAC,cAAc,eAAe,EAAC,GAAG;IACtC,qBACE,gCAAC,0CAAc,QAAQ;QAAC,OAAO;YAAC,cAAc,iBAAiB,OAAO,OAAO,yBAAA,0BAAA,eAAgB;QAAe;OACzG,MAAM,QAAQ;AAGrB;AAEO,SAAS;QACP;IAAP,OAAO,CAAA,cAAA,CAAA,GAAA,iBAAS,EAAE,wDAAX,yBAAA,cAA6B,CAAC;AACvC","sources":["packages/@react-aria/overlays/src/PortalProvider.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React, {createContext, ReactNode, useContext} from 'react';\n\nexport interface PortalProviderProps {\n /* Should return the element where we should portal to. Can clear the context by passing null. */\n getContainer?: () => HTMLElement | null\n}\n\nexport const PortalContext = createContext<PortalProviderProps>({});\n\nexport function UNSTABLE_PortalProvider(props: PortalProviderProps & {children: ReactNode}) {\n let {getContainer} = props;\n let {getContainer: ctxGetContainer} = useUNSTABLE_PortalContext();\n return (\n <PortalContext.Provider value={{getContainer: getContainer === null ? null : getContainer ?? ctxGetContainer}}>\n {props.children}\n </PortalContext.Provider>\n );\n}\n\nexport function useUNSTABLE_PortalContext() {\n return useContext(PortalContext) ?? {};\n}\n"],"names":[],"version":3,"file":"PortalProvider.module.js.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,mCAAK,CAAC;AACtC","sources":["packages/@react-aria/overlays/intl/ar-AE.json"],"sourcesContent":["{\n \"dismiss\": \"تجاهل\"\n}\n"],"names":[],"version":3,"file":"ar-AE.main.js.map"}
|
package/dist/ar-AE.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,mCAAK,CAAC;AACtC","sources":["packages/@react-aria/overlays/intl/ar-AE.json"],"sourcesContent":["{\n \"dismiss\": \"تجاهل\"\n}\n"],"names":[],"version":3,"file":"ar-AE.module.js.map"}
|