@12-apps/ui 6.50.0 → 6.51.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/components-catalog.md +2 -2
- package/dist/_internal/components/data-display/Badge/Badge.js +4 -4
- package/dist/_internal/components/data-display/Badge/Badge.styles.js +4 -4
- package/dist/_internal/components/data-display/Badge/BadgeContent.js +4 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +4 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.js +4 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +4 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +4 -4
- package/dist/_internal/components/data-display/Chart/Chart.js +4 -4
- package/dist/_internal/components/data-display/Chart/SpecChart.js +4 -4
- package/dist/_internal/components/data-display/Chart/chart-context.js +4 -4
- package/dist/_internal/components/data-display/Chart/chart-internals.js +4 -4
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +4 -4
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +6 -6
- package/dist/_internal/components/data-display/DataGrid/DataGrid.model.js +5 -5
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +16 -16
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +17 -17
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +8 -8
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +7 -7
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +9 -9
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +9 -9
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +15 -15
- package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +9 -9
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +8 -8
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +6 -6
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +4 -4
- package/dist/_internal/components/data-display/Table/Table.js +5 -5
- package/dist/_internal/components/data-display/index.js +7 -7
- package/dist/_internal/components/form/Command/Command.js +4 -4
- package/dist/_internal/components/form/Command/Command.styles.js +4 -4
- package/dist/_internal/components/form/Label/Label.js +4 -4
- package/dist/_internal/components/form/Label/Label.styles.js +4 -4
- package/dist/_internal/components/form/Menubar/Menubar.item.js +4 -4
- package/dist/_internal/components/form/Menubar/Menubar.js +4 -4
- package/dist/_internal/components/form/Menubar/Menubar.styles.js +4 -4
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +4 -4
- package/dist/_internal/components/form/index.js +4 -4
- package/dist/_internal/components/index.js +23 -23
- package/dist/_internal/components/layout/Box/Box.js +7 -7
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +9 -9
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +8 -8
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +9 -9
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +10 -10
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +9 -9
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +10 -10
- package/dist/_internal/components/layout/Stack/Stack.js +8 -8
- package/dist/_internal/components/layout/index.js +13 -13
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +4 -4
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +9 -9
- package/dist/_internal/components/navigation/SectionNav/SectionNav.helpers.js +5 -1
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +11 -11
- package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +12 -6
- package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +7 -7
- package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +7 -7
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +7 -7
- package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js +16 -4
- package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js.map +1 -1
- package/dist/_internal/components/navigation/index.js +11 -11
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +4 -4
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +4 -4
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +4 -4
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +4 -4
- package/dist/_internal/components/utility/index.js +4 -4
- package/dist/_internal/icons/Icon.js +7 -7
- package/dist/_internal/provider/UiProvider.js +6 -6
- package/dist/_internal/provider/mui-bridge.js +5 -5
- package/dist/_internal/provider/use-ui-theme.js +6 -6
- package/dist/_internal/tokens/density-overrides.js +3 -3
- package/dist/_internal/tokens/density-overrides.navigation.js +1 -1
- package/dist/_internal/tokens/density-overrides.selection.js +1 -1
- package/dist/_internal/tokens/density.js +4 -4
- package/dist/charts.js +4 -4
- package/dist/{chunk-XK77FY42.js → chunk-25MSGLNU.js} +4 -3
- package/dist/chunk-25MSGLNU.js.map +1 -0
- package/dist/{chunk-7VC6YBD3.js → chunk-3U45DRNS.js} +2 -2
- package/dist/{chunk-ZQCZMSLO.js → chunk-4B5WSVS7.js} +2 -2
- package/dist/{chunk-F4FOBTLJ.js → chunk-4BI5PCOM.js} +2 -2
- package/dist/{chunk-HVZ4HF4M.js → chunk-5N2UJOCT.js} +2 -2
- package/dist/{chunk-DFCX3FNB.js → chunk-5ZBFADBL.js} +2 -2
- package/dist/{chunk-GLKQT2DS.js → chunk-A436VORP.js} +33 -4
- package/dist/chunk-A436VORP.js.map +1 -0
- package/dist/{chunk-LWBR5U6V.js → chunk-ABPTS3XK.js} +2 -2
- package/dist/{chunk-43EQITNF.js → chunk-BHPLHGZP.js} +4 -4
- package/dist/{chunk-YMW2VYGU.js → chunk-DLO5V4AV.js} +2 -2
- package/dist/{chunk-7FQF5BC2.js → chunk-ESW4Z5I7.js} +2 -2
- package/dist/{chunk-ZPD6MGAO.js → chunk-FDJLYYDA.js} +4 -4
- package/dist/{chunk-LZL6HDTZ.js → chunk-FM5RBGG7.js} +2 -2
- package/dist/{chunk-V2SAZOT2.js → chunk-FYTC4LOD.js} +2 -2
- package/dist/{chunk-4ELI2MM3.js → chunk-GAXHYRX6.js} +9 -6
- package/dist/chunk-GAXHYRX6.js.map +1 -0
- package/dist/{chunk-CT45KNCT.js → chunk-GPTICJVN.js} +3 -3
- package/dist/{chunk-URGH4673.js → chunk-H556NMKE.js} +4 -4
- package/dist/{chunk-VOF6QVCF.js → chunk-HF7V3RI5.js} +2 -2
- package/dist/{chunk-NKJMOWY3.js → chunk-HJUR6ZY6.js} +2 -2
- package/dist/{chunk-RX7J6VRI.js → chunk-HKEBTPKY.js} +119 -42
- package/dist/chunk-HKEBTPKY.js.map +1 -0
- package/dist/{chunk-ZC3NEUNQ.js → chunk-I2LF53MJ.js} +2 -2
- package/dist/{chunk-ZFQVT6HZ.js → chunk-II7Z5UB6.js} +2 -2
- package/dist/{chunk-K65NSHQI.js → chunk-L3CQTVFU.js} +4 -4
- package/dist/{chunk-EY4GPLMF.js → chunk-MT7XMJUJ.js} +5 -5
- package/dist/{chunk-TELVW2OI.js → chunk-MYCR7FMI.js} +2 -2
- package/dist/{chunk-56TGECKZ.js → chunk-NP6SHLQ3.js} +4 -3
- package/dist/chunk-NP6SHLQ3.js.map +1 -0
- package/dist/{chunk-WB6BTUXQ.js → chunk-OWILUXWM.js} +2 -2
- package/dist/{chunk-VHVI3D4R.js → chunk-P3GBXE73.js} +11 -2
- package/dist/chunk-P3GBXE73.js.map +1 -0
- package/dist/{chunk-WSBTMZJM.js → chunk-P7YUOH2E.js} +2 -2
- package/dist/{chunk-VOP2BXKL.js → chunk-QWTPK3FT.js} +2 -2
- package/dist/{chunk-XQ6Y5Z7R.js → chunk-RCJOTNIW.js} +2 -2
- package/dist/{chunk-32JMSHEA.js → chunk-S4ZUZ6DS.js} +10 -6
- package/dist/chunk-S4ZUZ6DS.js.map +1 -0
- package/dist/{chunk-SWDDXMV7.js → chunk-SJ4IAZ3V.js} +4 -4
- package/dist/{chunk-FHWBOOS3.js → chunk-TH7RBREI.js} +2 -2
- package/dist/{chunk-SA2ERYVV.js → chunk-VAO63IIP.js} +3 -3
- package/dist/{chunk-43Q6CVPB.js → chunk-VELGOFCL.js} +127 -78
- package/dist/chunk-VELGOFCL.js.map +1 -0
- package/dist/{chunk-RCJYLDXV.js → chunk-VJBTFWDK.js} +4 -4
- package/dist/chunk-WNKRFMSI.js +113 -0
- package/dist/chunk-WNKRFMSI.js.map +1 -0
- package/dist/{chunk-LM2YOONY.js → chunk-XYHNXO6Q.js} +2 -2
- package/dist/{chunk-FT7BNFGS.js → chunk-YK4ZG5Y4.js} +2 -2
- package/dist/data-display/Badge.js +4 -4
- package/dist/data-display/Carousel.js +4 -4
- package/dist/data-display/Chart.js +4 -4
- package/dist/data-display/DataGrid.js +6 -6
- package/dist/data-display/DataViews.js +20 -20
- package/dist/data-display/FleetMap.js +4 -4
- package/dist/data-display/Sheet.js +4 -4
- package/dist/data-display/Table.js +5 -5
- package/dist/form/Command.js +4 -4
- package/dist/form/Label.js +4 -4
- package/dist/form/Menubar.js +4 -4
- package/dist/icons.js +7 -7
- package/dist/layout/Box.js +7 -7
- package/dist/layout/SettingCard.js +13 -13
- package/dist/layout/Stack.js +8 -8
- package/dist/navigation/AppHeader.js +4 -4
- package/dist/navigation/SectionNav.js +11 -11
- package/dist/provider.js +7 -7
- package/dist/tokens.js +4 -4
- package/dist/types/components/navigation/SectionNav/SectionNav.bar.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.helpers.d.ts +12 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.helpers.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.parts.d.ts +36 -2
- package/dist/types/components/navigation/SectionNav/SectionNav.parts.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.primary.d.ts +22 -4
- package/dist/types/components/navigation/SectionNav/SectionNav.primary.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.sheet.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/SectionNav.types.d.ts +81 -5
- package/dist/types/components/navigation/SectionNav/SectionNav.types.d.ts.map +1 -1
- package/dist/types/components/navigation/SectionNav/__stories__/fixtures.d.ts +11 -1
- package/dist/types/components/navigation/SectionNav/__stories__/fixtures.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/tokens/density-overrides.d.ts.map +1 -1
- package/dist/types/tokens/density-overrides.navigation.d.ts.map +1 -1
- package/dist/types/tokens/density-overrides.selection.d.ts.map +1 -1
- package/dist/utility/WorkflowStep.js +4 -4
- package/package.json +1 -1
- package/src/components/navigation/SectionNav/SectionNav.bar.tsx +161 -88
- package/src/components/navigation/SectionNav/SectionNav.helpers.ts +16 -1
- package/src/components/navigation/SectionNav/SectionNav.md +40 -4
- package/src/components/navigation/SectionNav/SectionNav.parts.tsx +59 -1
- package/src/components/navigation/SectionNav/SectionNav.primary.tsx +107 -30
- package/src/components/navigation/SectionNav/SectionNav.rail.tsx +154 -41
- package/src/components/navigation/SectionNav/SectionNav.sheet.tsx +6 -2
- package/src/components/navigation/SectionNav/SectionNav.types.ts +82 -5
- package/src/components/navigation/SectionNav/__stories__/fixtures.tsx +21 -1
- package/src/components/navigation/SectionNav/index.ts +1 -0
- package/src/tokens/density-overrides.navigation.ts +15 -2
- package/src/tokens/density-overrides.selection.ts +31 -14
- package/src/tokens/density-overrides.ts +27 -11
- package/dist/chunk-32JMSHEA.js.map +0 -1
- package/dist/chunk-43Q6CVPB.js.map +0 -1
- package/dist/chunk-4ELI2MM3.js.map +0 -1
- package/dist/chunk-56TGECKZ.js.map +0 -1
- package/dist/chunk-GLKQT2DS.js.map +0 -1
- package/dist/chunk-RX7J6VRI.js.map +0 -1
- package/dist/chunk-RZ4SBSLP.js +0 -62
- package/dist/chunk-RZ4SBSLP.js.map +0 -1
- package/dist/chunk-VHVI3D4R.js.map +0 -1
- package/dist/chunk-XK77FY42.js.map +0 -1
- /package/dist/{chunk-7VC6YBD3.js.map → chunk-3U45DRNS.js.map} +0 -0
- /package/dist/{chunk-ZQCZMSLO.js.map → chunk-4B5WSVS7.js.map} +0 -0
- /package/dist/{chunk-F4FOBTLJ.js.map → chunk-4BI5PCOM.js.map} +0 -0
- /package/dist/{chunk-HVZ4HF4M.js.map → chunk-5N2UJOCT.js.map} +0 -0
- /package/dist/{chunk-DFCX3FNB.js.map → chunk-5ZBFADBL.js.map} +0 -0
- /package/dist/{chunk-LWBR5U6V.js.map → chunk-ABPTS3XK.js.map} +0 -0
- /package/dist/{chunk-43EQITNF.js.map → chunk-BHPLHGZP.js.map} +0 -0
- /package/dist/{chunk-YMW2VYGU.js.map → chunk-DLO5V4AV.js.map} +0 -0
- /package/dist/{chunk-7FQF5BC2.js.map → chunk-ESW4Z5I7.js.map} +0 -0
- /package/dist/{chunk-ZPD6MGAO.js.map → chunk-FDJLYYDA.js.map} +0 -0
- /package/dist/{chunk-LZL6HDTZ.js.map → chunk-FM5RBGG7.js.map} +0 -0
- /package/dist/{chunk-V2SAZOT2.js.map → chunk-FYTC4LOD.js.map} +0 -0
- /package/dist/{chunk-CT45KNCT.js.map → chunk-GPTICJVN.js.map} +0 -0
- /package/dist/{chunk-URGH4673.js.map → chunk-H556NMKE.js.map} +0 -0
- /package/dist/{chunk-VOF6QVCF.js.map → chunk-HF7V3RI5.js.map} +0 -0
- /package/dist/{chunk-NKJMOWY3.js.map → chunk-HJUR6ZY6.js.map} +0 -0
- /package/dist/{chunk-ZC3NEUNQ.js.map → chunk-I2LF53MJ.js.map} +0 -0
- /package/dist/{chunk-ZFQVT6HZ.js.map → chunk-II7Z5UB6.js.map} +0 -0
- /package/dist/{chunk-K65NSHQI.js.map → chunk-L3CQTVFU.js.map} +0 -0
- /package/dist/{chunk-EY4GPLMF.js.map → chunk-MT7XMJUJ.js.map} +0 -0
- /package/dist/{chunk-TELVW2OI.js.map → chunk-MYCR7FMI.js.map} +0 -0
- /package/dist/{chunk-WB6BTUXQ.js.map → chunk-OWILUXWM.js.map} +0 -0
- /package/dist/{chunk-WSBTMZJM.js.map → chunk-P7YUOH2E.js.map} +0 -0
- /package/dist/{chunk-VOP2BXKL.js.map → chunk-QWTPK3FT.js.map} +0 -0
- /package/dist/{chunk-XQ6Y5Z7R.js.map → chunk-RCJOTNIW.js.map} +0 -0
- /package/dist/{chunk-SWDDXMV7.js.map → chunk-SJ4IAZ3V.js.map} +0 -0
- /package/dist/{chunk-FHWBOOS3.js.map → chunk-TH7RBREI.js.map} +0 -0
- /package/dist/{chunk-SA2ERYVV.js.map → chunk-VAO63IIP.js.map} +0 -0
- /package/dist/{chunk-RCJYLDXV.js.map → chunk-VJBTFWDK.js.map} +0 -0
- /package/dist/{chunk-LM2YOONY.js.map → chunk-XYHNXO6Q.js.map} +0 -0
- /package/dist/{chunk-FT7BNFGS.js.map → chunk-YK4ZG5Y4.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
shownCount
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P3GBXE73.js";
|
|
4
4
|
import {
|
|
5
5
|
Badge
|
|
6
6
|
} from "./chunk-AMSNWV7V.js";
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
// src/components/navigation/SectionNav/SectionNav.parts.tsx
|
|
12
12
|
import Box from "@mui/material/Box/index.js";
|
|
13
|
+
import CircularProgress from "@mui/material/CircularProgress/index.js";
|
|
13
14
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
14
15
|
function CountedIcon({
|
|
15
16
|
icon,
|
|
@@ -48,11 +49,35 @@ function focusRing(theme) {
|
|
|
48
49
|
function controlProps({
|
|
49
50
|
href,
|
|
50
51
|
onClick,
|
|
51
|
-
linkComponent
|
|
52
|
+
linkComponent,
|
|
53
|
+
inert = false,
|
|
54
|
+
busy = false,
|
|
55
|
+
dimmed = false
|
|
52
56
|
}) {
|
|
57
|
+
if (inert) return { component: "button", type: "button", disabled: true };
|
|
58
|
+
if (busy) return { component: "button", type: "button", "aria-disabled": "true" };
|
|
59
|
+
if (dimmed) return { component: "button", type: "button", "aria-disabled": "true", onClick };
|
|
53
60
|
if (href !== void 0) return { component: linkComponent ?? "a", href, onClick };
|
|
54
61
|
return { component: "button", type: "button", onClick };
|
|
55
62
|
}
|
|
63
|
+
function destinationControl(destination, linkComponent, onClick) {
|
|
64
|
+
return {
|
|
65
|
+
...controlProps({
|
|
66
|
+
href: destination.href,
|
|
67
|
+
linkComponent,
|
|
68
|
+
inert: destination.disabled === true,
|
|
69
|
+
busy: destination.loading === true,
|
|
70
|
+
dimmed: destination.dimmed === true,
|
|
71
|
+
onClick
|
|
72
|
+
}),
|
|
73
|
+
"aria-pressed": destination.href === void 0 ? destination.active : void 0
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
var NOT_LIVE = '&:disabled, &[aria-disabled="true"]';
|
|
77
|
+
function SlotIcon({ icon, loading }) {
|
|
78
|
+
if (!loading) return /* @__PURE__ */ jsx(Fragment, { children: icon });
|
|
79
|
+
return /* @__PURE__ */ jsx(CircularProgress, { size: "1em", color: "inherit", thickness: 5, "data-testid": "section-nav-spinner" });
|
|
80
|
+
}
|
|
56
81
|
var CONTROL_RESET = {
|
|
57
82
|
border: 0,
|
|
58
83
|
background: "none",
|
|
@@ -60,7 +85,8 @@ var CONTROL_RESET = {
|
|
|
60
85
|
color: "inherit",
|
|
61
86
|
textDecoration: "none",
|
|
62
87
|
cursor: "pointer",
|
|
63
|
-
margin: 0
|
|
88
|
+
margin: 0,
|
|
89
|
+
[NOT_LIVE]: { cursor: "default" }
|
|
64
90
|
};
|
|
65
91
|
|
|
66
92
|
export {
|
|
@@ -68,6 +94,9 @@ export {
|
|
|
68
94
|
CountedIcon,
|
|
69
95
|
focusRing,
|
|
70
96
|
controlProps,
|
|
97
|
+
destinationControl,
|
|
98
|
+
NOT_LIVE,
|
|
99
|
+
SlotIcon,
|
|
71
100
|
CONTROL_RESET
|
|
72
101
|
};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
102
|
+
//# sourceMappingURL=chunk-A436VORP.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 { 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,QACvB,aAAU;AAAA,QACV,eAAa;AAAA,QAEZ;AAAA;AAAA,IACH;AAAA;AAEJ;AAGO,SAAS,UAAU,OAA8B;AACtD,SAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,SAAS,GAAG,IAAI,OAAO,CAAC,CAAC,UAAU,MAAM,QAAQ,QAAQ,IAAI;AAAA,MAC7D,eAAe,IAAI,OAAO,EAAE;AAAA,IAC9B;AAAA,EACF;AACF;AAiBO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AACX,GAO4B;AAC1B,MAAI,MAAO,QAAO,EAAE,WAAW,UAAU,MAAM,UAAU,UAAU,KAAK;AACxE,MAAI,KAAM,QAAO,EAAE,WAAW,UAAU,MAAM,UAAU,iBAAiB,OAAO;AAChF,MAAI,OAAQ,QAAO,EAAE,WAAW,UAAU,MAAM,UAAU,iBAAiB,QAAQ,QAAQ;AAC3F,MAAI,SAAS,OAAW,QAAO,EAAE,WAAW,iBAAiB,KAAK,MAAM,QAAQ;AAChF,SAAO,EAAE,WAAW,UAAU,MAAM,UAAU,QAAQ;AACxD;AAOO,SAAS,mBACd,aACA,eACA,SACyB;AACzB,SAAO;AAAA,IACL,GAAG,aAAa;AAAA,MACd,MAAM,YAAY;AAAA,MAClB;AAAA,MACA,OAAO,YAAY,aAAa;AAAA,MAChC,MAAM,YAAY,YAAY;AAAA,MAC9B,QAAQ,YAAY,WAAW;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,IACD,gBAAgB,YAAY,SAAS,SAAY,YAAY,SAAS;AAAA,EACxE;AACF;AAMO,IAAM,WAAW;AAMjB,SAAS,SAAS,EAAE,MAAM,QAAQ,GAA6D;AACpG,MAAI,CAAC,QAAS,QAAO,gCAAG,gBAAK;AAC7B,SAAO,oBAAC,oBAAiB,MAAK,OAAM,OAAM,WAAU,WAAW,GAAG,eAAY,uBAAsB;AACtG;AAGO,IAAM,gBAAgB;AAAA,EAC3B,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,CAAC,QAAQ,GAAG,EAAE,QAAQ,UAAU;AAClC;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-HGVWYKD4.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsGrid
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QWTPK3FT.js";
|
|
7
7
|
import {
|
|
8
8
|
viewStateKey
|
|
9
9
|
} from "./chunk-ZOLAYP2D.js";
|
|
@@ -178,4 +178,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
|
|
|
178
178
|
export {
|
|
179
179
|
DataViewsTableBase
|
|
180
180
|
};
|
|
181
|
-
//# sourceMappingURL=chunk-
|
|
181
|
+
//# sourceMappingURL=chunk-ABPTS3XK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
STACK_BREAK
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TH7RBREI.js";
|
|
4
4
|
import {
|
|
5
5
|
CARD_RADIUS,
|
|
6
6
|
cardSurfaceStyles,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
RAIL_GAP,
|
|
17
17
|
railsTemplateFor,
|
|
18
18
|
useListRails
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5ZBFADBL.js";
|
|
20
20
|
import {
|
|
21
21
|
DENSITY_ROW_PADDING
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-I2LF53MJ.js";
|
|
23
23
|
import {
|
|
24
24
|
rem
|
|
25
25
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -189,4 +189,4 @@ export {
|
|
|
189
189
|
actionProps,
|
|
190
190
|
rowStyles
|
|
191
191
|
};
|
|
192
|
-
//# sourceMappingURL=chunk-
|
|
192
|
+
//# sourceMappingURL=chunk-BHPLHGZP.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-YLGY3D52.js";
|
|
9
9
|
import {
|
|
10
10
|
useDataViewsLayout
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I2LF53MJ.js";
|
|
12
12
|
import {
|
|
13
13
|
useDataViewsCopy
|
|
14
14
|
} from "./chunk-KHG57NAE.js";
|
|
@@ -246,4 +246,4 @@ export {
|
|
|
246
246
|
SortTab,
|
|
247
247
|
DisplayTab
|
|
248
248
|
};
|
|
249
|
-
//# sourceMappingURL=chunk-
|
|
249
|
+
//# sourceMappingURL=chunk-DLO5V4AV.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-PL2AB5HJ.js";
|
|
4
4
|
import {
|
|
5
5
|
useDataViewsLayout
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I2LF53MJ.js";
|
|
7
7
|
|
|
8
8
|
// src/components/data-display/DataViews/data-views-scope-tabs.tsx
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -34,4 +34,4 @@ function ScopeTabsSlot({
|
|
|
34
34
|
export {
|
|
35
35
|
ScopeTabsSlot
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-ESW4Z5I7.js.map
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
metaShape,
|
|
9
9
|
rowStyles,
|
|
10
10
|
useRowShell
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BHPLHGZP.js";
|
|
12
12
|
import {
|
|
13
13
|
ListCardActions,
|
|
14
14
|
ListCardCaption,
|
|
15
15
|
ListCardMeta,
|
|
16
16
|
ListCardTail
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TH7RBREI.js";
|
|
18
18
|
import {
|
|
19
19
|
useDisclosure
|
|
20
20
|
} from "./chunk-2JCRNWHE.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-K4EKTMTC.js";
|
|
24
24
|
import {
|
|
25
25
|
cellRailsTemplate
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5ZBFADBL.js";
|
|
27
27
|
import {
|
|
28
28
|
ListCardCells,
|
|
29
29
|
cellTracks,
|
|
@@ -179,4 +179,4 @@ function BaseListCard(props) {
|
|
|
179
179
|
export {
|
|
180
180
|
BaseListCard
|
|
181
181
|
};
|
|
182
|
-
//# sourceMappingURL=chunk-
|
|
182
|
+
//# sourceMappingURL=chunk-FDJLYYDA.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-4GGH6ZQ7.js";
|
|
4
4
|
import {
|
|
5
5
|
Box
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4BI5PCOM.js";
|
|
7
7
|
|
|
8
8
|
// src/components/layout/Stack/Stack.tsx
|
|
9
9
|
import * as React from "react";
|
|
@@ -16,4 +16,4 @@ Stack.displayName = "Stack";
|
|
|
16
16
|
export {
|
|
17
17
|
Stack
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-FM5RBGG7.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-RTSK5OZT.js";
|
|
10
10
|
import {
|
|
11
11
|
useUiTheme
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HF7V3RI5.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveTestId
|
|
15
15
|
} from "./chunk-TYJR4GOF.js";
|
|
@@ -48,4 +48,4 @@ Icon.displayName = "Icon";
|
|
|
48
48
|
export {
|
|
49
49
|
Icon
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-FYTC4LOD.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-YKCAJ2TN.js";
|
|
5
5
|
|
|
6
6
|
// src/tokens/density-overrides.selection.ts
|
|
7
|
-
import
|
|
7
|
+
import generateUtilityClass from "@mui/material/generateUtilityClass/index.js";
|
|
8
8
|
var checkboxRadioRootPadding = ({ theme }) => ({ padding: rem(theme, 9) });
|
|
9
9
|
function checkboxRadioDensityOverrides() {
|
|
10
10
|
return {
|
|
@@ -12,6 +12,9 @@ function checkboxRadioDensityOverrides() {
|
|
|
12
12
|
MuiRadio: { styleOverrides: { root: checkboxRadioRootPadding } }
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
+
var SWITCH_SWITCH_BASE = generateUtilityClass("MuiSwitch", "switchBase");
|
|
16
|
+
var SWITCH_THUMB = generateUtilityClass("MuiSwitch", "thumb");
|
|
17
|
+
var SWITCH_CHECKED = generateUtilityClass("MuiSwitch", "checked");
|
|
15
18
|
var switchRootGeometry = ({ theme }) => ({
|
|
16
19
|
width: rems(theme, 34 + 12 * 2),
|
|
17
20
|
height: rems(theme, 14 + 12 * 2),
|
|
@@ -29,7 +32,7 @@ var switchSwitchBasePadding = ({ theme }) => ({
|
|
|
29
32
|
// own base/variants — see the module doc comment), so this nested rule
|
|
30
33
|
// wins at the SAME (two-class, `.<hash>.Mui-checked`) specificity, the same
|
|
31
34
|
// mechanism this function's own `padding` line already relies on.
|
|
32
|
-
[`&.${
|
|
35
|
+
[`&.${SWITCH_CHECKED}`]: { transform: `translateX(${rem(theme, 20)})` }
|
|
33
36
|
});
|
|
34
37
|
var switchThumbSize = ({ theme }) => ({
|
|
35
38
|
width: rem(theme, 20),
|
|
@@ -43,7 +46,7 @@ var switchSizeSmall = ({ theme }) => ({
|
|
|
43
46
|
// overrides above, inserted as part of THIS SAME generated class — see the
|
|
44
47
|
// module doc comment for why a flat override cannot reach these at
|
|
45
48
|
// `size="small"` on its own.
|
|
46
|
-
[`& .${
|
|
49
|
+
[`& .${SWITCH_SWITCH_BASE}`]: {
|
|
47
50
|
padding: rem(theme, 4),
|
|
48
51
|
// Same overshoot as medium's, at `size="small"`'s OWN literal
|
|
49
52
|
// (`SwitchRoot`'s baked-in `size: 'small'` variant, `Switch.js`:
|
|
@@ -53,9 +56,9 @@ var switchSizeSmall = ({ theme }) => ({
|
|
|
53
56
|
// this rule, composed after it in the same generated class, so it wins
|
|
54
57
|
// at matching specificity the same way the sibling `padding: rem(theme,
|
|
55
58
|
// 4)` line above already does.
|
|
56
|
-
[`&.${
|
|
59
|
+
[`&.${SWITCH_CHECKED}`]: { transform: `translateX(${rem(theme, 16)})` }
|
|
57
60
|
},
|
|
58
|
-
[`& .${
|
|
61
|
+
[`& .${SWITCH_THUMB}`]: { width: rem(theme, 16), height: rem(theme, 16) }
|
|
59
62
|
});
|
|
60
63
|
function switchDensityOverrides() {
|
|
61
64
|
return {
|
|
@@ -74,4 +77,4 @@ export {
|
|
|
74
77
|
checkboxRadioDensityOverrides,
|
|
75
78
|
switchDensityOverrides
|
|
76
79
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-GAXHYRX6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tokens/density-overrides.selection.ts"],"sourcesContent":["import generateUtilityClass from '@mui/material/generateUtilityClass/index.js';\nimport type { Components, CSSObject, Theme } from '@mui/material/styles/index.js';\n\nimport { rem, rems } from './relative';\n\n/**\n * CHECKBOX / RADIO / SWITCH GEOMETRY, DENSITY-AWARE (FUT-2767).\n *\n * `Checkbox`/`Radio`/`Switch` are MUI's own components, unwrapped — but\n * **only two of the three `@12-apps/ui` wrappers actually forward their\n * geometry to MUI**, corrected here after an earlier revision of this doc\n * comment claimed all three did.\n *\n * - `Checkbox.tsx`'s `StyledCheckbox` and `RadioGroup.variants.tsx`'s\n * `DefaultRadios` (the ONLY variant rendering a raw `<Radio>` — `cards`/\n * `buttons`/`segments` draw custom controls, outside this ticket) set NO\n * `padding` of their own, so `checkboxRadioDensityOverrides()` reaches\n * both directly — confirmed by a real render, same computed padding as\n * raw `MuiCheckbox`/`MuiRadio` at both densities\n * (`density-overrides.test.stories.tsx`'s `ui-checkbox`/`ui-radio-group`).\n * - `Switch.styles.ts`'s `switchSx` is DIFFERENT: it draws root/switchBase/\n * thumb geometry itself, per instance, from its own `SWITCH_SIZES` table\n * (`Switch.metrics.ts`), every number already through `rem(theme, px)`.\n * `Switch.parts.tsx`'s `StyledSwitch = styled(MuiSwitch, {...})(...)`\n * composes these as an OUTER wrapper class whose nested `& .MuiSwitch-\n * switchBase`/`& .MuiSwitch-thumb` selectors are a TWO-class compound —\n * higher specificity than this file's `MuiSwitch.styleOverrides.\n * switchBase`/`thumb`, which compose onto a single-class generated class.\n * `switchDensityOverrides()` therefore has **NO effect on `@12-apps/ui`'s\n * own `<Switch>`** — it only reaches a raw `@mui/material/Switch` consumer\n * (a host's own `Table.tsx` density-toggle column, say). Not a gap:\n * `switchSx` already reacts to `theme.typography.fontSize` on its own —\n * including the CHECKED thumb's own travel distance, computed as\n * `rem(theme, width - thumbSize - padding * 2)` from the SAME per-instance\n * geometry, so it moves consistently with no help from this file.\n * Confirmed by measurement, both sizes, both states, both densities\n * (`ui-switch-*` cases); documented at `Switch.md`'s \"Density\" section.\n *\n * **The ticket's open question — does a `MuiSwitchBase` theme override reach\n * `Checkbox`/`Radio` at all? — is NO, verified two ways.** `Checkbox`/`Radio`\n * both render through `internal/SwitchBase.js`'s `SwitchBaseRoot`, which is\n * `styled(ButtonBase, { name: 'MuiSwitchBase' })({ padding: 9, ... })` — with\n * NO `slot` key. `@mui/system`'s `createStyled.js` computes\n * `overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(slot))`,\n * and `defaultOverridesResolver` (`if (!slot) return null`) returns `null`\n * for an absent slot; the styled call itself then only pushes its\n * `styleThemeOverrides` expression `if (componentName && overridesResolver)`\n * — `null` is falsy, so for THIS styled call `theme.components.MuiSwitchBase\n * .styleOverrides` is never read at all. (`variants` is a SEPARATE check,\n * gated on `skipVariantsResolver` rather than `overridesResolver`, which is\n * why the ticket's own two-part specificity proof for Chip's label — probing\n * with `variants` — does not transfer here; `styleOverrides` is what dies.)\n * A render-level probe confirms it: a theme with `components.MuiSwitchBase\n * .styleOverrides.root = { padding: '999px' }`, rendering `<Switch />`,\n * `<Checkbox />` and `<Radio />` through it, leaves EVERY ONE of `.MuiSwitch-\n * switchBase`, `.MuiCheckbox-root` and `.MuiRadio-root` at their unthemed\n * padding (`9px`/`4px` — see below), never `999px`. The Decision's own\n * suggested `MuiSwitchBase` route is therefore the ticket's documented\n * fallback in disguise: this file skips straight to duplicating the override\n * under `MuiCheckbox` and `MuiRadio`, each independently confirmed LIVE by\n * the same probe (`components.MuiCheckbox.styleOverrides.root.padding` DOES\n * reach `.MuiCheckbox-root`, and the same for `MuiRadio`).\n *\n * - `Checkbox`/`Radio` (`internal/SwitchBase.js`, `Checkbox.js`, `Radio.js`):\n * `padding: 9` — constant across `size=\"small\"`/`\"medium\"` today (neither\n * `CheckboxRoot` nor `RadioRoot` carries a size-conditional padding rule),\n * so ONE `root` override, no `sizeSmall`/`sizeMedium` split, covers both\n * sizes without disturbing the glyph-driven size difference FUT-2585 left\n * alone.\n * - `Switch` (`Switch.js`): root (the track) `width: 34+12*2`, `height:\n * 14+12*2`, `padding: 12` (medium); `switchBase` (the thumb's absolutely-\n * positioned wrapper) — its OWN literal is NOT the `12` the ticket's\n * Decision sketch names (that `12` is `SwitchRoot`'s own padding, a\n * DIFFERENT slot); `switchBase` inherits `internal/SwitchBase.js`'s generic\n * `padding: 9` unmodified at medium (`SwitchSwitchBase`'s own styles never\n * set `padding`), confirmed by the same render probe with NO theme\n * override at all (`.MuiSwitch-switchBase` computed padding: `9px`). This\n * file overrides `MuiSwitch.styleOverrides.switchBase` (a LIVE key —\n * `SwitchSwitchBase = styled(SwitchBase, { name: 'MuiSwitch', slot:\n * 'SwitchBase', ... })` DOES pass a `slot`) with `rem(theme, 9)`, the\n * MEASURED default, not the ticket's `12` — using `12` here would move\n * today's real 9px to 12px at `density: 'normal'`, failing the Done-when's\n * own pixel-identical requirement, so the number is corrected against the\n * probe rather than the sketch. `thumb`: `20×20`, unconditional.\n * - `Switch` `size=\"small\"` (`:82-100`, a `variants` entry on `SwitchRoot`\n * itself): root `width: 40`, `height: 24`, `padding: 7`; a NESTED `&\n * .${switchClasses.switchBase}` selector sets `padding: 4` (not 9); a\n * NESTED `& .${switchClasses.thumb}` selector sets `20×20` down to\n * `16×16`. Both nested rules are baked into `SwitchRoot`'s OWN generated\n * class at TWO-class specificity (the size-small instance's unique class,\n * plus `.MuiSwitch-switchBase`/`.MuiSwitch-thumb`) — exactly the Chip\n * outlined-label shape this file already has above, and the SAME failure\n * mode Lesson 1 warns about: a FLAT `styleOverrides.switchBase`/`thumb`\n * (one class) cannot out-specificity it, so at `size=\"small\"` it would\n * silently keep rendering MUI's unthemed `4px`/`16×16` at every density,\n * the click target and thumb staying full-size while the track around them\n * shrank. Fixed the same way: `sizeSmall`'s OWN nested `& .${SWITCH_SWITCH_\n * BASE}` / `& .${SWITCH_THUMB}` rules, built with `generateUtilityClass`\n * (not a hand-typed selector string) for the same `ClassNameGenerator\n * .configure` reason `density-overrides.ts`'s `CHIP_LABEL` is — and, unlike\n * reading `switchClasses` off `@mui/material/Switch` itself, without\n * putting `MuiSwitch` on the critical path of every host that imports\n * `densityThemeOptions` (FUT-2993) — inserted as part of the SAME\n * `sizeSmall` override object so they land AFTER `SwitchRoot`'s own baked-in\n * small variant in the generated class's CSS text (later wins at matching\n * two-class specificity) rather than trying to out-specificity it from a\n * different slot.\n *\n * **The checked thumb's own travel distance is a FOURTH literal, found only\n * on adversarial review of the PR this doc comment first shipped in.**\n * `SwitchSwitchBase`'s base style bakes in `&.Mui-checked { transform:\n * translateX(20px) }` (medium), and `SwitchRoot`'s `size: 'small'` variant\n * nests the same at `16px` — both bare, never run through `pxToRem`, so at\n * `density: 'compact'` the checked thumb kept travelling the FULL, unscaled\n * distance while the track around it shrank ×0.9 — a visible overshoot.\n * `switchSwitchBasePadding`/`switchSizeSmall` each now carry their own\n * `&.${SWITCH_CHECKED}` rule (`translateX(rem(theme, 20))`/`rem(theme,\n * 16)`), composed onto the SAME generated class, in the SAME position\n * `padding` already occupies — so it wins by the identical mechanism, not a\n * new one. Proven at the pixel level, both sizes/densities: `switch-md-\n * checked`/`switch-sm-checked` measure the thumb's final position against\n * the track's own edge, not just the transform string.\n *\n * At `density: 'normal'` every number above computes back to the literal it\n * replaces (`rem(theme, 9)` is `0.5625rem`, `9px` at the 16px root — no\n * visible change), the same geometry-neutral guarantee `iconButtonDensity\n * Overrides`/`chipDensityOverrides` give above. The same non-default-\n * `fontSize` caveat those two give applies here unchanged: `rem()` only ever\n * reads `theme.typography.fontSize`, so a host adopting\n * `checkboxRadioDensityOverrides`/`switchDensityOverrides` standalone moves\n * every number here by that one coefficient, same as everything else `rem()`\n * touches.\n */\n\nconst checkboxRadioRootPadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 9) });\n\n/**\n * `MuiCheckbox`/`MuiRadio`'s own padding — duplicated under both component\n * keys, the ticket's own documented fallback, since `MuiSwitchBase` cannot\n * reach either (see the module doc comment above). One module-level function\n * shared by both keys, and by `checkboxRadioDensityOverrides()`'s own two\n * calls across the two theme-build paths, for the same identity reason the\n * rest of this file's slots are module-level.\n */\nexport function checkboxRadioDensityOverrides(): Components<Theme> {\n return {\n MuiCheckbox: { styleOverrides: { root: checkboxRadioRootPadding } },\n MuiRadio: { styleOverrides: { root: checkboxRadioRootPadding } },\n };\n}\n\n/**\n * Built with `generateUtilityClass`, not imported from `@mui/material/Switch`'s\n * own `switchClasses` — the same generated strings (`Switch.js` builds\n * `switchClasses` from this exact helper), but without pulling `MuiSwitch`\n * onto the critical path of every host that imports `densityThemeOptions`\n * (see the module doc comment, and FUT-2993). `SWITCH_CHECKED` is a GLOBAL\n * state slot (`generateUtilityClass`'s `globalStateClasses` table), so it\n * resolves to `Mui-checked`, not `MuiSwitch-checked` — the same string\n * `switchClasses.checked` gives.\n */\nconst SWITCH_SWITCH_BASE = generateUtilityClass('MuiSwitch', 'switchBase');\nconst SWITCH_THUMB = generateUtilityClass('MuiSwitch', 'thumb');\nconst SWITCH_CHECKED = generateUtilityClass('MuiSwitch', 'checked');\n\nconst switchRootGeometry = ({ theme }: { theme: Theme }): CSSObject => ({\n width: rems(theme, 34 + 12 * 2),\n height: rems(theme, 14 + 12 * 2),\n padding: rem(theme, 12),\n});\nconst switchSwitchBasePadding = ({ theme }: { theme: Theme }): CSSObject => ({\n padding: rem(theme, 9),\n // FUT-2767 (adversarial-review fix) — `SwitchSwitchBase`'s OWN base style\n // (`Switch.js`, medium) bakes in `&.Mui-checked { transform:\n // translateX(20px) }`, a bare literal never run through `pxToRem` — at\n // `density: 'compact'` the track/padding/thumb above all shrink ×0.9 but\n // this offset stayed at a full 20px, so the checked thumb overshot the now-\n // smaller track. Composed onto the SAME generated class as that base style,\n // AFTER it (`createStyled` composes `styleThemeOverrides` after a slot's\n // own base/variants — see the module doc comment), so this nested rule\n // wins at the SAME (two-class, `.<hash>.Mui-checked`) specificity, the same\n // mechanism this function's own `padding` line already relies on.\n [`&.${SWITCH_CHECKED}`]: { transform: `translateX(${rem(theme, 20)})` },\n});\nconst switchThumbSize = ({ theme }: { theme: Theme }): CSSObject => ({\n width: rem(theme, 20),\n height: rem(theme, 20),\n});\nconst switchSizeSmall = ({ theme }: { theme: Theme }): CSSObject => ({\n width: rem(theme, 40),\n height: rem(theme, 24),\n padding: rem(theme, 7),\n // Higher (two-class) specificity than the flat `switchBase`/`thumb`\n // overrides above, inserted as part of THIS SAME generated class — see the\n // module doc comment for why a flat override cannot reach these at\n // `size=\"small\"` on its own.\n [`& .${SWITCH_SWITCH_BASE}`]: {\n padding: rem(theme, 4),\n // Same overshoot as medium's, at `size=\"small\"`'s OWN literal\n // (`SwitchRoot`'s baked-in `size: 'small'` variant, `Switch.js`:\n // `translateX(16px)`). Nested one level deeper so the compiled selector\n // is `.<root-hash> .MuiSwitch-switchBase.Mui-checked` — the same THREE-\n // class descendant compound MUI's own baked-in small variant uses for\n // this rule, composed after it in the same generated class, so it wins\n // at matching specificity the same way the sibling `padding: rem(theme,\n // 4)` line above already does.\n [`&.${SWITCH_CHECKED}`]: { transform: `translateX(${rem(theme, 16)})` },\n },\n [`& .${SWITCH_THUMB}`]: { width: rem(theme, 16), height: rem(theme, 16) },\n});\n\n/**\n * `MuiSwitch`'s own track (root), thumb wrapper (switchBase) and thumb\n * (thumb) geometry, at both sizes MUI has.\n */\nexport function switchDensityOverrides(): Components<Theme> {\n return {\n MuiSwitch: {\n styleOverrides: {\n root: switchRootGeometry,\n switchBase: switchSwitchBasePadding,\n thumb: switchThumbSize,\n sizeSmall: switchSizeSmall,\n },\n },\n };\n}\n"],"mappings":";;;;;;AAAA,OAAO,0BAA0B;AAsIjC,IAAM,2BAA2B,CAAC,EAAE,MAAM,OAAoC,EAAE,SAAS,IAAI,OAAO,CAAC,EAAE;AAUhG,SAAS,gCAAmD;AACjE,SAAO;AAAA,IACL,aAAa,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,EAAE;AAAA,IAClE,UAAU,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,EAAE;AAAA,EACjE;AACF;AAYA,IAAM,qBAAqB,qBAAqB,aAAa,YAAY;AACzE,IAAM,eAAe,qBAAqB,aAAa,OAAO;AAC9D,IAAM,iBAAiB,qBAAqB,aAAa,SAAS;AAElE,IAAM,qBAAqB,CAAC,EAAE,MAAM,OAAoC;AAAA,EACtE,OAAO,KAAK,OAAO,KAAK,KAAK,CAAC;AAAA,EAC9B,QAAQ,KAAK,OAAO,KAAK,KAAK,CAAC;AAAA,EAC/B,SAAS,IAAI,OAAO,EAAE;AACxB;AACA,IAAM,0BAA0B,CAAC,EAAE,MAAM,OAAoC;AAAA,EAC3E,SAAS,IAAI,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWrB,CAAC,KAAK,cAAc,EAAE,GAAG,EAAE,WAAW,cAAc,IAAI,OAAO,EAAE,CAAC,IAAI;AACxE;AACA,IAAM,kBAAkB,CAAC,EAAE,MAAM,OAAoC;AAAA,EACnE,OAAO,IAAI,OAAO,EAAE;AAAA,EACpB,QAAQ,IAAI,OAAO,EAAE;AACvB;AACA,IAAM,kBAAkB,CAAC,EAAE,MAAM,OAAoC;AAAA,EACnE,OAAO,IAAI,OAAO,EAAE;AAAA,EACpB,QAAQ,IAAI,OAAO,EAAE;AAAA,EACrB,SAAS,IAAI,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrB,CAAC,MAAM,kBAAkB,EAAE,GAAG;AAAA,IAC5B,SAAS,IAAI,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASrB,CAAC,KAAK,cAAc,EAAE,GAAG,EAAE,WAAW,cAAc,IAAI,OAAO,EAAE,CAAC,IAAI;AAAA,EACxE;AAAA,EACA,CAAC,MAAM,YAAY,EAAE,GAAG,EAAE,OAAO,IAAI,OAAO,EAAE,GAAG,QAAQ,IAAI,OAAO,EAAE,EAAE;AAC1E;AAMO,SAAS,yBAA4C;AAC1D,SAAO;AAAA,IACL,WAAW;AAAA,MACT,gBAAgB;AAAA,QACd,MAAM;AAAA,QACN,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,WAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
SaveError,
|
|
8
8
|
SettingHeader,
|
|
9
9
|
partTestId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5N2UJOCT.js";
|
|
11
11
|
import {
|
|
12
12
|
SETTING_CARD_OPEN_ATTR,
|
|
13
13
|
actionsStyles,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-3DO5AJCG.js";
|
|
18
18
|
import {
|
|
19
19
|
Icon
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FYTC4LOD.js";
|
|
21
21
|
import {
|
|
22
22
|
Button
|
|
23
23
|
} from "./chunk-RIZRF5XR.js";
|
|
@@ -165,4 +165,4 @@ SettingCard.displayName = "SettingCard";
|
|
|
165
165
|
export {
|
|
166
166
|
SettingCard
|
|
167
167
|
};
|
|
168
|
-
//# sourceMappingURL=chunk-
|
|
168
|
+
//# sourceMappingURL=chunk-GPTICJVN.js.map
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
chipDensityOverrides,
|
|
6
6
|
iconButtonDensityOverrides
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-25MSGLNU.js";
|
|
8
8
|
import {
|
|
9
9
|
checkboxRadioDensityOverrides,
|
|
10
10
|
switchDensityOverrides
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GAXHYRX6.js";
|
|
12
12
|
import {
|
|
13
13
|
paginationItemDensityOverrides,
|
|
14
14
|
sliderDensityOverrides,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
tableCellDensityOverrides,
|
|
17
17
|
tabsIndicatorDensityOverrides,
|
|
18
18
|
toggleButtonDensityOverrides
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NP6SHLQ3.js";
|
|
20
20
|
import {
|
|
21
21
|
headingMetrics
|
|
22
22
|
} from "./chunk-PT6TCWIW.js";
|
|
@@ -190,4 +190,4 @@ export {
|
|
|
190
190
|
uiThemeFromMui,
|
|
191
191
|
muiThemeOptionsFrom
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=chunk-
|
|
193
|
+
//# sourceMappingURL=chunk-H556NMKE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
uiThemeFromMui
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H556NMKE.js";
|
|
4
4
|
|
|
5
5
|
// src/provider/use-ui-theme.ts
|
|
6
6
|
import { useTheme } from "@mui/material/styles/index.js";
|
|
@@ -13,4 +13,4 @@ function useUiTheme() {
|
|
|
13
13
|
export {
|
|
14
14
|
useUiTheme
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-HF7V3RI5.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-XZTRZ3HO.js";
|
|
4
4
|
import {
|
|
5
5
|
muiThemeOptionsFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-H556NMKE.js";
|
|
7
7
|
import {
|
|
8
8
|
createUiTheme
|
|
9
9
|
} from "./chunk-6WZUZHJM.js";
|
|
@@ -22,4 +22,4 @@ UiProvider.displayName = "UiProvider";
|
|
|
22
22
|
export {
|
|
23
23
|
UiProvider
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-HJUR6ZY6.js.map
|
|
@@ -2,9 +2,16 @@ import {
|
|
|
2
2
|
Box,
|
|
3
3
|
CONTROL_RESET,
|
|
4
4
|
CountedIcon,
|
|
5
|
+
NOT_LIVE,
|
|
6
|
+
SlotIcon,
|
|
5
7
|
controlProps,
|
|
8
|
+
destinationControl,
|
|
6
9
|
focusRing
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A436VORP.js";
|
|
11
|
+
import {
|
|
12
|
+
destinationState,
|
|
13
|
+
isMenu
|
|
14
|
+
} from "./chunk-P3GBXE73.js";
|
|
8
15
|
import {
|
|
9
16
|
rem
|
|
10
17
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -19,16 +26,19 @@ function RailRow({
|
|
|
19
26
|
icon,
|
|
20
27
|
count,
|
|
21
28
|
active,
|
|
29
|
+
current = active,
|
|
22
30
|
copy,
|
|
23
31
|
testId,
|
|
24
|
-
control
|
|
32
|
+
control,
|
|
33
|
+
loading = false
|
|
25
34
|
}) {
|
|
26
35
|
const theme = useTheme();
|
|
27
36
|
return /* @__PURE__ */ jsxs(
|
|
28
37
|
Box,
|
|
29
38
|
{
|
|
30
39
|
...control,
|
|
31
|
-
"aria-current":
|
|
40
|
+
"aria-current": current ? "page" : void 0,
|
|
41
|
+
"aria-busy": loading || void 0,
|
|
32
42
|
"data-testid": testId,
|
|
33
43
|
sx: {
|
|
34
44
|
...CONTROL_RESET,
|
|
@@ -45,10 +55,19 @@ function RailRow({
|
|
|
45
55
|
color: active ? "primary.main" : "text.primary",
|
|
46
56
|
bgcolor: active ? "action.selected" : "transparent",
|
|
47
57
|
"&:hover": { bgcolor: active ? "action.selected" : "action.hover" },
|
|
48
|
-
"& svg": { color: "primary.main", fontSize: rem(theme, 20) }
|
|
58
|
+
"& svg": { color: "primary.main", fontSize: rem(theme, 20) },
|
|
59
|
+
[NOT_LIVE]: { color: "text.disabled", "& svg": { color: "text.disabled" } }
|
|
49
60
|
},
|
|
50
61
|
children: [
|
|
51
|
-
/* @__PURE__ */ jsx(
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
CountedIcon,
|
|
64
|
+
{
|
|
65
|
+
icon: /* @__PURE__ */ jsx(SlotIcon, { icon, loading }),
|
|
66
|
+
count,
|
|
67
|
+
label: copy.badge,
|
|
68
|
+
testId: `${testId}-badge`
|
|
69
|
+
}
|
|
70
|
+
),
|
|
52
71
|
/* @__PURE__ */ jsxs(Box, { component: "span", sx: { display: "flex", flexDirection: "column", minWidth: 0 }, children: [
|
|
53
72
|
/* @__PURE__ */ jsx(Typography, { component: "span", variant: "body2", sx: { fontWeight: active ? 700 : 500 }, children: label }),
|
|
54
73
|
description ? /* @__PURE__ */ jsx(Typography, { component: "span", variant: "caption", color: "text.secondary", children: description }) : null
|
|
@@ -79,14 +98,99 @@ function RailMenu({
|
|
|
79
98
|
count: entry.badge,
|
|
80
99
|
active: entry.active === true,
|
|
81
100
|
copy,
|
|
82
|
-
testId: `${testId}-entry-${entry.id}`,
|
|
83
|
-
control: controlProps({
|
|
101
|
+
testId: entry.dataTestId ?? `${testId}-entry-${entry.id}`,
|
|
102
|
+
control: controlProps({
|
|
103
|
+
href: entry.href,
|
|
104
|
+
linkComponent,
|
|
105
|
+
inert: menu.disabled === true || entry.disabled === true,
|
|
106
|
+
onClick: () => entry.onSelect?.()
|
|
107
|
+
})
|
|
84
108
|
},
|
|
85
109
|
entry.id
|
|
86
110
|
))
|
|
87
111
|
] }, group.id))
|
|
88
112
|
] });
|
|
89
113
|
}
|
|
114
|
+
function RailBack({
|
|
115
|
+
back,
|
|
116
|
+
linkComponent,
|
|
117
|
+
testId
|
|
118
|
+
}) {
|
|
119
|
+
const theme = useTheme();
|
|
120
|
+
return /* @__PURE__ */ jsxs(
|
|
121
|
+
Box,
|
|
122
|
+
{
|
|
123
|
+
...controlProps({ href: back.href, linkComponent }),
|
|
124
|
+
"data-testid": testId,
|
|
125
|
+
sx: {
|
|
126
|
+
...CONTROL_RESET,
|
|
127
|
+
...focusRing(theme),
|
|
128
|
+
display: "flex",
|
|
129
|
+
alignItems: "center",
|
|
130
|
+
gap: 1,
|
|
131
|
+
px: 1.25,
|
|
132
|
+
py: 0.75,
|
|
133
|
+
mb: 0.5,
|
|
134
|
+
borderRadius: 1,
|
|
135
|
+
color: "text.secondary",
|
|
136
|
+
"&:hover": { bgcolor: "action.hover", color: "text.primary" },
|
|
137
|
+
"& svg": { fontSize: rem(theme, 20) }
|
|
138
|
+
},
|
|
139
|
+
children: [
|
|
140
|
+
back.icon,
|
|
141
|
+
/* @__PURE__ */ jsx(Typography, { component: "span", variant: "body2", sx: { fontWeight: 600 }, children: back.label })
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function RailAction({
|
|
147
|
+
action,
|
|
148
|
+
linkComponent,
|
|
149
|
+
copy,
|
|
150
|
+
testId
|
|
151
|
+
}) {
|
|
152
|
+
return /* @__PURE__ */ jsx(
|
|
153
|
+
RailRow,
|
|
154
|
+
{
|
|
155
|
+
label: action.label,
|
|
156
|
+
icon: action.icon,
|
|
157
|
+
count: void 0,
|
|
158
|
+
active: false,
|
|
159
|
+
copy,
|
|
160
|
+
testId: action.dataTestId ?? testId,
|
|
161
|
+
loading: action.loading === true,
|
|
162
|
+
control: controlProps({
|
|
163
|
+
href: void 0,
|
|
164
|
+
linkComponent,
|
|
165
|
+
inert: action.disabled === true,
|
|
166
|
+
busy: action.loading === true,
|
|
167
|
+
onClick: action.onSelect
|
|
168
|
+
})
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
function RailDestination({
|
|
173
|
+
destination,
|
|
174
|
+
linkComponent,
|
|
175
|
+
copy,
|
|
176
|
+
testId
|
|
177
|
+
}) {
|
|
178
|
+
const { current, lit } = destinationState(destination);
|
|
179
|
+
return /* @__PURE__ */ jsx(
|
|
180
|
+
RailRow,
|
|
181
|
+
{
|
|
182
|
+
label: destination.label,
|
|
183
|
+
icon: destination.icon,
|
|
184
|
+
count: destination.badge,
|
|
185
|
+
active: lit,
|
|
186
|
+
current,
|
|
187
|
+
copy,
|
|
188
|
+
testId,
|
|
189
|
+
loading: destination.loading === true,
|
|
190
|
+
control: destinationControl(destination, linkComponent, () => destination.onSelect?.())
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
}
|
|
90
194
|
function SectionNavRail({
|
|
91
195
|
label,
|
|
92
196
|
destinations,
|
|
@@ -98,7 +202,6 @@ function SectionNavRail({
|
|
|
98
202
|
copy,
|
|
99
203
|
dataTestId
|
|
100
204
|
}) {
|
|
101
|
-
const theme = useTheme();
|
|
102
205
|
return /* @__PURE__ */ jsxs(
|
|
103
206
|
Box,
|
|
104
207
|
{
|
|
@@ -116,46 +219,20 @@ function SectionNavRail({
|
|
|
116
219
|
bgcolor: "background.paper"
|
|
117
220
|
},
|
|
118
221
|
children: [
|
|
119
|
-
back ? /* @__PURE__ */
|
|
120
|
-
Box,
|
|
121
|
-
{
|
|
122
|
-
...controlProps({ href: back.href, linkComponent }),
|
|
123
|
-
"data-testid": `${dataTestId}-back`,
|
|
124
|
-
sx: {
|
|
125
|
-
...CONTROL_RESET,
|
|
126
|
-
...focusRing(theme),
|
|
127
|
-
display: "flex",
|
|
128
|
-
alignItems: "center",
|
|
129
|
-
gap: 1,
|
|
130
|
-
px: 1.25,
|
|
131
|
-
py: 0.75,
|
|
132
|
-
mb: 0.5,
|
|
133
|
-
borderRadius: 1,
|
|
134
|
-
color: "text.secondary",
|
|
135
|
-
"&:hover": { bgcolor: "action.hover", color: "text.primary" },
|
|
136
|
-
"& svg": { fontSize: rem(theme, 20) }
|
|
137
|
-
},
|
|
138
|
-
children: [
|
|
139
|
-
back.icon,
|
|
140
|
-
/* @__PURE__ */ jsx(Typography, { component: "span", variant: "body2", sx: { fontWeight: 600 }, children: back.label })
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
) : null,
|
|
222
|
+
back ? /* @__PURE__ */ jsx(RailBack, { back, linkComponent, testId: `${dataTestId}-back` }) : null,
|
|
144
223
|
heading ? /* @__PURE__ */ jsx(RailHeading, { children: heading }) : null,
|
|
145
224
|
destinations.map((destination) => /* @__PURE__ */ jsx(
|
|
146
|
-
|
|
225
|
+
RailDestination,
|
|
147
226
|
{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
count: destination.badge,
|
|
151
|
-
active: destination.active === true,
|
|
227
|
+
destination,
|
|
228
|
+
linkComponent,
|
|
152
229
|
copy,
|
|
153
|
-
testId: `${dataTestId}-dest-${destination.id}
|
|
154
|
-
control: controlProps({ href: destination.href, linkComponent })
|
|
230
|
+
testId: destination.dataTestId ?? `${dataTestId}-dest-${destination.id}`
|
|
155
231
|
},
|
|
156
232
|
destination.id
|
|
157
233
|
)),
|
|
158
|
-
primary ? /* @__PURE__ */ jsx(
|
|
234
|
+
primary && !isMenu(primary) ? /* @__PURE__ */ jsx(RailAction, { action: primary, linkComponent, copy, testId: `${dataTestId}-primary` }) : null,
|
|
235
|
+
isMenu(primary) ? /* @__PURE__ */ jsx(RailMenu, { menu: primary, linkComponent, copy, testId: `${dataTestId}-primary` }) : null,
|
|
159
236
|
more ? /* @__PURE__ */ jsx(RailMenu, { menu: more, linkComponent, copy, testId: `${dataTestId}-more` }) : null
|
|
160
237
|
]
|
|
161
238
|
}
|
|
@@ -165,4 +242,4 @@ function SectionNavRail({
|
|
|
165
242
|
export {
|
|
166
243
|
SectionNavRail
|
|
167
244
|
};
|
|
168
|
-
//# sourceMappingURL=chunk-
|
|
245
|
+
//# sourceMappingURL=chunk-HKEBTPKY.js.map
|