@12-apps/ui 6.50.1 → 6.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/components-catalog.md +2 -2
  2. package/dist/_internal/components/index.js +7 -7
  3. package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +6 -5
  4. package/dist/_internal/components/navigation/SectionNav/SectionNav.helpers.js +5 -1
  5. package/dist/_internal/components/navigation/SectionNav/SectionNav.js +8 -7
  6. package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +8 -2
  7. package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +3 -3
  8. package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +3 -3
  9. package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +3 -3
  10. package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js +12 -0
  11. package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js.map +1 -1
  12. package/dist/_internal/components/navigation/index.js +8 -7
  13. package/dist/{chunk-SA2ERYVV.js → chunk-5GQYTB3K.js} +3 -3
  14. package/dist/{chunk-GLKQT2DS.js → chunk-A436VORP.js} +33 -4
  15. package/dist/chunk-A436VORP.js.map +1 -0
  16. package/dist/{chunk-RX7J6VRI.js → chunk-HKEBTPKY.js} +119 -42
  17. package/dist/chunk-HKEBTPKY.js.map +1 -0
  18. package/dist/{chunk-VHVI3D4R.js → chunk-P3GBXE73.js} +11 -2
  19. package/dist/chunk-P3GBXE73.js.map +1 -0
  20. package/dist/{chunk-32JMSHEA.js → chunk-S4ZUZ6DS.js} +10 -6
  21. package/dist/chunk-S4ZUZ6DS.js.map +1 -0
  22. package/dist/chunk-WNKRFMSI.js +113 -0
  23. package/dist/chunk-WNKRFMSI.js.map +1 -0
  24. package/dist/chunk-WNZBUR76.js +294 -0
  25. package/dist/chunk-WNZBUR76.js.map +1 -0
  26. package/dist/navigation/SectionNav.js +8 -7
  27. package/dist/types/components/navigation/SectionNav/SectionNav.bar.d.ts.map +1 -1
  28. package/dist/types/components/navigation/SectionNav/SectionNav.helpers.d.ts +12 -1
  29. package/dist/types/components/navigation/SectionNav/SectionNav.helpers.d.ts.map +1 -1
  30. package/dist/types/components/navigation/SectionNav/SectionNav.parts.d.ts +36 -2
  31. package/dist/types/components/navigation/SectionNav/SectionNav.parts.d.ts.map +1 -1
  32. package/dist/types/components/navigation/SectionNav/SectionNav.primary.d.ts +22 -4
  33. package/dist/types/components/navigation/SectionNav/SectionNav.primary.d.ts.map +1 -1
  34. package/dist/types/components/navigation/SectionNav/SectionNav.rail.d.ts.map +1 -1
  35. package/dist/types/components/navigation/SectionNav/SectionNav.sheet.d.ts.map +1 -1
  36. package/dist/types/components/navigation/SectionNav/SectionNav.types.d.ts +81 -5
  37. package/dist/types/components/navigation/SectionNav/SectionNav.types.d.ts.map +1 -1
  38. package/dist/types/components/navigation/SectionNav/__stories__/fixtures.d.ts +11 -1
  39. package/dist/types/components/navigation/SectionNav/__stories__/fixtures.d.ts.map +1 -1
  40. package/dist/types/components/navigation/SectionNav/index.d.ts +1 -1
  41. package/dist/types/components/navigation/SectionNav/index.d.ts.map +1 -1
  42. package/package.json +1 -1
  43. package/src/components/navigation/SectionNav/SectionNav.bar.tsx +166 -90
  44. package/src/components/navigation/SectionNav/SectionNav.helpers.ts +16 -1
  45. package/src/components/navigation/SectionNav/SectionNav.md +40 -4
  46. package/src/components/navigation/SectionNav/SectionNav.parts.tsx +59 -1
  47. package/src/components/navigation/SectionNav/SectionNav.primary.tsx +107 -30
  48. package/src/components/navigation/SectionNav/SectionNav.rail.tsx +154 -41
  49. package/src/components/navigation/SectionNav/SectionNav.sheet.tsx +6 -2
  50. package/src/components/navigation/SectionNav/SectionNav.types.ts +82 -5
  51. package/src/components/navigation/SectionNav/__stories__/fixtures.tsx +21 -1
  52. package/src/components/navigation/SectionNav/index.ts +1 -0
  53. package/dist/chunk-32JMSHEA.js.map +0 -1
  54. package/dist/chunk-43Q6CVPB.js +0 -240
  55. package/dist/chunk-43Q6CVPB.js.map +0 -1
  56. package/dist/chunk-GLKQT2DS.js.map +0 -1
  57. package/dist/chunk-RX7J6VRI.js.map +0 -1
  58. package/dist/chunk-RZ4SBSLP.js +0 -62
  59. package/dist/chunk-RZ4SBSLP.js.map +0 -1
  60. package/dist/chunk-VHVI3D4R.js.map +0 -1
  61. /package/dist/{chunk-SA2ERYVV.js.map → chunk-5GQYTB3K.js.map} +0 -0
