@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.
Files changed (90) hide show
  1. package/NATIVE.md +1 -1
  2. package/dist/_internal/components/data-display/Alert/Alert.content.js +20 -0
  3. package/dist/_internal/components/data-display/Alert/Alert.content.js.map +1 -0
  4. package/dist/_internal/components/data-display/Alert/Alert.js +5 -3
  5. package/dist/_internal/components/data-display/Alert/Alert.metrics.js +3 -1
  6. package/dist/_internal/components/data-display/Alert/Alert.placement.js +8 -0
  7. package/dist/_internal/components/data-display/Alert/Alert.placement.js.map +1 -0
  8. package/dist/_internal/components/data-display/Alert/Alert.styles.js +2 -2
  9. package/dist/_internal/components/data-display/Banner/Banner.js +3 -3
  10. package/dist/_internal/components/data-display/Banner/Banner.styles.js +2 -2
  11. package/dist/_internal/components/data-display/CardKit/card-actions-context.js +6 -4
  12. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +7 -5
  13. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +7 -5
  14. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +6 -4
  15. package/dist/_internal/components/data-display/index.js +7 -5
  16. package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +6 -4
  17. package/dist/_internal/components/feedback/index.js +6 -4
  18. package/dist/_internal/components/index.js +8 -6
  19. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.items.js +1 -1
  20. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +3 -3
  21. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.rail.js +2 -2
  22. package/dist/{chunk-3VLVLZ6W.js → chunk-B34WHRKH.js} +2 -2
  23. package/dist/{chunk-JYAXTRNH.js → chunk-CCJJTLF7.js} +2 -2
  24. package/dist/{chunk-52CLMR47.js → chunk-ENXGWNCX.js} +2 -2
  25. package/dist/chunk-IVI574Y5.js +73 -0
  26. package/dist/chunk-IVI574Y5.js.map +1 -0
  27. package/dist/{chunk-3LHZCVGM.js → chunk-JNVUB2D4.js} +3 -1
  28. package/dist/chunk-JNVUB2D4.js.map +1 -0
  29. package/dist/{chunk-REEV7CLC.js → chunk-QDG6V7OC.js} +2 -2
  30. package/dist/chunk-QXUXO22M.js +9 -0
  31. package/dist/chunk-QXUXO22M.js.map +1 -0
  32. package/dist/{chunk-44AXT2SN.js → chunk-QZX43FIC.js} +2 -2
  33. package/dist/{chunk-4BLVVMY7.js → chunk-SL56MOKE.js} +27 -6
  34. package/dist/chunk-SL56MOKE.js.map +1 -0
  35. package/dist/{chunk-6KM3TL4Q.js → chunk-SO5OU2ZV.js} +7 -5
  36. package/dist/chunk-SO5OU2ZV.js.map +1 -0
  37. package/dist/{chunk-ZBOGZLX3.js → chunk-T2KONJ45.js} +3 -3
  38. package/dist/{chunk-SWQXAUUG.js → chunk-TJO4CBYT.js} +11 -3
  39. package/dist/{chunk-SWQXAUUG.js.map → chunk-TJO4CBYT.js.map} +1 -1
  40. package/dist/{chunk-LY7PBZ3Z.js → chunk-UFNXYOHZ.js} +2 -2
  41. package/dist/{chunk-ERI6JC4M.js → chunk-X2SJJZFH.js} +2 -2
  42. package/dist/{chunk-DQJFCVXW.js → chunk-ZSCKXOKE.js} +32 -47
  43. package/dist/chunk-ZSCKXOKE.js.map +1 -0
  44. package/dist/data-display/Alert.js +5 -3
  45. package/dist/data-display/Banner.js +3 -3
  46. package/dist/data-display/CardKit.js +7 -5
  47. package/dist/data-display/DataViews.js +7 -5
  48. package/dist/feedback/NotificationStatusNotice.js +6 -4
  49. package/dist/layout/SettingsLayout.js +3 -3
  50. package/dist/native/data-display/Alert.js.map +1 -1
  51. package/dist/types/components/data-display/Alert/Alert.content.d.ts +18 -0
  52. package/dist/types/components/data-display/Alert/Alert.content.d.ts.map +1 -0
  53. package/dist/types/components/data-display/Alert/Alert.d.ts.map +1 -1
  54. package/dist/types/components/data-display/Alert/Alert.metrics.d.ts +4 -0
  55. package/dist/types/components/data-display/Alert/Alert.metrics.d.ts.map +1 -1
  56. package/dist/types/components/data-display/Alert/Alert.placement.d.ts +37 -0
  57. package/dist/types/components/data-display/Alert/Alert.placement.d.ts.map +1 -0
  58. package/dist/types/components/data-display/Alert/Alert.types.d.ts +8 -0
  59. package/dist/types/components/data-display/Alert/Alert.types.d.ts.map +1 -1
  60. package/dist/types/components/data-display/Alert/index.d.ts +1 -1
  61. package/dist/types/components/data-display/Alert/index.d.ts.map +1 -1
  62. package/dist/types/components/layout/SettingsLayout/SettingsLayout.d.ts.map +1 -1
  63. package/dist/types/components/layout/SettingsLayout/SettingsLayout.items.d.ts +3 -1
  64. package/dist/types/components/layout/SettingsLayout/SettingsLayout.items.d.ts.map +1 -1
  65. package/dist/types/components/layout/SettingsLayout/SettingsLayout.rail.d.ts.map +1 -1
  66. package/dist/types-native/components/data-display/Alert/Alert.metrics.d.ts +4 -0
  67. package/dist/types-native/components/data-display/Alert/Alert.metrics.d.ts.map +1 -1
  68. package/package.json +1 -1
  69. package/src/components/data-display/Alert/Alert.content.tsx +79 -0
  70. package/src/components/data-display/Alert/Alert.md +19 -0
  71. package/src/components/data-display/Alert/Alert.metrics.ts +2 -0
  72. package/src/components/data-display/Alert/Alert.placement.ts +45 -0
  73. package/src/components/data-display/Alert/Alert.tsx +41 -61
  74. package/src/components/data-display/Alert/Alert.types.ts +10 -1
  75. package/src/components/data-display/Alert/index.ts +7 -1
  76. package/src/components/layout/SettingsLayout/SettingsLayout.items.tsx +38 -3
  77. package/src/components/layout/SettingsLayout/SettingsLayout.rail.tsx +6 -1
  78. package/src/components/layout/SettingsLayout/SettingsLayout.tsx +9 -3
  79. package/dist/chunk-3LHZCVGM.js.map +0 -1
  80. package/dist/chunk-4BLVVMY7.js.map +0 -1
  81. package/dist/chunk-6KM3TL4Q.js.map +0 -1
  82. package/dist/chunk-DQJFCVXW.js.map +0 -1
  83. /package/dist/{chunk-3VLVLZ6W.js.map → chunk-B34WHRKH.js.map} +0 -0
  84. /package/dist/{chunk-JYAXTRNH.js.map → chunk-CCJJTLF7.js.map} +0 -0
  85. /package/dist/{chunk-52CLMR47.js.map → chunk-ENXGWNCX.js.map} +0 -0
  86. /package/dist/{chunk-REEV7CLC.js.map → chunk-QDG6V7OC.js.map} +0 -0
  87. /package/dist/{chunk-44AXT2SN.js.map → chunk-QZX43FIC.js.map} +0 -0
  88. /package/dist/{chunk-ZBOGZLX3.js.map → chunk-T2KONJ45.js.map} +0 -0
  89. /package/dist/{chunk-LY7PBZ3Z.js.map → chunk-UFNXYOHZ.js.map} +0 -0
  90. /package/dist/{chunk-ERI6JC4M.js.map → chunk-X2SJJZFH.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ACTIVE,
3
3
  HOVER
4
- } from "./chunk-3LHZCVGM.js";
4
+ } from "./chunk-JNVUB2D4.js";
5
5
  import {
6
6
  modeInk
7
7
  } from "./chunk-XJAD6E3V.js";
