@react-spectrum/s2 3.0.0-nightly-b3a4d6c11-241119 → 3.0.0-nightly-65e3a52a3-241120

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.
@@ -78,11 +78,11 @@ const $a05aa0b0345f1846$var$dialogStyle = function anonymous(props, overrides) {
78
78
  return rules;
79
79
  };
80
80
  function $a05aa0b0345f1846$var$CustomDialog(props, ref) {
81
- let { size: size, isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled, padding: padding = 'default' } = props;
81
+ let { size: size, isDismissible: isDismissible, isKeyboardDismissDisabled: isKeyboardDismissDisabled, padding: padding = 'default' } = props;
82
82
  let domRef = (0, $f8dpT$reactspectrumutils.useDOMRef)(ref);
83
83
  return /*#__PURE__*/ (0, $f8dpT$reactjsxruntime.jsx)((0, $8e678305a8c10028$exports.Modal), {
84
84
  size: size,
85
- isDismissable: isDismissable,
85
+ isDismissable: isDismissible,
86
86
  isKeyboardDismissDisabled: isKeyboardDismissDisabled,
87
87
  children: /*#__PURE__*/ (0, $f8dpT$reactjsxruntime.jsx)((0, $f8dpT$reactariacomponents.Dialog), {
88
88
  ...props,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBN,SAAS,mCAAa,KAAwB,EAAE,GAAW;IACzD,IAAI,QACF,IAAI,iBACJ,aAAa,6BACb,yBAAyB,WACzB,UAAU,WACX,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,+BAAI;QAAE,MAAM;QAAM,eAAe;QAAe,2BAA2B;kBAC1E,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YACN,GAAG,KAAK;YACT,KAAK;YACL,OAAO,MAAM,YAAY;YACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,kCAAY;yBAAC;YAAO,GAAG,MAAM,MAAM;sBAC9E,CAAA,GAAA,6CAAiB,EAAE,MAAM,QAAQ,EAAE,CAAC,WACnC,oGAAoG;8BACpG,gCAAC,CAAA,GAAA,qDAAyB,EAAE,QAAQ;oBAAC,OAAO;8BACzC;;;;AAMb;AAEA;;CAEC,GACD,IAAI,yDAAgB,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CustomDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {composeRenderProps, OverlayTriggerStateContext, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface CustomDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The size of the Dialog.\n */\n size?: 'S' | 'M' | 'L' | 'fullscreen' | 'fullscreenTakeover',\n /**\n * Whether the Dialog is dismissable.\n */\n isDismissable?: boolean,\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean,\n /**\n * The amount of padding around the contents of the dialog.\n * @default 'default'\n */\n padding?: 'default' | 'none'\n}\n\nconst dialogStyle = style({\n padding: {\n padding: {\n default: {\n default: 24,\n sm: 32\n },\n none: 0\n }\n },\n boxSizing: 'border-box',\n outlineStyle: 'none',\n borderRadius: '[inherit]',\n overflow: 'auto',\n position: 'relative',\n size: 'full',\n maxSize: '[inherit]'\n}, getAllowedOverrides({height: true}));\n\nfunction CustomDialog(props: CustomDialogProps, ref: DOMRef) {\n let {\n size,\n isDismissable,\n isKeyboardDismissDisabled,\n padding = 'default'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissable} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogStyle({padding}, props.styles)}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {children}\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * A CustomDialog is a floating window with a custom layout.\n */\nlet _CustomDialog = forwardRef(CustomDialog);\nexport {_CustomDialog as CustomDialog};\n"],"names":[],"version":3,"file":"CustomDialog.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBN,SAAS,mCAAa,KAAwB,EAAE,GAAW;IACzD,IAAI,QACF,IAAI,iBACJ,aAAa,6BACb,yBAAyB,WACzB,UAAU,WACX,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,+BAAI;QAAE,MAAM;QAAM,eAAe;QAAe,2BAA2B;kBAC1E,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YACN,GAAG,KAAK;YACT,KAAK;YACL,OAAO,MAAM,YAAY;YACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,kCAAY;yBAAC;YAAO,GAAG,MAAM,MAAM;sBAC9E,CAAA,GAAA,6CAAiB,EAAE,MAAM,QAAQ,EAAE,CAAC,WACnC,oGAAoG;8BACpG,gCAAC,CAAA,GAAA,qDAAyB,EAAE,QAAQ;oBAAC,OAAO;8BACzC;;;;AAMb;AAEA;;CAEC,GACD,IAAI,yDAAgB,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CustomDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {composeRenderProps, OverlayTriggerStateContext, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface CustomDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The size of the Dialog.\n */\n size?: 'S' | 'M' | 'L' | 'fullscreen' | 'fullscreenTakeover',\n /**\n * Whether the Dialog is dismissible.\n */\n isDismissible?: boolean,\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean,\n /**\n * The amount of padding around the contents of the dialog.\n * @default 'default'\n */\n padding?: 'default' | 'none'\n}\n\nconst dialogStyle = style({\n padding: {\n padding: {\n default: {\n default: 24,\n sm: 32\n },\n none: 0\n }\n },\n boxSizing: 'border-box',\n outlineStyle: 'none',\n borderRadius: '[inherit]',\n overflow: 'auto',\n position: 'relative',\n size: 'full',\n maxSize: '[inherit]'\n}, getAllowedOverrides({height: true}));\n\nfunction CustomDialog(props: CustomDialogProps, ref: DOMRef) {\n let {\n size,\n isDismissible,\n isKeyboardDismissDisabled,\n padding = 'default'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissible} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogStyle({padding}, props.styles)}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {children}\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * A CustomDialog is a floating window with a custom layout.\n */\nlet _CustomDialog = forwardRef(CustomDialog);\nexport {_CustomDialog as CustomDialog};\n"],"names":[],"version":3,"file":"CustomDialog.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":"AAsCoB;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["packages/@react-spectrum/s2/src/CustomDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {composeRenderProps, OverlayTriggerStateContext, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface CustomDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The size of the Dialog.\n */\n size?: 'S' | 'M' | 'L' | 'fullscreen' | 'fullscreenTakeover',\n /**\n * Whether the Dialog is dismissable.\n */\n isDismissable?: boolean,\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean,\n /**\n * The amount of padding around the contents of the dialog.\n * @default 'default'\n */\n padding?: 'default' | 'none'\n}\n\nconst dialogStyle = style({\n padding: {\n padding: {\n default: {\n default: 24,\n sm: 32\n },\n none: 0\n }\n },\n boxSizing: 'border-box',\n outlineStyle: 'none',\n borderRadius: '[inherit]',\n overflow: 'auto',\n position: 'relative',\n size: 'full',\n maxSize: '[inherit]'\n}, getAllowedOverrides({height: true}));\n\nfunction CustomDialog(props: CustomDialogProps, ref: DOMRef) {\n let {\n size,\n isDismissable,\n isKeyboardDismissDisabled,\n padding = 'default'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissable} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogStyle({padding}, props.styles)}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {children}\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * A CustomDialog is a floating window with a custom layout.\n */\nlet _CustomDialog = forwardRef(CustomDialog);\nexport {_CustomDialog as CustomDialog};\n"],"names":[],"version":3,"file":"CustomDialog.css.map"}
1
+ {"mappings":"AAsCoB;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA","sources":["packages/@react-spectrum/s2/src/CustomDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {composeRenderProps, OverlayTriggerStateContext, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface CustomDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The size of the Dialog.\n */\n size?: 'S' | 'M' | 'L' | 'fullscreen' | 'fullscreenTakeover',\n /**\n * Whether the Dialog is dismissible.\n */\n isDismissible?: boolean,\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean,\n /**\n * The amount of padding around the contents of the dialog.\n * @default 'default'\n */\n padding?: 'default' | 'none'\n}\n\nconst dialogStyle = style({\n padding: {\n padding: {\n default: {\n default: 24,\n sm: 32\n },\n none: 0\n }\n },\n boxSizing: 'border-box',\n outlineStyle: 'none',\n borderRadius: '[inherit]',\n overflow: 'auto',\n position: 'relative',\n size: 'full',\n maxSize: '[inherit]'\n}, getAllowedOverrides({height: true}));\n\nfunction CustomDialog(props: CustomDialogProps, ref: DOMRef) {\n let {\n size,\n isDismissible,\n isKeyboardDismissDisabled,\n padding = 'default'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissible} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogStyle({padding}, props.styles)}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {children}\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * A CustomDialog is a floating window with a custom layout.\n */\nlet _CustomDialog = forwardRef(CustomDialog);\nexport {_CustomDialog as CustomDialog};\n"],"names":[],"version":3,"file":"CustomDialog.css.map"}
@@ -72,11 +72,11 @@ const $6e8e8fdd66697ef1$var$dialogStyle = function anonymous(props, overrides) {
72
72
  return rules;
73
73
  };
74
74
  function $6e8e8fdd66697ef1$var$CustomDialog(props, ref) {
75
- let { size: size, isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled, padding: padding = 'default' } = props;
75
+ let { size: size, isDismissible: isDismissible, isKeyboardDismissDisabled: isKeyboardDismissDisabled, padding: padding = 'default' } = props;
76
76
  let domRef = (0, $4wOFe$useDOMRef)(ref);
77
77
  return /*#__PURE__*/ (0, $4wOFe$jsx)((0, $c46d159bd615e407$export$2b77a92f1a5ad772), {
78
78
  size: size,
79
- isDismissable: isDismissable,
79
+ isDismissable: isDismissible,
80
80
  isKeyboardDismissDisabled: isKeyboardDismissDisabled,
81
81
  children: /*#__PURE__*/ (0, $4wOFe$jsx)((0, $4wOFe$Dialog), {
82
82
  ...props,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBN,SAAS,mCAAa,KAAwB,EAAE,GAAW;IACzD,IAAI,QACF,IAAI,iBACJ,aAAa,6BACb,yBAAyB,WACzB,UAAU,WACX,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,yCAAI;QAAE,MAAM;QAAM,eAAe;QAAe,2BAA2B;kBAC1E,cAAA,gBAAC,CAAA,GAAA,aAAQ;YACN,GAAG,KAAK;YACT,KAAK;YACL,OAAO,MAAM,YAAY;YACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,kCAAY;yBAAC;YAAO,GAAG,MAAM,MAAM;sBAC9E,CAAA,GAAA,yBAAiB,EAAE,MAAM,QAAQ,EAAE,CAAC,WACnC,oGAAoG;8BACpG,gBAAC,CAAA,GAAA,iCAAyB,EAAE,QAAQ;oBAAC,OAAO;8BACzC;;;;AAMb;AAEA;;CAEC,GACD,IAAI,yDAAgB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CustomDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {composeRenderProps, OverlayTriggerStateContext, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface CustomDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The size of the Dialog.\n */\n size?: 'S' | 'M' | 'L' | 'fullscreen' | 'fullscreenTakeover',\n /**\n * Whether the Dialog is dismissable.\n */\n isDismissable?: boolean,\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean,\n /**\n * The amount of padding around the contents of the dialog.\n * @default 'default'\n */\n padding?: 'default' | 'none'\n}\n\nconst dialogStyle = style({\n padding: {\n padding: {\n default: {\n default: 24,\n sm: 32\n },\n none: 0\n }\n },\n boxSizing: 'border-box',\n outlineStyle: 'none',\n borderRadius: '[inherit]',\n overflow: 'auto',\n position: 'relative',\n size: 'full',\n maxSize: '[inherit]'\n}, getAllowedOverrides({height: true}));\n\nfunction CustomDialog(props: CustomDialogProps, ref: DOMRef) {\n let {\n size,\n isDismissable,\n isKeyboardDismissDisabled,\n padding = 'default'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissable} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogStyle({padding}, props.styles)}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {children}\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * A CustomDialog is a floating window with a custom layout.\n */\nlet _CustomDialog = forwardRef(CustomDialog);\nexport {_CustomDialog as CustomDialog};\n"],"names":[],"version":3,"file":"CustomDialog.mjs.map"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBN,SAAS,mCAAa,KAAwB,EAAE,GAAW;IACzD,IAAI,QACF,IAAI,iBACJ,aAAa,6BACb,yBAAyB,WACzB,UAAU,WACX,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,yCAAI;QAAE,MAAM;QAAM,eAAe;QAAe,2BAA2B;kBAC1E,cAAA,gBAAC,CAAA,GAAA,aAAQ;YACN,GAAG,KAAK;YACT,KAAK;YACL,OAAO,MAAM,YAAY;YACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,kCAAY;yBAAC;YAAO,GAAG,MAAM,MAAM;sBAC9E,CAAA,GAAA,yBAAiB,EAAE,MAAM,QAAQ,EAAE,CAAC,WACnC,oGAAoG;8BACpG,gBAAC,CAAA,GAAA,iCAAyB,EAAE,QAAQ;oBAAC,OAAO;8BACzC;;;;AAMb;AAEA;;CAEC,GACD,IAAI,yDAAgB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CustomDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {composeRenderProps, OverlayTriggerStateContext, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\n\nexport interface CustomDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The size of the Dialog.\n */\n size?: 'S' | 'M' | 'L' | 'fullscreen' | 'fullscreenTakeover',\n /**\n * Whether the Dialog is dismissible.\n */\n isDismissible?: boolean,\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean,\n /**\n * The amount of padding around the contents of the dialog.\n * @default 'default'\n */\n padding?: 'default' | 'none'\n}\n\nconst dialogStyle = style({\n padding: {\n padding: {\n default: {\n default: 24,\n sm: 32\n },\n none: 0\n }\n },\n boxSizing: 'border-box',\n outlineStyle: 'none',\n borderRadius: '[inherit]',\n overflow: 'auto',\n position: 'relative',\n size: 'full',\n maxSize: '[inherit]'\n}, getAllowedOverrides({height: true}));\n\nfunction CustomDialog(props: CustomDialogProps, ref: DOMRef) {\n let {\n size,\n isDismissible,\n isKeyboardDismissDisabled,\n padding = 'default'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissible} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogStyle({padding}, props.styles)}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {children}\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * A CustomDialog is a floating window with a custom layout.\n */\nlet _CustomDialog = forwardRef(CustomDialog);\nexport {_CustomDialog as CustomDialog};\n"],"names":[],"version":3,"file":"CustomDialog.mjs.map"}
package/dist/Dialog.cjs CHANGED
@@ -43,11 +43,11 @@ const $0f4636c7093b9233$var$footer = " . _9-3t1y _ca _c-enzrfpb _c-enzwzjc _c-en
43
43
  const $0f4636c7093b9233$var$buttonGroup = " . y_d rb";
44
44
  const $0f4636c7093b9233$export$6af31f836f9aa6f2 = " . _Zd _6b _9-3t1y p-17zqamw __na _La _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _v-17zqamw _w-17zqamw _x-17zqamw _y-17zqamw __va __wa";
45
45
  function $0f4636c7093b9233$var$Dialog(props, ref) {
46
- let { size: size = 'M', isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled } = props;
46
+ let { size: size = 'M', isDismissible: isDismissible, isKeyboardDismissDisabled: isKeyboardDismissDisabled } = props;
47
47
  let domRef = (0, $WjfVF$reactspectrumutils.useDOMRef)(ref);
48
48
  return /*#__PURE__*/ (0, $WjfVF$reactjsxruntime.jsx)((0, $8e678305a8c10028$exports.Modal), {
49
49
  size: size,
50
- isDismissable: isDismissable,
50
+ isDismissable: isDismissible,
51
51
  isKeyboardDismissDisabled: isKeyboardDismissDisabled,
52
52
  children: /*#__PURE__*/ (0, $WjfVF$reactjsxruntime.jsx)((0, $WjfVF$reactariacomponents.Dialog), {
53
53
  ...props,
@@ -108,12 +108,12 @@ function $0f4636c7093b9233$var$Dialog(props, ref) {
108
108
  rules += ' _1a';
109
109
  rules += ' je';
110
110
  rules += ' yj';
111
- if (props.isDismissable) rules += ' ze';
111
+ if (props.isDismissible) rules += ' ze';
112
112
  else rules += ' zj';
113
113
  rules += ' Ae';
114
114
  return rules;
115
115
  }({
116
- isDismissable: props.isDismissable
116
+ isDismissible: props.isDismissible
117
117
  }),
118
118
  children: [
119
119
  /*#__PURE__*/ (0, $WjfVF$reactjsxruntime.jsx)("div", {
@@ -160,7 +160,7 @@ function $0f4636c7093b9233$var$Dialog(props, ref) {
160
160
  children: children
161
161
  })
162
162
  }),
163
- props.isDismissable && /*#__PURE__*/ (0, $WjfVF$reactjsxruntime.jsx)((0, $2f907cb84c6e9e75$exports.CloseButton), {
163
+ props.isDismissible && /*#__PURE__*/ (0, $WjfVF$reactjsxruntime.jsx)((0, $2f907cb84c6e9e75$exports.CloseButton), {
164
164
  styles: " . Be"
165
165
  })
166
166
  ]
@@ -243,7 +243,7 @@ function $0f4636c7093b9233$var$Dialog(props, ref) {
243
243
  [
244
244
  (0, $e1016b8947dbadb8$exports.ButtonGroupContext),
245
245
  {
246
- isHidden: props.isDismissable,
246
+ isHidden: props.isDismissible,
247
247
  styles: $0f4636c7093b9233$var$buttonGroup,
248
248
  align: 'end'
249
249
  }
@@ -1 +1 @@
1
- {"mappings":"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","sources":["packages/@react-spectrum/s2/src/Dialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {CloseButton} from './CloseButton';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, FooterContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {ImageContext} from './Image';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface DialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * Whether the Dialog is dismissable.\n */\n isDismissable?: boolean,\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst image = style({\n width: 'full',\n height: 140,\n objectFit: 'cover'\n});\n\nconst heading = style({\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n font: 'body-lg'\n});\n\nconst content = style({\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body',\n // TODO: adjust margin on mobile?\n marginX: {\n default: 32\n }\n});\n\nconst footer = style({\n flexGrow: 1,\n font: 'body'\n});\n\nconst buttonGroup = style({\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n maxHeight: '[inherit]',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction Dialog(props: DialogProps, ref: DOMRef) {\n let {size = 'M', isDismissable, isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissable} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Render the children multiple times inside the wrappers we need to implement the layout.\n // Each instance hides certain children so that they are all rendered in the correct locations.\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {/* Hero image */}\n <Provider\n values={[\n [ImageContext, {styles: image}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Top header: heading, header, dismiss button, and button group (in fullscreen dialogs). */}\n <div\n className={style({\n // Wrapper that creates the margin for the dismiss button.\n display: 'flex',\n alignItems: 'start',\n columnGap: 12,\n marginStart: {\n default: 32\n },\n marginEnd: {\n default: 32,\n isDismissable: 12\n },\n marginTop: {\n default: 12 // margin to dismiss button\n }\n })({isDismissable: props.isDismissable})}>\n <div\n className={style({\n // Wrapper for heading, header, and button group.\n // This swaps orientation from horizontal to vertical at small screen sizes.\n display: 'flex',\n flexGrow: 1,\n marginTop: {\n default: 20, // 32 - 12 (handled above)\n ':empty': 0\n },\n marginBottom: {\n default: 16,\n ':empty': 0\n },\n columnGap: 24,\n rowGap: 8,\n flexDirection: {\n default: 'column',\n sm: 'row'\n },\n alignItems: {\n default: 'start',\n sm: 'center'\n }\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n </div>\n {props.isDismissable && \n <CloseButton styles={style({marginBottom: 12})} />\n }\n </div>\n {/* Main content */}\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {styles: content}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Footer and button group */}\n <div\n className={style({\n display: 'flex',\n paddingX: {\n default: 32\n },\n paddingBottom: {\n default: 32\n },\n paddingTop: {\n default: 32,\n ':empty': 0\n },\n gap: 24,\n alignItems: 'center',\n flexWrap: 'wrap'\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {styles: footer}],\n [ButtonGroupContext, {isHidden: props.isDismissable, styles: buttonGroup, align: 'end'}]\n ]}>\n {children}\n </Provider>\n </div>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface.\n * Depending on the kind of Dialog, further interactions may be blocked until the Dialog is acknowledged.\n */\nlet _Dialog = forwardRef(Dialog);\nexport {_Dialog as Dialog};\n"],"names":[],"version":3,"file":"Dialog.cjs.map"}
1
+ {"mappings":"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","sources":["packages/@react-spectrum/s2/src/Dialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {CloseButton} from './CloseButton';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, FooterContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {ImageContext} from './Image';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface DialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * Whether the Dialog is dismissible.\n */\n isDismissible?: boolean,\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst image = style({\n width: 'full',\n height: 140,\n objectFit: 'cover'\n});\n\nconst heading = style({\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n font: 'body-lg'\n});\n\nconst content = style({\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body',\n // TODO: adjust margin on mobile?\n marginX: {\n default: 32\n }\n});\n\nconst footer = style({\n flexGrow: 1,\n font: 'body'\n});\n\nconst buttonGroup = style({\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n maxHeight: '[inherit]',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction Dialog(props: DialogProps, ref: DOMRef) {\n let {size = 'M', isDismissible, isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissible} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Render the children multiple times inside the wrappers we need to implement the layout.\n // Each instance hides certain children so that they are all rendered in the correct locations.\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {/* Hero image */}\n <Provider\n values={[\n [ImageContext, {styles: image}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Top header: heading, header, dismiss button, and button group (in fullscreen dialogs). */}\n <div\n className={style({\n // Wrapper that creates the margin for the dismiss button.\n display: 'flex',\n alignItems: 'start',\n columnGap: 12,\n marginStart: {\n default: 32\n },\n marginEnd: {\n default: 32,\n isDismissible: 12\n },\n marginTop: {\n default: 12 // margin to dismiss button\n }\n })({isDismissible: props.isDismissible})}>\n <div\n className={style({\n // Wrapper for heading, header, and button group.\n // This swaps orientation from horizontal to vertical at small screen sizes.\n display: 'flex',\n flexGrow: 1,\n marginTop: {\n default: 20, // 32 - 12 (handled above)\n ':empty': 0\n },\n marginBottom: {\n default: 16,\n ':empty': 0\n },\n columnGap: 24,\n rowGap: 8,\n flexDirection: {\n default: 'column',\n sm: 'row'\n },\n alignItems: {\n default: 'start',\n sm: 'center'\n }\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n </div>\n {props.isDismissible && \n <CloseButton styles={style({marginBottom: 12})} />\n }\n </div>\n {/* Main content */}\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {styles: content}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Footer and button group */}\n <div\n className={style({\n display: 'flex',\n paddingX: {\n default: 32\n },\n paddingBottom: {\n default: 32\n },\n paddingTop: {\n default: 32,\n ':empty': 0\n },\n gap: 24,\n alignItems: 'center',\n flexWrap: 'wrap'\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {styles: footer}],\n [ButtonGroupContext, {isHidden: props.isDismissible, styles: buttonGroup, align: 'end'}]\n ]}>\n {children}\n </Provider>\n </div>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface.\n * Depending on the kind of Dialog, further interactions may be blocked until the Dialog is acknowledged.\n */\nlet _Dialog = forwardRef(Dialog);\nexport {_Dialog as Dialog};\n"],"names":[],"version":3,"file":"Dialog.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":"ACwCc;EAAA;;;;EAAA;;;;EAAA;;;;EAME;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAMD;;;;EAkBA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAKK;;;;EAAA;;;;EAKO;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA0CF;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAiBE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAqCU;;;;EAiBZ;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAzJX;EAME;;;;;;EAAA;;;;EAwBD;;;;EAUY;;;;EA2DA;;;;EAAA;;;;EAsDF;;;;;AAzJX;;AAME;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;IAMD;;;;IAIE;;;;;;AAAA;EAAA;IAAA;;;;;;AAmFU;EAAA;IAAA;;;;IAAA;;;;;;AAqCU","sources":["ebf76300d207adbd","packages/@react-spectrum/s2/src/Dialog.tsx"],"sourcesContent":["@import \"41c4aa1296799ea1\";\n@import \"b6cb6ab59865bde8\";\n@import \"c2aa69bcd8dab7fb\";\n@import \"e9cdd4f3ada8c5d9\";\n@import \"722603297b70d86b\";\n@import \"d1b118504b390ed5\";\n@import \"a59d0f5a0e9cb2ac\";\n@import \"26ac236cb46f8555\";\n@import \"8b070308c4891c21\";\n@import \"5ec9bfe5eed7daff\";\n@import \"7eb24a82f7ffd3c6\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {CloseButton} from './CloseButton';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, FooterContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {ImageContext} from './Image';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface DialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * Whether the Dialog is dismissable.\n */\n isDismissable?: boolean,\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst image = style({\n width: 'full',\n height: 140,\n objectFit: 'cover'\n});\n\nconst heading = style({\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n font: 'body-lg'\n});\n\nconst content = style({\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body',\n // TODO: adjust margin on mobile?\n marginX: {\n default: 32\n }\n});\n\nconst footer = style({\n flexGrow: 1,\n font: 'body'\n});\n\nconst buttonGroup = style({\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n maxHeight: '[inherit]',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction Dialog(props: DialogProps, ref: DOMRef) {\n let {size = 'M', isDismissable, isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissable} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Render the children multiple times inside the wrappers we need to implement the layout.\n // Each instance hides certain children so that they are all rendered in the correct locations.\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {/* Hero image */}\n <Provider\n values={[\n [ImageContext, {styles: image}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Top header: heading, header, dismiss button, and button group (in fullscreen dialogs). */}\n <div\n className={style({\n // Wrapper that creates the margin for the dismiss button.\n display: 'flex',\n alignItems: 'start',\n columnGap: 12,\n marginStart: {\n default: 32\n },\n marginEnd: {\n default: 32,\n isDismissable: 12\n },\n marginTop: {\n default: 12 // margin to dismiss button\n }\n })({isDismissable: props.isDismissable})}>\n <div\n className={style({\n // Wrapper for heading, header, and button group.\n // This swaps orientation from horizontal to vertical at small screen sizes.\n display: 'flex',\n flexGrow: 1,\n marginTop: {\n default: 20, // 32 - 12 (handled above)\n ':empty': 0\n },\n marginBottom: {\n default: 16,\n ':empty': 0\n },\n columnGap: 24,\n rowGap: 8,\n flexDirection: {\n default: 'column',\n sm: 'row'\n },\n alignItems: {\n default: 'start',\n sm: 'center'\n }\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n </div>\n {props.isDismissable && \n <CloseButton styles={style({marginBottom: 12})} />\n }\n </div>\n {/* Main content */}\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {styles: content}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Footer and button group */}\n <div\n className={style({\n display: 'flex',\n paddingX: {\n default: 32\n },\n paddingBottom: {\n default: 32\n },\n paddingTop: {\n default: 32,\n ':empty': 0\n },\n gap: 24,\n alignItems: 'center',\n flexWrap: 'wrap'\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {styles: footer}],\n [ButtonGroupContext, {isHidden: props.isDismissable, styles: buttonGroup, align: 'end'}]\n ]}>\n {children}\n </Provider>\n </div>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface.\n * Depending on the kind of Dialog, further interactions may be blocked until the Dialog is acknowledged.\n */\nlet _Dialog = forwardRef(Dialog);\nexport {_Dialog as Dialog};\n"],"names":[],"version":3,"file":"Dialog.css.map"}
1
+ {"mappings":"ACwCc;EAAA;;;;EAAA;;;;EAAA;;;;EAME;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAMD;;;;EAkBA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAKK;;;;EAAA;;;;EAKO;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA0CF;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAiBE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAqCU;;;;EAiBZ;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAzJX;EAME;;;;;;EAAA;;;;EAwBD;;;;EAUY;;;;EA2DA;;;;EAAA;;;;EAsDF;;;;;AAzJX;;AAME;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;IAMD;;;;IAIE;;;;;;AAAA;EAAA;IAAA;;;;;;AAmFU;EAAA;IAAA;;;;IAAA;;;;;;AAqCU","sources":["ebf76300d207adbd","packages/@react-spectrum/s2/src/Dialog.tsx"],"sourcesContent":["@import \"41c4aa1296799ea1\";\n@import \"b6cb6ab59865bde8\";\n@import \"c2aa69bcd8dab7fb\";\n@import \"e9cdd4f3ada8c5d9\";\n@import \"722603297b70d86b\";\n@import \"d1b118504b390ed5\";\n@import \"a59d0f5a0e9cb2ac\";\n@import \"26ac236cb46f8555\";\n@import \"8b070308c4891c21\";\n@import \"5ec9bfe5eed7daff\";\n@import \"7eb24a82f7ffd3c6\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {CloseButton} from './CloseButton';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, FooterContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {ImageContext} from './Image';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface DialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * Whether the Dialog is dismissible.\n */\n isDismissible?: boolean,\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst image = style({\n width: 'full',\n height: 140,\n objectFit: 'cover'\n});\n\nconst heading = style({\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n font: 'body-lg'\n});\n\nconst content = style({\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body',\n // TODO: adjust margin on mobile?\n marginX: {\n default: 32\n }\n});\n\nconst footer = style({\n flexGrow: 1,\n font: 'body'\n});\n\nconst buttonGroup = style({\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n maxHeight: '[inherit]',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction Dialog(props: DialogProps, ref: DOMRef) {\n let {size = 'M', isDismissible, isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissible} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Render the children multiple times inside the wrappers we need to implement the layout.\n // Each instance hides certain children so that they are all rendered in the correct locations.\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {/* Hero image */}\n <Provider\n values={[\n [ImageContext, {styles: image}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Top header: heading, header, dismiss button, and button group (in fullscreen dialogs). */}\n <div\n className={style({\n // Wrapper that creates the margin for the dismiss button.\n display: 'flex',\n alignItems: 'start',\n columnGap: 12,\n marginStart: {\n default: 32\n },\n marginEnd: {\n default: 32,\n isDismissible: 12\n },\n marginTop: {\n default: 12 // margin to dismiss button\n }\n })({isDismissible: props.isDismissible})}>\n <div\n className={style({\n // Wrapper for heading, header, and button group.\n // This swaps orientation from horizontal to vertical at small screen sizes.\n display: 'flex',\n flexGrow: 1,\n marginTop: {\n default: 20, // 32 - 12 (handled above)\n ':empty': 0\n },\n marginBottom: {\n default: 16,\n ':empty': 0\n },\n columnGap: 24,\n rowGap: 8,\n flexDirection: {\n default: 'column',\n sm: 'row'\n },\n alignItems: {\n default: 'start',\n sm: 'center'\n }\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n </div>\n {props.isDismissible && \n <CloseButton styles={style({marginBottom: 12})} />\n }\n </div>\n {/* Main content */}\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {styles: content}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Footer and button group */}\n <div\n className={style({\n display: 'flex',\n paddingX: {\n default: 32\n },\n paddingBottom: {\n default: 32\n },\n paddingTop: {\n default: 32,\n ':empty': 0\n },\n gap: 24,\n alignItems: 'center',\n flexWrap: 'wrap'\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {styles: footer}],\n [ButtonGroupContext, {isHidden: props.isDismissible, styles: buttonGroup, align: 'end'}]\n ]}>\n {children}\n </Provider>\n </div>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface.\n * Depending on the kind of Dialog, further interactions may be blocked until the Dialog is acknowledged.\n */\nlet _Dialog = forwardRef(Dialog);\nexport {_Dialog as Dialog};\n"],"names":[],"version":3,"file":"Dialog.css.map"}
package/dist/Dialog.mjs CHANGED
@@ -36,11 +36,11 @@ const $9bbc115952dac5a6$var$footer = " . _9-3t1y _ca _c-enzrfpb _c-enzwzjc _c-en
36
36
  const $9bbc115952dac5a6$var$buttonGroup = " . y_d rb";
37
37
  const $9bbc115952dac5a6$export$6af31f836f9aa6f2 = " . _Zd _6b _9-3t1y p-17zqamw __na _La _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _v-17zqamw _w-17zqamw _x-17zqamw _y-17zqamw __va __wa";
38
38
  function $9bbc115952dac5a6$var$Dialog(props, ref) {
39
- let { size: size = 'M', isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled } = props;
39
+ let { size: size = 'M', isDismissible: isDismissible, isKeyboardDismissDisabled: isKeyboardDismissDisabled } = props;
40
40
  let domRef = (0, $9Rtwv$useDOMRef)(ref);
41
41
  return /*#__PURE__*/ (0, $9Rtwv$jsx)((0, $c46d159bd615e407$export$2b77a92f1a5ad772), {
42
42
  size: size,
43
- isDismissable: isDismissable,
43
+ isDismissable: isDismissible,
44
44
  isKeyboardDismissDisabled: isKeyboardDismissDisabled,
45
45
  children: /*#__PURE__*/ (0, $9Rtwv$jsx)((0, $9Rtwv$Dialog), {
46
46
  ...props,
@@ -101,12 +101,12 @@ function $9bbc115952dac5a6$var$Dialog(props, ref) {
101
101
  rules += ' _1a';
102
102
  rules += ' je';
103
103
  rules += ' yj';
104
- if (props.isDismissable) rules += ' ze';
104
+ if (props.isDismissible) rules += ' ze';
105
105
  else rules += ' zj';
106
106
  rules += ' Ae';
107
107
  return rules;
108
108
  }({
109
- isDismissable: props.isDismissable
109
+ isDismissible: props.isDismissible
110
110
  }),
111
111
  children: [
112
112
  /*#__PURE__*/ (0, $9Rtwv$jsx)("div", {
@@ -153,7 +153,7 @@ function $9bbc115952dac5a6$var$Dialog(props, ref) {
153
153
  children: children
154
154
  })
155
155
  }),
156
- props.isDismissable && /*#__PURE__*/ (0, $9Rtwv$jsx)((0, $a9cda54c4f47ce52$export$de65de8213222d10), {
156
+ props.isDismissible && /*#__PURE__*/ (0, $9Rtwv$jsx)((0, $a9cda54c4f47ce52$export$de65de8213222d10), {
157
157
  styles: " . Be"
158
158
  })
159
159
  ]
@@ -236,7 +236,7 @@ function $9bbc115952dac5a6$var$Dialog(props, ref) {
236
236
  [
237
237
  (0, $472eaa9a9b344b9a$export$4c574c91bb0be0e2),
238
238
  {
239
- isHidden: props.isDismissable,
239
+ isHidden: props.isDismissible,
240
240
  styles: $9bbc115952dac5a6$var$buttonGroup,
241
241
  align: 'end'
242
242
  }
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA8BD,MAAM;AAMN,MAAM;AAMN,MAAM;AAIN,MAAM;AAcN,MAAM;AAKN,MAAM;AAKC,MAAM;AAYb,SAAS,6BAAO,KAAkB,EAAE,GAAW;IAC7C,IAAI,QAAC,OAAO,oBAAK,aAAa,6BAAE,yBAAyB,EAAC,GAAG;IAC7D,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,yCAAI;QAAE,MAAM;QAAM,eAAe;QAAe,2BAA2B;kBAC1E,cAAA,gBAAC,CAAA,GAAA,aAAQ;YACN,GAAG,KAAK;YACT,KAAK;YACL,OAAO,MAAM,YAAY;YACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK;sBAC3C,CAAA,GAAA,yBAAiB,EAAE,MAAM,QAAQ,EAAE,CAAC,WACnC,0FAA0F;gBAC1F,+FAA+F;gBAC/F,oGAAoG;8BACpG,iBAAC,CAAA,GAAA,iCAAyB,EAAE,QAAQ;oBAAC,OAAO;;sCAE1C,gBAAC,CAAA,GAAA,eAAO;4BACN,QAAQ;gCACN;oCAAC,CAAA,GAAA,yCAAW;oCAAG;wCAAC,QAAQ;oCAAK;iCAAE;gCAC/B;oCAAC,CAAA,GAAA,yCAAa;oCAAG;wCAAC,UAAU;oCAAI;iCAAE;gCAClC;oCAAC,CAAA,GAAA,yCAAY;oCAAG;wCAAC,UAAU;oCAAI;iCAAE;gCACjC;oCAAC,CAAA,GAAA,yCAAa;oCAAG;wCAAC,UAAU;oCAAI;iCAAE;gCAClC;oCAAC,CAAA,GAAA,yCAAY;oCAAG;wCAAC,UAAU;oCAAI;iCAAE;gCACjC;oCAAC,CAAA,GAAA,yCAAiB;oCAAG;wCAAC,UAAU;oCAAI;iCAAE;6BACvC;sCACA;;sCAGH,iBAAC;4BACC,WAAW;;;;;;;;;;8BAeR;gCAAC,eAAe,MAAM,aAAa;4BAAA;;8CACtC,gBAAC;oCACC,SAAS;8CAwBT,cAAA,gBAAC,CAAA,GAAA,eAAO;wCACN,QAAQ;4CACN;gDAAC,CAAA,GAAA,yCAAW;gDAAG;oDAAC,QAAQ;gDAAI;6CAAE;4CAC9B;gDAAC,CAAA,GAAA,yCAAa;gDAAG;oDAAC,QAAQ;gDAAO;6CAAE;4CACnC;gDAAC,CAAA,GAAA,yCAAY;gDAAG;oDAAC,QAAQ;gDAAM;6CAAE;4CACjC;gDAAC,CAAA,GAAA,yCAAa;gDAAG;oDAAC,UAAU;gDAAI;6CAAE;4CAClC;gDAAC,CAAA,GAAA,yCAAY;gDAAG;oDAAC,UAAU;gDAAI;6CAAE;4CACjC;gDAAC,CAAA,GAAA,yCAAiB;gDAAG;oDAAC,UAAU;gDAAI;6CAAE;yCACvC;kDACA;;;gCAGJ,MAAM,aAAa,kBAClB,gBAAC,CAAA,GAAA,yCAAU;oCAAE,MAAM;;;;sCAIvB,gBAAC,CAAA,GAAA,eAAO;4BACN,QAAQ;gCACN;oCAAC,CAAA,GAAA,yCAAW;oCAAG;wCAAC,QAAQ;oCAAI;iCAAE;gCAC9B;oCAAC,CAAA,GAAA,yCAAa;oCAAG;wCAAC,UAAU;oCAAI;iCAAE;gCAClC;oCAAC,CAAA,GAAA,yCAAY;oCAAG;wCAAC,UAAU;oCAAI;iCAAE;gCACjC;oCAAC,CAAA,GAAA,yCAAa;oCAAG;wCAAC,QAAQ;oCAAO;iCAAE;gCACnC;oCAAC,CAAA,GAAA,yCAAY;oCAAG;wCAAC,UAAU;oCAAI;iCAAE;gCACjC;oCAAC,CAAA,GAAA,yCAAiB;oCAAG;wCAAC,UAAU;oCAAI;iCAAE;6BACvC;sCACA;;sCAGH,gBAAC;4BACC,SAAS;sCAgBT,cAAA,gBAAC,CAAA,GAAA,eAAO;gCACN,QAAQ;oCACN;wCAAC,CAAA,GAAA,yCAAW;wCAAG;4CAAC,QAAQ;wCAAI;qCAAE;oCAC9B;wCAAC,CAAA,GAAA,yCAAa;wCAAG;4CAAC,UAAU;wCAAI;qCAAE;oCAClC;wCAAC,CAAA,GAAA,yCAAY;wCAAG;4CAAC,UAAU;wCAAI;qCAAE;oCACjC;wCAAC,CAAA,GAAA,yCAAa;wCAAG;4CAAC,UAAU;wCAAI;qCAAE;oCAClC;wCAAC,CAAA,GAAA,yCAAY;wCAAG;4CAAC,QAAQ;wCAAM;qCAAE;oCACjC;wCAAC,CAAA,GAAA,yCAAiB;wCAAG;4CAAC,UAAU,MAAM,aAAa;4CAAE,QAAQ;4CAAa,OAAO;wCAAK;qCAAE;iCACzF;0CACA;;;;;;;AAQjB;AAEA;;;CAGC,GACD,IAAI,0DAAU,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Dialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {CloseButton} from './CloseButton';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, FooterContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {ImageContext} from './Image';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface DialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * Whether the Dialog is dismissable.\n */\n isDismissable?: boolean,\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst image = style({\n width: 'full',\n height: 140,\n objectFit: 'cover'\n});\n\nconst heading = style({\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n font: 'body-lg'\n});\n\nconst content = style({\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body',\n // TODO: adjust margin on mobile?\n marginX: {\n default: 32\n }\n});\n\nconst footer = style({\n flexGrow: 1,\n font: 'body'\n});\n\nconst buttonGroup = style({\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n maxHeight: '[inherit]',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction Dialog(props: DialogProps, ref: DOMRef) {\n let {size = 'M', isDismissable, isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissable} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Render the children multiple times inside the wrappers we need to implement the layout.\n // Each instance hides certain children so that they are all rendered in the correct locations.\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {/* Hero image */}\n <Provider\n values={[\n [ImageContext, {styles: image}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Top header: heading, header, dismiss button, and button group (in fullscreen dialogs). */}\n <div\n className={style({\n // Wrapper that creates the margin for the dismiss button.\n display: 'flex',\n alignItems: 'start',\n columnGap: 12,\n marginStart: {\n default: 32\n },\n marginEnd: {\n default: 32,\n isDismissable: 12\n },\n marginTop: {\n default: 12 // margin to dismiss button\n }\n })({isDismissable: props.isDismissable})}>\n <div\n className={style({\n // Wrapper for heading, header, and button group.\n // This swaps orientation from horizontal to vertical at small screen sizes.\n display: 'flex',\n flexGrow: 1,\n marginTop: {\n default: 20, // 32 - 12 (handled above)\n ':empty': 0\n },\n marginBottom: {\n default: 16,\n ':empty': 0\n },\n columnGap: 24,\n rowGap: 8,\n flexDirection: {\n default: 'column',\n sm: 'row'\n },\n alignItems: {\n default: 'start',\n sm: 'center'\n }\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n </div>\n {props.isDismissable && \n <CloseButton styles={style({marginBottom: 12})} />\n }\n </div>\n {/* Main content */}\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {styles: content}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Footer and button group */}\n <div\n className={style({\n display: 'flex',\n paddingX: {\n default: 32\n },\n paddingBottom: {\n default: 32\n },\n paddingTop: {\n default: 32,\n ':empty': 0\n },\n gap: 24,\n alignItems: 'center',\n flexWrap: 'wrap'\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {styles: footer}],\n [ButtonGroupContext, {isHidden: props.isDismissable, styles: buttonGroup, align: 'end'}]\n ]}>\n {children}\n </Provider>\n </div>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface.\n * Depending on the kind of Dialog, further interactions may be blocked until the Dialog is acknowledged.\n */\nlet _Dialog = forwardRef(Dialog);\nexport {_Dialog as Dialog};\n"],"names":[],"version":3,"file":"Dialog.mjs.map"}
1
+ {"mappings":"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","sources":["packages/@react-spectrum/s2/src/Dialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {CloseButton} from './CloseButton';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, FooterContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {ImageContext} from './Image';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface DialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * Whether the Dialog is dismissible.\n */\n isDismissible?: boolean,\n /**\n * The size of the Dialog.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst image = style({\n width: 'full',\n height: 140,\n objectFit: 'cover'\n});\n\nconst heading = style({\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n font: 'body-lg'\n});\n\nconst content = style({\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body',\n // TODO: adjust margin on mobile?\n marginX: {\n default: 32\n }\n});\n\nconst footer = style({\n flexGrow: 1,\n font: 'body'\n});\n\nconst buttonGroup = style({\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n maxHeight: '[inherit]',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction Dialog(props: DialogProps, ref: DOMRef) {\n let {size = 'M', isDismissible, isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={size} isDismissable={isDismissible} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Render the children multiple times inside the wrappers we need to implement the layout.\n // Each instance hides certain children so that they are all rendered in the correct locations.\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n {/* Hero image */}\n <Provider\n values={[\n [ImageContext, {styles: image}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Top header: heading, header, dismiss button, and button group (in fullscreen dialogs). */}\n <div\n className={style({\n // Wrapper that creates the margin for the dismiss button.\n display: 'flex',\n alignItems: 'start',\n columnGap: 12,\n marginStart: {\n default: 32\n },\n marginEnd: {\n default: 32,\n isDismissible: 12\n },\n marginTop: {\n default: 12 // margin to dismiss button\n }\n })({isDismissible: props.isDismissible})}>\n <div\n className={style({\n // Wrapper for heading, header, and button group.\n // This swaps orientation from horizontal to vertical at small screen sizes.\n display: 'flex',\n flexGrow: 1,\n marginTop: {\n default: 20, // 32 - 12 (handled above)\n ':empty': 0\n },\n marginBottom: {\n default: 16,\n ':empty': 0\n },\n columnGap: 24,\n rowGap: 8,\n flexDirection: {\n default: 'column',\n sm: 'row'\n },\n alignItems: {\n default: 'start',\n sm: 'center'\n }\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n </div>\n {props.isDismissible && \n <CloseButton styles={style({marginBottom: 12})} />\n }\n </div>\n {/* Main content */}\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {styles: content}],\n [FooterContext, {isHidden: true}],\n [ButtonGroupContext, {isHidden: true}]\n ]}>\n {children}\n </Provider>\n {/* Footer and button group */}\n <div\n className={style({\n display: 'flex',\n paddingX: {\n default: 32\n },\n paddingBottom: {\n default: 32\n },\n paddingTop: {\n default: 32,\n ':empty': 0\n },\n gap: 24,\n alignItems: 'center',\n flexWrap: 'wrap'\n })}>\n <Provider\n values={[\n [ImageContext, {hidden: true}],\n [HeadingContext, {isHidden: true}],\n [HeaderContext, {isHidden: true}],\n [ContentContext, {isHidden: true}],\n [FooterContext, {styles: footer}],\n [ButtonGroupContext, {isHidden: props.isDismissible, styles: buttonGroup, align: 'end'}]\n ]}>\n {children}\n </Provider>\n </div>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface.\n * Depending on the kind of Dialog, further interactions may be blocked until the Dialog is acknowledged.\n */\nlet _Dialog = forwardRef(Dialog);\nexport {_Dialog as Dialog};\n"],"names":[],"version":3,"file":"Dialog.mjs.map"}
@@ -27,7 +27,7 @@ $parcel$export(module.exports, "useDialogContainer", () => $fc196655d58ce18c$exp
27
27
 
28
28
 
29
29
  function $fc196655d58ce18c$export$547754aada6e339f(props) {
30
- let { children: children, onDismiss: onDismiss, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled } = props;
30
+ let { children: children, onDismiss: onDismiss } = props;
31
31
  let childArray = (0, ($parcel$interopDefault($33gII$react))).Children.toArray(children);
32
32
  if (childArray.length > 1) throw new Error('Only a single child can be passed to DialogContainer.');
33
33
  let [lastChild, setLastChild] = (0, $33gII$react.useState)(null);
@@ -43,9 +43,7 @@ function $fc196655d58ce18c$export$547754aada6e339f(props) {
43
43
  return /*#__PURE__*/ (0, $33gII$reactjsxruntime.jsx)((0, $33gII$reactariacomponents.ModalContext).Provider, {
44
44
  value: {
45
45
  isOpen: !!child,
46
- onOpenChange: onOpenChange,
47
- isDismissable: isDismissable,
48
- isKeyboardDismissDisabled: isKeyboardDismissDisabled
46
+ onOpenChange: onOpenChange
49
47
  },
50
48
  children: lastChild
51
49
  });
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAaM,SAAS,0CAAgB,KAA2B;IACzD,IAAI,YACF,QAAQ,aACR,SAAS,iBACT,gBAAgB,kCAChB,yBAAyB,EAC1B,GAAG;IAEJ,IAAI,aAAa,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,OAAO,CAAC;IACxC,IAAI,WAAW,MAAM,GAAG,GACtB,MAAM,IAAI,MAAM;IAGlB,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,qBAAO,EAAuB;IAE9D,6EAA6E;IAC7E,0DAA0D;IAC1D,IAAI,QAAkC;IACtC,IAAI,MAAM,OAAO,CAAC,WAChB,QAAQ,SAAS,IAAI,CAAC,CAAA,GAAA,sCAAI,EAAE,cAAc;SACrC,kBAAI,CAAA,GAAA,sCAAI,EAAE,cAAc,CAAC,WAC9B,QAAQ;IAGV,IAAI,SAAS,UAAU,WACrB,aAAa;IAGf,IAAI,eAAe,CAAC;QAClB,IAAI,CAAC,QACH;IAEJ;IAEA,qBACE,gCAAC,CAAA,GAAA,uCAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,QAAQ,CAAC,CAAC;0BAAO;2BAAc;uCAAe;QAAyB;kBACnG;;AAGP;AASO,SAAS;IACd,IAAI,UAAU,CAAA,GAAA,4CAAgB,EAAE,CAAA,GAAA,uCAAW;IAC3C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM;IAGlB,OAAO;QACL;YACE,SAAS,eAAe;QAC1B;IACF;AACF","sources":["packages/@react-spectrum/s2/src/DialogContainer.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ModalContext, useSlottedContext} from 'react-aria-components';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumDialogContainerProps} from '@react-types/dialog';\n\nexport interface DialogContainerProps extends Omit<SpectrumDialogContainerProps, 'type'> {}\n\n/**\n * A DialogContainer accepts a single Dialog as a child, and manages showing and hiding\n * it in a modal. Useful in cases where there is no trigger element\n * or when the trigger unmounts while the dialog is open.\n */\nexport function DialogContainer(props: DialogContainerProps) {\n let {\n children,\n onDismiss,\n isDismissable = false,\n isKeyboardDismissDisabled\n } = props;\n\n let childArray = React.Children.toArray(children);\n if (childArray.length > 1) {\n throw new Error('Only a single child can be passed to DialogContainer.');\n }\n\n let [lastChild, setLastChild] = useState<ReactElement | null>(null);\n\n // React.Children.toArray mutates the children, and we need them to be stable\n // between renders so that the lastChild comparison works.\n let child: ReactElement | undefined = undefined;\n if (Array.isArray(children)) {\n child = children.find(React.isValidElement);\n } else if (React.isValidElement(children)) {\n child = children;\n }\n\n if (child && child !== lastChild) {\n setLastChild(child);\n }\n\n let onOpenChange = (isOpen: boolean) => {\n if (!isOpen) {\n onDismiss();\n }\n };\n\n return (\n <ModalContext.Provider value={{isOpen: !!child, onOpenChange, isDismissable, isKeyboardDismissDisabled}}>\n {lastChild}\n </ModalContext.Provider>\n );\n}\n\nexport interface DialogContainerValue {\n /**\n * A handler to programmatically dismiss the dialog.\n */\n dismiss(): void\n}\n\nexport function useDialogContainer(): DialogContainerValue {\n let context = useSlottedContext(ModalContext);\n if (!context) {\n throw new Error('Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.');\n }\n\n return {\n dismiss() {\n context?.onOpenChange?.(false);\n }\n };\n}\n"],"names":[],"version":3,"file":"DialogContainer.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAaM,SAAS,0CAAgB,KAA2B;IACzD,IAAI,YACF,QAAQ,aACR,SAAS,EACV,GAAG;IAEJ,IAAI,aAAa,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,OAAO,CAAC;IACxC,IAAI,WAAW,MAAM,GAAG,GACtB,MAAM,IAAI,MAAM;IAGlB,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,qBAAO,EAAuB;IAE9D,6EAA6E;IAC7E,0DAA0D;IAC1D,IAAI,QAAkC;IACtC,IAAI,MAAM,OAAO,CAAC,WAChB,QAAQ,SAAS,IAAI,CAAC,CAAA,GAAA,sCAAI,EAAE,cAAc;SACrC,kBAAI,CAAA,GAAA,sCAAI,EAAE,cAAc,CAAC,WAC9B,QAAQ;IAGV,IAAI,SAAS,UAAU,WACrB,aAAa;IAGf,IAAI,eAAe,CAAC;QAClB,IAAI,CAAC,QACH;IAEJ;IAEA,qBACE,gCAAC,CAAA,GAAA,uCAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,QAAQ,CAAC,CAAC;0BAAO;QAAY;kBACzD;;AAGP;AASO,SAAS;IACd,IAAI,UAAU,CAAA,GAAA,4CAAgB,EAAE,CAAA,GAAA,uCAAW;IAC3C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM;IAGlB,OAAO;QACL;YACE,SAAS,eAAe;QAC1B;IACF;AACF","sources":["packages/@react-spectrum/s2/src/DialogContainer.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ModalContext, useSlottedContext} from 'react-aria-components';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumDialogContainerProps} from '@react-types/dialog';\n\nexport interface DialogContainerProps extends Omit<SpectrumDialogContainerProps, 'type' | 'isDismissable' | 'isKeyboardDismissDisabled'> {}\n\n/**\n * A DialogContainer accepts a single Dialog as a child, and manages showing and hiding\n * it in a modal. Useful in cases where there is no trigger element\n * or when the trigger unmounts while the dialog is open.\n */\nexport function DialogContainer(props: DialogContainerProps) {\n let {\n children,\n onDismiss\n } = props;\n\n let childArray = React.Children.toArray(children);\n if (childArray.length > 1) {\n throw new Error('Only a single child can be passed to DialogContainer.');\n }\n\n let [lastChild, setLastChild] = useState<ReactElement | null>(null);\n\n // React.Children.toArray mutates the children, and we need them to be stable\n // between renders so that the lastChild comparison works.\n let child: ReactElement | undefined = undefined;\n if (Array.isArray(children)) {\n child = children.find(React.isValidElement);\n } else if (React.isValidElement(children)) {\n child = children;\n }\n\n if (child && child !== lastChild) {\n setLastChild(child);\n }\n\n let onOpenChange = (isOpen: boolean) => {\n if (!isOpen) {\n onDismiss();\n }\n };\n\n return (\n <ModalContext.Provider value={{isOpen: !!child, onOpenChange}}>\n {lastChild}\n </ModalContext.Provider>\n );\n}\n\nexport interface DialogContainerValue {\n /**\n * A handler to programmatically dismiss the dialog.\n */\n dismiss(): void\n}\n\nexport function useDialogContainer(): DialogContainerValue {\n let context = useSlottedContext(ModalContext);\n if (!context) {\n throw new Error('Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.');\n }\n\n return {\n dismiss() {\n context?.onOpenChange?.(false);\n }\n };\n}\n"],"names":[],"version":3,"file":"DialogContainer.cjs.map"}
@@ -16,7 +16,7 @@ import $7vgZZ$react, {useState as $7vgZZ$useState} from "react";
16
16
 
17
17
 
18
18
  function $dd7e1b1b86bf720d$export$547754aada6e339f(props) {
19
- let { children: children, onDismiss: onDismiss, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled } = props;
19
+ let { children: children, onDismiss: onDismiss } = props;
20
20
  let childArray = (0, $7vgZZ$react).Children.toArray(children);
21
21
  if (childArray.length > 1) throw new Error('Only a single child can be passed to DialogContainer.');
22
22
  let [lastChild, setLastChild] = (0, $7vgZZ$useState)(null);
@@ -32,9 +32,7 @@ function $dd7e1b1b86bf720d$export$547754aada6e339f(props) {
32
32
  return /*#__PURE__*/ (0, $7vgZZ$jsx)((0, $7vgZZ$ModalContext).Provider, {
33
33
  value: {
34
34
  isOpen: !!child,
35
- onOpenChange: onOpenChange,
36
- isDismissable: isDismissable,
37
- isKeyboardDismissDisabled: isKeyboardDismissDisabled
35
+ onOpenChange: onOpenChange
38
36
  },
39
37
  children: lastChild
40
38
  });
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAaM,SAAS,0CAAgB,KAA2B;IACzD,IAAI,YACF,QAAQ,aACR,SAAS,iBACT,gBAAgB,kCAChB,yBAAyB,EAC1B,GAAG;IAEJ,IAAI,aAAa,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,OAAO,CAAC;IACxC,IAAI,WAAW,MAAM,GAAG,GACtB,MAAM,IAAI,MAAM;IAGlB,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,eAAO,EAAuB;IAE9D,6EAA6E;IAC7E,0DAA0D;IAC1D,IAAI,QAAkC;IACtC,IAAI,MAAM,OAAO,CAAC,WAChB,QAAQ,SAAS,IAAI,CAAC,CAAA,GAAA,YAAI,EAAE,cAAc;SACrC,kBAAI,CAAA,GAAA,YAAI,EAAE,cAAc,CAAC,WAC9B,QAAQ;IAGV,IAAI,SAAS,UAAU,WACrB,aAAa;IAGf,IAAI,eAAe,CAAC;QAClB,IAAI,CAAC,QACH;IAEJ;IAEA,qBACE,gBAAC,CAAA,GAAA,mBAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,QAAQ,CAAC,CAAC;0BAAO;2BAAc;uCAAe;QAAyB;kBACnG;;AAGP;AASO,SAAS;IACd,IAAI,UAAU,CAAA,GAAA,wBAAgB,EAAE,CAAA,GAAA,mBAAW;IAC3C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM;IAGlB,OAAO;QACL;YACE,SAAS,eAAe;QAC1B;IACF;AACF","sources":["packages/@react-spectrum/s2/src/DialogContainer.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ModalContext, useSlottedContext} from 'react-aria-components';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumDialogContainerProps} from '@react-types/dialog';\n\nexport interface DialogContainerProps extends Omit<SpectrumDialogContainerProps, 'type'> {}\n\n/**\n * A DialogContainer accepts a single Dialog as a child, and manages showing and hiding\n * it in a modal. Useful in cases where there is no trigger element\n * or when the trigger unmounts while the dialog is open.\n */\nexport function DialogContainer(props: DialogContainerProps) {\n let {\n children,\n onDismiss,\n isDismissable = false,\n isKeyboardDismissDisabled\n } = props;\n\n let childArray = React.Children.toArray(children);\n if (childArray.length > 1) {\n throw new Error('Only a single child can be passed to DialogContainer.');\n }\n\n let [lastChild, setLastChild] = useState<ReactElement | null>(null);\n\n // React.Children.toArray mutates the children, and we need them to be stable\n // between renders so that the lastChild comparison works.\n let child: ReactElement | undefined = undefined;\n if (Array.isArray(children)) {\n child = children.find(React.isValidElement);\n } else if (React.isValidElement(children)) {\n child = children;\n }\n\n if (child && child !== lastChild) {\n setLastChild(child);\n }\n\n let onOpenChange = (isOpen: boolean) => {\n if (!isOpen) {\n onDismiss();\n }\n };\n\n return (\n <ModalContext.Provider value={{isOpen: !!child, onOpenChange, isDismissable, isKeyboardDismissDisabled}}>\n {lastChild}\n </ModalContext.Provider>\n );\n}\n\nexport interface DialogContainerValue {\n /**\n * A handler to programmatically dismiss the dialog.\n */\n dismiss(): void\n}\n\nexport function useDialogContainer(): DialogContainerValue {\n let context = useSlottedContext(ModalContext);\n if (!context) {\n throw new Error('Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.');\n }\n\n return {\n dismiss() {\n context?.onOpenChange?.(false);\n }\n };\n}\n"],"names":[],"version":3,"file":"DialogContainer.mjs.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAaM,SAAS,0CAAgB,KAA2B;IACzD,IAAI,YACF,QAAQ,aACR,SAAS,EACV,GAAG;IAEJ,IAAI,aAAa,CAAA,GAAA,YAAI,EAAE,QAAQ,CAAC,OAAO,CAAC;IACxC,IAAI,WAAW,MAAM,GAAG,GACtB,MAAM,IAAI,MAAM;IAGlB,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,eAAO,EAAuB;IAE9D,6EAA6E;IAC7E,0DAA0D;IAC1D,IAAI,QAAkC;IACtC,IAAI,MAAM,OAAO,CAAC,WAChB,QAAQ,SAAS,IAAI,CAAC,CAAA,GAAA,YAAI,EAAE,cAAc;SACrC,kBAAI,CAAA,GAAA,YAAI,EAAE,cAAc,CAAC,WAC9B,QAAQ;IAGV,IAAI,SAAS,UAAU,WACrB,aAAa;IAGf,IAAI,eAAe,CAAC;QAClB,IAAI,CAAC,QACH;IAEJ;IAEA,qBACE,gBAAC,CAAA,GAAA,mBAAW,EAAE,QAAQ;QAAC,OAAO;YAAC,QAAQ,CAAC,CAAC;0BAAO;QAAY;kBACzD;;AAGP;AASO,SAAS;IACd,IAAI,UAAU,CAAA,GAAA,wBAAgB,EAAE,CAAA,GAAA,mBAAW;IAC3C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM;IAGlB,OAAO;QACL;YACE,SAAS,eAAe;QAC1B;IACF;AACF","sources":["packages/@react-spectrum/s2/src/DialogContainer.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ModalContext, useSlottedContext} from 'react-aria-components';\nimport React, {ReactElement, useState} from 'react';\nimport {SpectrumDialogContainerProps} from '@react-types/dialog';\n\nexport interface DialogContainerProps extends Omit<SpectrumDialogContainerProps, 'type' | 'isDismissable' | 'isKeyboardDismissDisabled'> {}\n\n/**\n * A DialogContainer accepts a single Dialog as a child, and manages showing and hiding\n * it in a modal. Useful in cases where there is no trigger element\n * or when the trigger unmounts while the dialog is open.\n */\nexport function DialogContainer(props: DialogContainerProps) {\n let {\n children,\n onDismiss\n } = props;\n\n let childArray = React.Children.toArray(children);\n if (childArray.length > 1) {\n throw new Error('Only a single child can be passed to DialogContainer.');\n }\n\n let [lastChild, setLastChild] = useState<ReactElement | null>(null);\n\n // React.Children.toArray mutates the children, and we need them to be stable\n // between renders so that the lastChild comparison works.\n let child: ReactElement | undefined = undefined;\n if (Array.isArray(children)) {\n child = children.find(React.isValidElement);\n } else if (React.isValidElement(children)) {\n child = children;\n }\n\n if (child && child !== lastChild) {\n setLastChild(child);\n }\n\n let onOpenChange = (isOpen: boolean) => {\n if (!isOpen) {\n onDismiss();\n }\n };\n\n return (\n <ModalContext.Provider value={{isOpen: !!child, onOpenChange}}>\n {lastChild}\n </ModalContext.Provider>\n );\n}\n\nexport interface DialogContainerValue {\n /**\n * A handler to programmatically dismiss the dialog.\n */\n dismiss(): void\n}\n\nexport function useDialogContainer(): DialogContainerValue {\n let context = useSlottedContext(ModalContext);\n if (!context) {\n throw new Error('Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.');\n }\n\n return {\n dismiss() {\n context?.onOpenChange?.(false);\n }\n };\n}\n"],"names":[],"version":3,"file":"DialogContainer.mjs.map"}
@@ -34,7 +34,7 @@ const $59876d274d9473a9$var$heading = " . __a-go5hed __b-go5hed __c-go5hed __d-g
34
34
  const $59876d274d9473a9$var$header = " . __a-i6pim __b-i6pim __c-i6pim __d-i6pim yc_d zc_d _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _di _dbj _eb _fb _f-1x99dloc an";
35
35
  const $59876d274d9473a9$var$content = " . __a-1mod4sg __b-1mod4sg __c-1mod4sg __d-1mod4sg _9-3t1y __wa __w-l92dlrd _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _dg _dbh _eb _fb _f-1x99dloc an";
36
36
  const $59876d274d9473a9$var$buttonGroup = " . __a-15bi2vo __b-15bi2vo __c-15bi2vo __d-15bi2vo y_d rb";
37
- const $59876d274d9473a9$export$6af31f836f9aa6f2 = " . _Zf __j-15snlg6 __jc-1viqiso __h-375yi6 __hc-fdenls __i-uhq9nj __ic-1wmzwss Eh Ecj Fh Fcj Ch Ccj Dh Dcj jf jch p-17zqamw kb __na _La _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _v-17zqamw _w-17zqamw _x-17zqamw _y-17zqamw __va __wa";
37
+ const $59876d274d9473a9$export$6af31f836f9aa6f2 = " . _Zf __j-1fflgh0 __jc-1viqiso __h-375yi6 __hc-fdenls __i-36luh1 __ic-1wmzwss Eh Ecj Fh Fcj Ch Ccj Dh Dcj jf jch p-17zqamw kb __na _La _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _v-17zqamw _w-17zqamw _x-17zqamw _y-17zqamw __va __wa";
38
38
  function $59876d274d9473a9$var$FullscreenDialog(props, ref) {
39
39
  let { variant: variant = 'fullscreen', isKeyboardDismissDisabled: isKeyboardDismissDisabled } = props;
40
40
  let domRef = (0, $Yi1VH$reactspectrumutils.useDOMRef)(ref);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBD,MAAM;AAON,MAAM;AAQN,MAAM;AAWN,MAAM;AAMC,MAAM;AAoDb,SAAS,uCAAiB,KAA4B,EAAE,GAAW;IACjE,IAAI,WAAC,UAAU,yCAAc,yBAAyB,EAAC,GAAG;IAC1D,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,+BAAI;QAAE,MAAM;QAAS,2BAA2B;kBAC/C,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YACN,GAAG,KAAK;YACT,KAAK;YACL,OAAO,MAAM,YAAY;YACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK;sBAC3C,CAAA,GAAA,6CAAiB,EAAE,MAAM,QAAQ,EAAE,CAAC,WACnC,oGAAoG;8BACpG,gCAAC,CAAA,GAAA,qDAAyB,EAAE,QAAQ;oBAAC,OAAO;8BAC1C,cAAA,gCAAC,CAAA,GAAA,mCAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,wCAAa;gCAAG;oCAAC,QAAQ;gCAAO;6BAAE;4BACnC;gCAAC,CAAA,GAAA,uCAAY;gCAAG;oCAAC,QAAQ;gCAAM;6BAAE;4BACjC;gCAAC,CAAA,GAAA,wCAAa;gCAAG;oCAAC,QAAQ;gCAAO;6BAAE;4BACnC;gCAAC,CAAA,GAAA,4CAAiB;gCAAG;oCAAC,QAAQ;gCAAW;6BAAE;yBAC5C;kCACA;;;;;AAOf;AAEA;;CAEC,GACD,IAAI,0DAAoB,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/FullscreenDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface FullscreenDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The variant of fullscreen dialog to display.\n * @default \"fullscreen\"\n */\n variant?: 'fullscreen' | 'fullscreenTakeover',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst heading = style({\n gridArea: 'heading',\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n gridArea: 'header',\n marginX: {\n sm: 'auto'\n },\n font: 'body-lg'\n});\n\nconst content = style({\n gridArea: 'content',\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttons',\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'grid',\n gridTemplateAreas: {\n // Button group moves to the bottom on small screens.\n default: [\n 'heading',\n 'header',\n '.',\n 'content',\n 'buttons'\n ],\n sm: [\n 'heading header buttons',\n '. . .',\n 'content content content'\n ]\n },\n gridTemplateColumns: {\n default: ['1fr'],\n sm: ['auto', '1fr', 'auto']\n },\n gridTemplateRows: {\n default: [\n 'auto',\n 'auto',\n 24,\n '1fr',\n 'auto'\n ],\n sm: [\n 'auto',\n 32,\n '1fr'\n ]\n },\n padding: {\n default: 24,\n sm: 32\n },\n columnGap: {\n default: 16,\n sm: 24\n },\n maxHeight: '[inherit]',\n height: 'full',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction FullscreenDialog(props: FullscreenDialogProps, ref: DOMRef) {\n let {variant = 'fullscreen', isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={variant} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n <Provider\n values={[\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {styles: content}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Takeover dialogs are large types of dialogs. They use the totality of the screen and should be used for modal experiences with complex workflows.\n */\nlet _FullscreenDialog = forwardRef(FullscreenDialog);\nexport {_FullscreenDialog as FullscreenDialog};\n\n"],"names":[],"version":3,"file":"FullscreenDialog.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBD,MAAM;AAON,MAAM;AAQN,MAAM;AAWN,MAAM;AAMC,MAAM;AAsDb,SAAS,uCAAiB,KAA4B,EAAE,GAAW;IACjE,IAAI,WAAC,UAAU,yCAAc,yBAAyB,EAAC,GAAG;IAC1D,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,+BAAI;QAAE,MAAM;QAAS,2BAA2B;kBAC/C,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YACN,GAAG,KAAK;YACT,KAAK;YACL,OAAO,MAAM,YAAY;YACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK;sBAC3C,CAAA,GAAA,6CAAiB,EAAE,MAAM,QAAQ,EAAE,CAAC,WACnC,oGAAoG;8BACpG,gCAAC,CAAA,GAAA,qDAAyB,EAAE,QAAQ;oBAAC,OAAO;8BAC1C,cAAA,gCAAC,CAAA,GAAA,mCAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,wCAAa;gCAAG;oCAAC,QAAQ;gCAAO;6BAAE;4BACnC;gCAAC,CAAA,GAAA,uCAAY;gCAAG;oCAAC,QAAQ;gCAAM;6BAAE;4BACjC;gCAAC,CAAA,GAAA,wCAAa;gCAAG;oCAAC,QAAQ;gCAAO;6BAAE;4BACnC;gCAAC,CAAA,GAAA,4CAAiB;gCAAG;oCAAC,QAAQ;gCAAW;6BAAE;yBAC5C;kCACA;;;;;AAOf;AAEA;;CAEC,GACD,IAAI,0DAAoB,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/FullscreenDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface FullscreenDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The variant of fullscreen dialog to display.\n * @default \"fullscreen\"\n */\n variant?: 'fullscreen' | 'fullscreenTakeover',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst heading = style({\n gridArea: 'heading',\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n gridArea: 'header',\n marginX: {\n sm: 'auto'\n },\n font: 'body-lg'\n});\n\nconst content = style({\n gridArea: 'content',\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttons',\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'grid',\n gridTemplateAreas: {\n // Button group moves to the bottom on small screens.\n default: [\n 'heading',\n 'header',\n '.',\n 'content',\n '.',\n 'buttons'\n ],\n sm: [\n 'heading header buttons',\n '. . .',\n 'content content content'\n ]\n },\n gridTemplateColumns: {\n default: ['1fr'],\n sm: ['auto', '1fr', 'auto']\n },\n gridTemplateRows: {\n default: [\n 'auto',\n 'auto',\n 24,\n '1fr',\n 24,\n 'auto'\n ],\n sm: [\n 'auto',\n 32,\n '1fr'\n ]\n },\n padding: {\n default: 24,\n sm: 32\n },\n columnGap: {\n default: 16,\n sm: 24\n },\n maxHeight: '[inherit]',\n height: 'full',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction FullscreenDialog(props: FullscreenDialogProps, ref: DOMRef) {\n let {variant = 'fullscreen', isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={variant} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n <Provider\n values={[\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {styles: content}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Takeover dialogs are large types of dialogs. They use the totality of the screen and should be used for modal experiences with complex workflows.\n */\nlet _FullscreenDialog = forwardRef(FullscreenDialog);\nexport {_FullscreenDialog as FullscreenDialog};\n\n"],"names":[],"version":3,"file":"FullscreenDialog.cjs.map"}
@@ -127,11 +127,12 @@
127
127
  display: grid;
128
128
  }
129
129
 
130
- .__j-15snlg6 {
130
+ .__j-1fflgh0 {
131
131
  grid-template-areas: "heading"
132
132
  "header"
133
133
  "."
134
134
  "content"
135
+ "."
135
136
  "buttons";
136
137
  }
137
138
 
@@ -139,8 +140,8 @@
139
140
  grid-template-columns: 1fr;
140
141
  }
141
142
 
142
- .__i-uhq9nj {
143
- grid-template-rows: auto auto 1.5rem 1fr auto;
143
+ .__i-36luh1 {
144
+ grid-template-rows: auto auto 1.5rem 1fr 1.5rem auto;
144
145
  }
145
146
 
146
147
  .Eh {
@@ -1 +1 @@
1
- {"mappings":"ACiCgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAOD;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAWG;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAMO;;;;EAAA;;;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAhCX;EAAA;;;;;;EAAA;;;;EAeC;;;;EAiBU;;;;;AAhCX;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAOD;;;;IAQE;;;;;;AARF;EAAA;IAAA;;;;IAAA;;;;IAyBY;;;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAjBV;EAAA;IAAA;;;;;;AAWG","sources":["08b4ee4dfdd3fb23","packages/@react-spectrum/s2/src/FullscreenDialog.tsx"],"sourcesContent":["@import \"eeaa872c96a96271\";\n@import \"73747769865790da\";\n@import \"b069e4051c7a440c\";\n@import \"38e814a136cf19ae\";\n@import \"1bc91e670be29799\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface FullscreenDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The variant of fullscreen dialog to display.\n * @default \"fullscreen\"\n */\n variant?: 'fullscreen' | 'fullscreenTakeover',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst heading = style({\n gridArea: 'heading',\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n gridArea: 'header',\n marginX: {\n sm: 'auto'\n },\n font: 'body-lg'\n});\n\nconst content = style({\n gridArea: 'content',\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttons',\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'grid',\n gridTemplateAreas: {\n // Button group moves to the bottom on small screens.\n default: [\n 'heading',\n 'header',\n '.',\n 'content',\n 'buttons'\n ],\n sm: [\n 'heading header buttons',\n '. . .',\n 'content content content'\n ]\n },\n gridTemplateColumns: {\n default: ['1fr'],\n sm: ['auto', '1fr', 'auto']\n },\n gridTemplateRows: {\n default: [\n 'auto',\n 'auto',\n 24,\n '1fr',\n 'auto'\n ],\n sm: [\n 'auto',\n 32,\n '1fr'\n ]\n },\n padding: {\n default: 24,\n sm: 32\n },\n columnGap: {\n default: 16,\n sm: 24\n },\n maxHeight: '[inherit]',\n height: 'full',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction FullscreenDialog(props: FullscreenDialogProps, ref: DOMRef) {\n let {variant = 'fullscreen', isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={variant} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n <Provider\n values={[\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {styles: content}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Takeover dialogs are large types of dialogs. They use the totality of the screen and should be used for modal experiences with complex workflows.\n */\nlet _FullscreenDialog = forwardRef(FullscreenDialog);\nexport {_FullscreenDialog as FullscreenDialog};\n\n"],"names":[],"version":3,"file":"FullscreenDialog.css.map"}
1
+ {"mappings":"ACiCgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAOD;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAWG;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAMO;;;;EAAA;;;;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAhCX;EAAA;;;;;;EAAA;;;;EAeC;;;;EAiBU;;;;;AAhCX;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAOD;;;;IAQE;;;;;;AARF;EAAA;IAAA;;;;IAAA;;;;IAyBY;;;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAjBV;EAAA;IAAA;;;;;;AAWG","sources":["08b4ee4dfdd3fb23","packages/@react-spectrum/s2/src/FullscreenDialog.tsx"],"sourcesContent":["@import \"eeaa872c96a96271\";\n@import \"73747769865790da\";\n@import \"b069e4051c7a440c\";\n@import \"38e814a136cf19ae\";\n@import \"1bc91e670be29799\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface FullscreenDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The variant of fullscreen dialog to display.\n * @default \"fullscreen\"\n */\n variant?: 'fullscreen' | 'fullscreenTakeover',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst heading = style({\n gridArea: 'heading',\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n gridArea: 'header',\n marginX: {\n sm: 'auto'\n },\n font: 'body-lg'\n});\n\nconst content = style({\n gridArea: 'content',\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttons',\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'grid',\n gridTemplateAreas: {\n // Button group moves to the bottom on small screens.\n default: [\n 'heading',\n 'header',\n '.',\n 'content',\n '.',\n 'buttons'\n ],\n sm: [\n 'heading header buttons',\n '. . .',\n 'content content content'\n ]\n },\n gridTemplateColumns: {\n default: ['1fr'],\n sm: ['auto', '1fr', 'auto']\n },\n gridTemplateRows: {\n default: [\n 'auto',\n 'auto',\n 24,\n '1fr',\n 24,\n 'auto'\n ],\n sm: [\n 'auto',\n 32,\n '1fr'\n ]\n },\n padding: {\n default: 24,\n sm: 32\n },\n columnGap: {\n default: 16,\n sm: 24\n },\n maxHeight: '[inherit]',\n height: 'full',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction FullscreenDialog(props: FullscreenDialogProps, ref: DOMRef) {\n let {variant = 'fullscreen', isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={variant} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n <Provider\n values={[\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {styles: content}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Takeover dialogs are large types of dialogs. They use the totality of the screen and should be used for modal experiences with complex workflows.\n */\nlet _FullscreenDialog = forwardRef(FullscreenDialog);\nexport {_FullscreenDialog as FullscreenDialog};\n\n"],"names":[],"version":3,"file":"FullscreenDialog.css.map"}
@@ -28,7 +28,7 @@ const $8e7a38ff5b9798e1$var$heading = " . __a-go5hed __b-go5hed __c-go5hed __d-g
28
28
  const $8e7a38ff5b9798e1$var$header = " . __a-i6pim __b-i6pim __c-i6pim __d-i6pim yc_d zc_d _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _di _dbj _eb _fb _f-1x99dloc an";
29
29
  const $8e7a38ff5b9798e1$var$content = " . __a-1mod4sg __b-1mod4sg __c-1mod4sg __d-1mod4sg _9-3t1y __wa __w-l92dlrd _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _dg _dbh _eb _fb _f-1x99dloc an";
30
30
  const $8e7a38ff5b9798e1$var$buttonGroup = " . __a-15bi2vo __b-15bi2vo __c-15bi2vo __d-15bi2vo y_d rb";
31
- const $8e7a38ff5b9798e1$export$6af31f836f9aa6f2 = " . _Zf __j-15snlg6 __jc-1viqiso __h-375yi6 __hc-fdenls __i-uhq9nj __ic-1wmzwss Eh Ecj Fh Fcj Ch Ccj Dh Dcj jf jch p-17zqamw kb __na _La _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _v-17zqamw _w-17zqamw _x-17zqamw _y-17zqamw __va __wa";
31
+ const $8e7a38ff5b9798e1$export$6af31f836f9aa6f2 = " . _Zf __j-1fflgh0 __jc-1viqiso __h-375yi6 __hc-fdenls __i-36luh1 __ic-1wmzwss Eh Ecj Fh Fcj Ch Ccj Dh Dcj jf jch p-17zqamw kb __na _La _ca _c-enzrfpb _c-enzwzjc _c-enzykdd _c-enzzrge _c-eo0c6sf _c-1uotwbwg _c-bc1l9oh _v-17zqamw _w-17zqamw _x-17zqamw _y-17zqamw __va __wa";
32
32
  function $8e7a38ff5b9798e1$var$FullscreenDialog(props, ref) {
33
33
  let { variant: variant = 'fullscreen', isKeyboardDismissDisabled: isKeyboardDismissDisabled } = props;
34
34
  let domRef = (0, $900FG$useDOMRef)(ref);
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBD,MAAM;AAON,MAAM;AAQN,MAAM;AAWN,MAAM;AAMC,MAAM;AAoDb,SAAS,uCAAiB,KAA4B,EAAE,GAAW;IACjE,IAAI,WAAC,UAAU,yCAAc,yBAAyB,EAAC,GAAG;IAC1D,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,yCAAI;QAAE,MAAM;QAAS,2BAA2B;kBAC/C,cAAA,gBAAC,CAAA,GAAA,aAAQ;YACN,GAAG,KAAK;YACT,KAAK;YACL,OAAO,MAAM,YAAY;YACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK;sBAC3C,CAAA,GAAA,yBAAiB,EAAE,MAAM,QAAQ,EAAE,CAAC,WACnC,oGAAoG;8BACpG,gBAAC,CAAA,GAAA,iCAAyB,EAAE,QAAQ;oBAAC,OAAO;8BAC1C,cAAA,gBAAC,CAAA,GAAA,eAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,yCAAa;gCAAG;oCAAC,QAAQ;gCAAO;6BAAE;4BACnC;gCAAC,CAAA,GAAA,yCAAY;gCAAG;oCAAC,QAAQ;gCAAM;6BAAE;4BACjC;gCAAC,CAAA,GAAA,yCAAa;gCAAG;oCAAC,QAAQ;gCAAO;6BAAE;4BACnC;gCAAC,CAAA,GAAA,yCAAiB;gCAAG;oCAAC,QAAQ;gCAAW;6BAAE;yBAC5C;kCACA;;;;;AAOf;AAEA;;CAEC,GACD,IAAI,0DAAoB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/FullscreenDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface FullscreenDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The variant of fullscreen dialog to display.\n * @default \"fullscreen\"\n */\n variant?: 'fullscreen' | 'fullscreenTakeover',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst heading = style({\n gridArea: 'heading',\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n gridArea: 'header',\n marginX: {\n sm: 'auto'\n },\n font: 'body-lg'\n});\n\nconst content = style({\n gridArea: 'content',\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttons',\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'grid',\n gridTemplateAreas: {\n // Button group moves to the bottom on small screens.\n default: [\n 'heading',\n 'header',\n '.',\n 'content',\n 'buttons'\n ],\n sm: [\n 'heading header buttons',\n '. . .',\n 'content content content'\n ]\n },\n gridTemplateColumns: {\n default: ['1fr'],\n sm: ['auto', '1fr', 'auto']\n },\n gridTemplateRows: {\n default: [\n 'auto',\n 'auto',\n 24,\n '1fr',\n 'auto'\n ],\n sm: [\n 'auto',\n 32,\n '1fr'\n ]\n },\n padding: {\n default: 24,\n sm: 32\n },\n columnGap: {\n default: 16,\n sm: 24\n },\n maxHeight: '[inherit]',\n height: 'full',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction FullscreenDialog(props: FullscreenDialogProps, ref: DOMRef) {\n let {variant = 'fullscreen', isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={variant} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n <Provider\n values={[\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {styles: content}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Takeover dialogs are large types of dialogs. They use the totality of the screen and should be used for modal experiences with complex workflows.\n */\nlet _FullscreenDialog = forwardRef(FullscreenDialog);\nexport {_FullscreenDialog as FullscreenDialog};\n\n"],"names":[],"version":3,"file":"FullscreenDialog.mjs.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuBD,MAAM;AAON,MAAM;AAQN,MAAM;AAWN,MAAM;AAMC,MAAM;AAsDb,SAAS,uCAAiB,KAA4B,EAAE,GAAW;IACjE,IAAI,WAAC,UAAU,yCAAc,yBAAyB,EAAC,GAAG;IAC1D,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,yCAAI;QAAE,MAAM;QAAS,2BAA2B;kBAC/C,cAAA,gBAAC,CAAA,GAAA,aAAQ;YACN,GAAG,KAAK;YACT,KAAK;YACL,OAAO,MAAM,YAAY;YACzB,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK;sBAC3C,CAAA,GAAA,yBAAiB,EAAE,MAAM,QAAQ,EAAE,CAAC,WACnC,oGAAoG;8BACpG,gBAAC,CAAA,GAAA,iCAAyB,EAAE,QAAQ;oBAAC,OAAO;8BAC1C,cAAA,gBAAC,CAAA,GAAA,eAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,yCAAa;gCAAG;oCAAC,QAAQ;gCAAO;6BAAE;4BACnC;gCAAC,CAAA,GAAA,yCAAY;gCAAG;oCAAC,QAAQ;gCAAM;6BAAE;4BACjC;gCAAC,CAAA,GAAA,yCAAa;gCAAG;oCAAC,QAAQ;gCAAO;6BAAE;4BACnC;gCAAC,CAAA,GAAA,yCAAiB;gCAAG;oCAAC,QAAQ;gCAAW;6BAAE;yBAC5C;kCACA;;;;;AAOf;AAEA;;CAEC,GACD,IAAI,0DAAoB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/FullscreenDialog.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonGroupContext} from './ButtonGroup';\nimport {composeRenderProps, OverlayTriggerStateContext, Provider, Dialog as RACDialog, DialogProps as RACDialogProps} from 'react-aria-components';\nimport {ContentContext, HeaderContext, HeadingContext} from './Content';\nimport {DOMRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {Modal} from './Modal';\nimport {style} from '../style' with {type: 'macro'};\nimport {StyleProps} from './style-utils';\nimport {useDOMRef} from '@react-spectrum/utils';\n\n// TODO: what style overrides should be allowed?\nexport interface FullscreenDialogProps extends Omit<RACDialogProps, 'className' | 'style'>, StyleProps {\n /**\n * The variant of fullscreen dialog to display.\n * @default \"fullscreen\"\n */\n variant?: 'fullscreen' | 'fullscreenTakeover',\n /** Whether pressing the escape key to close the dialog should be disabled. */\n isKeyboardDismissDisabled?: boolean\n}\n\nconst heading = style({\n gridArea: 'heading',\n flexGrow: 1,\n marginY: 0,\n font: 'heading'\n});\n\nconst header = style({\n gridArea: 'header',\n marginX: {\n sm: 'auto'\n },\n font: 'body-lg'\n});\n\nconst content = style({\n gridArea: 'content',\n flexGrow: 1,\n overflowY: {\n default: 'auto',\n // Make the whole dialog scroll rather than only the content when the height it small.\n '@media (height < 400)': 'visible'\n },\n font: 'body'\n});\n\nconst buttonGroup = style({\n gridArea: 'buttons',\n marginStart: 'auto',\n maxWidth: 'full'\n});\n\nexport const dialogInner = style({\n display: 'grid',\n gridTemplateAreas: {\n // Button group moves to the bottom on small screens.\n default: [\n 'heading',\n 'header',\n '.',\n 'content',\n '.',\n 'buttons'\n ],\n sm: [\n 'heading header buttons',\n '. . .',\n 'content content content'\n ]\n },\n gridTemplateColumns: {\n default: ['1fr'],\n sm: ['auto', '1fr', 'auto']\n },\n gridTemplateRows: {\n default: [\n 'auto',\n 'auto',\n 24,\n '1fr',\n 24,\n 'auto'\n ],\n sm: [\n 'auto',\n 32,\n '1fr'\n ]\n },\n padding: {\n default: 24,\n sm: 32\n },\n columnGap: {\n default: 16,\n sm: 24\n },\n maxHeight: '[inherit]',\n height: 'full',\n boxSizing: 'border-box',\n outlineStyle: 'none',\n fontFamily: 'sans',\n borderRadius: '[inherit]',\n overflow: 'auto'\n});\n\nfunction FullscreenDialog(props: FullscreenDialogProps, ref: DOMRef) {\n let {variant = 'fullscreen', isKeyboardDismissDisabled} = props;\n let domRef = useDOMRef(ref);\n\n return (\n <Modal size={variant} isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n <RACDialog\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + dialogInner}>\n {composeRenderProps(props.children, (children) => (\n // Reset OverlayTriggerStateContext so the buttons inside the dialog don't retain their hover state.\n <OverlayTriggerStateContext.Provider value={null}>\n <Provider\n values={[\n [HeadingContext, {styles: heading}],\n [HeaderContext, {styles: header}],\n [ContentContext, {styles: content}],\n [ButtonGroupContext, {styles: buttonGroup}]\n ]}>\n {children}\n </Provider>\n </OverlayTriggerStateContext.Provider>\n ))}\n </RACDialog>\n </Modal>\n );\n}\n\n/**\n * Takeover dialogs are large types of dialogs. They use the totality of the screen and should be used for modal experiences with complex workflows.\n */\nlet _FullscreenDialog = forwardRef(FullscreenDialog);\nexport {_FullscreenDialog as FullscreenDialog};\n\n"],"names":[],"version":3,"file":"FullscreenDialog.mjs.map"}