@@ -723,9 +723,9 @@ Components for site and app navigation.
723
723
  ### SectionNav
724
724
  **Purpose**: A section's own navigation — the few screens one kind of work moves between
725
725
  **Use Cases**: A phone bottom bar for a work area (a shift, a till, a field app); the same destinations as a rail on a wide screen
726
- **Features**: `bar` (destinations with counts, a `more` sheet, a raised `primary` action in the middle opening its own sheet) and `rail` (a way back, destinations, every menu listed); router-agnostic links via `linkComponent`; copy as a required prop
726
+ **Features**: `bar` (destinations with counts, a `more` sheet, a raised `primary` action in the middle opening its own sheet) and `rail` (a way back, destinations, every menu listed); router-agnostic links via `linkComponent`; copy as a required prop; also a bar of VERBS pinned at a screen's foot — action slots (`onSelect`, `disabled`, `dimmed` — looks disabled but still answers a tap, `loading` — focusable and busy, `active` as a pressed toggle), a raised `primary` that acts on tap with its label under it, disabled menu entries, host-owned `dataTestId`s
727
727
  **Also exports**: `RaisedActionButton` — the raised round action alone, for a bar the host already draws
728
- **Types**: `SectionNavProps`, `SectionNavDestination`, `SectionNavMenu`, `SectionNavGroup`, `SectionNavEntry`, `SectionNavCopy`
728
+ **Types**: `SectionNavProps`, `SectionNavDestination`, `SectionNavAction`, `SectionNavMenu`, `SectionNavGroup`, `SectionNavEntry`, `SectionNavCopy`
729
729
  **Location**: `src/components/navigation/SectionNav`
730
730
  **Docs**: `src/components/navigation/SectionNav/SectionNav.md`
731
731
 
@@ -97,17 +97,17 @@ import "../../chunk-3AIRFAI3.js";
97
97
  import "../../chunk-R26KYJHK.js";
98
98
  import {
99
99
  SectionNav
100
- } from "../../chunk-SA2ERYVV.js";
100
+ } from "../../chunk-5GQYTB3K.js";
101
101
  import {
102
102
  sectionNavBarInset
103
- } from "../../chunk-43Q6CVPB.js";
104
- import "../../chunk-32JMSHEA.js";
105
- import "../../chunk-RX7J6VRI.js";
103
+ } from "../../chunk-WNZBUR76.js";
104
+ import "../../chunk-S4ZUZ6DS.js";
105
+ import "../../chunk-HKEBTPKY.js";
106
106
  import {
107
107
  RaisedActionButton
108
- } from "../../chunk-RZ4SBSLP.js";
109
- import "../../chunk-GLKQT2DS.js";
110
- import "../../chunk-VHVI3D4R.js";
108
+ } from "../../chunk-WNKRFMSI.js";
109
+ import "../../chunk-A436VORP.js";
110
+ import "../../chunk-P3GBXE73.js";
111
111
  import "../../chunk-R445KMGG.js";
112
112
  import {
113
113
  Tabs
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  SectionNavBar,
3
3
  sectionNavBarInset
4
- } from "../../../../chunk-43Q6CVPB.js";
5
- import "../../../../chunk-32JMSHEA.js";
6
- import "../../../../chunk-RZ4SBSLP.js";
7
- import "../../../../chunk-GLKQT2DS.js";
8
- import "../../../../chunk-VHVI3D4R.js";
4
+ } from "../../../../chunk-WNZBUR76.js";
5
+ import "../../../../chunk-S4ZUZ6DS.js";
6
+ import "../../../../chunk-WNKRFMSI.js";
7
+ import "../../../../chunk-A436VORP.js";
8
+ import "../../../../chunk-P3GBXE73.js";
9
9
  import "../../../../chunk-TMSWLFL4.js";
10
10
  import "../../../../chunk-KIHGTL2D.js";
11
11
  import "../../../../chunk-5AK2EZG5.js";
@@ -39,6 +39,7 @@ import "../../../../chunk-FQ6UW7IY.js";
39
39
  import "../../../../chunk-6JAIFIPW.js";
40
40
  import "../../../../chunk-N3GAFIXG.js";
41
41
  import "../../../../chunk-YKCAJ2TN.js";
