@12-apps/ui 6.39.12 → 6.39.14
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 +5 -5
- package/dist/_internal/components/layout/Separator/Separator.js +2 -2
- package/dist/_internal/components/layout/Separator/Separator.styles.js +1 -1
- package/dist/_internal/components/layout/index.js +2 -2
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +3 -3
- package/dist/_internal/components/navigation/index.js +3 -3
- package/dist/_internal/social-login-button/social-login-button.js +3 -3
- package/dist/{chunk-SYNB3IIB.js → chunk-35443PF6.js} +8 -5
- package/dist/chunk-35443PF6.js.map +1 -0
- 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-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-5KWHINO5.js → chunk-SLDSWQVE.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-XSSCSRUX.js → chunk-X53F33KA.js} +4 -2
- package/dist/chunk-X53F33KA.js.map +1 -0
- package/dist/data-display/DataViews.js +7 -7
- package/dist/feedback/Dialog.js +2 -2
- package/dist/layout/Separator.js +2 -2
- package/dist/navigation/AppHeader.js +3 -3
- package/dist/social-login-button.js +3 -3
- 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/layout/Separator/Separator.d.ts.map +1 -1
- package/dist/types/components/layout/Separator/Separator.styles.d.ts +12 -4
- package/dist/types/components/layout/Separator/Separator.styles.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/layout/Separator/Separator.styles.ts +26 -8
- package/src/components/layout/Separator/Separator.tsx +6 -0
- package/dist/_internal/components/feedback/Dialog/Dialog.paper.js +0 -8
- package/dist/chunk-SYNB3IIB.js.map +0 -1
- package/dist/chunk-UEROWH53.js.map +0 -1
- package/dist/chunk-XSSCSRUX.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-3333KCAW.js.map → chunk-P22W4N5K.js.map} +0 -0
- /package/dist/{chunk-IYF246UA.js.map → chunk-SA65SDOY.js.map} +0 -0
- /package/dist/{chunk-5KWHINO5.js.map → chunk-SLDSWQVE.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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/feedback/Dialog/Dialog.tsx"],"sourcesContent":["import CloseIcon from '@mui/icons-material/Close';\nimport Backdrop from '@mui/material/Backdrop/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport MuiDialog, { type DialogProps as MuiDialogProps } from '@mui/material/Dialog/index.js';\nimport MuiDialogActions from '@mui/material/DialogActions/index.js';\nimport MuiDialogContent from '@mui/material/DialogContent/index.js';\nimport MuiDialogTitle from '@mui/material/DialogTitle/index.js';\nimport Drawer, { type DrawerProps } from '@mui/material/Drawer/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { useTheme, type SxProps, type Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { hasSpacingSlot, withDialogDefaults } from './Dialog.helpers';\nimport {\n DIALOG_ACTIONS,\n DIALOG_BODY_PADDING_UNITS,\n DIALOG_CONTENT_PADDING_UNITS,\n DIALOG_HEADER_CHILDREN_PADDING_UNITS,\n DIALOG_TITLE,\n DIALOG_TITLED_BODY_PADDING_TOP_UNITS,\n} from './Dialog.metrics';\nimport { mergedBackdropSlot, mergedPaperSlot } from './Dialog.slots';\nimport { backdropSxOf, variantStylesOf } from './Dialog.styles';\nimport { childTestId, resolveTestId, slotTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport type {\n DialogActionsProps,\n DialogContentProps,\n DialogHeaderProps,\n DialogProps,\n} from './Dialog.types';\n\n/**\n * The padding a dialog gives children that are not managing their own — and the\n * rule that takes it back when it turns out they are.\n *\n * `:has()` is doing what {@link hasSpacingSlot} cannot. A slot passed through a\n * COMPONENT (`<Body />` rendering a `DialogContent`) is invisible to any check\n * on element type: React does not know what a component renders until it has\n * rendered it, and by then the wrapper is already in the tree. The selector\n * asks the question one step later, of the DOM, where the answer exists.\n *\n * `display: contents` rather than `padding: 0`, because the padding is only\n * half of what a wrapper does. The other half is standing between the paper and\n * its children: MUI's `scroll=\"paper\"` makes the paper a flex column with\n * `overflow-y: auto`, so a `DialogContent` that is no longer its direct child\n * cannot be the thing that scrolls — the whole dialog scrolls instead and\n * carries the `DialogActions` off the bottom with it. An element with\n * `display: contents` generates no box at all: its children become the paper's\n * flex items, and its padding is never applied. Both halves, one declaration.\n *\n * A browser without `:has()` falls back to the padded box — the layout this\n * had before, not a broken one.\n */\nconst BODY_SX = {\n px: DIALOG_BODY_PADDING_UNITS.horizontal,\n pb: DIALOG_BODY_PADDING_UNITS.bottom,\n '&:has(> .MuiDialogContent-root), &:has(> .MuiDialogActions-root)': {\n display: 'contents',\n },\n} as const;\n\n/**\n * The dialog body. Consumers that pass raw children (no <DialogContent>) used\n * to render them flush against the paper edges — give them comfortable default\n * padding; <DialogContent>/<DialogActions> users keep managing their own\n * spacing.\n */\nfunction bodyOf(children: React.ReactNode, hasTitle: boolean): React.ReactNode {\n // Read lazily: both slots are declared below this function.\n if (hasSpacingSlot(children, [DialogContent, DialogActions])) return children;\n const pt = hasTitle\n ? DIALOG_BODY_PADDING_UNITS.topUnderTitle\n : DIALOG_BODY_PADDING_UNITS.top;\n return <Box sx={{ ...BODY_SX, pt }}>{children}</Box>;\n}\n\n/**\n * MUI's `onClose` for either renderer: a `persistent` dialog swallows the\n * backdrop press and Escape, and the caller's `onClose` is called with no\n * arguments, as `Dialog.base.ts` promises. The drawer used to get the caller's\n * raw `onClose` — so it closed when `persistent` said it must not, and was\n * handed MUI's `(event, reason)` (FUT-2673).\n */\nfunction closeHandlerOf(persistent: boolean, onClose: (() => void) | undefined) {\n return (_event: object, reason: 'backdropClick' | 'escapeKeyDown') => {\n if (persistent && (reason === 'backdropClick' || reason === 'escapeKeyDown')) {\n return;\n }\n onClose?.();\n };\n}\n\n/** The looks the Dialog lays under a caller's paper and backdrop props. */\ninterface DialogLooks {\n paperSx: SxProps<Theme>;\n backdropSx: SxProps<Theme>;\n testId: string | undefined;\n}\n\n/** What either renderer below takes: the looks, and the dialog's own children. */\ntype RendererProps = DialogLooks & { children: React.ReactNode };\n\n/**\n * Every variant but the drawer: MUI's `Dialog`. The scrim reaches MUI through\n * `slotProps.backdrop`, not the deprecated `BackdropProps`, and a caller's\n * backdrop props from either spelling merge over it rather than replacing it\n * (FUT-2672) — as their paper props merge over the variant's look (FUT-2613).\n */\nfunction ModalDialog({\n paperSx,\n backdropSx,\n testId,\n dialogProps,\n children,\n}: RendererProps & { dialogProps: MuiDialogProps }) {\n const { PaperProps: callerPaper, BackdropProps: callerBackdrop, slotProps, ...rest } = dialogProps;\n return (\n <MuiDialog\n {...rest}\n slotProps={{\n ...slotProps,\n paper: mergedPaperSlot(paperSx, testId, callerPaper, slotProps?.paper),\n backdrop: mergedBackdropSlot(backdropSx, callerBackdrop, slotProps?.backdrop),\n }}\n >\n {children}\n </MuiDialog>\n );\n}\n\n/**\n * The drawer variant: MUI's `Drawer`, with the variant's look on the Drawer's\n * OWN paper — on an inner Box it left the paper 0px wide and clipped the panel —\n * and a caller's paper props merged over it rather than replacing it. The\n * test id stays on the Drawer root, so the paper carries none of its own.\n *\n * The scrim rides the drawer's backdrop exactly as it rides the dialog's, so\n * `glass` blurs it here too; the paper does not frost (FUT-2673). MUI's\n * `Drawer` does not merge `BackdropProps` into `slotProps.backdrop` — it takes\n * one or the other — so both are folded into the one slot here.\n */\nfunction DrawerDialog({\n paperSx,\n backdropSx,\n testId,\n drawerProps,\n children,\n}: RendererProps & { drawerProps: DrawerProps }) {\n const { PaperProps: callerPaper, BackdropProps: callerBackdrop, slotProps, ...rest } = drawerProps;\n return (\n <Drawer\n anchor=\"right\"\n data-testid={testId}\n {...rest}\n slotProps={{\n ...slotProps,\n paper: mergedPaperSlot(paperSx, undefined, callerPaper, slotProps?.paper),\n backdrop: mergedBackdropSlot(backdropSx, callerBackdrop, slotProps?.backdrop),\n }}\n >\n {children}\n </Drawer>\n );\n}\n\nexport const Dialog: React.FC<DialogProps> = (rawProps) => {\n const {\n children,\n variant,\n size,\n title,\n description,\n showCloseButton,\n backdrop,\n persistent,\n glass,\n gradient,\n glow,\n pulse,\n borderRadius,\n onClose,\n open,\n ...others\n } = withDialogDefaults(rawProps);\n const theme = useTheme();\n // Every spelling of the test id the shared contract allows, mapped to the one\n // the DOM reads, and stripped from what is spread — `testID` is React\n // Native's name for it and is not a DOM attribute. The native `Dialog` does\n // the same in reverse.\n const testId = resolveTestId(others, 'dialog');\n const props = withoutTestIdProps(others);\n const looks: DialogLooks = {\n paperSx: variantStylesOf(theme, { variant, size, borderRadius, glass, gradient, glow, pulse }),\n backdropSx: backdropSxOf(theme, glass),\n testId,\n };\n const handleClose = closeHandlerOf(persistent, onClose);\n\n const header = title ? (\n <DialogHeader\n title={title}\n subtitle={description}\n showCloseButton={showCloseButton}\n onClose={onClose}\n dataTestId={testId}\n />\n ) : null;\n const body = bodyOf(children, Boolean(title));\n\n if (variant === 'drawer') {\n return (\n <DrawerDialog {...looks} drawerProps={{ ...props, open, onClose: handleClose }}>\n {header}\n {body}\n </DrawerDialog>\n );\n }\n\n return (\n <ModalDialog\n {...looks}\n dialogProps={{\n open,\n onClose: handleClose,\n fullScreen: variant === 'fullscreen',\n BackdropComponent: backdrop ? Backdrop : undefined,\n ...props,\n }}\n >\n {header}\n {body}\n </ModalDialog>\n );\n};\n\nexport const DialogHeader: React.FC<DialogHeaderProps> = ({\n children,\n title,\n subtitle,\n showCloseButton = true,\n onClose,\n ...others\n}) => {\n const props = withoutTestIdProps(others);\n\n if (children) {\n return (\n <Box\n data-testid={slotTestId(others, 'header', 'dialog')}\n sx={{\n p: DIALOG_HEADER_CHILDREN_PADDING_UNITS,\n borderBottom: '1px solid',\n borderColor: 'divider',\n }}\n >\n {children}\n </Box>\n );\n }\n\n return (\n <MuiDialogTitle\n data-testid={slotTestId(others, 'title', 'dialog')}\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n pb: subtitle\n ? DIALOG_TITLE.paddingBottomUnits.withSubtitle\n : DIALOG_TITLE.paddingBottomUnits.plain,\n }}\n {...props}\n >\n <Box>\n <Typography variant=\"h6\" component=\"div\">\n {title}\n </Typography>\n {subtitle && (\n <Typography\n variant=\"body2\"\n color=\"text.secondary\"\n sx={{ mt: DIALOG_TITLE.subtitleGapUnits }}\n >\n {subtitle}\n </Typography>\n )}\n </Box>\n {showCloseButton && onClose && (\n <IconButton\n aria-label=\"close\"\n onClick={onClose}\n data-testid={childTestId(others, 'close', 'dialog')}\n sx={{\n color: 'text.secondary',\n '&:hover': {\n backgroundColor: 'action.hover',\n },\n }}\n >\n <CloseIcon />\n </IconButton>\n )}\n </MuiDialogTitle>\n );\n};\n\n/**\n * Top padding for a body that sits directly under the title.\n *\n * MUI zeroes it there (`.MuiDialogTitle-root + &` on a non-`dividers` content),\n * assuming the title's own bottom padding is the whole gap. That assumption\n * breaks for a body opening with an outlined field: a filled field floats its\n * label ABOVE the input's border box, and `DialogContent` is `overflow-y: auto`\n * — a clipping box — so the label gets sliced in half (FUT-544: \"Tipo\" in the\n * \"Novo insumo\" dialog).\n *\n * Reserve the overhang rather than restore the full 24px: the title already\n * contributes its bottom padding, so a shrunk label's `translate(…, -9px)` is\n * all that is missing. 12px clears it and leaves the gap visually tight.\n */\nconst TITLED_BODY_PADDING_TOP = DIALOG_TITLED_BODY_PADDING_TOP_UNITS;\n\n/**\n * `.MuiDialogTitle-root + &` is `(0,2,0)`-specific and a plain `sx` entry is\n * `(0,1,0)`, so the padding above only survives the cascade by naming the class\n * again — `(0,3,0)`. Scoped to the title-following case so an untitled dialog\n * keeps MUI's roomier default.\n */\nconst TITLED_BODY_SELECTOR = '.MuiDialogTitle-root + &.MuiDialogContent-root';\n\nexport const DialogContent: React.FC<DialogContentProps> = ({\n children,\n dividers = false,\n dense = false,\n ...others\n}) => (\n <MuiDialogContent\n data-testid={slotTestId(others, 'content', 'dialog')}\n dividers={dividers}\n sx={{\n padding: dense ? DIALOG_CONTENT_PADDING_UNITS.dense : DIALOG_CONTENT_PADDING_UNITS.normal,\n [TITLED_BODY_SELECTOR]: { paddingTop: TITLED_BODY_PADDING_TOP },\n '&.MuiDialogContent-dividers': {\n borderTop: dividers ? '1px solid' : 'none',\n borderBottom: dividers ? '1px solid' : 'none',\n borderColor: 'divider',\n },\n }}\n {...withoutTestIdProps(others)}\n >\n {children}\n </MuiDialogContent>\n );\n\nexport const DialogActions: React.FC<DialogActionsProps> = ({\n children,\n alignment = 'right',\n spacing = DIALOG_ACTIONS.defaultSpacingUnits,\n ...others\n}) => {\n const getJustifyContent = () => {\n switch (alignment) {\n case 'left': return 'flex-start';\n case 'center': return 'center';\n case 'right': return 'flex-end';\n case 'space-between': return 'space-between';\n default: return 'flex-end';\n }\n };\n\n return (\n <MuiDialogActions\n data-testid={slotTestId(others, 'actions', 'dialog')}\n sx={{\n justifyContent: getJustifyContent(),\n gap: spacing,\n p: DIALOG_ACTIONS.paddingUnits,\n }}\n {...withoutTestIdProps(others)}\n >\n {children}\n </MuiDialogActions>\n );\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,SAAS;AAChB,OAAO,eAAuD;AAC9D,OAAO,sBAAsB;AAC7B,OAAO,sBAAsB;AAC7B,OAAO,oBAAoB;AAC3B,OAAO,YAAkC;AACzC,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,SAAS,gBAA0C;AAgE1C,cA0IH,YA1IG;AApBT,IAAM,UAAU;AAAA,EACd,IAAI,0BAA0B;AAAA,EAC9B,IAAI,0BAA0B;AAAA,EAC9B,oEAAoE;AAAA,IAClE,SAAS;AAAA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AA,MACF,SAAS,QAAQ,6BAA6B,QAAQ,6BAA6B;AAAA,MACnF,CAAC,oBAAoB,GAAG,EAAE,YAAY,wBAAwB;AAAA,MAC9D,+BAA+B;AAAA,QAC7B,WAAW,WAAW,cAAc;AAAA,QACpC,cAAc,WAAW,cAAc;AAAA,QACvC,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACC,GAAG,mBAAmB,MAAM;AAAA,IAE5B;AAAA;AACH;AAGG,IAAM,gBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA,YAAY;AAAA,EACZ,UAAU,eAAe;AAAA,EACzB,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,MAAM;AAC9B,YAAQ,WAAW;AAAA,MACjB,KAAK;AAAQ,eAAO;AAAA,MACpB,KAAK;AAAU,eAAO;AAAA,MACtB,KAAK;AAAS,eAAO;AAAA,MACrB,KAAK;AAAiB,eAAO;AAAA,MAC7B;AAAS,eAAO;AAAA,IAClB;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,WAAW,QAAQ,WAAW,QAAQ;AAAA,MACnD,IAAI;AAAA,QACF,gBAAgB,kBAAkB;AAAA,QAClC,KAAK;AAAA,QACL,GAAG,eAAe;AAAA,MACpB;AAAA,MACC,GAAG,mBAAmB,MAAM;AAAA,MAE5B;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -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
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-IWEUSZY3.js";
|
|
7
7
|
import {
|
|
8
8
|
Separator
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X53F33KA.js";
|
|
10
10
|
import {
|
|
11
11
|
Card,
|
|
12
12
|
CardContent
|
|
@@ -217,4 +217,4 @@ export {
|
|
|
217
217
|
SocialLoginButton,
|
|
218
218
|
SocialLoginContainer
|
|
219
219
|
};
|
|
220
|
-
//# sourceMappingURL=chunk-
|
|
220
|
+
//# sourceMappingURL=chunk-SLDSWQVE.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
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
labelledSeparatorLayout,
|
|
3
3
|
separatorBlockMargin,
|
|
4
4
|
separatorStyles
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-35443PF6.js";
|
|
6
6
|
|
|
7
7
|
// src/components/layout/Separator/Separator.tsx
|
|
8
8
|
import Box from "@mui/material/Box/index.js";
|
|
@@ -32,6 +32,8 @@ var Separator = ({
|
|
|
32
32
|
{
|
|
33
33
|
className,
|
|
34
34
|
"data-testid": dataTestId,
|
|
35
|
+
role: "separator",
|
|
36
|
+
"aria-orientation": orientation,
|
|
35
37
|
sx: {
|
|
36
38
|
display: "flex",
|
|
37
39
|
alignItems: "center",
|
|
@@ -71,4 +73,4 @@ var Separator = ({
|
|
|
71
73
|
export {
|
|
72
74
|
Separator
|
|
73
75
|
};
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-X53F33KA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/Separator/Separator.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { useTheme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { labelledSeparatorLayout, separatorBlockMargin, separatorStyles } from './Separator.styles';\nimport type { SeparatorProps } from './Separator.types';\n\nexport const Separator: React.FC<SeparatorProps> = ({\n variant = 'solid',\n orientation = 'horizontal',\n size = 'md',\n color,\n margin,\n length,\n children,\n className,\n 'data-testid': dataTestId,\n}) => {\n const theme = useTheme();\n const isHorizontal = orientation === 'horizontal';\n const blockMargin = separatorBlockMargin(theme, size, margin, isHorizontal);\n const styles = separatorStyles(theme, { variant, orientation, size, color, blockMargin, length });\n\n if (children) {\n // The rules either side of the label sit INSIDE the row, which carries the\n // margin; their own would add it a second time.\n const layout = labelledSeparatorLayout(theme, isHorizontal, length);\n const ruleStyles = { ...styles, margin: 0, ...layout.rule };\n\n return (\n <Box\n className={className}\n // The plain branch below has always carried the caller's hook; this one\n // silently dropped it, so a LABELLED separator was the one variant no\n // test could address except through its own words.\n data-testid={dataTestId}\n // The same semantics as the plain branch, on the group, as MUI's\n // `Divider` does with children (FUT-2674). Without them a screen reader\n // heard the label with nothing marking a boundary. The label stays\n // inside, and the separator takes no name from it.\n role=\"separator\"\n aria-orientation={orientation}\n sx={{\n display: 'flex',\n alignItems: 'center',\n margin: blockMargin,\n flexDirection: isHorizontal ? 'row' : 'column',\n gap: theme.spacing(2),\n ...layout.group,\n }}\n >\n <Box sx={ruleStyles} />\n {/*\n No background behind the label. The two rules and the words are a FLEX\n ROW — the rules stop where the label starts — so there is nothing for a\n background to mask, and painting one made the label a coloured pill on\n every surface that is not `background.default`. On a white card it read\n as a highlight nobody had asked for.\n */}\n <Typography\n variant=\"body2\"\n color=\"text.secondary\"\n sx={{ flexShrink: 0, padding: theme.spacing(0, 1) }}\n >\n {children}\n </Typography>\n <Box sx={ruleStyles} />\n </Box>\n );\n }\n\n return (\n <Box\n className={className}\n sx={styles}\n role=\"separator\"\n aria-orientation={orientation}\n data-testid={dataTestId}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA,OAAO,SAAS;AAChB,OAAO,gBAAgB;AACvB,SAAS,gBAAgB;AA6BnB,SAqBE,KArBF;AAvBC,IAAM,YAAsC,CAAC;AAAA,EAClD,UAAU;AAAA,EACV,cAAc;AAAA,EACd,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,QAAQ,SAAS;AACvB,QAAM,eAAe,gBAAgB;AACrC,QAAM,cAAc,qBAAqB,OAAO,MAAM,QAAQ,YAAY;AAC1E,QAAM,SAAS,gBAAgB,OAAO,EAAE,SAAS,aAAa,MAAM,OAAO,aAAa,OAAO,CAAC;AAEhG,MAAI,UAAU;AAGZ,UAAM,SAAS,wBAAwB,OAAO,cAAc,MAAM;AAClE,UAAM,aAAa,EAAE,GAAG,QAAQ,QAAQ,GAAG,GAAG,OAAO,KAAK;AAE1D,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QAIA,eAAa;AAAA,QAKb,MAAK;AAAA,QACL,oBAAkB;AAAA,QAClB,IAAI;AAAA,UACF,SAAS;AAAA,UACT,YAAY;AAAA,UACZ,QAAQ;AAAA,UACR,eAAe,eAAe,QAAQ;AAAA,UACtC,KAAK,MAAM,QAAQ,CAAC;AAAA,UACpB,GAAG,OAAO;AAAA,QACZ;AAAA,QAEA;AAAA,8BAAC,OAAI,IAAI,YAAY;AAAA,UAQrB;AAAA,YAAC;AAAA;AAAA,cACC,SAAQ;AAAA,cACR,OAAM;AAAA,cACN,IAAI,EAAE,YAAY,GAAG,SAAS,MAAM,QAAQ,GAAG,CAAC,EAAE;AAAA,cAEjD;AAAA;AAAA,UACH;AAAA,UACA,oBAAC,OAAI,IAAI,YAAY;AAAA;AAAA;AAAA,IACvB;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ,MAAK;AAAA,MACL,oBAAkB;AAAA,MAClB,eAAa;AAAA;AAAA,EACf;AAEJ;","names":[]}
|
|
@@ -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";
|
package/dist/layout/Separator.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../chunk-CMMPGAMJ.js";
|
|
2
2
|
import {
|
|
3
3
|
Separator
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-X53F33KA.js";
|
|
5
|
+
import "../chunk-35443PF6.js";
|
|
6
6
|
import "../chunk-PZBK3F52.js";
|
|
7
7
|
import "../chunk-YKCAJ2TN.js";
|
|
8
8
|
import "../chunk-PZ5AY32C.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";
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
GoogleIcon,
|
|
5
5
|
SocialLoginButton,
|
|
6
6
|
SocialLoginContainer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SLDSWQVE.js";
|
|
8
8
|
import "./chunk-INGPH3YQ.js";
|
|
9
9
|
import "./chunk-6GP2DOOO.js";
|
|
10
10
|
import "./chunk-IWEUSZY3.js";
|
|
11
11
|
import "./chunk-RB3X6CEE.js";
|
|
12
12
|
import "./chunk-CYZZHWNK.js";
|
|
13
13
|
import "./chunk-CMMPGAMJ.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-X53F33KA.js";
|
|
15
|
+
import "./chunk-35443PF6.js";
|
|
16
16
|
import "./chunk-VUHLNYAE.js";
|
|
17
17
|
import "./chunk-2GSIEDGN.js";
|
|
18
18
|
import "./chunk-WN5PNP6F.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":"Separator.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Separator/Separator.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Separator/Separator.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAyE9C,CAAC"}
|
|
@@ -18,15 +18,23 @@ type SeparatorStyleArgs = Required<Pick<SeparatorProps, 'variant' | 'orientation
|
|
|
18
18
|
export declare const separatorBlockMargin: (theme: Theme, size: SeparatorSize, margin: number | string | undefined, isHorizontal: boolean) => string;
|
|
19
19
|
/**
|
|
20
20
|
* What a labelled separator's rules add to {@link separatorStyles}, and whether
|
|
21
|
-
* the group stretches to its parent (FUT-2617).
|
|
21
|
+
* the group stretches to its parent (FUT-2617, FUT-2675).
|
|
22
22
|
*
|
|
23
23
|
* A labelled VERTICAL separator is a flex COLUMN — rule, label, rule — and with
|
|
24
24
|
* no `length` each rule is `height: 100%` of a column whose height is its own
|
|
25
25
|
* content: both resolved to 0px and only the label showed. So the column
|
|
26
26
|
* stretches to the row it sits in and the two rules split what the label
|
|
27
|
-
* leaves, equally (`flex: 1 1 0`), never shorter than a visible minimum.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* leaves, equally (`flex: 1 1 0`), never shorter than a visible minimum.
|
|
28
|
+
*
|
|
29
|
+
* A RELATIVE `length` (FUT-2675) resolved against that same content-height
|
|
30
|
+
* column and drew 0px too. It now means what it means on a horizontal labelled
|
|
31
|
+
* separator: that fraction of the run. The column stretches as above and each
|
|
32
|
+
* rule is `length` of it, with no grow and the default shrink, so rule, label
|
|
33
|
+
* and rule never overflow the row; the same minimum holds, and is all a block
|
|
34
|
+
* parent (where `align-self` does nothing) gets.
|
|
35
|
+
*
|
|
36
|
+
* An ABSOLUTE `length` is exactly that long: no grow, no shrink, no basis, and
|
|
37
|
+
* the column keeps its content height, centred as before.
|
|
30
38
|
*
|
|
31
39
|
* Only the labelled branch reads this. The plain separator keeps
|
|
32
40
|
* `separatorStyles` as is, since `flex: 1 1 0` there would widen a vertical
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Separator/Separator.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EAEV,cAAc,EACd,aAAa,EAEd,MAAM,mBAAmB,CAAC;AAuB3B,+DAA+D;AAC/D,eAAO,MAAM,eAAe,GAC1B,MAAM,aAAa,EACnB,SAAS,MAAM,GAAG,MAAM,KACvB,MAAM,GAAG,MAAmD,CAAC;AAyDhE,KAAK,kBAAkB,GAAG,QAAQ,CAChC,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC,CACzD,GACC,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,QAAQ,CAAC,GAAG;IACzC,+FAA+F;IAC/F,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,MAAM,aAAa,EACnB,QAAQ,MAAM,GAAG,MAAM,GAAG,SAAS,EACnC,cAAc,OAAO,KACpB,MAIF,CAAC;
|
|
1
|
+
{"version":3,"file":"Separator.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Separator/Separator.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EAEV,cAAc,EACd,aAAa,EAEd,MAAM,mBAAmB,CAAC;AAuB3B,+DAA+D;AAC/D,eAAO,MAAM,eAAe,GAC1B,MAAM,aAAa,EACnB,SAAS,MAAM,GAAG,MAAM,KACvB,MAAM,GAAG,MAAmD,CAAC;AAyDhE,KAAK,kBAAkB,GAAG,QAAQ,CAChC,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,CAAC,CACzD,GACC,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,QAAQ,CAAC,GAAG;IACzC,+FAA+F;IAC/F,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,MAAM,aAAa,EACnB,QAAQ,MAAM,GAAG,MAAM,GAAG,SAAS,EACnC,cAAc,OAAO,KACpB,MAIF,CAAC;AAqBF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,KAAK,EACZ,cAAc,OAAO,EACrB,QAAQ,cAAc,CAAC,QAAQ,CAAC,KAC/B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAWrC,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,OAAO,KAAK,EACZ,4DAA4D,kBAAkB,KAC7E,SA8BF,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
|
+
}
|