@12-apps/ui 6.69.0 → 6.70.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/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-QQWW6T4Q.js → chunk-2STYL5PF.js} +4 -4
- package/dist/{chunk-QQWW6T4Q.js.map → chunk-2STYL5PF.js.map} +1 -1
- package/dist/{chunk-LKRXLWCC.js → chunk-6VUVSYP4.js} +3 -3
- 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-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-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-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-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/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/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/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-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-LKRXLWCC.js.map → chunk-6VUVSYP4.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-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-SEWUYHSG.js.map → chunk-YEKPQAOW.js.map} +0 -0
- /package/dist/native/chunks/{chunk-CNTOS6KK.js.map → chunk-H22XVP5O.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SettingSwitchBlock,
|
|
3
3
|
useSettingSwitchIds
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6VUVSYP4.js";
|
|
5
5
|
import {
|
|
6
6
|
SettingGroupContext
|
|
7
7
|
} from "./chunk-XJQNSMGA.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-SALQ65SM.js";
|
|
11
11
|
import {
|
|
12
12
|
partTestId
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ULK4AGG4.js";
|
|
14
14
|
import {
|
|
15
15
|
dependentsStyles,
|
|
16
16
|
hintStyles,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-IQWPVPV5.js";
|
|
20
20
|
import {
|
|
21
21
|
Icon
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YEKPQAOW.js";
|
|
23
23
|
|
|
24
24
|
// src/components/layout/SettingCard/SettingGroup.tsx
|
|
25
25
|
import Box from "@mui/material/Box/index.js";
|
|
@@ -84,4 +84,4 @@ SettingGroup.displayName = "SettingGroup";
|
|
|
84
84
|
export {
|
|
85
85
|
SettingGroup
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-EBMWYRXW.js.map
|
|
@@ -12,7 +12,8 @@ var PT_BR_BREADCRUMB_COPY = {
|
|
|
12
12
|
};
|
|
13
13
|
var PT_BR_SECTION_NAV_COPY = {
|
|
14
14
|
close: "Fechar",
|
|
15
|
-
badge: (count) => count === 1 ? "1 pendente" : `${count} pendentes
|
|
15
|
+
badge: (count) => count === 1 ? "1 pendente" : `${count} pendentes`,
|
|
16
|
+
attention: "Precisa de aten\xE7\xE3o"
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
export {
|
|
@@ -20,4 +21,4 @@ export {
|
|
|
20
21
|
PT_BR_BREADCRUMB_COPY,
|
|
21
22
|
PT_BR_SECTION_NAV_COPY
|
|
22
23
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-KIL3OVLI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pt-BR.navigation.ts"],"sourcesContent":["/**\n * The pt-BR pack for the navigation family. Split out of `pt-BR.ts`, which is a\n * barrel over this folder — see that file for why.\n */\nimport type {\n BreadcrumbCopy,\n CommandPaletteCopy,\n SectionNavCopy,\n} from './copy';\n\nexport const PT_BR_COMMAND_PALETTE_COPY: CommandPaletteCopy = {\n execute: \"Executar\",\n navigate: \"↑↓ Navegar\",\n close: \"ESC Fechar\",\n recent: \"Recentes\",\n tryAnotherTerm: \"Tente outro termo\",\n};\n\nexport const PT_BR_BREADCRUMB_COPY: BreadcrumbCopy = {\n showMore: \"Mostrar mais\",\n moreItems: \"Mais itens\",\n};\n\nexport const PT_BR_SECTION_NAV_COPY: SectionNavCopy = {\n close: \"Fechar\",\n badge: (count) => (count === 1 ? \"1 pendente\" : `${count} pendentes`),\n};\n"],"mappings":";AAUO,IAAM,6BAAiD;AAAA,EAC5D,SAAS;AAAA,EACT,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,gBAAgB;AAClB;AAEO,IAAM,wBAAwC;AAAA,EACnD,UAAU;AAAA,EACV,WAAW;AACb;AAEO,IAAM,yBAAyC;AAAA,EACpD,OAAO;AAAA,EACP,OAAO,CAAC,UAAW,UAAU,IAAI,eAAe,GAAG,KAAK;
|
|
1
|
+
{"version":3,"sources":["../src/pt-BR.navigation.ts"],"sourcesContent":["/**\n * The pt-BR pack for the navigation family. Split out of `pt-BR.ts`, which is a\n * barrel over this folder — see that file for why.\n */\nimport type {\n BreadcrumbCopy,\n CommandPaletteCopy,\n SectionNavCopy,\n} from './copy';\n\nexport const PT_BR_COMMAND_PALETTE_COPY: CommandPaletteCopy = {\n execute: \"Executar\",\n navigate: \"↑↓ Navegar\",\n close: \"ESC Fechar\",\n recent: \"Recentes\",\n tryAnotherTerm: \"Tente outro termo\",\n};\n\nexport const PT_BR_BREADCRUMB_COPY: BreadcrumbCopy = {\n showMore: \"Mostrar mais\",\n moreItems: \"Mais itens\",\n};\n\nexport const PT_BR_SECTION_NAV_COPY: SectionNavCopy = {\n close: \"Fechar\",\n badge: (count) => (count === 1 ? \"1 pendente\" : `${count} pendentes`),\n attention: \"Precisa de atenção\",\n};\n"],"mappings":";AAUO,IAAM,6BAAiD;AAAA,EAC5D,SAAS;AAAA,EACT,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,gBAAgB;AAClB;AAEO,IAAM,wBAAwC;AAAA,EACnD,UAAU;AAAA,EACV,WAAW;AACb;AAEO,IAAM,yBAAyC;AAAA,EACpD,OAAO;AAAA,EACP,OAAO,CAAC,UAAW,UAAU,IAAI,eAAe,GAAG,KAAK;AAAA,EACxD,WAAW;AACb;","names":[]}
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-SALQ65SM.js";
|
|
4
4
|
import {
|
|
5
5
|
useSummaryInfo
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-U5YOOHR6.js";
|
|
7
7
|
import {
|
|
8
8
|
LearnMore,
|
|
9
9
|
PendingSpinner,
|
|
10
10
|
SaveError,
|
|
11
11
|
SettingHeader,
|
|
12
12
|
partTestId
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ULK4AGG4.js";
|
|
14
14
|
import {
|
|
15
15
|
SETTING_CARD_OPEN_ATTR,
|
|
16
16
|
actionsStyles,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-IQWPVPV5.js";
|
|
21
21
|
import {
|
|
22
22
|
Icon
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YEKPQAOW.js";
|
|
24
24
|
import {
|
|
25
25
|
Button
|
|
26
26
|
} from "./chunk-364NH2NY.js";
|
|
@@ -170,4 +170,4 @@ SettingCard.displayName = "SettingCard";
|
|
|
170
170
|
export {
|
|
171
171
|
SettingCard
|
|
172
172
|
};
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-KYPHR4TT.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SettingSwitchBlock,
|
|
3
3
|
useSettingSwitchIds
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6VUVSYP4.js";
|
|
5
5
|
import {
|
|
6
6
|
useSettingGroup
|
|
7
7
|
} from "./chunk-XJQNSMGA.js";
|
|
@@ -44,4 +44,4 @@ SettingToggle.displayName = "SettingToggle";
|
|
|
44
44
|
export {
|
|
45
45
|
SettingToggle
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=chunk-
|
|
47
|
+
//# sourceMappingURL=chunk-L5R2FB4T.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SectionNavRail
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OBGUD2PG.js";
|
|
4
4
|
import {
|
|
5
5
|
SectionNavBar
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XS4NQ6LD.js";
|
|
7
7
|
|
|
8
8
|
// src/components/navigation/SectionNav/SectionNav.tsx
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -52,4 +52,4 @@ function SectionNav({
|
|
|
52
52
|
export {
|
|
53
53
|
SectionNav
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-LWQGIN2M.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
partTestId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ULK4AGG4.js";
|
|
4
4
|
import {
|
|
5
5
|
SETTING_CARD_OPEN_ATTR,
|
|
6
6
|
withCallerSx
|
|
@@ -79,4 +79,4 @@ export {
|
|
|
79
79
|
settingGridStyles,
|
|
80
80
|
SettingGrid
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-NIZUFPV3.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RailCreateMenu
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WY7FR7I4.js";
|
|
4
4
|
import {
|
|
5
5
|
Box,
|
|
6
6
|
CONTROL_RESET,
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
controlProps,
|
|
11
11
|
destinationControl,
|
|
12
12
|
focusRing
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WP7KPWCP.js";
|
|
14
14
|
import {
|
|
15
15
|
destinationState,
|
|
16
16
|
isMenu
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YCCWJ5XQ.js";
|
|
18
18
|
import {
|
|
19
19
|
rem
|
|
20
20
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -68,6 +68,7 @@ function RailRow({
|
|
|
68
68
|
icon: /* @__PURE__ */ jsx(SlotIcon, { icon, loading }),
|
|
69
69
|
count,
|
|
70
70
|
label: copy.badge,
|
|
71
|
+
attentionLabel: copy.attention,
|
|
71
72
|
testId: `${testId}-badge`
|
|
72
73
|
}
|
|
73
74
|
),
|
|
@@ -245,4 +246,4 @@ function SectionNavRail({
|
|
|
245
246
|
export {
|
|
246
247
|
SectionNavRail
|
|
247
248
|
};
|
|
248
|
-
//# sourceMappingURL=chunk-
|
|
249
|
+
//# sourceMappingURL=chunk-OBGUD2PG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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":";;;;;;;;;;;;;;;;;;;;;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AM,eAA8B,MAAY,QAAQ,GAAG,UAAU,SAAS,IAAK;AAAA;AAAA;AAAA,EAC7G;AAEJ;","names":[]}
|
|
@@ -6,6 +6,7 @@ var ICON_PATHS = {
|
|
|
6
6
|
ArrowDropDown: ["m7 10 5 5 5-5z"],
|
|
7
7
|
ArrowForward: ["m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"],
|
|
8
8
|
ArrowUpward: ["m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"],
|
|
9
|
+
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"],
|
|
9
10
|
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"],
|
|
10
11
|
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"],
|
|
11
12
|
Check: ["M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"],
|
|
@@ -41,6 +42,7 @@ var ICON_PATHS = {
|
|
|
41
42
|
Remove: ["M19 13H5v-2h14z"],
|
|
42
43
|
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"],
|
|
43
44
|
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"],
|
|
45
|
+
Send: ["M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"],
|
|
44
46
|
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"],
|
|
45
47
|
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"],
|
|
46
48
|
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"],
|
|
@@ -55,4 +57,4 @@ export {
|
|
|
55
57
|
ICON_PATHS,
|
|
56
58
|
ICON_NAMES
|
|
57
59
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
60
|
+
//# sourceMappingURL=chunk-TB4UTV25.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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 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\"],\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 Send: [\"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z\"],\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,MAAM,CAAC,kJAAkJ;AAAA,EACzJ,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,cA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k-BFRVMCQM.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-G3JFESKD.js";
|
|
10
10
|
import {
|
|
11
11
|
Icon
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YEKPQAOW.js";
|
|
13
13
|
import {
|
|
14
14
|
rem
|
|
15
15
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -92,4 +92,4 @@ export {
|
|
|
92
92
|
SummaryInfo,
|
|
93
93
|
useSummaryInfo
|
|
94
94
|
};
|
|
95
|
-
//# sourceMappingURL=chunk-
|
|
95
|
+
//# sourceMappingURL=chunk-U5YOOHR6.js.map
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-NI67M453.js";
|
|
16
16
|
import {
|
|
17
17
|
Icon
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YEKPQAOW.js";
|
|
19
19
|
import {
|
|
20
20
|
Button
|
|
21
21
|
} from "./chunk-364NH2NY.js";
|
|
@@ -139,4 +139,4 @@ export {
|
|
|
139
139
|
PendingSpinner,
|
|
140
140
|
LearnMore
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=chunk-
|
|
142
|
+
//# sourceMappingURL=chunk-ULK4AGG4.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
NOT_LIVE,
|
|
5
5
|
SlotIcon,
|
|
6
6
|
focusRing
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WP7KPWCP.js";
|
|
8
8
|
import {
|
|
9
9
|
rem
|
|
10
10
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -110,4 +110,4 @@ function raisedSx(theme, expanded) {
|
|
|
110
110
|
export {
|
|
111
111
|
RaisedActionButton
|
|
112
112
|
};
|
|
113
|
-
//# sourceMappingURL=chunk-
|
|
113
|
+
//# sourceMappingURL=chunk-VI2IXBOO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
shownCount
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YCCWJ5XQ.js";
|
|
4
4
|
import {
|
|
5
5
|
Badge
|
|
6
6
|
} from "./chunk-N5PVD4J5.js";
|
|
@@ -16,8 +16,12 @@ function CountedIcon({
|
|
|
16
16
|
icon,
|
|
17
17
|
count,
|
|
18
18
|
label,
|
|
19
|
-
testId
|
|
19
|
+
testId,
|
|
20
|
+
attentionLabel
|
|
20
21
|
}) {
|
|
22
|
+
if (count === "!") {
|
|
23
|
+
return /* @__PURE__ */ jsx(Badge, { content: "!", variant: "count", color: "warning", "aria-label": attentionLabel ?? label(1), "aria-live": "off", "data-testid": testId, children: icon });
|
|
24
|
+
}
|
|
21
25
|
const shown = shownCount(count);
|
|
22
26
|
if (shown === void 0) return /* @__PURE__ */ jsx(Fragment, { children: icon });
|
|
23
27
|
return (
|
|
@@ -99,4 +103,4 @@ export {
|
|
|
99
103
|
SlotIcon,
|
|
100
104
|
CONTROL_RESET
|
|
101
105
|
};
|
|
102
|
-
//# sourceMappingURL=chunk-
|
|
106
|
+
//# sourceMappingURL=chunk-WP7KPWCP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS;AAChB,OAAO,sBAAsB;AAiCvB,SAM4B,UAN5B;AAhBC,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOsB;AACpB,MAAI,UAAU,KAAK;AACjB,WACE,oBAAC,SAAM,SAAQ,KAAI,SAAQ,SAAQ,OAAM,WAAU,cAAY,kBAAkB,MAAM,CAAC,GAAG,aAAU,OAAM,eAAa,QACrH,gBAC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,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,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CountedIcon
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WP7KPWCP.js";
|
|
4
4
|
import {
|
|
5
5
|
rem
|
|
6
6
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -38,6 +38,7 @@ function entryItem(groupId, entry, linkComponent, copy, testId, close) {
|
|
|
38
38
|
icon: entry.icon,
|
|
39
39
|
count: entry.badge,
|
|
40
40
|
label: copy.badge,
|
|
41
|
+
attentionLabel: copy.attention,
|
|
41
42
|
testId: `${itemTestId}-badge`
|
|
42
43
|
}
|
|
43
44
|
) }),
|
|
@@ -123,4 +124,4 @@ function RailCreateMenu({
|
|
|
123
124
|
export {
|
|
124
125
|
RailCreateMenu
|
|
125
126
|
};
|
|
126
|
-
//# sourceMappingURL=chunk-
|
|
127
|
+
//# sourceMappingURL=chunk-WY7FR7I4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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":";;;;;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R,cAAc,EAAE,UAAU,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,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SectionNavSheet
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2STYL5PF.js";
|
|
4
4
|
import {
|
|
5
5
|
RaisedActionButton
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VI2IXBOO.js";
|
|
7
7
|
import {
|
|
8
8
|
Box,
|
|
9
9
|
CONTROL_RESET,
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
controlProps,
|
|
14
14
|
destinationControl,
|
|
15
15
|
focusRing
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WP7KPWCP.js";
|
|
17
17
|
import {
|
|
18
18
|
barSlots,
|
|
19
19
|
destinationState,
|
|
20
20
|
isMenu,
|
|
21
21
|
menuActive,
|
|
22
22
|
menuCount
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YCCWJ5XQ.js";
|
|
24
24
|
import {
|
|
25
25
|
rem
|
|
26
26
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
|
|
31
31
|
// src/components/navigation/SectionNav/SectionNav.bar.tsx
|
|
32
32
|
import Typography from "@mui/material/Typography/index.js";
|
|
33
|
-
import { useTheme } from "@mui/material/styles/index.js";
|
|
33
|
+
import { alpha, useTheme } from "@mui/material/styles/index.js";
|
|
34
34
|
import { useState } from "react";
|
|
35
35
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
36
36
|
var barHeight = (theme) => rem(theme, 60);
|
|
@@ -64,9 +64,10 @@ function Slot({
|
|
|
64
64
|
/* @__PURE__ */ jsx(
|
|
65
65
|
CountedIcon,
|
|
66
66
|
{
|
|
67
|
-
icon: /* @__PURE__ */ jsx(SlotIcon, { icon, loading }),
|
|
67
|
+
icon: /* @__PURE__ */ jsx(Box, { component: "span", "data-slot-pill": "", sx: pillSx(theme), children: /* @__PURE__ */ jsx(SlotIcon, { icon, loading }) }),
|
|
68
68
|
count,
|
|
69
69
|
label: copy.badge,
|
|
70
|
+
attentionLabel: copy.attention,
|
|
70
71
|
testId: `${testId}-badge`
|
|
71
72
|
}
|
|
72
73
|
),
|
|
@@ -81,7 +82,8 @@ function Slot({
|
|
|
81
82
|
textOverflow: "ellipsis",
|
|
82
83
|
whiteSpace: "nowrap",
|
|
83
84
|
lineHeight: 1.3,
|
|
84
|
-
fontWeight: lit ? 700 :
|
|
85
|
+
fontWeight: lit ? 700 : 600,
|
|
86
|
+
color: lit ? "text.primary" : "inherit"
|
|
85
87
|
},
|
|
86
88
|
children: label
|
|
87
89
|
}
|
|
@@ -90,6 +92,17 @@ function Slot({
|
|
|
90
92
|
}
|
|
91
93
|
);
|
|
92
94
|
}
|
|
95
|
+
function pillSx(theme) {
|
|
96
|
+
return {
|
|
97
|
+
display: "inline-flex",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
justifyContent: "center",
|
|
100
|
+
px: 1.75,
|
|
101
|
+
py: 0.25,
|
|
102
|
+
borderRadius: rem(theme, 999),
|
|
103
|
+
transition: theme.transitions.create("background-color", { duration: theme.transitions.duration.shorter })
|
|
104
|
+
};
|
|
105
|
+
}
|
|
93
106
|
function slotSx(theme, lit) {
|
|
94
107
|
return {
|
|
95
108
|
...CONTROL_RESET,
|
|
@@ -103,18 +116,9 @@ function slotSx(theme, lit) {
|
|
|
103
116
|
gap: 0.25,
|
|
104
117
|
position: "relative",
|
|
105
118
|
color: lit ? "primary.main" : "text.secondary",
|
|
106
|
-
// The current slot is marked by more than its colour: a
|
|
107
|
-
// its
|
|
108
|
-
'&[data-lit="true"]
|
|
109
|
-
content: '""',
|
|
110
|
-
position: "absolute",
|
|
111
|
-
top: 0,
|
|
112
|
-
insetInline: "22%",
|
|
113
|
-
height: rem(theme, 3),
|
|
114
|
-
borderBottomLeftRadius: rem(theme, 3),
|
|
115
|
-
borderBottomRightRadius: rem(theme, 3),
|
|
116
|
-
bgcolor: "primary.main"
|
|
117
|
-
},
|
|
119
|
+
// The current slot is marked by more than its colour: a tinted pill behind
|
|
120
|
+
// its icon and a bolder label, so the state survives a colour-blind reading.
|
|
121
|
+
'&[data-lit="true"] [data-slot-pill]': { bgcolor: alpha(theme.palette.primary.main, 0.14) },
|
|
118
122
|
"& svg": { fontSize: rem(theme, 22) },
|
|
119
123
|
[NOT_LIVE]: { color: "text.disabled" }
|
|
120
124
|
};
|
|
@@ -291,4 +295,4 @@ export {
|
|
|
291
295
|
sectionNavBarInset,
|
|
292
296
|
SectionNavBar
|
|
293
297
|
};
|
|
294
|
-
//# sourceMappingURL=chunk-
|
|
298
|
+
//# sourceMappingURL=chunk-XS4NQ6LD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,GAAG;AAAA,MACJ,gBAAc,UAAU,SAAS;AAAA,MACjC,iBAAe;AAAA,MACf,aAAW,WAAW;AAAA,MACtB,YAAU,MAAM,SAAS;AAAA,MACzB,eAAa;AAAA,MACb,IAAI,OAAO,OAAO,GAAG;AAAA,MAErB;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MACE,oBAAC,OAAI,WAAU,QAAO,kBAAe,IAAG,IAAI,OAAO,KAAK,GACtD,8BAAC,YAAS,MAAY,SAAkB,GAC1C;AAAA,YAEF;AAAA,YACA,OAAO,KAAK;AAAA,YACZ,gBAAgB,KAAK;AAAA,YACrB,QAAQ,GAAG,MAAM;AAAA;AAAA,QACnB;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,IAA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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,6 +1,6 @@
|
|
|
1
1
|
// src/components/navigation/SectionNav/SectionNav.helpers.ts
|
|
2
2
|
function shownCount(count) {
|
|
3
|
-
return count
|
|
3
|
+
return typeof count === "number" && Number.isFinite(count) && count > 0 ? count : void 0;
|
|
4
4
|
}
|
|
5
5
|
function menuCount(menu) {
|
|
6
6
|
if (!menu) return void 0;
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
isMenu,
|
|
33
33
|
destinationState
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-YCCWJ5XQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/navigation/SectionNav/SectionNav.helpers.ts"],"sourcesContent":["import type { SectionNavAction, SectionNavBadge, SectionNavDestination, SectionNavMenu } from './SectionNav.types';\n\n/** A count worth drawing: positive and finite. Zero and \"unknown\" draw nothing. */\nexport function shownCount(count: SectionNavBadge | undefined): number | undefined {\n return typeof count === 'number' && 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,OAAwD;AACjF,SAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,KAAK,QAAQ,IAAI,QAAQ;AACpF;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,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ICON_PATHS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TB4UTV25.js";
|
|
4
4
|
import {
|
|
5
5
|
iconFill
|
|
6
6
|
} from "./chunk-QWBQVQRG.js";
|
|
@@ -48,4 +48,4 @@ Icon.displayName = "Icon";
|
|
|
48
48
|
export {
|
|
49
49
|
Icon
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-YEKPQAOW.js.map
|
package/dist/en-US.js
CHANGED
package/dist/icons.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./chunk-PGGGKYWG.js";
|
|
2
2
|
import {
|
|
3
3
|
Icon
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YEKPQAOW.js";
|
|
5
5
|
import {
|
|
6
6
|
ICON_NAMES,
|
|
7
7
|
ICON_PATHS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TB4UTV25.js";
|
|
9
9
|
import "./chunk-QWBQVQRG.js";
|
|
10
10
|
import {
|
|
11
11
|
ICON_SIZES,
|