@react-spectrum/dialog 3.8.8 → 3.8.10
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/AlertDialog.main.js +98 -0
- package/dist/AlertDialog.main.js.map +1 -0
- package/dist/AlertDialog.mjs +93 -0
- package/dist/AlertDialog.module.js +93 -0
- package/dist/AlertDialog.module.js.map +1 -0
- package/dist/Dialog.main.js +135 -0
- package/dist/Dialog.main.js.map +1 -0
- package/dist/Dialog.mjs +130 -0
- package/dist/Dialog.module.js +130 -0
- package/dist/Dialog.module.js.map +1 -0
- package/dist/DialogContainer.main.js +63 -0
- package/dist/DialogContainer.main.js.map +1 -0
- package/dist/DialogContainer.mjs +54 -0
- package/dist/DialogContainer.module.js +54 -0
- package/dist/DialogContainer.module.js.map +1 -0
- package/dist/DialogTrigger.main.js +162 -0
- package/dist/DialogTrigger.main.js.map +1 -0
- package/dist/DialogTrigger.mjs +153 -0
- package/dist/DialogTrigger.module.js +153 -0
- package/dist/DialogTrigger.module.js.map +1 -0
- package/dist/ar-AE.main.js +7 -0
- package/dist/ar-AE.main.js.map +1 -0
- package/dist/ar-AE.mjs +9 -0
- package/dist/ar-AE.module.js +9 -0
- package/dist/ar-AE.module.js.map +1 -0
- package/dist/bg-BG.main.js +7 -0
- package/dist/bg-BG.main.js.map +1 -0
- package/dist/bg-BG.mjs +9 -0
- package/dist/bg-BG.module.js +9 -0
- package/dist/bg-BG.module.js.map +1 -0
- package/dist/context.main.js +27 -0
- package/dist/context.main.js.map +1 -0
- package/dist/context.mjs +18 -0
- package/dist/context.module.js +18 -0
- package/dist/context.module.js.map +1 -0
- package/dist/cs-CZ.main.js +7 -0
- package/dist/cs-CZ.main.js.map +1 -0
- package/dist/cs-CZ.mjs +9 -0
- package/dist/cs-CZ.module.js +9 -0
- package/dist/cs-CZ.module.js.map +1 -0
- package/dist/da-DK.main.js +7 -0
- package/dist/da-DK.main.js.map +1 -0
- package/dist/da-DK.mjs +9 -0
- package/dist/da-DK.module.js +9 -0
- package/dist/da-DK.module.js.map +1 -0
- package/dist/de-DE.main.js +7 -0
- package/dist/de-DE.main.js.map +1 -0
- package/dist/de-DE.mjs +9 -0
- package/dist/de-DE.module.js +9 -0
- package/dist/de-DE.module.js.map +1 -0
- package/dist/dialog_vars_css.main.js +161 -0
- package/dist/dialog_vars_css.main.js.map +1 -0
- package/dist/dialog_vars_css.mjs +163 -0
- package/dist/dialog_vars_css.module.js +163 -0
- package/dist/dialog_vars_css.module.js.map +1 -0
- package/dist/el-GR.main.js +7 -0
- package/dist/el-GR.main.js.map +1 -0
- package/dist/el-GR.mjs +9 -0
- package/dist/el-GR.module.js +9 -0
- package/dist/el-GR.module.js.map +1 -0
- package/dist/en-US.main.js +7 -0
- package/dist/en-US.main.js.map +1 -0
- package/dist/en-US.mjs +9 -0
- package/dist/en-US.module.js +9 -0
- package/dist/en-US.module.js.map +1 -0
- package/dist/es-ES.main.js +7 -0
- package/dist/es-ES.main.js.map +1 -0
- package/dist/es-ES.mjs +9 -0
- package/dist/es-ES.module.js +9 -0
- package/dist/es-ES.module.js.map +1 -0
- package/dist/et-EE.main.js +7 -0
- package/dist/et-EE.main.js.map +1 -0
- package/dist/et-EE.mjs +9 -0
- package/dist/et-EE.module.js +9 -0
- package/dist/et-EE.module.js.map +1 -0
- package/dist/fi-FI.main.js +7 -0
- package/dist/fi-FI.main.js.map +1 -0
- package/dist/fi-FI.mjs +9 -0
- package/dist/fi-FI.module.js +9 -0
- package/dist/fi-FI.module.js.map +1 -0
- package/dist/fr-FR.main.js +7 -0
- package/dist/fr-FR.main.js.map +1 -0
- package/dist/fr-FR.mjs +9 -0
- package/dist/fr-FR.module.js +9 -0
- package/dist/fr-FR.module.js.map +1 -0
- package/dist/he-IL.main.js +7 -0
- package/dist/he-IL.main.js.map +1 -0
- package/dist/he-IL.mjs +9 -0
- package/dist/he-IL.module.js +9 -0
- package/dist/he-IL.module.js.map +1 -0
- package/dist/hr-HR.main.js +7 -0
- package/dist/hr-HR.main.js.map +1 -0
- package/dist/hr-HR.mjs +9 -0
- package/dist/hr-HR.module.js +9 -0
- package/dist/hr-HR.module.js.map +1 -0
- package/dist/hu-HU.main.js +7 -0
- package/dist/hu-HU.main.js.map +1 -0
- package/dist/hu-HU.mjs +9 -0
- package/dist/hu-HU.module.js +9 -0
- package/dist/hu-HU.module.js.map +1 -0
- package/dist/import.mjs +5 -862
- 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 +7 -0
- package/dist/it-IT.main.js.map +1 -0
- package/dist/it-IT.mjs +9 -0
- package/dist/it-IT.module.js +9 -0
- package/dist/it-IT.module.js.map +1 -0
- package/dist/ja-JP.main.js +7 -0
- package/dist/ja-JP.main.js.map +1 -0
- package/dist/ja-JP.mjs +9 -0
- package/dist/ja-JP.module.js +9 -0
- package/dist/ja-JP.module.js.map +1 -0
- package/dist/ko-KR.main.js +7 -0
- package/dist/ko-KR.main.js.map +1 -0
- package/dist/ko-KR.mjs +9 -0
- package/dist/ko-KR.module.js +9 -0
- package/dist/ko-KR.module.js.map +1 -0
- package/dist/lt-LT.main.js +7 -0
- package/dist/lt-LT.main.js.map +1 -0
- package/dist/lt-LT.mjs +9 -0
- package/dist/lt-LT.module.js +9 -0
- package/dist/lt-LT.module.js.map +1 -0
- package/dist/lv-LV.main.js +7 -0
- package/dist/lv-LV.main.js.map +1 -0
- package/dist/lv-LV.mjs +9 -0
- package/dist/lv-LV.module.js +9 -0
- package/dist/lv-LV.module.js.map +1 -0
- package/dist/main.js +10 -863
- package/dist/main.js.map +1 -1
- package/dist/module.js +5 -862
- package/dist/module.js.map +1 -1
- package/dist/nb-NO.main.js +7 -0
- package/dist/nb-NO.main.js.map +1 -0
- package/dist/nb-NO.mjs +9 -0
- package/dist/nb-NO.module.js +9 -0
- package/dist/nb-NO.module.js.map +1 -0
- package/dist/nl-NL.main.js +7 -0
- package/dist/nl-NL.main.js.map +1 -0
- package/dist/nl-NL.mjs +9 -0
- package/dist/nl-NL.module.js +9 -0
- package/dist/nl-NL.module.js.map +1 -0
- package/dist/pl-PL.main.js +7 -0
- package/dist/pl-PL.main.js.map +1 -0
- package/dist/pl-PL.mjs +9 -0
- package/dist/pl-PL.module.js +9 -0
- package/dist/pl-PL.module.js.map +1 -0
- package/dist/pt-BR.main.js +7 -0
- package/dist/pt-BR.main.js.map +1 -0
- package/dist/pt-BR.mjs +9 -0
- package/dist/pt-BR.module.js +9 -0
- package/dist/pt-BR.module.js.map +1 -0
- package/dist/pt-PT.main.js +7 -0
- package/dist/pt-PT.main.js.map +1 -0
- package/dist/pt-PT.mjs +9 -0
- package/dist/pt-PT.module.js +9 -0
- package/dist/pt-PT.module.js.map +1 -0
- package/dist/ro-RO.main.js +7 -0
- package/dist/ro-RO.main.js.map +1 -0
- package/dist/ro-RO.mjs +9 -0
- package/dist/ro-RO.module.js +9 -0
- package/dist/ro-RO.module.js.map +1 -0
- package/dist/ru-RU.main.js +7 -0
- package/dist/ru-RU.main.js.map +1 -0
- package/dist/ru-RU.mjs +9 -0
- package/dist/ru-RU.module.js +9 -0
- package/dist/ru-RU.module.js.map +1 -0
- package/dist/sk-SK.main.js +7 -0
- package/dist/sk-SK.main.js.map +1 -0
- package/dist/sk-SK.mjs +9 -0
- package/dist/sk-SK.module.js +9 -0
- package/dist/sk-SK.module.js.map +1 -0
- package/dist/sl-SI.main.js +7 -0
- package/dist/sl-SI.main.js.map +1 -0
- package/dist/sl-SI.mjs +9 -0
- package/dist/sl-SI.module.js +9 -0
- package/dist/sl-SI.module.js.map +1 -0
- package/dist/sr-SP.main.js +7 -0
- package/dist/sr-SP.main.js.map +1 -0
- package/dist/sr-SP.mjs +9 -0
- package/dist/sr-SP.module.js +9 -0
- package/dist/sr-SP.module.js.map +1 -0
- package/dist/sv-SE.main.js +7 -0
- package/dist/sv-SE.main.js.map +1 -0
- package/dist/sv-SE.mjs +9 -0
- package/dist/sv-SE.module.js +9 -0
- package/dist/sv-SE.module.js.map +1 -0
- package/dist/tr-TR.main.js +7 -0
- package/dist/tr-TR.main.js.map +1 -0
- package/dist/tr-TR.mjs +9 -0
- package/dist/tr-TR.module.js +9 -0
- package/dist/tr-TR.module.js.map +1 -0
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.main.js +7 -0
- package/dist/uk-UA.main.js.map +1 -0
- package/dist/uk-UA.mjs +9 -0
- package/dist/uk-UA.module.js +9 -0
- package/dist/uk-UA.module.js.map +1 -0
- package/dist/useDialogContainer.main.js +34 -0
- package/dist/useDialogContainer.main.js.map +1 -0
- package/dist/useDialogContainer.mjs +29 -0
- package/dist/useDialogContainer.module.js +29 -0
- package/dist/useDialogContainer.module.js.map +1 -0
- package/dist/vars.6a3d7df3.css +519 -0
- package/dist/vars.6a3d7df3.css.map +1 -0
- package/dist/zh-CN.main.js +7 -0
- package/dist/zh-CN.main.js.map +1 -0
- package/dist/zh-CN.mjs +9 -0
- package/dist/zh-CN.module.js +9 -0
- package/dist/zh-CN.module.js.map +1 -0
- package/dist/zh-TW.main.js +7 -0
- package/dist/zh-TW.main.js.map +1 -0
- package/dist/zh-TW.mjs +9 -0
- package/dist/zh-TW.module.js +9 -0
- package/dist/zh-TW.module.js.map +1 -0
- package/package.json +21 -21
- package/dist/main.css +0 -1
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;ACmHA;;;GAGG;AACH,OAAA,IAAI,4GAAkC,CAAC;ACPvC;;GAEG;AACH,OAAA,IAAI,sHAAsC,CAAC;ACoB3C;;;;GAIG;AAGH,OAAA,IAAI,uBAA0C,0BAA0B,KAAK,WAAW,CAAC;AC5HzF;;;;GAIG;AACH,gCAAgC,KAAK,EAAE,4BAA4B,qBAuDlE;AC/DD;IACE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,oBAAoB,CAAC;IACzE,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,sCAAsC,oBAAoB,CAYzD;ACZD,YAAY,EAAC,wBAAwB,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,0BAA0B,EAAC,MAAM,qBAAqB,CAAC","sources":["packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/context.ts","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/Dialog.tsx","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/AlertDialog.tsx","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/DialogTrigger.tsx","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/DialogContainer.tsx","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/useDialogContainer.ts","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/index.ts","packages/@react-spectrum/dialog/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {AlertDialog} from './AlertDialog';\nexport {Dialog} from './Dialog';\nexport {DialogTrigger} from './DialogTrigger';\nexport {DialogContainer} from './DialogContainer';\nexport {useDialogContainer} from './useDialogContainer';\n\nexport type {SpectrumAlertDialogProps, SpectrumDialogProps, SpectrumDialogContainerProps, SpectrumDialogTriggerProps} from '@react-types/dialog';\nexport type {DialogContainerValue} from './useDialogContainer';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,4FAAc,CAAC;IAC3C,WAAW,CAAC,+DAAS,CAAC;AACxB","sources":["packages/@react-spectrum/dialog/intl/uk-UA.json"],"sourcesContent":["{\n \"alert\": \"Сигнал тривоги\",\n \"dismiss\": \"Скасувати\"\n}\n"],"names":[],"version":3,"file":"uk-UA.main.js.map"}
|
package/dist/uk-UA.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $2fa80cee796b989c$exports = {};
|
|
2
|
+
$2fa80cee796b989c$exports = {
|
|
3
|
+
"alert": `\u{421}\u{438}\u{433}\u{43D}\u{430}\u{43B} \u{442}\u{440}\u{438}\u{432}\u{43E}\u{433}\u{438}`,
|
|
4
|
+
"dismiss": `\u{421}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438}`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$2fa80cee796b989c$exports as default};
|
|
9
|
+
//# sourceMappingURL=uk-UA.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var $2fa80cee796b989c$exports = {};
|
|
2
|
+
$2fa80cee796b989c$exports = {
|
|
3
|
+
"alert": `\u{421}\u{438}\u{433}\u{43D}\u{430}\u{43B} \u{442}\u{440}\u{438}\u{432}\u{43E}\u{433}\u{438}`,
|
|
4
|
+
"dismiss": `\u{421}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438}`
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export {$2fa80cee796b989c$exports as default};
|
|
9
|
+
//# sourceMappingURL=uk-UA.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,4FAAc,CAAC;IAC3C,WAAW,CAAC,+DAAS,CAAC;AACxB","sources":["packages/@react-spectrum/dialog/intl/uk-UA.json"],"sourcesContent":["{\n \"alert\": \"Сигнал тривоги\",\n \"dismiss\": \"Скасувати\"\n}\n"],"names":[],"version":3,"file":"uk-UA.module.js.map"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var $0eb909ad2388d989$exports = require("./context.main.js");
|
|
2
|
+
var $9DI8Y$react = require("react");
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
function $parcel$export(e, n, v, s) {
|
|
6
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
$parcel$export(module.exports, "useDialogContainer", () => $1f05ce3abe26c4cc$export$a2f2d8fa6720dab1);
|
|
10
|
+
/*
|
|
11
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
12
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
14
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
17
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
18
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
19
|
+
* governing permissions and limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
function $1f05ce3abe26c4cc$export$a2f2d8fa6720dab1() {
|
|
23
|
+
let context = (0, $9DI8Y$react.useContext)((0, $0eb909ad2388d989$exports.DialogContext));
|
|
24
|
+
if (!context) throw new Error("Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.");
|
|
25
|
+
return {
|
|
26
|
+
type: context.type,
|
|
27
|
+
dismiss () {
|
|
28
|
+
context === null || context === void 0 ? void 0 : context.onClose();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=useDialogContainer.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAUM,SAAS;IACd,IAAI,UAAU,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,uCAAY;IACrC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM;IAGlB,OAAO;QACL,MAAM,QAAQ,IAAI;QAClB;YACE,oBAAA,8BAAA,QAAS,OAAO;QAClB;IACF;AACF","sources":["packages/@react-spectrum/dialog/src/useDialogContainer.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DialogContext} from './context';\nimport {useContext} from 'react';\n\nexport interface DialogContainerValue {\n type: 'modal' | 'popover' | 'tray' | 'fullscreen' | 'fullscreenTakeover',\n dismiss(): void\n}\n\nexport function useDialogContainer(): DialogContainerValue {\n let context = useContext(DialogContext);\n if (!context) {\n throw new Error('Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.');\n }\n\n return {\n type: context.type,\n dismiss() {\n context?.onClose();\n }\n };\n}\n"],"names":[],"version":3,"file":"useDialogContainer.main.js.map"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {DialogContext as $97b119e05830ea0d$export$8b93a07348a7730c} from "./context.mjs";
|
|
2
|
+
import {useContext as $8u5hv$useContext} from "react";
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
6
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
+
* governing permissions and limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
function $faffee7da30e8f89$export$a2f2d8fa6720dab1() {
|
|
17
|
+
let context = (0, $8u5hv$useContext)((0, $97b119e05830ea0d$export$8b93a07348a7730c));
|
|
18
|
+
if (!context) throw new Error("Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.");
|
|
19
|
+
return {
|
|
20
|
+
type: context.type,
|
|
21
|
+
dismiss () {
|
|
22
|
+
context === null || context === void 0 ? void 0 : context.onClose();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export {$faffee7da30e8f89$export$a2f2d8fa6720dab1 as useDialogContainer};
|
|
29
|
+
//# sourceMappingURL=useDialogContainer.mjs.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {DialogContext as $97b119e05830ea0d$export$8b93a07348a7730c} from "./context.module.js";
|
|
2
|
+
import {useContext as $8u5hv$useContext} from "react";
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
6
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
+
* governing permissions and limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
function $faffee7da30e8f89$export$a2f2d8fa6720dab1() {
|
|
17
|
+
let context = (0, $8u5hv$useContext)((0, $97b119e05830ea0d$export$8b93a07348a7730c));
|
|
18
|
+
if (!context) throw new Error("Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.");
|
|
19
|
+
return {
|
|
20
|
+
type: context.type,
|
|
21
|
+
dismiss () {
|
|
22
|
+
context === null || context === void 0 ? void 0 : context.onClose();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export {$faffee7da30e8f89$export$a2f2d8fa6720dab1 as useDialogContainer};
|
|
29
|
+
//# sourceMappingURL=useDialogContainer.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAUM,SAAS;IACd,IAAI,UAAU,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAY;IACrC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM;IAGlB,OAAO;QACL,MAAM,QAAQ,IAAI;QAClB;YACE,oBAAA,8BAAA,QAAS,OAAO;QAClB;IACF;AACF","sources":["packages/@react-spectrum/dialog/src/useDialogContainer.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DialogContext} from './context';\nimport {useContext} from 'react';\n\nexport interface DialogContainerValue {\n type: 'modal' | 'popover' | 'tray' | 'fullscreen' | 'fullscreenTakeover',\n dismiss(): void\n}\n\nexport function useDialogContainer(): DialogContainerValue {\n let context = useContext(DialogContext);\n if (!context) {\n throw new Error('Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.');\n }\n\n return {\n type: context.type,\n dismiss() {\n context?.onClose();\n }\n };\n}\n"],"names":[],"version":3,"file":"useDialogContainer.module.js.map"}
|