42
+ import "../../../../chunk-MFU4Y25U.js";
42
43
  import "../../../../chunk-PZ5AY32C.js";
43
44
  export {
44
45
  SectionNavBar,
@@ -1,12 +1,16 @@
1
1
  import {
2
2
  barSlots,
3
+ destinationState,
4
+ isMenu,
3
5
  menuActive,
4
6
  menuCount,
5
7
  shownCount
6
- } from "../../../../chunk-VHVI3D4R.js";
8
+ } from "../../../../chunk-P3GBXE73.js";
7
9
  import "../../../../chunk-PZ5AY32C.js";
8
10
  export {
9
11
  barSlots,
12
+ destinationState,
13
+ isMenu,
10
14
  menuActive,
11
15
  menuCount,
12
16
  shownCount
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  SectionNav
3
- } from "../../../../chunk-SA2ERYVV.js";
4
- import "../../../../chunk-43Q6CVPB.js";
5
- import "../../../../chunk-32JMSHEA.js";
6
- import "../../../../chunk-RX7J6VRI.js";
7
- import "../../../../chunk-RZ4SBSLP.js";
8
- import "../../../../chunk-GLKQT2DS.js";
9
- import "../../../../chunk-VHVI3D4R.js";
3
+ } from "../../../../chunk-5GQYTB3K.js";
4
+ import "../../../../chunk-WNZBUR76.js";
5
+ import "../../../../chunk-S4ZUZ6DS.js";
6
+ import "../../../../chunk-HKEBTPKY.js";
7
+ import "../../../../chunk-WNKRFMSI.js";
8
+ import "../../../../chunk-A436VORP.js";
9
+ import "../../../../chunk-P3GBXE73.js";
10
10
  import "../../../../chunk-TMSWLFL4.js";
11
11
  import "../../../../chunk-KIHGTL2D.js";
12
12
  import "../../../../chunk-5AK2EZG5.js";
@@ -40,6 +40,7 @@ import "../../../../chunk-FQ6UW7IY.js";
40
40
  import "../../../../chunk-6JAIFIPW.js";
41
41
  import "../../../../chunk-N3GAFIXG.js";
42
42
  import "../../../../chunk-YKCAJ2TN.js";
43
+ import "../../../../chunk-MFU4Y25U.js";
43
44
  import "../../../../chunk-PZ5AY32C.js";
44
45
  export {
45
46
  SectionNav
@@ -2,10 +2,13 @@ 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-GLKQT2DS.js";
8
- import "../../../../chunk-VHVI3D4R.js";
10
+ } from "../../../../chunk-A436VORP.js";
11
+ import "../../../../chunk-P3GBXE73.js";
9
12
  import "../../../../chunk-5AK2EZG5.js";
10
13
  import "../../../../chunk-AMSNWV7V.js";
11
14
  import "../../../../chunk-6C5D6O3D.js";
@@ -42,7 +45,10 @@ export {
42
45
  Box,
43
46
  CONTROL_RESET,
44
47
  CountedIcon,
48
+ NOT_LIVE,
49
+ SlotIcon,
45
50
  controlProps,
51
+ destinationControl,
46
52
  focusRing
47
53
  };
48
54
  //# sourceMappingURL=SectionNav.parts.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  RaisedActionButton
3
- } from "../../../../chunk-RZ4SBSLP.js";
4
- import "../../../../chunk-GLKQT2DS.js";
5
- import "../../../../chunk-VHVI3D4R.js";
3
+ } from "../../../../chunk-WNKRFMSI.js";
4
+ import "../../../../chunk-A436VORP.js";
5
+ import "../../../../chunk-P3GBXE73.js";
6
6
  import "../../../../chunk-5AK2EZG5.js";
7
7
  import "../../../../chunk-AMSNWV7V.js";
8
8
  import "../../../../chunk-6C5D6O3D.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  SectionNavRail
3
- } from "../../../../chunk-RX7J6VRI.js";
4
- import "../../../../chunk-GLKQT2DS.js";
5
- import "../../../../chunk-VHVI3D4R.js";
3
+ } from "../../../../chunk-HKEBTPKY.js";
4
+ import "../../../../chunk-A436VORP.js";
5
+ import "../../../../chunk-P3GBXE73.js";
6
6
  import "../../../../chunk-5AK2EZG5.js";
7
7
  import "../../../../chunk-AMSNWV7V.js";
8
8
  import "../../../../chunk-6C5D6O3D.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  SectionNavSheet
3
- } from "../../../../chunk-32JMSHEA.js";
4
- import "../../../../chunk-GLKQT2DS.js";
5
- import "../../../../chunk-VHVI3D4R.js";
3
+ } from "../../../../chunk-S4ZUZ6DS.js";
4
+ import "../../../../chunk-A436VORP.js";
5
+ import "../../../../chunk-P3GBXE73.js";
6
6
  import "../../../../chunk-TMSWLFL4.js";
