@12-apps/ui 6.69.0 → 6.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +7 -7
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-overflow-fields.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +2 -2
- package/dist/_internal/components/index.js +17 -17
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +5 -5
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +3 -3
- package/dist/_internal/components/layout/SettingCard/SettingCard.summary.js +4 -4
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +4 -4
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +6 -6
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +5 -5
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +6 -6
- package/dist/_internal/components/layout/index.js +9 -9
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +5 -5
- package/dist/_internal/components/navigation/SectionNav/SectionNav.helpers.js +1 -1
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +8 -8
- package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +2 -2
- package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +3 -3
- package/dist/_internal/components/navigation/index.js +8 -8
- package/dist/_internal/en-US.navigation.js +1 -1
- package/dist/_internal/icons/Icon.js +2 -2
- package/dist/_internal/icons/paths.generated.js +1 -1
- package/dist/_internal/pt-BR.navigation.js +1 -1
- package/dist/{chunk-EYW6KXUC.js → chunk-2B3NX5HJ.js} +3 -3
- package/dist/{chunk-EYW6KXUC.js.map → chunk-2B3NX5HJ.js.map} +1 -1
- package/dist/{chunk-QQWW6T4Q.js → chunk-2STYL5PF.js} +4 -4
- package/dist/{chunk-QQWW6T4Q.js.map → chunk-2STYL5PF.js.map} +1 -1
- package/dist/{chunk-SAXALTRL.js → chunk-6OLERKNC.js} +2 -2
- package/dist/{chunk-LKRXLWCC.js → chunk-6VUVSYP4.js} +3 -3
- package/dist/{chunk-62YHJAWM.js → chunk-7SPFK73H.js} +2 -2
- package/dist/{chunk-EDZYPHZT.js → chunk-7SYYGXC7.js} +3 -2
- package/dist/{chunk-EDZYPHZT.js.map → chunk-7SYYGXC7.js.map} +1 -1
- package/dist/{chunk-LY6L3DMB.js → chunk-DAT4XWYX.js} +4 -4
- package/dist/{chunk-IGMD6S76.js → chunk-EBMWYRXW.js} +4 -4
- package/dist/{chunk-EPZ7B35I.js → chunk-KIL3OVLI.js} +3 -2
- package/dist/{chunk-EPZ7B35I.js.map → chunk-KIL3OVLI.js.map} +1 -1
- package/dist/{chunk-YQGVO3ZU.js → chunk-KYPHR4TT.js} +4 -4
- package/dist/{chunk-AMT7IJYV.js → chunk-KYUEO2IO.js} +3 -1
- package/dist/chunk-KYUEO2IO.js.map +1 -0
- package/dist/{chunk-IPYV7BLH.js → chunk-L5R2FB4T.js} +2 -2
- package/dist/{chunk-67XUBKJC.js → chunk-LWQGIN2M.js} +3 -3
- package/dist/{chunk-U6ODZJCH.js → chunk-NIZUFPV3.js} +2 -2
- package/dist/{chunk-ZDT4ZGP4.js → chunk-OBGUD2PG.js} +5 -4
- package/dist/chunk-OBGUD2PG.js.map +1 -0
- package/dist/{chunk-JCHJYBDG.js → chunk-QVEQOUQY.js} +2 -2
- package/dist/{chunk-XC7YHO7Z.js → chunk-TB4UTV25.js} +3 -1
- package/dist/chunk-TB4UTV25.js.map +1 -0
- package/dist/{chunk-3FIIMP7I.js → chunk-U5YOOHR6.js} +3 -3
- package/dist/{chunk-ZZO5MRMV.js → chunk-ULK4AGG4.js} +2 -2
- package/dist/{chunk-KDQEJAKH.js → chunk-VI2IXBOO.js} +2 -2
- package/dist/{chunk-JXW6DZDN.js → chunk-WP7KPWCP.js} +7 -3
- package/dist/chunk-WP7KPWCP.js.map +1 -0
- package/dist/{chunk-SOQIWXFO.js → chunk-WWH674WU.js} +2 -2
- package/dist/{chunk-AKGXNC4R.js → chunk-WY7FR7I4.js} +3 -2
- package/dist/chunk-WY7FR7I4.js.map +1 -0
- package/dist/{chunk-XBTSKYYY.js → chunk-XS4NQ6LD.js} +24 -20
- package/dist/chunk-XS4NQ6LD.js.map +1 -0
- package/dist/{chunk-P3GBXE73.js → chunk-YCCWJ5XQ.js} +2 -2
- package/dist/chunk-YCCWJ5XQ.js.map +1 -0
- package/dist/{chunk-SEWUYHSG.js → chunk-YEKPQAOW.js} +2 -2
- package/dist/{chunk-TLPFSA55.js → chunk-ZEH6MGP5.js} +3 -3
- package/dist/data-display/DataViews.js +8 -8
- package/dist/en-US.js +1 -1
- package/dist/icons.js +2 -2
- package/dist/layout/SettingCard.js +9 -9
- package/dist/locales.js +2 -2
- package/dist/native/chunks/{chunk-CNTOS6KK.js → chunk-H22XVP5O.js} +2 -2
- package/dist/native/chunks/{chunk-JFKH5YHF.js → chunk-RHD3625Y.js} +3 -1
- package/dist/native/chunks/chunk-RHD3625Y.js.map +1 -0
- package/dist/native/data-display/Alert.js +1 -1
- package/dist/native/data-display/Avatar.js +1 -1
- package/dist/native/data-display/Badge.js +1 -1
- package/dist/native/data-display/Chip.js +1 -1
- package/dist/native/data-display/EmptyState.js +2 -2
- package/dist/native/data-display/ErrorState.js +1 -1
- package/dist/native/data-display/FleetMap.js +2 -2
- package/dist/native/feedback/Dialog.js +1 -1
- package/dist/native/form/Checkbox.js +1 -1
- package/dist/native/form/Select.js +1 -1
- package/dist/native/icons.js +1 -1
- package/dist/navigation/SectionNav.js +8 -8
- package/dist/pt-BR.js +1 -1
- package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-overflow-fields.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-quick-types.d.ts +14 -0
- package/dist/types/components/data-display/DataViews/data-views-quick-types.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.bar.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.helpers.d.ts +2 -2
- package/dist/types/components/navigation/SectionNav/SectionNav.helpers.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.parts.d.ts +5 -3
- package/dist/types/components/navigation/SectionNav/SectionNav.parts.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.rail.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.railCreate.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.types.d.ts +6 -3
- package/dist/types/components/navigation/SectionNav/SectionNav.types.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/index.d.ts +1 -1
- package/dist/types/components/navigation/SectionNav/index.d.ts.map +1 -1
- package/dist/types/copy/navigation.d.ts +5 -0
- package/dist/types/copy/navigation.d.ts.map +1 -1
- package/dist/types/en-US.navigation.d.ts.map +1 -1
- package/dist/types/icons/paths.generated.d.ts +2 -0
- package/dist/types/icons/paths.generated.d.ts.map +1 -1
- package/dist/types/pt-BR.navigation.d.ts.map +1 -1
- package/dist/types-native/icons/paths.generated.d.ts +2 -0
- package/dist/types-native/icons/paths.generated.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/DataViews/RESPONSIVE-BEHAVIOUR.md +8 -0
- package/src/components/data-display/DataViews/data-views-more-fields.tsx +2 -1
- package/src/components/data-display/DataViews/data-views-overflow-fields.ts +4 -0
- package/src/components/data-display/DataViews/data-views-quick-types.ts +14 -0
- package/src/components/navigation/SectionNav/SectionNav.bar.tsx +28 -18
- package/src/components/navigation/SectionNav/SectionNav.helpers.ts +3 -3
- package/src/components/navigation/SectionNav/SectionNav.md +7 -0
- package/src/components/navigation/SectionNav/SectionNav.parts.tsx +12 -2
- package/src/components/navigation/SectionNav/SectionNav.rail.tsx +3 -1
- package/src/components/navigation/SectionNav/SectionNav.railCreate.tsx +1 -0
- package/src/components/navigation/SectionNav/SectionNav.sheet.tsx +2 -2
- package/src/components/navigation/SectionNav/SectionNav.types.ts +7 -3
- package/src/components/navigation/SectionNav/index.ts +1 -0
- package/src/copy/navigation.ts +5 -0
- package/src/en-US.navigation.ts +1 -0
- package/src/icons/glyphs.json +2 -0
- package/src/icons/paths.generated.ts +2 -0
- package/src/pt-BR.navigation.ts +1 -0
- package/dist/chunk-AKGXNC4R.js.map +0 -1
- package/dist/chunk-AMT7IJYV.js.map +0 -1
- package/dist/chunk-JXW6DZDN.js.map +0 -1
- package/dist/chunk-P3GBXE73.js.map +0 -1
- package/dist/chunk-XBTSKYYY.js.map +0 -1
- package/dist/chunk-XC7YHO7Z.js.map +0 -1
- package/dist/chunk-ZDT4ZGP4.js.map +0 -1
- package/dist/native/chunks/chunk-JFKH5YHF.js.map +0 -1
- /package/dist/{chunk-SAXALTRL.js.map → chunk-6OLERKNC.js.map} +0 -0
- /package/dist/{chunk-LKRXLWCC.js.map → chunk-6VUVSYP4.js.map} +0 -0
- /package/dist/{chunk-62YHJAWM.js.map → chunk-7SPFK73H.js.map} +0 -0
- /package/dist/{chunk-LY6L3DMB.js.map → chunk-DAT4XWYX.js.map} +0 -0
- /package/dist/{chunk-IGMD6S76.js.map → chunk-EBMWYRXW.js.map} +0 -0
- /package/dist/{chunk-YQGVO3ZU.js.map → chunk-KYPHR4TT.js.map} +0 -0
- /package/dist/{chunk-IPYV7BLH.js.map → chunk-L5R2FB4T.js.map} +0 -0
- /package/dist/{chunk-67XUBKJC.js.map → chunk-LWQGIN2M.js.map} +0 -0
- /package/dist/{chunk-U6ODZJCH.js.map → chunk-NIZUFPV3.js.map} +0 -0
- /package/dist/{chunk-JCHJYBDG.js.map → chunk-QVEQOUQY.js.map} +0 -0
- /package/dist/{chunk-3FIIMP7I.js.map → chunk-U5YOOHR6.js.map} +0 -0
- /package/dist/{chunk-ZZO5MRMV.js.map → chunk-ULK4AGG4.js.map} +0 -0
- /package/dist/{chunk-KDQEJAKH.js.map → chunk-VI2IXBOO.js.map} +0 -0
- /package/dist/{chunk-SOQIWXFO.js.map → chunk-WWH674WU.js.map} +0 -0
- /package/dist/{chunk-SEWUYHSG.js.map → chunk-YEKPQAOW.js.map} +0 -0
- /package/dist/{chunk-TLPFSA55.js.map → chunk-ZEH6MGP5.js.map} +0 -0
- /package/dist/native/chunks/{chunk-CNTOS6KK.js.map → chunk-H22XVP5O.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import { rem } from '../../../tokens/scales';
|
|
|
7
7
|
import { Badge } from '../../data-display/Badge';
|
|
8
8
|
|
|
9
9
|
import { shownCount } from './SectionNav.helpers';
|
|
10
|
-
import type { SectionNavDestination } from './SectionNav.types';
|
|
10
|
+
import type { SectionNavBadge, SectionNavDestination } from './SectionNav.types';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* An icon with its count on the shoulder.
|
|
@@ -21,12 +21,22 @@ export function CountedIcon({
|
|
|
21
21
|
count,
|
|
22
22
|
label,
|
|
23
23
|
testId,
|
|
24
|
+
attentionLabel,
|
|
24
25
|
}: {
|
|
25
26
|
icon: ReactNode;
|
|
26
|
-
count:
|
|
27
|
+
count: SectionNavBadge | undefined;
|
|
27
28
|
label: (count: number) => string;
|
|
28
29
|
testId: string;
|
|
30
|
+
/** The "!" badge's accessible name (`SectionNavCopy.attention`). */
|
|
31
|
+
attentionLabel?: string;
|
|
29
32
|
}): React.JSX.Element {
|
|
33
|
+
if (count === '!') {
|
|
34
|
+
return (
|
|
35
|
+
<Badge content="!" variant="count" color="warning" aria-label={attentionLabel ?? label(1)} aria-live="off" data-testid={testId}>
|
|
36
|
+
{icon}
|
|
37
|
+
</Badge>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
30
40
|
const shown = shownCount(count);
|
|
31
41
|
if (shown === undefined) return <>{icon}</>;
|
|
32
42
|
return (
|
|
@@ -24,6 +24,7 @@ import type {
|
|
|
24
24
|
SectionNavMenu,
|
|
25
25
|
SectionNavProps,
|
|
26
26
|
} from './SectionNav.types';
|
|
27
|
+
import type { SectionNavBadge } from './SectionNav.types';
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* One rail row: icon, label, and the count at the far end.
|
|
@@ -51,7 +52,7 @@ function RailRow({
|
|
|
51
52
|
label: string;
|
|
52
53
|
description?: string;
|
|
53
54
|
icon: ReactNode;
|
|
54
|
-
count:
|
|
55
|
+
count: SectionNavBadge | undefined;
|
|
55
56
|
active: boolean;
|
|
56
57
|
current?: boolean;
|
|
57
58
|
copy: SectionNavCopy;
|
|
@@ -89,6 +90,7 @@ function RailRow({
|
|
|
89
90
|
icon={<SlotIcon icon={icon} loading={loading} />}
|
|
90
91
|
count={count}
|
|
91
92
|
label={copy.badge}
|
|
93
|
+
attentionLabel={copy.attention}
|
|
92
94
|
testId={`${testId}-badge`}
|
|
93
95
|
/>
|
|
94
96
|
<Box component="span" sx={{ display: 'flex', flexDirection: 'column', minWidth: 0 }}>
|
|
@@ -52,7 +52,7 @@ function GridEntry({ entry, linkComponent, copy, testId, onDone }: EntryProps):
|
|
|
52
52
|
'&:disabled': { color: 'text.disabled', '& svg': { color: 'text.disabled' } },
|
|
53
53
|
}}
|
|
54
54
|
>
|
|
55
|
-
<CountedIcon icon={entry.icon} count={entry.badge} label={copy.badge} testId={`${testId}-badge-${entry.id}`} />
|
|
55
|
+
<CountedIcon icon={entry.icon} count={entry.badge} label={copy.badge} attentionLabel={copy.attention} testId={`${testId}-badge-${entry.id}`} />
|
|
56
56
|
<Typography component="span" variant="caption" sx={{ lineHeight: 1.2, fontWeight: entry.active ? 700 : 500 }}>
|
|
57
57
|
{entry.label}
|
|
58
58
|
</Typography>
|
|
@@ -93,7 +93,7 @@ function ListEntry({ entry, linkComponent, copy, testId, onDone }: EntryProps):
|
|
|
93
93
|
'&:disabled': { color: 'text.disabled', '& svg': { color: 'text.disabled' } },
|
|
94
94
|
}}
|
|
95
95
|
>
|
|
96
|
-
<CountedIcon icon={entry.icon} count={entry.badge} label={copy.badge} testId={`${testId}-badge-${entry.id}`} />
|
|
96
|
+
<CountedIcon icon={entry.icon} count={entry.badge} label={copy.badge} attentionLabel={copy.attention} testId={`${testId}-badge-${entry.id}`} />
|
|
97
97
|
<Box component="span" sx={{ display: 'flex', flexDirection: 'column', minWidth: 0 }}>
|
|
98
98
|
<Typography component="span" variant="body2" sx={{ fontWeight: 600 }}>
|
|
99
99
|
{entry.label}
|
|
@@ -2,6 +2,9 @@ import type { ElementType, ReactNode } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type { SectionNavCopy } from '../../../copy';
|
|
4
4
|
|
|
5
|
+
/** A slot's badge: how many wait, or `'!'` for something that is not a count. */
|
|
6
|
+
export type SectionNavBadge = number | '!';
|
|
7
|
+
|
|
5
8
|
/**
|
|
6
9
|
* One slot of the section — a bar slot on a phone, a row in the rail.
|
|
7
10
|
*
|
|
@@ -50,9 +53,10 @@ export interface SectionNavDestination {
|
|
|
50
53
|
/**
|
|
51
54
|
* How many things behind this destination wait on the viewer. `0` and
|
|
52
55
|
* `undefined` render no badge — "nothing waiting" and "not known yet" are
|
|
53
|
-
* different claims and neither is a number.
|
|
56
|
+
* different claims and neither is a number. `'!'` says something waits that
|
|
57
|
+
* is not a count (money still owed, a state to resolve).
|
|
54
58
|
*/
|
|
55
|
-
badge?:
|
|
59
|
+
badge?: SectionNavBadge;
|
|
56
60
|
/**
|
|
57
61
|
* For a link: the destination the viewer is on (`aria-current="page"`). For
|
|
58
62
|
* an action slot: a toggle that is ON (`aria-pressed`). The host decides;
|
|
@@ -75,7 +79,7 @@ export interface SectionNavEntry {
|
|
|
75
79
|
icon: ReactNode;
|
|
76
80
|
href?: string;
|
|
77
81
|
onSelect?: () => void;
|
|
78
|
-
badge?:
|
|
82
|
+
badge?: SectionNavBadge;
|
|
79
83
|
active?: boolean;
|
|
80
84
|
/** Drawn dimmed and not operable — a print already on its way, an act this state refuses. */
|
|
81
85
|
disabled?: boolean;
|
package/src/copy/navigation.ts
CHANGED
|
@@ -27,6 +27,11 @@ export interface SectionNavCopy {
|
|
|
27
27
|
close: string;
|
|
28
28
|
/** A badge's accessible name — "3 pending", for a count of 3. */
|
|
29
29
|
badge: (count: number) => string;
|
|
30
|
+
/**
|
|
31
|
+
* The "!" badge's accessible name — something waits on the viewer that is
|
|
32
|
+
* not a count. Optional for a host's own copy; the shipped packs carry it.
|
|
33
|
+
*/
|
|
34
|
+
attention?: string;
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
/** The breadcrumb's overflow control, in its two spellings. */
|
package/src/en-US.navigation.ts
CHANGED
package/src/icons/glyphs.json
CHANGED
|
@@ -13,6 +13,7 @@ export const ICON_PATHS = {
|
|
|
13
13
|
ArrowDropDown: ["m7 10 5 5 5-5z"],
|
|
14
14
|
ArrowForward: ["m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"],
|
|
15
15
|
ArrowUpward: ["m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"],
|
|
16
|
+
Bolt: ["M11 21h-1l1-7H7.5c-.58 0-.57-.32-.38-.66s.05-.08.07-.12C8.48 10.94 10.42 7.54 13 3h1l-1 7h3.5c.49 0 .56.33.47.51l-.07.15C12.96 17.55 11 21 11 21"],
|
|
16
17
|
BrokenImage: ["M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2m-3 6.42 3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4z"],
|
|
17
18
|
Cancel: ["M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"],
|
|
18
19
|
Check: ["M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"],
|
|
@@ -48,6 +49,7 @@ export const ICON_PATHS = {
|
|
|
48
49
|
Remove: ["M19 13H5v-2h14z"],
|
|
49
50
|
Save: ["M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"],
|
|
50
51
|
Search: ["M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"],
|
|
52
|
+
Send: ["M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"],
|
|
51
53
|
Settings: ["M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"],
|
|
52
54
|
Visibility: ["M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"],
|
|
53
55
|
VisibilityOff: ["M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"],
|
package/src/pt-BR.navigation.ts
CHANGED
|
@@ -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 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"],"mapp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U,UAAU,YAAY,OAAO;AAAA,QACvD,iBAAiB,EAAE,UAAU,OAAO,YAAY,OAAO;AAAA,QACvD,WAAW;AAAA,UACT,MAAM,EAAE,cAAc,KAAK,MAAM;AAAA;AAAA,UAEjC,OAAO,EAAE,GAAG,aAAa,IAAI,EAAE,UAAU,IAAI,OAAO,GAAG,GAAG,UAAU,IAAI,OAAO,GAAG,EAAE,EAAE;AAAA,QACxF;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-overflow-fields.ts"],"sourcesContent":["/**\n * WHICH CONTROLS THE BAR DECLARES — split from `data-views-overflow` at the\n * file-size gate. That module decides where each control goes; this one only\n * lists them, in the order the bar renders them.\n */\nimport type { OverflowField } from \"./data-views-overflow\";\nimport { isRangeSet } from \"./data-views-overflow-costs\";\nimport type { FilterFieldConfig, QuickFilterConfig, RangeFieldConfig, RangeValue } from \"./data-views-types\";\n\n/**\n * Every declared control in the order the bar renders them: quick chips first,\n * then pills, then ranges.\n *\n * A pill field a quick chip writes to is NOT a control of its own — the chips\n * stand in for it (see `QuickFilterConfig`) — so it is left out here, and only\n * here: it stays in `fields`, where the active count and saved views read it.\n */\nexport function toOverflowFields<T extends Record<string, unknown>>(\n fields: FilterFieldConfig<T>[],\n rangeFields: RangeFieldConfig<T>[],\n quickFilters: QuickFilterConfig[] = [],\n): OverflowField<T>[] {\n const chipFields = new Set(quickFilters.map((quick) => quick.fieldId));\n return [\n ...quickFilters.map((quick) => ({\n id: `quick:${quick.id}`,\n label: quick.label,\n group: \"quick\" as const,\n quick,\n })),\n ...fields\n .filter((pill) => !chipFields.has(pill.id))\n .map((pill) => ({ id: pill.id, label: pill.label, group: \"pill\" as const, pill, pinned: pill.inMore === true })),\n ...rangeFields.map((range) => ({\n id: range.id,\n label: range.label,\n group: \"range\" as const,\n range,\n pinned: range.inMore === true,\n })),\n ];\n}\n\n/**\n * Is this quick chip pressed — its one value the field's WHOLE selection?\n *\n * Exactly, not \"includes\": a field holding two values (from a saved view, the\n * URL or the side panel) is not what either chip applies, and reading both as\n * pressed made pressing one clear the other.\n */\nexport function isQuickActive(quick: QuickFilterConfig, pills: Record<string, string[]>): boolean {\n const selected = pills[quick.fieldId] ?? [];\n return selected.length === 1 && selected[0] === quick.value;\n}\n\n/**\n * Is any DECLARED filter applied — a pill value or a bounded range, wherever it\n * is drawn (on the bar, in \"Mais\", or as a chip)? Only declared ids count: the\n * bar draws \"Limpar\" on the active count, which ignores a stale key a saved view\n * still carries for a field since removed.\n */\nexport function anyApplied<T extends Record<string, unknown>>(\n all: OverflowField<T>[],\n pills: Record<string, string[]>,\n ranges: Record<string, RangeValue>,\n): boolean {\n return all.some((field) => {\n if (field.group === \"range\") return isRangeSet(ranges[field.id]);\n const id = field.quick?.fieldId ?? field.id;\n return (pills[id]?.length ?? 0) > 0;\n });\n}\n\n/**\n * Quick chips stay a PREFIX of their declared order on the bar.\n *\n * The keep-what-fits loop skips a control that does not fit and tries the next,\n * which for pills is right (any narrower one is worth the room) and for chips\n * is not: \"Zerado\" alone on the bar, with \"Estoque baixo\" in \"Mais\", reads as a\n * different bar from the one declared. So the first chip that went to \"Mais\"\n * takes every later chip with it. Their room is NOT re-spent here — `used`\n * drops, and the ladder's later passes can hand it to the furniture.\n */\nexport function keepChipsInOrder<T extends Record<string, unknown>>(\n split: { inline: OverflowField<T>[]; overflow: OverflowField<T>[]; used: number },\n chips: OverflowField<T>[],\n cost: (field: OverflowField<T>) => number,\n): { inline: OverflowField<T>[]; overflow: OverflowField<T>[]; used: number } {\n const firstOut = chips.findIndex((chip) => split.overflow.includes(chip));\n if (firstOut < 0) return split;\n const evicted = chips.slice(firstOut).filter((chip) => split.inline.includes(chip));\n if (evicted.length === 0) return split;\n return {\n inline: split.inline.filter((field) => !evicted.includes(field)),\n overflow: [...chips.slice(firstOut), ...split.overflow.filter((field) => !chips.includes(field))],\n used: split.used - evicted.reduce((sum, chip) => sum + cost(chip), 0),\n };\n}\n\n\n\n/**\n * A quick chip's press, as a pill write. Exclusive within the field: the chip's\n * value REPLACES the selection, and pressing the pressed chip empties it.\n */\nexport function toggleQuick(pills: Record<string, string[]>, quick: QuickFilterConfig): Record<string, string[]> {\n const pressed = isQuickActive(quick, pills);\n return { ...pills, [quick.fieldId]: pressed ? [] : [quick.value] };\n}\n\n"],"mappings":";;;;;AAiBO,SAAS,iBACd,QACA,aACA,eAAoC,CAAC,GACjB;AACpB,QAAM,aAAa,IAAI,IAAI,aAAa,IAAI,CAAC,UAAU,MAAM,OAAO,CAAC;AACrE,SAAO;AAAA,IACL,GAAG,aAAa,IAAI,CAAC,WAAW;AAAA,MAC9B,IAAI,SAAS,MAAM,EAAE;AAAA,MACrB,OAAO,MAAM;AAAA,MACb,OAAO;AAAA,MACP;AAAA,IACF,EAAE;AAAA,IACF,GAAG,OACA,OAAO,CAAC,SAAS,CAAC,WAAW,IAAI,KAAK,EAAE,CAAC,EACzC,IAAI,CAAC,UAAU,EAAE,IAAI,KAAK,IAAI,OAAO,KAAK,OAAO,OAAO,QAAiB,MAAM,QAAQ,KAAK,WAAW,KAAK,EAAE;AAAA,IACjH,GAAG,YAAY,IAAI,CAAC,WAAW;AAAA,MAC7B,IAAI,MAAM;AAAA,MACV,OAAO,MAAM;AAAA,MACb,OAAO;AAAA,MACP;AAAA,MACA,QAAQ,MAAM,WAAW;AAAA,IAC3B,EAAE;AAAA,EACJ;AACF;AASO,SAAS,cAAc,OAA0B,OAA0C;AAChG,QAAM,WAAW,MAAM,MAAM,OAAO,KAAK,CAAC;AAC1C,SAAO,SAAS,WAAW,KAAK,SAAS,CAAC,MAAM,MAAM;AACxD;AAQO,SAAS,WACd,KACA,OACA,QACS;AACT,SAAO,IAAI,KAAK,CAAC,UAAU;AACzB,QAAI,MAAM,UAAU,QAAS,QAAO,WAAW,OAAO,MAAM,EAAE,CAAC;AAC/D,UAAM,KAAK,MAAM,OAAO,WAAW,MAAM;AACzC,YAAQ,MAAM,EAAE,GAAG,UAAU,KAAK;AAAA,EACpC,CAAC;AACH;AAYO,SAAS,iBACd,OACA,OACA,MAC4E;AAC5E,QAAM,WAAW,MAAM,UAAU,CAAC,SAAS,MAAM,SAAS,SAAS,IAAI,CAAC;AACxE,MAAI,WAAW,EAAG,QAAO;AACzB,QAAM,UAAU,MAAM,MAAM,QAAQ,EAAE,OAAO,CAAC,SAAS,MAAM,OAAO,SAAS,IAAI,CAAC;AAClF,MAAI,QAAQ,WAAW,EAAG,QAAO;AACjC,SAAO;AAAA,IACL,QAAQ,MAAM,OAAO,OAAO,CAAC,UAAU,CAAC,QAAQ,SAAS,KAAK,CAAC;AAAA,IAC/D,UAAU,CAAC,GAAG,MAAM,MAAM,QAAQ,GAAG,GAAG,MAAM,SAAS,OAAO,CAAC,UAAU,CAAC,MAAM,SAAS,KAAK,CAAC,CAAC;AAAA,IAChG,MAAM,MAAM,OAAO,QAAQ,OAAO,CAAC,KAAK,SAAS,MAAM,KAAK,IAAI,GAAG,CAAC;AAAA,EACtE;AACF;AAQO,SAAS,YAAY,OAAiC,OAAoD;AAC/G,QAAM,UAAU,cAAc,OAAO,KAAK;AAC1C,SAAO,EAAE,GAAG,OAAO,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,KAAK,EAAE;AACnE;","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 { 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}: {\n icon: ReactNode;\n count: number | undefined;\n label: (count: number) => string;\n testId: string;\n}): React.JSX.Element {\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"],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS;AAChB,OAAO,sBAAsB;AA6BK;AAZ3B,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKsB;AACpB,QAAM,QAAQ,WAAW,KAAK;AAC9B,MAAI,UAAU,OAAW,QAAO,gCAAG,gBAAK;AACxC;AAAA;AAAA;AAAA,IAGE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,SAAQ;AAAA,QACR,OAAM;AAAA,QACN,KAAK;AAAA,QACL,cAAY,MAAM,KAAK;AAAA,QAC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AgB;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.helpers.ts"],"sourcesContent":["import type { SectionNavAction, SectionNavDestination, SectionNavMenu } from './SectionNav.types';\n\n/** A count worth drawing: positive and finite. Zero and \"unknown\" draw nothing. */\nexport function shownCount(count: number | undefined): number | undefined {\n return count !== undefined && Number.isFinite(count) && count > 0 ? count : undefined;\n}\n\n/**\n * The \"more\" slot's badge: its entries' counts, rolled up.\n *\n * The same reason a folded sidebar parent shows its children's counts — the\n * sheet starts closed, so a count only visible once it is opened is one nobody\n * sees.\n */\nexport function menuCount(menu: SectionNavMenu | undefined): number | undefined {\n if (!menu) return undefined;\n const total = menu.groups\n .flatMap((group) => group.entries)\n .reduce((sum, entry) => sum + (shownCount(entry.badge) ?? 0), 0);\n return shownCount(total);\n}\n\n/** Is the viewer on one of this menu's entries? Then its slot reads as current. */\nexport function menuActive(menu: SectionNavMenu | undefined): boolean {\n return menu?.groups.some((group) => group.entries.some((entry) => entry.active === true)) ?? false;\n}\n\n/** What one bar slot holds, in left-to-right order. */\nexport type BarSlot =\n | { kind: 'destination'; destination: SectionNavDestination }\n | { kind: 'more' }\n | { kind: 'primary' };\n\n/**\n * The bar's slots: the destinations, then `more`, with `primary` in the MIDDLE.\n *\n * The middle is where a thumb rests and where a raised button reads as the\n * one thing this bar is for. With four slots it lands between the second and\n * the third; with an odd count it takes the lower middle, so the heavier side\n * is the right one, under the thumb of a right-handed phone.\n */\nexport function barSlots(\n destinations: readonly SectionNavDestination[],\n hasMore: boolean,\n hasPrimary: boolean,\n): BarSlot[] {\n const slots: BarSlot[] = destinations.map((destination) => ({ kind: 'destination', destination }));\n if (hasMore) slots.push({ kind: 'more' });\n if (hasPrimary) slots.splice(Math.floor(slots.length / 2), 0, { kind: 'primary' });\n return slots;\n}\n\n/** A primary that opens a sheet, as opposed to one that acts on tap. */\nexport function isMenu(primary: SectionNavMenu | SectionNavAction | undefined): primary is SectionNavMenu {\n return primary !== undefined && 'groups' in primary;\n}\n\n/**\n * How a destination reads. `current` is `aria-current=\"page\"` and belongs to a\n * LINK only — an action slot that is ON reports `aria-pressed` instead. `lit`\n * is the look, and a `dimmed` slot is never lit: it says \"not now\".\n */\nexport function destinationState(destination: SectionNavDestination): { current: boolean; lit: boolean } {\n const active = destination.active === true;\n return { current: active && destination.href !== undefined, lit: active && destination.dimmed !== true };\n}\n"],"mappings":";AAGO,SAAS,WAAW,OAA+C;AACxE,SAAO,UAAU,UAAa,OAAO,SAAS,KAAK,KAAK,QAAQ,IAAI,QAAQ;AAC9E;AASO,SAAS,UAAU,MAAsD;AAC9E,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,QAAQ,KAAK,OAChB,QAAQ,CAAC,UAAU,MAAM,OAAO,EAChC,OAAO,CAAC,KAAK,UAAU,OAAO,WAAW,MAAM,KAAK,KAAK,IAAI,CAAC;AACjE,SAAO,WAAW,KAAK;AACzB;AAGO,SAAS,WAAW,MAA2C;AACpE,SAAO,MAAM,OAAO,KAAK,CAAC,UAAU,MAAM,QAAQ,KAAK,CAAC,UAAU,MAAM,WAAW,IAAI,CAAC,KAAK;AAC/F;AAgBO,SAAS,SACd,cACA,SACA,YACW;AACX,QAAM,QAAmB,aAAa,IAAI,CAAC,iBAAiB,EAAE,MAAM,eAAe,YAAY,EAAE;AACjG,MAAI,QAAS,OAAM,KAAK,EAAE,MAAM,OAAO,CAAC;AACxC,MAAI,WAAY,OAAM,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC,GAAG,GAAG,EAAE,MAAM,UAAU,CAAC;AACjF,SAAO;AACT;AAGO,SAAS,OAAO,SAAmF;AACxG,SAAO,YAAY,UAAa,YAAY;AAC9C;AAOO,SAAS,iBAAiB,aAAwE;AACvG,QAAM,SAAS,YAAY,WAAW;AACtC,SAAO,EAAE,SAAS,UAAU,YAAY,SAAS,QAAW,KAAK,UAAU,YAAY,WAAW,KAAK;AACzG;","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 { 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, 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: number | 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={<SlotIcon icon={icon} loading={loading} />}\n count={count}\n label={copy.badge}\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 : 400,\n }}\n >\n {label}\n </Typography>\n </Box>\n );\n}\n\n/** A slot's look: icon over label, the lit rule on its top edge, 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 short rule on\n // its top edge, so the state survives a colour-blind reading.\n '&[data-lit=\"true\"]::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n insetInline: '22%',\n height: rem(theme, 3),\n borderBottomLeftRadius: rem(theme, 3),\n borderBottomRightRadius: rem(theme, 3),\n bgcolor: 'primary.main',\n },\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,gBAA0C;AACnD,SAAS,gBAAkD;AA4EvD,SAqMA,UA3LU,KAVV;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,GAAG;AAAA,MACJ,gBAAc,UAAU,SAAS;AAAA,MACjC,iBAAe;AAAA,MACf,aAAW,WAAW;AAAA,MACtB,YAAU,MAAM,SAAS;AAAA,MACz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AAQ,OAAO;AAAA,UAC7C,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAOT,UAAU;AAAA,UACV,QAAQ,SAAS,OAAO,SAAS,qBAAqB,KAAK,IAAI;AAAA,QACjE;AAAA,QAEC,mBAAS,cAAc,SAAS,QAAW,YAAY,MAAS,EAAE,IAAI,CAAC,SACtE;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,EAAE,MAAM,QAAQ,OAAO,eAAe,MAAM,WAAW;AAAA;AAAA,UAJ3D,KAAK,SAAS,gBAAgB,QAAQ,KAAK,YAAY,EAAE,KAAK,QAAQ,KAAK,IAAI;AAAA,QAKtF,CACD;AAAA;AAAA,IACH;AAAA,IACC,YACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,MAAM,SAAS;AAAA,QACf,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA,QAAQ,GAAG,UAAU;AAAA,QACrB,cAAc,mBAAmB,KAAK;AAAA;AAAA,IACxC,IACE;AAAA,IACH,OACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,MAAM,SAAS;AAAA,QACf,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA,QAAQ,GAAG,UAAU;AAAA,QACrB,cAAc,mBAAmB,KAAK;AAAA;AAAA,IACxC,IACE;AAAA,KACN;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/icons/paths.generated.ts"],"sourcesContent":["// GENERATED by scripts/generate-icon-paths.mjs from src/icons/glyphs.json.\n// Do not edit: run `pnpm icons:generate`; `pnpm icons:check` fails CI on drift.\n//\n// Each entry is the `d` of every <path> in the matching @mui/icons-material\n// module, in a 24x24 viewBox — the SAME geometry the web renders through\n// SvgIcon, so the native Icon draws the identical glyph.\n\n/** Path data per glyph, in a 0 0 24 24 viewBox. */\nexport const ICON_PATHS = {\n Add: [\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z\"],\n ArrowBack: [\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z\"],\n ArrowDownward: [\"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z\"],\n ArrowDropDown: [\"m7 10 5 5 5-5z\"],\n ArrowForward: [\"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"],\n ArrowUpward: [\"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z\"],\n BrokenImage: [\"M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2m-3 6.42 3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4z\"],\n Cancel: [\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z\"],\n Check: [\"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"],\n CheckBox: [\"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z\"],\n CheckBoxOutlineBlank: [\"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2\"],\n CheckCircle: [\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z\"],\n ChevronLeft: [\"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z\"],\n ChevronRight: [\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"],\n Close: [\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"],\n ContentCopy: [\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z\"],\n Delete: [\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z\"],\n Edit: [\"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z\"],\n Error: [\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z\"],\n ErrorOutline: [\"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8\"],\n ExpandLess: [\"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z\"],\n ExpandMore: [\"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"],\n FilterList: [\"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z\"],\n FitnessCenter: [\"M20.57 14.86 22 13.43 20.57 12 17 15.57 8.43 7 12 3.43 10.57 2 9.14 3.43 7.71 2 5.57 4.14 4.14 2.71 2.71 4.14l1.43 1.43L2 7.71l1.43 1.43L2 10.57 3.43 12 7 8.43 15.57 17 12 20.57 13.43 22l1.43-1.43L16.29 22l2.14-2.14 1.43 1.43 1.43-1.43-1.43-1.43L22 16.29z\"],\n History: [\"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z\"],\n Home: [\"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z\"],\n IndeterminateCheckBox: [\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10H7v-2h10z\"],\n Info: [\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z\"],\n InfoOutlined: [\"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8\"],\n KeyboardArrowDown: [\"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z\"],\n KeyboardArrowUp: [\"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z\"],\n Menu: [\"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z\"],\n MoreHoriz: [\"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2\"],\n MoreVert: [\"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2\"],\n NavigateBefore: [\"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z\"],\n NavigateNext: [\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"],\n Person: [\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4\"],\n Refresh: [\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z\"],\n Remove: [\"M19 13H5v-2h14z\"],\n Save: [\"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z\"],\n Search: [\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14\"],\n Settings: [\"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6\"],\n Visibility: [\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3\"],\n VisibilityOff: [\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z\"],\n VolumeOff: [\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z\"],\n VolumeUp: [\"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77\"],\n Warning: [\"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z\"],\n WarningAmber: [\"M12 5.99 19.53 19H4.47zM12 2 1 21h22z\",\"M13 16h-2v2h2zm0-6h-2v5h2z\"],\n} as const;\n\nexport type IconName = keyof typeof ICON_PATHS;\n\nexport const ICON_NAMES = Object.keys(ICON_PATHS) as readonly IconName[];\n"],"mappings":";AAQO,IAAM,aAAa;AAAA,EACxB,KAAK,CAAC,mCAAmC;AAAA,EACzC,WAAW,CAAC,2DAA2D;AAAA,EACvE,eAAe,CAAC,2DAA2D;AAAA,EAC3E,eAAe,CAAC,gBAAgB;AAAA,EAChC,cAAc,CAAC,0DAA0D;AAAA,EACzE,aAAa,CAAC,yDAAyD;AAAA,EACvE,aAAa,CAAC,qJAAqJ;AAAA,EACnK,QAAQ,CAAC,uKAAuK;AAAA,EAChL,OAAO,CAAC,mDAAmD;AAAA,EAC3D,UAAU,CAAC,8HAA8H;AAAA,EACzI,sBAAsB,CAAC,yFAAyF;AAAA,EAChH,aAAa,CAAC,gHAAgH;AAAA,EAC9H,aAAa,CAAC,+CAA+C;AAAA,EAC7D,cAAc,CAAC,gDAAgD;AAAA,EAC/D,OAAO,CAAC,uGAAuG;AAAA,EAC/G,aAAa,CAAC,2HAA2H;AAAA,EACzI,QAAQ,CAAC,0EAA0E;AAAA,EACnF,MAAM,CAAC,kIAAkI;AAAA,EACzI,OAAO,CAAC,6FAA6F;AAAA,EACrG,cAAc,CAAC,uKAAuK;AAAA,EACtL,YAAY,CAAC,+CAA+C;AAAA,EAC5D,YAAY,CAAC,8CAA8C;AAAA,EAC3D,YAAY,CAAC,0CAA0C;AAAA,EACvD,eAAe,CAAC,iQAAiQ;AAAA,EACjR,SAAS,CAAC,8NAA8N;AAAA,EACxO,MAAM,CAAC,qCAAqC;AAAA,EAC5C,uBAAuB,CAAC,4FAA4F;AAAA,EACpH,MAAM,CAAC,6FAA6F;AAAA,EACpG,cAAc,CAAC,oJAAoJ;AAAA,EACnK,mBAAmB,CAAC,+CAA+C;AAAA,EACnE,iBAAiB,CAAC,gDAAgD;AAAA,EAClE,MAAM,CAAC,yCAAyC;AAAA,EAChD,WAAW,CAAC,kJAAkJ;AAAA,EAC9J,UAAU,CAAC,gJAAgJ;AAAA,EAC3J,gBAAgB,CAAC,+CAA+C;AAAA,EAChE,cAAc,CAAC,gDAAgD;AAAA,EAC/D,QAAQ,CAAC,6GAA6G;AAAA,EACtH,SAAS,CAAC,iMAAiM;AAAA,EAC3M,QAAQ,CAAC,iBAAiB;AAAA,EAC1B,MAAM,CAAC,wIAAwI;AAAA,EAC/I,QAAQ,CAAC,mOAAmO;AAAA,EAC5O,UAAU,CAAC,irBAAirB;AAAA,EAC5rB,YAAY,CAAC,gNAAgN;AAAA,EAC7N,eAAe,CAAC,0eAA0e;AAAA,EAC1f,WAAW,CAAC,sVAAsV;AAAA,EAClW,UAAU,CAAC,yLAAyL;AAAA,EACpM,SAAS,CAAC,2CAA2C;AAAA,EACrD,cAAc,CAAC,yCAAwC,4BAA4B;AACrF;AAIO,IAAM,aAAa,OAAO,KAAK,UAAU;","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';\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: number | 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 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,gBAAgB;AACvB,SAAS,gBAAgB;AAuFX,cAKR,YALQ;AAlDd,SAAS,QAAQ;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AACZ,GAWsB;AACpB,QAAM,QAAQ,SAAS;AACvB,SAC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;AAEJ;AAUO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAGwB;AACtB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,cAAY;AAAA,MACZ,eAAa;AAAA,MACb,IAAI;AAAA,QACF,SAAS;AAAA,QACT,eAAe;AAAA,QACf,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,SAAS;AAAA,MACX;AAAA,MAEC;AAAA,eAAO,oBAAC,YAAS,MAAY,eAA8B,QAAQ,GAAG,UAAU,SAAS,IAAK;AAAA,QAC9F,UAAU,oBAAC,eAAa,mBAAQ,IAAiB;AAAA,QACjD,OAAO,OAAO,IACb,oBAAC,kBAAe,MAAM,SAAS,eAA8B,MAAY,QAAQ,GAAG,UAAU,YAAY,IACxG;AAAA,QACH,aAAa,IAAI,CAAC,gBACjB;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA;AAAA,YACA;AAAA,YACA,QAAQ,YAAY,cAAc,GAAG,UAAU,SAAS,YAAY,EAAE;AAAA;AAAA,UAJjE,YAAY;AAAA,QAKnB,CACD;AAAA,QACA,WAAW,CAAC,OAAO,OAAO,IACzB,oBAAC,cAAW,QAAQ,SAAS,eAA8B,MAAY,QAAQ,GAAG,UAAU,YAAY,IACtG;AAAA,QACH,OAAO,oBAAC,YAAS,MAAM,MAAM,eAA8B,MAAY,QAAQ,GAAG,UAAU,SAAS,IAAK;AAAA;AAAA;AAAA,EAC7G;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/icons/Icon.types.ts","../../../src/icons/paths.generated.ts","../../../src/icons/Icon.native.tsx","../../../src/icons/icon-color.ts"],"sourcesContent":["import type { IconName } from './paths.generated';\nimport type { ColorValue, SizeValue } from '../tokens/vocabulary';\n\nexport type { IconName };\n\n/**\n * The glyph sizes, in px. `md` is MUI's `SvgIcon` default (24) and `sm` its\n * `small` (20); the rest continue the house scale in 4px steps either side.\n */\nexport const ICON_SIZES: Record<SizeValue, number> = {\n xs: 16,\n sm: 20,\n md: 24,\n lg: 32,\n xl: 40,\n};\n\nexport interface IconBaseProps {\n /** Which glyph. The list is `src/icons/glyphs.json`; both renderers draw the same paths. */\n name: IconName;\n /** A step of the house scale, or an exact px size. */\n size?: SizeValue | number;\n /**\n * A house colour, `inherit` (the surrounding text's colour on the web, the\n * theme's primary text on native, which has no `currentColor`), or any CSS\n * colour string.\n */\n color?: ColorValue | 'inherit' | string;\n /**\n * The name a screen reader gives the glyph. Omit for a decorative icon: it\n * is then hidden from assistive technology on both renderers.\n */\n label?: string;\n testID?: string;\n dataTestId?: string;\n}\n\n/** The px size for either spelling of `size`. */\nexport const iconSize = (size: SizeValue | number | undefined): number =>\n typeof size === 'number' ? size : ICON_SIZES[size ?? 'md'];\n","// GENERATED by scripts/generate-icon-paths.mjs from src/icons/glyphs.json.\n// Do not edit: run `pnpm icons:generate`; `pnpm icons:check` fails CI on drift.\n//\n// Each entry is the `d` of every <path> in the matching @mui/icons-material\n// module, in a 24x24 viewBox — the SAME geometry the web renders through\n// SvgIcon, so the native Icon draws the identical glyph.\n\n/** Path data per glyph, in a 0 0 24 24 viewBox. */\nexport const ICON_PATHS = {\n Add: [\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z\"],\n ArrowBack: [\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z\"],\n ArrowDownward: [\"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z\"],\n ArrowDropDown: [\"m7 10 5 5 5-5z\"],\n ArrowForward: [\"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"],\n ArrowUpward: [\"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z\"],\n BrokenImage: [\"M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2m-3 6.42 3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4z\"],\n Cancel: [\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z\"],\n Check: [\"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"],\n CheckBox: [\"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z\"],\n CheckBoxOutlineBlank: [\"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2\"],\n CheckCircle: [\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z\"],\n ChevronLeft: [\"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z\"],\n ChevronRight: [\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"],\n Close: [\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"],\n ContentCopy: [\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z\"],\n Delete: [\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z\"],\n Edit: [\"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z\"],\n Error: [\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z\"],\n ErrorOutline: [\"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8\"],\n ExpandLess: [\"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z\"],\n ExpandMore: [\"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"],\n FilterList: [\"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z\"],\n FitnessCenter: [\"M20.57 14.86 22 13.43 20.57 12 17 15.57 8.43 7 12 3.43 10.57 2 9.14 3.43 7.71 2 5.57 4.14 4.14 2.71 2.71 4.14l1.43 1.43L2 7.71l1.43 1.43L2 10.57 3.43 12 7 8.43 15.57 17 12 20.57 13.43 22l1.43-1.43L16.29 22l2.14-2.14 1.43 1.43 1.43-1.43-1.43-1.43L22 16.29z\"],\n History: [\"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z\"],\n Home: [\"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z\"],\n IndeterminateCheckBox: [\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10H7v-2h10z\"],\n Info: [\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z\"],\n InfoOutlined: [\"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8\"],\n KeyboardArrowDown: [\"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z\"],\n KeyboardArrowUp: [\"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z\"],\n Menu: [\"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z\"],\n MoreHoriz: [\"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2\"],\n MoreVert: [\"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2\"],\n NavigateBefore: [\"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z\"],\n NavigateNext: [\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"],\n Person: [\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4\"],\n Refresh: [\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z\"],\n Remove: [\"M19 13H5v-2h14z\"],\n Save: [\"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z\"],\n Search: [\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14\"],\n Settings: [\"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6\"],\n Visibility: [\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3\"],\n VisibilityOff: [\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z\"],\n VolumeOff: [\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z\"],\n VolumeUp: [\"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77\"],\n Warning: [\"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z\"],\n WarningAmber: [\"M12 5.99 19.53 19H4.47zM12 2 1 21h22z\",\"M13 16h-2v2h2zm0-6h-2v5h2z\"],\n} as const;\n\nexport type IconName = keyof typeof ICON_PATHS;\n\nexport const ICON_NAMES = Object.keys(ICON_PATHS) as readonly IconName[];\n","import * as React from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport Svg, { Path } from 'react-native-svg';\n\nimport { iconFill } from './icon-color';\nimport { iconSize, type IconBaseProps } from './Icon.types';\nimport { ICON_PATHS } from './paths.generated';\nimport { resolveTestId } from '../platform/test-id';\nimport { useUiTheme } from '../provider/use-ui-theme.native';\n\nexport interface IconProps extends IconBaseProps {\n style?: StyleProp<ViewStyle>;\n}\n\n/**\n * The native `Icon`: `react-native-svg` drawing the same generated path the web\n * `SvgIcon` draws, in the same 24-unit box, at the same px size.\n */\nexport function Icon({ name, size, color, label, style, ...rest }: IconProps): React.JSX.Element {\n const theme = useUiTheme();\n const px = iconSize(size);\n const fill = iconFill(theme, color, theme.palette.text.primary);\n const testId = resolveTestId(rest, `icon-${name}`);\n\n return (\n <Svg\n width={px}\n height={px}\n viewBox=\"0 0 24 24\"\n fill={fill}\n style={style}\n testID={testId}\n role=\"img\"\n aria-label={label}\n aria-hidden={!label}\n >\n {ICON_PATHS[name].map((d) => (\n <Path key={d} d={d} fill={fill} />\n ))}\n </Svg>\n );\n}\n\nIcon.displayName = 'Icon';\n","import { COLOR_VALUES, type ColorValue } from '../tokens/vocabulary';\nimport type { UiTheme } from '../tokens/theme';\n\nconst isColorValue = (color: string): color is ColorValue =>\n (COLOR_VALUES as readonly string[]).includes(color);\n\n/**\n * The fill for an icon's `color` prop, on either renderer.\n *\n * A house colour resolves to the palette slot's `main`; `inherit` is the\n * caller's problem (the web passes `currentColor`, native the text colour); any\n * other string is taken as a CSS colour and passed through.\n */\nexport function iconFill(theme: UiTheme, color: string | undefined, inherit: string): string {\n if (color === undefined || color === 'inherit') return inherit;\n if (isColorValue(color)) {\n return color === 'neutral' ? theme.palette.text.secondary : theme.palette[color].main;\n }\n return color;\n}\n"],"mappings":";;;;;;;;;;;AASO,IAAM,aAAwC;AAAA,EACnD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAuBO,IAAM,WAAW,CAAC,SACvB,OAAO,SAAS,WAAW,OAAO,WAAW,QAAQ,IAAI;;;AC/BpD,IAAM,aAAa;AAAA,EACxB,KAAK,CAAC,mCAAmC;AAAA,EACzC,WAAW,CAAC,2DAA2D;AAAA,EACvE,eAAe,CAAC,2DAA2D;AAAA,EAC3E,eAAe,CAAC,gBAAgB;AAAA,EAChC,cAAc,CAAC,0DAA0D;AAAA,EACzE,aAAa,CAAC,yDAAyD;AAAA,EACvE,aAAa,CAAC,qJAAqJ;AAAA,EACnK,QAAQ,CAAC,uKAAuK;AAAA,EAChL,OAAO,CAAC,mDAAmD;AAAA,EAC3D,UAAU,CAAC,8HAA8H;AAAA,EACzI,sBAAsB,CAAC,yFAAyF;AAAA,EAChH,aAAa,CAAC,gHAAgH;AAAA,EAC9H,aAAa,CAAC,+CAA+C;AAAA,EAC7D,cAAc,CAAC,gDAAgD;AAAA,EAC/D,OAAO,CAAC,uGAAuG;AAAA,EAC/G,aAAa,CAAC,2HAA2H;AAAA,EACzI,QAAQ,CAAC,0EAA0E;AAAA,EACnF,MAAM,CAAC,kIAAkI;AAAA,EACzI,OAAO,CAAC,6FAA6F;AAAA,EACrG,cAAc,CAAC,uKAAuK;AAAA,EACtL,YAAY,CAAC,+CAA+C;AAAA,EAC5D,YAAY,CAAC,8CAA8C;AAAA,EAC3D,YAAY,CAAC,0CAA0C;AAAA,EACvD,eAAe,CAAC,iQAAiQ;AAAA,EACjR,SAAS,CAAC,8NAA8N;AAAA,EAC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ACzB,QAAM,KAAK,SAAS,IAAI;AACxB,QAAM,OAAO,SAAS,OAAO,OAAO,MAAM,QAAQ,KAAK,OAAO;AAC9D,QAAM,SAAS,cAAc,MAAM,QAAQ,IAAI,EAAE;AAEjD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,eAAa,CAAC;AAAA,MAEb,qBAAW,IAAI,EAAE,IAAI,CAAC,MACrB,oBAAC,QAAa,GAAM,QAAT,CAAqB,CACjC;AAAA;AAAA,EACH;AAEJ;AAEA,KAAK,cAAc;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|