@dloizides/ui-nav 1.34.0 → 1.37.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/CHANGELOG.md +8 -0
- package/README.md +18 -0
- package/dist/index.d.mts +40 -13
- package/dist/index.d.ts +40 -13
- package/dist/index.js +282 -105
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +282 -107
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.37.0
|
|
4
|
+
|
|
5
|
+
- NAV-BRAND-1 "Wider sidebar, logo and name in the top bar": `NavShell` gains `brandPlacement`, `sidebarWidth`, `drawerHeader`, `drawerWidth` (defaults = today); `Sidebar.width`; `AppShell.mobileMenu` takes `header` / `width` / `sidebar`. Exports `SIDEBAR_WIDTH_PX`, `NAV_BRAND_DEFAULTS`.
|
|
6
|
+
|
|
7
|
+
## 1.35.0
|
|
8
|
+
|
|
9
|
+
- NAV-SCROLL-1 "Opening sidebar groups never hides the items below" (AC-UI-1, AC-UI-2): `Sidebar` items (header slot + list) scroll in a `ScrollView` between the pinned title/search and the pinned footer, with a `theme.colors.surface` fade on each edge that hides items. Inside `MobileDrawer` opening a top-level group closes the other (through `NavAccordionContext`, which `MobileDrawer` provides; no new `Sidebar` prop). `NavExpandableItem` takes optional controlled `expanded` + `onToggle`. No prop changes for existing consumers.
|
|
10
|
+
|
|
3
11
|
## 1.28.0
|
|
4
12
|
|
|
5
13
|
- INVOICE-5 "Edit invoices before sending, shared background and menu hover" (AC-UI-3, AC-UI-6): `AppShell` draws `theme.backdrop` (the `@dloizides/theme-web` 1.5.0 `resolveBackdrop` shape, typed here as `AppShellBackdrop`): its colour and web image on the root, and for `horizon` a brand band behind header and nav that the content overlaps by `overlap.compact` (< 768 px) or `overlap.wide`. No `theme.backdrop` keeps today's flat background.
|
package/README.md
CHANGED
|
@@ -151,6 +151,24 @@ import { NavShell, type NavItem } from '@dloizides/ui-nav';
|
|
|
151
151
|
`NavShell` composes existing components, so it stays purely additive — `AppShell`,
|
|
152
152
|
`NavBar`, and `Sidebar` are unchanged.
|
|
153
153
|
|
|
154
|
+
### Brand position, rail width and phone drawer (`NavShell`, NAV-BRAND-1)
|
|
155
|
+
|
|
156
|
+
One prop per choice; every default keeps today's layout.
|
|
157
|
+
|
|
158
|
+
| Prop | Values | Default |
|
|
159
|
+
|---|---|---|
|
|
160
|
+
| `brandPlacement` | `'sidebar'` (rail top) · `'topbar'` (top-left of the header, >= 768 px) | `'sidebar'` |
|
|
161
|
+
| `sidebarWidth` | `'default'` 220 · `'sm'` 240 · `'md'` 264 · `'lg'` 288 px (`SIDEBAR_WIDTH_PX`) | `'default'` |
|
|
162
|
+
| `drawerHeader` | `'none'` · `'brand'` (brand once in the open drawer's header, with a close button) | `'none'` |
|
|
163
|
+
| `drawerWidth` | `'default'` (280 px panel + scrim) · `'full'` (whole screen, close button) | `'default'` |
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
<NavShell layout="side" brandPlacement="topbar" sidebarWidth="sm" drawerHeader="brand" drawerWidth="full"
|
|
167
|
+
sideRail={{ items, title, brand: <AppBrand /> }} header={<Topbar ... />} {...rest} />
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The brand node is the same `sideRail.brand` in every position; only where it renders changes.
|
|
171
|
+
|
|
154
172
|
### Three-tier responsive rail (`AppShell.collapsedSidebar` / `CollapsedRail`)
|
|
155
173
|
|
|
156
174
|
Supply a `collapsedSidebar` (or `NavShell`'s `sideRail.collapsed`) to opt the rail
|
package/dist/index.d.mts
CHANGED
|
@@ -43,6 +43,25 @@ interface NavItem {
|
|
|
43
43
|
*/
|
|
44
44
|
exact?: boolean;
|
|
45
45
|
}
|
|
46
|
+
/** Where the shell's brand sits on desktop: the rail top (today) or the top-left of the top bar. */
|
|
47
|
+
type BrandPlacement = 'sidebar' | 'topbar';
|
|
48
|
+
/** Named side-rail widths; `default` is today's 220 px. */
|
|
49
|
+
type SidebarWidth = 'default' | 'sm' | 'md' | 'lg';
|
|
50
|
+
/** What the open phone drawer shows in its header: nothing (today) or the brand. */
|
|
51
|
+
type DrawerHeader = 'none' | 'brand';
|
|
52
|
+
/** Phone drawer width: today's fixed panel or the full screen. */
|
|
53
|
+
type DrawerWidth = 'default' | 'full';
|
|
54
|
+
/** Pixel width of each named side-rail width token. */
|
|
55
|
+
declare const SIDEBAR_WIDTH_PX: Readonly<Record<SidebarWidth, number>>;
|
|
56
|
+
/** Shell brand and drawer options; each is one prop with a default that keeps today's layout. */
|
|
57
|
+
interface NavBrandOptions {
|
|
58
|
+
brandPlacement?: BrandPlacement;
|
|
59
|
+
sidebarWidth?: SidebarWidth;
|
|
60
|
+
drawerHeader?: DrawerHeader;
|
|
61
|
+
drawerWidth?: DrawerWidth;
|
|
62
|
+
}
|
|
63
|
+
/** Defaults of {@link NavBrandOptions}: today's layout. */
|
|
64
|
+
declare const NAV_BRAND_DEFAULTS: Readonly<Required<NavBrandOptions>>;
|
|
46
65
|
|
|
47
66
|
/**
|
|
48
67
|
* Active-route matching for the nav shells.
|
|
@@ -154,8 +173,10 @@ interface SidebarProps {
|
|
|
154
173
|
pathname: string;
|
|
155
174
|
/** Navigation callback — receives a `NavItem.route`. */
|
|
156
175
|
onNavigate: (route: string) => void;
|
|
157
|
-
/** Localized menu title (heading). */
|
|
176
|
+
/** Localized menu title (heading); `null` leaves the slot empty. */
|
|
158
177
|
title: React.ReactNode;
|
|
178
|
+
/** Named rail width (default 220 px). */
|
|
179
|
+
width?: SidebarWidth;
|
|
159
180
|
/** Localized accessibility label for the navigation landmark. */
|
|
160
181
|
regionLabel: string;
|
|
161
182
|
/** a11y hint for a leaf item, given its label. Defaults to the label. */
|
|
@@ -194,7 +215,7 @@ interface SidebarProps {
|
|
|
194
215
|
/** Extra container style overrides. */
|
|
195
216
|
containerStyle?: ViewStyle | ViewStyle[];
|
|
196
217
|
}
|
|
197
|
-
declare const Sidebar: ({ items, pathname, onNavigate, title, regionLabel, navigateHint, expandHint, collapseHint, renderChevron, enableInlineSearch, search, paletteTrigger, searchQuery, onSearchChange, header, footer, containerStyle, }: SidebarProps) => React.ReactElement;
|
|
218
|
+
declare const Sidebar: ({ items, pathname, onNavigate, title, width: railWidth, regionLabel, navigateHint, expandHint, collapseHint, renderChevron, enableInlineSearch, search, paletteTrigger, searchQuery, onSearchChange, header, footer, containerStyle, }: SidebarProps) => React.ReactElement;
|
|
198
219
|
|
|
199
220
|
/**
|
|
200
221
|
* SidebarChevron — the built-in disclosure caret for an expandable sidebar
|
|
@@ -558,6 +579,15 @@ interface DrawerLabels {
|
|
|
558
579
|
/** Accessible hint of the scrim (tap to close). */
|
|
559
580
|
closeHint: string;
|
|
560
581
|
}
|
|
582
|
+
/** Optional drawer options, passed with the labels through `AppShell.mobileMenu`. */
|
|
583
|
+
interface DrawerOptions {
|
|
584
|
+
/** Shown once in the drawer's header row (with a close button). */
|
|
585
|
+
header?: React.ReactNode;
|
|
586
|
+
/** `full` = the whole screen; default = today's 280 px panel. */
|
|
587
|
+
width?: DrawerWidth;
|
|
588
|
+
/** Drawer content in place of the rail's `sidebar` node. */
|
|
589
|
+
sidebar?: React.ReactNode;
|
|
590
|
+
}
|
|
561
591
|
|
|
562
592
|
/**
|
|
563
593
|
* Rail responsive mode — the pure (viewport → which rail face) rule behind
|
|
@@ -679,12 +709,8 @@ interface AppShellProps {
|
|
|
679
709
|
* `{ min: 768, max: 1024 }`. Only consulted when `collapsedSidebar` is supplied.
|
|
680
710
|
*/
|
|
681
711
|
collapsedRailRange?: CollapsedRailRange;
|
|
682
|
-
/**
|
|
683
|
-
|
|
684
|
-
* layout, below the breakpoint): the hamburger's open label/hint and the scrim's
|
|
685
|
-
* close label/hint. Optional — English defaults apply. NO i18n in this package.
|
|
686
|
-
*/
|
|
687
|
-
mobileMenu?: Partial<DrawerLabels>;
|
|
712
|
+
/** Mobile drawer labels (English defaults) plus optional header brand, width and content. */
|
|
713
|
+
mobileMenu?: Partial<DrawerLabels> & DrawerOptions;
|
|
688
714
|
/** Banner slot (e.g. verification-pending). */
|
|
689
715
|
banner?: React.ReactNode;
|
|
690
716
|
/** Content-width policy. Defaults to full-bleed. */
|
|
@@ -845,7 +871,7 @@ interface NavShellSideRail {
|
|
|
845
871
|
* auth gate, state cards, banner, and width policy — passes through untouched.
|
|
846
872
|
*/
|
|
847
873
|
type ForwardedShellProps = Omit<AppShellProps, 'header' | 'sidebar' | 'children'>;
|
|
848
|
-
interface NavShellProps extends ForwardedShellProps {
|
|
874
|
+
interface NavShellProps extends ForwardedShellProps, NavBrandOptions {
|
|
849
875
|
/** Which regions to render: a top bar, a side rail, or both. */
|
|
850
876
|
layout: NavShellLayout;
|
|
851
877
|
/** Current active route/path — drives active highlighting on both regions. */
|
|
@@ -877,7 +903,7 @@ interface NavShellProps extends ForwardedShellProps {
|
|
|
877
903
|
sideRail?: NavShellSideRail;
|
|
878
904
|
children: React.ReactNode;
|
|
879
905
|
}
|
|
880
|
-
declare const NavShell: ({ layout, pathname, onNavigate, regionLabel, navigateHint, topBar, header, sideRail, children, collapsedSidebar: collapsedSidebarProp, collapsedRailRange: collapsedRailRangeProp, ...shellProps }: NavShellProps) => React.ReactElement | null;
|
|
906
|
+
declare const NavShell: ({ layout, pathname, onNavigate, regionLabel, navigateHint, topBar, header, sideRail, children, collapsedSidebar: collapsedSidebarProp, collapsedRailRange: collapsedRailRangeProp, brandPlacement, sidebarWidth, drawerHeader, drawerWidth, mobileMenu, ...shellProps }: NavShellProps) => React.ReactElement | null;
|
|
881
907
|
|
|
882
908
|
/**
|
|
883
909
|
* CollapsedRail — the icon-only vertical rail for the intermediate (tablet) tier
|
|
@@ -1209,8 +1235,10 @@ interface NavExpandableItemProps {
|
|
|
1209
1235
|
*/
|
|
1210
1236
|
renderChevron?: (expanded: boolean, color: string, size: number) => React.ReactNode;
|
|
1211
1237
|
depth?: number;
|
|
1238
|
+
expanded?: boolean;
|
|
1239
|
+
onToggle?: (key: string) => void;
|
|
1212
1240
|
}
|
|
1213
|
-
declare const NavExpandableItem: ({ item, pathname, onNavigate, navigateHint, expandHint, collapseHint, renderChevron, activeRoute, depth, }: NavExpandableItemProps) => React.ReactElement;
|
|
1241
|
+
declare const NavExpandableItem: ({ item, pathname, onNavigate, navigateHint, expandHint, collapseHint, renderChevron, activeRoute, depth, expanded: expandedProp, onToggle, }: NavExpandableItemProps) => React.ReactElement;
|
|
1214
1242
|
|
|
1215
1243
|
/**
|
|
1216
1244
|
* Pure matching logic for the {@link CommandPalette}. Kept framework-free so the
|
|
@@ -1361,7 +1389,6 @@ declare const HOVER_TINT_OPACITY = 0.06;
|
|
|
1361
1389
|
declare const NAV_LINK_GAP = 4;
|
|
1362
1390
|
declare const navStyles: {
|
|
1363
1391
|
sidebarContainer: {
|
|
1364
|
-
width: number;
|
|
1365
1392
|
paddingTop: number;
|
|
1366
1393
|
paddingHorizontal: number;
|
|
1367
1394
|
borderRightWidth: number;
|
|
@@ -1666,4 +1693,4 @@ interface BottomTabBarProps {
|
|
|
1666
1693
|
/** Phone tab bar; `tabFeedback` picks the press feedback, `Default` adds no motion. */
|
|
1667
1694
|
declare const BottomTabBar: ({ items, pathname, onNavigate, tabFeedback, navigateHint, regionLabel, containerStyle, testID, }: BottomTabBarProps) => React.ReactElement;
|
|
1668
1695
|
|
|
1669
|
-
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, type AccountPlan, type AccountState, AppShell, type AppShellBackdrop, type AppShellBackdropBand, type AppShellProps, type AppShellWidth, BASE_INDENT, BottomTabBar, type BottomTabBarProps, BrandHomeLink, type BrandHomeLinkProps, BrandMark, type BrandMarkProps, CHEVRON_ICON_SIZE, CollapsedRail, type CollapsedRailProps, type CollapsedRailRange, type CommandItem, CommandPalette, type CommandPaletteLabels, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, type DarkModeControlProps, type DarkModeOption, type DarkModeVariant, HOVER_TINT_OPACITY, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, type NavBarProps, NavExpandableItem, type NavExpandableItemProps, NavHoverFeedback, type NavItem, type NavOrientation, NavOverflowMenu, type NavOverflowMenuProps, type NavProps, NavShell, type NavShellCollapsedRail, type NavShellLayout, type NavShellProps, type NavShellSideRail, type NavShellTopBar, type NavUser, PillNav, type PillNavProps, PillNavVariant, RAIL_FULL_BREAKPOINT, type RailMode, type ResolveRailModeArgs, type SearchAffordance, type ShellMessage, Sidebar, SidebarChevron, type SidebarChevronProps, type SidebarPaletteTriggerConfig, type SidebarProps, SidebarSearch, type SidebarSearchConfig, type SidebarSearchLabels, type SidebarSearchProps, TabFeedback, Topbar, type TopbarAction, type TopbarProps, type TopbarUser, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|
|
1696
|
+
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, type AccountPlan, type AccountState, AppShell, type AppShellBackdrop, type AppShellBackdropBand, type AppShellProps, type AppShellWidth, BASE_INDENT, BottomTabBar, type BottomTabBarProps, BrandHomeLink, type BrandHomeLinkProps, BrandMark, type BrandMarkProps, type BrandPlacement, CHEVRON_ICON_SIZE, CollapsedRail, type CollapsedRailProps, type CollapsedRailRange, type CommandItem, CommandPalette, type CommandPaletteLabels, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, type DarkModeControlProps, type DarkModeOption, type DarkModeVariant, type DrawerHeader, type DrawerOptions, type DrawerWidth, HOVER_TINT_OPACITY, NAV_BRAND_DEFAULTS, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, type NavBarProps, type NavBrandOptions, NavExpandableItem, type NavExpandableItemProps, NavHoverFeedback, type NavItem, type NavOrientation, NavOverflowMenu, type NavOverflowMenuProps, type NavProps, NavShell, type NavShellCollapsedRail, type NavShellLayout, type NavShellProps, type NavShellSideRail, type NavShellTopBar, type NavUser, PillNav, type PillNavProps, PillNavVariant, RAIL_FULL_BREAKPOINT, type RailMode, type ResolveRailModeArgs, SIDEBAR_WIDTH_PX, type SearchAffordance, type ShellMessage, Sidebar, SidebarChevron, type SidebarChevronProps, type SidebarPaletteTriggerConfig, type SidebarProps, SidebarSearch, type SidebarSearchConfig, type SidebarSearchLabels, type SidebarSearchProps, type SidebarWidth, TabFeedback, Topbar, type TopbarAction, type TopbarProps, type TopbarUser, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,25 @@ interface NavItem {
|
|
|
43
43
|
*/
|
|
44
44
|
exact?: boolean;
|
|
45
45
|
}
|
|
46
|
+
/** Where the shell's brand sits on desktop: the rail top (today) or the top-left of the top bar. */
|
|
47
|
+
type BrandPlacement = 'sidebar' | 'topbar';
|
|
48
|
+
/** Named side-rail widths; `default` is today's 220 px. */
|
|
49
|
+
type SidebarWidth = 'default' | 'sm' | 'md' | 'lg';
|
|
50
|
+
/** What the open phone drawer shows in its header: nothing (today) or the brand. */
|
|
51
|
+
type DrawerHeader = 'none' | 'brand';
|
|
52
|
+
/** Phone drawer width: today's fixed panel or the full screen. */
|
|
53
|
+
type DrawerWidth = 'default' | 'full';
|
|
54
|
+
/** Pixel width of each named side-rail width token. */
|
|
55
|
+
declare const SIDEBAR_WIDTH_PX: Readonly<Record<SidebarWidth, number>>;
|
|
56
|
+
/** Shell brand and drawer options; each is one prop with a default that keeps today's layout. */
|
|
57
|
+
interface NavBrandOptions {
|
|
58
|
+
brandPlacement?: BrandPlacement;
|
|
59
|
+
sidebarWidth?: SidebarWidth;
|
|
60
|
+
drawerHeader?: DrawerHeader;
|
|
61
|
+
drawerWidth?: DrawerWidth;
|
|
62
|
+
}
|
|
63
|
+
/** Defaults of {@link NavBrandOptions}: today's layout. */
|
|
64
|
+
declare const NAV_BRAND_DEFAULTS: Readonly<Required<NavBrandOptions>>;
|
|
46
65
|
|
|
47
66
|
/**
|
|
48
67
|
* Active-route matching for the nav shells.
|
|
@@ -154,8 +173,10 @@ interface SidebarProps {
|
|
|
154
173
|
pathname: string;
|
|
155
174
|
/** Navigation callback — receives a `NavItem.route`. */
|
|
156
175
|
onNavigate: (route: string) => void;
|
|
157
|
-
/** Localized menu title (heading). */
|
|
176
|
+
/** Localized menu title (heading); `null` leaves the slot empty. */
|
|
158
177
|
title: React.ReactNode;
|
|
178
|
+
/** Named rail width (default 220 px). */
|
|
179
|
+
width?: SidebarWidth;
|
|
159
180
|
/** Localized accessibility label for the navigation landmark. */
|
|
160
181
|
regionLabel: string;
|
|
161
182
|
/** a11y hint for a leaf item, given its label. Defaults to the label. */
|
|
@@ -194,7 +215,7 @@ interface SidebarProps {
|
|
|
194
215
|
/** Extra container style overrides. */
|
|
195
216
|
containerStyle?: ViewStyle | ViewStyle[];
|
|
196
217
|
}
|
|
197
|
-
declare const Sidebar: ({ items, pathname, onNavigate, title, regionLabel, navigateHint, expandHint, collapseHint, renderChevron, enableInlineSearch, search, paletteTrigger, searchQuery, onSearchChange, header, footer, containerStyle, }: SidebarProps) => React.ReactElement;
|
|
218
|
+
declare const Sidebar: ({ items, pathname, onNavigate, title, width: railWidth, regionLabel, navigateHint, expandHint, collapseHint, renderChevron, enableInlineSearch, search, paletteTrigger, searchQuery, onSearchChange, header, footer, containerStyle, }: SidebarProps) => React.ReactElement;
|
|
198
219
|
|
|
199
220
|
/**
|
|
200
221
|
* SidebarChevron — the built-in disclosure caret for an expandable sidebar
|
|
@@ -558,6 +579,15 @@ interface DrawerLabels {
|
|
|
558
579
|
/** Accessible hint of the scrim (tap to close). */
|
|
559
580
|
closeHint: string;
|
|
560
581
|
}
|
|
582
|
+
/** Optional drawer options, passed with the labels through `AppShell.mobileMenu`. */
|
|
583
|
+
interface DrawerOptions {
|
|
584
|
+
/** Shown once in the drawer's header row (with a close button). */
|
|
585
|
+
header?: React.ReactNode;
|
|
586
|
+
/** `full` = the whole screen; default = today's 280 px panel. */
|
|
587
|
+
width?: DrawerWidth;
|
|
588
|
+
/** Drawer content in place of the rail's `sidebar` node. */
|
|
589
|
+
sidebar?: React.ReactNode;
|
|
590
|
+
}
|
|
561
591
|
|
|
562
592
|
/**
|
|
563
593
|
* Rail responsive mode — the pure (viewport → which rail face) rule behind
|
|
@@ -679,12 +709,8 @@ interface AppShellProps {
|
|
|
679
709
|
* `{ min: 768, max: 1024 }`. Only consulted when `collapsedSidebar` is supplied.
|
|
680
710
|
*/
|
|
681
711
|
collapsedRailRange?: CollapsedRailRange;
|
|
682
|
-
/**
|
|
683
|
-
|
|
684
|
-
* layout, below the breakpoint): the hamburger's open label/hint and the scrim's
|
|
685
|
-
* close label/hint. Optional — English defaults apply. NO i18n in this package.
|
|
686
|
-
*/
|
|
687
|
-
mobileMenu?: Partial<DrawerLabels>;
|
|
712
|
+
/** Mobile drawer labels (English defaults) plus optional header brand, width and content. */
|
|
713
|
+
mobileMenu?: Partial<DrawerLabels> & DrawerOptions;
|
|
688
714
|
/** Banner slot (e.g. verification-pending). */
|
|
689
715
|
banner?: React.ReactNode;
|
|
690
716
|
/** Content-width policy. Defaults to full-bleed. */
|
|
@@ -845,7 +871,7 @@ interface NavShellSideRail {
|
|
|
845
871
|
* auth gate, state cards, banner, and width policy — passes through untouched.
|
|
846
872
|
*/
|
|
847
873
|
type ForwardedShellProps = Omit<AppShellProps, 'header' | 'sidebar' | 'children'>;
|
|
848
|
-
interface NavShellProps extends ForwardedShellProps {
|
|
874
|
+
interface NavShellProps extends ForwardedShellProps, NavBrandOptions {
|
|
849
875
|
/** Which regions to render: a top bar, a side rail, or both. */
|
|
850
876
|
layout: NavShellLayout;
|
|
851
877
|
/** Current active route/path — drives active highlighting on both regions. */
|
|
@@ -877,7 +903,7 @@ interface NavShellProps extends ForwardedShellProps {
|
|
|
877
903
|
sideRail?: NavShellSideRail;
|
|
878
904
|
children: React.ReactNode;
|
|
879
905
|
}
|
|
880
|
-
declare const NavShell: ({ layout, pathname, onNavigate, regionLabel, navigateHint, topBar, header, sideRail, children, collapsedSidebar: collapsedSidebarProp, collapsedRailRange: collapsedRailRangeProp, ...shellProps }: NavShellProps) => React.ReactElement | null;
|
|
906
|
+
declare const NavShell: ({ layout, pathname, onNavigate, regionLabel, navigateHint, topBar, header, sideRail, children, collapsedSidebar: collapsedSidebarProp, collapsedRailRange: collapsedRailRangeProp, brandPlacement, sidebarWidth, drawerHeader, drawerWidth, mobileMenu, ...shellProps }: NavShellProps) => React.ReactElement | null;
|
|
881
907
|
|
|
882
908
|
/**
|
|
883
909
|
* CollapsedRail — the icon-only vertical rail for the intermediate (tablet) tier
|
|
@@ -1209,8 +1235,10 @@ interface NavExpandableItemProps {
|
|
|
1209
1235
|
*/
|
|
1210
1236
|
renderChevron?: (expanded: boolean, color: string, size: number) => React.ReactNode;
|
|
1211
1237
|
depth?: number;
|
|
1238
|
+
expanded?: boolean;
|
|
1239
|
+
onToggle?: (key: string) => void;
|
|
1212
1240
|
}
|
|
1213
|
-
declare const NavExpandableItem: ({ item, pathname, onNavigate, navigateHint, expandHint, collapseHint, renderChevron, activeRoute, depth, }: NavExpandableItemProps) => React.ReactElement;
|
|
1241
|
+
declare const NavExpandableItem: ({ item, pathname, onNavigate, navigateHint, expandHint, collapseHint, renderChevron, activeRoute, depth, expanded: expandedProp, onToggle, }: NavExpandableItemProps) => React.ReactElement;
|
|
1214
1242
|
|
|
1215
1243
|
/**
|
|
1216
1244
|
* Pure matching logic for the {@link CommandPalette}. Kept framework-free so the
|
|
@@ -1361,7 +1389,6 @@ declare const HOVER_TINT_OPACITY = 0.06;
|
|
|
1361
1389
|
declare const NAV_LINK_GAP = 4;
|
|
1362
1390
|
declare const navStyles: {
|
|
1363
1391
|
sidebarContainer: {
|
|
1364
|
-
width: number;
|
|
1365
1392
|
paddingTop: number;
|
|
1366
1393
|
paddingHorizontal: number;
|
|
1367
1394
|
borderRightWidth: number;
|
|
@@ -1666,4 +1693,4 @@ interface BottomTabBarProps {
|
|
|
1666
1693
|
/** Phone tab bar; `tabFeedback` picks the press feedback, `Default` adds no motion. */
|
|
1667
1694
|
declare const BottomTabBar: ({ items, pathname, onNavigate, tabFeedback, navigateHint, regionLabel, containerStyle, testID, }: BottomTabBarProps) => React.ReactElement;
|
|
1668
1695
|
|
|
1669
|
-
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, type AccountPlan, type AccountState, AppShell, type AppShellBackdrop, type AppShellBackdropBand, type AppShellProps, type AppShellWidth, BASE_INDENT, BottomTabBar, type BottomTabBarProps, BrandHomeLink, type BrandHomeLinkProps, BrandMark, type BrandMarkProps, CHEVRON_ICON_SIZE, CollapsedRail, type CollapsedRailProps, type CollapsedRailRange, type CommandItem, CommandPalette, type CommandPaletteLabels, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, type DarkModeControlProps, type DarkModeOption, type DarkModeVariant, HOVER_TINT_OPACITY, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, type NavBarProps, NavExpandableItem, type NavExpandableItemProps, NavHoverFeedback, type NavItem, type NavOrientation, NavOverflowMenu, type NavOverflowMenuProps, type NavProps, NavShell, type NavShellCollapsedRail, type NavShellLayout, type NavShellProps, type NavShellSideRail, type NavShellTopBar, type NavUser, PillNav, type PillNavProps, PillNavVariant, RAIL_FULL_BREAKPOINT, type RailMode, type ResolveRailModeArgs, type SearchAffordance, type ShellMessage, Sidebar, SidebarChevron, type SidebarChevronProps, type SidebarPaletteTriggerConfig, type SidebarProps, SidebarSearch, type SidebarSearchConfig, type SidebarSearchLabels, type SidebarSearchProps, TabFeedback, Topbar, type TopbarAction, type TopbarProps, type TopbarUser, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|
|
1696
|
+
export { ACTIVE_BORDER_RADIUS, ACTIVE_TINT_OPACITY, APP_SHELL_SUFFIX, type AccountPlan, type AccountState, AppShell, type AppShellBackdrop, type AppShellBackdropBand, type AppShellProps, type AppShellWidth, BASE_INDENT, BottomTabBar, type BottomTabBarProps, BrandHomeLink, type BrandHomeLinkProps, BrandMark, type BrandMarkProps, type BrandPlacement, CHEVRON_ICON_SIZE, CollapsedRail, type CollapsedRailProps, type CollapsedRailRange, type CommandItem, CommandPalette, type CommandPaletteLabels, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerProps, DEFAULT_COLLAPSED_RAIL_MAX, DEFAULT_SEARCH_BREAKPOINT, DarkModeControl, type DarkModeControlProps, type DarkModeOption, type DarkModeVariant, type DrawerHeader, type DrawerOptions, type DrawerWidth, HOVER_TINT_OPACITY, NAV_BRAND_DEFAULTS, NAV_ICON_SIZE, NAV_LINK_GAP, NAV_ROW_RADIUS, NAV_TEST_IDS, Nav, NavBar, type NavBarProps, type NavBrandOptions, NavExpandableItem, type NavExpandableItemProps, NavHoverFeedback, type NavItem, type NavOrientation, NavOverflowMenu, type NavOverflowMenuProps, type NavProps, NavShell, type NavShellCollapsedRail, type NavShellLayout, type NavShellProps, type NavShellSideRail, type NavShellTopBar, type NavUser, PillNav, type PillNavProps, PillNavVariant, RAIL_FULL_BREAKPOINT, type RailMode, type ResolveRailModeArgs, SIDEBAR_WIDTH_PX, type SearchAffordance, type ShellMessage, Sidebar, SidebarChevron, type SidebarChevronProps, type SidebarPaletteTriggerConfig, type SidebarProps, SidebarSearch, type SidebarSearchConfig, type SidebarSearchLabels, type SidebarSearchProps, type SidebarWidth, TabFeedback, Topbar, type TopbarAction, type TopbarProps, type TopbarUser, accessibleNavItems, collapsedRailStyles, darkModeStyles, expandableStyles, filterCommands, filterNavItems, isFilterActive, isRouteActive, navStyles, pillNavStyles, resolveActiveRoute, resolveContentMaxWidth, resolvePillMenuLabel, resolveRailMode, resolveSearchAffordance, roleRoutesToNavItems, searchTokens, useCommandPaletteHotkey, useContentMaxWidth };
|