7
7
  import "../../../../chunk-KIHGTL2D.js";
8
8
  import "../../../../chunk-5AK2EZG5.js";
@@ -119,9 +119,21 @@ function PhoneFrame({ children }) {
119
119
  function RailFrame({ children }) {
120
120
  return /* @__PURE__ */ jsx(Box, { sx: { width: sxRem(240), height: sxRem(560), border: 1, borderColor: "divider" }, children });
121
121
  }
122
+ var ACTIONS = [
123
+ { id: "split", label: "Split", icon: /* @__PURE__ */ jsx(ReceiptLongOutlinedIcon, {}), onSelect: () => void 0, dimmed: true },
124
+ { id: "equal", label: "Equally", icon: /* @__PURE__ */ jsx(GroupsOutlinedIcon, {}), onSelect: () => void 0, active: true },
125
+ { id: "person", label: "Person", icon: /* @__PURE__ */ jsx(AddIcon, {}), onSelect: () => void 0 }
126
+ ];
127
+ var PAY_ALL = {
128
+ label: "Pay all",
129
+ icon: /* @__PURE__ */ jsx(StorefrontOutlinedIcon, {}),
130
+ onSelect: () => void 0
131
+ };
122
132
  export {
133
+ ACTIONS,
123
134
  DESTINATIONS,
124
135
  MORE,
136
+ PAY_ALL,
125
137
  PRIMARY,
126
138
  PhoneFrame,
127
139
  RailFrame
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/components/navigation/SectionNav/__stories__/fixtures.tsx"],"sourcesContent":["import AddIcon from '@mui/icons-material/Add';\nimport AppsIcon from '@mui/icons-material/Apps';\nimport CalendarMonthOutlinedIcon from '@mui/icons-material/CalendarMonthOutlined';\nimport DashboardOutlinedIcon from '@mui/icons-material/DashboardOutlined';\nimport DeliveryDiningOutlinedIcon from '@mui/icons-material/DeliveryDiningOutlined';\nimport GridViewOutlinedIcon from '@mui/icons-material/GridViewOutlined';\nimport GroupsOutlinedIcon from '@mui/icons-material/GroupsOutlined';\nimport PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline';\nimport ReceiptLongOutlinedIcon from '@mui/icons-material/ReceiptLongOutlined';\nimport RoomServiceOutlinedIcon from '@mui/icons-material/RoomServiceOutlined';\nimport ShoppingBagOutlinedIcon from '@mui/icons-material/ShoppingBagOutlined';\nimport StorefrontOutlinedIcon from '@mui/icons-material/StorefrontOutlined';\nimport TableRestaurantOutlinedIcon from '@mui/icons-material/TableRestaurantOutlined';\nimport Box from '@mui/material/Box/index.js';\nimport React from 'react';\n\nimport { sxRem } from '../../../../tokens/scales';\n\nimport type { SectionNavDestination, SectionNavMenu } from '../SectionNav.types';\n\n/**\n * The stories' example section, shared by the showcase and the interaction\n * tests. Kept out of the `*.stories.tsx` files because Storybook reads every\n * named export there as a story.\n */\n\n/** A restaurant's shift, as the example section: the floor, the board, the waiter's round. */\nexport const DESTINATIONS: SectionNavDestination[] = [\n { id: 'floor', label: 'Floor', icon: <GridViewOutlinedIcon />, href: '#floor' },\n { id: 'board', label: 'Board', icon: <DashboardOutlinedIcon />, href: '#board', badge: 3, active: true },\n { id: 'serve', label: 'Serve', icon: <TableRestaurantOutlinedIcon />, href: '#serve', badge: 2 },\n];\n\nexport const PRIMARY: SectionNavMenu = {\n label: 'Create',\n icon: <AddIcon />,\n title: 'Create now',\n groups: [\n {\n id: 'order',\n title: 'New order',\n layout: 'grid',\n entries: [\n { id: 'delivery', label: 'Delivery', icon: <DeliveryDiningOutlinedIcon />, onSelect: () => undefined },\n { id: 'pickup', label: 'Pickup', icon: <ShoppingBagOutlinedIcon />, onSelect: () => undefined },\n { id: 'counter', label: 'Counter', icon: <StorefrontOutlinedIcon />, onSelect: () => undefined },\n ],\n },\n {\n id: 'menu',\n title: 'Menu',\n entries: [\n {\n id: 'pause',\n label: 'Pause an item',\n description: 'Take it off sale until it is back',\n icon: <PauseCircleOutlineIcon />,\n onSelect: () => undefined,\n },\n ],\n },\n ],\n};\n\nexport const MORE: SectionNavMenu = {\n label: 'More',\n icon: <AppsIcon />,\n title: 'More',\n groups: [\n {\n id: 'rest',\n layout: 'grid',\n entries: [\n { id: 'queue', label: 'Queue', icon: <GroupsOutlinedIcon />, href: '#queue', badge: 1 },\n { id: 'pass', label: 'Pass', icon: <RoomServiceOutlinedIcon />, href: '#pass' },\n { id: 'runs', label: 'Deliveries', icon: <DeliveryDiningOutlinedIcon />, href: '#runs' },\n { id: 'booked', label: 'Bookings', icon: <CalendarMonthOutlinedIcon />, href: '#booked' },\n { id: 'orders', label: 'Orders', icon: <ReceiptLongOutlinedIcon />, href: '#orders' },\n ],\n },\n ],\n};\n\n/** A phone-sized frame with the bar at its foot, the way a host docks it. */\nexport function PhoneFrame({ children }: { children: React.ReactNode }): React.ReactElement {\n return (\n <Box\n sx={{\n width: sxRem(360),\n maxWidth: '100%',\n height: sxRem(640),\n display: 'flex',\n flexDirection: 'column',\n border: 1,\n borderColor: 'divider',\n borderRadius: 3,\n overflow: 'hidden',\n bgcolor: 'background.default',\n }}\n >\n <Box sx={{ flex: 1, p: 2 }} />\n {children}\n </Box>\n );\n}\n\n\n/** A desktop-column-sized frame for the rail. */\nexport function RailFrame({ children }: { children: React.ReactNode }): React.ReactElement {\n return <Box sx={{ width: sxRem(240), height: sxRem(560), border: 1, borderColor: 'divider' }}>{children}</Box>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,aAAa;AACpB,OAAO,cAAc;AACrB,OAAO,+BAA+B;AACtC,OAAO,2BAA2B;AAClC,OAAO,gCAAgC;AACvC,OAAO,0BAA0B;AACjC,OAAO,wBAAwB;AAC/B,OAAO,4BAA4B;AACnC,OAAO,6BAA6B;AACpC,OAAO,6BAA6B;AACpC,OAAO,6BAA6B;AACpC,OAAO,4BAA4B;AACnC,OAAO,iCAAiC;AACxC,OAAO,SAAS;AAeuB,cA0DnC,YA1DmC;AADhC,IAAM,eAAwC;AAAA,EACnD,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,oBAAC,wBAAqB,GAAI,MAAM,SAAS;AAAA,EAC9E,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,oBAAC,yBAAsB,GAAI,MAAM,UAAU,OAAO,GAAG,QAA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AM,QAAQ;AAAA,QACvF,EAAE,IAAI,UAAU,OAAO,YAAY,MAAM,oBAAC,6BAA0B,GAAI,MAAM,UAAU;AAAA,QACxF,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,oBAAC,2BAAwB,GAAI,MAAM,UAAU;AAAA,MACtF;AAAA,IACF;AAAA,EACF;AACF;AAGO,SAAS,WAAW,EAAE,SAAS,GAAsD;AAC1F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,QACF,OAAO,MAAM,GAAG;AAAA,QAChB,UAAU;AAAA,QACV,QAAQ,MAAM,GAAG;AAAA,QACjB,SAAS;AAAA,QACT,eAAe;AAAA,QACf,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,cAAc;AAAA,QACd,UAAU;AAAA,QACV,SAAS;AAAA,MACX;AAAA,MAEA;AAAA,4BAAC,OAAI,IAAI,EAAE,MAAM,GAAG,GAAG,EAAE,GAAG;AAAA,QAC3B;AAAA;AAAA;AAAA,EACH;AAEJ;AAIO,SAAS,UAAU,EAAE,SAAS,GAAsD;AACzF,SAAO,oBAAC,OAAI,IAAI,EAAE,OAAO,MAAM,GAAG,GAAG,QAAQ,MAAM,GAAG,GAAG,QAAQ,GAAG,aAAa,UAAU,GAAI,UAAS;AAC1G;","names":[]}
1
+ {"version":3,"sources":["../../../../../../src/components/navigation/SectionNav/__stories__/fixtures.tsx"],"sourcesContent":["import AddIcon from '@mui/icons-material/Add';\nimport AppsIcon from '@mui/icons-material/Apps';\nimport CalendarMonthOutlinedIcon from '@mui/icons-material/CalendarMonthOutlined';\nimport DashboardOutlinedIcon from '@mui/icons-material/DashboardOutlined';\nimport DeliveryDiningOutlinedIcon from '@mui/icons-material/DeliveryDiningOutlined';\nimport GridViewOutlinedIcon from '@mui/icons-material/GridViewOutlined';\nimport GroupsOutlinedIcon from '@mui/icons-material/GroupsOutlined';\nimport PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline';\nimport ReceiptLongOutlinedIcon from '@mui/icons-material/ReceiptLongOutlined';\nimport RoomServiceOutlinedIcon from '@mui/icons-material/RoomServiceOutlined';\nimport ShoppingBagOutlinedIcon from '@mui/icons-material/ShoppingBagOutlined';\nimport StorefrontOutlinedIcon from '@mui/icons-material/StorefrontOutlined';\nimport TableRestaurantOutlinedIcon from '@mui/icons-material/TableRestaurantOutlined';\nimport Box from '@mui/material/Box/index.js';\nimport React from 'react';\n\nimport { sxRem } from '../../../../tokens/scales';\n\nimport type { SectionNavAction, SectionNavDestination, SectionNavMenu } from '../SectionNav.types';\n\n/**\n * The stories' example section, shared by the showcase and the interaction\n * tests. Kept out of the `*.stories.tsx` files because Storybook reads every\n * named export there as a story.\n */\n\n/** A restaurant's shift, as the example section: the floor, the board, the waiter's round. */\nexport const DESTINATIONS: SectionNavDestination[] = [\n { id: 'floor', label: 'Floor', icon: <GridViewOutlinedIcon />, href: '#floor' },\n { id: 'board', label: 'Board', icon: <DashboardOutlinedIcon />, href: '#board', badge: 3, active: true },\n { id: 'serve', label: 'Serve', icon: <TableRestaurantOutlinedIcon />, href: '#serve', badge: 2 },\n];\n\nexport const PRIMARY: SectionNavMenu = {\n label: 'Create',\n icon: <AddIcon />,\n title: 'Create now',\n groups: [\n {\n id: 'order',\n title: 'New order',\n layout: 'grid',\n entries: [\n { id: 'delivery', label: 'Delivery', icon: <DeliveryDiningOutlinedIcon />, onSelect: () => undefined },\n { id: 'pickup', label: 'Pickup', icon: <ShoppingBagOutlinedIcon />, onSelect: () => undefined },\n { id: 'counter', label: 'Counter', icon: <StorefrontOutlinedIcon />, onSelect: () => undefined },\n ],\n },\n {\n id: 'menu',\n title: 'Menu',\n entries: [\n {\n id: 'pause',\n label: 'Pause an item',\n description: 'Take it off sale until it is back',\n icon: <PauseCircleOutlineIcon />,\n onSelect: () => undefined,\n },\n ],\n },\n ],\n};\n\nexport const MORE: SectionNavMenu = {\n label: 'More',\n icon: <AppsIcon />,\n title: 'More',\n groups: [\n {\n id: 'rest',\n layout: 'grid',\n entries: [\n { id: 'queue', label: 'Queue', icon: <GroupsOutlinedIcon />, href: '#queue', badge: 1 },\n { id: 'pass', label: 'Pass', icon: <RoomServiceOutlinedIcon />, href: '#pass' },\n { id: 'runs', label: 'Deliveries', icon: <DeliveryDiningOutlinedIcon />, href: '#runs' },\n { id: 'booked', label: 'Bookings', icon: <CalendarMonthOutlinedIcon />, href: '#booked' },\n { id: 'orders', label: 'Orders', icon: <ReceiptLongOutlinedIcon />, href: '#orders' },\n ],\n },\n ],\n};\n\n/** A phone-sized frame with the bar at its foot, the way a host docks it. */\nexport function PhoneFrame({ children }: { children: React.ReactNode }): React.ReactElement {\n return (\n <Box\n sx={{\n width: sxRem(360),\n maxWidth: '100%',\n height: sxRem(640),\n display: 'flex',\n flexDirection: 'column',\n border: 1,\n borderColor: 'divider',\n borderRadius: 3,\n overflow: 'hidden',\n bgcolor: 'background.default',\n }}\n >\n <Box sx={{ flex: 1, p: 2 }} />\n {children}\n </Box>\n );\n}\n\n\n/** A desktop-column-sized frame for the rail. */\nexport function RailFrame({ children }: { children: React.ReactNode }): React.ReactElement {\n return <Box sx={{ width: sxRem(240), height: sxRem(560), border: 1, borderColor: 'divider' }}>{children}</Box>;\n}\n\n/**\n * A screen's ACTIONS pinned at its foot — the same bar, drawn with verbs: a\n * bill being settled, one person at a time.\n *\n * `split` is DIMMED — it cannot be done yet, and a tap still reaches the host\n * so it can say why. `equal` is a TOGGLE that is on: `aria-pressed`, never\n * `aria-current`, because an action is not a page.\n */\nexport const ACTIONS: SectionNavDestination[] = [\n { id: 'split', label: 'Split', icon: <ReceiptLongOutlinedIcon />, onSelect: () => undefined, dimmed: true },\n { id: 'equal', label: 'Equally', icon: <GroupsOutlinedIcon />, onSelect: () => undefined, active: true },\n { id: 'person', label: 'Person', icon: <AddIcon />, onSelect: () => undefined },\n];\n\nexport const PAY_ALL: SectionNavAction = {\n label: 'Pay all',\n icon: <StorefrontOutlinedIcon />,\n onSelect: () => undefined,\n};\n"],"mappings":";;;;;;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MAAM,GAAG,GAAG,QAAQ,MAAM,GAAG,GAAG,QAAQ,GAAG,aAAa,UAAU,GAAI,UAAS;AAC1G;AAUO,IAAM,UAAmC;AAAA,EAC9C,EAAE,IAAI,SAAS,OAAO,SAAS,MAAM,oBAAC,2BAAwB,GAAI,UAAU,MAAM,QAAW,QAAQ,KAAK;AAAA,EAC1G,EAAE,IAAI,SAAS,OAAO,WAAW,MAAM,oBAAC,sBAAmB,GAAI,UAAU,MAAM,QAAW,QAAQ,KAAK;AAAA,EACvG,EAAE,IAAI,UAAU,OAAO,UAAU,MAAM,oBAAC,WAAQ,GAAI,UAAU,MAAM,OAAU;AAChF;AAEO,IAAM,UAA4B;AAAA,EACvC,OAAO;AAAA,EACP,MAAM,oBAAC,0BAAuB;AAAA,EAC9B,UAAU,MAAM;AAClB;","names":[]}
@@ -24,17 +24,17 @@ import "../../../chunk-3AIRFAI3.js";
24
24
  import "../../../chunk-R26KYJHK.js";
25
25
  import {
26
26
  SectionNav
27
- } from "../../../chunk-SA2ERYVV.js";
27
+ } from "../../../chunk-5GQYTB3K.js";
28
28
  import {
29
29
  sectionNavBarInset
30
- } from "../../../chunk-43Q6CVPB.js";
31
- import "../../../chunk-32JMSHEA.js";
32
- import "../../../chunk-RX7J6VRI.js";
30
+ } from "../../../chunk-WNZBUR76.js";
31
+ import "../../../chunk-S4ZUZ6DS.js";
32
+ import "../../../chunk-HKEBTPKY.js";
33
33
  import {
34
34
  RaisedActionButton
35
- } from "../../../chunk-RZ4SBSLP.js";
36
- import "../../../chunk-GLKQT2DS.js";
37
- import "../../../chunk-VHVI3D4R.js";
35
+ } from "../../../chunk-WNKRFMSI.js";
36
+ import "../../../chunk-A436VORP.js";
37
+ import "../../../chunk-P3GBXE73.js";
38
38
  import "../../../chunk-R445KMGG.js";
