@react-spectrum/overlays 5.7.3 → 5.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Modal.main.js +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/Modal.module.js +1 -1
- package/dist/OpenTransition.main.js +7 -2
- package/dist/OpenTransition.main.js.map +1 -1
- package/dist/OpenTransition.mjs +7 -2
- package/dist/OpenTransition.module.js +7 -2
- package/dist/OpenTransition.module.js.map +1 -1
- package/dist/Popover.main.js +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/Popover.module.js +1 -1
- package/dist/Tray.main.js +1 -1
- package/dist/Tray.mjs +1 -1
- package/dist/Tray.module.js +1 -1
- package/dist/Underlay.main.js +1 -1
- package/dist/Underlay.main.js.map +1 -1
- package/dist/Underlay.mjs +1 -1
- package/dist/Underlay.module.js +1 -1
- package/dist/Underlay.module.js.map +1 -1
- package/dist/{vars.18db025d.css → overlays.09a708f1.css} +1 -1
- package/dist/{vars.18db025d.css.map → overlays.09a708f1.css.map} +1 -1
- package/dist/{vars.c8553ee9.css → overlays.31d3453e.css} +1 -1
- package/dist/{vars.c8553ee9.css.map → overlays.31d3453e.css.map} +1 -1
- package/dist/{vars.3f41eac0.css → overlays.ec5cd7e2.css} +1 -1
- package/dist/{vars.3f41eac0.css.map → overlays.ec5cd7e2.css.map} +1 -1
- package/dist/{vars.a1de7c32.css → overlays.ef39a1b9.css} +1 -1
- package/dist/{vars.a1de7c32.css.map → overlays.ef39a1b9.css.map} +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/OpenTransition.tsx +6 -2
- package/src/Underlay.tsx +2 -2
package/dist/Modal.main.js
CHANGED
package/dist/Modal.mjs
CHANGED
package/dist/Modal.module.js
CHANGED
|
@@ -23,12 +23,17 @@ $parcel$export(module.exports, "OpenTransition", () => $13f51cdc44d228b9$export$
|
|
|
23
23
|
* governing permissions and limitations under the License.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
+
// TODO install @types/react-transition-group
|
|
26
27
|
const $13f51cdc44d228b9$var$OPEN_STATES = {
|
|
27
28
|
entering: false,
|
|
28
29
|
entered: true
|
|
29
30
|
};
|
|
30
|
-
function $13f51cdc44d228b9$export$b847a40ee92eff38(
|
|
31
|
-
|
|
31
|
+
function $13f51cdc44d228b9$export$b847a40ee92eff38(// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
32
|
+
props) {
|
|
33
|
+
// Do not apply any transition if in chromatic.
|
|
34
|
+
if (process.env.CHROMATIC) return (0, ($parcel$interopDefault($3kGU5$react))).Children.map(props.children, (child)=>child && /*#__PURE__*/ (0, ($parcel$interopDefault($3kGU5$react))).cloneElement(child, {
|
|
35
|
+
isOpen: props.in
|
|
36
|
+
}));
|
|
32
37
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($3kGU5$react))).createElement((0, $3kGU5$reacttransitiongroup.Transition), {
|
|
33
38
|
timeout: {
|
|
34
39
|
enter: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAID,6CAA6C;AAE7C,MAAM,oCAAc;IAClB,UAAU;IACV,SAAS;AACX;AAeO,SAAS,0CACd,6EAA6E;AAC7E,KAAK;IAEL,+CAA+C;IAC/C,IAAI,QAAQ,GAAG,CAAC,SAAS,EACvB,OAAO,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,QAAQ,EAAE,CAAA,QAAS,uBAAS,CAAA,GAAA,sCAAI,EAAE,YAAY,CAAC,OAAO;YAAC,QAAQ,MAAM,EAAE;QAAA;IAGzG,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// TODO install @types/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 // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n props\n): JSX.Element | ReactElement<any, string | JSXElementConstructor<any>>[] {\n // Do not apply any transition if in chromatic.\n if (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
CHANGED
|
@@ -13,12 +13,17 @@ import {Transition as $8XmPE$Transition} from "react-transition-group";
|
|
|
13
13
|
* governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
// TODO install @types/react-transition-group
|
|
16
17
|
const $bc765a7a041310da$var$OPEN_STATES = {
|
|
17
18
|
entering: false,
|
|
18
19
|
entered: true
|
|
19
20
|
};
|
|
20
|
-
function $bc765a7a041310da$export$b847a40ee92eff38(
|
|
21
|
-
|
|
21
|
+
function $bc765a7a041310da$export$b847a40ee92eff38(// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
22
|
+
props) {
|
|
23
|
+
// Do not apply any transition if in chromatic.
|
|
24
|
+
if (process.env.CHROMATIC) return (0, $8XmPE$react).Children.map(props.children, (child)=>child && /*#__PURE__*/ (0, $8XmPE$react).cloneElement(child, {
|
|
25
|
+
isOpen: props.in
|
|
26
|
+
}));
|
|
22
27
|
return /*#__PURE__*/ (0, $8XmPE$react).createElement((0, $8XmPE$Transition), {
|
|
23
28
|
timeout: {
|
|
24
29
|
enter: 0,
|
|
@@ -13,12 +13,17 @@ import {Transition as $8XmPE$Transition} from "react-transition-group";
|
|
|
13
13
|
* governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
// TODO install @types/react-transition-group
|
|
16
17
|
const $bc765a7a041310da$var$OPEN_STATES = {
|
|
17
18
|
entering: false,
|
|
18
19
|
entered: true
|
|
19
20
|
};
|
|
20
|
-
function $bc765a7a041310da$export$b847a40ee92eff38(
|
|
21
|
-
|
|
21
|
+
function $bc765a7a041310da$export$b847a40ee92eff38(// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
22
|
+
props) {
|
|
23
|
+
// Do not apply any transition if in chromatic.
|
|
24
|
+
if (process.env.CHROMATIC) return (0, $8XmPE$react).Children.map(props.children, (child)=>child && /*#__PURE__*/ (0, $8XmPE$react).cloneElement(child, {
|
|
25
|
+
isOpen: props.in
|
|
26
|
+
}));
|
|
22
27
|
return /*#__PURE__*/ (0, $8XmPE$react).createElement((0, $8XmPE$Transition), {
|
|
23
28
|
timeout: {
|
|
24
29
|
enter: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;
|
|
1
|
+
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAID,6CAA6C;AAE7C,MAAM,oCAAc;IAClB,UAAU;IACV,SAAS;AACX;AAeO,SAAS,0CACd,6EAA6E;AAC7E,KAAK;IAEL,+CAA+C;IAC/C,IAAI,QAAQ,GAAG,CAAC,SAAS,EACvB,OAAO,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,QAAQ,EAAE,CAAA,QAAS,uBAAS,CAAA,GAAA,YAAI,EAAE,YAAY,CAAC,OAAO;YAAC,QAAQ,MAAM,EAAE;QAAA;IAGzG,qBACE,gCAAC,CAAA,GAAA,iBAAS;QAAE,SAAS;YAAC,OAAO;YAAG,MAAM;QAAG;QAAI,GAAG,KAAK;OAClD,CAAC,QAAU,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,QAAQ,EAAE,CAAA,QAAS,uBAAS,CAAA,GAAA,YAAI,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// TODO install @types/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 // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n props\n): JSX.Element | ReactElement<any, string | JSXElementConstructor<any>>[] {\n // Do not apply any transition if in chromatic.\n if (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.module.js.map"}
|
package/dist/Popover.main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var $2aebdc186fd41e87$exports = require("./Overlay.main.js");
|
|
2
2
|
require("./overlays.f8d97b78.css");
|
|
3
3
|
var $e9a663ccb19ed1b0$exports = require("./overlays_css.main.js");
|
|
4
|
-
require("./
|
|
4
|
+
require("./overlays.ec5cd7e2.css");
|
|
5
5
|
var $16e1dca4664d0b1c$exports = require("./popover_vars_css.main.js");
|
|
6
6
|
var $b900e75089bdd9cd$exports = require("./Underlay.main.js");
|
|
7
7
|
var $cgMBg$reactariaoverlays = require("@react-aria/overlays");
|
package/dist/Popover.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Overlay as $70305dc5fb729c3b$export$c6fdb837b070b4ff} from "./Overlay.mjs";
|
|
2
2
|
import "./overlays.f8d97b78.css";
|
|
3
3
|
import $4kQ6h$overlays_cssmodulejs from "./overlays_css.mjs";
|
|
4
|
-
import "./
|
|
4
|
+
import "./overlays.ec5cd7e2.css";
|
|
5
5
|
import $4kQ6h$popover_vars_cssmodulejs from "./popover_vars_css.mjs";
|
|
6
6
|
import {Underlay as $76a452f4e3df11be$export$f360afc887607b02} from "./Underlay.mjs";
|
|
7
7
|
import {usePopover as $4kQ6h$usePopover, DismissButton as $4kQ6h$DismissButton} from "@react-aria/overlays";
|
package/dist/Popover.module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Overlay as $70305dc5fb729c3b$export$c6fdb837b070b4ff} from "./Overlay.module.js";
|
|
2
2
|
import "./overlays.f8d97b78.css";
|
|
3
3
|
import $4kQ6h$overlays_cssmodulejs from "./overlays_css.module.js";
|
|
4
|
-
import "./
|
|
4
|
+
import "./overlays.ec5cd7e2.css";
|
|
5
5
|
import $4kQ6h$popover_vars_cssmodulejs from "./popover_vars_css.module.js";
|
|
6
6
|
import {Underlay as $76a452f4e3df11be$export$f360afc887607b02} from "./Underlay.module.js";
|
|
7
7
|
import {usePopover as $4kQ6h$usePopover, DismissButton as $4kQ6h$DismissButton} from "@react-aria/overlays";
|
package/dist/Tray.main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var $2aebdc186fd41e87$exports = require("./Overlay.main.js");
|
|
2
2
|
require("./overlays.f8d97b78.css");
|
|
3
3
|
var $e9a663ccb19ed1b0$exports = require("./overlays_css.main.js");
|
|
4
|
-
require("./
|
|
4
|
+
require("./overlays.31d3453e.css");
|
|
5
5
|
var $3ba16c5c57f2a636$exports = require("./tray_vars_css.main.js");
|
|
6
6
|
var $b900e75089bdd9cd$exports = require("./Underlay.main.js");
|
|
7
7
|
var $fWgpJ$reactariaoverlays = require("@react-aria/overlays");
|
package/dist/Tray.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Overlay as $70305dc5fb729c3b$export$c6fdb837b070b4ff} from "./Overlay.mjs";
|
|
2
2
|
import "./overlays.f8d97b78.css";
|
|
3
3
|
import $3XF9U$overlays_cssmodulejs from "./overlays_css.mjs";
|
|
4
|
-
import "./
|
|
4
|
+
import "./overlays.31d3453e.css";
|
|
5
5
|
import $3XF9U$tray_vars_cssmodulejs from "./tray_vars_css.mjs";
|
|
6
6
|
import {Underlay as $76a452f4e3df11be$export$f360afc887607b02} from "./Underlay.mjs";
|
|
7
7
|
import {useModalOverlay as $3XF9U$useModalOverlay, DismissButton as $3XF9U$DismissButton} from "@react-aria/overlays";
|
package/dist/Tray.module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Overlay as $70305dc5fb729c3b$export$c6fdb837b070b4ff} from "./Overlay.module.js";
|
|
2
2
|
import "./overlays.f8d97b78.css";
|
|
3
3
|
import $3XF9U$overlays_cssmodulejs from "./overlays_css.module.js";
|
|
4
|
-
import "./
|
|
4
|
+
import "./overlays.31d3453e.css";
|
|
5
5
|
import $3XF9U$tray_vars_cssmodulejs from "./tray_vars_css.module.js";
|
|
6
6
|
import {Underlay as $76a452f4e3df11be$export$f360afc887607b02} from "./Underlay.module.js";
|
|
7
7
|
import {useModalOverlay as $3XF9U$useModalOverlay, DismissButton as $3XF9U$DismissButton} from "@react-aria/overlays";
|
package/dist/Underlay.main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAWM,SAAS,0CAAS,UAAC,MAAM,iBAAE,aAAa,EAAE,GAAG,YAA0B;IAC5E,qBACE,0DAAC;QAAI,eAAY;QAAY,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAa,GAAG,qBAAqB;YAAC,WAAW;YAAQ,kCAAkC;QAAa;;AAE9K","sources":["packages/@react-spectrum/overlays/src/Underlay.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 {classNames} from '@react-spectrum/utils';\nimport React from 'react';\nimport underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';\n\ninterface UnderlayProps {\n isOpen?: boolean,\n isTransparent?: boolean\n}\n\nexport function Underlay({isOpen, isTransparent, ...otherProps}: UnderlayProps) {\n return (\n <div data-testid=\"underlay\" {...otherProps} className={classNames(underlayStyles, 'spectrum-Underlay', {'is-open': isOpen, 'spectrum-Underlay--transparent': isTransparent})} />\n );\n}\n"],"names":[],"version":3,"file":"Underlay.main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAWM,SAAS,0CAAS,UAAC,MAAM,iBAAE,aAAa,EAAE,GAAG,YAA0B;IAC5E,qBACE,0DAAC;QAAI,eAAY;QAAY,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAa,GAAG,qBAAqB;YAAC,WAAW;YAAQ,kCAAkC;QAAa;;AAE9K","sources":["packages/@react-spectrum/overlays/src/Underlay.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 {classNames} from '@react-spectrum/utils';\nimport React, {JSX} from 'react';\nimport underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';\n\ninterface UnderlayProps {\n isOpen?: boolean,\n isTransparent?: boolean\n}\n\nexport function Underlay({isOpen, isTransparent, ...otherProps}: UnderlayProps): JSX.Element {\n return (\n <div data-testid=\"underlay\" {...otherProps} className={classNames(underlayStyles, 'spectrum-Underlay', {'is-open': isOpen, 'spectrum-Underlay--transparent': isTransparent})} />\n );\n}\n"],"names":[],"version":3,"file":"Underlay.main.js.map"}
|
package/dist/Underlay.mjs
CHANGED
package/dist/Underlay.module.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAWM,SAAS,0CAAS,UAAC,MAAM,iBAAE,aAAa,EAAE,GAAG,YAA0B;IAC5E,qBACE,gCAAC;QAAI,eAAY;QAAY,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAa,GAAG,qBAAqB;YAAC,WAAW;YAAQ,kCAAkC;QAAa;;AAE9K","sources":["packages/@react-spectrum/overlays/src/Underlay.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 {classNames} from '@react-spectrum/utils';\nimport React from 'react';\nimport underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';\n\ninterface UnderlayProps {\n isOpen?: boolean,\n isTransparent?: boolean\n}\n\nexport function Underlay({isOpen, isTransparent, ...otherProps}: UnderlayProps) {\n return (\n <div data-testid=\"underlay\" {...otherProps} className={classNames(underlayStyles, 'spectrum-Underlay', {'is-open': isOpen, 'spectrum-Underlay--transparent': isTransparent})} />\n );\n}\n"],"names":[],"version":3,"file":"Underlay.module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAWM,SAAS,0CAAS,UAAC,MAAM,iBAAE,aAAa,EAAE,GAAG,YAA0B;IAC5E,qBACE,gCAAC;QAAI,eAAY;QAAY,GAAG,UAAU;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAa,GAAG,qBAAqB;YAAC,WAAW;YAAQ,kCAAkC;QAAa;;AAE9K","sources":["packages/@react-spectrum/overlays/src/Underlay.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 {classNames} from '@react-spectrum/utils';\nimport React, {JSX} from 'react';\nimport underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';\n\ninterface UnderlayProps {\n isOpen?: boolean,\n isTransparent?: boolean\n}\n\nexport function Underlay({isOpen, isTransparent, ...otherProps}: UnderlayProps): JSX.Element {\n return (\n <div data-testid=\"underlay\" {...otherProps} className={classNames(underlayStyles, 'spectrum-Underlay', {'is-open': isOpen, 'spectrum-Underlay--transparent': isTransparent})} />\n );\n}\n"],"names":[],"version":3,"file":"Underlay.module.js.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAIA;;;;;;;;AAkBE;;;;;AAMF;;;;AAmBA","sources":["packages/@adobe/spectrum-css-temp/components/underlay/vars.css"],"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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"
|
|
1
|
+
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAIA;;;;;;;;AAkBE;;;;;AAMF;;;;AAmBA","sources":["packages/@adobe/spectrum-css-temp/components/underlay/vars.css"],"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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"overlays.09a708f1.css.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAIA;;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAkBA;;;;;;;;;;;;;;;;;;;AAwCA;;;;;AAUA;;;;;AAOA;EACE;;;;;AAKF;EACE;;;;;;AAkBF","sources":["packages/@adobe/spectrum-css-temp/components/tray/vars.css"],"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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"
|
|
1
|
+
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAIA;;;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAkBA;;;;;;;;;;;;;;;;;;;AAwCA;;;;;AAUA;;;;;AAOA;EACE;;;;;AAKF;EACE;;;;;;AAkBF","sources":["packages/@adobe/spectrum-css-temp/components/tray/vars.css"],"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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"overlays.31d3453e.css.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAIA;;;;;;;;;;;;;;AA0BA;;;;AAIA;;;;;;;AAOE;;;;;;AAOF;;;;;AAME;;;;AAIA;;;;AAUA;;;;AAIA;;;;;AAcA;;;;;AAOA;;;;AAIA;;;;;AAWA;;;;AAIA;;;;AAaA;;;;;AAkBF;;;;;;;;AAqBI;;;;;AAOJ;EACE","sources":["packages/@adobe/spectrum-css-temp/components/popover/vars.css"],"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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"
|
|
1
|
+
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAIA;;;;;;;;;;;;;;AA0BA;;;;AAIA;;;;;;;AAOE;;;;;;AAOF;;;;;AAME;;;;AAIA;;;;AAUA;;;;AAIA;;;;;AAcA;;;;;AAOA;;;;AAIA;;;;;AAWA;;;;AAIA;;;;AAaA;;;;;AAkBF;;;;;;;;AAqBI;;;;;AAOJ;EACE","sources":["packages/@adobe/spectrum-css-temp/components/popover/vars.css"],"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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"overlays.ec5cd7e2.css.map"}
|
|
@@ -194,4 +194,4 @@
|
|
|
194
194
|
background: var(--spectrum-dialog-background-color, var(--spectrum-alias-background-color-default));
|
|
195
195
|
border-color: var(--spectrum-alias-border-color-transparent, transparent);
|
|
196
196
|
}
|
|
197
|
-
/*# sourceMappingURL=
|
|
197
|
+
/*# sourceMappingURL=overlays.ef39a1b9.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAMA;;;;;;;;;;;;;;;;AA4BE;;;;AAKF;;;;;;;;;;;;;AAyBA;;;;;AAYA;EAEE;;;;;;;;EAQE;;;;;AAQJ;;;;;;;;;AAYA;;;;;;;;;;;AAeE;;;;AAMF;EACE;;;;;AAiBF","sources":["packages/@adobe/spectrum-css-temp/components/modal/vars.css"],"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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"
|
|
1
|
+
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAkBJ;;;;;;;AAYA;;;;;;;AAWA;;;;AAIA;;;;AAUA;;;;AAIA;;;;AAMA;;;;;;;;;;;;;;;;AA4BE;;;;AAKF;;;;;;;;;;;;;AAyBA;;;;;AAYA;EAEE;;;;;;;;EAQE;;;;;AAQJ;;;;;;;;;AAYA;;;;;;;;;;;AAeE;;;;AAMF;EACE;;;;;AAiBF","sources":["packages/@adobe/spectrum-css-temp/components/modal/vars.css"],"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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"overlays.ef39a1b9.css.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import React, { JSX, JSXElementConstructor, ReactElement, ReactNode } from "react";
|
|
1
2
|
import { OverlayProps } from "@react-types/overlays";
|
|
2
|
-
import React, { ReactNode } from "react";
|
|
3
3
|
import { DOMRefValue, StyleProps } from "@react-types/shared";
|
|
4
4
|
import { AriaPopoverProps, AriaModalOverlayProps } from "@react-aria/overlays";
|
|
5
5
|
import { FocusWithinProps } from "@react-aria/interactions";
|
|
@@ -16,7 +16,7 @@ import { OverlayTriggerState } from "@react-stately/overlays";
|
|
|
16
16
|
* before removing from the DOM
|
|
17
17
|
* **note** hitting esc bypasses exit animation for anyone testing.
|
|
18
18
|
*/
|
|
19
|
-
export function OpenTransition(props: any): any;
|
|
19
|
+
export function OpenTransition(props: any): JSX.Element | ReactElement<any, string | JSXElementConstructor<any>>[];
|
|
20
20
|
export const Overlay: React.ForwardRefExoticComponent<OverlayProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
|
|
21
21
|
interface PopoverProps extends Omit<AriaPopoverProps, 'popoverRef' | 'maxHeight'>, FocusWithinProps, StyleProps {
|
|
22
22
|
children: ReactNode;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;
|
|
1
|
+
{"mappings":";;;;;;AAqBA;;;;;;;;;;;GAWG;AAEH,+BAEE,KAAK,KAAA,GACJ,IAAI,OAAO,GAAG,aAAa,GAAG,EAAE,MAAM,GAAG,sBAAsB,GAAG,CAAC,CAAC,EAAE,CAWxE;AC7BD,OAAO,MAAM,yGAwDX,CAAC;AEnDH,sBAAuB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,WAAW,CAAC,EAAE,gBAAgB,EAAE,UAAU;IAC7G,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;CAClC;AA8BD,OAAO,MAAM,yGAgBX,CAAC;AC7DH,oBAAqB,SAAQ,qBAAqB,EAAE,UAAU,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,oBAAoB,CAAC;IAClH,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,oBAAoB,CAAA;CACrD;AAQD,OAAO,MAAM,qGAYX,CAAC;ACxBH,mBAAoB,SAAQ,qBAAqB,EAAE,UAAU,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,oBAAoB,CAAC;IACjH,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAOD,OAAO,MAAM,mGAYX,CAAC","sources":["packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/OpenTransition.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Overlay.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Underlay.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Popover.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Modal.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Tray.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/index.ts","packages/@react-spectrum/overlays/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 {Overlay} from './Overlay';\nexport {Popover} from './Popover';\nexport {Modal} from './Modal';\nexport {Tray} from './Tray';\nexport {OpenTransition} from './OpenTransition';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/overlays",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.5",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/interactions": "^3.
|
|
40
|
-
"@react-aria/overlays": "^3.
|
|
41
|
-
"@react-aria/utils": "^3.
|
|
42
|
-
"@react-spectrum/utils": "^3.12.
|
|
43
|
-
"@react-stately/overlays": "^3.6.
|
|
44
|
-
"@react-types/overlays": "^3.8.
|
|
45
|
-
"@react-types/shared": "^3.
|
|
39
|
+
"@react-aria/interactions": "^3.25.1",
|
|
40
|
+
"@react-aria/overlays": "^3.27.1",
|
|
41
|
+
"@react-aria/utils": "^3.29.0",
|
|
42
|
+
"@react-spectrum/utils": "^3.12.5",
|
|
43
|
+
"@react-stately/overlays": "^3.6.16",
|
|
44
|
+
"@react-types/overlays": "^3.8.15",
|
|
45
|
+
"@react-types/shared": "^3.29.1",
|
|
46
46
|
"@swc/helpers": "^0.5.0",
|
|
47
47
|
"react-transition-group": "^4.4.5"
|
|
48
48
|
},
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9c77d4e8267ed39469c65f65da94ece7be509874"
|
|
61
61
|
}
|
package/src/OpenTransition.tsx
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import React from 'react';
|
|
13
|
+
import React, {JSX, JSXElementConstructor, ReactElement} from 'react';
|
|
14
14
|
import {Transition} from 'react-transition-group';
|
|
15
|
+
// TODO install @types/react-transition-group
|
|
15
16
|
|
|
16
17
|
const OPEN_STATES = {
|
|
17
18
|
entering: false,
|
|
@@ -31,7 +32,10 @@ const OPEN_STATES = {
|
|
|
31
32
|
* **note** hitting esc bypasses exit animation for anyone testing.
|
|
32
33
|
*/
|
|
33
34
|
|
|
34
|
-
export function OpenTransition(
|
|
35
|
+
export function OpenTransition(
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
37
|
+
props
|
|
38
|
+
): JSX.Element | ReactElement<any, string | JSXElementConstructor<any>>[] {
|
|
35
39
|
// Do not apply any transition if in chromatic.
|
|
36
40
|
if (process.env.CHROMATIC) {
|
|
37
41
|
return React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: props.in}));
|
package/src/Underlay.tsx
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import {classNames} from '@react-spectrum/utils';
|
|
14
|
-
import React from 'react';
|
|
14
|
+
import React, {JSX} from 'react';
|
|
15
15
|
import underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';
|
|
16
16
|
|
|
17
17
|
interface UnderlayProps {
|
|
@@ -19,7 +19,7 @@ interface UnderlayProps {
|
|
|
19
19
|
isTransparent?: boolean
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export function Underlay({isOpen, isTransparent, ...otherProps}: UnderlayProps) {
|
|
22
|
+
export function Underlay({isOpen, isTransparent, ...otherProps}: UnderlayProps): JSX.Element {
|
|
23
23
|
return (
|
|
24
24
|
<div data-testid="underlay" {...otherProps} className={classNames(underlayStyles, 'spectrum-Underlay', {'is-open': isOpen, 'spectrum-Underlay--transparent': isTransparent})} />
|
|
25
25
|
);
|