@12-apps/ui 6.72.0 → 6.73.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 (57) hide show
  1. package/components-catalog.md +1 -1
  2. package/dist/_internal/components/index.js +7 -7
  3. package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +5 -4
  4. package/dist/_internal/components/navigation/SectionNav/SectionNav.js +8 -7
  5. package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +8 -3
  6. package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +3 -2
  7. package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +4 -3
  8. package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +3 -2
  9. package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +3 -2
  10. package/dist/_internal/components/navigation/index.js +8 -7
  11. package/dist/{chunk-XS4NQ6LD.js → chunk-23LPXHR2.js} +61 -35
  12. package/dist/chunk-23LPXHR2.js.map +1 -0
  13. package/dist/{chunk-WP7KPWCP.js → chunk-24HHUCWB.js} +14 -2
  14. package/dist/chunk-24HHUCWB.js.map +1 -0
  15. package/dist/{chunk-WY7FR7I4.js → chunk-ILJ3FXIC.js} +17 -8
  16. package/dist/chunk-ILJ3FXIC.js.map +1 -0
  17. package/dist/{chunk-VI2IXBOO.js → chunk-KPEKD5SG.js} +24 -13
  18. package/dist/chunk-KPEKD5SG.js.map +1 -0
  19. package/dist/{chunk-2STYL5PF.js → chunk-NM46HQSW.js} +2 -2
  20. package/dist/{chunk-LWQGIN2M.js → chunk-NQP72RTD.js} +9 -6
  21. package/dist/chunk-NQP72RTD.js.map +1 -0
  22. package/dist/{chunk-OBGUD2PG.js → chunk-SNWCT6JN.js} +91 -42
  23. package/dist/chunk-SNWCT6JN.js.map +1 -0
  24. package/dist/navigation/SectionNav.js +8 -7
  25. package/dist/types/components/navigation/SectionNav/SectionNav.bar.d.ts +6 -2
  26. package/dist/types/components/navigation/SectionNav/SectionNav.bar.d.ts.map +1 -1
  27. package/dist/types/components/navigation/SectionNav/SectionNav.d.ts +4 -1
  28. package/dist/types/components/navigation/SectionNav/SectionNav.d.ts.map +1 -1
  29. package/dist/types/components/navigation/SectionNav/SectionNav.parts.d.ts +12 -1
  30. package/dist/types/components/navigation/SectionNav/SectionNav.parts.d.ts.map +1 -1
  31. package/dist/types/components/navigation/SectionNav/SectionNav.primary.d.ts +7 -1
  32. package/dist/types/components/navigation/SectionNav/SectionNav.primary.d.ts.map +1 -1
  33. package/dist/types/components/navigation/SectionNav/SectionNav.rail.d.ts +3 -2
  34. package/dist/types/components/navigation/SectionNav/SectionNav.rail.d.ts.map +1 -1
  35. package/dist/types/components/navigation/SectionNav/SectionNav.railCreate.d.ts +3 -1
  36. package/dist/types/components/navigation/SectionNav/SectionNav.railCreate.d.ts.map +1 -1
  37. package/dist/types/components/navigation/SectionNav/SectionNav.types.d.ts +12 -0
  38. package/dist/types/components/navigation/SectionNav/SectionNav.types.d.ts.map +1 -1
  39. package/dist/types/components/navigation/SectionNav/index.d.ts +1 -0
  40. package/dist/types/components/navigation/SectionNav/index.d.ts.map +1 -1
  41. package/package.json +1 -1
  42. package/src/components/navigation/SectionNav/SectionNav.bar.tsx +77 -29
  43. package/src/components/navigation/SectionNav/SectionNav.md +24 -3
  44. package/src/components/navigation/SectionNav/SectionNav.parts.tsx +19 -1
  45. package/src/components/navigation/SectionNav/SectionNav.primary.tsx +39 -11
  46. package/src/components/navigation/SectionNav/SectionNav.rail.tsx +90 -35
  47. package/src/components/navigation/SectionNav/SectionNav.railCreate.tsx +23 -5
  48. package/src/components/navigation/SectionNav/SectionNav.tsx +6 -0
  49. package/src/components/navigation/SectionNav/SectionNav.types.ts +12 -0
  50. package/src/components/navigation/SectionNav/index.ts +1 -0
  51. package/dist/chunk-LWQGIN2M.js.map +0 -1
  52. package/dist/chunk-OBGUD2PG.js.map +0 -1
  53. package/dist/chunk-VI2IXBOO.js.map +0 -1
  54. package/dist/chunk-WP7KPWCP.js.map +0 -1
  55. package/dist/chunk-WY7FR7I4.js.map +0 -1
  56. package/dist/chunk-XS4NQ6LD.js.map +0 -1
  57. /package/dist/{chunk-2STYL5PF.js.map → chunk-NM46HQSW.js.map} +0 -0
@@ -1,5 +1,6 @@
1
+ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
1
2
  import Typography from '@mui/material/Typography/index.js';
2
- import { useTheme } from '@mui/material/styles/index.js';
3
+ import { useTheme, type SxProps, type Theme } from '@mui/material/styles/index.js';
3
4
  import type { ElementType, ReactNode } from 'react';
4
5
 
5
6
  import type { SectionNavCopy } from '../../../copy';
