@12-apps/ui 6.76.0 → 6.77.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/NATIVE.md +1 -1
- package/dist/_internal/components/data-display/Alert/Alert.content.js +20 -0
- package/dist/_internal/components/data-display/Alert/Alert.content.js.map +1 -0
- package/dist/_internal/components/data-display/Alert/Alert.js +5 -3
- package/dist/_internal/components/data-display/Alert/Alert.metrics.js +3 -1
- package/dist/_internal/components/data-display/Alert/Alert.placement.js +8 -0
- package/dist/_internal/components/data-display/Alert/Alert.placement.js.map +1 -0
- package/dist/_internal/components/data-display/Alert/Alert.styles.js +2 -2
- package/dist/_internal/components/data-display/Banner/Banner.js +3 -3
- package/dist/_internal/components/data-display/Banner/Banner.styles.js +2 -2
- package/dist/_internal/components/data-display/CardKit/card-actions-context.js +6 -4
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +7 -5
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +7 -5
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +6 -4
- package/dist/_internal/components/data-display/index.js +7 -5
- package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +6 -4
- package/dist/_internal/components/feedback/index.js +6 -4
- package/dist/_internal/components/index.js +8 -6
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.items.js +1 -1
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +3 -3
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.rail.js +2 -2
- package/dist/{chunk-3VLVLZ6W.js → chunk-B34WHRKH.js} +2 -2
- package/dist/{chunk-JYAXTRNH.js → chunk-CCJJTLF7.js} +2 -2
- package/dist/{chunk-52CLMR47.js → chunk-ENXGWNCX.js} +2 -2
- package/dist/chunk-IVI574Y5.js +73 -0
- package/dist/chunk-IVI574Y5.js.map +1 -0
- package/dist/{chunk-3LHZCVGM.js → chunk-JNVUB2D4.js} +3 -1
- package/dist/chunk-JNVUB2D4.js.map +1 -0
- package/dist/{chunk-REEV7CLC.js → chunk-QDG6V7OC.js} +2 -2
- package/dist/chunk-QXUXO22M.js +9 -0
- package/dist/chunk-QXUXO22M.js.map +1 -0
- package/dist/{chunk-44AXT2SN.js → chunk-QZX43FIC.js} +2 -2
- package/dist/{chunk-4BLVVMY7.js → chunk-SL56MOKE.js} +27 -6
- package/dist/chunk-SL56MOKE.js.map +1 -0
- package/dist/{chunk-6KM3TL4Q.js → chunk-SO5OU2ZV.js} +7 -5
- package/dist/chunk-SO5OU2ZV.js.map +1 -0
- package/dist/{chunk-ZBOGZLX3.js → chunk-T2KONJ45.js} +3 -3
- package/dist/{chunk-SWQXAUUG.js → chunk-TJO4CBYT.js} +11 -3
- package/dist/{chunk-SWQXAUUG.js.map → chunk-TJO4CBYT.js.map} +1 -1
- package/dist/{chunk-LY7PBZ3Z.js → chunk-UFNXYOHZ.js} +2 -2
- package/dist/{chunk-ERI6JC4M.js → chunk-X2SJJZFH.js} +2 -2
- package/dist/{chunk-DQJFCVXW.js → chunk-ZSCKXOKE.js} +32 -47
- package/dist/chunk-ZSCKXOKE.js.map +1 -0
- package/dist/data-display/Alert.js +5 -3
- package/dist/data-display/Banner.js +3 -3
- package/dist/data-display/CardKit.js +7 -5
- package/dist/data-display/DataViews.js +7 -5
- package/dist/feedback/NotificationStatusNotice.js +6 -4
- package/dist/layout/SettingsLayout.js +3 -3
- package/dist/native/data-display/Alert.js.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.content.d.ts +18 -0
- package/dist/types/components/data-display/Alert/Alert.content.d.ts.map +1 -0
- package/dist/types/components/data-display/Alert/Alert.d.ts.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.metrics.d.ts +4 -0
- package/dist/types/components/data-display/Alert/Alert.metrics.d.ts.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.placement.d.ts +37 -0
- package/dist/types/components/data-display/Alert/Alert.placement.d.ts.map +1 -0
- package/dist/types/components/data-display/Alert/Alert.types.d.ts +8 -0
- package/dist/types/components/data-display/Alert/Alert.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Alert/index.d.ts +1 -1
- package/dist/types/components/data-display/Alert/index.d.ts.map +1 -1
- package/dist/types/components/layout/SettingsLayout/SettingsLayout.d.ts.map +1 -1
- package/dist/types/components/layout/SettingsLayout/SettingsLayout.items.d.ts +3 -1
- package/dist/types/components/layout/SettingsLayout/SettingsLayout.items.d.ts.map +1 -1
- package/dist/types/components/layout/SettingsLayout/SettingsLayout.rail.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Alert/Alert.metrics.d.ts +4 -0
- package/dist/types-native/components/data-display/Alert/Alert.metrics.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/Alert/Alert.content.tsx +79 -0
- package/src/components/data-display/Alert/Alert.md +19 -0
- package/src/components/data-display/Alert/Alert.metrics.ts +2 -0
- package/src/components/data-display/Alert/Alert.placement.ts +45 -0
- package/src/components/data-display/Alert/Alert.tsx +41 -61
- package/src/components/data-display/Alert/Alert.types.ts +10 -1
- package/src/components/data-display/Alert/index.ts +7 -1
- package/src/components/layout/SettingsLayout/SettingsLayout.items.tsx +38 -3
- package/src/components/layout/SettingsLayout/SettingsLayout.rail.tsx +6 -1
- package/src/components/layout/SettingsLayout/SettingsLayout.tsx +9 -3
- package/dist/chunk-3LHZCVGM.js.map +0 -1
- package/dist/chunk-4BLVVMY7.js.map +0 -1
- package/dist/chunk-6KM3TL4Q.js.map +0 -1
- package/dist/chunk-DQJFCVXW.js.map +0 -1
- /package/dist/{chunk-3VLVLZ6W.js.map → chunk-B34WHRKH.js.map} +0 -0
- /package/dist/{chunk-JYAXTRNH.js.map → chunk-CCJJTLF7.js.map} +0 -0
- /package/dist/{chunk-52CLMR47.js.map → chunk-ENXGWNCX.js.map} +0 -0
- /package/dist/{chunk-REEV7CLC.js.map → chunk-QDG6V7OC.js.map} +0 -0
- /package/dist/{chunk-44AXT2SN.js.map → chunk-QZX43FIC.js.map} +0 -0
- /package/dist/{chunk-ZBOGZLX3.js.map → chunk-T2KONJ45.js.map} +0 -0
- /package/dist/{chunk-LY7PBZ3Z.js.map → chunk-UFNXYOHZ.js.map} +0 -0
- /package/dist/{chunk-ERI6JC4M.js.map → chunk-X2SJJZFH.js.map} +0 -0
|
@@ -40,6 +40,8 @@ export const TITLE = { fontSize: 16.8, fontWeight: 600, marginTop: -2, marginBot
|
|
|
40
40
|
/** The description: 0.925rem, slightly faded. */
|
|
41
41
|
export const DESCRIPTION = { fontSize: 14.8, opacity: 0.9 } as const;
|
|
42
42
|
|
|
43
|
+
/** The icon on the title's line (`iconPlacement: 'title'`): 10px from the title. */
|
|
44
|
+
export const TITLE_ICON = { gapUnits: 1.25 } as const;
|
|
43
45
|
/** The icon slot: MUI's 22px glyph at 0.9, 14px from the words, 2px down (MUI's 7px stays below). */
|
|
44
46
|
export const ICON_SLOT = { size: 22, opacity: 0.9, marginRightUnits: 1.75, paddingTopUnits: 0.25, paddingBottom: 7 } as const;
|
|
45
47
|
/** The action slot: MUI's `4px 0 0 16px` with the 16px ours, pushed right, 8px into the padding. */
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Theme } from '@mui/material/styles/index.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WHERE THE ICON SITS — a choice the HOST makes once, in its theme.
|
|
5
|
+
*
|
|
6
|
+
* - `'gutter'` (the default, and what every alert did before this existed):
|
|
7
|
+
* the icon has a column of its own, and the title and the description both
|
|
8
|
+
* start to its right. A two-line description wraps inside that narrower
|
|
9
|
+
* column and leaves an empty strip under the icon.
|
|
10
|
+
* - `'title'`: the icon sits on the TITLE's line, and the description below
|
|
11
|
+
* starts at the alert's own edge and uses the whole line.
|
|
12
|
+
*
|
|
13
|
+
* It is a theme value, like `uiSurfaces`, because it is a house style rather
|
|
14
|
+
* than a per-call decision: a host that wants it wants it on every alert, and a
|
|
15
|
+
* per-call prop would have to be spelled at each of them. The `iconPlacement`
|
|
16
|
+
* prop still exists for the one call site that must differ, and wins.
|
|
17
|
+
*
|
|
18
|
+
* An alert with no title, or no icon, has no title line to put the icon on;
|
|
19
|
+
* `'title'` then renders exactly as `'gutter'` does.
|
|
20
|
+
*/
|
|
21
|
+
export type AlertIconPlacement = 'gutter' | 'title';
|
|
22
|
+
|
|
23
|
+
/** What a host may state about alerts, on its theme. */
|
|
24
|
+
export interface UiAlertTheme {
|
|
25
|
+
iconPlacement?: AlertIconPlacement;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare module '@mui/material/styles' {
|
|
29
|
+
interface Theme {
|
|
30
|
+
/** Alert layout the host states. See `Alert.placement.ts`. */
|
|
31
|
+
uiAlert?: UiAlertTheme;
|
|
32
|
+
}
|
|
33
|
+
interface ThemeOptions {
|
|
34
|
+
/** Alert layout, for every alert under this theme. See `Alert.placement.ts`. */
|
|
35
|
+
uiAlert?: UiAlertTheme;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** The placement in force: the call site's, else the theme's, else `'gutter'`. */
|
|
40
|
+
export function resolveIconPlacement(
|
|
41
|
+
theme: Theme,
|
|
42
|
+
stated: AlertIconPlacement | undefined,
|
|
43
|
+
): AlertIconPlacement {
|
|
44
|
+
return stated ?? theme.uiAlert?.iconPlacement ?? 'gutter';
|
|
45
|
+
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import Close from '@mui/icons-material/Close';
|
|
2
2
|
import MuiAlert from '@mui/material/Alert/index.js';
|
|
3
|
-
import AlertTitle from '@mui/material/AlertTitle/index.js';
|
|
4
3
|
import Box from '@mui/material/Box/index.js';
|
|
5
4
|
import Collapse from '@mui/material/Collapse/index.js';
|
|
6
5
|
import IconButton from '@mui/material/IconButton/index.js';
|
|
7
|
-
import { alpha, styled } from '@mui/material/styles/index.js';
|
|
6
|
+
import { alpha, styled, useTheme } from '@mui/material/styles/index.js';
|
|
8
7
|
import type { Theme } from '@mui/material/styles/index.js';
|
|
9
8
|
import React from 'react';
|
|
10
9
|
|
|
11
10
|
import { absoluteInk, modeInk } from '../../../tokens/ink';
|
|
12
11
|
|
|
12
|
+
import { AlertContent } from './Alert.content';
|
|
13
13
|
import { resolveAlertProps, resolveAnnouncement, testIdFor } from './Alert.helpers';
|
|
14
|
+
import { resolveIconPlacement, type AlertIconPlacement } from './Alert.placement';
|
|
14
15
|
import type { AlertPalette } from './Alert.metrics';
|
|
15
16
|
import {
|
|
16
17
|
ACTIVE,
|
|
@@ -21,12 +22,10 @@ import {
|
|
|
21
22
|
CLOSE_BUTTON,
|
|
22
23
|
CLOSE_DELAY_MS,
|
|
23
24
|
COLLAPSE_MS,
|
|
24
|
-
DESCRIPTION,
|
|
25
25
|
FADE_IN,
|
|
26
26
|
FOCUS,
|
|
27
27
|
HOVER,
|
|
28
28
|
seconds,
|
|
29
|
-
TITLE,
|
|
30
29
|
} from './Alert.metrics';
|
|
31
30
|
import {
|
|
32
31
|
alertEmphasisStyles,
|
|
@@ -39,7 +38,7 @@ import {
|
|
|
39
38
|
import type { AlertColor } from '@mui/material/Alert/index.js';
|
|
40
39
|
import type { AlertProps } from './Alert.types';
|
|
41
40
|
import { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';
|
|
42
|
-
import { rem, rems
|
|
41
|
+
import { rem, rems } from '../../../tokens/relative';
|
|
43
42
|
|
|
44
43
|
const transition = `all ${seconds(ALERT_TRANSITION_MS)} ${ALERT_EASING}`;
|
|
45
44
|
|
|
@@ -176,47 +175,6 @@ const MUI_SEVERITY: Record<string, AlertColor> = {
|
|
|
176
175
|
const toMuiSeverity = (variant: string): AlertColor =>
|
|
177
176
|
MUI_SEVERITY[variant] ?? (variant as AlertColor);
|
|
178
177
|
|
|
179
|
-
const AlertContent: React.FC<{
|
|
180
|
-
title?: AlertProps['title'];
|
|
181
|
-
description?: AlertProps['description'];
|
|
182
|
-
dataTestId?: string;
|
|
183
|
-
children?: React.ReactNode;
|
|
184
|
-
}> = ({ title, description, dataTestId, children }) => (
|
|
185
|
-
<>
|
|
186
|
-
{title && (
|
|
187
|
-
<AlertTitle
|
|
188
|
-
data-testid={testIdFor(dataTestId, 'title')}
|
|
189
|
-
sx={{
|
|
190
|
-
fontWeight: TITLE.fontWeight,
|
|
191
|
-
fontSize: sxRem(TITLE.fontSize),
|
|
192
|
-
marginBottom: description ? TITLE.marginBottomUnits : 0,
|
|
193
|
-
wordWrap: 'break-word',
|
|
194
|
-
overflowWrap: 'break-word',
|
|
195
|
-
wordBreak: 'break-word',
|
|
196
|
-
}}
|
|
197
|
-
>
|
|
198
|
-
{title}
|
|
199
|
-
</AlertTitle>
|
|
200
|
-
)}
|
|
201
|
-
{description && (
|
|
202
|
-
<Box
|
|
203
|
-
component="div"
|
|
204
|
-
data-testid={testIdFor(dataTestId, 'message')}
|
|
205
|
-
sx={{
|
|
206
|
-
opacity: DESCRIPTION.opacity,
|
|
207
|
-
fontSize: sxRem(DESCRIPTION.fontSize),
|
|
208
|
-
wordWrap: 'break-word',
|
|
209
|
-
overflowWrap: 'break-word',
|
|
210
|
-
wordBreak: 'break-word',
|
|
211
|
-
}}
|
|
212
|
-
>
|
|
213
|
-
{description}
|
|
214
|
-
</Box>
|
|
215
|
-
)}
|
|
216
|
-
{children}
|
|
217
|
-
</>
|
|
218
|
-
);
|
|
219
|
-
|
|
220
178
|
const AlertCloseButton: React.FC<{ dataTestId?: string; label: string; onClose: () => void }> = ({
|
|
221
179
|
dataTestId,
|
|
222
180
|
label,
|
|
@@ -290,6 +248,31 @@ function dismissButton(
|
|
|
290
248
|
return <AlertCloseButton dataTestId={dataTestId} label={props.closeLabel} onClose={onClose} />;
|
|
291
249
|
}
|
|
292
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Where the icon goes: MUI's own slot (`slot`), or the title's row
|
|
253
|
+
* (`titleIcon`) — never both. On the title's row only when there IS a title
|
|
254
|
+
* and an icon to put on it (`Alert.placement.ts`).
|
|
255
|
+
*/
|
|
256
|
+
function placeIcon({
|
|
257
|
+
icon,
|
|
258
|
+
dataTestId,
|
|
259
|
+
hasTitle,
|
|
260
|
+
placement,
|
|
261
|
+
}: {
|
|
262
|
+
icon: React.ReactNode;
|
|
263
|
+
dataTestId: string | undefined;
|
|
264
|
+
hasTitle: boolean;
|
|
265
|
+
placement: AlertIconPlacement;
|
|
266
|
+
}): { slot: React.ReactNode; titleIcon?: React.ReactNode } {
|
|
267
|
+
if (icon === null) return { slot: false };
|
|
268
|
+
const glyph = (
|
|
269
|
+
<Box component="span" data-testid={testIdFor(dataTestId, 'icon')}>
|
|
270
|
+
{icon}
|
|
271
|
+
</Box>
|
|
272
|
+
);
|
|
273
|
+
return placement === 'title' && hasTitle ? { slot: false, titleIcon: glyph } : { slot: glyph };
|
|
274
|
+
}
|
|
275
|
+
|
|
293
276
|
export const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, ref) => {
|
|
294
277
|
const {
|
|
295
278
|
variant,
|
|
@@ -303,6 +286,7 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, r
|
|
|
303
286
|
description,
|
|
304
287
|
children,
|
|
305
288
|
animate,
|
|
289
|
+
iconPlacement,
|
|
306
290
|
role: _role, announce: _announce, // resolved from `alertProps` — see `resolveAnnouncement`
|
|
307
291
|
'aria-atomic': ariaAtomic,
|
|
308
292
|
...others
|
|
@@ -319,6 +303,7 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, r
|
|
|
319
303
|
|
|
320
304
|
// Depends on `variant`, so it cannot live in the static defaults above.
|
|
321
305
|
const announcement = resolveAnnouncement(alertProps, variant);
|
|
306
|
+
const theme = useTheme();
|
|
322
307
|
const [open, setOpen] = React.useState(true);
|
|
323
308
|
const [isClosing, setIsClosing] = React.useState(false);
|
|
324
309
|
|
|
@@ -332,19 +317,12 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, r
|
|
|
332
317
|
|
|
333
318
|
const severity = toMuiSeverity(variant);
|
|
334
319
|
|
|
335
|
-
const
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
);
|
|
342
|
-
|
|
343
|
-
const content = (
|
|
344
|
-
<AlertContent title={title} description={description} dataTestId={dataTestId}>
|
|
345
|
-
{children}
|
|
346
|
-
</AlertContent>
|
|
347
|
-
);
|
|
320
|
+
const { slot, titleIcon } = placeIcon({
|
|
321
|
+
icon: showIcon ? (icon ?? getVariantIcon(variant)) : null,
|
|
322
|
+
dataTestId,
|
|
323
|
+
hasTitle: Boolean(title),
|
|
324
|
+
placement: resolveIconPlacement(theme, iconPlacement),
|
|
325
|
+
});
|
|
348
326
|
|
|
349
327
|
return (
|
|
350
328
|
<Collapse in={open && !isClosing} timeout={COLLAPSE_MS}>
|
|
@@ -357,7 +335,7 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, r
|
|
|
357
335
|
glow={glow}
|
|
358
336
|
pulse={pulse}
|
|
359
337
|
animate={animate}
|
|
360
|
-
icon={
|
|
338
|
+
icon={slot}
|
|
361
339
|
role={announcement.role}
|
|
362
340
|
aria-live={announcement['aria-live']}
|
|
363
341
|
aria-atomic={ariaAtomic}
|
|
@@ -365,7 +343,9 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, r
|
|
|
365
343
|
action={dismissButton(alertProps, dataTestId, handleClose)}
|
|
366
344
|
{...props}
|
|
367
345
|
>
|
|
368
|
-
{
|
|
346
|
+
<AlertContent title={title} description={description} titleIcon={titleIcon} dataTestId={dataTestId}>
|
|
347
|
+
{children}
|
|
348
|
+
</AlertContent>
|
|
369
349
|
</StyledAlert>
|
|
370
350
|
</Collapse>
|
|
371
351
|
);
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import type { AlertProps as MuiAlertProps } from '@mui/material/Alert/index.js';
|
|
2
2
|
|
|
3
3
|
import type { AlertBaseFields, AlertDismiss } from './Alert.base';
|
|
4
|
+
import type { AlertIconPlacement } from './Alert.placement';
|
|
4
5
|
|
|
5
6
|
export type { AlertBaseFields, AlertBaseProps, AlertDismiss, AlertVariant } from './Alert.base';
|
|
7
|
+
export type { AlertIconPlacement, UiAlertTheme } from './Alert.placement';
|
|
6
8
|
|
|
7
9
|
/** The web `Alert`'s non-dismiss half: the shared fields, plus MUI's `Alert` props where they do not overlap. */
|
|
8
10
|
export interface AlertBase
|
|
9
11
|
extends AlertBaseFields,
|
|
10
|
-
Omit<MuiAlertProps, 'variant' | 'color' | 'role' | keyof AlertBaseFields> {
|
|
12
|
+
Omit<MuiAlertProps, 'variant' | 'color' | 'role' | keyof AlertBaseFields> {
|
|
13
|
+
/**
|
|
14
|
+
* Where the icon sits: its own column (`'gutter'`) or on the title's line
|
|
15
|
+
* (`'title'`). Unset, the theme's `uiAlert.iconPlacement` decides, else
|
|
16
|
+
* `'gutter'`. Web only. See `Alert.placement.ts`.
|
|
17
|
+
*/
|
|
18
|
+
iconPlacement?: AlertIconPlacement;
|
|
19
|
+
}
|
|
11
20
|
|
|
12
21
|
export type AlertProps = AlertBase & AlertDismiss;
|
|
@@ -12,7 +12,7 @@ import type { SxProps, Theme } from '@mui/material/styles/index.js';
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
|
|
14
14
|
import { atLeastRail, TOUCH_TARGET } from './SettingsLayout.styles';
|
|
15
|
-
import { rem } from '../../../tokens/relative';
|
|
15
|
+
import { rem, sxRem } from '../../../tokens/relative';
|
|
16
16
|
import { SettingsStatusMarker } from './SettingsStatusMarker';
|
|
17
17
|
import type {
|
|
18
18
|
SettingsLayoutProps,
|
|
@@ -27,6 +27,8 @@ export interface RailShape {
|
|
|
27
27
|
variant: SettingsNavVariant;
|
|
28
28
|
breakpoint: SettingsRailBreakpoint;
|
|
29
29
|
atIndex: boolean;
|
|
30
|
+
/** The rail is drawn as a card (`railVariant="card"`): denser rows, darker text. */
|
|
31
|
+
card?: boolean;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
interface RailItemProps extends RailShape {
|
|
@@ -69,6 +71,34 @@ function RailItemContent({
|
|
|
69
71
|
);
|
|
70
72
|
}
|
|
71
73
|
|
|
74
|
+
/**
|
|
75
|
+
* The row's text colour. On the card the active row's red is the darker one,
|
|
76
|
+
* since `primary.main` on its 12% wash measured 4.19:1 — under AA at 16px —
|
|
77
|
+
* and the rest read in the body colour, as the card's prototype draws them.
|
|
78
|
+
*/
|
|
79
|
+
function railItemColor(active: boolean, card: boolean): string {
|
|
80
|
+
if (active) return card ? 'primary.dark' : 'primary.main';
|
|
81
|
+
return card ? 'text.primary' : 'text.secondary';
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Keyboard focus as a ring, not MUI's grey fill: the fill measured 1.3:1
|
|
86
|
+
* against the rail, under the 3:1 a focus indicator needs.
|
|
87
|
+
*/
|
|
88
|
+
const FOCUS_RING_SX = {
|
|
89
|
+
'&.Mui-focusVisible': {
|
|
90
|
+
outlineStyle: 'solid',
|
|
91
|
+
outlineWidth: sxRem(2),
|
|
92
|
+
outlineColor: 'primary.main',
|
|
93
|
+
outlineOffset: sxRem(-2),
|
|
94
|
+
},
|
|
95
|
+
} as const;
|
|
96
|
+
|
|
97
|
+
/** The card's rows from the breakpoint up: 36px, the prototype's rail density. */
|
|
98
|
+
function cardRowSx(theme: Theme, breakpoint: SettingsRailBreakpoint): Record<string, unknown> {
|
|
99
|
+
return { [atLeastRail(theme, breakpoint)]: { minHeight: rem(theme, 36), py: sxRem(6) } };
|
|
100
|
+
}
|
|
101
|
+
|
|
72
102
|
/** One rail entry — a link when it has `href`, inert text when it says so, else a button. */
|
|
73
103
|
export function SettingsRailItem({
|
|
74
104
|
item,
|
|
@@ -79,6 +109,7 @@ export function SettingsRailItem({
|
|
|
79
109
|
testIdPrefix,
|
|
80
110
|
variant,
|
|
81
111
|
breakpoint,
|
|
112
|
+
card = false,
|
|
82
113
|
}: RailItemProps): React.JSX.Element {
|
|
83
114
|
const theme = useTheme();
|
|
84
115
|
// In `drilldown` the narrow rail IS the page's list, so its rows are the
|
|
@@ -95,11 +126,13 @@ export function SettingsRailItem({
|
|
|
95
126
|
mb: 0.25,
|
|
96
127
|
gap: 1.5,
|
|
97
128
|
...touchFloor,
|
|
98
|
-
|
|
129
|
+
...(card ? cardRowSx(theme, breakpoint) : null),
|
|
130
|
+
color: railItemColor(active, card),
|
|
99
131
|
'&.Mui-selected': {
|
|
100
132
|
bgcolor: alpha(theme.palette.primary.main, 0.12),
|
|
101
133
|
'&:hover': { bgcolor: alpha(theme.palette.primary.main, 0.18) },
|
|
102
134
|
},
|
|
135
|
+
...FOCUS_RING_SX,
|
|
103
136
|
},
|
|
104
137
|
};
|
|
105
138
|
const content = <RailItemContent item={item} active={active} testIdPrefix={testIdPrefix} />;
|
|
@@ -171,7 +204,9 @@ function indexListSx(shape: RailShape): Extract<SxProps<Theme>, (theme: Theme) =
|
|
|
171
204
|
// One spacing unit (8px). This is an `sx` callback, where a bare 8 is
|
|
172
205
|
// EIGHT units — it drew a 64px gutter between the two columns.
|
|
173
206
|
columnGap: 1,
|
|
174
|
-
|
|
207
|
+
// From `md`, not `sm`: at 600 two columns of bare text rows read as one
|
|
208
|
+
// list with a hole in it, and a row's status dot sat nearer the next column.
|
|
209
|
+
[theme.breakpoints.up('md')]: { gridTemplateColumns: '1fr 1fr' },
|
|
175
210
|
[atLeastRail(theme, shape.breakpoint)]: { gridTemplateColumns: '1fr' },
|
|
176
211
|
});
|
|
177
212
|
}
|
|
@@ -333,7 +333,12 @@ export function SettingsRail({
|
|
|
333
333
|
testIdPrefix={testIdPrefix}
|
|
334
334
|
/>
|
|
335
335
|
) : null}
|
|
336
|
-
<SettingsRailBody
|
|
336
|
+
<SettingsRailBody
|
|
337
|
+
navOpen={navOpen}
|
|
338
|
+
testIdPrefix={testIdPrefix}
|
|
339
|
+
card={railVariant === 'card'}
|
|
340
|
+
{...bodyProps}
|
|
341
|
+
/>
|
|
337
342
|
</Box>
|
|
338
343
|
);
|
|
339
344
|
}
|
|
@@ -58,7 +58,11 @@ function railLookOf({
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/** Stacked below the rail's breakpoint, two columns at and above it. */
|
|
61
|
-
function shellSx(
|
|
61
|
+
function shellSx(
|
|
62
|
+
breakpoint: SettingsLayoutProps['railBreakpoint'],
|
|
63
|
+
fillHeight: boolean,
|
|
64
|
+
railVariant: SettingsLayoutProps['railVariant'],
|
|
65
|
+
): SxProps<Theme> {
|
|
62
66
|
return (theme: Theme) => ({
|
|
63
67
|
display: 'flex',
|
|
64
68
|
flexDirection: 'column' as const,
|
|
@@ -71,7 +75,9 @@ function shellSx(breakpoint: SettingsLayoutProps['railBreakpoint'], fillHeight:
|
|
|
71
75
|
// convenience.
|
|
72
76
|
[atLeastRail(theme, breakpoint ?? 'md')]: {
|
|
73
77
|
flexDirection: 'row',
|
|
74
|
-
|
|
78
|
+
// A card stands apart from the panel by 32px, as its prototype draws it;
|
|
79
|
+
// the ruled column keeps its 24.
|
|
80
|
+
gap: railVariant === 'card' ? 4 : 3,
|
|
75
81
|
...(fillHeight ? { height: '100%', minHeight: 0 } : {}),
|
|
76
82
|
},
|
|
77
83
|
});
|
|
@@ -137,7 +143,7 @@ export const SettingsLayout: React.FC<SettingsLayoutProps> = (props) => {
|
|
|
137
143
|
data-testid={testIdPrefix}
|
|
138
144
|
data-nav-variant={navVariant}
|
|
139
145
|
data-at-index={atIndex ? 'true' : 'false'}
|
|
140
|
-
sx={shellSx(railBreakpoint, fillHeight)}
|
|
146
|
+
sx={shellSx(railBreakpoint, fillHeight, railLookOf(props).railVariant)}
|
|
141
147
|
>
|
|
142
148
|
<SettingsRail
|
|
143
149
|
title={title}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/Alert/Alert.metrics.ts"],"sourcesContent":["import type { AlertVariant } from './Alert.base';\nimport { alpha, darken, lighten } from '../../../tokens/color';\nimport { NEUTRAL_RAMP } from '../../../tokens/ink.core';\nimport { contrastText, type UiGreyStep, type UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `Alert` RENDERERS DRAW WITH.\n *\n * `Alert.styles.tsx` / `Alert.tsx` (MUI) and `Alert.native.tsx` (React\n * Native) read this one table. Spacing is in SPACING UNITS where the web\n * writes `theme.spacing(n)`; durations are ms (the web turns them into `s`\n * through {@link seconds} so its emitted CSS is byte-for-byte what it was);\n * everything else is px, a ratio or an alpha. The hover, active and focus\n * numbers are here too although only the DOM can honour them — a number the\n * web draws with belongs in the table whether or not native can reach it.\n */\n\n/** The root: 12px corners, 14px 16px of padding, one 300ms curve for everything. */\nexport const ALERT_RADIUS_UNITS = 1.5;\nexport const ALERT_PADDING_UNITS = { vertical: 1.75, horizontal: 2 } as const;\nexport const ALERT_TRANSITION_MS = 300;\nexport const ALERT_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n\n/** Mount: the web's `fadeInScale` keyframes and the icon's `iconRotate`. */\nexport const FADE_IN = { ms: 300, scale: 0.95, lift: 10 } as const;\nexport const ICON_SPIN = { ms: 600, from: 0.8, mid: 1.1 } as const;\n/** Dismiss: MUI `Collapse` runs 300ms; `onClose` fires 200ms in. */\nexport const COLLAPSE_MS = 300;\nexport const CLOSE_DELAY_MS = 200;\n\n/** The message column: 8px between title, description and children; 0.95rem body on 1.5. */\nexport const MESSAGE_GAP_UNITS = 1;\nexport const MESSAGE_FONT_SIZE = 15.2;\nexport const MESSAGE_LINE_HEIGHT = 1.5;\n/** A control inside the message gets an edge: 4px above, a hairline at 0.45 of the hue. */\nexport const MESSAGE_BUTTON = { marginTopUnits: 0.5, borderAlpha: 0.45 } as const;\n\n/** The title: 1.05rem at 600; MUI's `AlertTitle` lifts it 2px; 4px below it when a description follows. */\nexport const TITLE = { fontSize: 16.8, fontWeight: 600, marginTop: -2, marginBottomUnits: 0.5 } as const;\n/** The description: 0.925rem, slightly faded. */\nexport const DESCRIPTION = { fontSize: 14.8, opacity: 0.9 } as const;\n\n/** The icon slot: MUI's 22px glyph at 0.9, 14px from the words, 2px down (MUI's 7px stays below). */\nexport const ICON_SLOT = { size: 22, opacity: 0.9, marginRightUnits: 1.75, paddingTopUnits: 0.25, paddingBottom: 7 } as const;\n/** The action slot: MUI's `4px 0 0 16px` with the 16px ours, pushed right, 8px into the padding. */\nexport const ACTION_SLOT = { paddingLeftUnits: 2, paddingTop: 4, marginRight: -8 } as const;\n/** The close button: MUI's small `IconButton` (5px padding, 18px glyph) at 0.7. */\nexport const CLOSE_BUTTON = { padding: 5, iconSize: 18, opacity: 0.7, washAlpha: 0.1 } as const;\n\n/**\n * A semantic Alert's surface and ink: an OPAQUE tint of the hue with a dark\n * ink of the same hue — MUI's own `standard` recipe, at its ratios. See\n * `semanticSurface` in `Alert.styles.tsx` for why not `alpha(main, 0.1)`.\n */\nexport const SEMANTIC_SURFACE = { tint: { light: 0.9, dark: 0.8 }, ink: 0.6, borderAlpha: 0.35 } as const;\n/** `glass`: 85% paper under a 20px blur, a 0.4 divider hairline. */\nexport const GLASS = { backgroundAlpha: 0.85, borderAlpha: 0.4, blur: 20, saturatePercent: 180 } as const;\n/**\n * `gradient`: light→dark at 0.9 along 135°, a 0.2 white shimmer sweeping 1000px every 3s.\n *\n * It carries no hover of its own, and that is load-bearing rather than an\n * omission. `alertVariantStyles` is spread AFTER the root's `'&:hover'` in the\n * same object literal, so a second `'&:hover'` key does not merge with it — it\n * REPLACES it. While this variant had one, `gradient` was the only alert that\n * brightened on hover while every other variant darkened, and the only one to\n * lose the shimmer reveal the root's hover performs.\n */\nexport const GRADIENT = {\n angleDeg: 135,\n stopAlpha: 0.9,\n shimmerAlpha: 0.2,\n shimmerMs: 3000,\n shimmerTravel: 1000,\n} as const;\n\n/** Emphasis: the glow's shadow and brightness, the pulse's wash. */\nexport const GLOW = { blur: 20, spread: 5, alpha: 0.3, brightness: 1.05 } as const;\nexport const PULSE = { alpha: 0.2, ms: 2000, spread: 10 } as const;\n\n/**\n * Pointer states — DOM only, kept so the web derives them.\n *\n * HOVER and ACTIVE carry NO geometry, and that is the point rather than an\n * omission. They used to lift the card 3px, scale it 1.01, grow a 20px shadow\n * and spin the icon 10deg at 1.15 — four things moving at once on a surface\n * that is not a control, which made a page of alerts twitch under the pointer.\n *\n * Both are a TINT now: a flat inset layer over the surface. Two mechanisms\n * came before it and each failed on a case the next had to fix. Dropping the\n * element's `opacity` composites toward the PAGE, so it inverted the hover on\n * a light tint (L* 95.0 idle, 89.1 hovered, 91.1 pressed) and vanished on a\n * dark one. A `filter: brightness()` fixed the direction but is MULTIPLICATIVE,\n * so it moved a near-black `glass` by four counts (ΔE76 1.71, under the JND)\n * and Banner's 10%-alpha wash by ΔE76 0.44. A layer is additive: it reads the\n * same on an opaque tint, a translucent wash and a gradient, and because it\n * paints above the background and below the content the ink keeps its own\n * contrast.\n */\nexport const HOVER = { tintAlpha: 0.06 } as const;\n\n/**\n * The press: a 20% tint LAYER, eased back fast.\n *\n * The layer is the point. The first attempt dropped the whole element's\n * opacity, which composites toward the PAGE and so behaves differently on\n * every surface it is asked about. Measured: over a light page it made a light\n * tint LIGHTER (L* 95.0 idle, 89.1 hovered, 91.1 pressed), so pushing the\n * surface looked like the pointer leaving; over a dark page it landed back on\n * the idle surface (ΔE76 0.82 on `glass`); on `gradient` it washed white body\n * copy to 2.31:1, under AA; and it diluted the ink during a text-selection\n * drag. A `brightness()` step instead of it fixed the direction but not the\n * reach — a multiplier does nothing to a near-black `glass` in dark mode\n * (ΔE76 1.71) and nothing to Banner's 10%-alpha wash (ΔE76 0.44), because it\n * scales only what the element already paints.\n *\n * An inset shadow at 100vmax is a flat tint over the whole surface: ADDITIVE,\n * so it reads the same on an opaque tint, a translucent wash and a gradient;\n * painted above the background and below the content, so the ink keeps its\n * own contrast; and animatable, which `background-image` is not.\n *\n * `ms` is 250 and not the 1000 first asked for, and the reason is that ONE\n * property carries both states. CSS runs a transition from the DESTINATION\n * state's declaration, and entering hover and releasing a press share that\n * destination — so they cannot have different durations without a second\n * animatable property, and both free pseudo-elements are already spent on the\n * `gradient` shimmer and the `pulse` wash. At 1000ms the hover inherited the\n * second: crossing an alert in 300ms peaked at a ≈ 0.024, under the JND, and\n * for ~360ms the alert you had just LEFT was darker than the one under the\n * pointer. A fast press-return is the smaller loss, and it is the call the\n * product owner made when shown both.\n */\nexport const ACTIVE = { tintAlpha: 0.2, ms: 250 } as const;\n\nexport const FOCUS = { ringWidth: 2, ringAlpha: 1, offset: 2 } as const;\n\n/** `neutral` has no palette slot; the web has always drawn it from three greys. */\nexport const NEUTRAL_GREY: Record<'main' | 'light' | 'dark', UiGreyStep> = { main: 500, light: 300, dark: 700 };\n\n/** A duration as the CSS the web has always emitted: `2000` → `2s`, `300` → `0.3s`. */\nexport const seconds = (ms: number): string => `${ms / 1000}s`;\n\n/** The palette shape the web's `getColorFromTheme` returns — a main plus optional shades. */\nexport interface AlertPalette {\n main: string;\n light?: string;\n dark?: string;\n}\n\n/**\n * The renderer-free twin of the web's `getColorFromTheme`: a variant or\n * colour name to its palette, `neutral` from the greys, anything unknown\n * (`glass`, `gradient`) to `info`.\n */\nexport function alertPalette(theme: UiTheme, key: string | undefined): AlertPalette {\n switch (key) {\n case 'info':\n case 'success':\n case 'warning':\n case 'danger':\n case 'primary':\n case 'secondary':\n return theme.palette[key];\n case 'neutral':\n return {\n main: NEUTRAL_RAMP[NEUTRAL_GREY.main],\n light: NEUTRAL_RAMP[NEUTRAL_GREY.light],\n dark: NEUTRAL_RAMP[NEUTRAL_GREY.dark],\n };\n default:\n return theme.palette.info;\n }\n}\n\n/** What a variant paints: its fill, its ink, its hairline if any, and the colour of its glyph. */\nexport interface AlertSurface {\n backgroundColor: string;\n color: string;\n borderColor?: string;\n iconColor: string;\n}\n\nexport const SEMANTIC_VARIANTS: ReadonlySet<AlertVariant> = new Set(['info', 'success', 'warning', 'danger']);\n\n/** The opaque tint and same-hue ink, inverted for dark mode; the hairline keeps its alpha. */\nexport function semanticSurface(theme: UiTheme, palette: AlertPalette): AlertSurface {\n const dark = theme.mode === 'dark';\n return {\n backgroundColor: dark\n ? darken(palette.main, SEMANTIC_SURFACE.tint.dark)\n : lighten(palette.main, SEMANTIC_SURFACE.tint.light),\n color: dark ? lighten(palette.main, SEMANTIC_SURFACE.ink) : darken(palette.main, SEMANTIC_SURFACE.ink),\n borderColor: alpha(palette.main, SEMANTIC_SURFACE.borderAlpha),\n iconColor: palette.main,\n };\n}\n\nexport function glassSurface(theme: UiTheme): AlertSurface {\n return {\n backgroundColor: alpha(theme.palette.background.paper, GLASS.backgroundAlpha),\n color: theme.palette.text.primary,\n borderColor: alpha(theme.palette.divider, GLASS.borderAlpha),\n iconColor: theme.palette.primary.main,\n };\n}\n\n/** The gradient's two stops; a renderer with no gradient fill paints `from`. */\nexport function gradientStops(palette: AlertPalette): { from: string; to: string } {\n return {\n from: alpha(palette.light || palette.main, GRADIENT.stopAlpha),\n to: alpha(palette.dark || palette.main, GRADIENT.stopAlpha),\n };\n}\n\nexport function gradientSurface(palette: AlertPalette): AlertSurface {\n const ink = contrastText(palette.main);\n return { backgroundColor: gradientStops(palette).from, color: ink, iconColor: ink };\n}\n\n/** The surface for a variant, `glass` and `gradient` included. */\nexport function alertSurface(theme: UiTheme, variant: AlertVariant, palette: AlertPalette): AlertSurface {\n if (variant === 'glass') return glassSurface(theme);\n if (variant === 'gradient') return gradientSurface(palette);\n return semanticSurface(theme, palette);\n}\n"],"mappings":";;;;;;;;;;;;;AAkBO,IAAM,qBAAqB;AAC3B,IAAM,sBAAsB,EAAE,UAAU,MAAM,YAAY,EAAE;AAC5D,IAAM,sBAAsB;AAC5B,IAAM,eAAe;AAGrB,IAAM,UAAU,EAAE,IAAI,KAAK,OAAO,MAAM,MAAM,GAAG;AACjD,IAAM,YAAY,EAAE,IAAI,KAAK,MAAM,KAAK,KAAK,IAAI;AAEjD,IAAM,cAAc;AACpB,IAAM,iBAAiB;AAGvB,IAAM,oBAAoB;AAC1B,IAAM,oBAAoB;AAC1B,IAAM,sBAAsB;AAE5B,IAAM,iB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AM,OAAO,KAAK,WAAW,IAAI;AACpF;AAGO,SAAS,aAAa,OAAgB,SAAuB,SAAqC;AACvG,MAAI,YAAY,QAAS,QAAO,aAAa,KAAK;AAClD,MAAI,YAAY,WAAY,QAAO,gBAAgB,OAAO;AAC1D,SAAO,gBAAgB,OAAO,OAAO;AACvC;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/SettingsLayout/SettingsLayout.items.tsx"],"sourcesContent":["'use client';\n\nimport Box from '@mui/material/Box/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 Typography from '@mui/material/Typography/index.js';\nimport { alpha, useTheme } from '@mui/material/styles/index.js';\nimport type { SxProps, Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { atLeastRail, TOUCH_TARGET } from './SettingsLayout.styles';\nimport { rem } from '../../../tokens/relative';\nimport { SettingsStatusMarker } from './SettingsStatusMarker';\nimport type {\n SettingsLayoutProps,\n SettingsNavGroup,\n SettingsNavItem,\n SettingsNavVariant,\n SettingsRailBreakpoint,\n} from './SettingsLayout.types';\n\n/** The shape-deciding inputs every rail part needs to know about. */\nexport interface RailShape {\n variant: SettingsNavVariant;\n breakpoint: SettingsRailBreakpoint;\n atIndex: boolean;\n}\n\ninterface RailItemProps extends RailShape {\n item: SettingsNavItem;\n active: boolean;\n linkComponent?: SettingsLayoutProps['linkComponent'];\n onSelectItem?: (id: string) => void;\n /** Called on activation so the `switcher`'s rail can collapse after a choice. */\n onNavigate?: () => void;\n testIdPrefix: string;\n}\n\n/** Label, plus the situation marker when the host resolved one. */\nfunction RailItemContent({\n item,\n active,\n testIdPrefix,\n}: {\n item: SettingsNavItem;\n active: boolean;\n testIdPrefix: string;\n}): React.JSX.Element {\n return (\n <>\n {item.icon ? (\n <ListItemIcon sx={{ minWidth: 0, color: 'inherit' }}>{item.icon}</ListItemIcon>\n ) : null}\n <ListItemText\n primary={item.label}\n primaryTypographyProps={{ variant: 'body2', noWrap: true, fontWeight: active ? 600 : 500 }}\n />\n {item.status ? (\n <SettingsStatusMarker\n status={item.status}\n label={item.statusLabel}\n testId={`${testIdPrefix}-status-${item.id}`}\n />\n ) : null}\n </>\n );\n}\n\n/** One rail entry — a link when it has `href`, inert text when it says so, else a button. */\nexport function SettingsRailItem({\n item,\n active,\n linkComponent,\n onSelectItem,\n onNavigate,\n testIdPrefix,\n variant,\n breakpoint,\n}: RailItemProps): React.JSX.Element {\n const theme = useTheme();\n // In `drilldown` the narrow rail IS the page's list, so its rows are the\n // primary touch targets rather than a secondary column — hence the 44px floor\n // below the breakpoint. Above it, the row goes back to rail density.\n const touchFloor =\n variant === 'drilldown'\n ? { minHeight: rem(theme, TOUCH_TARGET), [atLeastRail(theme, breakpoint)]: { minHeight: 'auto' } }\n : null;\n const shared = {\n 'data-testid': `${testIdPrefix}-item-${item.id}`,\n sx: {\n borderRadius: 1.5,\n mb: 0.25,\n gap: 1.5,\n ...touchFloor,\n color: active ? 'primary.main' : 'text.secondary',\n '&.Mui-selected': {\n bgcolor: alpha(theme.palette.primary.main, 0.12),\n '&:hover': { bgcolor: alpha(theme.palette.primary.main, 0.18) },\n },\n },\n };\n const content = <RailItemContent item={item} active={active} testIdPrefix={testIdPrefix} />;\n\n // Listed but not reachable from here. Deliberately not a disabled button: a\n // disabled control says \"you may not\", and the true statement is \"not from\n // this screen\" — the section exists and someone else's screen owns it.\n if (item.inert) {\n return (\n <ListItem {...shared} data-inert=\"true\">\n {content}\n </ListItem>\n );\n }\n\n const interactive = {\n ...shared,\n selected: active,\n 'aria-current': active ? ('page' as const) : undefined,\n };\n\n if (item.href && linkComponent) {\n const LinkComponent = linkComponent;\n return (\n <ListItemButton\n component={LinkComponent}\n href={item.href}\n onClick={onNavigate}\n {...interactive}\n >\n {content}\n </ListItemButton>\n );\n }\n return (\n <ListItemButton\n onClick={() => {\n onSelectItem?.(item.id);\n onNavigate?.();\n }}\n {...interactive}\n >\n {content}\n </ListItemButton>\n );\n}\n\ninterface RailGroupProps extends RailShape {\n group: SettingsNavGroup;\n activeItemId?: string;\n linkComponent?: SettingsLayoutProps['linkComponent'];\n onSelectItem?: (id: string) => void;\n onNavigate?: () => void;\n testIdPrefix: string;\n}\n\n/**\n * The list's own grid, in `drilldown` at the index only.\n *\n * At the index on a wide phone or a tablet the list has room for two columns;\n * the rail column never does, so the second column is undone at exactly the\n * width where this stops being the page.\n */\nfunction indexListSx(shape: RailShape): Extract<SxProps<Theme>, (theme: Theme) => unknown> | null {\n if (shape.variant !== 'drilldown' || !shape.atIndex) return null;\n return (theme: import('@mui/material').Theme) => ({\n display: 'grid',\n gridTemplateColumns: '1fr',\n // One spacing unit (8px). This is an `sx` callback, where a bare 8 is\n // EIGHT units — it drew a 64px gutter between the two columns.\n columnGap: 1,\n [theme.breakpoints.up('sm')]: { gridTemplateColumns: '1fr 1fr' },\n [atLeastRail(theme, shape.breakpoint)]: { gridTemplateColumns: '1fr' },\n });\n}\n\n/** A category: header + optional description + its items. */\nexport function SettingsRailGroup({\n group,\n activeItemId,\n linkComponent,\n onSelectItem,\n onNavigate,\n testIdPrefix,\n ...shape\n}: RailGroupProps): React.JSX.Element {\n const grid = indexListSx(shape);\n return (\n <Box data-testid={`${testIdPrefix}-group-${group.id}`} sx={{ mb: 2 }}>\n <Typography\n variant=\"caption\"\n sx={{\n display: 'block',\n px: 1,\n color: 'text.secondary',\n fontWeight: 600,\n textTransform: 'uppercase',\n letterSpacing: '0.06em',\n }}\n >\n {group.label}\n </Typography>\n {group.description ? (\n <Typography variant=\"caption\" component=\"p\" sx={{ px: 1, mt: 0.25, color: 'text.disabled' }}>\n {group.description}\n </Typography>\n ) : null}\n <List\n disablePadding\n sx={(theme) => ({ mt: 0.5, ...(grid ? grid(theme) : null) })}\n >\n {group.items.map((item) => (\n <SettingsRailItem\n key={item.id}\n item={item}\n active={item.id === activeItemId}\n linkComponent={linkComponent}\n onSelectItem={onSelectItem}\n onNavigate={onNavigate}\n testIdPrefix={testIdPrefix}\n {...shape}\n />\n ))}\n </List>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAEA,OAAO,SAAS;AAChB,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,OAAO,oBAAoB;AAC3B,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,gBAAgB;AACvB,SAAS,OAAO,gBAAgB;AA2C5B,mBAEI,KAFJ;AAVJ,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF,GAIsB;AACpB,SACE,iCACG;AAAA,SAAK,OACJ,oBAAC,gBAAa,IAAI,EAAE,UAAU,GAAG,OAAO,UAAU,GAAI,eAAK,MAAK,IAC9D;AAAA,IACJ;AAAA,MAAC;AAAA;AAAA,QACC,SAAS,KAAK;AAAA,QACd,wBAAwB,EAAE,SAAS,SAAS,QAAQ,MAAM,YAAY,SAAS,MAAM,IAAI;AAAA;AAAA,IAC3F;AAAA,IACC,KAAK,SACJ;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,KAAK;AAAA,QACb,OAAO,KAAK;AAAA,QACZ,QAAQ,GAAG,YAAY,WAAW,KAAK,EAAE;AAAA;AAAA,IAC3C,IACE;AAAA,KACN;AAEJ;AAGO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAqC;AACnC,QAAM,QAAQ,SAAS;AAIvB,QAAM,aACJ,YAAY,cACR,EAAE,WAAW,IAAI,OAAO,YAAY,GAAG,CAAC,YAAY,OAAO,UAAU,CAAC,GAAG,EAAE,WAAW,OAAO,EAAE,IAC/F;AACN,QAAM,SAAS;AAAA,IACb,eAAe,GAAG,YAAY,SAAS,KAAK,EAAE;AAAA,IA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;AAGO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsC;AACpC,QAAM,OAAO,YAAY,KAAK;AAC9B,SACE,qBAAC,OAAI,eAAa,GAAG,YAAY,UAAU,MAAM,EAAE,IAAI,IAAI,EAAE,IAAI,EAAE,GACjE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,IAAI;AAAA,UACF,SAAS;AAAA,UACT,IAAI;AAAA,UACJ,OAAO;AAAA,UACP,YAAY;AAAA,UACZ,eAAe;AAAA,UACf,eAAe;AAAA,QACjB;AAAA,QAEC,gBAAM;AAAA;AAAA,IACT;AAAA,IACC,MAAM,cACL,oBAAC,cAAW,SAAQ,WAAU,WAAU,KAAI,IAAI,EAAE,IAAI,GAAG,IAAI,MAAM,OAAO,gBAAgB,GACvF,gBAAM,aACT,IACE;AAAA,IACJ;AAAA,MAAC;AAAA;AAAA,QACC,gBAAc;AAAA,QACd,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,GAAI,OAAO,KAAK,KAAK,IAAI,KAAM;AAAA,QAEzD,gBAAM,MAAM,IAAI,CAAC,SAChB;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA,QAAQ,KAAK,OAAO;AAAA,YACpB;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACC,GAAG;AAAA;AAAA,UAPC,KAAK;AAAA,QAQZ,CACD;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/SettingsLayout/SettingsLayout.tsx"],"sourcesContent":["'use client';\n\nimport Box from '@mui/material/Box/index.js';\nimport type { SxProps, Theme } from '@mui/material/styles/index.js';\nimport React, { useMemo, useState } from 'react';\n\nimport { withDefaults } from '../../../utils/withDefaults';\nimport { activeItemLabel, filterGroups } from './SettingsLayout.filters';\nimport { SettingsRail } from './SettingsLayout.rail';\nimport { atLeastRail } from './SettingsLayout.styles';\nimport { SettingsPanel } from './SettingsPanel';\nimport type { SettingsLayoutProps } from './SettingsLayout.types';\n\n/**\n * The props with every default already applied.\n *\n * A table through `withDefaults` rather than a `= default` per destructured\n * prop: each of those is a branch, and seven of them put the component over the\n * complexity bar before it renders anything. The single cast is what buys the\n * body non-optional values — without it every use site would restate the\n * default as a `??`, which is the same default written twice and free to drift.\n */\ntype ResolvedProps = SettingsLayoutProps &\n Required<\n Pick<\n SettingsLayoutProps,\n | 'searchPlaceholder'\n | 'defaultQuery'\n | 'emptySearchLabel'\n | 'testIdPrefix'\n | 'railBreakpoint'\n | 'navVariant'\n | 'atIndex'\n | 'backLabel'\n >\n >;\n\nconst DEFAULTS = {\n searchPlaceholder: 'Search settings',\n defaultQuery: '',\n emptySearchLabel: 'No settings match your search.',\n testIdPrefix: 'settings',\n railBreakpoint: 'md',\n navVariant: 'switcher',\n atIndex: false,\n backLabel: 'Back',\n} satisfies Partial<SettingsLayoutProps>;\n\n/**\n * How the rail looks: its search field, and its frame from the breakpoint up.\n * Both default to the shape every consumer had before they existed.\n */\nfunction railLookOf({\n searchable = true,\n railVariant = 'divided',\n}: SettingsLayoutProps): Required<Pick<SettingsLayoutProps, 'searchable' | 'railVariant'>> {\n return { searchable, railVariant };\n}\n\n/** Stacked below the rail's breakpoint, two columns at and above it. */\nfunction shellSx(breakpoint: SettingsLayoutProps['railBreakpoint'], fillHeight: boolean): SxProps<Theme> {\n return (theme: Theme) => ({\n display: 'flex',\n flexDirection: 'column' as const,\n alignItems: 'stretch',\n gap: 1.5,\n width: '100%',\n minWidth: 0,\n // Only ever at the wide shape. Narrow, the rail is a disclosure or the page\n // itself, and two independent scrollbars on a phone is a trap rather than a\n // convenience.\n [atLeastRail(theme, breakpoint ?? 'md')]: {\n flexDirection: 'row',\n gap: 3,\n ...(fillHeight ? { height: '100%', minHeight: 0 } : {}),\n },\n });\n}\n\n/**\n * A reusable, agnostic Facebook-style settings shell: a searchable left rail of\n * grouped categories/subcategories and a central panel that renders the selected\n * configuration screen (`children`). Navigation is data-driven via `groups`; the\n * host owns routing (pass `linkComponent` + item `href`, or handle `onSelectItem`).\n *\n * ## Two narrow-width shapes\n *\n * `navVariant=\"switcher\"` (the default) folds the rail into a disclosure above\n * the panel. `navVariant=\"drilldown\"` gives the phone shape instead: at the\n * area's index the LIST is the page, and inside a section the panel is the page\n * with a back link and a scrollable strip of sibling sections above it.\n *\n * ## Why the width decision is CSS and not JavaScript\n *\n * Every part that changes between the two shapes does it through a `display`\n * pair keyed on `railBreakpoint`. Nothing here asks a media query in JS and\n * renders one branch.\n *\n * That is not a performance preference. A layout that RENDERS one navigation and\n * not the other can offer the narrow width less than the wide one, and no test\n * or review catches it — the missing control simply is not in the tree to be\n * asserted about. With both forms always mounted, \"the narrow width reaches\n * everything the wide one does\" holds by construction, and an audit that counts\n * controls per width gets the same answer at both.\n */\nexport const SettingsLayout: React.FC<SettingsLayoutProps> = (props) => {\n const {\n title,\n groups,\n activeItemId,\n onSelectItem,\n searchPlaceholder,\n defaultQuery,\n emptySearchLabel,\n emptySearchAction,\n linkComponent,\n children,\n testIdPrefix,\n railBreakpoint,\n fillHeight = false,\n navVariant,\n atIndex,\n indexHref,\n backLabel,\n sectionChips,\n } = withDefaults(props, DEFAULTS) as ResolvedProps;\n const [query, setQuery] = useState(defaultQuery);\n const [navOpen, setNavOpen] = useState(false);\n const filteredGroups = useMemo(() => filterGroups(groups, query), [groups, query]);\n const activeLabel = useMemo(() => activeItemLabel(groups, activeItemId), [groups, activeItemId]);\n\n const drilldown = navVariant === 'drilldown';\n const ariaLabel = typeof title === 'string' ? title : 'Settings';\n\n return (\n <Box\n data-testid={testIdPrefix}\n data-nav-variant={navVariant}\n data-at-index={atIndex ? 'true' : 'false'}\n sx={shellSx(railBreakpoint, fillHeight)}\n >\n <SettingsRail\n title={title}\n activeLabel={activeLabel}\n navOpen={navOpen}\n onToggleNav={() => setNavOpen((open) => !open)}\n query={query}\n onQueryChange={setQuery}\n searchPlaceholder={searchPlaceholder}\n emptySearchLabel={emptySearchLabel}\n emptySearchAction={emptySearchAction}\n filteredGroups={filteredGroups}\n activeItemId={activeItemId}\n linkComponent={linkComponent}\n onSelectItem={onSelectItem}\n onNavigate={() => setNavOpen(false)}\n testIdPrefix={testIdPrefix}\n variant={navVariant}\n {...railLookOf(props)}\n breakpoint={railBreakpoint}\n atIndex={atIndex}\n fillHeight={fillHeight}\n />\n\n <SettingsPanel\n inSection={drilldown && !atIndex}\n hideOnNarrow={drilldown && atIndex}\n breakpoint={railBreakpoint}\n indexHref={indexHref}\n sectionTitle={props.sectionTitle}\n sectionDescription={props.sectionDescription}\n backLabel={backLabel}\n ariaLabel={ariaLabel}\n sectionChips={sectionChips}\n activeItemId={activeItemId}\n linkComponent={linkComponent}\n onSelectItem={onSelectItem}\n testIdPrefix={testIdPrefix}\n fillHeight={fillHeight}\n >\n {children}\n </SettingsPanel>\n </Box>\n );\n};\n\nSettingsLayout.displayName = 'SettingsLayout';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAEA,OAAO,SAAS;AAEhB,SAAgB,SAAS,gBAAgB;AAmIrC,SAME,KANF;AAlGJ,IAAM,WAAW;AAAA,EACf,mBAAmB;AAAA,EACnB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AACb;AAMA,SAAS,WAAW;AAAA,EAClB,aAAa;AAAA,EACb,cAAc;AAChB,GAA2F;AACzF,SAAO,EAAE,YAAY,YAAY;AACnC;AAGA,SAAS,QAAQ,YAAmD,YAAqC;AACvG,SAAO,CAAC,WAAkB;AAAA,IACxB,SAAS;AAAA,IACT,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,UAAU;AAAA;AAAA;AAAA;AAAA,IAIV,CAAC,YAAY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W,KAAK;AAAA,YACpB,YAAY;AAAA,YACZ;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,aAAa,CAAC;AAAA,YACzB,cAAc,aAAa;AAAA,YAC3B,YAAY;AAAA,YACZ;AAAA,YACA,cAAc,MAAM;AAAA,YACpB,oBAAoB,MAAM;AAAA,YAC1B;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,eAAe,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/Alert/Alert.tsx"],"sourcesContent":["import Close from '@mui/icons-material/Close';\nimport MuiAlert from '@mui/material/Alert/index.js';\nimport AlertTitle from '@mui/material/AlertTitle/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport Collapse from '@mui/material/Collapse/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport { alpha, styled } from '@mui/material/styles/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { absoluteInk, modeInk } from '../../../tokens/ink';\n\nimport { resolveAlertProps, resolveAnnouncement, testIdFor } from './Alert.helpers';\nimport type { AlertPalette } from './Alert.metrics';\nimport {\n ACTIVE,\n GLOW,\n ALERT_EASING,\n ALERT_RADIUS_UNITS,\n ALERT_TRANSITION_MS,\n CLOSE_BUTTON,\n CLOSE_DELAY_MS,\n COLLAPSE_MS,\n DESCRIPTION,\n FADE_IN,\n FOCUS,\n HOVER,\n seconds,\n TITLE,\n} from './Alert.metrics';\nimport {\n alertEmphasisStyles,\n alertLayoutStyles,\n alertVariantStyles,\n fadeInScale,\n getColorFromTheme,\n getVariantIcon,\n} from './Alert.styles';\nimport type { AlertColor } from '@mui/material/Alert/index.js';\nimport type { AlertProps } from './Alert.types';\nimport { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { rem, rems, sxRem } from '../../../tokens/relative';\n\nconst transition = `all ${seconds(ALERT_TRANSITION_MS)} ${ALERT_EASING}`;\n\n// Define animations\n/**\n * The pointer states' shadow: a flat tint, plus the glow when the alert has one.\n *\n * The tint is an inset spread at 100vmax, which always exceeds the element, so\n * it covers the surface edge to edge. It paints ABOVE the background and BELOW\n * the content, which is what keeps the ink's own contrast out of these states\n * entirely — see `ACTIVE` in `Alert.metrics.ts` for why a layer replaced the\n * opacity dip and the brightness multiplier that each preceded it.\n *\n * The glow is COMPOSED rather than replaced, so hovering a glowing alert keeps\n * its glow; `glowStyles` gave up its `!important` for this.\n */\nfunction pointerShadow(\n theme: Theme,\n colorPalette: AlertPalette,\n glow: boolean,\n variant: string | undefined,\n): (alpha_: number) => string {\n // The tint moves the surface AWAY from its own ink, which is why this reads\n // the variant and not only the mode.\n //\n // `gradient` is the one variant where the two disagree: it paints a\n // mid-lightness sweep (L* 42–61) under WHITE ink in BOTH modes, so the\n // mode-keyed answer tinted it white in dark mode — toward the text. Measured:\n // white-on-gradient fell to 2.90:1 on hover and 2.41:1 pressed, under the 3:1\n // floor and below its own idle. Every other variant's surface tracks the mode,\n // so for them the two rules agree.\n const ink = variant === 'gradient' ? absoluteInk(theme).black : modeInk(theme);\n const glowShadow = glow\n ? `0 0 ${rems(theme, GLOW.blur, GLOW.spread)} ${alpha(colorPalette.main, GLOW.alpha)}`\n : null;\n return (alpha_) =>\n [`inset 0 0 0 100vmax ${alpha(ink, alpha_)}`, glowShadow].filter(Boolean).join(', ');\n}\n\nconst StyledAlert = styled(MuiAlert, {\n shouldForwardProp: (prop) =>\n !['customVariant', 'customColor', 'glow', 'pulse', 'animate'].includes(prop as string),\n})<{\n customVariant?: string;\n customColor?: string;\n glow?: boolean;\n pulse?: boolean;\n animate?: boolean;\n}>(({ theme, customVariant, customColor, glow, pulse, animate }) => {\n const colorPalette = getColorFromTheme(theme, customColor || customVariant || 'info');\n\n const withTint = pointerShadow(theme, colorPalette, Boolean(glow), customVariant);\n\n return {\n borderRadius: theme.spacing(ALERT_RADIUS_UNITS),\n transition: `${transition}, box-shadow ${seconds(ACTIVE.ms)} ${ALERT_EASING}`,\n position: 'relative',\n overflow: 'hidden',\n animation: animate ? `${fadeInScale(theme)} ${seconds(FADE_IN.ms)} ease-out` : 'none',\n willChange: 'transform, opacity',\n\n ...alertLayoutStyles(theme, colorPalette, animate),\n\n // Hover: one tint step, and nothing that moves. An alert is a surface\n // rather than a control, so the pointer only needs telling it is here. The\n // icon keeps its own place for the same reason — it is the variant's\n // meaning, not an affordance to animate.\n '&:hover': {\n boxShadow: withTint(HOVER.tintAlpha),\n\n '&::before': {\n opacity: 1,\n },\n },\n\n // Press: a 20% tint, landing at once and easing back. Still no geometry.\n //\n // `transition: none` here is what makes the dip INSTANT: a click's\n // `:active` lasts about as long as the finger is down, so easing into it\n // would be cut off in its first tenth and read as a flicker. The ease is on\n // the way back, governed by the root.\n //\n // Neither `:hover` nor `:focus-visible` may declare `transition`, and that\n // is not a style preference. `:active` under a mouse ALWAYS implies\n // `:hover`, so a bare shorthand in the hover block outranks the root's\n // (0,2,0 beats 0,1,0) and silently resets the timing this state rests on.\n //\n // The `:not(:has(…))` names CONTROLS, not any descendant. `:active`\n // matches an ancestor of whatever is pressed, so dismissing an alert\n // dimmed the alert being dismissed and pressing a call to action dimmed\n // the message explaining it. Excluding `:has(:active)` wholesale does not\n // work and was the first attempt: pressing the TEXT makes that text\n // `:active` too, so the guard matched on every press and the state never\n // fired at all.\n '&:active:not(:has(button:active, a:active, [role=\"button\"]:active))': {\n boxShadow: withTint(ACTIVE.tintAlpha),\n transition: 'none',\n },\n\n // Focus: `:focus-visible`, not `:focus-within`.\n //\n // The alert carries `tabIndex={0}`, so a MOUSE CLICK focused it and painted\n // the ring — a keyboard affordance answering a pointer, which is what made\n // clicking one look like an error state. `:focus-visible` is the browser's\n // own answer to \"did this focus come from the keyboard\": the ring stays for\n // whoever tabs here and never fires on a click.\n //\n // One ring, not three. It was a 3px outline at 3px offset UNDER a 6px halo,\n // and stacking two rings on one edge is what read as unfinished rather than\n // as emphasis.\n // It declares no `transition`: `outline-style` is discrete, so the ring\n // arrives at full width with only its COLOUR easing — from `currentcolor`,\n // the near-black alert ink, to the blue. That is a visible dark flash on\n // every keyboard focus, and it would also outrank the root's opacity\n // transition the way the hover block did.\n '&:focus-visible': {\n outline: `${rem(theme, FOCUS.ringWidth)} solid ${alpha(colorPalette.main, FOCUS.ringAlpha)}`,\n outlineOffset: rem(theme, FOCUS.offset),\n },\n\n ...alertVariantStyles(theme, customVariant, colorPalette),\n ...alertEmphasisStyles(theme, colorPalette, Boolean(glow), Boolean(pulse)),\n };\n});\n\n// glass and gradient are our own looks with no MUI severity of their own; both\n// borrow info's. danger is MUI's error.\nconst MUI_SEVERITY: Record<string, AlertColor> = {\n danger: 'error',\n glass: 'info',\n gradient: 'info',\n};\n\nconst toMuiSeverity = (variant: string): AlertColor =>\n MUI_SEVERITY[variant] ?? (variant as AlertColor);\n\nconst AlertContent: React.FC<{\n title?: AlertProps['title'];\n description?: AlertProps['description'];\n dataTestId?: string;\n children?: React.ReactNode;\n}> = ({ title, description, dataTestId, children }) => (\n <>\n {title && (\n <AlertTitle\n data-testid={testIdFor(dataTestId, 'title')}\n sx={{\n fontWeight: TITLE.fontWeight,\n fontSize: sxRem(TITLE.fontSize),\n marginBottom: description ? TITLE.marginBottomUnits : 0,\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n wordBreak: 'break-word',\n }}\n >\n {title}\n </AlertTitle>\n )}\n {description && (\n <Box\n component=\"div\"\n data-testid={testIdFor(dataTestId, 'message')}\n sx={{\n opacity: DESCRIPTION.opacity,\n fontSize: sxRem(DESCRIPTION.fontSize),\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n wordBreak: 'break-word',\n }}\n >\n {description}\n </Box>\n )}\n {children}\n </>\n);\n\nconst AlertCloseButton: React.FC<{ dataTestId?: string; label: string; onClose: () => void }> = ({\n dataTestId,\n label,\n onClose,\n}) => (\n <IconButton\n data-testid={testIdFor(dataTestId, 'close')}\n aria-label={label}\n color=\"inherit\"\n size=\"small\"\n onClick={onClose}\n sx={(theme) => ({\n transition,\n opacity: CLOSE_BUTTON.opacity,\n // Opacity and a wash only: the button used to spin 90deg and grow 1.1,\n // which drew the eye to the dismiss rather than to the message.\n '&:hover': {\n opacity: 1,\n backgroundColor: alpha(theme.palette.action.hover, CLOSE_BUTTON.washAlpha),\n },\n // A REAL ring, on the keyboard-only selector.\n //\n // This used to be `&:focus` setting `outline: 'none'` over a\n // `rgba(0,0,0,0.1)` wash — 1.25:1 against the info surface, and MUI's\n // ButtonBase already sets `outline: 0`, so there was no UA fallback\n // either. It went unnoticed while the ROOT still matched `:focus-within`\n // and drew a ring around the whole alert; moving the root to\n // `:focus-visible` took that away and left this button with no visible\n // focus at all. `Banner`'s dismiss already draws its own outline, so\n // this is also what keeps the two surfaces telling a keyboard user the\n // same thing.\n '&:focus-visible': {\n opacity: 1,\n // `currentColor` is the alert's own ink, inherited through\n // `color=\"inherit\"`, so the ring is drawn in whatever colour was\n // already chosen to be READ on this surface. Measured 11.2:1 on the\n // semantic variants and 5.7:1 on `gradient`.\n //\n // That is a reasoned choice, not a test-backed one, and the difference\n // matters: `alert-contrast.test.tsx` covers the ink of the four\n // semantic variants only — its `glass` case asserts the pane's alpha\n // rather than its ink, and `gradient` it does not render at all. A\n // translucent surface's contrast depends on what sits behind it, which\n // is why that test stops where it does and why this comment does not\n // borrow a guarantee it never made.\n outline: `${rem(theme, FOCUS.ringWidth)} solid currentColor`,\n outlineOffset: rem(theme, FOCUS.offset),\n backgroundColor: alpha(theme.palette.action.focus, CLOSE_BUTTON.washAlpha),\n },\n })}\n >\n <Close fontSize=\"inherit\" />\n </IconButton>\n);\n\n/**\n * The dismiss button, or nothing.\n *\n * Reads `closeLabel` straight off the props rather than through the\n * `definedProps` merge, which would widen it to `string | undefined` and hand\n * the button an empty name. The UNION in `AlertProps` guarantees the label\n * wherever `closable` is true — that narrowing is gone inside the component,\n * which is why the fallback below exists and why it is unreachable.\n */\nfunction dismissButton(\n props: AlertProps,\n dataTestId: string | undefined,\n onClose: () => void,\n): React.JSX.Element | null {\n if (!props.closable) return null;\n return <AlertCloseButton dataTestId={dataTestId} label={props.closeLabel} onClose={onClose} />;\n}\n\nexport const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, ref) => {\n const {\n variant,\n color,\n glow,\n pulse,\n icon,\n showIcon,\n onClose,\n title,\n description,\n children,\n animate,\n role: _role, announce: _announce, // resolved from `alertProps` — see `resolveAnnouncement`\n 'aria-atomic': ariaAtomic,\n ...others\n } = resolveAlertProps(alertProps);\n\n // Every spelling of the test id the shared contract allows, mapped to the\n // one the DOM reads and defaulted to `alert`; the native Alert does the same.\n const dataTestId = resolveTestId(others, 'alert');\n // Then the dismiss union, which `dismissButton` reads off `alertProps` rather\n // than through this destructure — so without this strip it rides `...props`\n // onto the DOM. `ALERT_DEFAULTS` supplies `closable: false`, so that happened\n // on EVERY alert, not only the closable ones.\n const props = withoutAlertOnlyProps(withoutTestIdProps(others));\n\n // Depends on `variant`, so it cannot live in the static defaults above.\n const announcement = resolveAnnouncement(alertProps, variant);\n const [open, setOpen] = React.useState(true);\n const [isClosing, setIsClosing] = React.useState(false);\n\n const handleClose = () => {\n setIsClosing(true);\n window.setTimeout(() => {\n setOpen(false);\n onClose?.();\n }, CLOSE_DELAY_MS);\n };\n\n const severity = toMuiSeverity(variant);\n\n const displayIcon = showIcon ? (\n <Box component=\"span\" data-testid={testIdFor(dataTestId, 'icon')}>\n {icon || getVariantIcon(variant)}\n </Box>\n ) : (\n false\n );\n\n const content = (\n <AlertContent title={title} description={description} dataTestId={dataTestId}>\n {children}\n </AlertContent>\n );\n\n return (\n <Collapse in={open && !isClosing} timeout={COLLAPSE_MS}>\n <StyledAlert\n ref={ref}\n data-testid={dataTestId}\n severity={severity}\n customVariant={variant}\n customColor={color}\n glow={glow}\n pulse={pulse}\n animate={animate}\n icon={displayIcon}\n role={announcement.role}\n aria-live={announcement['aria-live']}\n aria-atomic={ariaAtomic}\n tabIndex={0}\n action={dismissButton(alertProps, dataTestId, handleClose)}\n {...props}\n >\n {content}\n </StyledAlert>\n </Collapse>\n );\n});\n\n/**\n * The props `Alert` OWNS, which must never reach the DOM.\n *\n * `AlertProps` extends MUI's, whose rest-spread is how a host's real HTML\n * attributes get onto the root — so the same spread carries the alert's own\n * configuration unless it is named here. Everything else the component consumes\n * leaves through the destructure above; these two do not, because\n * `dismissButton` reads them off the original props to keep the dismiss union's\n * narrowing intact.\n *\n * Exported so a test can render an alert carrying every name on it and assert\n * none reaches the DOM — the check that would have caught `closable`.\n */\nexport const ALERT_ONLY_PROPS = ['closable', 'closeLabel'] as const;\n\nfunction withoutAlertOnlyProps<P extends object>(rest: P): P {\n const html = { ...rest } as Record<string, unknown>;\n for (const key of ALERT_ONLY_PROPS) delete html[key];\n return html as P;\n}\n\nAlert.displayName = 'Alert';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,SAAS;AAChB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,SAAS,OAAO,cAAc;AAE9B,OAAO,WAAW;AAgLhB,mBAEI,KAFJ;AA7IF,IAAM,aAAa,OAAO,QAAQ,mBAAmB,CAAC,IAAI,YAAY;AAetE,SAAS,cACP,OACA,cACA,MACA,SAC4B;AAU5B,QAAM,MAAM,YAAY,aAAa,YAAY,KAAK,EAAE,QAAQ,QAAQ,KAAK;AAC7E,QAAM,aAAa,OACf,OAAO,KAAK,OAAO,KAAK,MAAM,KAAK,MAAM,CAAC,IAAI,MAAM,aAAa,MAAM,KAAK,KAAK,CAAC,KAClF;AACJ,SAAO,CAAC,WACN,CAAC,uBAAuB,MAAM,KAAK,MAAM,CAAC,IAAI,UAAU,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,MAAM;AACtB,cAAQ,KAAK;AACb,gBAAU;AAAA,IACZ,GAAG,cAAc;AAAA,EACnB;AAEA,QAAM,WAAW,cAAc,OAAO;AAEtC,QAAM,cAAc,WAClB,oBAAC,OAAI,WAAU,QAAO,eAAa,UAAU,YAAY,MAAM,GAC5D,kBAAQ,eAAe,OAAO,GACjC,IAEA;AAGF,QAAM,UACJ,oBAAC,gBAAa,OAAc,aAA0B,YACnD,UACH;AAGF,SACE,oBAAC,YAAS,IAAI,QAAQ,CAAC,WAAW,SAAS,aACzC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa;AAAA,MACb;AAAA,MACA,eAAe;AAAA,MACf,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACN,MAAM,aAAa;AAAA,MACnB,aAAW,aAAa,WAAW;AAAA,MACnC,eAAa;AAAA,MACb,UAAU;AAAA,MACV,QAAQ,cAAc,YAAY,YAAY,WAAW;AAAA,MACxD,GAAG;AAAA,MAEH;AAAA;AAAA,EACH,GACF;AAEJ,CAAC;AAeM,IAAM,mBAAmB,CAAC,YAAY,YAAY;AAEzD,SAAS,sBAAwC,MAAY;AAC3D,QAAM,OAAO,EAAE,GAAG,KAAK;AACvB,aAAW,OAAO,iBAAkB,QAAO,KAAK,GAAG;AACnD,SAAO;AACT;AAEA,MAAM,cAAc;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|