@12-apps/ui 6.47.0 → 6.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +6 -6
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +5 -5
- package/dist/_internal/components/feedback/StackedModal/StackedModal.js +3 -3
- package/dist/_internal/components/feedback/StackedModal/StackedModal.parts.js +2 -2
- package/dist/_internal/components/feedback/StackedModal/StackedModal.styles.js +1 -1
- package/dist/_internal/components/feedback/index.js +3 -3
- package/dist/_internal/components/index.js +3 -3
- package/dist/{chunk-442FSG7G.js → chunk-3QGMAVUF.js} +5 -3
- package/dist/chunk-3QGMAVUF.js.map +1 -0
- package/dist/{chunk-77JL5XVD.js → chunk-6TZE77YJ.js} +30 -7
- package/dist/chunk-6TZE77YJ.js.map +1 -0
- package/dist/{chunk-A5ODDTGU.js → chunk-H7DVH6KD.js} +2 -2
- package/dist/{chunk-AS2PWQIU.js → chunk-KESGVMHW.js} +2 -2
- package/dist/{chunk-IX3U3XPP.js → chunk-KN7C6R6L.js} +2 -2
- package/dist/{chunk-XXNLBO4Q.js → chunk-QJK7BNH3.js} +3 -3
- package/dist/{chunk-L4G5BZFF.js → chunk-RJVUECN7.js} +2 -2
- package/dist/data-display/DataViews.js +7 -7
- package/dist/feedback/StackedModal.js +3 -3
- package/dist/types/components/feedback/StackedModal/StackedModal.d.ts.map +1 -1
- package/dist/types/components/feedback/StackedModal/StackedModal.styles.d.ts +2 -1
- package/dist/types/components/feedback/StackedModal/StackedModal.styles.d.ts.map +1 -1
- package/dist/types/components/feedback/StackedModal/StackedModal.types.d.ts +8 -0
- package/dist/types/components/feedback/StackedModal/StackedModal.types.d.ts.map +1 -1
- package/dist/types/components/feedback/StackedModal/index.d.ts +1 -1
- package/dist/types/components/feedback/StackedModal/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/feedback/StackedModal/StackedModal.md +1 -0
- package/src/components/feedback/StackedModal/StackedModal.styles.ts +44 -8
- package/src/components/feedback/StackedModal/StackedModal.tsx +2 -1
- package/src/components/feedback/StackedModal/StackedModal.types.ts +9 -0
- package/src/components/feedback/StackedModal/index.ts +1 -1
- package/dist/chunk-442FSG7G.js.map +0 -1
- package/dist/chunk-77JL5XVD.js.map +0 -1
- /package/dist/{chunk-A5ODDTGU.js.map → chunk-H7DVH6KD.js.map} +0 -0
- /package/dist/{chunk-AS2PWQIU.js.map → chunk-KESGVMHW.js.map} +0 -0
- /package/dist/{chunk-IX3U3XPP.js.map → chunk-KN7C6R6L.js.map} +0 -0
- /package/dist/{chunk-XXNLBO4Q.js.map → chunk-QJK7BNH3.js.map} +0 -0
- /package/dist/{chunk-L4G5BZFF.js.map → chunk-RJVUECN7.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
DataViewsGrid
|
|
4
|
-
} from "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-KESGVMHW.js";
|
|
5
|
+
import "../../../../chunk-KN7C6R6L.js";
|
|
6
6
|
import "../../../../chunk-BPOVRMVS.js";
|
|
7
7
|
import "../../../../chunk-J2SFOLGZ.js";
|
|
8
|
-
import "../../../../chunk-
|
|
8
|
+
import "../../../../chunk-QJK7BNH3.js";
|
|
9
9
|
import "../../../../chunk-OCQ6GDCF.js";
|
|
10
10
|
import "../../../../chunk-6QYKZMEE.js";
|
|
11
11
|
import "../../../../chunk-DNT5PZLF.js";
|
|
@@ -93,9 +93,9 @@ import "../../../../chunk-Z6T5SXST.js";
|
|
|
93
93
|
import "../../../../chunk-C3UKR3NT.js";
|
|
94
94
|
import "../../../../chunk-D6KL74KI.js";
|
|
95
95
|
import "../../../../chunk-CN46HGXE.js";
|
|
96
|
-
import "../../../../chunk-
|
|
97
|
-
import "../../../../chunk-
|
|
98
|
-
import "../../../../chunk-
|
|
96
|
+
import "../../../../chunk-3QGMAVUF.js";
|
|
97
|
+
import "../../../../chunk-RJVUECN7.js";
|
|
98
|
+
import "../../../../chunk-6TZE77YJ.js";
|
|
99
99
|
import "../../../../chunk-G3QKH23Y.js";
|
|
100
100
|
import "../../../../chunk-JZRSHDNY.js";
|
|
101
101
|
import "../../../../chunk-L5CPOEDP.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
DataViewsTableBase
|
|
4
|
-
} from "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-H7DVH6KD.js";
|
|
5
5
|
import "../../../../chunk-NRI2TZDS.js";
|
|
6
|
-
import "../../../../chunk-
|
|
6
|
+
import "../../../../chunk-KESGVMHW.js";
|
|
7
7
|
import "../../../../chunk-ZOLAYP2D.js";
|
|
8
|
-
import "../../../../chunk-
|
|
8
|
+
import "../../../../chunk-KN7C6R6L.js";
|
|
9
9
|
import "../../../../chunk-BPOVRMVS.js";
|
|
10
10
|
import "../../../../chunk-J2SFOLGZ.js";
|
|
11
|
-
import "../../../../chunk-
|
|
11
|
+
import "../../../../chunk-QJK7BNH3.js";
|
|
12
12
|
import "../../../../chunk-OCQ6GDCF.js";
|
|
13
13
|
import "../../../../chunk-6QYKZMEE.js";
|
|
14
14
|
import "../../../../chunk-DNT5PZLF.js";
|
|
@@ -128,9 +128,9 @@ import "../../../../chunk-GVGJMH77.js";
|
|
|
128
128
|
import "../../../../chunk-GYXUCS37.js";
|
|
129
129
|
import "../../../../chunk-LV7LSPBF.js";
|
|
130
130
|
import "../../../../chunk-CN46HGXE.js";
|
|
131
|
-
import "../../../../chunk-
|
|
132
|
-
import "../../../../chunk-
|
|
133
|
-
import "../../../../chunk-
|
|
131
|
+
import "../../../../chunk-3QGMAVUF.js";
|
|
132
|
+
import "../../../../chunk-RJVUECN7.js";
|
|
133
|
+
import "../../../../chunk-6TZE77YJ.js";
|
|
134
134
|
import "../../../../chunk-G3QKH23Y.js";
|
|
135
135
|
import "../../../../chunk-JZRSHDNY.js";
|
|
136
136
|
import "../../../../chunk-L5CPOEDP.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
FilterDialog,
|
|
4
4
|
GridFilterPanel
|
|
5
|
-
} from "../../../../chunk-
|
|
5
|
+
} from "../../../../chunk-QJK7BNH3.js";
|
|
6
6
|
import "../../../../chunk-2LSJTQIL.js";
|
|
7
7
|
import "../../../../chunk-G6II7SVX.js";
|
|
8
8
|
import "../../../../chunk-YRUX7XMQ.js";
|
|
@@ -43,9 +43,9 @@ import "../../../../chunk-Z6T5SXST.js";
|
|
|
43
43
|
import "../../../../chunk-C3UKR3NT.js";
|
|
44
44
|
import "../../../../chunk-D6KL74KI.js";
|
|
45
45
|
import "../../../../chunk-CN46HGXE.js";
|
|
46
|
-
import "../../../../chunk-
|
|
47
|
-
import "../../../../chunk-
|
|
48
|
-
import "../../../../chunk-
|
|
46
|
+
import "../../../../chunk-3QGMAVUF.js";
|
|
47
|
+
import "../../../../chunk-RJVUECN7.js";
|
|
48
|
+
import "../../../../chunk-6TZE77YJ.js";
|
|
49
49
|
import "../../../../chunk-G3QKH23Y.js";
|
|
50
50
|
import "../../../../chunk-JZRSHDNY.js";
|
|
51
51
|
import "../../../../chunk-AKZWDZCZ.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
GridShell
|
|
4
|
-
} from "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-KN7C6R6L.js";
|
|
5
5
|
import "../../../../chunk-BPOVRMVS.js";
|
|
6
6
|
import "../../../../chunk-J2SFOLGZ.js";
|
|
7
|
-
import "../../../../chunk-
|
|
7
|
+
import "../../../../chunk-QJK7BNH3.js";
|
|
8
8
|
import "../../../../chunk-OCQ6GDCF.js";
|
|
9
9
|
import "../../../../chunk-6QYKZMEE.js";
|
|
10
10
|
import "../../../../chunk-DNT5PZLF.js";
|
|
@@ -86,9 +86,9 @@ import "../../../../chunk-Z6T5SXST.js";
|
|
|
86
86
|
import "../../../../chunk-C3UKR3NT.js";
|
|
87
87
|
import "../../../../chunk-D6KL74KI.js";
|
|
88
88
|
import "../../../../chunk-CN46HGXE.js";
|
|
89
|
-
import "../../../../chunk-
|
|
90
|
-
import "../../../../chunk-
|
|
91
|
-
import "../../../../chunk-
|
|
89
|
+
import "../../../../chunk-3QGMAVUF.js";
|
|
90
|
+
import "../../../../chunk-RJVUECN7.js";
|
|
91
|
+
import "../../../../chunk-6TZE77YJ.js";
|
|
92
92
|
import "../../../../chunk-G3QKH23Y.js";
|
|
93
93
|
import "../../../../chunk-JZRSHDNY.js";
|
|
94
94
|
import "../../../../chunk-L5CPOEDP.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StackedModal
|
|
3
|
-
} from "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-3QGMAVUF.js";
|
|
4
4
|
import {
|
|
5
5
|
StackedModalActions,
|
|
6
6
|
StackedModalContent
|
|
7
|
-
} from "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-RJVUECN7.js";
|
|
8
|
+
import "../../../../chunk-6TZE77YJ.js";
|
|
9
9
|
import "../../../../chunk-G3QKH23Y.js";
|
|
10
10
|
import {
|
|
11
11
|
ModalStackProvider,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
modalAriaIds,
|
|
10
10
|
resolveModalContent,
|
|
11
11
|
testId
|
|
12
|
-
} from "../../../../chunk-
|
|
13
|
-
import "../../../../chunk-
|
|
12
|
+
} from "../../../../chunk-RJVUECN7.js";
|
|
13
|
+
import "../../../../chunk-6TZE77YJ.js";
|
|
14
14
|
import "../../../../chunk-AKZWDZCZ.js";
|
|
15
15
|
import "../../../../chunk-FQ6UW7IY.js";
|
|
16
16
|
import "../../../../chunk-6JAIFIPW.js";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
titleLeftStyles,
|
|
7
7
|
titleRightStyles,
|
|
8
8
|
titleStyles
|
|
9
|
-
} from "../../../../chunk-
|
|
9
|
+
} from "../../../../chunk-6TZE77YJ.js";
|
|
10
10
|
import "../../../../chunk-AKZWDZCZ.js";
|
|
11
11
|
import "../../../../chunk-FQ6UW7IY.js";
|
|
12
12
|
import "../../../../chunk-6JAIFIPW.js";
|
|
@@ -68,12 +68,12 @@ import "../../../chunk-LV7LSPBF.js";
|
|
|
68
68
|
import "../../../chunk-CN46HGXE.js";
|
|
69
69
|
import {
|
|
70
70
|
StackedModal
|
|
71
|
-
} from "../../../chunk-
|
|
71
|
+
} from "../../../chunk-3QGMAVUF.js";
|
|
72
72
|
import {
|
|
73
73
|
StackedModalActions,
|
|
74
74
|
StackedModalContent
|
|
75
|
-
} from "../../../chunk-
|
|
76
|
-
import "../../../chunk-
|
|
75
|
+
} from "../../../chunk-RJVUECN7.js";
|
|
76
|
+
import "../../../chunk-6TZE77YJ.js";
|
|
77
77
|
import "../../../chunk-G3QKH23Y.js";
|
|
78
78
|
import {
|
|
79
79
|
ModalStackProvider,
|
|
@@ -679,12 +679,12 @@ import "../../chunk-LV7LSPBF.js";
|
|
|
679
679
|
import "../../chunk-CN46HGXE.js";
|
|
680
680
|
import {
|
|
681
681
|
StackedModal
|
|
682
|
-
} from "../../chunk-
|
|
682
|
+
} from "../../chunk-3QGMAVUF.js";
|
|
683
683
|
import {
|
|
684
684
|
StackedModalActions,
|
|
685
685
|
StackedModalContent
|
|
686
|
-
} from "../../chunk-
|
|
687
|
-
import "../../chunk-
|
|
686
|
+
} from "../../chunk-RJVUECN7.js";
|
|
687
|
+
import "../../chunk-6TZE77YJ.js";
|
|
688
688
|
import "../../chunk-G3QKH23Y.js";
|
|
689
689
|
import {
|
|
690
690
|
ModalStackProvider,
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
ModalPanelContents,
|
|
3
3
|
modalAriaIds,
|
|
4
4
|
resolveModalContent
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RJVUECN7.js";
|
|
6
6
|
import {
|
|
7
7
|
STYLE_ONLY_PROPS,
|
|
8
8
|
dialogRootStyles
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6TZE77YJ.js";
|
|
10
10
|
import {
|
|
11
11
|
usePanelChrome
|
|
12
12
|
} from "./chunk-G3QKH23Y.js";
|
|
@@ -66,6 +66,7 @@ var StackedModalPanel = (props) => {
|
|
|
66
66
|
loadingText,
|
|
67
67
|
fullScreen,
|
|
68
68
|
maxWidth,
|
|
69
|
+
size,
|
|
69
70
|
disableBackdrop,
|
|
70
71
|
disableFocusTrap,
|
|
71
72
|
keepMounted,
|
|
@@ -113,6 +114,7 @@ var StackedModalPanel = (props) => {
|
|
|
113
114
|
glass,
|
|
114
115
|
rtl,
|
|
115
116
|
customMaxWidth: maxWidth,
|
|
117
|
+
panelSize: size,
|
|
116
118
|
TransitionComponent: SlideTransition,
|
|
117
119
|
maxWidth,
|
|
118
120
|
disableEscapeKeyDown: !closeOnEsc,
|
|
@@ -156,4 +158,4 @@ var StackedModal = (props) => {
|
|
|
156
158
|
export {
|
|
157
159
|
StackedModal
|
|
158
160
|
};
|
|
159
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-3QGMAVUF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/feedback/StackedModal/StackedModal.tsx"],"sourcesContent":["import Dialog from '@mui/material/Dialog/index.js';\nimport Slide from '@mui/material/Slide/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport type { TransitionProps } from '@mui/material/transitions/index.js';\nimport type { FC } from 'react';\nimport React, { forwardRef, useId } from 'react';\nimport { usePanelChrome } from './StackedModal.hooks';\nimport { modalAriaIds, ModalPanelContents, resolveModalContent } from './StackedModal.parts';\nimport type { PanelStyleProps } from './StackedModal.styles';\nimport { dialogRootStyles, STYLE_ONLY_PROPS } from './StackedModal.styles';\nimport type { StackedModalProps } from './StackedModal.types';\n\nconst StyledDialog = styled(Dialog, {\n shouldForwardProp: (prop) => !STYLE_ONLY_PROPS.includes(prop as string),\n})<PanelStyleProps>(({ theme, ...props }) => dialogRootStyles(theme, props));\n\n/** Panels slide in from the right on every device. */\nconst SlideTransition = forwardRef<HTMLDivElement, TransitionProps>(\n function SlideTransition(props, ref) {\n return (\n <Slide direction=\"left\" ref={ref} {...props}>\n {props.children as React.ReactElement}\n </Slide>\n );\n },\n);\n\nconst DEFAULTS: Partial<StackedModalProps> = {\n open: false,\n glass: false,\n navigationTitle: '',\n closeOnClickOutside: true,\n closeOnEsc: true,\n loading: false,\n loadingText: 'Loading...',\n maxWidth: false,\n disableBackdrop: false,\n disableFocusTrap: false,\n keepMounted: false,\n rtl: false,\n};\n\n/**\n * Fills in the defaults for props the caller left `undefined`. A table plus one\n * loop, rather than a default per destructured prop — each of those is a branch,\n * and fifteen of them put the component over the complexity bar on their own.\n */\nconst withDefaults = (props: StackedModalProps): StackedModalProps => {\n const resolved = { ...props };\n for (const [key, value] of Object.entries(DEFAULTS)) {\n const prop = key as keyof StackedModalProps;\n if (resolved[prop] === undefined) {\n Object.assign(resolved, { [prop]: value });\n }\n }\n return resolved;\n};\n\n/** The modal's props once defaults are applied and its stack identity is settled. */\ntype ResolvedProps = StackedModalProps & { modalId: string };\n\nconst StackedModalPanel: FC<ResolvedProps> = (props) => {\n const {\n open, onClose, glass, navigationTitle, backLabel, hideClose, children, actions, modalId,\n closeOnClickOutside, closeOnEsc, loading, loadingText, fullScreen, maxWidth, size, disableBackdrop,\n disableFocusTrap, keepMounted, rtl, dataTestId,\n 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...otherProps\n } = props;\n\n const {\n dialogRef, modalRole, isAnimating, showSkeleton, zIndex, isMobile, canGoBack,\n handleBack, handleClose,\n } = usePanelChrome({\n open, modalId, loading, closeOnEsc, closeOnClickOutside, disableFocusTrap, onClose,\n });\n\n // Don't render if in background (performance optimization)\n if (modalRole === 'background' && !keepMounted) return null;\n\n const { content, modalActions, headerActions, hasMobileActions } = resolveModalContent(\n children,\n actions,\n isMobile,\n );\n const { titleId, descId } = modalAriaIds(modalId, ariaLabelledBy, ariaDescribedBy);\n\n return (\n <StyledDialog\n ref={dialogRef}\n open={Boolean(open)}\n onClose={handleClose}\n fullScreen={fullScreen ?? isMobile}\n modalRole={modalRole}\n isAnimating={isAnimating}\n glass={glass}\n rtl={rtl}\n customMaxWidth={maxWidth}\n panelSize={size}\n TransitionComponent={SlideTransition}\n maxWidth={maxWidth}\n disableEscapeKeyDown={!closeOnEsc}\n hideBackdrop={disableBackdrop}\n keepMounted={keepMounted}\n aria-labelledby={titleId}\n aria-describedby={descId}\n data-testid={dataTestId}\n sx={{ zIndex }}\n {...otherProps}\n >\n <ModalPanelContents\n backLabel={backLabel}\n showSkeleton={showSkeleton}\n loadingText={loadingText}\n titleId={titleId}\n descId={descId}\n navigationTitle={navigationTitle}\n hideClose={hideClose}\n canGoBack={canGoBack}\n onBack={handleBack}\n onClose={onClose}\n headerActions={headerActions}\n content={content}\n modalActions={modalActions}\n hasMobileActions={hasMobileActions}\n rtl={rtl}\n dataTestId={dataTestId}\n />\n </StyledDialog>\n );\n};\n\nexport const StackedModal: FC<StackedModalProps> = (props) => {\n // A modal with no caller-supplied id still needs a STABLE one — it keys this\n // panel's entry in the stack, so a value that changed per render (as a\n // `Math.random()` default does) would re-register it on every pass.\n const fallbackId = useId();\n const resolved = withDefaults(props);\n return <StackedModalPanel {...resolved} modalId={resolved.modalId ?? fallbackId} />;\n};\n\n// Re-exported so `./StackedModal` stays the single public entry point for the\n// component and its stack primitives, as the barrel and existing imports expect.\nexport {\n ModalStackProvider,\n ModalStackProvider as StackedModalProvider,\n useModalStack,\n useModalStack as useStackedModal,\n} from './modal-stack';\nexport { Stack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;AAEO,IAAM,eAAsC,CAAC,UAAU;AAI5D,QAAM,aAAa,MAAM;AACzB,QAAM,WAAW,aAAa,KAAK;AACnC,SAAO,oBAAC,qBAAmB,GAAG,UAAU,SAAS,SAAS,WAAW,YAAY;AACnF;","names":["SlideTransition"]}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
// src/components/feedback/StackedModal/StackedModal.styles.ts
|
|
12
12
|
import { alpha } from "@mui/material/styles/index.js";
|
|
13
|
-
var STYLE_ONLY_PROPS = ["modalRole", "isAnimating", "glass", "rtl", "customMaxWidth"];
|
|
13
|
+
var STYLE_ONLY_PROPS = ["modalRole", "isAnimating", "glass", "rtl", "customMaxWidth", "panelSize"];
|
|
14
14
|
var MAX_WIDTH_PX = {
|
|
15
15
|
xs: 444,
|
|
16
16
|
sm: 600,
|
|
@@ -26,6 +26,10 @@ var ANIMATION_BY_ROLE = {
|
|
|
26
26
|
secondary: "expandModal 300ms ease-in-out forwards",
|
|
27
27
|
primary: "contractModal 300ms ease-in-out forwards"
|
|
28
28
|
};
|
|
29
|
+
var WIDE_ANIMATION_BY_ROLE = {
|
|
30
|
+
secondary: "expandModalWide 300ms ease-in-out forwards",
|
|
31
|
+
primary: "contractModalWide 300ms ease-in-out forwards"
|
|
32
|
+
};
|
|
29
33
|
var KEYFRAMES = {
|
|
30
34
|
"@keyframes expandModal": {
|
|
31
35
|
from: { width: "60vw", transform: "translateX(0)" },
|
|
@@ -34,6 +38,14 @@ var KEYFRAMES = {
|
|
|
34
38
|
"@keyframes contractModal": {
|
|
35
39
|
from: { width: "100vw", transform: "translateX(0)" },
|
|
36
40
|
to: { width: "60vw", transform: "translateX(0)" }
|
|
41
|
+
},
|
|
42
|
+
"@keyframes expandModalWide": {
|
|
43
|
+
from: { width: "90vw", transform: "translateX(0)" },
|
|
44
|
+
to: { width: "100vw", transform: "translateX(0)" }
|
|
45
|
+
},
|
|
46
|
+
"@keyframes contractModalWide": {
|
|
47
|
+
from: { width: "100vw", transform: "translateX(0)" },
|
|
48
|
+
to: { width: "90vw", transform: "translateX(0)" }
|
|
37
49
|
}
|
|
38
50
|
};
|
|
39
51
|
var cap = (customMaxWidth) => customMaxWidth ? MAX_WIDTH_PX[customMaxWidth] : null;
|
|
@@ -49,6 +61,12 @@ var primaryPanelStyles = (theme, capPx) => ({
|
|
|
49
61
|
// A viewport width, in the theme's breakpoint unit like the three above.
|
|
50
62
|
[theme.breakpoints.up(2200)]: panelWidth(theme, "40vw", capPx)
|
|
51
63
|
});
|
|
64
|
+
var widePrimaryPanelStyles = (theme, capPx) => ({
|
|
65
|
+
[theme.breakpoints.down("sm")]: panelWidth(theme, "100%", capPx),
|
|
66
|
+
[theme.breakpoints.between("sm", "xl")]: panelWidth(theme, "90vw", capPx),
|
|
67
|
+
[theme.breakpoints.up("xl")]: panelWidth(theme, "75vw", capPx),
|
|
68
|
+
[theme.breakpoints.up(2200)]: panelWidth(theme, "60vw", capPx)
|
|
69
|
+
});
|
|
52
70
|
var secondaryPanelStyles = () => ({
|
|
53
71
|
width: "100vw !important",
|
|
54
72
|
maxWidth: "100vw !important",
|
|
@@ -59,8 +77,10 @@ var secondaryPanelStyles = () => ({
|
|
|
59
77
|
opacity: 0.95,
|
|
60
78
|
transform: "scale(1)"
|
|
61
79
|
});
|
|
62
|
-
var rolePanelStyles = (theme, role, capPx) => {
|
|
63
|
-
if (role === "primary")
|
|
80
|
+
var rolePanelStyles = (theme, role, capPx, size) => {
|
|
81
|
+
if (role === "primary") {
|
|
82
|
+
return size === "wide" ? widePrimaryPanelStyles(theme, capPx) : primaryPanelStyles(theme, capPx);
|
|
83
|
+
}
|
|
64
84
|
if (role === "secondary") return secondaryPanelStyles();
|
|
65
85
|
if (role === "background") return { display: "none" };
|
|
66
86
|
return {};
|
|
@@ -71,7 +91,10 @@ var glassStyles = (theme, glass, role) => glass && role === "primary" ? {
|
|
|
71
91
|
WebkitBackdropFilter: `blur(${rem(theme, 10)})`,
|
|
72
92
|
border: `1px solid ${alpha(theme.palette.divider, 0.18)}`
|
|
73
93
|
} : {};
|
|
74
|
-
var animationStyles = (isAnimating, role) =>
|
|
94
|
+
var animationStyles = (isAnimating, role, size) => {
|
|
95
|
+
const byRole = size === "wide" ? WIDE_ANIMATION_BY_ROLE : ANIMATION_BY_ROLE;
|
|
96
|
+
return isAnimating ? { animation: (role && byRole[role]) ?? "none" } : {};
|
|
97
|
+
};
|
|
75
98
|
var panelBaseStyles = (theme) => ({
|
|
76
99
|
margin: 0,
|
|
77
100
|
position: "fixed",
|
|
@@ -92,9 +115,9 @@ var panelStyles = (theme, props) => {
|
|
|
92
115
|
const capPx = cap(props.customMaxWidth);
|
|
93
116
|
return {
|
|
94
117
|
...panelBaseStyles(theme),
|
|
95
|
-
...rolePanelStyles(theme, props.modalRole, capPx),
|
|
118
|
+
...rolePanelStyles(theme, props.modalRole, capPx, props.panelSize),
|
|
96
119
|
...glassStyles(theme, props.glass, props.modalRole),
|
|
97
|
-
...animationStyles(props.isAnimating, props.modalRole)
|
|
120
|
+
...animationStyles(props.isAnimating, props.modalRole, props.panelSize)
|
|
98
121
|
};
|
|
99
122
|
};
|
|
100
123
|
var dialogRootStyles = (theme, props) => ({
|
|
@@ -157,4 +180,4 @@ export {
|
|
|
157
180
|
loadingOverlayStyles,
|
|
158
181
|
modalContentStyles
|
|
159
182
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
183
|
+
//# sourceMappingURL=chunk-6TZE77YJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/feedback/StackedModal/StackedModal.styles.ts"],"sourcesContent":["import { alpha } from '@mui/material/styles/index.js';\nimport type { CSSObject, Theme } from '@mui/material/styles/index.js';\nimport { scrim } from '../../../tokens/ink';\nimport { rem } from '../../../tokens/relative';\nimport { dynamicViewportHeight } from '../../../utils/viewport';\nimport type { ModalPanelRole, PanelMaxWidth, PanelSize } from './StackedModal.types';\n\n/** Props that drive the panel's look but must not reach the DOM. */\nexport interface PanelStyleProps {\n modalRole?: ModalPanelRole;\n isAnimating?: boolean;\n glass?: boolean;\n rtl?: boolean;\n customMaxWidth?: PanelMaxWidth;\n panelSize?: PanelSize;\n}\n\n/** Style-only props, filtered out before they can land on a DOM node. */\nexport const STYLE_ONLY_PROPS = ['modalRole', 'isAnimating', 'glass', 'rtl', 'customMaxWidth', 'panelSize'];\n\n/** MUI breakpoint names mapped to the pixel width they cap the panel at. */\nconst MAX_WIDTH_PX: Record<Exclude<PanelMaxWidth, false>, number> = {\n xs: 444,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n};\n\n/** The scrim's opacity behind each receding panel role. */\nconst BACKDROP_ALPHA_BY_ROLE: Partial<Record<ModalPanelRole, number>> = {\n secondary: 0.3,\n background: 0.1,\n};\n\nconst ANIMATION_BY_ROLE: Partial<Record<ModalPanelRole, string>> = {\n secondary: 'expandModal 300ms ease-in-out forwards',\n primary: 'contractModal 300ms ease-in-out forwards',\n};\n\n/** A wide panel settles at 90vw, so its keyframes must end there too, or it snaps. */\nconst WIDE_ANIMATION_BY_ROLE: Partial<Record<ModalPanelRole, string>> = {\n secondary: 'expandModalWide 300ms ease-in-out forwards',\n primary: 'contractModalWide 300ms ease-in-out forwards',\n};\n\n// Animation endpoints use the common lg width (60vw); the role styles set the\n// exact per-breakpoint width once the animation settles.\nconst KEYFRAMES: CSSObject = {\n '@keyframes expandModal': {\n from: { width: '60vw', transform: 'translateX(0)' },\n to: { width: '100vw', transform: 'translateX(0)' },\n },\n '@keyframes contractModal': {\n from: { width: '100vw', transform: 'translateX(0)' },\n to: { width: '60vw', transform: 'translateX(0)' },\n },\n '@keyframes expandModalWide': {\n from: { width: '90vw', transform: 'translateX(0)' },\n to: { width: '100vw', transform: 'translateX(0)' },\n },\n '@keyframes contractModalWide': {\n from: { width: '100vw', transform: 'translateX(0)' },\n to: { width: '90vw', transform: 'translateX(0)' },\n },\n};\n\nconst cap = (customMaxWidth?: PanelMaxWidth): number | null =>\n customMaxWidth ? MAX_WIDTH_PX[customMaxWidth] : null;\n\n/** One breakpoint's width: the viewport share, held under the optional px cap. */\nconst panelWidth = (theme: Theme, share: string, capPx: number | null): CSSObject =>\n capPx\n ? { width: `min(${share}, ${rem(theme, capPx)})`, maxWidth: rem(theme, capPx) }\n : { width: share, maxWidth: share };\n\nconst backdropStyles = (theme: Theme, modalRole?: ModalPanelRole): CSSObject => ({\n backgroundColor: scrim(theme, (modalRole && BACKDROP_ALPHA_BY_ROLE[modalRole]) ?? 0.5),\n backdropFilter: modalRole === 'primary' ? `blur(${rem(theme, 4)})` : 'none',\n});\n\n/**\n * The top panel is viewport-aware and narrows as the screen grows: full width on\n * mobile, 80vw on tablet/small desktop, 60vw on regular desktops (lg up —\n * including ~1080p/1440p/1080-wide), and 40vw only on ultra-wide screens\n * (≥2200px) so the receding panel stays visible on huge monitors. A `maxWidth`\n * prop, when given, caps it further.\n */\nconst primaryPanelStyles = (theme: Theme, capPx: number | null): CSSObject => ({\n [theme.breakpoints.down('sm')]: panelWidth(theme, '100%', capPx),\n [theme.breakpoints.between('sm', 'lg')]: panelWidth(theme, '80vw', capPx),\n [theme.breakpoints.up('lg')]: panelWidth(theme, '60vw', capPx),\n // A viewport width, in the theme's breakpoint unit like the three above.\n [theme.breakpoints.up(2200)]: panelWidth(theme, '40vw', capPx),\n});\n\n/**\n * `size=\"wide\"`: 90vw up to `xl`, 75vw above it, 60vw on ultra-wide screens.\n * At 1280 that is ~1150px instead of 768px — room for a form column beside a\n * fixed ~350px sidebar — while a sliver of the page behind stays visible.\n */\nconst widePrimaryPanelStyles = (theme: Theme, capPx: number | null): CSSObject => ({\n [theme.breakpoints.down('sm')]: panelWidth(theme, '100%', capPx),\n [theme.breakpoints.between('sm', 'xl')]: panelWidth(theme, '90vw', capPx),\n [theme.breakpoints.up('xl')]: panelWidth(theme, '75vw', capPx),\n [theme.breakpoints.up(2200)]: panelWidth(theme, '60vw', capPx),\n});\n\n/** Panels below the top one expand to full width, producing the GTM stacking effect. */\nconst secondaryPanelStyles = (): CSSObject => ({\n width: '100vw !important',\n maxWidth: '100vw !important',\n right: '0 !important',\n top: '0 !important',\n ...dynamicViewportHeight('height', 'maxHeight'),\n borderRadius: '0 !important',\n opacity: 0.95,\n transform: 'scale(1)',\n});\n\nconst rolePanelStyles = (\n theme: Theme,\n role: ModalPanelRole | undefined,\n capPx: number | null,\n size?: PanelSize,\n): CSSObject => {\n if (role === 'primary') {\n return size === 'wide' ? widePrimaryPanelStyles(theme, capPx) : primaryPanelStyles(theme, capPx);\n }\n if (role === 'secondary') return secondaryPanelStyles();\n // Background modals stay mounted but hidden, for performance.\n if (role === 'background') return { display: 'none' };\n return {};\n};\n\nconst glassStyles = (theme: Theme, glass?: boolean, role?: ModalPanelRole): CSSObject =>\n glass && role === 'primary'\n ? {\n backgroundColor: alpha(theme.palette.background.paper, 0.85),\n backdropFilter: `blur(${rem(theme, 10)})`,\n WebkitBackdropFilter: `blur(${rem(theme, 10)})`,\n border: `1px solid ${alpha(theme.palette.divider, 0.18)}`,\n }\n : {};\n\nconst animationStyles = (isAnimating?: boolean, role?: ModalPanelRole, size?: PanelSize): CSSObject => {\n const byRole = size === 'wide' ? WIDE_ANIMATION_BY_ROLE : ANIMATION_BY_ROLE;\n return isAnimating ? { animation: (role && byRole[role]) ?? 'none' } : {};\n};\n\nconst panelBaseStyles = (theme: Theme): CSSObject => ({\n margin: 0,\n position: 'fixed',\n right: 0,\n top: 0,\n // Pinned to the DYNAMIC viewport: on iOS a `100vh` panel runs underneath the\n // browser toolbar, which parks the tail of the scroll area (the submit row)\n // out of reach. See `dynamicViewportHeight`.\n ...dynamicViewportHeight('height', 'maxHeight'),\n borderRadius: 0,\n willChange: 'transform, width, border-radius',\n transition: theme.transitions.create(\n ['width', 'max-width', 'border-radius', 'transform', 'opacity'],\n { duration: 300, easing: theme.transitions.easing.easeInOut },\n ),\n});\n\nconst panelStyles = (theme: Theme, props: PanelStyleProps): CSSObject => {\n const capPx = cap(props.customMaxWidth);\n return {\n ...panelBaseStyles(theme),\n ...rolePanelStyles(theme, props.modalRole, capPx, props.panelSize),\n ...glassStyles(theme, props.glass, props.modalRole),\n ...animationStyles(props.isAnimating, props.modalRole, props.panelSize),\n };\n};\n\n/** The full rule set for the sliding panel's Dialog root. */\nexport const dialogRootStyles = (theme: Theme, props: PanelStyleProps): CSSObject => ({\n direction: props.rtl ? 'rtl' : 'ltr',\n '& .MuiBackdrop-root': backdropStyles(theme, props.modalRole),\n '& .MuiDialog-container': { alignItems: 'flex-start', justifyContent: 'flex-end' },\n '& .MuiDialog-paper': panelStyles(theme, props),\n ...KEYFRAMES,\n});\n\nexport const titleStyles = (theme: Theme, rtl?: boolean): CSSObject => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: theme.spacing(2, 2.5),\n borderBottom: `1px solid ${theme.palette.divider}`,\n direction: rtl ? 'rtl' : 'ltr',\n});\n\nexport const titleLeftStyles = (theme: Theme): CSSObject => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1.5),\n flex: 1,\n});\n\nexport const titleRightStyles = (theme: Theme): CSSObject => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n});\n\nexport const loadingOverlayStyles = (theme: Theme): CSSObject => ({\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: alpha(theme.palette.background.paper, 0.8),\n zIndex: 9999,\n});\n\nexport const modalContentStyles = (theme: Theme): CSSObject => ({\n padding: theme.spacing(3),\n // MUI's DialogContent defaults to `overflow-y: auto`, but inside a panel it is\n // NOT the element that scrolls — ModalBody above it is, and this box always\n // ends up exactly as tall as its own content. A scroll container that never\n // scrolls is still the containing block for every `position: sticky`\n // descendant, so a sticky header anchored here gets zero travel and rides the\n // content out of view: sticky, and pinned to nothing. Handing the overflow\n // back to ModalBody makes the panel's own scroller the anchor.\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NRI2TZDS.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsGrid
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KESGVMHW.js";
|
|
7
7
|
import {
|
|
8
8
|
viewStateKey
|
|
9
9
|
} from "./chunk-ZOLAYP2D.js";
|
|
@@ -178,4 +178,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
|
|
|
178
178
|
export {
|
|
179
179
|
DataViewsTableBase
|
|
180
180
|
};
|
|
181
|
-
//# sourceMappingURL=chunk-
|
|
181
|
+
//# sourceMappingURL=chunk-H7DVH6KD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridShell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KN7C6R6L.js";
|
|
4
4
|
import {
|
|
5
5
|
useDataViewsState
|
|
6
6
|
} from "./chunk-YXU45AVO.js";
|
|
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
|
|
|
27
27
|
export {
|
|
28
28
|
DataViewsGrid
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-KESGVMHW.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
FilterDialog,
|
|
6
6
|
GridFilterPanel
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QJK7BNH3.js";
|
|
8
8
|
import {
|
|
9
9
|
DataViewsEmpty
|
|
10
10
|
} from "./chunk-OCQ6GDCF.js";
|
|
@@ -238,4 +238,4 @@ function GridShell(props) {
|
|
|
238
238
|
export {
|
|
239
239
|
GridShell
|
|
240
240
|
};
|
|
241
|
-
//# sourceMappingURL=chunk-
|
|
241
|
+
//# sourceMappingURL=chunk-KN7C6R6L.js.map
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from "./chunk-FXWXBEOZ.js";
|
|
13
13
|
import {
|
|
14
14
|
StackedModal
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3QGMAVUF.js";
|
|
16
16
|
import {
|
|
17
17
|
StackedModalContent
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RJVUECN7.js";
|
|
19
19
|
import {
|
|
20
20
|
sxRem
|
|
21
21
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
GridFilterPanel,
|
|
158
158
|
FilterDialog
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-QJK7BNH3.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
titleLeftStyles,
|
|
5
5
|
titleRightStyles,
|
|
6
6
|
titleStyles
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6TZE77YJ.js";
|
|
8
8
|
import {
|
|
9
9
|
safeAreaBottom
|
|
10
10
|
} from "./chunk-AKZWDZCZ.js";
|
|
@@ -231,4 +231,4 @@ export {
|
|
|
231
231
|
ModalFooter,
|
|
232
232
|
ModalPanelContents
|
|
233
233
|
};
|
|
234
|
-
//# sourceMappingURL=chunk-
|
|
234
|
+
//# sourceMappingURL=chunk-RJVUECN7.js.map
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "../chunk-AJ4MRDKM.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsTableBase
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-H7DVH6KD.js";
|
|
7
7
|
import "../chunk-NRI2TZDS.js";
|
|
8
8
|
import {
|
|
9
9
|
DataViewsGrid
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-KESGVMHW.js";
|
|
11
11
|
import {
|
|
12
12
|
BaseListCard
|
|
13
13
|
} from "../chunk-3WAAL3KN.js";
|
|
@@ -22,12 +22,12 @@ import {
|
|
|
22
22
|
useDragItem
|
|
23
23
|
} from "../chunk-K4EKTMTC.js";
|
|
24
24
|
import "../chunk-ZOLAYP2D.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-KN7C6R6L.js";
|
|
26
26
|
import "../chunk-BPOVRMVS.js";
|
|
27
27
|
import {
|
|
28
28
|
DataViewsBoard
|
|
29
29
|
} from "../chunk-J2SFOLGZ.js";
|
|
30
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-QJK7BNH3.js";
|
|
31
31
|
import "../chunk-OCQ6GDCF.js";
|
|
32
32
|
import "../chunk-6QYKZMEE.js";
|
|
33
33
|
import "../chunk-DNT5PZLF.js";
|
|
@@ -171,9 +171,9 @@ import "../chunk-GVGJMH77.js";
|
|
|
171
171
|
import "../chunk-GYXUCS37.js";
|
|
172
172
|
import "../chunk-LV7LSPBF.js";
|
|
173
173
|
import "../chunk-CN46HGXE.js";
|
|
174
|
-
import "../chunk-
|
|
175
|
-
import "../chunk-
|
|
176
|
-
import "../chunk-
|
|
174
|
+
import "../chunk-3QGMAVUF.js";
|
|
175
|
+
import "../chunk-RJVUECN7.js";
|
|
176
|
+
import "../chunk-6TZE77YJ.js";
|
|
177
177
|
import "../chunk-G3QKH23Y.js";
|
|
178
178
|
import "../chunk-JZRSHDNY.js";
|
|
179
179
|
import "../chunk-L5CPOEDP.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../chunk-CN46HGXE.js";
|
|
2
2
|
import {
|
|
3
3
|
StackedModal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-3QGMAVUF.js";
|
|
5
5
|
import {
|
|
6
6
|
StackedModalActions,
|
|
7
7
|
StackedModalContent
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-RJVUECN7.js";
|
|
9
|
+
import "../chunk-6TZE77YJ.js";
|
|
10
10
|
import "../chunk-G3QKH23Y.js";
|
|
11
11
|
import {
|
|
12
12
|
ModalStackProvider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/StackedModal/StackedModal.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"StackedModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/StackedModal/StackedModal.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAyH9D,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAO9C,CAAC;AAIF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,IAAI,oBAAoB,EAC1C,aAAa,EACb,aAAa,IAAI,eAAe,GACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
2
|
-
import type { ModalPanelRole, PanelMaxWidth } from './StackedModal.types';
|
|
2
|
+
import type { ModalPanelRole, PanelMaxWidth, PanelSize } from './StackedModal.types';
|
|
3
3
|
/** Props that drive the panel's look but must not reach the DOM. */
|
|
4
4
|
export interface PanelStyleProps {
|
|
5
5
|
modalRole?: ModalPanelRole;
|
|
@@ -7,6 +7,7 @@ export interface PanelStyleProps {
|
|
|
7
7
|
glass?: boolean;
|
|
8
8
|
rtl?: boolean;
|
|
9
9
|
customMaxWidth?: PanelMaxWidth;
|
|
10
|
+
panelSize?: PanelSize;
|
|
10
11
|
}
|
|
11
12
|
/** Style-only props, filtered out before they can land on a DOM node. */
|
|
12
13
|
export declare const STYLE_ONLY_PROPS: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedModal.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/StackedModal/StackedModal.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAItE,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"StackedModal.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/StackedModal/StackedModal.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAItE,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAErF,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,UAA8E,CAAC;AA+J5G,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,EAAE,OAAO,eAAe,KAAG,SAMtE,CAAC;AAEH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,EAAE,MAAM,OAAO,KAAG,SAOxD,CAAC;AAEH,eAAO,MAAM,eAAe,GAAI,OAAO,KAAK,KAAG,SAK7C,CAAC;AAEH,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,KAAG,SAI9C,CAAC;AAEH,eAAO,MAAM,oBAAoB,GAAI,OAAO,KAAK,KAAG,SAYlD,CAAC;AAEH,eAAO,MAAM,kBAAkB,GAAI,OAAO,KAAK,KAAG,SAUhD,CAAC"}
|
|
@@ -3,6 +3,12 @@ import type { ReactNode } from 'react';
|
|
|
3
3
|
export type ModalPanelRole = 'primary' | 'secondary' | 'background';
|
|
4
4
|
/** The breakpoint the panel's width is capped at, or `false` for uncapped. */
|
|
5
5
|
export type PanelMaxWidth = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
|
|
6
|
+
/**
|
|
7
|
+
* How much of the viewport the top panel takes from `sm` up. `wide` is for a
|
|
8
|
+
* dense editor that lays out two columns inside the panel, which the default
|
|
9
|
+
* 60vw starves on a laptop.
|
|
10
|
+
*/
|
|
11
|
+
export type PanelSize = 'default' | 'wide';
|
|
6
12
|
export interface StackedModalProps {
|
|
7
13
|
/** The back arrow's accessible name — it carries a glyph only. REQUIRED. */
|
|
8
14
|
backLabel: string;
|
|
@@ -40,6 +46,8 @@ export interface StackedModalProps {
|
|
|
40
46
|
fullScreen?: boolean;
|
|
41
47
|
/** Maximum width of the modal */
|
|
42
48
|
maxWidth?: PanelMaxWidth;
|
|
49
|
+
/** Viewport share of the top panel — `wide` gives a dense editor more room */
|
|
50
|
+
size?: PanelSize;
|
|
43
51
|
/** Disable the backdrop click behavior */
|
|
44
52
|
disableBackdrop?: boolean;
|
|
45
53
|
/** Disable focus trap functionality */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedModal.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/StackedModal/StackedModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,oFAAoF;AACpF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;AAEpE,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,SA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;IACf,8BAA8B;IAC9B,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,+BAA+B;IAC/B,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,oCAAoC;IACpC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,sCAAsC;IACtC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC7C,2CAA2C;IAC3C,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,cAAc,GAAG,IAAI,CAAC;CAC1D"}
|
|
1
|
+
{"version":3,"file":"StackedModal.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/StackedModal/StackedModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,oFAAoF;AACpF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;AAEpE,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,IAAI,EAAE,OAAO,CAAC;IACd,8DAA8D;IAC9D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mCAAmC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kDAAkD;IAClD,eAAe,C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AC/B,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,oCAAoC;IACpC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,sCAAsC;IACtC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC7C,2CAA2C;IAC3C,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,cAAc,GAAG,IAAI,CAAC;CAC1D"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ModalStackProvider, StackedModal, StackedModalActions as StackedModalActions, StackedModalContent as StackedModalContent, ModalStackProvider as StackedModalProvider, useModalStack, useModalStack as useStackedModal, } from './StackedModal';
|
|
2
|
-
export type { StackedModalProps } from './StackedModal.types';
|
|
2
|
+
export type { PanelSize, StackedModalProps } from './StackedModal.types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/StackedModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,IAAI,mBAAmB,EAC1C,mBAAmB,IAAI,mBAAmB,EAC1C,kBAAkB,IAAI,oBAAoB,EAC1C,aAAa,EACb,aAAa,IAAI,eAAe,GACjC,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/StackedModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,IAAI,mBAAmB,EAC1C,mBAAmB,IAAI,mBAAmB,EAC1C,kBAAkB,IAAI,oBAAoB,EAC1C,aAAa,EACb,aAAa,IAAI,eAAe,GACjC,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -135,6 +135,7 @@ new component that portals should too.
|
|
|
135
135
|
| `loadingText` | `string` | `'Loading...'` | Text shown during loading state |
|
|
136
136
|
| `fullScreen` | `boolean` | `false` | Full screen mode |
|
|
137
137
|
| `maxWidth` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| false` | `'md'` | Maximum modal width |
|
|
138
|
+
| `size` | `'default' \| 'wide'` | `'default'` | Viewport share of the top panel: default is 80vw (`sm`–`lg`), 60vw (`lg`+), 40vw (≥2200px); `wide` is 90vw up to `xl`, 75vw above, 60vw ≥2200px — for a dense two-column editor |
|
|
138
139
|
| `disableBackdrop` | `boolean` | `false` | Hide backdrop |
|
|
139
140
|
| `disableFocusTrap` | `boolean` | `false` | Disable focus trapping |
|
|
140
141
|
| `keepMounted` | `boolean` | `false` | Keep modal mounted when closed |
|
|
@@ -3,7 +3,7 @@ import type { CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
|
3
3
|
import { scrim } from '../../../tokens/ink';
|
|
4
4
|
import { rem } from '../../../tokens/relative';
|
|
5
5
|
import { dynamicViewportHeight } from '../../../utils/viewport';
|
|
6
|
-
import type { ModalPanelRole, PanelMaxWidth } from './StackedModal.types';
|
|
6
|
+
import type { ModalPanelRole, PanelMaxWidth, PanelSize } from './StackedModal.types';
|
|
7
7
|
|
|
8
8
|
/** Props that drive the panel's look but must not reach the DOM. */
|
|
9
9
|
export interface PanelStyleProps {
|
|
@@ -12,10 +12,11 @@ export interface PanelStyleProps {
|
|
|
12
12
|
glass?: boolean;
|
|
13
13
|
rtl?: boolean;
|
|
14
14
|
customMaxWidth?: PanelMaxWidth;
|
|
15
|
+
panelSize?: PanelSize;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
/** Style-only props, filtered out before they can land on a DOM node. */
|
|
18
|
-
export const STYLE_ONLY_PROPS = ['modalRole', 'isAnimating', 'glass', 'rtl', 'customMaxWidth'];
|
|
19
|
+
export const STYLE_ONLY_PROPS = ['modalRole', 'isAnimating', 'glass', 'rtl', 'customMaxWidth', 'panelSize'];
|
|
19
20
|
|
|
20
21
|
/** MUI breakpoint names mapped to the pixel width they cap the panel at. */
|
|
21
22
|
const MAX_WIDTH_PX: Record<Exclude<PanelMaxWidth, false>, number> = {
|
|
@@ -37,6 +38,12 @@ const ANIMATION_BY_ROLE: Partial<Record<ModalPanelRole, string>> = {
|
|
|
37
38
|
primary: 'contractModal 300ms ease-in-out forwards',
|
|
38
39
|
};
|
|
39
40
|
|
|
41
|
+
/** A wide panel settles at 90vw, so its keyframes must end there too, or it snaps. */
|
|
42
|
+
const WIDE_ANIMATION_BY_ROLE: Partial<Record<ModalPanelRole, string>> = {
|
|
43
|
+
secondary: 'expandModalWide 300ms ease-in-out forwards',
|
|
44
|
+
primary: 'contractModalWide 300ms ease-in-out forwards',
|
|
45
|
+
};
|
|
46
|
+
|
|
40
47
|
// Animation endpoints use the common lg width (60vw); the role styles set the
|
|
41
48
|
// exact per-breakpoint width once the animation settles.
|
|
42
49
|
const KEYFRAMES: CSSObject = {
|
|
@@ -48,6 +55,14 @@ const KEYFRAMES: CSSObject = {
|
|
|
48
55
|
from: { width: '100vw', transform: 'translateX(0)' },
|
|
49
56
|
to: { width: '60vw', transform: 'translateX(0)' },
|
|
50
57
|
},
|
|
58
|
+
'@keyframes expandModalWide': {
|
|
59
|
+
from: { width: '90vw', transform: 'translateX(0)' },
|
|
60
|
+
to: { width: '100vw', transform: 'translateX(0)' },
|
|
61
|
+
},
|
|
62
|
+
'@keyframes contractModalWide': {
|
|
63
|
+
from: { width: '100vw', transform: 'translateX(0)' },
|
|
64
|
+
to: { width: '90vw', transform: 'translateX(0)' },
|
|
65
|
+
},
|
|
51
66
|
};
|
|
52
67
|
|
|
53
68
|
const cap = (customMaxWidth?: PanelMaxWidth): number | null =>
|
|
@@ -79,6 +94,18 @@ const primaryPanelStyles = (theme: Theme, capPx: number | null): CSSObject => ({
|
|
|
79
94
|
[theme.breakpoints.up(2200)]: panelWidth(theme, '40vw', capPx),
|
|
80
95
|
});
|
|
81
96
|
|
|
97
|
+
/**
|
|
98
|
+
* `size="wide"`: 90vw up to `xl`, 75vw above it, 60vw on ultra-wide screens.
|
|
99
|
+
* At 1280 that is ~1150px instead of 768px — room for a form column beside a
|
|
100
|
+
* fixed ~350px sidebar — while a sliver of the page behind stays visible.
|
|
101
|
+
*/
|
|
102
|
+
const widePrimaryPanelStyles = (theme: Theme, capPx: number | null): CSSObject => ({
|
|
103
|
+
[theme.breakpoints.down('sm')]: panelWidth(theme, '100%', capPx),
|
|
104
|
+
[theme.breakpoints.between('sm', 'xl')]: panelWidth(theme, '90vw', capPx),
|
|
105
|
+
[theme.breakpoints.up('xl')]: panelWidth(theme, '75vw', capPx),
|
|
106
|
+
[theme.breakpoints.up(2200)]: panelWidth(theme, '60vw', capPx),
|
|
107
|
+
});
|
|
108
|
+
|
|
82
109
|
/** Panels below the top one expand to full width, producing the GTM stacking effect. */
|
|
83
110
|
const secondaryPanelStyles = (): CSSObject => ({
|
|
84
111
|
width: '100vw !important',
|
|
@@ -91,8 +118,15 @@ const secondaryPanelStyles = (): CSSObject => ({
|
|
|
91
118
|
transform: 'scale(1)',
|
|
92
119
|
});
|
|
93
120
|
|
|
94
|
-
const rolePanelStyles = (
|
|
95
|
-
|
|
121
|
+
const rolePanelStyles = (
|
|
122
|
+
theme: Theme,
|
|
123
|
+
role: ModalPanelRole | undefined,
|
|
124
|
+
capPx: number | null,
|
|
125
|
+
size?: PanelSize,
|
|
126
|
+
): CSSObject => {
|
|
127
|
+
if (role === 'primary') {
|
|
128
|
+
return size === 'wide' ? widePrimaryPanelStyles(theme, capPx) : primaryPanelStyles(theme, capPx);
|
|
129
|
+
}
|
|
96
130
|
if (role === 'secondary') return secondaryPanelStyles();
|
|
97
131
|
// Background modals stay mounted but hidden, for performance.
|
|
98
132
|
if (role === 'background') return { display: 'none' };
|
|
@@ -109,8 +143,10 @@ const glassStyles = (theme: Theme, glass?: boolean, role?: ModalPanelRole): CSSO
|
|
|
109
143
|
}
|
|
110
144
|
: {};
|
|
111
145
|
|
|
112
|
-
const animationStyles = (isAnimating?: boolean, role?: ModalPanelRole): CSSObject =>
|
|
113
|
-
|
|
146
|
+
const animationStyles = (isAnimating?: boolean, role?: ModalPanelRole, size?: PanelSize): CSSObject => {
|
|
147
|
+
const byRole = size === 'wide' ? WIDE_ANIMATION_BY_ROLE : ANIMATION_BY_ROLE;
|
|
148
|
+
return isAnimating ? { animation: (role && byRole[role]) ?? 'none' } : {};
|
|
149
|
+
};
|
|
114
150
|
|
|
115
151
|
const panelBaseStyles = (theme: Theme): CSSObject => ({
|
|
116
152
|
margin: 0,
|
|
@@ -133,9 +169,9 @@ const panelStyles = (theme: Theme, props: PanelStyleProps): CSSObject => {
|
|
|
133
169
|
const capPx = cap(props.customMaxWidth);
|
|
134
170
|
return {
|
|
135
171
|
...panelBaseStyles(theme),
|
|
136
|
-
...rolePanelStyles(theme, props.modalRole, capPx),
|
|
172
|
+
...rolePanelStyles(theme, props.modalRole, capPx, props.panelSize),
|
|
137
173
|
...glassStyles(theme, props.glass, props.modalRole),
|
|
138
|
-
...animationStyles(props.isAnimating, props.modalRole),
|
|
174
|
+
...animationStyles(props.isAnimating, props.modalRole, props.panelSize),
|
|
139
175
|
};
|
|
140
176
|
};
|
|
141
177
|
|
|
@@ -62,7 +62,7 @@ type ResolvedProps = StackedModalProps & { modalId: string };
|
|
|
62
62
|
const StackedModalPanel: FC<ResolvedProps> = (props) => {
|
|
63
63
|
const {
|
|
64
64
|
open, onClose, glass, navigationTitle, backLabel, hideClose, children, actions, modalId,
|
|
65
|
-
closeOnClickOutside, closeOnEsc, loading, loadingText, fullScreen, maxWidth, disableBackdrop,
|
|
65
|
+
closeOnClickOutside, closeOnEsc, loading, loadingText, fullScreen, maxWidth, size, disableBackdrop,
|
|
66
66
|
disableFocusTrap, keepMounted, rtl, dataTestId,
|
|
67
67
|
'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...otherProps
|
|
68
68
|
} = props;
|
|
@@ -95,6 +95,7 @@ const StackedModalPanel: FC<ResolvedProps> = (props) => {
|
|
|
95
95
|
glass={glass}
|
|
96
96
|
rtl={rtl}
|
|
97
97
|
customMaxWidth={maxWidth}
|
|
98
|
+
panelSize={size}
|
|
98
99
|
TransitionComponent={SlideTransition}
|
|
99
100
|
maxWidth={maxWidth}
|
|
100
101
|
disableEscapeKeyDown={!closeOnEsc}
|
|
@@ -6,6 +6,13 @@ export type ModalPanelRole = 'primary' | 'secondary' | 'background';
|
|
|
6
6
|
/** The breakpoint the panel's width is capped at, or `false` for uncapped. */
|
|
7
7
|
export type PanelMaxWidth = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* How much of the viewport the top panel takes from `sm` up. `wide` is for a
|
|
11
|
+
* dense editor that lays out two columns inside the panel, which the default
|
|
12
|
+
* 60vw starves on a laptop.
|
|
13
|
+
*/
|
|
14
|
+
export type PanelSize = 'default' | 'wide';
|
|
15
|
+
|
|
9
16
|
export interface StackedModalProps {
|
|
10
17
|
/** The back arrow's accessible name — it carries a glyph only. REQUIRED. */
|
|
11
18
|
backLabel: string;
|
|
@@ -43,6 +50,8 @@ export interface StackedModalProps {
|
|
|
43
50
|
fullScreen?: boolean;
|
|
44
51
|
/** Maximum width of the modal */
|
|
45
52
|
maxWidth?: PanelMaxWidth;
|
|
53
|
+
/** Viewport share of the top panel — `wide` gives a dense editor more room */
|
|
54
|
+
size?: PanelSize;
|
|
46
55
|
/** Disable the backdrop click behavior */
|
|
47
56
|
disableBackdrop?: boolean;
|
|
48
57
|
/** Disable focus trap functionality */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/feedback/StackedModal/StackedModal.tsx"],"sourcesContent":["import Dialog from '@mui/material/Dialog/index.js';\nimport Slide from '@mui/material/Slide/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport type { TransitionProps } from '@mui/material/transitions/index.js';\nimport type { FC } from 'react';\nimport React, { forwardRef, useId } from 'react';\nimport { usePanelChrome } from './StackedModal.hooks';\nimport { modalAriaIds, ModalPanelContents, resolveModalContent } from './StackedModal.parts';\nimport type { PanelStyleProps } from './StackedModal.styles';\nimport { dialogRootStyles, STYLE_ONLY_PROPS } from './StackedModal.styles';\nimport type { StackedModalProps } from './StackedModal.types';\n\nconst StyledDialog = styled(Dialog, {\n shouldForwardProp: (prop) => !STYLE_ONLY_PROPS.includes(prop as string),\n})<PanelStyleProps>(({ theme, ...props }) => dialogRootStyles(theme, props));\n\n/** Panels slide in from the right on every device. */\nconst SlideTransition = forwardRef<HTMLDivElement, TransitionProps>(\n function SlideTransition(props, ref) {\n return (\n <Slide direction=\"left\" ref={ref} {...props}>\n {props.children as React.ReactElement}\n </Slide>\n );\n },\n);\n\nconst DEFAULTS: Partial<StackedModalProps> = {\n open: false,\n glass: false,\n navigationTitle: '',\n closeOnClickOutside: true,\n closeOnEsc: true,\n loading: false,\n loadingText: 'Loading...',\n maxWidth: false,\n disableBackdrop: false,\n disableFocusTrap: false,\n keepMounted: false,\n rtl: false,\n};\n\n/**\n * Fills in the defaults for props the caller left `undefined`. A table plus one\n * loop, rather than a default per destructured prop — each of those is a branch,\n * and fifteen of them put the component over the complexity bar on their own.\n */\nconst withDefaults = (props: StackedModalProps): StackedModalProps => {\n const resolved = { ...props };\n for (const [key, value] of Object.entries(DEFAULTS)) {\n const prop = key as keyof StackedModalProps;\n if (resolved[prop] === undefined) {\n Object.assign(resolved, { [prop]: value });\n }\n }\n return resolved;\n};\n\n/** The modal's props once defaults are applied and its stack identity is settled. */\ntype ResolvedProps = StackedModalProps & { modalId: string };\n\nconst StackedModalPanel: FC<ResolvedProps> = (props) => {\n const {\n open, onClose, glass, navigationTitle, backLabel, hideClose, children, actions, modalId,\n closeOnClickOutside, closeOnEsc, loading, loadingText, fullScreen, maxWidth, disableBackdrop,\n disableFocusTrap, keepMounted, rtl, dataTestId,\n 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...otherProps\n } = props;\n\n const {\n dialogRef, modalRole, isAnimating, showSkeleton, zIndex, isMobile, canGoBack,\n handleBack, handleClose,\n } = usePanelChrome({\n open, modalId, loading, closeOnEsc, closeOnClickOutside, disableFocusTrap, onClose,\n });\n\n // Don't render if in background (performance optimization)\n if (modalRole === 'background' && !keepMounted) return null;\n\n const { content, modalActions, headerActions, hasMobileActions } = resolveModalContent(\n children,\n actions,\n isMobile,\n );\n const { titleId, descId } = modalAriaIds(modalId, ariaLabelledBy, ariaDescribedBy);\n\n return (\n <StyledDialog\n ref={dialogRef}\n open={Boolean(open)}\n onClose={handleClose}\n fullScreen={fullScreen ?? isMobile}\n modalRole={modalRole}\n isAnimating={isAnimating}\n glass={glass}\n rtl={rtl}\n customMaxWidth={maxWidth}\n TransitionComponent={SlideTransition}\n maxWidth={maxWidth}\n disableEscapeKeyDown={!closeOnEsc}\n hideBackdrop={disableBackdrop}\n keepMounted={keepMounted}\n aria-labelledby={titleId}\n aria-describedby={descId}\n data-testid={dataTestId}\n sx={{ zIndex }}\n {...otherProps}\n >\n <ModalPanelContents\n backLabel={backLabel}\n showSkeleton={showSkeleton}\n loadingText={loadingText}\n titleId={titleId}\n descId={descId}\n navigationTitle={navigationTitle}\n hideClose={hideClose}\n canGoBack={canGoBack}\n onBack={handleBack}\n onClose={onClose}\n headerActions={headerActions}\n content={content}\n modalActions={modalActions}\n hasMobileActions={hasMobileActions}\n rtl={rtl}\n dataTestId={dataTestId}\n />\n </StyledDialog>\n );\n};\n\nexport const StackedModal: FC<StackedModalProps> = (props) => {\n // A modal with no caller-supplied id still needs a STABLE one — it keys this\n // panel's entry in the stack, so a value that changed per render (as a\n // `Math.random()` default does) would re-register it on every pass.\n const fallbackId = useId();\n const resolved = withDefaults(props);\n return <StackedModalPanel {...resolved} modalId={resolved.modalId ?? fallbackId} />;\n};\n\n// Re-exported so `./StackedModal` stays the single public entry point for the\n// component and its stack primitives, as the barrel and existing imports expect.\nexport {\n ModalStackProvider,\n ModalStackProvider as StackedModalProvider,\n useModalStack,\n useModalStack as useStackedModal,\n} from './modal-stack';\nexport { StackedModalActions, StackedModalContent } from './StackedModal.parts';\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,SAAS,cAAc;AAGvB,SAAgB,YAAY,aAAa;AAenC;AARN,IAAM,eAAe,OAAO,QAAQ;AAAA,EAClC,mBAAmB,CAAC,SAAS,CAAC,iBAAiB,SAAS,IAAc;AACxE,CAAC,EAAmB,CAAC,EAAE,OAAO,GAAG,MAAM,MAAM,iBAAiB,OAAO,KAAK,CAAC;AAG3E,IAAM,kBAAkB;AAAA,EACtB,SAASA,iBAAgB,OAAO,KAAK;AACnC,WACE,oBAAC,SAAM,WAAU,QAAO,KAAW,GAAG,OACnC,gBAAM,UACT;AAAA,EAEJ;AACF;AAEA,IAAM,WAAuC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,KAAK;AACP;AAOA,IAAM,eAAe,CAAC,UAAgD;AACpE,QAAM,WAAW,EAAE,GAAG,MAAM;AAC5B,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,QAAQ,GAAG;AACnD,UAAM,OAAO;AACb,QAAI,SAAS,IAAI,MAAM,QAAW;AAChC,aAAO,OAAO,UAAU,EAAE,CAAC,IAAI,GAAG,MAAM,CAAC;AAA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G;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,QAAQ;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEO,IAAM,eAAsC,CAAC,UAAU;AAI5D,QAAM,aAAa,MAAM;AACzB,QAAM,WAAW,aAAa,KAAK;AACnC,SAAO,oBAAC,qBAAmB,GAAG,UAAU,SAAS,SAAS,WAAW,YAAY;AACnF;","names":["SlideTransition"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/feedback/StackedModal/StackedModal.styles.ts"],"sourcesContent":["import { alpha } from '@mui/material/styles/index.js';\nimport type { CSSObject, Theme } from '@mui/material/styles/index.js';\nimport { scrim } from '../../../tokens/ink';\nimport { rem } from '../../../tokens/relative';\nimport { dynamicViewportHeight } from '../../../utils/viewport';\nimport type { ModalPanelRole, PanelMaxWidth } from './StackedModal.types';\n\n/** Props that drive the panel's look but must not reach the DOM. */\nexport interface PanelStyleProps {\n modalRole?: ModalPanelRole;\n isAnimating?: boolean;\n glass?: boolean;\n rtl?: boolean;\n customMaxWidth?: PanelMaxWidth;\n}\n\n/** Style-only props, filtered out before they can land on a DOM node. */\nexport const STYLE_ONLY_PROPS = ['modalRole', 'isAnimating', 'glass', 'rtl', 'customMaxWidth'];\n\n/** MUI breakpoint names mapped to the pixel width they cap the panel at. */\nconst MAX_WIDTH_PX: Record<Exclude<PanelMaxWidth, false>, number> = {\n xs: 444,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n};\n\n/** The scrim's opacity behind each receding panel role. */\nconst BACKDROP_ALPHA_BY_ROLE: Partial<Record<ModalPanelRole, number>> = {\n secondary: 0.3,\n background: 0.1,\n};\n\nconst ANIMATION_BY_ROLE: Partial<Record<ModalPanelRole, string>> = {\n secondary: 'expandModal 300ms ease-in-out forwards',\n primary: 'contractModal 300ms ease-in-out forwards',\n};\n\n// Animation endpoints use the common lg width (60vw); the role styles set the\n// exact per-breakpoint width once the animation settles.\nconst KEYFRAMES: CSSObject = {\n '@keyframes expandModal': {\n from: { width: '60vw', transform: 'translateX(0)' },\n to: { width: '100vw', transform: 'translateX(0)' },\n },\n '@keyframes contractModal': {\n from: { width: '100vw', transform: 'translateX(0)' },\n to: { width: '60vw', transform: 'translateX(0)' },\n },\n};\n\nconst cap = (customMaxWidth?: PanelMaxWidth): number | null =>\n customMaxWidth ? MAX_WIDTH_PX[customMaxWidth] : null;\n\n/** One breakpoint's width: the viewport share, held under the optional px cap. */\nconst panelWidth = (theme: Theme, share: string, capPx: number | null): CSSObject =>\n capPx\n ? { width: `min(${share}, ${rem(theme, capPx)})`, maxWidth: rem(theme, capPx) }\n : { width: share, maxWidth: share };\n\nconst backdropStyles = (theme: Theme, modalRole?: ModalPanelRole): CSSObject => ({\n backgroundColor: scrim(theme, (modalRole && BACKDROP_ALPHA_BY_ROLE[modalRole]) ?? 0.5),\n backdropFilter: modalRole === 'primary' ? `blur(${rem(theme, 4)})` : 'none',\n});\n\n/**\n * The top panel is viewport-aware and narrows as the screen grows: full width on\n * mobile, 80vw on tablet/small desktop, 60vw on regular desktops (lg up —\n * including ~1080p/1440p/1080-wide), and 40vw only on ultra-wide screens\n * (≥2200px) so the receding panel stays visible on huge monitors. A `maxWidth`\n * prop, when given, caps it further.\n */\nconst primaryPanelStyles = (theme: Theme, capPx: number | null): CSSObject => ({\n [theme.breakpoints.down('sm')]: panelWidth(theme, '100%', capPx),\n [theme.breakpoints.between('sm', 'lg')]: panelWidth(theme, '80vw', capPx),\n [theme.breakpoints.up('lg')]: panelWidth(theme, '60vw', capPx),\n // A viewport width, in the theme's breakpoint unit like the three above.\n [theme.breakpoints.up(2200)]: panelWidth(theme, '40vw', capPx),\n});\n\n/** Panels below the top one expand to full width, producing the GTM stacking effect. */\nconst secondaryPanelStyles = (): CSSObject => ({\n width: '100vw !important',\n maxWidth: '100vw !important',\n right: '0 !important',\n top: '0 !important',\n ...dynamicViewportHeight('height', 'maxHeight'),\n borderRadius: '0 !important',\n opacity: 0.95,\n transform: 'scale(1)',\n});\n\nconst rolePanelStyles = (theme: Theme, role: ModalPanelRole | undefined, capPx: number | null): CSSObject => {\n if (role === 'primary') return primaryPanelStyles(theme, capPx);\n if (role === 'secondary') return secondaryPanelStyles();\n // Background modals stay mounted but hidden, for performance.\n if (role === 'background') return { display: 'none' };\n return {};\n};\n\nconst glassStyles = (theme: Theme, glass?: boolean, role?: ModalPanelRole): CSSObject =>\n glass && role === 'primary'\n ? {\n backgroundColor: alpha(theme.palette.background.paper, 0.85),\n backdropFilter: `blur(${rem(theme, 10)})`,\n WebkitBackdropFilter: `blur(${rem(theme, 10)})`,\n border: `1px solid ${alpha(theme.palette.divider, 0.18)}`,\n }\n : {};\n\nconst animationStyles = (isAnimating?: boolean, role?: ModalPanelRole): CSSObject =>\n isAnimating ? { animation: (role && ANIMATION_BY_ROLE[role]) ?? 'none' } : {};\n\nconst panelBaseStyles = (theme: Theme): CSSObject => ({\n margin: 0,\n position: 'fixed',\n right: 0,\n top: 0,\n // Pinned to the DYNAMIC viewport: on iOS a `100vh` panel runs underneath the\n // browser toolbar, which parks the tail of the scroll area (the submit row)\n // out of reach. See `dynamicViewportHeight`.\n ...dynamicViewportHeight('height', 'maxHeight'),\n borderRadius: 0,\n willChange: 'transform, width, border-radius',\n transition: theme.transitions.create(\n ['width', 'max-width', 'border-radius', 'transform', 'opacity'],\n { duration: 300, easing: theme.transitions.easing.easeInOut },\n ),\n});\n\nconst panelStyles = (theme: Theme, props: PanelStyleProps): CSSObject => {\n const capPx = cap(props.customMaxWidth);\n return {\n ...panelBaseStyles(theme),\n ...rolePanelStyles(theme, props.modalRole, capPx),\n ...glassStyles(theme, props.glass, props.modalRole),\n ...animationStyles(props.isAnimating, props.modalRole),\n };\n};\n\n/** The full rule set for the sliding panel's Dialog root. */\nexport const dialogRootStyles = (theme: Theme, props: PanelStyleProps): CSSObject => ({\n direction: props.rtl ? 'rtl' : 'ltr',\n '& .MuiBackdrop-root': backdropStyles(theme, props.modalRole),\n '& .MuiDialog-container': { alignItems: 'flex-start', justifyContent: 'flex-end' },\n '& .MuiDialog-paper': panelStyles(theme, props),\n ...KEYFRAMES,\n});\n\nexport const titleStyles = (theme: Theme, rtl?: boolean): CSSObject => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: theme.spacing(2, 2.5),\n borderBottom: `1px solid ${theme.palette.divider}`,\n direction: rtl ? 'rtl' : 'ltr',\n});\n\nexport const titleLeftStyles = (theme: Theme): CSSObject => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1.5),\n flex: 1,\n});\n\nexport const titleRightStyles = (theme: Theme): CSSObject => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n});\n\nexport const loadingOverlayStyles = (theme: Theme): CSSObject => ({\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: alpha(theme.palette.background.paper, 0.8),\n zIndex: 9999,\n});\n\nexport const modalContentStyles = (theme: Theme): CSSObject => ({\n padding: theme.spacing(3),\n // MUI's DialogContent defaults to `overflow-y: auto`, but inside a panel it is\n // NOT the element that scrolls — ModalBody above it is, and this box always\n // ends up exactly as tall as its own content. A scroll container that never\n // scrolls is still the containing block for every `position: sticky`\n // descendant, so a sticky header anchored here gets zero travel and rides the\n // content out of view: sticky, and pinned to nothing. Handing the overflow\n // back to ModalBody makes the panel's own scroller the anchor.\n overflowY: 'visible',\n});\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,aAAa;AAiBf,IAAM,mBAAmB,CAAC,aAAa,eAAe,SAAS,OAAO,gBAAgB;AAG7F,IAAM,eAA8D;AAAA,E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