@12-apps/ui 6.39.13 → 6.39.15
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/NATIVE.md +1 -1
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +7 -7
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +3 -3
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +3 -3
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +5 -5
- package/dist/_internal/components/feedback/Dialog/Dialog.js +2 -2
- package/dist/_internal/components/feedback/Dialog/Dialog.slots.js +10 -0
- package/dist/_internal/components/feedback/index.js +2 -2
- package/dist/_internal/components/index.js +7 -7
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +4 -4
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenuItem.js +1 -1
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +2 -2
- package/dist/_internal/components/navigation/index.js +7 -7
- package/dist/chunk-5HW37NSW.js +34 -0
- package/dist/chunk-5HW37NSW.js.map +1 -0
- package/dist/{chunk-INMKA5SF.js → chunk-ARDLCGBK.js} +3 -3
- package/dist/{chunk-VPRNKJHP.js → chunk-FBUCXTA4.js} +2 -2
- package/dist/{chunk-YHGOPZXW.js → chunk-FY6PONLA.js} +2 -2
- package/dist/{chunk-UEROWH53.js → chunk-GAMLBJE6.js} +58 -39
- package/dist/chunk-GAMLBJE6.js.map +1 -0
- package/dist/{chunk-3333KCAW.js → chunk-P22W4N5K.js} +2 -2
- package/dist/{chunk-IYF246UA.js → chunk-SA65SDOY.js} +2 -2
- package/dist/{chunk-ZNDDILNQ.js → chunk-UBEAJFMW.js} +3 -3
- package/dist/{chunk-DXZOSP6P.js → chunk-WVJGNIJZ.js} +2 -2
- package/dist/{chunk-ECIHOZPK.js → chunk-WWGD5YVW.js} +2 -2
- package/dist/{chunk-5OUEKIWQ.js → chunk-ZGWEFOW6.js} +4 -2
- package/dist/chunk-ZGWEFOW6.js.map +1 -0
- package/dist/{chunk-Y5UTYBZW.js → chunk-ZUME25DS.js} +3 -3
- package/dist/data-display/DataViews.js +7 -7
- package/dist/feedback/Dialog.js +2 -2
- package/dist/navigation/AppHeader.js +3 -3
- package/dist/navigation/NavigationMenu.js +4 -4
- package/dist/types/components/feedback/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/components/feedback/Dialog/Dialog.slots.d.ts +43 -0
- package/dist/types/components/feedback/Dialog/Dialog.slots.d.ts.map +1 -0
- package/dist/types/components/navigation/NavigationMenu/NavigationMenuItem.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/feedback/Dialog/Dialog.slots.ts +100 -0
- package/src/components/feedback/Dialog/Dialog.tsx +86 -34
- package/src/components/navigation/NavigationMenu/NavigationMenu.md +3 -1
- package/src/components/navigation/NavigationMenu/NavigationMenuItem.tsx +10 -1
- package/dist/_internal/components/feedback/Dialog/Dialog.paper.js +0 -8
- package/dist/chunk-5OUEKIWQ.js.map +0 -1
- package/dist/chunk-UEROWH53.js.map +0 -1
- package/dist/chunk-Y4O4DITI.js +0 -25
- package/dist/chunk-Y4O4DITI.js.map +0 -1
- package/dist/types/components/feedback/Dialog/Dialog.paper.d.ts +0 -31
- package/dist/types/components/feedback/Dialog/Dialog.paper.d.ts.map +0 -1
- package/src/components/feedback/Dialog/Dialog.paper.ts +0 -64
- /package/dist/_internal/components/feedback/Dialog/{Dialog.paper.js.map → Dialog.slots.js.map} +0 -0
- /package/dist/{chunk-INMKA5SF.js.map → chunk-ARDLCGBK.js.map} +0 -0
- /package/dist/{chunk-VPRNKJHP.js.map → chunk-FBUCXTA4.js.map} +0 -0
- /package/dist/{chunk-YHGOPZXW.js.map → chunk-FY6PONLA.js.map} +0 -0
- /package/dist/{chunk-3333KCAW.js.map → chunk-P22W4N5K.js.map} +0 -0
- /package/dist/{chunk-IYF246UA.js.map → chunk-SA65SDOY.js.map} +0 -0
- /package/dist/{chunk-ZNDDILNQ.js.map → chunk-UBEAJFMW.js.map} +0 -0
- /package/dist/{chunk-DXZOSP6P.js.map → chunk-WVJGNIJZ.js.map} +0 -0
- /package/dist/{chunk-ECIHOZPK.js.map → chunk-WWGD5YVW.js.map} +0 -0
- /package/dist/{chunk-Y5UTYBZW.js.map → chunk-ZUME25DS.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
Dialog,
|
|
6
6
|
DialogContent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GAMLBJE6.js";
|
|
8
8
|
import {
|
|
9
9
|
default as default2
|
|
10
10
|
} from "./chunk-WEBEOBN5.js";
|
|
@@ -69,4 +69,4 @@ function DeleteViewDialog({
|
|
|
69
69
|
export {
|
|
70
70
|
DeleteViewDialog
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-P22W4N5K.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
Dialog,
|
|
18
18
|
DialogContent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GAMLBJE6.js";
|
|
20
20
|
import {
|
|
21
21
|
default as default2
|
|
22
22
|
} from "./chunk-6DPAWXZ3.js";
|
|
@@ -268,4 +268,4 @@ function SaveViewModal({
|
|
|
268
268
|
export {
|
|
269
269
|
SaveViewModal
|
|
270
270
|
};
|
|
271
|
-
//# sourceMappingURL=chunk-
|
|
271
|
+
//# sourceMappingURL=chunk-SA65SDOY.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeleteViewDialog
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P22W4N5K.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsGrid
|
|
6
6
|
} from "./chunk-5WT4YWXC.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
ViewDialogs,
|
|
12
12
|
ViewMutationErrorAlert
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ARDLCGBK.js";
|
|
14
14
|
import {
|
|
15
15
|
useSavedViewsController
|
|
16
16
|
} from "./chunk-HR7YTBR7.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-UBEAJFMW.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-QXSV7Z57.js";
|
|
4
4
|
import {
|
|
5
5
|
Dialog
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GAMLBJE6.js";
|
|
7
7
|
import {
|
|
8
8
|
Button
|
|
9
9
|
} from "./chunk-HM2JJNUE.js";
|
|
@@ -166,4 +166,4 @@ AppHeaderDetails.displayName = "AppHeaderDetails";
|
|
|
166
166
|
export {
|
|
167
167
|
AppHeaderDetails
|
|
168
168
|
};
|
|
169
|
-
//# sourceMappingURL=chunk-
|
|
169
|
+
//# sourceMappingURL=chunk-WVJGNIJZ.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
Dialog,
|
|
9
9
|
DialogContent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GAMLBJE6.js";
|
|
11
11
|
import {
|
|
12
12
|
default as default2
|
|
13
13
|
} from "./chunk-6DPAWXZ3.js";
|
|
@@ -128,4 +128,4 @@ function ManageViewsDialog({
|
|
|
128
128
|
export {
|
|
129
129
|
ManageViewsDialog
|
|
130
130
|
};
|
|
131
|
-
//# sourceMappingURL=chunk-
|
|
131
|
+
//# sourceMappingURL=chunk-WWGD5YVW.js.map
|
|
@@ -32,6 +32,7 @@ import Popover from "@mui/material/Popover/index.js";
|
|
|
32
32
|
import { alpha, styled } from "@mui/material/styles/index.js";
|
|
33
33
|
import React from "react";
|
|
34
34
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
35
|
+
var hasBadge = (badge) => badge !== void 0 && badge !== null && badge !== "" && badge !== 0;
|
|
35
36
|
var StyledListItem = styled(ListItem, {
|
|
36
37
|
shouldForwardProp: (prop) => !["variant", "active", "size", "level"].includes(prop)
|
|
37
38
|
})(
|
|
@@ -130,10 +131,11 @@ var MenuItemLabel = ({ item, collapsed, open, hasChildren, size, variant }) => /
|
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
),
|
|
133
|
-
item.badge && /* @__PURE__ */ jsx(
|
|
134
|
+
hasBadge(item.badge) && /* @__PURE__ */ jsx(
|
|
134
135
|
Box,
|
|
135
136
|
{
|
|
136
137
|
component: "span",
|
|
138
|
+
"data-testid": `navigation-menu-badge-${item.id}`,
|
|
137
139
|
sx: {
|
|
138
140
|
flexShrink: 0,
|
|
139
141
|
display: "inline-flex",
|
|
@@ -311,4 +313,4 @@ var renderMenuItem = (item, variant = "vertical", size = "md", collapsed = false
|
|
|
311
313
|
export {
|
|
312
314
|
renderMenuItem
|
|
313
315
|
};
|
|
314
|
-
//# sourceMappingURL=chunk-
|
|
316
|
+
//# sourceMappingURL=chunk-ZGWEFOW6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/navigation/NavigationMenu/NavigationMenuItem.tsx"],"sourcesContent":["import ChevronRight from '@mui/icons-material/ChevronRight';\nimport ExpandMore from '@mui/icons-material/ExpandMore';\nimport Box from '@mui/material/Box/index.js';\nimport Collapse from '@mui/material/Collapse/index.js';\nimport Fade from '@mui/material/Fade/index.js';\nimport Grow from '@mui/material/Grow/index.js';\nimport List from '@mui/material/List/index.js';\nimport ListItem from '@mui/material/ListItem/index.js';\nimport ListItemButton from '@mui/material/ListItemButton/index.js';\nimport ListItemIcon from '@mui/material/ListItemIcon/index.js';\nimport ListItemText from '@mui/material/ListItemText/index.js';\nimport Popover from '@mui/material/Popover/index.js';\nimport { alpha, styled } from '@mui/material/styles/index.js';\nimport React, { } from 'react';\n\nimport { useMenuItemState } from './NavigationMenuItem.hooks';\nimport { navItemButtonStyles, pulseGlow } from './NavigationMenu.styles';\nimport type { NavigationMenuItem } from './NavigationMenu.types';\nimport { onMedia, shadowInk, uiInk } from '../../../tokens/ink';\nimport { rem, rems, sxRem } from '../../../tokens/relative';\n\n// A numeric or empty-string zero is treated the way the package's own Badge\n// treats a zero count by default (`Badge.helpers.ts`'s `showZero: false`):\n// hidden. `badge && …` prints a bare \"0\" text node for `badge: 0`, because\n// `0 && …` evaluates to the falsy `0` itself rather than `false`. A caller\n// who wants a visible zero passes the string `'0'`, which is truthy here.\nconst hasBadge = (badge: NavigationMenuItem['badge']): boolean =>\n badge !== undefined && badge !== null && badge !== '' && badge !== 0;\n\nconst StyledListItem = styled(ListItem, {\n shouldForwardProp: (prop) => !['variant', 'active', 'size', 'level'].includes(prop as string) })<{ variant?: string; active?: boolean; size?: string; level?: number }>(\n ({ theme, variant, level = 0 }) => ({\n padding: 0,\n ...(variant === 'horizontal' && {\n width: 'auto' }),\n ...(level > 0 && {\n paddingLeft: theme.spacing(2 * level) }) }),\n);\n\nconst StyledListItemButton = styled(ListItemButton, {\n shouldForwardProp: (prop) => !['variant', 'active', 'size', 'collapsed', 'minimal'].includes(prop as string) })<{ variant?: string; active?: boolean; size?: string; collapsed?: boolean; minimal?: boolean }>(\n ({ theme, variant, active, size, collapsed, minimal }) => ({\n ...navItemButtonStyles({ theme, variant, active, size, collapsed, minimal }) }),\n);\n\ninterface MenuItemRendererProps {\n item: NavigationMenuItem;\n variant: string;\n size: string;\n collapsed: boolean;\n minimal: boolean;\n level: number;\n onItemClick?: (item: NavigationMenuItem) => void;\n}\n\n// Hover intent and open/anchor state live in NavigationMenuItem.hooks.\n\n// The flyout a horizontal menu opens on hover.\nconst MenuItemPopover: React.FC<{\n anchorEl: HTMLElement | null;\n item: NavigationMenuItem;\n size?: string;\n minimal?: boolean;\n onClose: () => void;\n onMouseEnter: () => void;\n onMouseLeave: () => void;\n onItemClick?: (item: NavigationMenuItem) => void;\n}> = ({ anchorEl, item, size, minimal, onClose, onMouseEnter, onMouseLeave, onItemClick }) => (\n <Popover\n open={Boolean(anchorEl)}\n anchorEl={anchorEl}\n onClose={onClose}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'left' }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left' }}\n disableRestoreFocus\n sx={{\n pointerEvents: 'none' }}\n slotProps={{\n paper: {\n onMouseEnter,\n onMouseLeave,\n sx: {\n pointerEvents: 'auto',\n mt: 0.5,\n borderRadius: 2,\n boxShadow: (theme) => `0 ${rems(theme, 12, 40)} ${shadowInk(theme, 0.15)}`,\n border: (theme) => `1px solid ${alpha(theme.palette.divider, 0.1)}`,\n background: (theme) =>\n `linear-gradient(145deg, ${theme.palette.background.paper} 0%, ${alpha(theme.palette.background.default, 0.95)} 100%)`,\n backdropFilter: (theme) => `blur(${rem(theme, 10)})`,\n minWidth: sxRem(200) } } }}\n >\n <List sx={{ p: 1 }}>\n {item.children?.map((child) => {\n const childHasChildren = child.children && child.children.length > 0;\n\n // Only close popover when clicking leaf nodes (items without children)\n if (childHasChildren) {\n return renderMenuItem(child, 'vertical', size, false, minimal, 0, onItemClick);\n }\n\n // For leaf nodes, wrap with onClick to close the popover\n return (\n <Box\n key={child.id}\n onClick={onClose}\n >\n {renderMenuItem(child, 'vertical', size, false, minimal, 0, onItemClick)}\n </Box>\n );\n })}\n </List>\n </Popover>\n);\n\n// Label, badge/chip and the expand chevron, faded out when the rail collapses.\nconst MenuItemLabel: React.FC<{\n item: NavigationMenuItem;\n collapsed?: boolean;\n minimal?: boolean;\n open: boolean;\n hasChildren?: boolean;\n size?: string;\n variant?: string;\n}> = ({ item, collapsed, open, hasChildren, size, variant }) => (\n <Fade in={!collapsed} timeout={400}>\n <Box sx={{ display: 'flex', alignItems: 'center', width: '100%', gap: 1 }}>\n <ListItemText\n primary={item.label}\n secondary={item.description}\n sx={{\n flex: 1,\n minWidth: 0, // Allows text truncation if needed\n }}\n slotProps={{\n primary: {\n variant: size === 'sm' ? 'body2' : size === 'lg' ? 'h6' : 'body1',\n sx: {\n fontWeight: item.active ? 600 : 400,\n transition: 'all 0.3s ease' } },\n secondary: {\n sx: {\n opacity: 0.7,\n transition: 'all 0.3s ease' } } }}\n />\n {hasBadge(item.badge) && (\n <Box\n component=\"span\"\n data-testid={`navigation-menu-badge-${item.id}`}\n sx={{\n flexShrink: 0,\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n minWidth: sxRem(20),\n height: sxRem(20),\n px: 0.75,\n borderRadius: sxRem(10),\n fontSize: sxRem(12),\n fontWeight: 600,\n color: (theme) => onMedia(theme),\n background: (theme) =>\n `linear-gradient(135deg, ${uiInk(theme).attention.from} 0%, ${uiInk(theme).attention.to} 100%)`,\n boxShadow: (theme) => `0 ${rems(theme, 2, 8)} ${alpha(uiInk(theme).attention.glow, 0.4)}`,\n animation: (theme) =>\n typeof item.badge === 'number' && item.badge > 0\n ? `${pulseGlow(theme)} 2s infinite`\n : 'none' }}\n >\n {item.badge}\n </Box>\n )}\n {hasChildren && (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n flexShrink: 0, // Prevents expand icon from shrinking\n transition: 'transform 0.3s ease',\n transform: open ? 'rotate(180deg)' : 'rotate(0deg)' }}\n >\n {variant === 'horizontal' ? <ChevronRight fontSize=\"small\" /> : <ExpandMore />}\n </Box>\n )}\n </Box>\n </Fade>\n);\n\n// The row itself: icon, label, badge and the expand chevron.\nconst MenuItemContent: React.FC<{\n item: NavigationMenuItem;\n variant?: string;\n size?: string;\n active?: boolean;\n collapsed?: boolean;\n minimal?: boolean;\n level: number;\n open: boolean;\n hasChildren?: boolean;\n onClick: (event: React.MouseEvent<HTMLElement>) => void;\n onMouseEnter: (event: React.MouseEvent<HTMLElement>) => void;\n onMouseLeave: () => void;\n}> = ({\n item,\n variant,\n size,\n active: _active,\n collapsed,\n minimal,\n level,\n open,\n hasChildren,\n onClick,\n onMouseEnter,\n onMouseLeave }) => (\n<StyledListItem key={item.id} variant={variant} active={item.active} size={size} level={level}>\n <StyledListItemButton\n variant={variant}\n active={item.active}\n size={size}\n collapsed={collapsed}\n minimal={minimal}\n disabled={item.disabled}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n {...(item.href && !hasChildren\n ? {\n component: 'a' as React.ElementType,\n href: item.href,\n target: item.target }\n : {})}\n >\n {item.icon && (\n <ListItemIcon\n sx={{\n minWidth: collapsed ? 0 : sxRem(40),\n justifyContent: 'center',\n transition: 'all 0.3s ease',\n '& svg': {\n filter: (theme) => (item.active ? `drop-shadow(0 ${rems(theme, 2, 8)} ${shadowInk(theme, 0.15)})` : 'none'),\n transition: 'all 0.3s ease' } }}\n >\n <Grow in={true} timeout={600}>\n <Box>{item.icon}</Box>\n </Grow>\n </ListItemIcon>\n )}\n {!collapsed && (\n <MenuItemLabel\n item={item}\n collapsed={collapsed}\n minimal={minimal}\n open={open}\n hasChildren={hasChildren}\n size={size}\n variant={variant}\n />\n )}\n </StyledListItemButton>\n </StyledListItem>\n);\n\nconst MenuItemRenderer: React.FC<MenuItemRendererProps> = ({\n item,\n variant,\n size,\n collapsed,\n minimal,\n level,\n onItemClick }) => {\n const {\n open,\n anchorEl,\n hasChildren,\n handleClick,\n handleMouseEnter,\n handleMouseLeave,\n handlePopoverMouseEnter,\n handlePopoverMouseLeave,\n closePopover } = useMenuItemState({ item, variant, onItemClick });\n\n const itemContent = (\n <MenuItemContent\n item={item}\n variant={variant}\n size={size}\n active={item.active}\n collapsed={collapsed}\n minimal={minimal}\n level={level}\n open={open}\n hasChildren={hasChildren}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n />\n );\n\n // Horizontal variant with children - use Popover\n if (hasChildren && variant === 'horizontal') {\n return (\n <React.Fragment key={item.id}>\n {itemContent}\n <MenuItemPopover\n anchorEl={anchorEl}\n item={item}\n size={size}\n minimal={minimal}\n onClose={closePopover}\n onMouseEnter={handlePopoverMouseEnter}\n onMouseLeave={handlePopoverMouseLeave}\n onItemClick={onItemClick}\n />\n </React.Fragment>\n );\n }\n\n // Vertical variant with children - use Collapse\n if (hasChildren && variant !== 'horizontal') {\n return (\n <React.Fragment key={item.id}>\n {itemContent}\n {!collapsed && (\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <List component=\"div\" disablePadding>\n {item.children?.map((child) =>\n renderMenuItem(child, variant, size, collapsed, minimal, level + 1, onItemClick),\n )}\n </List>\n </Collapse>\n )}\n </React.Fragment>\n );\n }\n\n return itemContent;\n};\n\nexport const renderMenuItem = (\n item: NavigationMenuItem,\n variant: string = 'vertical',\n size: string = 'md',\n collapsed: boolean = false,\n minimal: boolean = false,\n level: number = 0,\n onItemClick?: (item: NavigationMenuItem) => void,\n): React.ReactNode => (\n <MenuItemRenderer\n key={item.id}\n item={item}\n variant={variant}\n size={size}\n collapsed={collapsed}\n minimal={minimal}\n level={level}\n onItemClick={onItemClick}\n />\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,kBAAkB;AACzB,OAAO,gBAAgB;AACvB,OAAO,SAAS;AAChB,OAAO,cAAc;AACrB,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,OAAO,oBAAoB;AAC3B,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,aAAa;AACpB,SAAS,OAAO,cAAc;AAC9B,OAAO,WAAiB;AA8Fd,cAuBN,YAvBM;AAjFV,IAAM,WAAW,CAAC,UAChB,UAAU,UAAa,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","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NavigationMegaSection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FY6PONLA.js";
|
|
4
4
|
import {
|
|
5
5
|
NavigationStandardBody
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FBUCXTA4.js";
|
|
7
7
|
import {
|
|
8
8
|
LogoBar,
|
|
9
9
|
NavigationShell
|
|
@@ -173,4 +173,4 @@ NavigationMenu.displayName = "NavigationMenu";
|
|
|
173
173
|
export {
|
|
174
174
|
NavigationMenu
|
|
175
175
|
};
|
|
176
|
-
//# sourceMappingURL=chunk-
|
|
176
|
+
//# sourceMappingURL=chunk-ZUME25DS.js.map
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "../chunk-I5T5PQQW.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsTableBase
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-UBEAJFMW.js";
|
|
7
|
+
import "../chunk-P22W4N5K.js";
|
|
8
8
|
import {
|
|
9
9
|
DataViewsGrid
|
|
10
10
|
} from "../chunk-5WT4YWXC.js";
|
|
@@ -68,9 +68,9 @@ import {
|
|
|
68
68
|
cardScaleForZoom
|
|
69
69
|
} from "../chunk-XZJM6EPC.js";
|
|
70
70
|
import "../chunk-M4KVKQRN.js";
|
|
71
|
-
import "../chunk-
|
|
72
|
-
import "../chunk-
|
|
73
|
-
import "../chunk-
|
|
71
|
+
import "../chunk-ARDLCGBK.js";
|
|
72
|
+
import "../chunk-SA65SDOY.js";
|
|
73
|
+
import "../chunk-WWGD5YVW.js";
|
|
74
74
|
import "../chunk-5M4TYFR3.js";
|
|
75
75
|
import "../chunk-HR7YTBR7.js";
|
|
76
76
|
import "../chunk-DZEC6RFM.js";
|
|
@@ -164,9 +164,9 @@ import "../chunk-FWPFCK4D.js";
|
|
|
164
164
|
import "../chunk-BJZOBG24.js";
|
|
165
165
|
import "../chunk-EMYESBIT.js";
|
|
166
166
|
import "../chunk-KFJKOVDD.js";
|
|
167
|
-
import "../chunk-
|
|
167
|
+
import "../chunk-GAMLBJE6.js";
|
|
168
168
|
import "../chunk-2WU52FLP.js";
|
|
169
|
-
import "../chunk-
|
|
169
|
+
import "../chunk-5HW37NSW.js";
|
|
170
170
|
import "../chunk-GVGJMH77.js";
|
|
171
171
|
import "../chunk-GYXUCS37.js";
|
|
172
172
|
import "../chunk-CN46HGXE.js";
|
package/dist/feedback/Dialog.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
DialogActions,
|
|
5
5
|
DialogContent,
|
|
6
6
|
DialogHeader
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-GAMLBJE6.js";
|
|
8
8
|
import "../chunk-2WU52FLP.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-5HW37NSW.js";
|
|
10
10
|
import "../chunk-GVGJMH77.js";
|
|
11
11
|
import "../chunk-GYXUCS37.js";
|
|
12
12
|
import "../chunk-TYJR4GOF.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "../chunk-IQU4HKND.js";
|
|
18
18
|
import {
|
|
19
19
|
AppHeaderDetails
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-WVJGNIJZ.js";
|
|
21
21
|
import "../chunk-QXSV7Z57.js";
|
|
22
22
|
import "../chunk-3U3H3BZM.js";
|
|
23
23
|
import "../chunk-EJYJLVPK.js";
|
|
@@ -25,9 +25,9 @@ import "../chunk-FPVYD7BO.js";
|
|
|
25
25
|
import "../chunk-LYVTJLCF.js";
|
|
26
26
|
import "../chunk-CRN4KKNI.js";
|
|
27
27
|
import "../chunk-IM4DMKH4.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-GAMLBJE6.js";
|
|
29
29
|
import "../chunk-2WU52FLP.js";
|
|
30
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-5HW37NSW.js";
|
|
31
31
|
import "../chunk-GVGJMH77.js";
|
|
32
32
|
import "../chunk-GYXUCS37.js";
|
|
33
33
|
import "../chunk-HM2JJNUE.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../chunk-I53WONUS.js";
|
|
2
2
|
import {
|
|
3
3
|
NavigationMenu
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-ZUME25DS.js";
|
|
5
|
+
import "../chunk-FY6PONLA.js";
|
|
6
|
+
import "../chunk-FBUCXTA4.js";
|
|
7
7
|
import "../chunk-L5RQIQIP.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-ZGWEFOW6.js";
|
|
9
9
|
import "../chunk-3L5OZCGA.js";
|
|
10
10
|
import "../chunk-3AIRFAI3.js";
|
|
11
11
|
import "../chunk-FQ6UW7IY.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/Dialog/Dialog.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACZ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/Dialog/Dialog.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAwIxB,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAoExC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqEpD,CAAC;AA0BF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAsBpD,CAAC;AAEJ,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6BtD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material/styles/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* A caller's slot props, MERGED over the Dialog's own rather than replacing
|
|
4
|
+
* them — for the paper (FUT-2613) and the backdrop (FUT-2672).
|
|
5
|
+
*
|
|
6
|
+
* MUI reaches each slot through two props, and both used to replace ours
|
|
7
|
+
* whole: the deprecated `PaperProps`/`BackdropProps` (spread after ours) and
|
|
8
|
+
* `slotProps.paper`/`slotProps.backdrop` (which MUI itself puts over the
|
|
9
|
+
* deprecated one). A caller asking for one class, or one `sx` tweak, lost the
|
|
10
|
+
* variant's radius, width, background and the paper's test id with it — or,
|
|
11
|
+
* on the backdrop, the scrim and the `glass` blur.
|
|
12
|
+
*
|
|
13
|
+
* Only the keys the merge reads are typed here; every other key the caller
|
|
14
|
+
* passed rides the spread through untouched.
|
|
15
|
+
*/
|
|
16
|
+
interface SlotValue {
|
|
17
|
+
sx?: SxProps<Theme>;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
interface PaperSlotValue extends SlotValue {
|
|
21
|
+
'data-testid'?: string;
|
|
22
|
+
}
|
|
23
|
+
/** A slot as MUI takes it: an object, or a function of the owner state. */
|
|
24
|
+
type Slot<V, O> = V | ((ownerState: O) => V);
|
|
25
|
+
/**
|
|
26
|
+
* The paper slot: the variant's `look`, then `PaperProps`, then
|
|
27
|
+
* `slotProps.paper`.
|
|
28
|
+
*
|
|
29
|
+
* `testId` names the paper unless the caller's props name it; the drawer passes
|
|
30
|
+
* none, because its id already sits on the Drawer root.
|
|
31
|
+
*/
|
|
32
|
+
export declare function mergedPaperSlot<O>(look: SxProps<Theme>, testId: string | undefined, legacy: PaperSlotValue | undefined, slot: Slot<PaperSlotValue, O> | undefined): Slot<PaperSlotValue, O>;
|
|
33
|
+
/**
|
|
34
|
+
* The backdrop slot: the scrim (`backdropSxOf`), then `BackdropProps`, then
|
|
35
|
+
* `slotProps.backdrop`. Both renderers need it: MUI's `Dialog` would replace
|
|
36
|
+
* our backdrop props with a caller's, and MUI's `Drawer` takes
|
|
37
|
+
* `slotProps.backdrop` INSTEAD of `BackdropProps` whenever it is given — so
|
|
38
|
+
* once the scrim rides `slotProps.backdrop`, a caller's `BackdropProps` would
|
|
39
|
+
* silently drop unless it is folded in here.
|
|
40
|
+
*/
|
|
41
|
+
export declare function mergedBackdropSlot<O>(look: SxProps<Theme>, legacy: SlotValue | undefined, slot: Slot<SlotValue, O> | undefined): Slot<SlotValue, O>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=Dialog.slots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.slots.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/Dialog/Dialog.slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,UAAU,SAAS;IACjB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,cAAe,SAAQ,SAAS;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2EAA2E;AAC3E,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAuC7C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,EACpB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,EAAE,cAAc,GAAG,SAAS,EAClC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,GAAG,SAAS,GACxC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAMzB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,EACpB,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,SAAS,GACnC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAEpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/navigation/NavigationMenu/NavigationMenuItem.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAW,MAAM,OAAO,CAAC;AAIhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"NavigationMenuItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/navigation/NavigationMenu/NavigationMenuItem.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAW,MAAM,OAAO,CAAC;AAIhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAsUjE,eAAO,MAAM,cAAc,GACzB,MAAM,kBAAkB,EACxB,UAAS,MAAmB,EAC5B,OAAM,MAAa,EACnB,YAAW,OAAe,EAC1B,UAAS,OAAe,EACxB,QAAO,MAAU,EACjB,cAAc,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,KAC/C,KAAK,CAAC,SAWN,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material/styles/index.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A caller's slot props, MERGED over the Dialog's own rather than replacing
|
|
5
|
+
* them — for the paper (FUT-2613) and the backdrop (FUT-2672).
|
|
6
|
+
*
|
|
7
|
+
* MUI reaches each slot through two props, and both used to replace ours
|
|
8
|
+
* whole: the deprecated `PaperProps`/`BackdropProps` (spread after ours) and
|
|
9
|
+
* `slotProps.paper`/`slotProps.backdrop` (which MUI itself puts over the
|
|
10
|
+
* deprecated one). A caller asking for one class, or one `sx` tweak, lost the
|
|
11
|
+
* variant's radius, width, background and the paper's test id with it — or,
|
|
12
|
+
* on the backdrop, the scrim and the `glass` blur.
|
|
13
|
+
*
|
|
14
|
+
* Only the keys the merge reads are typed here; every other key the caller
|
|
15
|
+
* passed rides the spread through untouched.
|
|
16
|
+
*/
|
|
17
|
+
interface SlotValue {
|
|
18
|
+
sx?: SxProps<Theme>;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface PaperSlotValue extends SlotValue {
|
|
23
|
+
'data-testid'?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** A slot as MUI takes it: an object, or a function of the owner state. */
|
|
27
|
+
type Slot<V, O> = V | ((ownerState: O) => V);
|
|
28
|
+
|
|
29
|
+
/** Our look first, then whatever `sx` the caller adds — so the caller's escape hatch still wins. */
|
|
30
|
+
function sxList(caller: SxProps<Theme> | undefined): readonly unknown[] {
|
|
31
|
+
if (caller === undefined) return [];
|
|
32
|
+
return Array.isArray(caller) ? caller : [caller];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function mergeOver<V extends SlotValue>(
|
|
36
|
+
look: SxProps<Theme>,
|
|
37
|
+
legacy: V | undefined,
|
|
38
|
+
slot: V | undefined,
|
|
39
|
+
): V {
|
|
40
|
+
// MUI's own order: `slotProps.<slot>` over the deprecated `<Slot>Props`.
|
|
41
|
+
return {
|
|
42
|
+
...legacy,
|
|
43
|
+
...slot,
|
|
44
|
+
sx: [look, ...sxList(legacy?.sx), ...sxList(slot?.sx)] as SxProps<Theme>,
|
|
45
|
+
} as V;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The one slot to hand MUI: the Dialog's `look`, then the deprecated prop,
|
|
50
|
+
* then `slotProps.<slot>`, each value passed through `finish`. A function slot
|
|
51
|
+
* stays a function, so MUI still calls it with its owner state and its result
|
|
52
|
+
* merges the same way.
|
|
53
|
+
*/
|
|
54
|
+
function mergedSlot<V extends SlotValue, O>(
|
|
55
|
+
look: SxProps<Theme>,
|
|
56
|
+
legacy: V | undefined,
|
|
57
|
+
slot: Slot<V, O> | undefined,
|
|
58
|
+
finish: (merged: V) => V = (merged) => merged,
|
|
59
|
+
): Slot<V, O> {
|
|
60
|
+
if (typeof slot === 'function') {
|
|
61
|
+
return (ownerState: O) => finish(mergeOver(look, legacy, slot(ownerState)));
|
|
62
|
+
}
|
|
63
|
+
return finish(mergeOver(look, legacy, slot));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The paper slot: the variant's `look`, then `PaperProps`, then
|
|
68
|
+
* `slotProps.paper`.
|
|
69
|
+
*
|
|
70
|
+
* `testId` names the paper unless the caller's props name it; the drawer passes
|
|
71
|
+
* none, because its id already sits on the Drawer root.
|
|
72
|
+
*/
|
|
73
|
+
export function mergedPaperSlot<O>(
|
|
74
|
+
look: SxProps<Theme>,
|
|
75
|
+
testId: string | undefined,
|
|
76
|
+
legacy: PaperSlotValue | undefined,
|
|
77
|
+
slot: Slot<PaperSlotValue, O> | undefined,
|
|
78
|
+
): Slot<PaperSlotValue, O> {
|
|
79
|
+
return mergedSlot(look, legacy, slot, (merged) => ({
|
|
80
|
+
...merged,
|
|
81
|
+
// A key the caller set to `undefined` does not erase the dialog's id.
|
|
82
|
+
'data-testid': merged['data-testid'] ?? testId,
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The backdrop slot: the scrim (`backdropSxOf`), then `BackdropProps`, then
|
|
88
|
+
* `slotProps.backdrop`. Both renderers need it: MUI's `Dialog` would replace
|
|
89
|
+
* our backdrop props with a caller's, and MUI's `Drawer` takes
|
|
90
|
+
* `slotProps.backdrop` INSTEAD of `BackdropProps` whenever it is given — so
|
|
91
|
+
* once the scrim rides `slotProps.backdrop`, a caller's `BackdropProps` would
|
|
92
|
+
* silently drop unless it is folded in here.
|
|
93
|
+
*/
|
|
94
|
+
export function mergedBackdropSlot<O>(
|
|
95
|
+
look: SxProps<Theme>,
|
|
96
|
+
legacy: SlotValue | undefined,
|
|
97
|
+
slot: Slot<SlotValue, O> | undefined,
|
|
98
|
+
): Slot<SlotValue, O> {
|
|
99
|
+
return mergedSlot(look, legacy, slot);
|
|
100
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import CloseIcon from '@mui/icons-material/Close';
|
|
2
2
|
import Backdrop from '@mui/material/Backdrop/index.js';
|
|
3
3
|
import Box from '@mui/material/Box/index.js';
|
|
4
|
-
import MuiDialog from '@mui/material/Dialog/index.js';
|
|
4
|
+
import MuiDialog, { type DialogProps as MuiDialogProps } from '@mui/material/Dialog/index.js';
|
|
5
5
|
import MuiDialogActions from '@mui/material/DialogActions/index.js';
|
|
6
6
|
import MuiDialogContent from '@mui/material/DialogContent/index.js';
|
|
7
7
|
import MuiDialogTitle from '@mui/material/DialogTitle/index.js';
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
DIALOG_TITLE,
|
|
21
21
|
DIALOG_TITLED_BODY_PADDING_TOP_UNITS,
|
|
22
22
|
} from './Dialog.metrics';
|
|
23
|
-
import { mergedPaperSlot } from './Dialog.
|
|
23
|
+
import { mergedBackdropSlot, mergedPaperSlot } from './Dialog.slots';
|
|
24
24
|
import { backdropSxOf, variantStylesOf } from './Dialog.styles';
|
|
25
25
|
import { childTestId, resolveTestId, slotTestId, withoutTestIdProps } from '../../../platform/test-id';
|
|
26
26
|
import type {
|
|
@@ -75,30 +75,89 @@ function bodyOf(children: React.ReactNode, hasTitle: boolean): React.ReactNode {
|
|
|
75
75
|
return <Box sx={{ ...BODY_SX, pt }}>{children}</Box>;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* MUI's `onClose` for either renderer: a `persistent` dialog swallows the
|
|
80
|
+
* backdrop press and Escape, and the caller's `onClose` is called with no
|
|
81
|
+
* arguments, as `Dialog.base.ts` promises. The drawer used to get the caller's
|
|
82
|
+
* raw `onClose` — so it closed when `persistent` said it must not, and was
|
|
83
|
+
* handed MUI's `(event, reason)` (FUT-2673).
|
|
84
|
+
*/
|
|
85
|
+
function closeHandlerOf(persistent: boolean, onClose: (() => void) | undefined) {
|
|
86
|
+
return (_event: object, reason: 'backdropClick' | 'escapeKeyDown') => {
|
|
87
|
+
if (persistent && (reason === 'backdropClick' || reason === 'escapeKeyDown')) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
onClose?.();
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** The looks the Dialog lays under a caller's paper and backdrop props. */
|
|
95
|
+
interface DialogLooks {
|
|
96
|
+
paperSx: SxProps<Theme>;
|
|
97
|
+
backdropSx: SxProps<Theme>;
|
|
98
|
+
testId: string | undefined;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** What either renderer below takes: the looks, and the dialog's own children. */
|
|
102
|
+
type RendererProps = DialogLooks & { children: React.ReactNode };
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Every variant but the drawer: MUI's `Dialog`. The scrim reaches MUI through
|
|
106
|
+
* `slotProps.backdrop`, not the deprecated `BackdropProps`, and a caller's
|
|
107
|
+
* backdrop props from either spelling merge over it rather than replacing it
|
|
108
|
+
* (FUT-2672) — as their paper props merge over the variant's look (FUT-2613).
|
|
109
|
+
*/
|
|
110
|
+
function ModalDialog({
|
|
111
|
+
paperSx,
|
|
112
|
+
backdropSx,
|
|
113
|
+
testId,
|
|
114
|
+
dialogProps,
|
|
115
|
+
children,
|
|
116
|
+
}: RendererProps & { dialogProps: MuiDialogProps }) {
|
|
117
|
+
const { PaperProps: callerPaper, BackdropProps: callerBackdrop, slotProps, ...rest } = dialogProps;
|
|
118
|
+
return (
|
|
119
|
+
<MuiDialog
|
|
120
|
+
{...rest}
|
|
121
|
+
slotProps={{
|
|
122
|
+
...slotProps,
|
|
123
|
+
paper: mergedPaperSlot(paperSx, testId, callerPaper, slotProps?.paper),
|
|
124
|
+
backdrop: mergedBackdropSlot(backdropSx, callerBackdrop, slotProps?.backdrop),
|
|
125
|
+
}}
|
|
126
|
+
>
|
|
127
|
+
{children}
|
|
128
|
+
</MuiDialog>
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
78
132
|
/**
|
|
79
133
|
* The drawer variant: MUI's `Drawer`, with the variant's look on the Drawer's
|
|
80
134
|
* OWN paper — on an inner Box it left the paper 0px wide and clipped the panel —
|
|
81
135
|
* and a caller's paper props merged over it rather than replacing it. The
|
|
82
136
|
* test id stays on the Drawer root, so the paper carries none of its own.
|
|
137
|
+
*
|
|
138
|
+
* The scrim rides the drawer's backdrop exactly as it rides the dialog's, so
|
|
139
|
+
* `glass` blurs it here too; the paper does not frost (FUT-2673). MUI's
|
|
140
|
+
* `Drawer` does not merge `BackdropProps` into `slotProps.backdrop` — it takes
|
|
141
|
+
* one or the other — so both are folded into the one slot here.
|
|
83
142
|
*/
|
|
84
143
|
function DrawerDialog({
|
|
85
144
|
paperSx,
|
|
145
|
+
backdropSx,
|
|
86
146
|
testId,
|
|
87
147
|
drawerProps,
|
|
88
148
|
children,
|
|
89
|
-
}: {
|
|
90
|
-
|
|
91
|
-
testId: string | undefined;
|
|
92
|
-
drawerProps: DrawerProps;
|
|
93
|
-
children: React.ReactNode;
|
|
94
|
-
}) {
|
|
95
|
-
const { PaperProps: callerPaper, slotProps, ...rest } = drawerProps;
|
|
149
|
+
}: RendererProps & { drawerProps: DrawerProps }) {
|
|
150
|
+
const { PaperProps: callerPaper, BackdropProps: callerBackdrop, slotProps, ...rest } = drawerProps;
|
|
96
151
|
return (
|
|
97
152
|
<Drawer
|
|
98
153
|
anchor="right"
|
|
99
154
|
data-testid={testId}
|
|
100
155
|
{...rest}
|
|
101
|
-
slotProps={{
|
|
156
|
+
slotProps={{
|
|
157
|
+
...slotProps,
|
|
158
|
+
paper: mergedPaperSlot(paperSx, undefined, callerPaper, slotProps?.paper),
|
|
159
|
+
backdrop: mergedBackdropSlot(backdropSx, callerBackdrop, slotProps?.backdrop),
|
|
160
|
+
}}
|
|
102
161
|
>
|
|
103
162
|
{children}
|
|
104
163
|
</Drawer>
|
|
@@ -130,17 +189,13 @@ export const Dialog: React.FC<DialogProps> = (rawProps) => {
|
|
|
130
189
|
// Native's name for it and is not a DOM attribute. The native `Dialog` does
|
|
131
190
|
// the same in reverse.
|
|
132
191
|
const testId = resolveTestId(others, 'dialog');
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
variant, size, borderRadius, glass, gradient, glow, pulse,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const handleClose = (event: object, reason: 'backdropClick' | 'escapeKeyDown') => {
|
|
139
|
-
if (persistent && (reason === 'backdropClick' || reason === 'escapeKeyDown')) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
onClose?.();
|
|
192
|
+
const props = withoutTestIdProps(others);
|
|
193
|
+
const looks: DialogLooks = {
|
|
194
|
+
paperSx: variantStylesOf(theme, { variant, size, borderRadius, glass, gradient, glow, pulse }),
|
|
195
|
+
backdropSx: backdropSxOf(theme, glass),
|
|
196
|
+
testId,
|
|
143
197
|
};
|
|
198
|
+
const handleClose = closeHandlerOf(persistent, onClose);
|
|
144
199
|
|
|
145
200
|
const header = title ? (
|
|
146
201
|
<DialogHeader
|
|
@@ -155,11 +210,7 @@ export const Dialog: React.FC<DialogProps> = (rawProps) => {
|
|
|
155
210
|
|
|
156
211
|
if (variant === 'drawer') {
|
|
157
212
|
return (
|
|
158
|
-
<DrawerDialog
|
|
159
|
-
paperSx={paperSx}
|
|
160
|
-
testId={testId}
|
|
161
|
-
drawerProps={{ ...props, PaperProps: callerPaper, slotProps, open, onClose }}
|
|
162
|
-
>
|
|
213
|
+
<DrawerDialog {...looks} drawerProps={{ ...props, open, onClose: handleClose }}>
|
|
163
214
|
{header}
|
|
164
215
|
{body}
|
|
165
216
|
</DrawerDialog>
|
|
@@ -167,18 +218,19 @@ export const Dialog: React.FC<DialogProps> = (rawProps) => {
|
|
|
167
218
|
}
|
|
168
219
|
|
|
169
220
|
return (
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
221
|
+
<ModalDialog
|
|
222
|
+
{...looks}
|
|
223
|
+
dialogProps={{
|
|
224
|
+
open,
|
|
225
|
+
onClose: handleClose,
|
|
226
|
+
fullScreen: variant === 'fullscreen',
|
|
227
|
+
BackdropComponent: backdrop ? Backdrop : undefined,
|
|
228
|
+
...props,
|
|
229
|
+
}}
|
|
178
230
|
>
|
|
179
231
|
{header}
|
|
180
232
|
{body}
|
|
181
|
-
</
|
|
233
|
+
</ModalDialog>
|
|
182
234
|
);
|
|
183
235
|
};
|
|
184
236
|
|
|
@@ -44,7 +44,7 @@ A flexible and feature-rich navigation menu component that supports horizontal,
|
|
|
44
44
|
| active | `boolean` | false | Whether the item is currently active |
|
|
45
45
|
| disabled | `boolean` | false | Whether the item is disabled |
|
|
46
46
|
| onClick | `(event: React.MouseEvent) => void` | undefined | Click handler for the menu item |
|
|
47
|
-
| badge | `number \| string` | undefined | Badge/notification count
|
|
47
|
+
| badge | `number \| string` | undefined | Badge/notification count. A numeric or empty-string `0` renders nothing — pass the string `'0'` for a visible zero. |
|
|
48
48
|
| children | `NavigationMenuItem[]` | undefined | Nested items for submenu |
|
|
49
49
|
| description | `string` | undefined | Description text for the item |
|
|
50
50
|
| showChevron | `boolean` | false | Whether to show a chevron for submenu |
|
|
@@ -392,6 +392,8 @@ const itemsWithBadges = [
|
|
|
392
392
|
- Supports both numeric and string badges
|
|
393
393
|
- Animated pulse effect for numeric badges
|
|
394
394
|
- Gradient background with shadow for visual prominence
|
|
395
|
+
- A zero count is hidden, the same way `Badge`'s `showZero: false` default hides
|
|
396
|
+
it: `badge: 0` renders no pill. Pass the string `'0'` to show a literal zero.
|
|
395
397
|
|
|
396
398
|
### Icon Hover Animations
|
|
397
399
|
|