39
39
  import {
40
40
  Tabs
@@ -128,6 +128,7 @@ import "../../../chunk-FQ6UW7IY.js";
128
128
  import "../../../chunk-6JAIFIPW.js";
129
129
  import "../../../chunk-N3GAFIXG.js";
130
130
  import "../../../chunk-YKCAJ2TN.js";
131
+ import "../../../chunk-MFU4Y25U.js";
131
132
  import "../../../chunk-PZ5AY32C.js";
132
133
  export {
133
134
  AppHeader,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  SectionNavBar
3
- } from "./chunk-43Q6CVPB.js";
3
+ } from "./chunk-WNZBUR76.js";
4
4
  import {
5
5
  SectionNavRail
6
- } from "./chunk-RX7J6VRI.js";
6
+ } from "./chunk-HKEBTPKY.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-SA2ERYVV.js.map
55
+ //# sourceMappingURL=chunk-5GQYTB3K.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  shownCount
3
- } from "./chunk-VHVI3D4R.js";
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-GLKQT2DS.js.map
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;AAE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EACN,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,CAAC,QAAQ,GAAG,EAAE,QAAQ,UAAU;AAClC;","names":[]}
@@ -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-GLKQT2DS.js";
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": active ? "page" : void 0,
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(CountedIcon, { icon, count, label: copy.badge, testId: `${testId}-badge` }),
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({ href: entry.href, linkComponent, onClick: () => entry.onSelect?.() })
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__ */ jsxs(
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
- RailRow,
225
+ RailDestination,
147
226
  {
148
- label: destination.label,
149
- icon: destination.icon,
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(RailMenu, { menu: primary, linkComponent, copy, testId: `${dataTestId}-primary` }) : null,
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-RX7J6VRI.js.map
245
+ //# sourceMappingURL=chunk-HKEBTPKY.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 type {\n SectionNavAction,\n SectionNavBack,\n SectionNavDestination,\n SectionNavMenu,\n SectionNavProps,\n} from './SectionNav.types';\n\n/**\n * One rail row: icon, label, and the count at the far end.\n *\n * Destinations and menu entries draw the same row — in the rail there is room\n * for everything, so the difference between \"a place\" and \"an action\" is the\n * section it sits in, not its shape.\n *\n * `active` is the look; `current` is what `aria-current` reports, and is a\n * link's claim only — an action row that is ON says so with `aria-pressed`,\n * which arrives in `control`. Omitted, `current` follows `active`.\n */\nfunction RailRow({\n label,\n description,\n icon,\n count,\n active,\n current = active,\n copy,\n testId,\n control,\n loading = false,\n}: {\n label: string;\n description?: string;\n icon: ReactNode;\n count: number | undefined;\n active: boolean;\n current?: boolean;\n copy: SectionNavCopy;\n testId: string;\n control: Record<string, unknown>;\n loading?: boolean;\n}): React.JSX.Element {\n const theme = useTheme();\n return (\n <Box\n {...control}\n aria-current={current ? 'page' : undefined}\n aria-busy={loading || undefined}\n data-testid={testId}\n sx={{\n ...CONTROL_RESET,\n ...focusRing(theme),\n display: 'flex',\n alignItems: 'center',\n gap: 1.5,\n width: '100%',\n minHeight: rem(theme, 40),\n px: 1.25,\n py: 0.75,\n borderRadius: 1,\n textAlign: 'start',\n color: active ? 'primary.main' : 'text.primary',\n bgcolor: active ? 'action.selected' : 'transparent',\n '&:hover': { bgcolor: active ? 'action.selected' : 'action.hover' },\n '& svg': { color: 'primary.main', fontSize: rem(theme, 20) },\n [NOT_LIVE]: { color: 'text.disabled', '& svg': { color: 'text.disabled' } },\n }}\n >\n <CountedIcon\n icon={<SlotIcon icon={icon} loading={loading} />}\n count={count}\n label={copy.badge}\n testId={`${testId}-badge`}\n />\n <Box component=\"span\" sx={{ display: 'flex', flexDirection: 'column', minWidth: 0 }}>\n <Typography component=\"span\" variant=\"body2\" sx={{ fontWeight: active ? 700 : 500 }}>\n {label}\n </Typography>\n {description ? (\n <Typography component=\"span\" variant=\"caption\" color=\"text.secondary\">\n {description}\n </Typography>\n ) : null}\n </Box>\n </Box>\n );\n}\n\n/** A heading between the rail's sections, in the sidebar's small-caps voice. */\nfunction RailHeading({ children }: { children: ReactNode }): React.JSX.Element {\n return (\n <Typography variant=\"overline\" color=\"text.secondary\" sx={{ px: 1.25, pt: 1.5, lineHeight: 1.6 }}>\n {children}\n </Typography>\n );\n}\n\n/**\n * A menu's groups, listed under its title — nothing folded away on a wide\n * screen. A `disabled` menu has no trigger here to refuse, so every row of it\n * is inert instead.\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 destinations,\n * then every menu's entries.\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 {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 {isMenu(primary) ? (\n <RailMenu menu={primary} linkComponent={linkComponent} copy={copy} testId={`${dataTestId}-primary`} />\n ) : null}\n {more ? <RailMenu menu={more} linkComponent={linkComponent} copy={copy} testId={`${dataTestId}-more`} /> : null}\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,gBAAgB;AACvB,SAAS,gBAAgB;AAsFX,cAKR,YALQ;AAlDd,SAAS,QAAQ;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AACZ,GAWsB;AACpB,QAAM,QAAQ,SAAS;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,gBAAc,UAAU,SAAS;AAAA,MACjC,aAAW,WAAW;AAAA,MACtB,eAAa;AAAA,MACb,IAAI;AAAA,QACF,GAAG;AAAA,QACH,GAAG,UAAU,KAAK;AAAA,QAClB,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,KAAK;AAAA,QACL,OAAO;AAAA,QACP,WAAW,IAAI,OAAO,EAAE;AAAA,QACxB,IAAI;AAAA,QACJ,IAAI;A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