@@ -140,4 +140,4 @@ export {
140
140
  bannerPointerStates,
141
141
  BANNER_TINT_S
142
142
  };
143
- //# sourceMappingURL=chunk-44AXT2SN.js.map
143
+ //# sourceMappingURL=chunk-QZX43FIC.js.map
@@ -6,7 +6,8 @@ import {
6
6
  atLeastRail
7
7
  } from "./chunk-NK4T624E.js";
8
8
  import {
9
- rem
9
+ rem,
10
+ sxRem
10
11
  } from "./chunk-YKCAJ2TN.js";
11
12
 
12
13
  // src/components/layout/SettingsLayout/SettingsLayout.items.tsx
@@ -43,6 +44,21 @@ function RailItemContent({
43
44
  ) : null
44
45
  ] });
45
46
  }
47
+ function railItemColor(active, card) {
48
+ if (active) return card ? "primary.dark" : "primary.main";
49
+ return card ? "text.primary" : "text.secondary";
50
+ }
51
+ var FOCUS_RING_SX = {
52
+ "&.Mui-focusVisible": {
53
+ outlineStyle: "solid",
54
+ outlineWidth: sxRem(2),
55
+ outlineColor: "primary.main",
56
+ outlineOffset: sxRem(-2)
57
+ }
58
+ };
59
+ function cardRowSx(theme, breakpoint) {
60
+ return { [atLeastRail(theme, breakpoint)]: { minHeight: rem(theme, 36), py: sxRem(6) } };
61
+ }
46
62
  function SettingsRailItem({
47
63
  item,
48
64
  active,
@@ -51,7 +67,8 @@ function SettingsRailItem({
51
67
  onNavigate,
52
68
  testIdPrefix,
53
69
  variant,
54
- breakpoint
70
+ breakpoint,
71
+ card = false
55
72
  }) {
56
73
  const theme = useTheme();
57
74
  const touchFloor = variant === "drilldown" ? { minHeight: rem(theme, TOUCH_TARGET), [atLeastRail(theme, breakpoint)]: { minHeight: "auto" } } : null;
@@ -62,11 +79,13 @@ function SettingsRailItem({
62
79
  mb: 0.25,
63
80
  gap: 1.5,
64
81
  ...touchFloor,
65
- color: active ? "primary.main" : "text.secondary",
82
+ ...card ? cardRowSx(theme, breakpoint) : null,
83
+ color: railItemColor(active, card),
66
84
  "&.Mui-selected": {
67
85
  bgcolor: alpha(theme.palette.primary.main, 0.12),
68
86
  "&:hover": { bgcolor: alpha(theme.palette.primary.main, 0.18) }
69
- }
87
+ },
88
+ ...FOCUS_RING_SX
70
89
  }
71
90
  };
72
91
  const content = /* @__PURE__ */ jsx(RailItemContent, { item, active, testIdPrefix });
@@ -111,7 +130,9 @@ function indexListSx(shape) {
111
130
  // One spacing unit (8px). This is an `sx` callback, where a bare 8 is
112
131
  // EIGHT units — it drew a 64px gutter between the two columns.
113
132
  columnGap: 1,
114
- [theme.breakpoints.up("sm")]: { gridTemplateColumns: "1fr 1fr" },
133
+ // From `md`, not `sm`: at 600 two columns of bare text rows read as one
134
+ // list with a hole in it, and a row's status dot sat nearer the next column.
135
+ [theme.breakpoints.up("md")]: { gridTemplateColumns: "1fr 1fr" },
115
136
  [atLeastRail(theme, shape.breakpoint)]: { gridTemplateColumns: "1fr" }
116
137
  });
117
138
  }
@@ -169,4 +190,4 @@ export {
169
190
  SettingsRailItem,
170
191
  SettingsRailGroup
171
192
  };
172
- //# sourceMappingURL=chunk-4BLVVMY7.js.map
193
+ //# sourceMappingURL=chunk-SL56MOKE.js.map
@@ -0,0 +1 @@
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, sxRem } 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 /** The rail is drawn as a card (`railVariant=\"card\"`): denser rows, darker text. */\n card?: 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/**\n * The row's text colour. On the card the active row's red is the darker one,\n * since `primary.main` on its 12% wash measured 4.19:1 — under AA at 16px —\n * and the rest read in the body colour, as the card's prototype draws them.\n */\nfunction railItemColor(active: boolean, card: boolean): string {\n if (active) return card ? 'primary.dark' : 'primary.main';\n return card ? 'text.primary' : 'text.secondary';\n}\n\n/**\n * Keyboard focus as a ring, not MUI's grey fill: the fill measured 1.3:1\n * against the rail, under the 3:1 a focus indicator needs.\n */\nconst FOCUS_RING_SX = {\n '&.Mui-focusVisible': {\n outlineStyle: 'solid',\n outlineWidth: sxRem(2),\n outlineColor: 'primary.main',\n outlineOffset: sxRem(-2),\n },\n} as const;\n\n/** The card's rows from the breakpoint up: 36px, the prototype's rail density. */\nfunction cardRowSx(theme: Theme, breakpoint: SettingsRailBreakpoint): Record<string, unknown> {\n return { [atLeastRail(theme, breakpoint)]: { minHeight: rem(theme, 36), py: sxRem(6) } };\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 card = false,\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 ...(card ? cardRowSx(theme, breakpoint) : null),\n color: railItemColor(active, card),\n '&.Mui-selected': {\n bgcolor: alpha(theme.palette.primary.main, 0.12),\n '&:hover': { bgcolor: alpha(theme.palette.primary.main, 0.18) },\n },\n ...FOCUS_RING_SX,\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 // From `md`, not `sm`: at 600 two columns of bare text rows read as one\n // list with a hole in it, and a row's status dot sat nearer the next column.\n [theme.breakpoints.up('md')]: { 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;AA6C5B,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;A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,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":[]}
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-LY5I3ZSV.js";
8
8
  import {
9
9
  SettingsRail
10
- } from "./chunk-SWQXAUUG.js";
10
+ } from "./chunk-TJO4CBYT.js";
11
11
  import {
12
12
  atLeastRail
13
13
  } from "./chunk-NK4T624E.js";
@@ -35,7 +35,7 @@ function railLookOf({
35
35
  }) {
36
36
  return { searchable, railVariant };
37
37
  }
