import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type CarbonPageHeaderContext = { /** * Returns the element holding the tab panels, a setter for the tabs' * `type` and an `unregister` for when the tabs are destroyed, or * `undefined` when another `Tabs` already registered. */ registerTabs: (context: import("../Tabs/Tabs.svelte").CarbonTabsContext) => undefined | { getBody: () => HTMLDivElement | null; setType: (type: "default" | "container") => void; unregister: () => void }; getTabs: () => undefined | import("../Tabs/Tabs.svelte").CarbonTabsContext; }; type $RestProps = SvelteHTMLElements["header"]; type $Props = { /** * Specify the page title. */ title?: string | undefined; /** * Specify short eyebrow text above the title, such as the parent section * or resource type. */ eyebrow?: string | undefined; /** * Specify an icon to render before the eyebrow text. */ eyebrowIcon?: Icon | undefined; /** * Specify the page subtitle. */ subtitle?: string | undefined; /** * Set to `true` to stick the header to the top of its nearest scroll * container while the page scrolls, offset by `stickyOffset`. Reuses * `Box`'s own `position="sticky"` and `top` — see `Box.svelte`. There is * no collapse-on-scroll animation in this version. * @default false */ sticky?: boolean; /** * Set how far from the top of the scroll container a `sticky` header * sticks, such as `"3rem"` to clear a UI Shell `Header`. Numbers `0`–`13` * use the shared layout scale; strings accept any CSS length. * @default 0 */ stickyOffset?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | string; /** * Set the header background using a Carbon layer token. Use `"layer-01"` * to set the header apart from a `"background"` page body. * @default "background" */ fill?: "background" | "layer-01" | "layer-02"; /** * Set to `true` to align the header, and the page body in the default * slot, with a `Grid`: the same max width, centering, and breakpoint * padding as a `Grid`'s container, so the title lines up with a * `Column`'s content. In this mode the body is the grid container, so * place `Row`s in it directly. Set to `"full-width"` to match a * `Grid fullWidth`, which drops the max width. * @default false */ grid?: boolean | "full-width"; /** * Specify the header size. `"sm"` uses a smaller title and tighter * vertical spacing, for nested or detail pages. * @default "default" */ size?: "default" | "sm"; /** * Set to `true` to hide the border below the header. * @default false */ hideDivider?: boolean; /** * Obtain a reference to the rendered `
` element. * @default null */ ref?: null | HTMLElement; /** A `ButtonSet` or `ActionSet` with its `Button`s. */ actions?: (this: void) => void; /** A `Breadcrumb` with its `BreadcrumbItem`s. */ breadcrumb?: (this: void) => void; /** Small actions at the end of the breadcrumb row. */ breadcrumbEnd?: (this: void) => void; /** Longer rich text below the subtitle. */ description?: (this: void) => void; /** Key facts between the title and the tabs, such as a `DescriptionList`, `BigNumber`s, or a `TagSet`. */ meta?: (this: void) => void; /** A `Tabs` with its `Tab`s and `TabContent`s. */ tabs?: (this: void) => void; /** Controls at the end of the tabs row, such as a time range `Dropdown`. */ tabsEnd?: (this: void) => void; /** Rich title content inside the heading. Overrides `title`. */ titleChildren?: (this: void) => void; /** A status `Tag`, indicator, or small actions after the title. */ titleEnd?: (this: void) => void; /** An icon or `UserAvatar` before the title. */ titleStart?: (this: void) => void; /** Page content rendered after the header. `TabContent` placed here pairs with the `Tabs` in the `tabs` slot. */ children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type PageHeaderProps = Omit<$RestProps, keyof $Props> & $Props; export default class PageHeader extends SvelteComponentTyped< PageHeaderProps, Record, { /** Page content rendered after the header. `TabContent` placed here pairs with the `Tabs` in the `tabs` slot. */ default: Record; /** A `ButtonSet` or `ActionSet` with its `Button`s. */ actions: Record; /** A `Breadcrumb` with its `BreadcrumbItem`s. */ breadcrumb: Record; /** Small actions at the end of the breadcrumb row. */ breadcrumbEnd: Record; /** Longer rich text below the subtitle. */ description: Record; /** Key facts between the title and the tabs, such as a `DescriptionList`, `BigNumber`s, or a `TagSet`. */ meta: Record; /** A `Tabs` with its `Tab`s and `TabContent`s. */ tabs: Record; /** Controls at the end of the tabs row, such as a time range `Dropdown`. */ tabsEnd: Record; /** Rich title content inside the heading. Overrides `title`. */ titleChildren: Record; /** A status `Tag`, indicator, or small actions after the title. */ titleEnd: Record; /** An icon or `UserAvatar` before the title. */ titleStart: Record; } > {}