@12-apps/ui 6.74.2 → 6.75.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/index.js +4 -4
- package/dist/_internal/components/layout/Drawer/Drawer.js +1 -1
- package/dist/_internal/components/layout/index.js +1 -1
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +2 -2
- package/dist/_internal/components/navigation/index.js +4 -4
- package/dist/{chunk-27F2VXS4.js → chunk-7IXXASQ6.js} +2 -2
- package/dist/{chunk-UALPKKAY.js → chunk-F742IMLQ.js} +5 -2
- package/dist/{chunk-UALPKKAY.js.map → chunk-F742IMLQ.js.map} +1 -1
- package/dist/{chunk-NM46HQSW.js → chunk-J26ZWYQI.js} +2 -2
- package/dist/{chunk-URSYEHPU.js → chunk-PMRLFNBT.js} +2 -2
- package/dist/layout/Drawer.js +1 -1
- package/dist/navigation/SectionNav.js +4 -4
- package/dist/types/components/layout/Drawer/Drawer.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/layout/Drawer/Drawer.tsx +4 -1
- /package/dist/{chunk-27F2VXS4.js.map → chunk-7IXXASQ6.js.map} +0 -0
- /package/dist/{chunk-NM46HQSW.js.map → chunk-J26ZWYQI.js.map} +0 -0
- /package/dist/{chunk-URSYEHPU.js.map → chunk-PMRLFNBT.js.map} +0 -0
|
@@ -130,13 +130,13 @@ import "../../chunk-3AIRFAI3.js";
|
|
|
130
130
|
import "../../chunk-R26KYJHK.js";
|
|
131
131
|
import {
|
|
132
132
|
SectionNav
|
|
133
|
-
} from "../../chunk-
|
|
133
|
+
} from "../../chunk-7IXXASQ6.js";
|
|
134
134
|
import "../../chunk-SNWCT6JN.js";
|
|
135
135
|
import "../../chunk-ILJ3FXIC.js";
|
|
136
136
|
import {
|
|
137
137
|
sectionNavBarInset
|
|
138
|
-
} from "../../chunk-
|
|
139
|
-
import "../../chunk-
|
|
138
|
+
} from "../../chunk-PMRLFNBT.js";
|
|
139
|
+
import "../../chunk-J26ZWYQI.js";
|
|
140
140
|
import {
|
|
141
141
|
RaisedActionButton
|
|
142
142
|
} from "../../chunk-UKUGSU3Y.js";
|
|
@@ -201,7 +201,7 @@ import {
|
|
|
201
201
|
Drawer,
|
|
202
202
|
DrawerContent,
|
|
203
203
|
DrawerHeader
|
|
204
|
-
} from "../../chunk-
|
|
204
|
+
} from "../../chunk-F742IMLQ.js";
|
|
205
205
|
import "../../chunk-ENORM6S2.js";
|
|
206
206
|
import {
|
|
207
207
|
Resizable
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
SectionNavBar,
|
|
3
3
|
sectionNavBarInset,
|
|
4
4
|
sectionNavSheetOffset
|
|
5
|
-
} from "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
5
|
+
} from "../../../../chunk-PMRLFNBT.js";
|
|
6
|
+
import "../../../../chunk-J26ZWYQI.js";
|
|
7
7
|
import "../../../../chunk-UKUGSU3Y.js";
|
|
8
8
|
import "../../../../chunk-24HHUCWB.js";
|
|
9
9
|
import "../../../../chunk-YCCWJ5XQ.js";
|
|
10
10
|
import "../../../../chunk-TMSWLFL4.js";
|
|
11
|
-
import "../../../../chunk-
|
|
11
|
+
import "../../../../chunk-F742IMLQ.js";
|
|
12
12
|
import "../../../../chunk-PUFA7FQ7.js";
|
|
13
13
|
import "../../../../chunk-5AK2EZG5.js";
|
|
14
14
|
import "../../../../chunk-N5PVD4J5.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SectionNav
|
|
3
|
-
} from "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-7IXXASQ6.js";
|
|
4
4
|
import "../../../../chunk-SNWCT6JN.js";
|
|
5
5
|
import "../../../../chunk-ILJ3FXIC.js";
|
|
6
|
-
import "../../../../chunk-
|
|
7
|
-
import "../../../../chunk-
|
|
6
|
+
import "../../../../chunk-PMRLFNBT.js";
|
|
7
|
+
import "../../../../chunk-J26ZWYQI.js";
|
|
8
8
|
import "../../../../chunk-UKUGSU3Y.js";
|
|
9
9
|
import "../../../../chunk-24HHUCWB.js";
|
|
10
10
|
import "../../../../chunk-YCCWJ5XQ.js";
|
|
11
11
|
import "../../../../chunk-TMSWLFL4.js";
|
|
12
|
-
import "../../../../chunk-
|
|
12
|
+
import "../../../../chunk-F742IMLQ.js";
|
|
13
13
|
import "../../../../chunk-PUFA7FQ7.js";
|
|
14
14
|
import "../../../../chunk-5AK2EZG5.js";
|
|
15
15
|
import "../../../../chunk-N5PVD4J5.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SectionNavSheet
|
|
3
|
-
} from "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-J26ZWYQI.js";
|
|
4
4
|
import "../../../../chunk-24HHUCWB.js";
|
|
5
5
|
import "../../../../chunk-YCCWJ5XQ.js";
|
|
6
6
|
import "../../../../chunk-TMSWLFL4.js";
|
|
7
|
-
import "../../../../chunk-
|
|
7
|
+
import "../../../../chunk-F742IMLQ.js";
|
|
8
8
|
import "../../../../chunk-PUFA7FQ7.js";
|
|
9
9
|
import "../../../../chunk-5AK2EZG5.js";
|
|
10
10
|
import "../../../../chunk-N5PVD4J5.js";
|
|
@@ -54,20 +54,20 @@ import "../../../chunk-3AIRFAI3.js";
|
|
|
54
54
|
import "../../../chunk-R26KYJHK.js";
|
|
55
55
|
import {
|
|
56
56
|
SectionNav
|
|
57
|
-
} from "../../../chunk-
|
|
57
|
+
} from "../../../chunk-7IXXASQ6.js";
|
|
58
58
|
import "../../../chunk-SNWCT6JN.js";
|
|
59
59
|
import "../../../chunk-ILJ3FXIC.js";
|
|
60
60
|
import {
|
|
61
61
|
sectionNavBarInset
|
|
62
|
-
} from "../../../chunk-
|
|
63
|
-
import "../../../chunk-
|
|
62
|
+
} from "../../../chunk-PMRLFNBT.js";
|
|
63
|
+
import "../../../chunk-J26ZWYQI.js";
|
|
64
64
|
import {
|
|
65
65
|
RaisedActionButton
|
|
66
66
|
} from "../../../chunk-UKUGSU3Y.js";
|
|
67
67
|
import "../../../chunk-24HHUCWB.js";
|
|
68
68
|
import "../../../chunk-YCCWJ5XQ.js";
|
|
69
69
|
import "../../../chunk-TMSWLFL4.js";
|
|
70
|
-
import "../../../chunk-
|
|
70
|
+
import "../../../chunk-F742IMLQ.js";
|
|
71
71
|
import "../../../chunk-7K23NEZO.js";
|
|
72
72
|
import "../../../chunk-5MMAV7XK.js";
|
|
73
73
|
import "../../../chunk-3ROCD7XF.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-SNWCT6JN.js";
|
|
4
4
|
import {
|
|
5
5
|
SectionNavBar
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PMRLFNBT.js";
|
|
7
7
|
|
|
8
8
|
// src/components/navigation/SectionNav/SectionNav.tsx
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -55,4 +55,4 @@ function SectionNav({
|
|
|
55
55
|
export {
|
|
56
56
|
SectionNav
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-7IXXASQ6.js.map
|
|
@@ -122,7 +122,10 @@ var DrawerHeader = ({
|
|
|
122
122
|
sx: {
|
|
123
123
|
display: "flex",
|
|
124
124
|
alignItems: "center",
|
|
125
|
-
|
|
125
|
+
// 12px above and below: the close button is 40px tall, so the header lands on
|
|
126
|
+
// its own 64px minimum instead of 72 — the height of the page header beside
|
|
127
|
+
// a docked drawer (FUT-3476).
|
|
128
|
+
padding: theme.spacing(1.5, 2),
|
|
126
129
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
127
130
|
minHeight: rem(theme, 64),
|
|
128
131
|
justifyContent: "space-between"
|
|
@@ -164,4 +167,4 @@ export {
|
|
|
164
167
|
DrawerHeader,
|
|
165
168
|
DrawerContent
|
|
166
169
|
};
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-F742IMLQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/Drawer/Drawer.tsx"],"sourcesContent":["import Close from '@mui/icons-material/Close';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport MuiDrawer from '@mui/material/Drawer/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { alpha, useTheme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport type { DrawerContentProps,DrawerHeaderProps, DrawerProps } from './Drawer.types';\nimport { shadowInk } from '../../../tokens/ink';\nimport { rem, rems } from '../../../tokens/relative';\n\ntype DrawerAnchor = 'left' | 'right' | 'top' | 'bottom';\n\n/**\n * A `width`/`height` prop as CSS. `sx` reads a number of 1 or less as a\n * fraction of the parent, and that stays so; any other number is design px,\n * through the type scale; a string is as given.\n */\nconst drawerLength = (theme: Theme, value: number | string | undefined): string | undefined => {\n if (typeof value !== 'number') return value;\n return value <= 1 && value !== 0 ? `${value * 100}%` : rem(theme, value);\n};\n\n// `variant` doubles as a position preset, but an explicit `anchor` always wins.\nconst resolveAnchor = (\n anchor: DrawerProps['anchor'],\n variant: DrawerProps['variant'],\n): DrawerAnchor => {\n if (anchor) return anchor;\n\n // Map variant to anchor position\n switch (variant) {\n case 'right':\n return 'right';\n case 'top':\n return 'top';\n case 'bottom':\n return 'bottom';\n case 'glass':\n return 'right';\n case 'left':\n default:\n return 'left';\n }\n};\n\nconst buildDrawerStyles = (\n theme: Theme,\n anchor: DrawerAnchor,\n variant: DrawerProps['variant'],\n width: DrawerProps['width'],\n height: DrawerProps['height'],\n // Merged LAST into the surface's own rules, so a caller can shape the sliding\n // surface itself (rounded corners on a bottom sheet, a docked panel's offset)\n // without reaching for the MUI paper class from outside. Undefined by default:\n // omit it and the drawer styles exactly as it always has.\n paperSx?: DrawerProps['paperSx'],\n) => {\n const widthCss = drawerLength(theme, width);\n const heightCss = drawerLength(theme, height);\n const baseStyles = {\n width: ['left', 'right'].includes(anchor) ? widthCss : '100%',\n height: ['top', 'bottom'].includes(anchor) ? heightCss : '100%',\n flexShrink: 0,\n };\n\n if (variant === 'glass') {\n return {\n ...baseStyles,\n '& .MuiDrawer-paper': {\n width: widthCss,\n height: '100%',\n backgroundColor: alpha(theme.palette.background.paper, 0.1),\n backdropFilter: `blur(${rem(theme, 20)})`,\n border: `1px solid ${alpha(theme.palette.primary.main, 0.2)}`,\n boxShadow: `${rems(theme, 0, 8, 32)} ${shadowInk(theme, 0.1)}`,\n ...paperSx,\n },\n };\n }\n\n return {\n ...baseStyles,\n '& .MuiDrawer-paper': {\n width: ['left', 'right'].includes(anchor) ? widthCss : '100%',\n height: ['top', 'bottom'].includes(anchor) ? heightCss : '100%',\n boxSizing: 'border-box',\n ...paperSx,\n },\n };\n};\n\nexport const Drawer: React.FC<DrawerProps> = ({\n children,\n open,\n onClose,\n variant = 'left',\n anchor,\n width,\n height = '100%',\n persistent = false,\n backdrop = true,\n hideBackdrop = false,\n keepMounted = false,\n paperSx,\n className,\n dataTestId,\n ...rest\n}) => {\n const theme = useTheme();\n const drawerAnchor = resolveAnchor(anchor, variant);\n\n return (\n <MuiDrawer\n anchor={drawerAnchor}\n open={open}\n onClose={onClose}\n variant={persistent ? 'persistent' : 'temporary'}\n ModalProps={{\n keepMounted,\n hideBackdrop,\n BackdropProps: {\n invisible: !backdrop,\n },\n }}\n sx={buildDrawerStyles(theme, drawerAnchor, variant, width ?? 280, height, paperSx)}\n className={className}\n data-testid={dataTestId || 'drawer'}\n {...rest}\n >\n {children}\n </MuiDrawer>\n );\n};\n\nexport const DrawerHeader: React.FC<DrawerHeaderProps> = ({\n children,\n onClose,\n showCloseButton = true,\n closeLabel,\n dataTestId,\n}) => {\n const theme = useTheme();\n\n return (\n <Box\n data-testid={dataTestId || 'drawer-header'}\n sx={{\n display: 'flex',\n alignItems: 'center',\n padding: theme.spacing(2),\n borderBottom: `1px solid ${theme.palette.divider}`,\n minHeight: rem(theme, 64),\n justifyContent: 'space-between',\n }}\n >\n <Box sx={{ flex: 1 }} data-testid={dataTestId ? `${dataTestId}-title` : 'drawer-title'}>\n {typeof children === 'string' ? <Typography variant=\"h6\">{children}</Typography> : children}\n </Box>\n {showCloseButton && onClose && (\n <IconButton\n onClick={onClose}\n edge=\"end\"\n aria-label={closeLabel ?? 'Close drawer'}\n data-testid={dataTestId ? `${dataTestId}-close` : 'drawer-close'}\n >\n <Close />\n </IconButton>\n )}\n </Box>\n );\n};\n\nexport const DrawerContent: React.FC<DrawerContentProps> = ({ children, padding = true, dataTestId }) => {\n const theme = useTheme();\n\n return (\n <Box\n data-testid={dataTestId || 'drawer-content'}\n sx={{\n flex: 1,\n overflow: 'auto',\n padding: padding ? theme.spacing(2) : 0,\n }}\n >\n {children}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;AAAA,OAAO,WAAW;AAElB,OAAO,SAAS;AAChB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,SAAS,OAAO,gBAAgB;AA6G5B,cAgCA,YAhCA;AA/FJ,IAAM,eAAe,CAAC,OAAc,UAA2D;AAC7F,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,SAAO,SAAS,KAAK,UAAU,IAAI,GAAG,QAAQ,GAAG,MAAM,IAAI,OAAO,KAAK;AACzE;AAGA,IAAM,gBAAgB,CACpB,QACA,YACiB;AACjB,MAAI,OAAQ,QAAO;AAGnB,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL;AACE,aAAO;AAAA,EACX;AACF;AAEA,IAAM,oBAAoB,CACxB,OACA,QAC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AM,eAAe,cAAc,QAAQ,OAAO;AAElD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,SAAS,aAAa,eAAe;AAAA,MACrC,YAAY;AAAA,QACV;AAAA,QACA;AAAA,QACA,eAAe;AAAA,UACb,WAAW,CAAC;AAAA,QACd;AAAA,MACF;AAAA,MACA,IAAI,kBAAkB,OAAO,cAAc,SAAS,SAAS,KAAK,QAAQ,OAAO;AAAA,MACjF;AAAA,MACA,eAAa,cAAc;AAAA,MAC1B,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEO,IAAM,eAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB;AAAA,EACA;AACF,MAAM;AACJ,QAAM,QAAQ,SAAS;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,cAAc;AAAA,MAC3B,IAAI;AAAA,QACF,SAAS;AAAA,QACT,YAAY;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/Drawer/Drawer.tsx"],"sourcesContent":["import Close from '@mui/icons-material/Close';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport MuiDrawer from '@mui/material/Drawer/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { alpha, useTheme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport type { DrawerContentProps,DrawerHeaderProps, DrawerProps } from './Drawer.types';\nimport { shadowInk } from '../../../tokens/ink';\nimport { rem, rems } from '../../../tokens/relative';\n\ntype DrawerAnchor = 'left' | 'right' | 'top' | 'bottom';\n\n/**\n * A `width`/`height` prop as CSS. `sx` reads a number of 1 or less as a\n * fraction of the parent, and that stays so; any other number is design px,\n * through the type scale; a string is as given.\n */\nconst drawerLength = (theme: Theme, value: number | string | undefined): string | undefined => {\n if (typeof value !== 'number') return value;\n return value <= 1 && value !== 0 ? `${value * 100}%` : rem(theme, value);\n};\n\n// `variant` doubles as a position preset, but an explicit `anchor` always wins.\nconst resolveAnchor = (\n anchor: DrawerProps['anchor'],\n variant: DrawerProps['variant'],\n): DrawerAnchor => {\n if (anchor) return anchor;\n\n // Map variant to anchor position\n switch (variant) {\n case 'right':\n return 'right';\n case 'top':\n return 'top';\n case 'bottom':\n return 'bottom';\n case 'glass':\n return 'right';\n case 'left':\n default:\n return 'left';\n }\n};\n\nconst buildDrawerStyles = (\n theme: Theme,\n anchor: DrawerAnchor,\n variant: DrawerProps['variant'],\n width: DrawerProps['width'],\n height: DrawerProps['height'],\n // Merged LAST into the surface's own rules, so a caller can shape the sliding\n // surface itself (rounded corners on a bottom sheet, a docked panel's offset)\n // without reaching for the MUI paper class from outside. Undefined by default:\n // omit it and the drawer styles exactly as it always has.\n paperSx?: DrawerProps['paperSx'],\n) => {\n const widthCss = drawerLength(theme, width);\n const heightCss = drawerLength(theme, height);\n const baseStyles = {\n width: ['left', 'right'].includes(anchor) ? widthCss : '100%',\n height: ['top', 'bottom'].includes(anchor) ? heightCss : '100%',\n flexShrink: 0,\n };\n\n if (variant === 'glass') {\n return {\n ...baseStyles,\n '& .MuiDrawer-paper': {\n width: widthCss,\n height: '100%',\n backgroundColor: alpha(theme.palette.background.paper, 0.1),\n backdropFilter: `blur(${rem(theme, 20)})`,\n border: `1px solid ${alpha(theme.palette.primary.main, 0.2)}`,\n boxShadow: `${rems(theme, 0, 8, 32)} ${shadowInk(theme, 0.1)}`,\n ...paperSx,\n },\n };\n }\n\n return {\n ...baseStyles,\n '& .MuiDrawer-paper': {\n width: ['left', 'right'].includes(anchor) ? widthCss : '100%',\n height: ['top', 'bottom'].includes(anchor) ? heightCss : '100%',\n boxSizing: 'border-box',\n ...paperSx,\n },\n };\n};\n\nexport const Drawer: React.FC<DrawerProps> = ({\n children,\n open,\n onClose,\n variant = 'left',\n anchor,\n width,\n height = '100%',\n persistent = false,\n backdrop = true,\n hideBackdrop = false,\n keepMounted = false,\n paperSx,\n className,\n dataTestId,\n ...rest\n}) => {\n const theme = useTheme();\n const drawerAnchor = resolveAnchor(anchor, variant);\n\n return (\n <MuiDrawer\n anchor={drawerAnchor}\n open={open}\n onClose={onClose}\n variant={persistent ? 'persistent' : 'temporary'}\n ModalProps={{\n keepMounted,\n hideBackdrop,\n BackdropProps: {\n invisible: !backdrop,\n },\n }}\n sx={buildDrawerStyles(theme, drawerAnchor, variant, width ?? 280, height, paperSx)}\n className={className}\n data-testid={dataTestId || 'drawer'}\n {...rest}\n >\n {children}\n </MuiDrawer>\n );\n};\n\nexport const DrawerHeader: React.FC<DrawerHeaderProps> = ({\n children,\n onClose,\n showCloseButton = true,\n closeLabel,\n dataTestId,\n}) => {\n const theme = useTheme();\n\n return (\n <Box\n data-testid={dataTestId || 'drawer-header'}\n sx={{\n display: 'flex',\n alignItems: 'center',\n // 12px above and below: the close button is 40px tall, so the header lands on\n // its own 64px minimum instead of 72 — the height of the page header beside\n // a docked drawer (FUT-3476).\n padding: theme.spacing(1.5, 2),\n borderBottom: `1px solid ${theme.palette.divider}`,\n minHeight: rem(theme, 64),\n justifyContent: 'space-between',\n }}\n >\n <Box sx={{ flex: 1 }} data-testid={dataTestId ? `${dataTestId}-title` : 'drawer-title'}>\n {typeof children === 'string' ? <Typography variant=\"h6\">{children}</Typography> : children}\n </Box>\n {showCloseButton && onClose && (\n <IconButton\n onClick={onClose}\n edge=\"end\"\n aria-label={closeLabel ?? 'Close drawer'}\n data-testid={dataTestId ? `${dataTestId}-close` : 'drawer-close'}\n >\n <Close />\n </IconButton>\n )}\n </Box>\n );\n};\n\nexport const DrawerContent: React.FC<DrawerContentProps> = ({ children, padding = true, dataTestId }) => {\n const theme = useTheme();\n\n return (\n <Box\n data-testid={dataTestId || 'drawer-content'}\n sx={{\n flex: 1,\n overflow: 'auto',\n padding: padding ? theme.spacing(2) : 0,\n }}\n >\n {children}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;AAAA,OAAO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,MAAM,QAAQ,KAAK,CAAC;AAAA,QAC7B,cAAc,aAAa,MAAM,QAAQ,OAAO;AAAA,QAChD,WAAW,IAAI,OAAO,EAAE;AAAA,QACxB,gBAAgB;AAAA,MAClB;AAAA,MAEA;AAAA,4BAAC,OAAI,IAAI,EAAE,MAAM,EAAE,GAAG,eAAa,aAAa,GAAG,UAAU,WAAW,gBACrE,iBAAO,aAAa,WAAW,oBAAC,cAAW,SAAQ,MAAM,UAAS,IAAgB,UACrF;AAAA,QACC,mBAAmB,WAClB;AAAA,UAAC;AAAA;AAAA,YACC,SAAS;AAAA,YACT,MAAK;AAAA,YACL,cAAY,cAAc;AAAA,YAC1B,eAAa,aAAa,GAAG,UAAU,WAAW;AAAA,YAElD,8BAAC,SAAM;AAAA;AAAA,QACT;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEO,IAAM,gBAA8C,CAAC,EAAE,UAAU,UAAU,MAAM,WAAW,MAAM;AACvG,QAAM,QAAQ,SAAS;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,cAAc;AAAA,MAC3B,IAAI;AAAA,QACF,MAAM;AAAA,QACN,UAAU;AAAA,QACV,SAAS,UAAU,MAAM,QAAQ,CAAC,IAAI;AAAA,MACxC;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
Drawer,
|
|
10
10
|
DrawerContent,
|
|
11
11
|
DrawerHeader
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-F742IMLQ.js";
|
|
13
13
|
import {
|
|
14
14
|
rem
|
|
15
15
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -175,4 +175,4 @@ function SectionNavSheet({
|
|
|
175
175
|
export {
|
|
176
176
|
SectionNavSheet
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
178
|
+
//# sourceMappingURL=chunk-J26ZWYQI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SectionNavSheet
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J26ZWYQI.js";
|
|
4
4
|
import {
|
|
5
5
|
RaisedActionButton,
|
|
6
6
|
raisedLift
|
|
@@ -327,4 +327,4 @@ export {
|
|
|
327
327
|
sectionNavSheetOffset,
|
|
328
328
|
SectionNavBar
|
|
329
329
|
};
|
|
330
|
-
//# sourceMappingURL=chunk-
|
|
330
|
+
//# sourceMappingURL=chunk-PMRLFNBT.js.map
|
package/dist/layout/Drawer.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import "../chunk-R26KYJHK.js";
|
|
2
2
|
import {
|
|
3
3
|
SectionNav
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7IXXASQ6.js";
|
|
5
5
|
import "../chunk-SNWCT6JN.js";
|
|
6
6
|
import "../chunk-ILJ3FXIC.js";
|
|
7
7
|
import {
|
|
8
8
|
sectionNavBarInset
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-PMRLFNBT.js";
|
|
10
|
+
import "../chunk-J26ZWYQI.js";
|
|
11
11
|
import {
|
|
12
12
|
RaisedActionButton
|
|
13
13
|
} from "../chunk-UKUGSU3Y.js";
|
|
14
14
|
import "../chunk-24HHUCWB.js";
|
|
15
15
|
import "../chunk-YCCWJ5XQ.js";
|
|
16
16
|
import "../chunk-TMSWLFL4.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-F742IMLQ.js";
|
|
18
18
|
import "../chunk-PUFA7FQ7.js";
|
|
19
19
|
import "../chunk-5AK2EZG5.js";
|
|
20
20
|
import "../chunk-N5PVD4J5.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Drawer/Drawer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAC,iBAAiB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAqFxF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAyCxC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Drawer/Drawer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAC,iBAAiB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAqFxF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAyCxC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAuCpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAetD,CAAC"}
|
package/package.json
CHANGED
|
@@ -150,7 +150,10 @@ export const DrawerHeader: React.FC<DrawerHeaderProps> = ({
|
|
|
150
150
|
sx={{
|
|
151
151
|
display: 'flex',
|
|
152
152
|
alignItems: 'center',
|
|
153
|
-
|
|
153
|
+
// 12px above and below: the close button is 40px tall, so the header lands on
|
|
154
|
+
// its own 64px minimum instead of 72 — the height of the page header beside
|
|
155
|
+
// a docked drawer (FUT-3476).
|
|
156
|
+
padding: theme.spacing(1.5, 2),
|
|
154
157
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
155
158
|
minHeight: rem(theme, 64),
|
|
156
159
|
justifyContent: 'space-between',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|