@react-spectrum/overlays 5.7.4 → 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.
@@ -1 +1 @@
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,EAAuB,CAAA,QAAS,uBAAS,CAAA,GAAA,sCAAI,EAAE,YAAY,CAAC,OAAO;YAAC,QAAQ,MAAM,EAAE;QAAA;IAG9H,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,OAA4B;gBAAC,QAAQ,CAAC,CAAC,iCAAW,CAAC,MAAM;YAAA;AAGnJ","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, {ReactElement, ReactNode} 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): ReactNode {\n // Do not apply any transition if in chromatic.\n if (process.env.CHROMATIC) {\n return React.Children.map(props.children as ReactElement<any>, 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 as ReactElement<any>, {isOpen: !!OPEN_STATES[state]}))}\n </Transition>\n );\n}\n"],"names":[],"version":3,"file":"OpenTransition.main.js.map"}
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"}
@@ -1 +1 @@
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,EAAuB,CAAA,QAAS,uBAAS,CAAA,GAAA,YAAI,EAAE,YAAY,CAAC,OAAO;YAAC,QAAQ,MAAM,EAAE;QAAA;IAG9H,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,OAA4B;gBAAC,QAAQ,CAAC,CAAC,iCAAW,CAAC,MAAM;YAAA;AAGnJ","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, {ReactElement, ReactNode} 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): ReactNode {\n // Do not apply any transition if in chromatic.\n if (process.env.CHROMATIC) {\n return React.Children.map(props.children as ReactElement<any>, 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 as ReactElement<any>, {isOpen: !!OPEN_STATES[state]}))}\n </Transition>\n );\n}\n"],"names":[],"version":3,"file":"OpenTransition.module.js.map"}
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"}
@@ -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, {ReactNode} 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): ReactNode {\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"}
@@ -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, {ReactNode} 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): ReactNode {\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"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import React, { JSX, JSXElementConstructor, ReactElement, ReactNode } from "react";
2
2
  import { OverlayProps } from "@react-types/overlays";
3
3
  import { DOMRefValue, StyleProps } from "@react-types/shared";
4
4
  import { AriaPopoverProps, AriaModalOverlayProps } from "@react-aria/overlays";
@@ -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): ReactNode;
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;
@@ -1 +1 @@
1
- {"mappings":";;;;;;AAqBA;;;;;;;;;;;GAWG;AAEH,+BAEE,KAAK,KAAA,GACJ,SAAS,CAWX;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"}
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.4",
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.25.0",
40
- "@react-aria/overlays": "^3.27.0",
41
- "@react-aria/utils": "^3.28.2",
42
- "@react-spectrum/utils": "^3.12.4",
43
- "@react-stately/overlays": "^3.6.15",
44
- "@react-types/overlays": "^3.8.14",
45
- "@react-types/shared": "^3.29.0",
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": "9b66d270572f482948afee95622a85cdf68ed408"
60
+ "gitHead": "9c77d4e8267ed39469c65f65da94ece7be509874"
61
61
  }
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import React, {ReactElement, ReactNode} from 'react';
13
+ import React, {JSX, JSXElementConstructor, ReactElement} from 'react';
14
14
  import {Transition} from 'react-transition-group';
15
15
  // TODO install @types/react-transition-group
16
16
 
@@ -35,15 +35,15 @@ const OPEN_STATES = {
35
35
  export function OpenTransition(
36
36
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
37
37
  props
38
- ): ReactNode {
38
+ ): JSX.Element | ReactElement<any, string | JSXElementConstructor<any>>[] {
39
39
  // Do not apply any transition if in chromatic.
40
40
  if (process.env.CHROMATIC) {
41
- return React.Children.map(props.children as ReactElement<any>, child => child && React.cloneElement(child, {isOpen: props.in}));
41
+ return React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: props.in}));
42
42
  }
43
43
 
44
44
  return (
45
45
  <Transition timeout={{enter: 0, exit: 350}} {...props}>
46
- {(state) => React.Children.map(props.children, child => child && React.cloneElement(child as ReactElement<any>, {isOpen: !!OPEN_STATES[state]}))}
46
+ {(state) => React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: !!OPEN_STATES[state]}))}
47
47
  </Transition>
48
48
  );
49
49
  }
package/src/Underlay.tsx CHANGED
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import {classNames} from '@react-spectrum/utils';
14
- import React, {ReactNode} 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): ReactNode {
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
  );