11import type React from 'react'
22import Heading from '../Heading'
3- import type { PageLayoutContentProps , PageLayoutFooterProps , PageLayoutPaneProps } from '../PageLayout'
3+ import type {
4+ PageLayoutContentProps ,
5+ PageLayoutFooterProps ,
6+ PageLayoutHeaderProps ,
7+ PageLayoutPaneProps ,
8+ } from '../PageLayout'
49import { PageLayout } from '../PageLayout'
510
611// ----------------------------------------------------------------------------
@@ -24,6 +29,7 @@ export const Root: React.FC<React.PropsWithChildren<FilteredListLayoutProps>> =
2429 columnGap = "none"
2530 rowGap = "none"
2631 _slotsConfig = { {
32+ header : Header ,
2733 footer : Footer ,
2834 } }
2935 { ...props }
@@ -34,32 +40,44 @@ export const Root: React.FC<React.PropsWithChildren<FilteredListLayoutProps>> =
3440Root . displayName = 'FilteredListLayout'
3541
3642// ----------------------------------------------------------------------------
37- // FilteredListLayout.Sidebar
43+ // FilteredListLayout.Header
44+ //
45+ // Top-of-page header row. Wraps PageLayout.Header. Use for the global page
46+ // header (e.g. breadcrumbs, page-level title). Optional — not all filtered
47+ // list pages need a top header above the sidebar/content split.
48+
49+ export type FilteredListLayoutHeaderProps = PageLayoutHeaderProps
50+
51+ export const Header : React . FC < React . PropsWithChildren < FilteredListLayoutHeaderProps > > = ( {
52+ padding = 'normal' ,
53+ divider = 'line' ,
54+ ...props
55+ } ) => {
56+ // eslint-disable-next-line primer-react/direct-slot-children
57+ return < PageLayout . Header padding = { padding } divider = { divider } { ...props } />
58+ }
59+
60+ Header . displayName = 'FilteredListLayout.Header'
61+
62+ // ----------------------------------------------------------------------------
63+ // FilteredListLayout.Pane
3864//
3965// Wraps PageLayout.Pane with defaults appropriate for a filtered-list sidebar.
4066// Future: hide affordance at the bottom (per epic #2156 DoD).
4167
42- export type FilteredListLayoutSidebarProps = PageLayoutPaneProps
68+ export type FilteredListLayoutPaneProps = PageLayoutPaneProps
4369
44- export const Sidebar : React . FC < React . PropsWithChildren < FilteredListLayoutSidebarProps > > = ( {
70+ export const Pane : React . FC < React . PropsWithChildren < FilteredListLayoutPaneProps > > = ( {
4571 position = 'start' ,
4672 sticky = true ,
4773 padding = 'normal' ,
4874 divider = 'line' ,
4975 ...props
5076} ) => {
51- return (
52- < PageLayout . Pane
53- position = { position }
54- sticky = { sticky }
55- padding = { padding }
56- divider = { divider }
57- { ...props }
58- />
59- )
77+ return < PageLayout . Pane position = { position } sticky = { sticky } padding = { padding } divider = { divider } { ...props } />
6078}
6179
62- Sidebar . displayName = 'FilteredListLayout.Sidebar '
80+ Pane . displayName = 'FilteredListLayout.Pane '
6381
6482// ----------------------------------------------------------------------------
6583// FilteredListLayout.Content
@@ -80,20 +98,20 @@ export const Content: React.FC<React.PropsWithChildren<FilteredListLayoutContent
8098Content . displayName = 'FilteredListLayout.Content'
8199
82100// ----------------------------------------------------------------------------
83- // FilteredListLayout.Header
101+ // FilteredListLayout.ViewHeader
84102//
85- // Lives inside FilteredListLayout.Content as the top row: page title on the
103+ // Lives inside FilteredListLayout.Content as the top row: view title on the
86104// left, primary action(s) on the right. Mirrors the Application template
87- // pattern from github-ui (title is an h2 inside the content region, not the
88- // global page title — that's PageLayout.Header territory and not used here ).
105+ // pattern from github-ui (title is an h2 inside the content region, distinct
106+ // from the global page header above ).
89107
90- export type FilteredListLayoutHeaderProps = {
108+ export type FilteredListLayoutViewHeaderProps = {
91109 title : React . ReactNode
92110 actions ?: React . ReactNode
93111 className ?: string
94112}
95113
96- export const Header : React . FC < FilteredListLayoutHeaderProps > = ( { title, actions, className} ) => {
114+ export const ViewHeader : React . FC < FilteredListLayoutViewHeaderProps > = ( { title, actions, className} ) => {
97115 return (
98116 < div
99117 className = { className }
@@ -115,7 +133,7 @@ export const Header: React.FC<FilteredListLayoutHeaderProps> = ({title, actions,
115133 )
116134}
117135
118- Header . displayName = 'FilteredListLayout.Header '
136+ ViewHeader . displayName = 'FilteredListLayout.ViewHeader '
119137
120138// ----------------------------------------------------------------------------
121139// FilteredListLayout.FilterBar
@@ -182,9 +200,10 @@ Footer.displayName = 'FilteredListLayout.Footer'
182200// Export
183201
184202export const FilteredListLayout = Object . assign ( Root , {
185- Sidebar,
186- Content,
187203 Header,
204+ Pane,
205+ Content,
206+ ViewHeader,
188207 FilterBar,
189208 Results,
190209 Footer,
0 commit comments