38
- function shellSx(breakpoint, fillHeight) {
38
+ function shellSx(breakpoint, fillHeight, railVariant) {
39
39
  return (theme) => ({
40
40
  display: "flex",
41
41
  flexDirection: "column",
@@ -48,7 +48,9 @@ function shellSx(breakpoint, fillHeight) {
48
48
  // convenience.
49
49
  [atLeastRail(theme, breakpoint ?? "md")]: {
50
50
  flexDirection: "row",
51
- gap: 3,
51
+ // A card stands apart from the panel by 32px, as its prototype draws it;
52
+ // the ruled column keeps its 24.
53
+ gap: railVariant === "card" ? 4 : 3,
52
54
  ...fillHeight ? { height: "100%", minHeight: 0 } : {}
53
55
  }
54
56
  });
@@ -86,7 +88,7 @@ var SettingsLayout = (props) => {
86
88
  "data-testid": testIdPrefix,
87
89
  "data-nav-variant": navVariant,
88
90
  "data-at-index": atIndex ? "true" : "false",
89
- sx: shellSx(railBreakpoint, fillHeight),
91
+ sx: shellSx(railBreakpoint, fillHeight, railLookOf(props).railVariant),
90
92
  children: [
91
93
  /* @__PURE__ */ jsx(
92
94
  SettingsRail,
@@ -142,4 +144,4 @@ SettingsLayout.displayName = "SettingsLayout";
142
144
  export {
143
145
  SettingsLayout
144
146
  };
145
- //# sourceMappingURL=chunk-6KM3TL4Q.js.map
147
+ //# sourceMappingURL=chunk-SO5OU2ZV.js.map
@@ -0,0 +1 @@
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(\n breakpoint: SettingsLayoutProps['railBreakpoint'],\n fillHeight: boolean,\n railVariant: SettingsLayoutProps['railVariant'],\n): 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 // A card stands apart from the panel by 32px, as its prototype draws it;\n // the ruled column keeps its 24.\n gap: railVariant === 'card' ? 4 : 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, railLookOf(props).railVariant)}\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;AAyIrC,SAME,KANF;AAxGJ,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,QACP,YACA,YACA,aACgB;AAChB,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,OAAO,cAAc,IAAI,CAAC,GAAG;AAAA,MACxC,eAAe;AAAA;AAAA;AAAA,MAGf,KAAK,gBAAgB,SAAS,IAAI;AAAA,MAClC,GAAI,aAAa,EAAE,QAAQ,QAAQ,WAAW,EAAE,IAAI,CAAC;AAAA,IACvD;AAAA,EACF;AACF;AA4BO,IAAM,iBAAgD,CAAC,UAAU;AACtE,QAAM;AAAA,IACJ;AAAA,IACA;AA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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":[]}
@@ -4,10 +4,10 @@ import {
4
4
  bannerPointerStates,
5
5
  fadeInSlide,
6
6
  getVariantColor
7
- } from "./chunk-44AXT2SN.js";
7
+ } from "./chunk-QZX43FIC.js";
8
8
  import {
9
9
  FOCUS
10
- } from "./chunk-3LHZCVGM.js";
10
+ } from "./chunk-JNVUB2D4.js";
11
11
  import {
12
12
  rem
13
13
  } from "./chunk-YKCAJ2TN.js";
@@ -263,4 +263,4 @@ Banner.displayName = "Banner";
263
263
  export {
264
264
  Banner
265
265
  };
266
- //# sourceMappingURL=chunk-ZBOGZLX3.js.map
266
+ //# sourceMappingURL=chunk-T2KONJ45.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SettingsRailGroup
3
- } from "./chunk-4BLVVMY7.js";
3
+ } from "./chunk-SL56MOKE.js";
4
4
  import {
5
5
  TOUCH_TARGET,
6
6
  atLeastRail,
@@ -258,7 +258,15 @@ function SettingsRail({
258
258
  testIdPrefix
259
259
  }
260
260
  ) : null,
261
- /* @__PURE__ */ jsx(SettingsRailBody, { navOpen, testIdPrefix, ...bodyProps })
261
+ /* @__PURE__ */ jsx(
262
+ SettingsRailBody,
263
+ {
264
+ navOpen,
265
+ testIdPrefix,
266
+ card: railVariant === "card",
267
+ ...bodyProps
268
+ }
269
+ )
262
270
  ]
263
271
  }
264
272
  );