@@ -12,6 +13,7 @@ import {
12
13
  CountedIcon,
13
14
  NOT_LIVE,
14
15
  SlotIcon,
16
+ VISUALLY_HIDDEN,
15
17
  controlProps,
16
18
  destinationControl,
17
19
  focusRing,
@@ -26,6 +28,33 @@ import type {
26
28
  } from './SectionNav.types';
27
29
  import type { SectionNavBadge } from './SectionNav.types';
28
30
 
31
+ /** The row's words, stacked: the label over its description. */
32
+ const ROW_WORDS_SX = { display: 'flex', flexDirection: 'column', minWidth: 0 } as const;
33
+
34
+ /** A rail row's look: icon and words, or the icon alone, centred, when compact. */
35
+ function railRowSx(theme: Theme, active: boolean, compact: boolean): SxProps<Theme> {
36
+ return {
37
+ ...CONTROL_RESET,
38
+ ...focusRing(theme),
39
+ position: compact ? 'relative' : undefined,
40
+ display: 'flex',
41
+ alignItems: 'center',
42
+ justifyContent: compact ? 'center' : 'flex-start',
43
+ gap: compact ? 0 : 1.5,
44
+ width: '100%',
45
+ minHeight: rem(theme, 40),
46
+ px: compact ? 0 : 1.25,
47
+ py: 0.75,
48
+ borderRadius: 1,
49
+ textAlign: 'start',
50
+ color: active ? 'primary.main' : 'text.primary',
51
+ bgcolor: active ? 'action.selected' : 'transparent',
52
+ '&:hover': { bgcolor: active ? 'action.selected' : 'action.hover' },
53
+ '& svg': { color: 'primary.main', fontSize: rem(theme, 20) },
54
+ [NOT_LIVE]: { color: 'text.disabled', '& svg': { color: 'text.disabled' } },
55
+ } as SxProps<Theme>;
56
+ }
57
+
29
58
  /**
30
59
  * One rail row: icon, label, and the count at the far end.
31
60
  *
@@ -48,6 +77,7 @@ function RailRow({
48
77
  testId,
49
78
  control,
50
79
  loading = false,
80
+ compact = false,
51
81
  }: {
52
82
  label: string;
53
83
  description?: string;
@@ -59,6 +89,8 @@ function RailRow({
59
89
  testId: string;
60
90
  control: Record<string, unknown>;
61
91
  loading?: boolean;
92
+ /** Icon only, centred: the label stays the row's name, out of sight, and its tooltip. */
93
+ compact?: boolean;
62
94
  }): React.JSX.Element {
63
95
  const theme = useTheme();
64
96
  return (
@@ -66,25 +98,9 @@ function RailRow({
66
98
  {...control}
67
99
  aria-current={current ? 'page' : undefined}
68
100
  aria-busy={loading || undefined}
101
+ title={compact ? label : undefined}
69
102
  data-testid={testId}
70
- sx={{
71
- ...CONTROL_RESET,
72
- ...focusRing(theme),
73
- display: 'flex',
74
- alignItems: 'center',
75
- gap: 1.5,
76
- width: '100%',
77
- minHeight: rem(theme, 40),
78
- px: 1.25,
79
- py: 0.75,
80
- borderRadius: 1,
81
- textAlign: 'start',
82
- color: active ? 'primary.main' : 'text.primary',
83
- bgcolor: active ? 'action.selected' : 'transparent',
84
- '&:hover': { bgcolor: active ? 'action.selected' : 'action.hover' },
85
- '& svg': { color: 'primary.main', fontSize: rem(theme, 20) },
86
- [NOT_LIVE]: { color: 'text.disabled', '& svg': { color: 'text.disabled' } },
87
- }}
103
+ sx={railRowSx(theme, active, compact)}
88
104
  >
89
105
  <CountedIcon
90
106
  icon={<SlotIcon icon={icon} loading={loading} />}
@@ -93,7 +109,7 @@ function RailRow({
93
109
  attentionLabel={copy.attention}
94
110
  testId={`${testId}-badge`}
95
111
  />
96
- <Box component="span" sx={{ display: 'flex', flexDirection: 'column', minWidth: 0 }}>
112
+ <Box component="span" sx={compact ? VISUALLY_HIDDEN : ROW_WORDS_SX}>
97
113
  <Typography component="span" variant="body2" sx={{ fontWeight: active ? 700 : 500 }}>
98
114
  {label}
99
115
  </Typography>
@@ -108,9 +124,13 @@ function RailRow({
108
124
  }
109
125
 
110
126
  /** A heading between the rail's sections, in the sidebar's small-caps voice. */
111
- function RailHeading({ children }: { children: ReactNode }): React.JSX.Element {
127
+ function RailHeading({ children, compact = false }: { children: ReactNode; compact?: boolean }): React.JSX.Element {
112
128
  return (
113
- <Typography variant="overline" color="text.secondary" sx={{ px: 1.25, pt: 1.5, lineHeight: 1.6 }}>
129
+ <Typography
130
+ variant="overline"
131
+ color="text.secondary"
132
+ sx={compact ? VISUALLY_HIDDEN : { px: 1.25, pt: 1.5, lineHeight: 1.6 }}
133
+ >
114
134
  {children}
115
135
  </Typography>
116
136
  );
@@ -127,19 +147,21 @@ function RailMenu({
127
147
  linkComponent,
128
148
  copy,
129
149
  testId,
150
+ compact,
130
151
  }: {
131
152
  menu: SectionNavMenu;
132
153
  linkComponent: ElementType | undefined;
133
154
  copy: SectionNavCopy;
134
155
  testId: string;
156
+ compact: boolean;
135
157
  }): React.JSX.Element {
136
158
  return (
137
159
  <Box component="section" data-testid={testId} sx={{ display: 'flex', flexDirection: 'column', gap: 0.25 }}>
138
- <RailHeading>{menu.title}</RailHeading>
160
+ <RailHeading compact={compact}>{menu.title}</RailHeading>
139
161
  {menu.groups.map((group) => (
140
162
  <Box key={group.id} sx={{ display: 'flex', flexDirection: 'column', gap: 0.25 }}>
141
163
  {group.title ? (
142
- <Typography variant="caption" color="text.secondary" sx={{ px: 1.25, pt: 0.5 }}>
164
+ <Typography variant="caption" color="text.secondary" sx={compact ? VISUALLY_HIDDEN : { px: 1.25, pt: 0.5 }}>
143
165
  {group.title}
144
166
  </Typography>
145
167
  ) : null}
@@ -151,6 +173,7 @@ function RailMenu({
151
173
  icon={entry.icon}
152
174
  count={entry.badge}
153
175
  active={entry.active === true}
176
+ compact={compact}
154
177
  copy={copy}
155
178
  testId={entry.dataTestId ?? `${testId}-entry-${entry.id}`}
156
179
  control={controlProps({
@@ -172,23 +195,29 @@ function RailBack({
172
195
  back,
173
196
  linkComponent,
174
197
  testId,
198
+ compact,
175
199
  }: {
176
200
  back: SectionNavBack;
177
201
  linkComponent: ElementType | undefined;
178
202
  testId: string;
203
+ compact: boolean;
179
204
  }): React.JSX.Element {
180
205
  const theme = useTheme();
181
206
  return (
182
207
  <Box
183
208
  {...controlProps({ href: back.href, linkComponent })}
209
+ title={compact ? back.label : undefined}
184
210
  data-testid={testId}
185
211
  sx={{
186
212
  ...CONTROL_RESET,
187
213
  ...focusRing(theme),
214
+ position: compact ? 'relative' : undefined,
188
215
  display: 'flex',
189
216
  alignItems: 'center',
190
- gap: 1,
191
- px: 1.25,
217
+ justifyContent: compact ? 'center' : 'flex-start',
218
+ gap: compact ? 0 : 1,
219
+ minHeight: compact ? rem(theme, 40) : undefined,
220
+ px: compact ? 0 : 1.25,
192
221
  py: 0.75,
193
222
  mb: 0.5,
194
223
  borderRadius: 1,
@@ -197,8 +226,9 @@ function RailBack({
197
226
  '& svg': { fontSize: rem(theme, 20) },
198
227
  }}
199
228
  >
200
- {back.icon}
201
- <Typography component="span" variant="body2" sx={{ fontWeight: 600 }}>
229
+ {/* Compact, the icon is all that is drawn: a back with none gets the arrow. */}
230
+ {back.icon ?? (compact ? <ArrowBackIcon aria-hidden /> : null)}
231
+ <Typography component="span" variant="body2" sx={compact ? VISUALLY_HIDDEN : { fontWeight: 600 }}>
202
232
  {back.label}
203
233
  </Typography>
204
234
  </Box>
@@ -211,14 +241,17 @@ function RailAction({
211
241
  linkComponent,
212
242
  copy,
213
243
  testId,
244
+ compact,
214
245
  }: {
215
246
  action: SectionNavAction;
216
247
  linkComponent: ElementType | undefined;
217
248
  copy: SectionNavCopy;
218
249
  testId: string;
250
+ compact: boolean;
219
251
  }): React.JSX.Element {
220
252
  return (
221
253
  <RailRow
254
+ compact={compact}
222
255
  label={action.label}
223
256
  icon={action.icon}
224
257
  count={undefined}
@@ -243,15 +276,18 @@ function RailDestination({
243
276
  linkComponent,
244
277
  copy,
245
278
  testId,
279
+ compact,
246
280
  }: {
247
281
  destination: SectionNavDestination;
248
282
  linkComponent: ElementType | undefined;
249
283
  copy: SectionNavCopy;
250
284
  testId: string;
285
+ compact: boolean;
251
286
  }): React.JSX.Element {
252
287
  const { current, lit } = destinationState(destination);
253
288
  return (
254
289
  <RailRow
290
+ compact={compact}
255
291
  label={destination.label}
256
292
  icon={destination.icon}
257
293
  count={destination.badge}
@@ -271,7 +307,8 @@ function RailDestination({
271
307
  * `primary` action as a row, then `more` listed in full.
272
308
  *
273
309
  * It fills the column the host gives it and scrolls on its own, like the
274
- * sidebar it stands in for.
310
+ * sidebar it stands in for. `compact` draws every row as its icon for a
311
+ * column 64px wide; the words stay the rows' names.
275
312
  */
276
313
  export function SectionNavRail({
277
314
  label,
@@ -283,8 +320,9 @@ export function SectionNavRail({
283
320
  linkComponent,
284
321
  copy,
285
322
  dataTestId,
323
+ compact = false,
286
324
  }: Required<Pick<SectionNavProps, 'label' | 'destinations' | 'copy' | 'dataTestId'>> &
287
- Pick<SectionNavProps, 'primary' | 'more' | 'back' | 'heading'> & {
325
+ Pick<SectionNavProps, 'primary' | 'more' | 'back' | 'heading' | 'compact'> & {
288
326
  linkComponent: ElementType | undefined;
289
327
  }): React.JSX.Element {
290
328
  return (
@@ -303,10 +341,18 @@ export function SectionNavRail({
303
341
  bgcolor: 'background.paper',
304
342
  }}
305
343
  >
306
- {back ? <RailBack back={back} linkComponent={linkComponent} testId={`${dataTestId}-back`} /> : null}
307
- {heading ? <RailHeading>{heading}</RailHeading> : null}
344
+ {back ? (
345
+ <RailBack back={back} linkComponent={linkComponent} testId={`${dataTestId}-back`} compact={compact} />
346
+ ) : null}
347
+ {heading ? <RailHeading compact={compact}>{heading}</RailHeading> : null}
308
348
  {isMenu(primary) ? (
309
- <RailCreateMenu menu={primary} linkComponent={linkComponent} copy={copy} testId={`${dataTestId}-primary`} />
349
+ <RailCreateMenu
350
+ menu={primary}
351
+ linkComponent={linkComponent}
352
+ copy={copy}
353
+ testId={`${dataTestId}-primary`}
354
+ compact={compact}
355
+ />
310
356
  ) : null}
311
357
  {destinations.map((destination) => (
312
358
  <RailDestination
@@ -315,12 +361,21 @@ export function SectionNavRail({
315
361
  linkComponent={linkComponent}
316
362
  copy={copy}
317
363
  testId={destination.dataTestId ?? `${dataTestId}-dest-${destination.id}`}
364
+ compact={compact}
318
365
  />
319
366
  ))}
320
367
  {primary && !isMenu(primary) ? (
321
- <RailAction action={primary} linkComponent={linkComponent} copy={copy} testId={`${dataTestId}-primary`} />
368
+ <RailAction
369
+ action={primary}
370
+ linkComponent={linkComponent}
371
+ copy={copy}
372
+ testId={`${dataTestId}-primary`}
373
+ compact={compact}
374
+ />
375
+ ) : null}
376
+ {more ? (
377
+ <RailMenu menu={more} linkComponent={linkComponent} copy={copy} testId={`${dataTestId}-more`} compact={compact} />
322
378
  ) : null}
323
- {more ? <RailMenu menu={more} linkComponent={linkComponent} copy={copy} testId={`${dataTestId}-more`} /> : null}
324
379
  </Box>
325
380
  );
326
381
  }
@@ -4,7 +4,7 @@ import ListItemText from '@mui/material/ListItemText/index.js';
4
4
  import ListSubheader from '@mui/material/ListSubheader/index.js';
5
5
  import Menu from '@mui/material/Menu/index.js';
6
6
  import MenuItem from '@mui/material/MenuItem/index.js';
7
- import { useTheme } from '@mui/material/styles/index.js';
7
+ import { useTheme, type SxProps, type Theme } from '@mui/material/styles/index.js';
8
8
  import { useId, useState, type ElementType, type ReactNode } from 'react';
9
9
 
10
10
  import type { SectionNavCopy } from '../../../copy';
@@ -63,6 +63,20 @@ function entryItem(
63
63
  );
64
64
  }
65
65
 
66
+ /** The button's icon and names: the icon in front of the label, or — compact — the icon alone, named by the label. */
67
+ function createButtonForm(
68
+ menu: SectionNavMenu,
69
+ compact: boolean,
70
+ ): { startIcon: ReactNode; 'aria-label': string | undefined; title: string | undefined } {
71
+ if (!compact) return { startIcon: menu.icon, 'aria-label': undefined, title: undefined };
72
+ return { startIcon: undefined, 'aria-label': menu.label, title: menu.label };
73
+ }
74
+
75
+ /** Where the button's content sits: the label's start, or — compact — the icon centred. */
76
+ function createButtonLayoutSx(compact: boolean): SxProps<Theme> {
77
+ return compact ? { justifyContent: 'center', minWidth: 0, px: 0 } : { justifyContent: 'flex-start', px: 1.75 };
78
+ }
79
+
66
80
  /**
67
81
  * A rail's `primary` menu as ONE button at the top of the rail, opening an
68
82
  * anchored menu of its groups (FUT-3015).
@@ -82,11 +96,14 @@ export function RailCreateMenu({
82
96
  linkComponent,
83
97
  copy,
84
98
  testId,
99
+ compact = false,
85
100
  }: {
86
101
  menu: SectionNavMenu;
87
102
  linkComponent: ElementType | undefined;
88
103
  copy: SectionNavCopy;
89
104
  testId: string;
105
+ /** The button as its icon only — the label stays its name and its tooltip. */
106
+ compact?: boolean;
90
107
  }): React.JSX.Element {
91
108
  const theme = useTheme();
92
109
  const menuId = useId();
@@ -109,7 +126,7 @@ export function RailCreateMenu({
109
126
  <Button
110
127
  variant="contained"
111
128
  fullWidth
112
- startIcon={menu.icon}
129
+ {...createButtonForm(menu, compact)}
113
130
  disabled={menu.disabled === true}
114
131
  aria-haspopup="menu"
115
132
  aria-expanded={open}
@@ -119,14 +136,15 @@ export function RailCreateMenu({
119
136
  sx={{
120
137
  my: 1,
121
138
  minHeight: rem(theme, 40),
122
- justifyContent: 'flex-start',
123
- px: 1.75,
139
+ ...(createButtonLayoutSx(compact) as object),
124
140
  fontWeight: 600,
125
141
  // A place in the rail reads in sentence case, like the rows under it.
126
142
  textTransform: 'none',
143
+ // The ring outside the filled button, where it can be seen.
144
+ '&.Mui-focusVisible': { outline: `${rem(theme, 2)} solid ${theme.palette.primary.main}`, outlineOffset: rem(theme, 2) },
127
145
  }}
128
146
  >
129
- {menu.label}
147
+ {compact ? menu.icon : menu.label}
130
148
  </Button>
131
149
  <Menu
132
150
  id={menuId}
@@ -11,6 +11,9 @@ import type { SectionNavProps } from './SectionNav.types';
11
11
  * (`linkComponent`). The nav decides only how they are drawn: the order of the
12
12
  * bar's slots, the raised primary action, the sheets, the rail's sections.
13
13
  *
14
+ * `compact` draws either layout as icons only, a size down, for a host that
15
+ * folds its chrome; the labels stay the controls' names.
16
+ *
14
17
  * Which layout to use is the host's call too, because the host knows what
15
18
  * else is on screen: a bar next to a sidebar is two navigations competing for
16
19
  * one glance.
@@ -26,6 +29,7 @@ export function SectionNav({
26
29
  linkComponent,
27
30
  copy,
28
31
  dataTestId = 'section-nav',
32
+ compact = false,
29
33
  }: SectionNavProps): React.JSX.Element {
30
34
  if (layout === 'rail') {
31
35
  return (
@@ -39,6 +43,7 @@ export function SectionNav({
39
43
  linkComponent={linkComponent}
40
44
  copy={copy}
41
45
  dataTestId={dataTestId}
46
+ compact={compact}
42
47
  />
43
48
  );
44
49
  }
@@ -51,6 +56,7 @@ export function SectionNav({
51
56
  linkComponent={linkComponent}
52
57
  copy={copy}
53
58
  dataTestId={dataTestId}
59
+ compact={compact}
54
60
  />
55
61
  );
56
62
  }
@@ -187,4 +187,16 @@ export interface SectionNavProps {
187
187
  copy: SectionNavCopy;
188
188
  /** Prefix for every `data-testid`. Defaults to `"section-nav"`. */
189
189
  dataTestId?: string;
190
+ /**
191
+ * Icons only, a size down — for a host that folds its chrome so the content
192
+ * gets the screen (a "focus mode"). Every label stays its control's
193
+ * accessible name and `title`; nothing is removed, only drawn smaller.
194
+ *
195
+ * `bar` — 48px instead of 60, the raised button 40px instead of 52, no
196
+ * captions; `sectionNavBarInset(theme, { compact: true })` is its inset.
197
+ * `rail` — every row, the way back and the create button as their icon only,
198
+ * headings out of sight, for a column 64px wide (the host sets the width).
199
+ * Defaults to `false`.
200
+ */
201
+ compact?: boolean;
190
202
  }
@@ -1,5 +1,6 @@
1
1
  export { SectionNav } from './SectionNav';
2
2
  export { sectionNavBarInset } from './SectionNav.bar';
3
+ export type { SectionNavBarOptions } from './SectionNav.bar';
3
4
  export { RaisedActionButton } from './SectionNav.primary';
4
5
  export type { RaisedActionButtonProps } from './SectionNav.primary';
5
6
  export type {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/navigation/SectionNav/SectionNav.tsx"],"sourcesContent":["import { SectionNavBar } from './SectionNav.bar';\nimport { SectionNavRail } from './SectionNav.rail';\nimport type { SectionNavProps } from './SectionNav.types';\n\n/**\n * A section's own navigation — the handful of screens one kind of work moves\n * between — as a bottom bar on a phone or a rail on a wide screen.\n *\n * It knows no product. The host decides every destination, label, icon,\n * count and which one is current, and renders links through its own router\n * (`linkComponent`). The nav decides only how they are drawn: the order of the\n * bar's slots, the raised primary action, the sheets, the rail's sections.\n *\n * Which layout to use is the host's call too, because the host knows what\n * else is on screen: a bar next to a sidebar is two navigations competing for\n * one glance.\n */\nexport function SectionNav({\n layout,\n label,\n destinations,\n primary,\n more,\n back,\n heading,\n linkComponent,\n copy,\n dataTestId = 'section-nav',\n}: SectionNavProps): React.JSX.Element {\n if (layout === 'rail') {\n return (\n <SectionNavRail\n label={label}\n destinations={destinations}\n primary={primary}\n more={more}\n back={back}\n heading={heading}\n linkComponent={linkComponent}\n copy={copy}\n dataTestId={dataTestId}\n />\n );\n }\n return (\n <SectionNavBar\n label={label}\n destinations={destinations}\n primary={primary}\n more={more}\n linkComponent={linkComponent}\n copy={copy}\n dataTestId={dataTestId}\n />\n );\n}\n"],"mappings":";;;;;;;;AA+BM;AAdC,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACf,GAAuC;AACrC,MAAI,WAAW,QAAQ;AACrB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/navigation/SectionNav/SectionNav.rail.tsx"],"sourcesContent":["import Typography from '@mui/material/Typography/index.js';\nimport { useTheme } from '@mui/material/styles/index.js';\nimport type { ElementType, ReactNode } from 'react';\n\nimport type { SectionNavCopy } from '../../../copy';\nimport { rem } from '../../../tokens/scales';\n\nimport { destinationState, isMenu } from './SectionNav.helpers';\nimport {\n Box,\n CONTROL_RESET,\n CountedIcon,\n NOT_LIVE,\n SlotIcon,\n controlProps,\n destinationControl,\n focusRing,\n} from './SectionNav.parts';\nimport { RailCreateMenu } from './SectionNav.railCreate';\nimport type {\n SectionNavAction,\n SectionNavBack,\n SectionNavDestination,\n SectionNavMenu,\n SectionNavProps,\n} from './SectionNav.types';\nimport type { SectionNavBadge } from './SectionNav.types';\n\n/**\n * One rail row: icon, label, and the count at the far end.\n *\n * Destinations and menu entries draw the same row — in the rail there is room\n * for everything, so the difference between \"a place\" and \"an action\" is the\n * section it sits in, not its shape.\n *\n * `active` is the look; `current` is what `aria-current` reports, and is a\n * link's claim only — an action row that is ON says so with `aria-pressed`,\n * which arrives in `control`. Omitted, `current` follows `active`.\n */\nfunction RailRow({\n label,\n description,\n icon,\n count,\n active,\n current = active,\n copy,\n testId,\n control,\n loading = false,\n}: {\n label: string;\n description?: string;\n icon: ReactNode;\n count: SectionNavBadge | undefined;\n active: boolean;\n current?: boolean;\n copy: SectionNavCopy;\n testId: string;\n control: Record<string, unknown>;\n loading?: boolean;\n}): React.JSX.Element {\n const theme = useTheme();\n return (\n <Box\n {...control}\n aria-current={current ? 'page' : undefined}\n aria-busy={loading || undefined}\n data-testid={testId}\n sx={{\n ...CONTROL_RESET,\n ...focusRing(theme),\n display: 'flex',\n alignItems: 'center',\n gap: 1.5,\n width: '100%',\n minHeight: rem(theme, 40),\n px: 1.25,\n py: 0.75,\n borderRadius: 1,\n textAlign: 'start',\n color: active ? 'primary.main' : 'text.primary',\n bgcolor: active ? 'action.selected' : 'transparent',\n '&:hover': { bgcolor: active ? 'action.selected' : 'action.hover' },\n '& svg': { color: 'primary.main', fontSize: rem(theme, 20) },\n [NOT_LIVE]: { color: 'text.disabled', '& svg': { color: 'text.disabled' } },\n }}\n >\n <CountedIcon\n icon={<SlotIcon icon={icon} loading={loading} />}\n count={count}\n label={copy.badge}\n attentionLabel={copy.attention}\n testId={`${testId}-badge`}\n />\n <Box component=\"span\" sx={{ display: 'flex', flexDirection: 'column', minWidth: 0 }}>\n <Typography component=\"span\" variant=\"body2\" sx={{ fontWeight: active ? 700 : 500 }}>\n {label}\n </Typography>\n {description ? (\n <Typography component=\"span\" variant=\"caption\" color=\"text.secondary\">\n {description}\n </Typography>\n ) : null}\n </Box>\n </Box>\n );\n}\n\n/** A heading between the rail's sections, in the sidebar's small-caps voice. */\nfunction RailHeading({ children }: { children: ReactNode }): React.JSX.Element {\n return (\n <Typography variant=\"overline\" color=\"text.secondary\" sx={{ px: 1.25, pt: 1.5, lineHeight: 1.6 }}>\n {children}\n </Typography>\n );\n}\n\n/**\n * The `more` menu's groups, listed under its title — the rail has room for the\n * places it holds. A `disabled` menu has no trigger here to refuse, so every\n * row of it is inert instead. (`primary` folds behind one button instead —\n * `RailCreateMenu`.)\n */\nfunction RailMenu({\n menu,\n linkComponent,\n copy,\n testId,\n}: {\n menu: SectionNavMenu;\n linkComponent: ElementType | undefined;\n copy: SectionNavCopy;\n testId: string;\n}): React.JSX.Element {\n return (\n <Box component=\"section\" data-testid={testId} sx={{ display: 'flex', flexDirection: 'column', gap: 0.25 }}>\n <RailHeading>{menu.title}</RailHeading>\n {menu.groups.map((group) => (\n <Box key={group.id} sx={{ display: 'flex', flexDirection: 'column', gap: 0.25 }}>\n {group.title ? (\n <Typography variant=\"caption\" color=\"text.secondary\" sx={{ px: 1.25, pt: 0.5 }}>\n {group.title}\n </Typography>\n ) : null}\n {group.entries.map((entry) => (\n <RailRow\n key={entry.id}\n label={entry.label}\n description={entry.description}\n icon={entry.icon}\n count={entry.badge}\n active={entry.active === true}\n copy={copy}\n testId={entry.dataTestId ?? `${testId}-entry-${entry.id}`}\n control={controlProps({\n href: entry.href,\n linkComponent,\n inert: menu.disabled === true || entry.disabled === true,\n onClick: () => entry.onSelect?.(),\n })}\n />\n ))}\n </Box>\n ))}\n </Box>\n );\n}\n\n/** The way back out of the section, at the top of the rail. */\nfunction RailBack({\n back,\n linkComponent,\n testId,\n}: {\n back: SectionNavBack;\n linkComponent: ElementType | undefined;\n testId: string;\n}): React.JSX.Element {\n const theme = useTheme();\n return (\n <Box\n {...controlProps({ href: back.href, linkComponent })}\n data-testid={testId}\n sx={{\n ...CONTROL_RESET,\n ...focusRing(theme),\n display: 'flex',\n alignItems: 'center',\n gap: 1,\n px: 1.25,\n py: 0.75,\n mb: 0.5,\n borderRadius: 1,\n color: 'text.secondary',\n '&:hover': { bgcolor: 'action.hover', color: 'text.primary' },\n '& svg': { fontSize: rem(theme, 20) },\n }}\n >\n {back.icon}\n <Typography component=\"span\" variant=\"body2\" sx={{ fontWeight: 600 }}>\n {back.label}\n </Typography>\n </Box>\n );\n}\n\n/** A primary that ACTS, as one row: there is no sheet to list on a wide screen. */\nfunction RailAction({\n action,\n linkComponent,\n copy,\n testId,\n}: {\n action: SectionNavAction;\n linkComponent: ElementType | undefined;\n copy: SectionNavCopy;\n testId: string;\n}): React.JSX.Element {\n return (\n <RailRow\n label={action.label}\n icon={action.icon}\n count={undefined}\n active={false}\n copy={copy}\n testId={action.dataTestId ?? testId}\n loading={action.loading === true}\n control={controlProps({\n href: undefined,\n linkComponent,\n inert: action.disabled === true,\n busy: action.loading === true,\n onClick: action.onSelect,\n })}\n />\n );\n}\n\n/** A destination as a row: a link, or an action (a toggle when it carries `active`). */\nfunction RailDestination({\n destination,\n linkComponent,\n copy,\n testId,\n}: {\n destination: SectionNavDestination;\n linkComponent: ElementType | undefined;\n copy: SectionNavCopy;\n testId: string;\n}): React.JSX.Element {\n const { current, lit } = destinationState(destination);\n return (\n <RailRow\n label={destination.label}\n icon={destination.icon}\n count={destination.badge}\n active={lit}\n current={current}\n copy={copy}\n testId={testId}\n loading={destination.loading === true}\n control={destinationControl(destination, linkComponent, () => destination.onSelect?.())}\n />\n );\n}\n\n/**\n * The wide-screen layout: a vertical rail — the way back, the heading, a\n * `primary` menu as one button that opens it (FUT-3015), the destinations, a\n * `primary` action as a row, then `more` listed in full.\n *\n * It fills the column the host gives it and scrolls on its own, like the\n * sidebar it stands in for.\n */\nexport function SectionNavRail({\n label,\n destinations,\n primary,\n more,\n back,\n heading,\n linkComponent,\n copy,\n dataTestId,\n}: Required<Pick<SectionNavProps, 'label' | 'destinations' | 'copy' | 'dataTestId'>> &\n Pick<SectionNavProps, 'primary' | 'more' | 'back' | 'heading'> & {\n linkComponent: ElementType | undefined;\n }): React.JSX.Element {\n return (\n <Box\n component=\"nav\"\n aria-label={label}\n data-testid={dataTestId}\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: 0.25,\n height: '100%',\n overflowY: 'auto',\n px: 1,\n py: 1.5,\n bgcolor: 'background.paper',\n }}\n >\n {back ? <RailBack back={back} linkComponent={linkComponent} testId={`${dataTestId}-back`} /> : null}\n {heading ? <RailHeading>{heading}</RailHeading> : null}\n {isMenu(primary) ? (\n <RailCreateMenu menu={primary} linkComponent={linkComponent} copy={copy} testId={`${dataTestId}-primary`} />\n ) : null}\n {destinations.map((destination) => (\n <RailDestination\n key={destination.id}\n destination={destination}\n linkComponent={linkComponent}\n copy={copy}\n testId={destination.dataTestId ?? `${dataTestId}-dest-${destination.id}`}\n />\n ))}\n {primary && !isMenu(primary) ? (\n <RailAction action={primary} linkComponent={linkComponent} copy={copy} testId={`${dataTestId}-primary`} />\n ) : null}\n {more ? <RailMenu menu={more} linkComponent={linkComponent} copy={copy} testId={`${dataTestId}-more`} /> : null}\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,g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Y,QAAQ,GAAG,UAAU,SAAS,IAAK;AAAA;AAAA;AAAA,EAC7G;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/navigation/SectionNav/SectionNav.primary.tsx"],"sourcesContent":["import Typography from '@mui/material/Typography/index.js';\nimport { useTheme, type SxProps, type Theme } from '@mui/material/styles/index.js';\nimport type { ReactNode } from 'react';\n\nimport { rem } from '../../../tokens/scales';\n\nimport { Box, CONTROL_RESET, NOT_LIVE, SlotIcon, focusRing } from './SectionNav.parts';\n\nexport interface RaisedActionButtonProps {\n /**\n * The button's accessible name. Drawn under the button only when\n * `captioned`; the caption is hidden from assistive tech, so the name is\n * read once either way.\n */\n label: string;\n icon: ReactNode;\n onClick: () => void;\n /**\n * Whether what the button opens is open. Omit for a button that opens\n * nothing (a plain action): it then carries no `aria-expanded` and its icon\n * never turns.\n */\n open?: boolean;\n /** The name it takes while `open` — the same control closes what it opened. REQUIRED with `open`. */\n closeLabel?: string;\n /**\n * Draw `label` under the button. A bar of VERBS names the act it is for; a\n * bar of places can leave its one action to the icon.\n */\n captioned?: boolean;\n /** Dimmed and not operable: a native `disabled` button. */\n disabled?: boolean;\n /**\n * A write it started is in flight: a spinner replaces the icon, it reports\n * `aria-busy` and `aria-disabled`, and a tap is ignored. It stays focusable,\n * so the keyboard does not lose its place while the write answers.\n */\n loading?: boolean;\n dataTestId?: string;\n}\n\n/**\n * The raised round button in the middle of a bottom bar — the one control in\n * the row that is an ACTION rather than a place.\n *\n * Lifted half out of the bar so it reads as different in kind from the tabs\n * beside it. Uncaptioned it costs the row less width than a tab: that width is\n * what lets a bar keep four labelled tabs AND this button at 320px. A bar of\n * verbs captions it, naming the act under the button.\n *\n * `SectionNav` draws it for its `primary` menu. It is exported on its own for\n * a bar the host already draws — drop it between two tabs, in a flex row.\n */\nexport function RaisedActionButton({\n label,\n icon,\n onClick,\n open,\n closeLabel,\n captioned = false,\n disabled = false,\n loading = false,\n dataTestId = 'raised-action',\n}: RaisedActionButtonProps): React.JSX.Element {\n const theme = useTheme();\n const expanded = open === true;\n return (\n <Box\n sx={{\n flex: 'none',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'flex-start',\n px: 0.5,\n }}\n >\n <Box\n component=\"button\"\n type=\"button\"\n {...raisedState({ onClick, disabled, loading })}\n aria-label={expanded && closeLabel ? closeLabel : label}\n aria-expanded={open}\n data-testid={dataTestId}\n sx={raisedSx(theme, expanded)}\n >\n <SlotIcon icon={icon} loading={loading} />\n </Box>\n {captioned ? <RaisedCaption label={label} inert={disabled || loading} /> : null}\n </Box>\n );\n}\n\n/**\n * The button's operability. Only `disabled` is native: an in-flight button\n * keeps its focus, reports `aria-busy` and `aria-disabled`, and drops the click.\n */\nfunction raisedState({\n onClick,\n disabled,\n loading,\n}: {\n onClick: () => void;\n disabled: boolean;\n loading: boolean;\n}): Record<string, unknown> {\n const busy = loading && !disabled;\n return {\n onClick: busy ? undefined : onClick,\n disabled,\n 'aria-disabled': busy ? 'true' : undefined,\n 'aria-busy': loading || undefined,\n };\n}\n\n/**\n * The label under a captioned button. Hidden from assistive tech: the button\n * already carries the same words as its name, and reading them twice is noise.\n */\nfunction RaisedCaption({ label, inert }: { label: string; inert: boolean }): React.JSX.Element {\n return (\n <Typography\n component=\"span\"\n variant=\"caption\"\n aria-hidden\n sx={{ lineHeight: 1.3, mt: 0.25, whiteSpace: 'nowrap', color: inert ? 'text.disabled' : 'text.primary' }}\n >\n {label}\n </Typography>\n );\n}\n\n/** The round button: lifted half out of the bar, its icon turning while what it opened is open. */\nfunction raisedSx(theme: Theme, expanded: boolean): SxProps<Theme> {\n const size = rem(theme, 52);\n return {\n ...CONTROL_RESET,\n ...focusRing(theme),\n width: size,\n height: size,\n // Lifted half out of the bar: the one control that is not a place.\n marginTop: rem(theme, -18),\n borderRadius: '50%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n bgcolor: 'primary.main',\n color: 'primary.contrastText',\n boxShadow: theme.shadows[6],\n [NOT_LIVE]: { cursor: 'default', bgcolor: 'action.disabledBackground', color: 'text.disabled', boxShadow: 'none' },\n '& svg': {\n fontSize: rem(theme, 26),\n transition: theme.transitions.create('transform', { duration: theme.transitions.duration.shorter }),\n transform: expanded ? 'rotate(45deg)' : 'none',\n },\n '@media (prefers-reduced-motion: reduce)': { '& svg': { transition: 'none' } },\n } as SxProps<Theme>;\n}\n"],"mappings":";;;;;;;;;;;;AAAA,OAAO,gBAAgB;AACvB,SAAS,gBAA0C;AAkE/C,SAmBI,KAnBJ;AAdG,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,UAAU;AAAA,EACV,aAAa;AACf,GAA+C;AAC7C,QAAM,QAAQ,SAAS;AACvB,QAAM,WAAW,SAAS;AAC1B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,QACF,MAAM;AAAA,QACN,SAAS;AAAA,QACT,eAAe;AAAA,QACf,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,IAAI;AAAA,MACN;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACJ,GAAG,YAAY,EAAE,SAAS,UAAU,QAAQ,CAAC;AAAA,YAC9C,cAAY,YAAY,aAAa,aAAa;AAAA,YAClD,iBAAe;AAAA,YACf,eAAa;AAAA,YACb,IAAI,SAAS,OAAO,QAAQ;AAAA,YAE5B,8BAAC,YAAS,MAAY,SAAkB;AAAA;AAAA,QAC1C;AAAA,QACC,YAAY,oBAAC,iBAAc,OAAc,OAAO,YAAY,SAAS,IAAK;AAAA;AAAA;AAAA,EAC7E;AAEJ;AAMA,SAAS,YAAY;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AACF,GAI4B;AAC1B,QAAM,OAAO,WAAW,CAAC;AACzB,SAAO;AAAA,IACL,SAAS,OAAO,SAAY;AAAA,IAC5B;AAAA,IACA,iBAAiB,OAAO,SAAS;AAAA,IACjC,aAAa,WAAW;AAAA,EAC1B;AACF;AAMA,SAAS,cAAc,EAAE,OAAO,MAAM,GAAyD;AAC7F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,SAAQ;AAAA,MACR,eAAW;AAAA,MACX,IAAI,EAAE,YAAY,KAAK,IAAI,MAAM,YAAY,UAAU,OAAO,QAAQ,kBAAkB,eAAe;AAAA,MAEtG;AAAA;AAAA,EACH;AAEJ;AAGA,SAAS,SAAS,OAAc,UAAmC;AACjE,QAAM,OAAO,IAAI,OAAO,EAAE;AAC1B,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG,UAAU,KAAK;AAAA,IAClB,OAAO;AAAA,IACP,QAAQ;AAAA;AAAA,IAER,WAAW,IAAI,OAAO,GAAG;AAAA,IACzB,cAAc;AAAA,IACd,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,SAAS;AAAA,IACT,OAAO;AAAA,IACP,WAAW,MAAM,QAAQ,CAAC;AAAA,IAC1B,CAAC,QAAQ,GAAG,EAAE,QAAQ,WAAW,SAAS,6BAA6B,OAAO,iBAAiB,WAAW,OAAO;AAAA,IACjH,SAAS;AAAA,MACP,UAAU,IAAI,OAAO,EAAE;AAAA,MACvB,YAAY,MAAM,YAAY,OAAO,aAAa,EAAE,UAAU,MAAM,YAAY,SAAS,QAAQ,CAAC;AAAA,MAClG,WAAW,WAAW,kBAAkB;AAAA,IAC1C;AAAA,IACA,2CAA2C,EAAE,SAAS,EAAE,YAAY,OAAO,EAAE;AAAA,EAC/E;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/navigation/SectionNav/SectionNav.parts.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport CircularProgress from '@mui/material/CircularProgress/index.js';\nimport type { SxProps, Theme } from '@mui/material/styles/index.js';\nimport type { ElementType, ReactNode } from 'react';\n\nimport { rem } from '../../../tokens/scales';\nimport { Badge } from '../../data-display/Badge';\n\nimport { shownCount } from './SectionNav.helpers';\nimport type { SectionNavBadge, SectionNavDestination } from './SectionNav.types';\n\n/**\n * An icon with its count on the shoulder.\n *\n * Quiet to assistive tech on change: the count moves on a poll, and a control\n * that announces itself every minute is noise. Its NAME carries the number,\n * so it is read when the control is.\n */\nexport function CountedIcon({\n icon,\n count,\n label,\n testId,\n attentionLabel,\n}: {\n icon: ReactNode;\n count: SectionNavBadge | undefined;\n label: (count: number) => string;\n testId: string;\n /** The \"!\" badge's accessible name (`SectionNavCopy.attention`). */\n attentionLabel?: string;\n}): React.JSX.Element {\n if (count === '!') {\n return (\n <Badge content=\"!\" variant=\"count\" color=\"warning\" aria-label={attentionLabel ?? label(1)} aria-live=\"off\" data-testid={testId}>\n {icon}\n </Badge>\n );\n }\n const shown = shownCount(count);\n if (shown === undefined) return <>{icon}</>;\n return (\n // The library's corner count, in the warning role the sidebar's pill is\n // drawn from.\n <Badge\n content={shown}\n variant=\"count\"\n color=\"warning\"\n max={99}\n aria-label={label(shown)}\n aria-live=\"off\"\n data-testid={testId}\n >\n {icon}\n </Badge>\n );\n}\n\n/** The keyboard ring every control in the nav draws, in the theme's own colour. */\nexport function focusRing(theme: Theme): SxProps<Theme> {\n return {\n '&:focus-visible': {\n outline: `${rem(theme, 2)} solid ${theme.palette.primary.main}`,\n outlineOffset: rem(theme, -2),\n },\n };\n}\n\n/**\n * The element an entry or destination renders as: the host's link for an\n * `href`, a button for an `onSelect`.\n *\n * Returned as props for a `Box`, so the control stays ONE interactive\n * element — never a button wrapped around a link. Whatever it would lead to,\n * a control that is not live is a BUTTON: a link cannot be disabled, and one\n * that looks dimmed but still navigates is the lie this rules out.\n *\n * - `inert` — a native `disabled` button: no focus, no click.\n * - `busy` — a write is in flight: `aria-disabled`, still focusable, and the\n * click is dropped, so the keyboard keeps its place until the write answers.\n * - `dimmed` — `aria-disabled`, still focusable, and the click STILL runs, so\n * the host can explain why the act cannot be done now.\n */\nexport function controlProps({\n href,\n onClick,\n linkComponent,\n inert = false,\n busy = false,\n dimmed = false,\n}: {\n href: string | undefined;\n onClick?: () => void;\n linkComponent: ElementType | undefined;\n inert?: boolean;\n busy?: boolean;\n dimmed?: boolean;\n}): Record<string, unknown> {\n if (inert) return { component: 'button', type: 'button', disabled: true };\n if (busy) return { component: 'button', type: 'button', 'aria-disabled': 'true' };\n if (dimmed) return { component: 'button', type: 'button', 'aria-disabled': 'true', onClick };\n if (href !== undefined) return { component: linkComponent ?? 'a', href, onClick };\n return { component: 'button', type: 'button', onClick };\n}\n\n/**\n * A destination's control: `controlProps` from its own state, plus\n * `aria-pressed` when it is an action slot that is a toggle. A link reports\n * where the viewer is through `aria-current` instead — the row draws that.\n */\nexport function destinationControl(\n destination: SectionNavDestination,\n linkComponent: ElementType | undefined,\n onClick: () => void,\n): Record<string, unknown> {\n return {\n ...controlProps({\n href: destination.href,\n linkComponent,\n inert: destination.disabled === true,\n busy: destination.loading === true,\n dimmed: destination.dimmed === true,\n onClick,\n }),\n 'aria-pressed': destination.href === undefined ? destination.active : undefined,\n };\n}\n\n/**\n * The selector for a control drawn as not live: natively disabled, or\n * `aria-disabled` (in flight, or dimmed) and still focusable.\n */\nexport const NOT_LIVE = '&:disabled, &[aria-disabled=\"true\"]';\n\n/**\n * The icon, or the spinner that stands in for it while the slot's write is in\n * flight — the same box, so the label under it does not move.\n */\nexport function SlotIcon({ icon, loading }: { icon: ReactNode; loading: boolean }): React.JSX.Element {\n if (!loading) return <>{icon}</>;\n return <CircularProgress size=\"1em\" color=\"inherit\" thickness={5} data-testid=\"section-nav-spinner\" />;\n}\n\n/** The base reset every clickable in the nav shares: no underline, no button chrome. */\nexport const CONTROL_RESET = {\n border: 0,\n background: 'none',\n font: 'inherit',\n color: 'inherit',\n textDecoration: 'none',\n cursor: 'pointer',\n margin: 0,\n [NOT_LIVE]: { cursor: 'default' },\n} as const;\n\nexport { Box };\n"],"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AQ;AAChF,SAAO,EAAE,WAAW,UAAU,MAAM,UAAU,QAAQ;AACxD;AAOO,SAAS,mBACd,aACA,eACA,SACyB;AACzB,SAAO;AAAA,IACL,GAAG,aAAa;AAAA,MACd,MAAM,YAAY;AAAA,MAClB;AAAA,MACA,OAAO,YAAY,aAAa;AAAA,MAChC,MAAM,YAAY,YAAY;AAAA,MAC9B,QAAQ,YAAY,WAAW;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,IACD,gBAAgB,YAAY,SAAS,SAAY,YAAY,SAAS;AAAA,EACxE;AACF;AAMO,IAAM,WAAW;AAMjB,SAAS,SAAS,EAAE,MAAM,QAAQ,GAA6D;AACpG,MAAI,CAAC,QAAS,QAAO,gCAAG,gBAAK;AAC7B,SAAO,oBAAC,oBAAiB,MAAK,OAAM,OAAM,WAAU,WAAW,GAAG,eAAY,uBAAsB;AACtG;AAGO,IAAM,gBAAgB;AAAA,EAC3B,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,CAAC,QAAQ,GAAG,EAAE,QAAQ,UAAU;AAClC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/navigation/SectionNav/SectionNav.railCreate.tsx"],"sourcesContent":["import Button from '@mui/material/Button/index.js';\nimport ListItemIcon from '@mui/material/ListItemIcon/index.js';\nimport ListItemText from '@mui/material/ListItemText/index.js';\nimport ListSubheader from '@mui/material/ListSubheader/index.js';\nimport Menu from '@mui/material/Menu/index.js';\nimport MenuItem from '@mui/material/MenuItem/index.js';\nimport { useTheme } from '@mui/material/styles/index.js';\nimport { useId, useState, type ElementType, type ReactNode } from 'react';\n\nimport type { SectionNavCopy } from '../../../copy';\nimport { rem } from '../../../tokens/scales';\n\nimport { CountedIcon } from './SectionNav.parts';\nimport type { SectionNavEntry, SectionNavMenu } from './SectionNav.types';\n\n/** One entry of the open menu: a link through the host's router, or an act. */\nfunction entryItem(\n groupId: string,\n entry: SectionNavEntry,\n linkComponent: ElementType | undefined,\n copy: SectionNavCopy,\n testId: string,\n close: () => void,\n): ReactNode {\n const link =\n entry.href === undefined || entry.disabled === true\n ? {}\n : { component: linkComponent ?? 'a', href: entry.href };\n const itemTestId = entry.dataTestId ?? `${testId}-entry-${entry.id}`;\n return (\n <MenuItem\n key={`${groupId}:${entry.id}`}\n {...link}\n disabled={entry.disabled === true}\n selected={entry.active === true}\n aria-current={entry.active === true ? 'page' : undefined}\n data-testid={itemTestId}\n onClick={() => {\n entry.onSelect?.();\n close();\n }}\n sx={{ gap: 1.5, py: 1, whiteSpace: 'normal' }}\n >\n <ListItemIcon sx={{ minWidth: 0, color: 'primary.main' }}>\n <CountedIcon\n icon={entry.icon}\n count={entry.badge}\n label={copy.badge}\n attentionLabel={copy.attention}\n testId={`${itemTestId}-badge`}\n />\n </ListItemIcon>\n <ListItemText\n primary={entry.label}\n secondary={entry.description}\n slotProps={{\n primary: { variant: 'body2', fontWeight: 500 },\n secondary: { variant: 'caption' },\n }}\n sx={{ my: 0 }}\n />\n </MenuItem>\n );\n}\n\n/**\n * A rail's `primary` menu as ONE button at the top of the rail, opening an\n * anchored menu of its groups (FUT-3015).\n *\n * The rail lists `more` in full, but a create menu listed that way costs a\n * heading and a two-line row per entry above the fold, for acts a person takes\n * once in a while. Folded behind '+ Criar' it costs one row. The button\n * carries the menu's `label`; the open menu is named by its `title`.\n *\n * `MenuList` skips the group subheaders when the keyboard moves, and the\n * popover hands focus back to the button when it closes on Escape or an\n * outside click. Choosing an entry closes it too, and the entry's link or act\n * takes over.\n */\nexport function RailCreateMenu({\n menu,\n linkComponent,\n copy,\n testId,\n}: {\n menu: SectionNavMenu;\n linkComponent: ElementType | undefined;\n copy: SectionNavCopy;\n testId: string;\n}): React.JSX.Element {\n const theme = useTheme();\n const menuId = useId();\n const [anchor, setAnchor] = useState<HTMLElement | null>(null);\n const open = anchor !== null;\n const close = (): void => setAnchor(null);\n const paperTestId: Record<string, string> = { 'data-testid': `${testId}-menu` };\n // One flat list: MUI's MenuList walks its direct children, so a group's\n // subheader and entries cannot sit inside a wrapper.\n const items: ReactNode[] = menu.groups.flatMap((group) => [\n group.title ? (\n <ListSubheader key={`${group.id}-title`} disableSticky sx={{ lineHeight: 2.5, bgcolor: 'transparent' }}>\n {group.title}\n </ListSubheader>\n ) : null,\n ...group.entries.map((entry) => entryItem(group.id, entry, linkComponent, copy, testId, close)),\n ]);\n return (\n <>\n <Button\n variant=\"contained\"\n fullWidth\n startIcon={menu.icon}\n disabled={menu.disabled === true}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={open ? menuId : undefined}\n data-testid={menu.dataTestId ?? testId}\n onClick={(event) => setAnchor(event.currentTarget)}\n sx={{\n my: 1,\n minHeight: rem(theme, 40),\n justifyContent: 'flex-start',\n px: 1.75,\n fontWeight: 600,\n // A place in the rail reads in sentence case, like the rows under it.\n textTransform: 'none',\n }}\n >\n {menu.label}\n </Button>\n <Menu\n id={menuId}\n anchorEl={anchor}\n open={open}\n onClose={close}\n variant=\"menu\"\n anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }}\n transformOrigin={{ vertical: 'top', horizontal: 'left' }}\n slotProps={{\n list: { 'aria-label': menu.title },\n // A data attribute is not a declared slot prop, so it rides a spread.\n paper: { ...paperTestId, sx: { minWidth: rem(theme, 260), maxWidth: rem(theme, 340) } },\n }}\n >\n {items}\n </Menu>\n </>\n );\n}\n"],"mappings":";;;;;;;;AAAA,OAAO,YAAY;AACnB,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,mBAAmB;AAC1B,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,SAAS,gBAAgB;AACzB,SAAS,OAAO,gBAAkD;AAuB9D,SA6EA,UA/DI,KAdJ;AAdJ,SAAS,UACP,SACA,OACA,eACA,MACA,QACA,OACW;AACX,QAAM,OACJ,MAAM,SAAS,UAAa,MAA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AAA,QAEC;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/navigation/SectionNav/SectionNav.bar.tsx"],"sourcesContent":["import Typography from '@mui/material/Typography/index.js';\nimport { alpha, useTheme, type SxProps, type Theme } from '@mui/material/styles/index.js';\nimport { useState, type ElementType, type ReactNode } from 'react';\n\nimport type { SectionNavCopy } from '../../../copy';\nimport { stackedOverlayZIndex } from '../../../tokens/layers';\nimport { rem } from '../../../tokens/scales';\n\nimport { barSlots, destinationState, isMenu, menuActive, menuCount, type BarSlot } from './SectionNav.helpers';\nimport {\n Box,\n CONTROL_RESET,\n CountedIcon,\n NOT_LIVE,\n SlotIcon,\n controlProps,\n destinationControl,\n focusRing,\n} from './SectionNav.parts';\nimport { RaisedActionButton } from './SectionNav.primary';\nimport { SectionNavSheet } from './SectionNav.sheet';\nimport type { SectionNavAction, SectionNavBadge, SectionNavDestination, SectionNavMenu, SectionNavProps } from './SectionNav.types';\n\n/** Which of the bar's two menus is open, if any. */\ntype OpenMenu = 'primary' | 'more' | null;\n\n/** The bar's height above the safe area — tall enough for an icon over a label. */\nconst barHeight = (theme: Parameters<typeof rem>[0]): string => rem(theme, 60);\n\n/**\n * The bar's full height on screen, the safe area included — where its sheets\n * stop, and what a host reserves at the foot of its content so nothing it\n * floats (a toast, a receipt) lands under the bar.\n */\nexport function sectionNavBarInset(theme: Parameters<typeof rem>[0]): string {\n return `calc(${barHeight(theme)} + env(safe-area-inset-bottom))`;\n}\n\n/**\n * One slot: icon over label, a count on the icon.\n *\n * `current` is the page the viewer is on and is what `aria-current` reports —\n * a link's claim only; an action slot that is ON says so with `aria-pressed`,\n * which arrives in `control`. `lit` is only how the slot looks, and goes out\n * while a sheet is open so the bar shows where the thumb is. Opening a sheet\n * is `aria-expanded`'s to say.\n *\n * A destination is a link or an action; the \"more\" slot is a button that\n * opens its sheet. Either way the whole slot is the target, so a thumb landing\n * on the label lands on the control. A `disabled` slot is a disabled button,\n * dimmed — the act is still where the hand expects it. A `loading` or\n * `dimmed` slot is drawn the same and stays focusable (`aria-disabled`).\n */\nfunction Slot({\n label,\n icon,\n count,\n current,\n lit,\n copy,\n testId,\n control,\n expanded,\n loading = false,\n}: {\n label: string;\n icon: ReactNode;\n count: SectionNavBadge | undefined;\n current: boolean;\n lit: boolean;\n copy: SectionNavCopy;\n testId: string;\n control: Record<string, unknown>;\n expanded?: boolean;\n loading?: boolean;\n}): React.JSX.Element {\n const theme = useTheme();\n return (\n <Box\n {...control}\n aria-current={current ? 'page' : undefined}\n aria-expanded={expanded}\n aria-busy={loading || undefined}\n data-lit={lit ? 'true' : undefined}\n data-testid={testId}\n sx={slotSx(theme, lit)}\n >\n <CountedIcon\n icon={\n <Box component=\"span\" data-slot-pill=\"\" sx={pillSx(theme)}>\n <SlotIcon icon={icon} loading={loading} />\n </Box>\n }\n count={count}\n label={copy.badge}\n attentionLabel={copy.attention}\n testId={`${testId}-badge`}\n />\n <Typography\n component=\"span\"\n variant=\"caption\"\n sx={{\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n lineHeight: 1.3,\n fontWeight: lit ? 700 : 600,\n color: lit ? 'text.primary' : 'inherit',\n }}\n >\n {label}\n </Typography>\n </Box>\n );\n}\n\n/** The pill behind a slot's icon — tinted while the slot is lit. */\nfunction pillSx(theme: Theme): SxProps<Theme> {\n return {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n px: 1.75,\n py: 0.25,\n borderRadius: rem(theme, 999),\n transition: theme.transitions.create('background-color', { duration: theme.transitions.duration.shorter }),\n };\n}\n\n/** A slot's look: icon over label, a pill behind the lit icon, dimmed when disabled. */\nfunction slotSx(theme: Theme, lit: boolean): SxProps<Theme> {\n return {\n ...CONTROL_RESET,\n ...focusRing(theme),\n flex: 1,\n minWidth: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 0.25,\n position: 'relative',\n color: lit ? 'primary.main' : 'text.secondary',\n // The current slot is marked by more than its colour: a tinted pill behind\n // its icon and a bolder label, so the state survives a colour-blind reading.\n '&[data-lit=\"true\"] [data-slot-pill]': { bgcolor: alpha(theme.palette.primary.main, 0.14) },\n '& svg': { fontSize: rem(theme, 22) },\n [NOT_LIVE]: { color: 'text.disabled' },\n } as SxProps<Theme>;\n}\n\n/** What every slot kind is handed: the bar's open state and how to change it. */\ninterface SlotContext {\n open: OpenMenu;\n toggle: (menu: Exclude<OpenMenu, null>) => void;\n close: () => void;\n linkComponent: ElementType | undefined;\n copy: SectionNavCopy;\n dataTestId: string;\n}\n\n/** The raised button: an action runs on tap; a menu opens its sheet. */\nfunction PrimarySlot({\n primary,\n context,\n}: {\n primary: SectionNavMenu | SectionNavAction;\n context: SlotContext;\n}): React.JSX.Element {\n const testId = primary.dataTestId ?? `${context.dataTestId}-primary`;\n if (!isMenu(primary)) {\n return (\n <RaisedActionButton\n label={primary.label}\n icon={primary.icon}\n captioned\n disabled={primary.disabled}\n loading={primary.loading}\n dataTestId={testId}\n onClick={() => {\n context.close();\n primary.onSelect();\n }}\n />\n );\n }\n return (\n <RaisedActionButton\n label={primary.label}\n icon={primary.icon}\n open={context.open === 'primary'}\n closeLabel={context.copy.close}\n disabled={primary.disabled}\n dataTestId={testId}\n onClick={() => context.toggle('primary')}\n />\n );\n}\n\n/** The \"more\" slot: a button that opens its sheet, carrying its entries' counts. */\nfunction MoreSlot({ more, context }: { more: SectionNavMenu; context: SlotContext }): React.JSX.Element {\n const { open } = context;\n return (\n <Slot\n label={more.label}\n icon={more.icon}\n count={menuCount(more)}\n current={false}\n lit={open === 'more' || (open === null && menuActive(more))}\n expanded={open === 'more'}\n copy={context.copy}\n testId={more.dataTestId ?? `${context.dataTestId}-more`}\n control={controlProps({\n href: undefined,\n linkComponent: context.linkComponent,\n inert: more.disabled === true,\n onClick: () => context.toggle('more'),\n })}\n />\n );\n}\n\n/** A destination: a link, or an action slot (a toggle when it carries `active`). */\nfunction DestinationSlot({\n destination,\n context,\n}: {\n destination: SectionNavDestination;\n context: SlotContext;\n}): React.JSX.Element {\n const { current, lit } = destinationState(destination);\n return (\n <Slot\n label={destination.label}\n icon={destination.icon}\n count={destination.badge}\n current={current}\n lit={context.open === null && lit}\n copy={context.copy}\n testId={destination.dataTestId ?? `${context.dataTestId}-dest-${destination.id}`}\n loading={destination.loading === true}\n control={destinationControl(destination, context.linkComponent, () => {\n context.close();\n destination.onSelect?.();\n })}\n />\n );\n}\n\n/** One slot of the bar, whichever kind it is. */\nfunction BarSlotView({\n slot,\n primary,\n more,\n context,\n}: {\n slot: BarSlot;\n primary: SectionNavMenu | SectionNavAction | undefined;\n more: SectionNavMenu | undefined;\n context: SlotContext;\n}): React.JSX.Element | null {\n if (slot.kind === 'primary') return primary ? <PrimarySlot primary={primary} context={context} /> : null;\n if (slot.kind === 'more') return more ? <MoreSlot more={more} context={context} /> : null;\n return <DestinationSlot destination={slot.destination} context={context} />;\n}\n\n/** The phone layout: a bottom bar, with its menus as bottom sheets. */\nexport function SectionNavBar({\n label,\n destinations,\n primary,\n more,\n linkComponent,\n copy,\n dataTestId,\n}: Required<Pick<SectionNavProps, 'label' | 'destinations' | 'copy' | 'dataTestId'>> &\n Pick<SectionNavProps, 'primary' | 'more'> & { linkComponent: ElementType | undefined }): React.JSX.Element {\n const sheetMenu = isMenu(primary) ? primary : undefined;\n const theme = useTheme();\n const [open, setOpen] = useState<OpenMenu>(null);\n const toggle = (menu: Exclude<OpenMenu, null>): void => setOpen((current) => (current === menu ? null : menu));\n const close = (): void => setOpen(null);\n\n return (\n <>\n <Box\n component=\"nav\"\n aria-label={label}\n data-testid={dataTestId}\n sx={{\n flex: 'none',\n display: 'flex',\n alignItems: 'stretch',\n boxSizing: 'border-box',\n height: sectionNavBarInset(theme),\n paddingBottom: 'env(safe-area-inset-bottom)',\n borderTop: `1px solid ${theme.palette.divider}`,\n bgcolor: 'background.paper',\n // Above the backdrop ONLY while one of its own sheets is open, so the\n // primary button can close what it opened. Raised all the time it\n // would sit over every dialog the page opens, and on a small phone a\n // dialog's own footer is exactly where the bar is. `stackedOverlayZIndex`,\n // not `zIndex.modal + 1`: a host lifting a bottom Drawer clear of a\n // stacked sheet catches this bar's OWN sheets too.\n position: 'relative',\n zIndex: open === null ? 'auto' : stackedOverlayZIndex(theme) + 1,\n }}\n >\n {barSlots(destinations, more !== undefined, primary !== undefined).map((slot) => (\n <BarSlotView\n key={slot.kind === 'destination' ? `dest-${slot.destination.id}` : `menu-${slot.kind}`}\n slot={slot}\n primary={primary}\n more={more}\n context={{ open, toggle, close, linkComponent, copy, dataTestId }}\n />\n ))}\n </Box>\n {sheetMenu ? (\n <SectionNavSheet\n menu={sheetMenu}\n open={open === 'primary'}\n onClose={close}\n linkComponent={linkComponent}\n copy={copy}\n testId={`${dataTestId}-primary-sheet`}\n bottomOffset={sectionNavBarInset(theme)}\n />\n ) : null}\n {more ? (\n <SectionNavSheet\n menu={more}\n open={open === 'more'}\n onClose={close}\n linkComponent={linkComponent}\n copy={copy}\n testId={`${dataTestId}-more-sheet`}\n bottomOffset={sectionNavBarInset(theme)}\n />\n ) : null}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,gBAAgB;AACvB,SAAS,OAAO,gBAA0C;AAC1D,SAAS,gBAAkD;AA4EvD,SA+MA,UAnMQ,KAZR;AAnDJ,IAAM,YAAY,CAAC,UAA6C,IAAI,OAAO,EAAE;AAOtE,SAAS,mBAAmB,OAA0C;AAC3E,SAAO,QAAQ,UAAU,KAAK,CAAC;AACjC;AAiBA,SAAS,KAAK;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AACZ,GAWsB;AACpB,QAAM,QAAQ,SAAS;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,G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