@react-spectrum/overlays 5.9.2 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.mjs +6 -6
- package/dist/main.js +10 -10
- package/dist/main.js.map +1 -1
- package/dist/module.js +6 -6
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +6 -0
- package/package.json +13 -33
- package/src/index.ts +7 -5
- package/dist/Modal.main.js +0 -93
- package/dist/Modal.main.js.map +0 -1
- package/dist/Modal.mjs +0 -88
- package/dist/Modal.module.js +0 -88
- package/dist/Modal.module.js.map +0 -1
- package/dist/OpenTransition.main.js +0 -44
- package/dist/OpenTransition.main.js.map +0 -1
- package/dist/OpenTransition.mjs +0 -35
- package/dist/OpenTransition.module.js +0 -35
- package/dist/OpenTransition.module.js.map +0 -1
- package/dist/Overlay.main.js +0 -75
- package/dist/Overlay.main.js.map +0 -1
- package/dist/Overlay.mjs +0 -66
- package/dist/Overlay.module.js +0 -66
- package/dist/Overlay.module.js.map +0 -1
- package/dist/Popover.main.js +0 -206
- package/dist/Popover.main.js.map +0 -1
- package/dist/Popover.mjs +0 -201
- package/dist/Popover.module.js +0 -201
- package/dist/Popover.module.js.map +0 -1
- package/dist/Tray.main.js +0 -105
- package/dist/Tray.main.js.map +0 -1
- package/dist/Tray.mjs +0 -100
- package/dist/Tray.module.js +0 -100
- package/dist/Tray.module.js.map +0 -1
- package/dist/Underlay.main.js +0 -54
- package/dist/Underlay.main.js.map +0 -1
- package/dist/Underlay.mjs +0 -49
- package/dist/Underlay.module.js +0 -49
- package/dist/Underlay.module.js.map +0 -1
- package/dist/modal_vars_css.main.js +0 -59
- package/dist/modal_vars_css.main.js.map +0 -1
- package/dist/modal_vars_css.mjs +0 -61
- package/dist/modal_vars_css.module.js +0 -61
- package/dist/modal_vars_css.module.js.map +0 -1
- package/dist/overlays.c765f49e.css +0 -131
- package/dist/overlays.c765f49e.css.map +0 -1
- package/dist/overlays.ec5cd7e2.css +0 -210
- package/dist/overlays.ec5cd7e2.css.map +0 -1
- package/dist/overlays.ef39a1b9.css +0 -197
- package/dist/overlays.ef39a1b9.css.map +0 -1
- package/dist/overlays.f1e5a60e.css +0 -184
- package/dist/overlays.f1e5a60e.css.map +0 -1
- package/dist/overlays.f8d97b78.css +0 -12
- package/dist/overlays.f8d97b78.css.map +0 -1
- package/dist/overlays_css.main.js +0 -35
- package/dist/overlays_css.main.js.map +0 -1
- package/dist/overlays_css.mjs +0 -37
- package/dist/overlays_css.module.js +0 -37
- package/dist/overlays_css.module.js.map +0 -1
- package/dist/popover_vars_css.main.js +0 -83
- package/dist/popover_vars_css.main.js.map +0 -1
- package/dist/popover_vars_css.mjs +0 -85
- package/dist/popover_vars_css.module.js +0 -85
- package/dist/popover_vars_css.module.js.map +0 -1
- package/dist/tray_vars_css.main.js +0 -53
- package/dist/tray_vars_css.main.js.map +0 -1
- package/dist/tray_vars_css.mjs +0 -55
- package/dist/tray_vars_css.module.js +0 -55
- package/dist/tray_vars_css.module.js.map +0 -1
- package/dist/types.d.ts +0 -51
- package/dist/types.d.ts.map +0 -1
- package/dist/underlay_vars_css.main.js +0 -50
- package/dist/underlay_vars_css.main.js.map +0 -1
- package/dist/underlay_vars_css.mjs +0 -52
- package/dist/underlay_vars_css.module.js +0 -52
- package/dist/underlay_vars_css.module.js.map +0 -1
- package/src/Modal.tsx +0 -109
- package/src/OpenTransition.tsx +0 -47
- package/src/Overlay.tsx +0 -77
- package/src/Popover.tsx +0 -253
- package/src/Tray.tsx +0 -120
- package/src/Underlay.tsx +0 -43
- package/src/overlays.css +0 -32
package/dist/import.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {Overlay as $
|
|
2
|
-
import {Popover as $
|
|
3
|
-
import {Modal as $
|
|
4
|
-
import {Tray as $
|
|
5
|
-
import {OpenTransition as $
|
|
1
|
+
import {Overlay as $54c969fdbeac7d40$re_export$Overlay} from "@adobe/react-spectrum/private/overlays/Overlay";
|
|
2
|
+
import {Popover as $54c969fdbeac7d40$re_export$Popover} from "@adobe/react-spectrum/private/overlays/Popover";
|
|
3
|
+
import {Modal as $54c969fdbeac7d40$re_export$Modal} from "@adobe/react-spectrum/private/overlays/Modal";
|
|
4
|
+
import {Tray as $54c969fdbeac7d40$re_export$Tray} from "@adobe/react-spectrum/private/overlays/Tray";
|
|
5
|
+
import {OpenTransition as $54c969fdbeac7d40$re_export$OpenTransition} from "@adobe/react-spectrum/private/overlays/OpenTransition";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -22,5 +22,5 @@ import {OpenTransition as $bc765a7a041310da$export$b847a40ee92eff38} from "./Ope
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
export {$
|
|
25
|
+
export {$54c969fdbeac7d40$re_export$Overlay as Overlay, $54c969fdbeac7d40$re_export$Popover as Popover, $54c969fdbeac7d40$re_export$Modal as Modal, $54c969fdbeac7d40$re_export$Tray as Tray, $54c969fdbeac7d40$re_export$OpenTransition as OpenTransition};
|
|
26
26
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
1
|
+
var $buS3z$adobereactspectrumprivateoverlaysOverlay = require("@adobe/react-spectrum/private/overlays/Overlay");
|
|
2
|
+
var $buS3z$adobereactspectrumprivateoverlaysPopover = require("@adobe/react-spectrum/private/overlays/Popover");
|
|
3
|
+
var $buS3z$adobereactspectrumprivateoverlaysModal = require("@adobe/react-spectrum/private/overlays/Modal");
|
|
4
|
+
var $buS3z$adobereactspectrumprivateoverlaysTray = require("@adobe/react-spectrum/private/overlays/Tray");
|
|
5
|
+
var $buS3z$adobereactspectrumprivateoverlaysOpenTransition = require("@adobe/react-spectrum/private/overlays/OpenTransition");
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
function $parcel$export(e, n, v, s) {
|
|
9
9
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
$parcel$export(module.exports, "Overlay", ()
|
|
13
|
-
$parcel$export(module.exports, "Popover", ()
|
|
14
|
-
$parcel$export(module.exports, "Modal", ()
|
|
15
|
-
$parcel$export(module.exports, "Tray", ()
|
|
16
|
-
$parcel$export(module.exports, "OpenTransition", ()
|
|
12
|
+
$parcel$export(module.exports, "Overlay", function () { return $buS3z$adobereactspectrumprivateoverlaysOverlay.Overlay; });
|
|
13
|
+
$parcel$export(module.exports, "Popover", function () { return $buS3z$adobereactspectrumprivateoverlaysPopover.Popover; });
|
|
14
|
+
$parcel$export(module.exports, "Modal", function () { return $buS3z$adobereactspectrumprivateoverlaysModal.Modal; });
|
|
15
|
+
$parcel$export(module.exports, "Tray", function () { return $buS3z$adobereactspectrumprivateoverlaysTray.Tray; });
|
|
16
|
+
$parcel$export(module.exports, "OpenTransition", function () { return $buS3z$adobereactspectrumprivateoverlaysOpenTransition.OpenTransition; });
|
|
17
17
|
/*
|
|
18
18
|
* Copyright 2020 Adobe. All rights reserved.
|
|
19
19
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/overlays/src/index.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\n/// <reference types=\"css-module-types\" />\n\nexport {Overlay} from '
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/overlays/src/index.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\n/// <reference types=\"css-module-types\" />\n\nexport {Overlay} from '@adobe/react-spectrum/private/overlays/Overlay';\n\nexport {Popover} from '@adobe/react-spectrum/private/overlays/Popover';\nexport {Modal} from '@adobe/react-spectrum/private/overlays/Modal';\nexport {Tray} from '@adobe/react-spectrum/private/overlays/Tray';\nexport {OpenTransition} from '@adobe/react-spectrum/private/overlays/OpenTransition';\nexport type {OverlayProps} from '@adobe/react-spectrum/private/overlays/Overlay';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {Overlay as $
|
|
2
|
-
import {Popover as $
|
|
3
|
-
import {Modal as $
|
|
4
|
-
import {Tray as $
|
|
5
|
-
import {OpenTransition as $
|
|
1
|
+
import {Overlay as $54c969fdbeac7d40$re_export$Overlay} from "@adobe/react-spectrum/private/overlays/Overlay";
|
|
2
|
+
import {Popover as $54c969fdbeac7d40$re_export$Popover} from "@adobe/react-spectrum/private/overlays/Popover";
|
|
3
|
+
import {Modal as $54c969fdbeac7d40$re_export$Modal} from "@adobe/react-spectrum/private/overlays/Modal";
|
|
4
|
+
import {Tray as $54c969fdbeac7d40$re_export$Tray} from "@adobe/react-spectrum/private/overlays/Tray";
|
|
5
|
+
import {OpenTransition as $54c969fdbeac7d40$re_export$OpenTransition} from "@adobe/react-spectrum/private/overlays/OpenTransition";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -22,5 +22,5 @@ import {OpenTransition as $bc765a7a041310da$export$b847a40ee92eff38} from "./Ope
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
export {$
|
|
25
|
+
export {$54c969fdbeac7d40$re_export$Overlay as Overlay, $54c969fdbeac7d40$re_export$Popover as Popover, $54c969fdbeac7d40$re_export$Modal as Modal, $54c969fdbeac7d40$re_export$Tray as Tray, $54c969fdbeac7d40$re_export$OpenTransition as OpenTransition};
|
|
26
26
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/overlays/src/index.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\n/// <reference types=\"css-module-types\" />\n\nexport {Overlay} from '
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/overlays/src/index.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\n/// <reference types=\"css-module-types\" />\n\nexport {Overlay} from '@adobe/react-spectrum/private/overlays/Overlay';\n\nexport {Popover} from '@adobe/react-spectrum/private/overlays/Popover';\nexport {Modal} from '@adobe/react-spectrum/private/overlays/Modal';\nexport {Tray} from '@adobe/react-spectrum/private/overlays/Tray';\nexport {OpenTransition} from '@adobe/react-spectrum/private/overlays/OpenTransition';\nexport type {OverlayProps} from '@adobe/react-spectrum/private/overlays/Overlay';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Overlay } from '@adobe/react-spectrum/private/overlays/Overlay';
|
|
2
|
+
export { Popover } from '@adobe/react-spectrum/private/overlays/Popover';
|
|
3
|
+
export { Modal } from '@adobe/react-spectrum/private/overlays/Modal';
|
|
4
|
+
export { Tray } from '@adobe/react-spectrum/private/overlays/Tray';
|
|
5
|
+
export { OpenTransition } from '@adobe/react-spectrum/private/overlays/OpenTransition';
|
|
6
|
+
export type { OverlayProps } from '@adobe/react-spectrum/private/overlays/Overlay';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/overlays",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -24,42 +24,22 @@
|
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
|
-
"
|
|
28
|
-
"includeNodeModules": [
|
|
29
|
-
"@adobe/spectrum-css-temp"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"module": {
|
|
33
|
-
"includeNodeModules": [
|
|
34
|
-
"@adobe/spectrum-css-temp"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
"types": false
|
|
37
28
|
},
|
|
38
29
|
"repository": {
|
|
39
30
|
"type": "git",
|
|
40
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
41
32
|
},
|
|
42
33
|
"dependencies": {
|
|
43
|
-
"@react-
|
|
44
|
-
"@
|
|
45
|
-
"@react-aria/utils": "^3.33.0",
|
|
46
|
-
"@react-spectrum/utils": "^3.12.11",
|
|
47
|
-
"@react-stately/overlays": "^3.6.22",
|
|
48
|
-
"@react-types/overlays": "^3.9.3",
|
|
49
|
-
"@react-types/shared": "^3.33.0",
|
|
50
|
-
"@swc/helpers": "^0.5.0",
|
|
51
|
-
"react-transition-group": "^4.4.5"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
35
|
+
"@swc/helpers": "^0.5.0"
|
|
55
36
|
},
|
|
56
37
|
"peerDependencies": {
|
|
57
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
58
38
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
59
39
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
60
40
|
},
|
|
61
41
|
"publishConfig": {
|
|
62
42
|
"access": "public"
|
|
63
43
|
},
|
|
64
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
65
45
|
}
|
package/src/index.ts
CHANGED
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
/// <reference types="css-module-types" />
|
|
14
14
|
|
|
15
|
-
export {Overlay} from '
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
15
|
+
export {Overlay} from '@adobe/react-spectrum/private/overlays/Overlay';
|
|
16
|
+
|
|
17
|
+
export {Popover} from '@adobe/react-spectrum/private/overlays/Popover';
|
|
18
|
+
export {Modal} from '@adobe/react-spectrum/private/overlays/Modal';
|
|
19
|
+
export {Tray} from '@adobe/react-spectrum/private/overlays/Tray';
|
|
20
|
+
export {OpenTransition} from '@adobe/react-spectrum/private/overlays/OpenTransition';
|
|
21
|
+
export type {OverlayProps} from '@adobe/react-spectrum/private/overlays/Overlay';
|
package/dist/Modal.main.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
require("./overlays.ef39a1b9.css");
|
|
2
|
-
var $86571b803f942ff3$exports = require("./modal_vars_css.main.js");
|
|
3
|
-
var $2aebdc186fd41e87$exports = require("./Overlay.main.js");
|
|
4
|
-
require("./overlays.f8d97b78.css");
|
|
5
|
-
var $e9a663ccb19ed1b0$exports = require("./overlays_css.main.js");
|
|
6
|
-
var $b900e75089bdd9cd$exports = require("./Underlay.main.js");
|
|
7
|
-
var $aM0tW$reactariaoverlays = require("@react-aria/overlays");
|
|
8
|
-
var $aM0tW$reactspectrumutils = require("@react-spectrum/utils");
|
|
9
|
-
var $aM0tW$react = require("react");
|
|
10
|
-
var $aM0tW$reactariautils = require("@react-aria/utils");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function $parcel$interopDefault(a) {
|
|
14
|
-
return a && a.__esModule ? a.default : a;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function $parcel$export(e, n, v, s) {
|
|
18
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
$parcel$export(module.exports, "Modal", () => $fc75a6aa7a2b905b$export$2b77a92f1a5ad772);
|
|
22
|
-
/*
|
|
23
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
24
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
25
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
26
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
27
|
-
*
|
|
28
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
29
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
30
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
31
|
-
* governing permissions and limitations under the License.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const $fc75a6aa7a2b905b$export$2b77a92f1a5ad772 = /*#__PURE__*/ (0, $aM0tW$react.forwardRef)(function Modal(props, ref) {
|
|
41
|
-
let { children: children, state: state, ...otherProps } = props;
|
|
42
|
-
let domRef = (0, $aM0tW$reactspectrumutils.useDOMRef)(ref);
|
|
43
|
-
let wrapperRef = (0, $aM0tW$react.useRef)(null);
|
|
44
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($aM0tW$react))).createElement((0, $2aebdc186fd41e87$exports.Overlay), {
|
|
45
|
-
...otherProps,
|
|
46
|
-
isOpen: state.isOpen,
|
|
47
|
-
nodeRef: wrapperRef
|
|
48
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($aM0tW$react))).createElement($fc75a6aa7a2b905b$var$ModalWrapper, {
|
|
49
|
-
...props,
|
|
50
|
-
wrapperRef: wrapperRef,
|
|
51
|
-
ref: domRef
|
|
52
|
-
}, children));
|
|
53
|
-
});
|
|
54
|
-
let $fc75a6aa7a2b905b$var$typeMap = {
|
|
55
|
-
fullscreen: 'fullscreen',
|
|
56
|
-
fullscreenTakeover: 'fullscreenTakeover'
|
|
57
|
-
};
|
|
58
|
-
let $fc75a6aa7a2b905b$var$ModalWrapper = /*#__PURE__*/ (0, $aM0tW$react.forwardRef)(function(props, ref) {
|
|
59
|
-
let { type: type, children: children, state: state, isOpen: isOpen, wrapperRef: wrapperRef } = props;
|
|
60
|
-
let typeVariant = type != null ? $fc75a6aa7a2b905b$var$typeMap[type] : undefined;
|
|
61
|
-
let { styleProps: styleProps } = (0, $aM0tW$reactspectrumutils.useStyleProps)(props);
|
|
62
|
-
let objRef = (0, $aM0tW$reactariautils.useObjectRef)(ref);
|
|
63
|
-
let { modalProps: modalProps, underlayProps: underlayProps } = (0, $aM0tW$reactariaoverlays.useModalOverlay)(props, state, objRef);
|
|
64
|
-
let wrapperClassName = (0, $aM0tW$reactspectrumutils.classNames)((0, ($parcel$interopDefault($86571b803f942ff3$exports))), 'spectrum-Modal-wrapper', (0, $aM0tW$reactspectrumutils.classNames)((0, ($parcel$interopDefault($e9a663ccb19ed1b0$exports))), 'spectrum-Modal-wrapper', 'react-spectrum-Modal-wrapper'));
|
|
65
|
-
let modalClassName = (0, $aM0tW$reactspectrumutils.classNames)((0, ($parcel$interopDefault($86571b803f942ff3$exports))), 'spectrum-Modal', {
|
|
66
|
-
'is-open': isOpen
|
|
67
|
-
}, (0, $aM0tW$reactspectrumutils.classNames)((0, ($parcel$interopDefault($e9a663ccb19ed1b0$exports))), 'spectrum-Modal', 'react-spectrum-Modal'), {
|
|
68
|
-
[`spectrum-Modal--${typeVariant}`]: typeVariant
|
|
69
|
-
}, styleProps.className);
|
|
70
|
-
let viewport = (0, $aM0tW$reactariautils.useViewportSize)();
|
|
71
|
-
let style = {
|
|
72
|
-
'--spectrum-visual-viewport-height': viewport.height + 'px'
|
|
73
|
-
};
|
|
74
|
-
// Attach Transition's nodeRef to outer most wrapper for node.reflow: https://github.com/reactjs/react-transition-group/blob/c89f807067b32eea6f68fd6c622190d88ced82e2/src/Transition.js#L231
|
|
75
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($aM0tW$react))).createElement("div", {
|
|
76
|
-
ref: wrapperRef
|
|
77
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($aM0tW$react))).createElement((0, $b900e75089bdd9cd$exports.Underlay), {
|
|
78
|
-
...underlayProps,
|
|
79
|
-
isOpen: isOpen
|
|
80
|
-
}), /*#__PURE__*/ (0, ($parcel$interopDefault($aM0tW$react))).createElement("div", {
|
|
81
|
-
className: wrapperClassName,
|
|
82
|
-
style: style
|
|
83
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($aM0tW$react))).createElement("div", {
|
|
84
|
-
...styleProps,
|
|
85
|
-
...modalProps,
|
|
86
|
-
ref: objRef,
|
|
87
|
-
className: modalClassName,
|
|
88
|
-
"data-testid": "modal"
|
|
89
|
-
}, children)));
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
//# sourceMappingURL=Modal.main.js.map
|
package/dist/Modal.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA0BM,MAAM,0DAAQ,CAAA,GAAA,uBAAS,EAAE,SAAS,MAAM,KAAiB,EAAE,GAA2B;IAC3F,IAAI,YAAC,QAAQ,SAAE,KAAK,EAAE,GAAG,YAAW,GAAG;IACvC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,aAAa,CAAA,GAAA,mBAAK,EAAkB;IAExC,qBACE,0DAAC,CAAA,GAAA,iCAAM;QAAG,GAAG,UAAU;QAAE,QAAQ,MAAM,MAAM;QAAE,SAAS;qBACtD,0DAAC;QAAc,GAAG,KAAK;QAAE,YAAY;QAAY,KAAK;OACnD;AAIT;AAEA,IAAI,gCAAU;IACZ,YAAY;IACZ,oBAAoB;AACtB;AAEA,IAAI,mDAAe,CAAA,GAAA,uBAAS,EAAE,SAAU,KAAwB,EAAE,GAAwC;IACxG,IAAI,QAAC,IAAI,YAAE,QAAQ,SAAE,KAAK,UAAE,MAAM,cAAE,UAAU,EAAC,GAAG;IAClD,IAAI,cAAc,QAAQ,OAAO,6BAAO,CAAC,KAAK,GAAG;IACjD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,kCAAW,EAAE;IAC1B,IAAI,cAAC,UAAU,iBAAE,aAAa,EAAC,GAAG,CAAA,GAAA,wCAAc,EAAE,OAAO,OAAO;IAEhE,IAAI,mBAAmB,CAAA,GAAA,oCAAS,EAC9B,CAAA,GAAA,mDAAU,GACV,0BACA,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAa,GACb,0BACA;IAIJ,IAAI,iBAAiB,CAAA,GAAA,oCAAS,EAC5B,CAAA,GAAA,mDAAU,GACV,kBACA;QACE,WAAW;IACb,GACA,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAa,GACb,kBACA,yBAEF;QAAC,CAAC,CAAC,gBAAgB,EAAE,aAAa,CAAC,EAAE;IAAW,GAChD,WAAW,SAAS;IAGtB,IAAI,WAAW,CAAA,GAAA,qCAAc;IAC7B,IAAI,QAAa;QACf,qCAAqC,SAAS,MAAM,GAAG;IACzD;IAEA,4LAA4L;IAC5L,qBACE,0DAAC;QAAI,KAAK;qBACR,0DAAC,CAAA,GAAA,kCAAO;QAAG,GAAG,aAAa;QAAE,QAAQ;sBACrC,0DAAC;QAAI,WAAW;QAAkB,OAAO;qBACvC,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,UAAU;QACd,KAAK;QACL,WAAW;QACX,eAAY;OACX;AAKX","sources":["packages/@react-spectrum/overlays/src/Modal.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 {AriaModalOverlayProps, useModalOverlay} from '@react-aria/overlays';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, RefObject, StyleProps} from '@react-types/shared';\nimport modalStyles from '@adobe/spectrum-css-temp/components/modal/vars.css';\nimport {Overlay} from './Overlay';\nimport {OverlayProps} from '@react-types/overlays';\nimport {OverlayTriggerState} from '@react-stately/overlays';\nimport overrideStyles from './overlays.css';\nimport React, {ForwardedRef, forwardRef, ReactNode, useRef} from 'react';\nimport {Underlay} from './Underlay';\nimport {useObjectRef, useViewportSize} from '@react-aria/utils';\n\ninterface ModalProps extends AriaModalOverlayProps, StyleProps, Omit<OverlayProps, 'nodeRef' | 'shouldContainFocus'> {\n children: ReactNode,\n state: OverlayTriggerState,\n type?: 'modal' | 'fullscreen' | 'fullscreenTakeover'\n}\n\ninterface ModalWrapperProps extends ModalProps {\n isOpen?: boolean,\n wrapperRef: RefObject<HTMLDivElement | null>,\n children: ReactNode\n}\n\nexport const Modal = forwardRef(function Modal(props: ModalProps, ref: DOMRef<HTMLDivElement>) {\n let {children, state, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let wrapperRef = useRef<HTMLDivElement>(null);\n\n return (\n <Overlay {...otherProps} isOpen={state.isOpen} nodeRef={wrapperRef}>\n <ModalWrapper {...props} wrapperRef={wrapperRef} ref={domRef}>\n {children}\n </ModalWrapper>\n </Overlay>\n );\n});\n\nlet typeMap = {\n fullscreen: 'fullscreen',\n fullscreenTakeover: 'fullscreenTakeover'\n};\n\nlet ModalWrapper = forwardRef(function (props: ModalWrapperProps, ref: ForwardedRef<HTMLDivElement | null>) {\n let {type, children, state, isOpen, wrapperRef} = props;\n let typeVariant = type != null ? typeMap[type] : undefined;\n let {styleProps} = useStyleProps(props);\n let objRef = useObjectRef(ref);\n let {modalProps, underlayProps} = useModalOverlay(props, state, objRef);\n\n let wrapperClassName = classNames(\n modalStyles,\n 'spectrum-Modal-wrapper',\n classNames(\n overrideStyles,\n 'spectrum-Modal-wrapper',\n 'react-spectrum-Modal-wrapper'\n )\n );\n\n let modalClassName = classNames(\n modalStyles,\n 'spectrum-Modal',\n {\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Modal',\n 'react-spectrum-Modal'\n ),\n {[`spectrum-Modal--${typeVariant}`]: typeVariant},\n styleProps.className\n );\n\n let viewport = useViewportSize();\n let style: any = {\n '--spectrum-visual-viewport-height': viewport.height + 'px'\n };\n\n // Attach Transition's nodeRef to outer most wrapper for node.reflow: https://github.com/reactjs/react-transition-group/blob/c89f807067b32eea6f68fd6c622190d88ced82e2/src/Transition.js#L231\n return (\n <div ref={wrapperRef}>\n <Underlay {...underlayProps} isOpen={isOpen} />\n <div className={wrapperClassName} style={style}>\n <div\n {...styleProps}\n {...modalProps}\n ref={objRef}\n className={modalClassName}\n data-testid=\"modal\">\n {children}\n </div>\n </div>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"Modal.main.js.map"}
|
package/dist/Modal.mjs
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import "./overlays.ef39a1b9.css";
|
|
2
|
-
import $e9TuM$modal_vars_cssmodulejs from "./modal_vars_css.mjs";
|
|
3
|
-
import {Overlay as $70305dc5fb729c3b$export$c6fdb837b070b4ff} from "./Overlay.mjs";
|
|
4
|
-
import "./overlays.f8d97b78.css";
|
|
5
|
-
import $e9TuM$overlays_cssmodulejs from "./overlays_css.mjs";
|
|
6
|
-
import {Underlay as $76a452f4e3df11be$export$f360afc887607b02} from "./Underlay.mjs";
|
|
7
|
-
import {useModalOverlay as $e9TuM$useModalOverlay} from "@react-aria/overlays";
|
|
8
|
-
import {useDOMRef as $e9TuM$useDOMRef, useStyleProps as $e9TuM$useStyleProps, classNames as $e9TuM$classNames} from "@react-spectrum/utils";
|
|
9
|
-
import $e9TuM$react, {forwardRef as $e9TuM$forwardRef, useRef as $e9TuM$useRef} from "react";
|
|
10
|
-
import {useObjectRef as $e9TuM$useObjectRef, useViewportSize as $e9TuM$useViewportSize} from "@react-aria/utils";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function $parcel$interopDefault(a) {
|
|
14
|
-
return a && a.__esModule ? a.default : a;
|
|
15
|
-
}
|
|
16
|
-
/*
|
|
17
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
18
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
-
*
|
|
22
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
-
* governing permissions and limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const $842084dfa182af65$export$2b77a92f1a5ad772 = /*#__PURE__*/ (0, $e9TuM$forwardRef)(function Modal(props, ref) {
|
|
35
|
-
let { children: children, state: state, ...otherProps } = props;
|
|
36
|
-
let domRef = (0, $e9TuM$useDOMRef)(ref);
|
|
37
|
-
let wrapperRef = (0, $e9TuM$useRef)(null);
|
|
38
|
-
return /*#__PURE__*/ (0, $e9TuM$react).createElement((0, $70305dc5fb729c3b$export$c6fdb837b070b4ff), {
|
|
39
|
-
...otherProps,
|
|
40
|
-
isOpen: state.isOpen,
|
|
41
|
-
nodeRef: wrapperRef
|
|
42
|
-
}, /*#__PURE__*/ (0, $e9TuM$react).createElement($842084dfa182af65$var$ModalWrapper, {
|
|
43
|
-
...props,
|
|
44
|
-
wrapperRef: wrapperRef,
|
|
45
|
-
ref: domRef
|
|
46
|
-
}, children));
|
|
47
|
-
});
|
|
48
|
-
let $842084dfa182af65$var$typeMap = {
|
|
49
|
-
fullscreen: 'fullscreen',
|
|
50
|
-
fullscreenTakeover: 'fullscreenTakeover'
|
|
51
|
-
};
|
|
52
|
-
let $842084dfa182af65$var$ModalWrapper = /*#__PURE__*/ (0, $e9TuM$forwardRef)(function(props, ref) {
|
|
53
|
-
let { type: type, children: children, state: state, isOpen: isOpen, wrapperRef: wrapperRef } = props;
|
|
54
|
-
let typeVariant = type != null ? $842084dfa182af65$var$typeMap[type] : undefined;
|
|
55
|
-
let { styleProps: styleProps } = (0, $e9TuM$useStyleProps)(props);
|
|
56
|
-
let objRef = (0, $e9TuM$useObjectRef)(ref);
|
|
57
|
-
let { modalProps: modalProps, underlayProps: underlayProps } = (0, $e9TuM$useModalOverlay)(props, state, objRef);
|
|
58
|
-
let wrapperClassName = (0, $e9TuM$classNames)((0, ($parcel$interopDefault($e9TuM$modal_vars_cssmodulejs))), 'spectrum-Modal-wrapper', (0, $e9TuM$classNames)((0, ($parcel$interopDefault($e9TuM$overlays_cssmodulejs))), 'spectrum-Modal-wrapper', 'react-spectrum-Modal-wrapper'));
|
|
59
|
-
let modalClassName = (0, $e9TuM$classNames)((0, ($parcel$interopDefault($e9TuM$modal_vars_cssmodulejs))), 'spectrum-Modal', {
|
|
60
|
-
'is-open': isOpen
|
|
61
|
-
}, (0, $e9TuM$classNames)((0, ($parcel$interopDefault($e9TuM$overlays_cssmodulejs))), 'spectrum-Modal', 'react-spectrum-Modal'), {
|
|
62
|
-
[`spectrum-Modal--${typeVariant}`]: typeVariant
|
|
63
|
-
}, styleProps.className);
|
|
64
|
-
let viewport = (0, $e9TuM$useViewportSize)();
|
|
65
|
-
let style = {
|
|
66
|
-
'--spectrum-visual-viewport-height': viewport.height + 'px'
|
|
67
|
-
};
|
|
68
|
-
// Attach Transition's nodeRef to outer most wrapper for node.reflow: https://github.com/reactjs/react-transition-group/blob/c89f807067b32eea6f68fd6c622190d88ced82e2/src/Transition.js#L231
|
|
69
|
-
return /*#__PURE__*/ (0, $e9TuM$react).createElement("div", {
|
|
70
|
-
ref: wrapperRef
|
|
71
|
-
}, /*#__PURE__*/ (0, $e9TuM$react).createElement((0, $76a452f4e3df11be$export$f360afc887607b02), {
|
|
72
|
-
...underlayProps,
|
|
73
|
-
isOpen: isOpen
|
|
74
|
-
}), /*#__PURE__*/ (0, $e9TuM$react).createElement("div", {
|
|
75
|
-
className: wrapperClassName,
|
|
76
|
-
style: style
|
|
77
|
-
}, /*#__PURE__*/ (0, $e9TuM$react).createElement("div", {
|
|
78
|
-
...styleProps,
|
|
79
|
-
...modalProps,
|
|
80
|
-
ref: objRef,
|
|
81
|
-
className: modalClassName,
|
|
82
|
-
"data-testid": "modal"
|
|
83
|
-
}, children)));
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
export {$842084dfa182af65$export$2b77a92f1a5ad772 as Modal};
|
|
88
|
-
//# sourceMappingURL=Modal.module.js.map
|
package/dist/Modal.module.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import "./overlays.ef39a1b9.css";
|
|
2
|
-
import $e9TuM$modal_vars_cssmodulejs from "./modal_vars_css.module.js";
|
|
3
|
-
import {Overlay as $70305dc5fb729c3b$export$c6fdb837b070b4ff} from "./Overlay.module.js";
|
|
4
|
-
import "./overlays.f8d97b78.css";
|
|
5
|
-
import $e9TuM$overlays_cssmodulejs from "./overlays_css.module.js";
|
|
6
|
-
import {Underlay as $76a452f4e3df11be$export$f360afc887607b02} from "./Underlay.module.js";
|
|
7
|
-
import {useModalOverlay as $e9TuM$useModalOverlay} from "@react-aria/overlays";
|
|
8
|
-
import {useDOMRef as $e9TuM$useDOMRef, useStyleProps as $e9TuM$useStyleProps, classNames as $e9TuM$classNames} from "@react-spectrum/utils";
|
|
9
|
-
import $e9TuM$react, {forwardRef as $e9TuM$forwardRef, useRef as $e9TuM$useRef} from "react";
|
|
10
|
-
import {useObjectRef as $e9TuM$useObjectRef, useViewportSize as $e9TuM$useViewportSize} from "@react-aria/utils";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function $parcel$interopDefault(a) {
|
|
14
|
-
return a && a.__esModule ? a.default : a;
|
|
15
|
-
}
|
|
16
|
-
/*
|
|
17
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
18
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
-
*
|
|
22
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
-
* governing permissions and limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const $842084dfa182af65$export$2b77a92f1a5ad772 = /*#__PURE__*/ (0, $e9TuM$forwardRef)(function Modal(props, ref) {
|
|
35
|
-
let { children: children, state: state, ...otherProps } = props;
|
|
36
|
-
let domRef = (0, $e9TuM$useDOMRef)(ref);
|
|
37
|
-
let wrapperRef = (0, $e9TuM$useRef)(null);
|
|
38
|
-
return /*#__PURE__*/ (0, $e9TuM$react).createElement((0, $70305dc5fb729c3b$export$c6fdb837b070b4ff), {
|
|
39
|
-
...otherProps,
|
|
40
|
-
isOpen: state.isOpen,
|
|
41
|
-
nodeRef: wrapperRef
|
|
42
|
-
}, /*#__PURE__*/ (0, $e9TuM$react).createElement($842084dfa182af65$var$ModalWrapper, {
|
|
43
|
-
...props,
|
|
44
|
-
wrapperRef: wrapperRef,
|
|
45
|
-
ref: domRef
|
|
46
|
-
}, children));
|
|
47
|
-
});
|
|
48
|
-
let $842084dfa182af65$var$typeMap = {
|
|
49
|
-
fullscreen: 'fullscreen',
|
|
50
|
-
fullscreenTakeover: 'fullscreenTakeover'
|
|
51
|
-
};
|
|
52
|
-
let $842084dfa182af65$var$ModalWrapper = /*#__PURE__*/ (0, $e9TuM$forwardRef)(function(props, ref) {
|
|
53
|
-
let { type: type, children: children, state: state, isOpen: isOpen, wrapperRef: wrapperRef } = props;
|
|
54
|
-
let typeVariant = type != null ? $842084dfa182af65$var$typeMap[type] : undefined;
|
|
55
|
-
let { styleProps: styleProps } = (0, $e9TuM$useStyleProps)(props);
|
|
56
|
-
let objRef = (0, $e9TuM$useObjectRef)(ref);
|
|
57
|
-
let { modalProps: modalProps, underlayProps: underlayProps } = (0, $e9TuM$useModalOverlay)(props, state, objRef);
|
|
58
|
-
let wrapperClassName = (0, $e9TuM$classNames)((0, ($parcel$interopDefault($e9TuM$modal_vars_cssmodulejs))), 'spectrum-Modal-wrapper', (0, $e9TuM$classNames)((0, ($parcel$interopDefault($e9TuM$overlays_cssmodulejs))), 'spectrum-Modal-wrapper', 'react-spectrum-Modal-wrapper'));
|
|
59
|
-
let modalClassName = (0, $e9TuM$classNames)((0, ($parcel$interopDefault($e9TuM$modal_vars_cssmodulejs))), 'spectrum-Modal', {
|
|
60
|
-
'is-open': isOpen
|
|
61
|
-
}, (0, $e9TuM$classNames)((0, ($parcel$interopDefault($e9TuM$overlays_cssmodulejs))), 'spectrum-Modal', 'react-spectrum-Modal'), {
|
|
62
|
-
[`spectrum-Modal--${typeVariant}`]: typeVariant
|
|
63
|
-
}, styleProps.className);
|
|
64
|
-
let viewport = (0, $e9TuM$useViewportSize)();
|
|
65
|
-
let style = {
|
|
66
|
-
'--spectrum-visual-viewport-height': viewport.height + 'px'
|
|
67
|
-
};
|
|
68
|
-
// Attach Transition's nodeRef to outer most wrapper for node.reflow: https://github.com/reactjs/react-transition-group/blob/c89f807067b32eea6f68fd6c622190d88ced82e2/src/Transition.js#L231
|
|
69
|
-
return /*#__PURE__*/ (0, $e9TuM$react).createElement("div", {
|
|
70
|
-
ref: wrapperRef
|
|
71
|
-
}, /*#__PURE__*/ (0, $e9TuM$react).createElement((0, $76a452f4e3df11be$export$f360afc887607b02), {
|
|
72
|
-
...underlayProps,
|
|
73
|
-
isOpen: isOpen
|
|
74
|
-
}), /*#__PURE__*/ (0, $e9TuM$react).createElement("div", {
|
|
75
|
-
className: wrapperClassName,
|
|
76
|
-
style: style
|
|
77
|
-
}, /*#__PURE__*/ (0, $e9TuM$react).createElement("div", {
|
|
78
|
-
...styleProps,
|
|
79
|
-
...modalProps,
|
|
80
|
-
ref: objRef,
|
|
81
|
-
className: modalClassName,
|
|
82
|
-
"data-testid": "modal"
|
|
83
|
-
}, children)));
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
export {$842084dfa182af65$export$2b77a92f1a5ad772 as Modal};
|
|
88
|
-
//# sourceMappingURL=Modal.module.js.map
|
package/dist/Modal.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA0BM,MAAM,0DAAQ,CAAA,GAAA,iBAAS,EAAE,SAAS,MAAM,KAAiB,EAAE,GAA2B;IAC3F,IAAI,YAAC,QAAQ,SAAE,KAAK,EAAE,GAAG,YAAW,GAAG;IACvC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,aAAa,CAAA,GAAA,aAAK,EAAkB;IAExC,qBACE,gCAAC,CAAA,GAAA,yCAAM;QAAG,GAAG,UAAU;QAAE,QAAQ,MAAM,MAAM;QAAE,SAAS;qBACtD,gCAAC;QAAc,GAAG,KAAK;QAAE,YAAY;QAAY,KAAK;OACnD;AAIT;AAEA,IAAI,gCAAU;IACZ,YAAY;IACZ,oBAAoB;AACtB;AAEA,IAAI,mDAAe,CAAA,GAAA,iBAAS,EAAE,SAAU,KAAwB,EAAE,GAAwC;IACxG,IAAI,QAAC,IAAI,YAAE,QAAQ,SAAE,KAAK,UAAE,MAAM,cAAE,UAAU,EAAC,GAAG;IAClD,IAAI,cAAc,QAAQ,OAAO,6BAAO,CAAC,KAAK,GAAG;IACjD,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mBAAW,EAAE;IAC1B,IAAI,cAAC,UAAU,iBAAE,aAAa,EAAC,GAAG,CAAA,GAAA,sBAAc,EAAE,OAAO,OAAO;IAEhE,IAAI,mBAAmB,CAAA,GAAA,iBAAS,EAC9B,CAAA,GAAA,uDAAU,GACV,0BACA,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,qDAAa,GACb,0BACA;IAIJ,IAAI,iBAAiB,CAAA,GAAA,iBAAS,EAC5B,CAAA,GAAA,uDAAU,GACV,kBACA;QACE,WAAW;IACb,GACA,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,qDAAa,GACb,kBACA,yBAEF;QAAC,CAAC,CAAC,gBAAgB,EAAE,aAAa,CAAC,EAAE;IAAW,GAChD,WAAW,SAAS;IAGtB,IAAI,WAAW,CAAA,GAAA,sBAAc;IAC7B,IAAI,QAAa;QACf,qCAAqC,SAAS,MAAM,GAAG;IACzD;IAEA,4LAA4L;IAC5L,qBACE,gCAAC;QAAI,KAAK;qBACR,gCAAC,CAAA,GAAA,yCAAO;QAAG,GAAG,aAAa;QAAE,QAAQ;sBACrC,gCAAC;QAAI,WAAW;QAAkB,OAAO;qBACvC,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,UAAU;QACd,KAAK;QACL,WAAW;QACX,eAAY;OACX;AAKX","sources":["packages/@react-spectrum/overlays/src/Modal.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 {AriaModalOverlayProps, useModalOverlay} from '@react-aria/overlays';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, RefObject, StyleProps} from '@react-types/shared';\nimport modalStyles from '@adobe/spectrum-css-temp/components/modal/vars.css';\nimport {Overlay} from './Overlay';\nimport {OverlayProps} from '@react-types/overlays';\nimport {OverlayTriggerState} from '@react-stately/overlays';\nimport overrideStyles from './overlays.css';\nimport React, {ForwardedRef, forwardRef, ReactNode, useRef} from 'react';\nimport {Underlay} from './Underlay';\nimport {useObjectRef, useViewportSize} from '@react-aria/utils';\n\ninterface ModalProps extends AriaModalOverlayProps, StyleProps, Omit<OverlayProps, 'nodeRef' | 'shouldContainFocus'> {\n children: ReactNode,\n state: OverlayTriggerState,\n type?: 'modal' | 'fullscreen' | 'fullscreenTakeover'\n}\n\ninterface ModalWrapperProps extends ModalProps {\n isOpen?: boolean,\n wrapperRef: RefObject<HTMLDivElement | null>,\n children: ReactNode\n}\n\nexport const Modal = forwardRef(function Modal(props: ModalProps, ref: DOMRef<HTMLDivElement>) {\n let {children, state, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let wrapperRef = useRef<HTMLDivElement>(null);\n\n return (\n <Overlay {...otherProps} isOpen={state.isOpen} nodeRef={wrapperRef}>\n <ModalWrapper {...props} wrapperRef={wrapperRef} ref={domRef}>\n {children}\n </ModalWrapper>\n </Overlay>\n );\n});\n\nlet typeMap = {\n fullscreen: 'fullscreen',\n fullscreenTakeover: 'fullscreenTakeover'\n};\n\nlet ModalWrapper = forwardRef(function (props: ModalWrapperProps, ref: ForwardedRef<HTMLDivElement | null>) {\n let {type, children, state, isOpen, wrapperRef} = props;\n let typeVariant = type != null ? typeMap[type] : undefined;\n let {styleProps} = useStyleProps(props);\n let objRef = useObjectRef(ref);\n let {modalProps, underlayProps} = useModalOverlay(props, state, objRef);\n\n let wrapperClassName = classNames(\n modalStyles,\n 'spectrum-Modal-wrapper',\n classNames(\n overrideStyles,\n 'spectrum-Modal-wrapper',\n 'react-spectrum-Modal-wrapper'\n )\n );\n\n let modalClassName = classNames(\n modalStyles,\n 'spectrum-Modal',\n {\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Modal',\n 'react-spectrum-Modal'\n ),\n {[`spectrum-Modal--${typeVariant}`]: typeVariant},\n styleProps.className\n );\n\n let viewport = useViewportSize();\n let style: any = {\n '--spectrum-visual-viewport-height': viewport.height + 'px'\n };\n\n // Attach Transition's nodeRef to outer most wrapper for node.reflow: https://github.com/reactjs/react-transition-group/blob/c89f807067b32eea6f68fd6c622190d88ced82e2/src/Transition.js#L231\n return (\n <div ref={wrapperRef}>\n <Underlay {...underlayProps} isOpen={isOpen} />\n <div className={wrapperClassName} style={style}>\n <div\n {...styleProps}\n {...modalProps}\n ref={objRef}\n className={modalClassName}\n data-testid=\"modal\">\n {children}\n </div>\n </div>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"Modal.module.js.map"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var $3kGU5$react = require("react");
|
|
2
|
-
var $3kGU5$reacttransitiongroup = require("react-transition-group");
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function $parcel$interopDefault(a) {
|
|
6
|
-
return a && a.__esModule ? a.default : a;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function $parcel$export(e, n, v, s) {
|
|
10
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
$parcel$export(module.exports, "OpenTransition", () => $13f51cdc44d228b9$export$b847a40ee92eff38);
|
|
14
|
-
/*
|
|
15
|
-
* Copyright 2020 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
|
-
|
|
26
|
-
const $13f51cdc44d228b9$var$OPEN_STATES = {
|
|
27
|
-
entering: false,
|
|
28
|
-
entered: true
|
|
29
|
-
};
|
|
30
|
-
function $13f51cdc44d228b9$export$b847a40ee92eff38(props) {
|
|
31
|
-
var child;
|
|
32
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($3kGU5$react))).createElement((0, $3kGU5$reacttransitiongroup.Transition), {
|
|
33
|
-
timeout: {
|
|
34
|
-
enter: 0,
|
|
35
|
-
exit: 350
|
|
36
|
-
},
|
|
37
|
-
...props
|
|
38
|
-
}, (state)=>(0, ($parcel$interopDefault($3kGU5$react))).Children.map(props.children, (child)=>child && /*#__PURE__*/ (0, ($parcel$interopDefault($3kGU5$react))).cloneElement(child, {
|
|
39
|
-
isOpen: !!$13f51cdc44d228b9$var$OPEN_STATES[state]
|
|
40
|
-
})));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=OpenTransition.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAKD,MAAM,oCAAc;IAClB,UAAU;IACV,SAAS;AACX;AAeO,SAAS,0CACd,KAAU;QAIkC;IAG5C,qBACE,0DAAC,CAAA,GAAA,sCAAS;QAAE,SAAS;YAAC,OAAO;YAAG,MAAM;QAAG;QAAI,GAAG,KAAK;OAClD,CAAC,QAAU,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,QAAQ,EAAE,CAAA,QAAS,uBAAS,CAAA,GAAA,sCAAI,EAAE,YAAY,CAAC,OAAO;gBAAC,QAAQ,CAAC,CAAC,iCAAW,CAAC,MAAM;YAAA;AAG9H","sources":["packages/@react-spectrum/overlays/src/OpenTransition.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 React, {JSX, JSXElementConstructor, ReactElement} from 'react';\nimport {Transition} from 'react-transition-group';\n\nconst OPEN_STATES = {\n entering: false,\n entered: true\n};\n\n/**\n * Timeout issues adding css animations to enter may be related to\n * https://github.com/reactjs/react-transition-group/issues/189 or\n * https://github.com/reactjs/react-transition-group/issues/22\n * my VM isn't good enough to debug accurately and get a better answer.\n *\n * As a result, use enter 0 so that is-open is applied once entered\n * it doesn't matter if we know when the css-animation is done on entering\n * for exiting though, give time for the css-animation to play\n * before removing from the DOM\n * **note** hitting esc bypasses exit animation for anyone testing.\n */\n\nexport function OpenTransition(\n props: any\n): JSX.Element | ReactElement<any, string | JSXElementConstructor<any>>[] {\n // Do not apply any transition if in chromatic.\n if (typeof process !== 'undefined' && process.env.CHROMATIC) {\n return React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: props.in}));\n }\n\n return (\n <Transition timeout={{enter: 0, exit: 350}} {...props}>\n {(state) => React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: !!OPEN_STATES[state]}))}\n </Transition>\n );\n}\n"],"names":[],"version":3,"file":"OpenTransition.main.js.map"}
|
package/dist/OpenTransition.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import $8XmPE$react from "react";
|
|
2
|
-
import {Transition as $8XmPE$Transition} from "react-transition-group";
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
6
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
-
* governing permissions and limitations under the License.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const $bc765a7a041310da$var$OPEN_STATES = {
|
|
17
|
-
entering: false,
|
|
18
|
-
entered: true
|
|
19
|
-
};
|
|
20
|
-
function $bc765a7a041310da$export$b847a40ee92eff38(props) {
|
|
21
|
-
var child;
|
|
22
|
-
return /*#__PURE__*/ (0, $8XmPE$react).createElement((0, $8XmPE$Transition), {
|
|
23
|
-
timeout: {
|
|
24
|
-
enter: 0,
|
|
25
|
-
exit: 350
|
|
26
|
-
},
|
|
27
|
-
...props
|
|
28
|
-
}, (state)=>(0, $8XmPE$react).Children.map(props.children, (child)=>child && /*#__PURE__*/ (0, $8XmPE$react).cloneElement(child, {
|
|
29
|
-
isOpen: !!$bc765a7a041310da$var$OPEN_STATES[state]
|
|
30
|
-
})));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export {$bc765a7a041310da$export$b847a40ee92eff38 as OpenTransition};
|
|
35
|
-
//# sourceMappingURL=OpenTransition.module.js.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import $8XmPE$react from "react";
|
|
2
|
-
import {Transition as $8XmPE$Transition} from "react-transition-group";
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
6
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
-
* governing permissions and limitations under the License.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const $bc765a7a041310da$var$OPEN_STATES = {
|
|
17
|
-
entering: false,
|
|
18
|
-
entered: true
|
|
19
|
-
};
|
|
20
|
-
function $bc765a7a041310da$export$b847a40ee92eff38(props) {
|
|
21
|
-
var child;
|
|
22
|
-
return /*#__PURE__*/ (0, $8XmPE$react).createElement((0, $8XmPE$Transition), {
|
|
23
|
-
timeout: {
|
|
24
|
-
enter: 0,
|
|
25
|
-
exit: 350
|
|
26
|
-
},
|
|
27
|
-
...props
|
|
28
|
-
}, (state)=>(0, $8XmPE$react).Children.map(props.children, (child)=>child && /*#__PURE__*/ (0, $8XmPE$react).cloneElement(child, {
|
|
29
|
-
isOpen: !!$bc765a7a041310da$var$OPEN_STATES[state]
|
|
30
|
-
})));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export {$bc765a7a041310da$export$b847a40ee92eff38 as OpenTransition};
|
|
35
|
-
//# sourceMappingURL=OpenTransition.module.js.map
|