@@ -267,4 +275,4 @@ function SettingsRail({
267
275
  export {
268
276
  SettingsRail
269
277
  };
270
- //# sourceMappingURL=chunk-SWQXAUUG.js.map
278
+ //# sourceMappingURL=chunk-TJO4CBYT.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/layout/SettingsLayout/SettingsLayout.rail.tsx"],"sourcesContent":["'use client';\n\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport SearchIcon from '@mui/icons-material/Search';\nimport Box from '@mui/material/Box/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport InputAdornment from '@mui/material/InputAdornment/index.js';\nimport TextField from '@mui/material/TextField/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport React from 'react';\n\nimport { SettingsRailGroup, type RailShape } from './SettingsLayout.items';\nimport { atLeastRail, displayAcrossRail, railCardWidth, railWidth, TOUCH_TARGET } from './SettingsLayout.styles';\nimport { rem, sxRem } from '../../../tokens/relative';\nimport type {\n SettingsEmptySearchAction,\n SettingsLayoutProps,\n SettingsNavGroup,\n SettingsRailBreakpoint,\n SettingsRailVariant,\n} from './SettingsLayout.types';\n\ninterface RailToggleProps {\n title?: React.ReactNode;\n activeLabel?: string;\n open: boolean;\n onToggle: () => void;\n breakpoint: SettingsRailBreakpoint;\n testIdPrefix: string;\n}\n\n/**\n * `switcher`-only collapse control: shows the current section (a compact\n * switcher) so the panel content stays at the top of the screen. Hidden once the\n * rail has its own column.\n */\nfunction SettingsRailToggle({\n title,\n activeLabel,\n open,\n onToggle,\n breakpoint,\n testIdPrefix,\n}: RailToggleProps): React.JSX.Element {\n return (\n <Box\n component=\"button\"\n type=\"button\"\n onClick={onToggle}\n aria-expanded={open}\n aria-label={typeof title === 'string' ? title : 'Settings'}\n data-testid={`${testIdPrefix}-toggle`}\n sx={(theme) => ({\n ...displayAcrossRail(theme, breakpoint, 'flex', 'none'),\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 1,\n width: '100%',\n minHeight: rem(theme, TOUCH_TARGET),\n px: 1.5,\n py: 1,\n mb: 1,\n textAlign: 'left',\n cursor: 'pointer',\n color: 'text.primary',\n background: 'transparent',\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: 1.5,\n })}\n >\n <Box sx={{ minWidth: 0 }}>\n {title ? (\n <Typography variant=\"caption\" sx={{ display: 'block', color: 'text.secondary' }}>\n {title}\n </Typography>\n ) : null}\n <Typography variant=\"body2\" noWrap sx={{ fontWeight: 600 }}>\n {activeLabel ?? ''}\n </Typography>\n </Box>\n <ExpandMoreIcon\n fontSize=\"small\"\n sx={{\n flex: '0 0 auto',\n color: 'text.secondary',\n transition: 'transform 150ms ease',\n transform: open ? 'rotate(180deg)' : 'none',\n '@media (prefers-reduced-motion: reduce)': { transition: 'none' },\n }}\n />\n </Box>\n );\n}\n\n/** The empty-search state, with the way out of it rendered inside. */\nfunction SettingsSearchEmpty({\n label,\n action,\n onClear,\n testIdPrefix,\n}: {\n label: React.ReactNode;\n action?: SettingsEmptySearchAction;\n onClear: () => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n return (\n <Box data-testid={`${testIdPrefix}-empty`} sx={{ px: 1, py: 2 }}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {label}\n </Typography>\n {action ? (\n <Button\n size=\"small\"\n variant=\"outlined\"\n onClick={() => {\n onClear();\n action.onClear?.();\n }}\n data-testid={`${testIdPrefix}-empty-action`}\n sx={{ mt: 1.5, minHeight: sxRem(TOUCH_TARGET) }}\n >\n {action.label}\n </Button>\n ) : null}\n </Box>\n );\n}\n\nexport interface RailBodyProps extends RailShape {\n navOpen: boolean;\n query: string;\n onQueryChange: (value: string) => void;\n searchPlaceholder: string;\n emptySearchLabel: React.ReactNode;\n emptySearchAction?: SettingsEmptySearchAction;\n filteredGroups: SettingsNavGroup[];\n activeItemId?: string;\n linkComponent?: SettingsLayoutProps['linkComponent'];\n onSelectItem?: (id: string) => void;\n onNavigate?: () => void;\n testIdPrefix: string;\n /** Whether the search field is drawn (`SettingsLayoutProps.searchable`). */\n searchable: boolean;\n}\n\n/** The rail's search field. */\nfunction RailSearch({\n query,\n onQueryChange,\n searchPlaceholder,\n testIdPrefix,\n}: Pick<RailBodyProps, 'query' | 'onQueryChange' | 'searchPlaceholder' | 'testIdPrefix'>): React.JSX.Element {\n return (\n <TextField\n value={query}\n onChange={(event) => onQueryChange(event.target.value)}\n placeholder={searchPlaceholder}\n size=\"small\"\n fullWidth\n aria-label={searchPlaceholder}\n data-testid={`${testIdPrefix}-search`}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon fontSize=\"small\" sx={{ color: 'text.secondary' }} />\n </InputAdornment>\n ),\n }}\n sx={{ mb: 2 }}\n />\n );\n}\n\n/** The rail body: the search field when the area has one, then the groups. */\nfunction SettingsRailBody({\n navOpen,\n query,\n onQueryChange,\n searchPlaceholder,\n emptySearchLabel,\n emptySearchAction,\n filteredGroups,\n activeItemId,\n linkComponent,\n onSelectItem,\n onNavigate,\n testIdPrefix,\n searchable,\n ...shape\n}: RailBodyProps): React.JSX.Element {\n // `drilldown` has no disclosure to be closed behind: below the breakpoint the\n // body is the page, above it the rail. Only `switcher` hides it.\n const hidden = navOpen ? 'block' : 'none';\n return (\n <Box\n data-testid={`${testIdPrefix}-rail-body`}\n sx={(theme) =>\n shape.variant === 'drilldown'\n ? { display: 'block' }\n : displayAcrossRail(theme, shape.breakpoint, hidden, 'block')\n }\n >\n {searchable ? (\n <RailSearch\n query={query}\n onQueryChange={onQueryChange}\n searchPlaceholder={searchPlaceholder}\n testIdPrefix={testIdPrefix}\n />\n ) : null}\n {filteredGroups.length === 0 ? (\n <SettingsSearchEmpty\n label={emptySearchLabel}\n action={emptySearchAction}\n onClear={() => onQueryChange('')}\n testIdPrefix={testIdPrefix}\n />\n ) : (\n filteredGroups.map((group) => (\n <SettingsRailGroup\n key={group.id}\n group={group}\n activeItemId={activeItemId}\n linkComponent={linkComponent}\n onSelectItem={onSelectItem}\n onNavigate={onNavigate}\n testIdPrefix={testIdPrefix}\n {...shape}\n />\n ))\n )}\n </Box>\n );\n}\n\n/** Props for {@link SettingsRail}: the rail body's inputs plus the mobile chrome. */\nexport type SettingsRailProps = RailBodyProps & {\n title?: React.ReactNode;\n activeLabel?: string;\n onToggleNav: () => void;\n /** Scroll inside the rail rather than with the page. See `fillHeight`. */\n fillHeight?: boolean;\n /** How the rail's own column is drawn. See `SettingsLayoutProps.railVariant`. */\n railVariant?: SettingsRailVariant;\n};\n\n/** The rail's own column, as the variant draws it: ruled off, or a card. */\nfunction railColumnSx(theme: Theme, railVariant: SettingsRailVariant): Record<string, unknown> {\n if (railVariant === 'card') {\n const width = railCardWidth(theme);\n return {\n flex: `0 0 ${width}`,\n width,\n alignSelf: 'flex-start',\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: sxRem(14),\n bgcolor: 'background.paper',\n px: sxRem(12),\n py: sxRem(16),\n };\n }\n const width = railWidth(theme);\n return { flex: `0 0 ${width}`, width, borderRight: `1px solid ${theme.palette.divider}`, pr: sxRem(16) };\n}\n\n/** The navigation column: title, the `switcher`'s disclosure, and the body. */\nexport function SettingsRail({\n title,\n activeLabel,\n navOpen,\n onToggleNav,\n testIdPrefix,\n fillHeight = false,\n railVariant = 'divided',\n ...bodyProps\n}: SettingsRailProps): React.JSX.Element {\n const { variant, breakpoint, atIndex } = bodyProps;\n // In `drilldown` the rail is the index's list below the breakpoint and the\n // left column above it — so inside a section it steps aside for the chip\n // strip. It is `display: none`, never unmounted: the two navigation forms\n // both stay in the DOM at every width, which is what makes \"the narrow width\n // offers what the wide one offers\" true by construction instead of by review.\n const hiddenWhileInSection = variant === 'drilldown' && !atIndex;\n\n return (\n <Box\n component=\"nav\"\n aria-label={typeof title === 'string' ? title : 'Settings'}\n data-testid={`${testIdPrefix}-rail`}\n data-rail-variant={railVariant}\n sx={(theme) => ({\n display: hiddenWhileInSection ? 'none' : 'block',\n flex: '0 0 auto',\n width: '100%',\n [atLeastRail(theme, breakpoint)]: {\n display: 'block',\n ...railColumnSx(theme, railVariant),\n // Its own scrollbar, so a settings area with twenty categories does\n // not make the thing you NAVIGATE with scroll away while you read the\n // panel. `minHeight: 0` is the load-bearing half: without it a flex\n // child refuses to shrink below its content and `overflow` never\n // engages.\n ...(fillHeight\n ? { height: '100%', minHeight: 0, overflowY: 'auto' as const, overscrollBehavior: 'contain' as const }\n : {}),\n },\n })}\n >\n {title ? (\n <Typography\n variant=\"h6\"\n data-testid={`${testIdPrefix}-title`}\n sx={(theme) => ({\n ...(variant === 'drilldown'\n ? { display: 'block' }\n : displayAcrossRail(theme, breakpoint, 'none', 'block')),\n fontWeight: 700,\n mb: 1.5,\n })}\n >\n {title}\n </Typography>\n ) : null}\n {variant === 'switcher' ? (\n <SettingsRailToggle\n title={title}\n activeLabel={activeLabel}\n open={navOpen}\n onToggle={onToggleNav}\n breakpoint={breakpoint}\n testIdPrefix={testIdPrefix}\n />\n ) : null}\n <SettingsRailBody navOpen={navOpen} testIdPrefix={testIdPrefix} {...bodyProps} />\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,OAAO,oBAAoB;AAC3B,OAAO,gBAAgB;AACvB,OAAO,SAAS;AAChB,OAAO,YAAY;AACnB,OAAO,oBAAoB;AAC3B,OAAO,eAAe;AAEtB,OAAO,gBAAgB;AA8DjB,SAEI,KAFJ;AAlCN,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAuC;AACrC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,MAAK;AAAA,MACL,SAAS;AAAA,MACT,iBAAe;AAAA,MACf,cAAY,OAAO,UAAU,WAAW,QAAQ;AAAA,MAChD,eAAa,GAAG,YAAY;AAAA,MAC5B,IAAI,CAAC,WAAW;AAAA,QACd,GAAG,kBAAkB,OAAO,YAAY,QAAQ,MAAM;AAAA,QACtD,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,KAAK;AAAA,QACL,OAAO;AAAA,QACP,WAAW,IAAI,OAAO,YAAY;AAAA,QAClC,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,YAAY;AAA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Y;AAAA,YAC5B,IAAI,CAAC,WAAW;AAAA,cACd,GAAI,YAAY,cACZ,EAAE,SAAS,QAAQ,IACnB,kBAAkB,OAAO,YAAY,QAAQ,OAAO;AAAA,cACxD,YAAY;AAAA,cACZ,IAAI;AAAA,YACN;AAAA,YAEC;AAAA;AAAA,QACH,IACE;AAAA,QACH,YAAY,aACX;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA,MAAM;AAAA,YACN,UAAU;AAAA,YACV;AAAA,YACA;AAAA;AAAA,QACF,IACE;AAAA,QACJ,oBAAC,oBAAiB,SAAkB,cAA6B,GAAG,WAAW;AAAA;AAAA;AAAA,EACjF;AAEJ;","names":["width"]}
1
+ {"version":3,"sources":["../src/components/layout/SettingsLayout/SettingsLayout.rail.tsx"],"sourcesContent":["'use client';\n\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport SearchIcon from '@mui/icons-material/Search';\nimport Box from '@mui/material/Box/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport InputAdornment from '@mui/material/InputAdornment/index.js';\nimport TextField from '@mui/material/TextField/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport React from 'react';\n\nimport { SettingsRailGroup, type RailShape } from './SettingsLayout.items';\nimport { atLeastRail, displayAcrossRail, railCardWidth, railWidth, TOUCH_TARGET } from './SettingsLayout.styles';\nimport { rem, sxRem } from '../../../tokens/relative';\nimport type {\n SettingsEmptySearchAction,\n SettingsLayoutProps,\n SettingsNavGroup,\n SettingsRailBreakpoint,\n SettingsRailVariant,\n} from './SettingsLayout.types';\n\ninterface RailToggleProps {\n title?: React.ReactNode;\n activeLabel?: string;\n open: boolean;\n onToggle: () => void;\n breakpoint: SettingsRailBreakpoint;\n testIdPrefix: string;\n}\n\n/**\n * `switcher`-only collapse control: shows the current section (a compact\n * switcher) so the panel content stays at the top of the screen. Hidden once the\n * rail has its own column.\n */\nfunction SettingsRailToggle({\n title,\n activeLabel,\n open,\n onToggle,\n breakpoint,\n testIdPrefix,\n}: RailToggleProps): React.JSX.Element {\n return (\n <Box\n component=\"button\"\n type=\"button\"\n onClick={onToggle}\n aria-expanded={open}\n aria-label={typeof title === 'string' ? title : 'Settings'}\n data-testid={`${testIdPrefix}-toggle`}\n sx={(theme) => ({\n ...displayAcrossRail(theme, breakpoint, 'flex', 'none'),\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 1,\n width: '100%',\n minHeight: rem(theme, TOUCH_TARGET),\n px: 1.5,\n py: 1,\n mb: 1,\n textAlign: 'left',\n cursor: 'pointer',\n color: 'text.primary',\n background: 'transparent',\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: 1.5,\n })}\n >\n <Box sx={{ minWidth: 0 }}>\n {title ? (\n <Typography variant=\"caption\" sx={{ display: 'block', color: 'text.secondary' }}>\n {title}\n </Typography>\n ) : null}\n <Typography variant=\"body2\" noWrap sx={{ fontWeight: 600 }}>\n {activeLabel ?? ''}\n </Typography>\n </Box>\n <ExpandMoreIcon\n fontSize=\"small\"\n sx={{\n flex: '0 0 auto',\n color: 'text.secondary',\n transition: 'transform 150ms ease',\n transform: open ? 'rotate(180deg)' : 'none',\n '@media (prefers-reduced-motion: reduce)': { transition: 'none' },\n }}\n />\n </Box>\n );\n}\n\n/** The empty-search state, with the way out of it rendered inside. */\nfunction SettingsSearchEmpty({\n label,\n action,\n onClear,\n testIdPrefix,\n}: {\n label: React.ReactNode;\n action?: SettingsEmptySearchAction;\n onClear: () => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n return (\n <Box data-testid={`${testIdPrefix}-empty`} sx={{ px: 1, py: 2 }}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {label}\n </Typography>\n {action ? (\n <Button\n size=\"small\"\n variant=\"outlined\"\n onClick={() => {\n onClear();\n action.onClear?.();\n }}\n data-testid={`${testIdPrefix}-empty-action`}\n sx={{ mt: 1.5, minHeight: sxRem(TOUCH_TARGET) }}\n >\n {action.label}\n </Button>\n ) : null}\n </Box>\n );\n}\n\nexport interface RailBodyProps extends RailShape {\n navOpen: boolean;\n query: string;\n onQueryChange: (value: string) => void;\n searchPlaceholder: string;\n emptySearchLabel: React.ReactNode;\n emptySearchAction?: SettingsEmptySearchAction;\n filteredGroups: SettingsNavGroup[];\n activeItemId?: string;\n linkComponent?: SettingsLayoutProps['linkComponent'];\n onSelectItem?: (id: string) => void;\n onNavigate?: () => void;\n testIdPrefix: string;\n /** Whether the search field is drawn (`SettingsLayoutProps.searchable`). */\n searchable: boolean;\n}\n\n/** The rail's search field. */\nfunction RailSearch({\n query,\n onQueryChange,\n searchPlaceholder,\n testIdPrefix,\n}: Pick<RailBodyProps, 'query' | 'onQueryChange' | 'searchPlaceholder' | 'testIdPrefix'>): React.JSX.Element {\n return (\n <TextField\n value={query}\n onChange={(event) => onQueryChange(event.target.value)}\n placeholder={searchPlaceholder}\n size=\"small\"\n fullWidth\n aria-label={searchPlaceholder}\n data-testid={`${testIdPrefix}-search`}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon fontSize=\"small\" sx={{ color: 'text.secondary' }} />\n </InputAdornment>\n ),\n }}\n sx={{ mb: 2 }}\n />\n );\n}\n\n/** The rail body: the search field when the area has one, then the groups. */\nfunction SettingsRailBody({\n navOpen,\n query,\n onQueryChange,\n searchPlaceholder,\n emptySearchLabel,\n emptySearchAction,\n filteredGroups,\n activeItemId,\n linkComponent,\n onSelectItem,\n onNavigate,\n testIdPrefix,\n searchable,\n ...shape\n}: RailBodyProps): React.JSX.Element {\n // `drilldown` has no disclosure to be closed behind: below the breakpoint the\n // body is the page, above it the rail. Only `switcher` hides it.\n const hidden = navOpen ? 'block' : 'none';\n return (\n <Box\n data-testid={`${testIdPrefix}-rail-body`}\n sx={(theme) =>\n shape.variant === 'drilldown'\n ? { display: 'block' }\n : displayAcrossRail(theme, shape.breakpoint, hidden, 'block')\n }\n >\n {searchable ? (\n <RailSearch\n query={query}\n onQueryChange={onQueryChange}\n searchPlaceholder={searchPlaceholder}\n testIdPrefix={testIdPrefix}\n />\n ) : null}\n {filteredGroups.length === 0 ? (\n <SettingsSearchEmpty\n label={emptySearchLabel}\n action={emptySearchAction}\n onClear={() => onQueryChange('')}\n testIdPrefix={testIdPrefix}\n />\n ) : (\n filteredGroups.map((group) => (\n <SettingsRailGroup\n key={group.id}\n group={group}\n activeItemId={activeItemId}\n linkComponent={linkComponent}\n onSelectItem={onSelectItem}\n onNavigate={onNavigate}\n testIdPrefix={testIdPrefix}\n {...shape}\n />\n ))\n )}\n </Box>\n );\n}\n\n/** Props for {@link SettingsRail}: the rail body's inputs plus the mobile chrome. */\nexport type SettingsRailProps = RailBodyProps & {\n title?: React.ReactNode;\n activeLabel?: string;\n onToggleNav: () => void;\n /** Scroll inside the rail rather than with the page. See `fillHeight`. */\n fillHeight?: boolean;\n /** How the rail's own column is drawn. See `SettingsLayoutProps.railVariant`. */\n railVariant?: SettingsRailVariant;\n};\n\n/** The rail's own column, as the variant draws it: ruled off, or a card. */\nfunction railColumnSx(theme: Theme, railVariant: SettingsRailVariant): Record<string, unknown> {\n if (railVariant === 'card') {\n const width = railCardWidth(theme);\n return {\n flex: `0 0 ${width}`,\n width,\n alignSelf: 'flex-start',\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: sxRem(14),\n bgcolor: 'background.paper',\n px: sxRem(12),\n py: sxRem(16),\n };\n }\n const width = railWidth(theme);\n return { flex: `0 0 ${width}`, width, borderRight: `1px solid ${theme.palette.divider}`, pr: sxRem(16) };\n}\n\n/** The navigation column: title, the `switcher`'s disclosure, and the body. */\nexport function SettingsRail({\n title,\n activeLabel,\n navOpen,\n onToggleNav,\n testIdPrefix,\n fillHeight = false,\n railVariant = 'divided',\n ...bodyProps\n}: SettingsRailProps): React.JSX.Element {\n const { variant, breakpoint, atIndex } = bodyProps;\n // In `drilldown` the rail is the index's list below the breakpoint and the\n // left column above it — so inside a section it steps aside for the chip\n // strip. It is `display: none`, never unmounted: the two navigation forms\n // both stay in the DOM at every width, which is what makes \"the narrow width\n // offers what the wide one offers\" true by construction instead of by review.\n const hiddenWhileInSection = variant === 'drilldown' && !atIndex;\n\n return (\n <Box\n component=\"nav\"\n aria-label={typeof title === 'string' ? title : 'Settings'}\n data-testid={`${testIdPrefix}-rail`}\n data-rail-variant={railVariant}\n sx={(theme) => ({\n display: hiddenWhileInSection ? 'none' : 'block',\n flex: '0 0 auto',\n width: '100%',\n [atLeastRail(theme, breakpoint)]: {\n display: 'block',\n ...railColumnSx(theme, railVariant),\n // Its own scrollbar, so a settings area with twenty categories does\n // not make the thing you NAVIGATE with scroll away while you read the\n // panel. `minHeight: 0` is the load-bearing half: without it a flex\n // child refuses to shrink below its content and `overflow` never\n // engages.\n ...(fillHeight\n ? { height: '100%', minHeight: 0, overflowY: 'auto' as const, overscrollBehavior: 'contain' as const }\n : {}),\n },\n })}\n >\n {title ? (\n <Typography\n variant=\"h6\"\n data-testid={`${testIdPrefix}-title`}\n sx={(theme) => ({\n ...(variant === 'drilldown'\n ? { display: 'block' }\n : displayAcrossRail(theme, breakpoint, 'none', 'block')),\n fontWeight: 700,\n mb: 1.5,\n })}\n >\n {title}\n </Typography>\n ) : null}\n {variant === 'switcher' ? (\n <SettingsRailToggle\n title={title}\n activeLabel={activeLabel}\n open={navOpen}\n onToggle={onToggleNav}\n breakpoint={breakpoint}\n testIdPrefix={testIdPrefix}\n />\n ) : null}\n <SettingsRailBody\n navOpen={navOpen}\n testIdPrefix={testIdPrefix}\n card={railVariant === 'card'}\n {...bodyProps}\n />\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,OAAO,oBAAoB;AAC3B,OAAO,gBAAgB;AACvB,OAAO,SAAS;AAChB,OAAO,YAAY;AACnB,OAAO,oBAAoB;AAC3B,OAAO,eAAe;AAEtB,OAAO,gBAAgB;AA8DjB,SAEI,KAFJ;AAlCN,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA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;AAAA,MACV,cAAY,OAAO,UAAU,WAAW,QAAQ;AAAA,MAChD,eAAa,GAAG,YAAY;AAAA,MAC5B,qBAAmB;AAAA,MACnB,IAAI,CAAC,WAAW;AAAA,QACd,SAAS,uBAAuB,SAAS;AAAA,QACzC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,CAAC,YAAY,OAAO,UAAU,CAAC,GAAG;AAAA,UAChC,SAAS;AAAA,UACT,GAAG,aAAa,OAAO,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAMlC,GAAI,aACA,EAAE,QAAQ,QAAQ,WAAW,GAAG,WAAW,QAAiB,oBAAoB,UAAmB,IACnG,CAAC;AAAA,QACP;AAAA,MACF;AAAA,MAEC;AAAA,gBACC;AAAA,UAAC;AAAA;AAAA,YACC,SAAQ;AAAA,YACR,eAAa,GAAG,YAAY;AAAA,YAC5B,IAAI,CAAC,WAAW;AAAA,cACd,GAAI,YAAY,cACZ,EAAE,SAAS,QAAQ,IACnB,kBAAkB,OAAO,YAAY,QAAQ,OAAO;AAAA,cACxD,YAAY;AAAA,cACZ,IAAI;AAAA,YACN;AAAA,YAEC;AAAA;AAAA,QACH,IACE;AAAA,QACH,YAAY,aACX;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA,MAAM;AAAA,YACN,UAAU;AAAA,YACV;AAAA,YACA;AAAA;AAAA,QACF,IACE;AAAA,QACJ;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA,MAAM,gBAAgB;AAAA,YACrB,GAAG;AAAA;AAAA,QACN;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["width"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Alert
3
- } from "./chunk-DQJFCVXW.js";
3
+ } from "./chunk-ZSCKXOKE.js";
4
4
 
5
5
  // src/components/data-display/CardKit/card-actions-context.tsx
6
6
  import { createContext, useCallback, useContext, useState } from "react";
@@ -58,4 +58,4 @@ export {
58
58
  CardActionsProvider,
59
59
  useCardActions
60
60
  };
61
- //# sourceMappingURL=chunk-LY7PBZ3Z.js.map
61
+ //# sourceMappingURL=chunk-UFNXYOHZ.js.map
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-4SQ2WCZA.js";
13
13
  import {
14
14
  Alert
15
- } from "./chunk-DQJFCVXW.js";
15
+ } from "./chunk-ZSCKXOKE.js";
16
16
 
17
17
  // src/components/data-display/DataViews/data-views-table-parts.tsx
18
18
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -121,4 +121,4 @@ export {
121
121
  ViewsMenuSlot,
122
122
  ViewDialogs
123
123
  };
124
- //# sourceMappingURL=chunk-ERI6JC4M.js.map
124
+ //# sourceMappingURL=chunk-X2SJJZFH.js.map
@@ -5,7 +5,13 @@ import {
5
5
  fadeInScale,
6
6
  getColorFromTheme,
7
7
  getVariantIcon
8
- } from "./chunk-JYAXTRNH.js";
8
+ } from "./chunk-CCJJTLF7.js";
9
+ import {
10
+ resolveIconPlacement
11
+ } from "./chunk-QXUXO22M.js";
12
+ import {
13
+ AlertContent
14
+ } from "./chunk-IVI574Y5.js";
9
15
  import {
10
16
  resolveAlertProps,
11
17
  resolveAnnouncement,
@@ -19,14 +25,12 @@ import {
19
25
  CLOSE_BUTTON,
20
26
  CLOSE_DELAY_MS,
21
27
  COLLAPSE_MS,
22
- DESCRIPTION,
23
28
  FADE_IN,
24
29
  FOCUS,
25
30
  GLOW,
26
31
  HOVER,
27
- TITLE,
28
32
  seconds
29
- } from "./chunk-3LHZCVGM.js";
33
+ } from "./chunk-JNVUB2D4.js";
30
34
  import {
31
35
  resolveTestId,
32
36
  withoutTestIdProps
@@ -37,20 +41,18 @@ import {
37
41
  } from "./chunk-XJAD6E3V.js";
38
42
  import {
39
43
  rem,
40
- rems,
41
- sxRem
44
+ rems
42
45
  } from "./chunk-YKCAJ2TN.js";
43
46
 
44
47
  // src/components/data-display/Alert/Alert.tsx
45
48
  import Close from "@mui/icons-material/Close";
46
49
  import MuiAlert from "@mui/material/Alert/index.js";
47
- import AlertTitle from "@mui/material/AlertTitle/index.js";
48
50
  import Box from "@mui/material/Box/index.js";
49
51
  import Collapse from "@mui/material/Collapse/index.js";
50
52
  import IconButton from "@mui/material/IconButton/index.js";
51
- import { alpha, styled } from "@mui/material/styles/index.js";
53
+ import { alpha, styled, useTheme } from "@mui/material/styles/index.js";
52
54
  import React from "react";
53
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
55
+ import { jsx } from "react/jsx-runtime";
54
56
  var transition = `all ${seconds(ALERT_TRANSITION_MS)} ${ALERT_EASING}`;
55
57
  function pointerShadow(theme, colorPalette, glow, variant) {
56
58
  const ink = variant === "gradient" ? absoluteInk(theme).black : modeInk(theme);
@@ -133,39 +135,6 @@ var MUI_SEVERITY = {
133
135
  gradient: "info"
134
136
  };
135
137
  var toMuiSeverity = (variant) => MUI_SEVERITY[variant] ?? variant;
136
- var AlertContent = ({ title, description, dataTestId, children }) => /* @__PURE__ */ jsxs(Fragment, { children: [
137
- title && /* @__PURE__ */ jsx(
138
- AlertTitle,
139
- {
140
- "data-testid": testIdFor(dataTestId, "title"),
141
- sx: {
142
- fontWeight: TITLE.fontWeight,
143
- fontSize: sxRem(TITLE.fontSize),
144
- marginBottom: description ? TITLE.marginBottomUnits : 0,
145
- wordWrap: "break-word",
146
- overflowWrap: "break-word",
147
- wordBreak: "break-word"
148
- },
149
- children: title
150
- }
151
- ),
152
- description && /* @__PURE__ */ jsx(
153
- Box,
154
- {
155
- component: "div",
156
- "data-testid": testIdFor(dataTestId, "message"),
157
- sx: {
158
- opacity: DESCRIPTION.opacity,
159
- fontSize: sxRem(DESCRIPTION.fontSize),
160
- wordWrap: "break-word",
161
- overflowWrap: "break-word",
162
- wordBreak: "break-word"
163
- },
164
- children: description
165
- }
166
- ),
167
- children
168
- ] });
169
138
  var AlertCloseButton = ({
170
139
  dataTestId,
171
140
  label,
@@ -224,6 +193,16 @@ function dismissButton(props, dataTestId, onClose) {
224
193
  if (!props.closable) return null;
225
194
  return /* @__PURE__ */ jsx(AlertCloseButton, { dataTestId, label: props.closeLabel, onClose });
226
195
  }
196
+ function placeIcon({
197
+ icon,
198
+ dataTestId,
199
+ hasTitle,
200
+ placement
201
+ }) {
202
+ if (icon === null) return { slot: false };
203
+ const glyph = /* @__PURE__ */ jsx(Box, { component: "span", "data-testid": testIdFor(dataTestId, "icon"), children: icon });
204
+ return placement === "title" && hasTitle ? { slot: false, titleIcon: glyph } : { slot: glyph };
205
+ }
227
206
  var Alert = React.forwardRef((alertProps, ref) => {
228
207
  const {
229
208
  variant,
@@ -237,6 +216,7 @@ var Alert = React.forwardRef((alertProps, ref) => {
237
216
  description,
238
217
  children,
239
218
  animate,
219
+ iconPlacement,
240
220
  role: _role,
241
221
  announce: _announce,
242
222
  // resolved from `alertProps` — see `resolveAnnouncement`
@@ -246,6 +226,7 @@ var Alert = React.forwardRef((alertProps, ref) => {
246
226
  const dataTestId = resolveTestId(others, "alert");
247
227
  const props = withoutAlertOnlyProps(withoutTestIdProps(others));
248
228
  const announcement = resolveAnnouncement(alertProps, variant);
229
+ const theme = useTheme();
249
230
  const [open, setOpen] = React.useState(true);
250
231
  const [isClosing, setIsClosing] = React.useState(false);
251
232
  const handleClose = () => {
@@ -256,8 +237,12 @@ var Alert = React.forwardRef((alertProps, ref) => {
256
237
  }, CLOSE_DELAY_MS);
257
238
  };
258
239
  const severity = toMuiSeverity(variant);
259
- const displayIcon = showIcon ? /* @__PURE__ */ jsx(Box, { component: "span", "data-testid": testIdFor(dataTestId, "icon"), children: icon || getVariantIcon(variant) }) : false;
260
- const content = /* @__PURE__ */ jsx(AlertContent, { title, description, dataTestId, children });
240
+ const { slot, titleIcon } = placeIcon({
241
+ icon: showIcon ? icon ?? getVariantIcon(variant) : null,
242
+ dataTestId,
243
+ hasTitle: Boolean(title),
244
+ placement: resolveIconPlacement(theme, iconPlacement)
245
+ });
261
246
  return /* @__PURE__ */ jsx(Collapse, { in: open && !isClosing, timeout: COLLAPSE_MS, children: /* @__PURE__ */ jsx(
262
247
  StyledAlert,
263
248
  {
@@ -269,14 +254,14 @@ var Alert = React.forwardRef((alertProps, ref) => {
269
254
  glow,
270
255
  pulse,
271
256
  animate,
272
- icon: displayIcon,
257
+ icon: slot,
273
258
  role: announcement.role,
274
259
  "aria-live": announcement["aria-live"],
275
260
  "aria-atomic": ariaAtomic,
276
261
  tabIndex: 0,
277
262
  action: dismissButton(alertProps, dataTestId, handleClose),
278
263
  ...props,
279
- children: content
264
+ children: /* @__PURE__ */ jsx(AlertContent, { title, description, titleIcon, dataTestId, children })
280
265
  }
281
266
  ) });
282
267
  });
@@ -292,4 +277,4 @@ export {
292
277
  Alert,
293
278
  ALERT_ONLY_PROPS
294
279
  };
295
- //# sourceMappingURL=chunk-DQJFCVXW.js.map
280
+ //# sourceMappingURL=chunk-ZSCKXOKE.js.map
@@ -0,0 +1 @@
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 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, useTheme } 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 { AlertContent } from './Alert.content';\nimport { resolveAlertProps, resolveAnnouncement, testIdFor } from './Alert.helpers';\nimport { resolveIconPlacement, type AlertIconPlacement } from './Alert.placement';\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 FADE_IN,\n FOCUS,\n HOVER,\n seconds,\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 } 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 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\n/**\n * Where the icon goes: MUI's own slot (`slot`), or the title's row\n * (`titleIcon`) — never both. On the title's row only when there IS a title\n * and an icon to put on it (`Alert.placement.ts`).\n */\nfunction placeIcon({\n icon,\n dataTestId,\n hasTitle,\n placement,\n}: {\n icon: React.ReactNode;\n dataTestId: string | undefined;\n hasTitle: boolean;\n placement: AlertIconPlacement;\n}): { slot: React.ReactNode; titleIcon?: React.ReactNode } {\n if (icon === null) return { slot: false };\n const glyph = (\n <Box component=\"span\" data-testid={testIdFor(dataTestId, 'icon')}>\n {icon}\n </Box>\n );\n return placement === 'title' && hasTitle ? { slot: false, titleIcon: glyph } : { slot: glyph };\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 iconPlacement,\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 theme = useTheme();\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 { slot, titleIcon } = placeIcon({\n icon: showIcon ? (icon ?? getVariantIcon(variant)) : null,\n dataTestId,\n hasTitle: Boolean(title),\n placement: resolveIconPlacement(theme, iconPlacement),\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={slot}\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 <AlertContent title={title} description={description} titleIcon={titleIcon} dataTestId={dataTestId}>\n {children}\n </AlertContent>\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,SAAS;AAChB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,SAAS,OAAO,QAAQ,gBAAgB;AAExC,OAAO,WAAW;AA6Nd;AA1LJ,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,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,EACtD,CAAC;AAED,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,MAEJ,8BAAC,gBAAa,OAAc,aAA0B,WAAsB,YACzE,UACH;AAAA;AAAA,EACF,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":[]}
@@ -1,10 +1,12 @@
1
1
  import "../chunk-NUGT7LMR.js";
2
2
  import {
3
3
  Alert
4
- } from "../chunk-DQJFCVXW.js";
5
- import "../chunk-JYAXTRNH.js";
4
+ } from "../chunk-ZSCKXOKE.js";
5
+ import "../chunk-CCJJTLF7.js";
6
+ import "../chunk-QXUXO22M.js";
7
+ import "../chunk-IVI574Y5.js";
6
8
  import "../chunk-L7VH6IMR.js";
7
- import "../chunk-3LHZCVGM.js";
9
+ import "../chunk-JNVUB2D4.js";
8
10
  import "../chunk-TYJR4GOF.js";
9
11
  import "../chunk-2FBGDSGC.js";
10
12
  import "../chunk-VBP46YP4.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Banner
3
- } from "../chunk-ZBOGZLX3.js";
4
- import "../chunk-44AXT2SN.js";
5
- import "../chunk-3LHZCVGM.js";
3
+ } from "../chunk-T2KONJ45.js";
4
+ import "../chunk-QZX43FIC.js";
5
+ import "../chunk-JNVUB2D4.js";
6
6
  import "../chunk-2FBGDSGC.js";
7
7
  import "../chunk-VBP46YP4.js";
8
8
  import "../chunk-44BD7SFH.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-KYTADPS2.js";
4
4
  import {
5
5
  useRemoveConfirm
6
- } from "../chunk-3VLVLZ6W.js";
6
+ } from "../chunk-B34WHRKH.js";
7
7
  import {
8
8
  rowActionsToMenuItems
9
9
  } from "../chunk-ZBXG6RVJ.js";
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  CardActionsProvider,
19
19
  useCardActions
20
- } from "../chunk-LY7PBZ3Z.js";
20
+ } from "../chunk-UFNXYOHZ.js";
21
21
  import {
22
22
  CardKebab
23
23
  } from "../chunk-P4LR2GLN.js";
@@ -32,13 +32,15 @@ import "../chunk-EMYESBIT.js";
32
32
  import "../chunk-LZRVUOMU.js";
33
33
  import "../chunk-EEB66IVH.js";
34
34
  import "../chunk-NUGT7LMR.js";
35
- import "../chunk-DQJFCVXW.js";
36
- import "../chunk-JYAXTRNH.js";
35
+ import "../chunk-ZSCKXOKE.js";
36
+ import "../chunk-CCJJTLF7.js";
37
+ import "../chunk-QXUXO22M.js";
38
+ import "../chunk-IVI574Y5.js";
37
39
  import "../chunk-L7VH6IMR.js";
38
40
  import "../chunk-2IBFEHIX.js";
39
41
  import "../chunk-RZCXYKY4.js";
40
42
  import "../chunk-BGTG7G54.js";
41
- import "../chunk-3LHZCVGM.js";
43
+ import "../chunk-JNVUB2D4.js";
42
44
  import "../chunk-6DPAWXZ3.js";
43
45
  import "../chunk-BA4RHQ3B.js";
44
46
  import "../chunk-364NH2NY.js";