{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "page-header",
  "type": "registry:ui",
  "title": "<ui-page-header>",
  "description": "Carbon `PageHeader` (Carbon for IBM Products `c4p-page-header`): the top of a page — a 40px breadcrumb bar (`<ui-page-header-breadcrumb>`), the content (`<ui-page-header-content>`: heading-04 title, icon, contextual and page actions, `<ui-page-header-content-text>`), and a tab bar (`<ui-page-header-tabs>`), on layer-01 with a line below. It sticks as the page scrolls: the content slides under the breadcrumb bar, which stays (as do the tabs); once the title has gone its `<ui-page-header-title-breadcrumb>` appears in the trail, and the content's page actions give way to the bar's `slot=\"content-actions\"`. `<ui-page-header-scroller>` collapses / expands it. Copied from @purpurabog/ui 2.3.0; the package is the maintained source, this copy is yours to change. Icons from the Carbon Design System (Apache-2.0, © IBM Corp.; see THIRD-PARTY-NOTICES.md in the package).",
  "dependencies": [
    "lit@^3.3.0"
  ],
  "registryDependencies": [
    "@kanok-ui/breadcrumb",
    "@kanok-ui/button",
    "@kanok-ui/core-overflow",
    "@kanok-ui/icon-button",
    "@kanok-ui/menu",
    "@kanok-ui/modal",
    "@kanok-ui/overflow-menu",
    "@kanok-ui/popover",
    "@kanok-ui/search",
    "@kanok-ui/shared-element",
    "@kanok-ui/shared-events",
    "@kanok-ui/shared-field",
    "@kanok-ui/shared-localize",
    "@kanok-ui/tag",
    "@kanok-ui/truncated-text",
    "@kanok-ui/tokens"
  ],
  "files": [
    {
      "path": "src/primitives/page-header/page-header-actions.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-actions.ts",
      "content": "import { css, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { LocalizeController } from '../shared/localize.ts';\nimport { visibleCount } from '../../core/overflow.ts';\nimport { OverflowSet, naturalWidth } from './page-header-overflow-shared.ts';\nimport '../overflow-menu/overflow-menu.ts';\nimport '../menu/menu.ts';\nimport '../button/button.ts';\n\n/** An action's name in the menu: its `label`, else its text. */\nfunction actionLabel(action: Element, index: number) {\n    return action.getAttribute('label') || action.textContent?.trim() || `Action ${index + 1}`;\n}\n\n/**\n * Carbon for IBM Products `PageHeaderActionsSet`: the page's buttons side by side; those that don't fit — from the\n * end — go into a \"⋮\" overflow menu (48px kept for it, as Carbon), choosing one clicks its button. Put it in\n * `<ui-page-header-breadcrumb>`'s or `<ui-page-header-content>`'s `page-actions` slot.\n *\n * @slot - The buttons (`<ui-icon-button>`s, `<ui-button>`s), in order; each one's `label` (else its text) names it in the menu\n * @csspart overflow - The overflow menu\n */\n@customElement('ui-page-header-actions')\nexport class UiPageHeaderActions extends OverflowSet {\n    static override readonly styles = css`\n        :host {\n            display: flex;\n            flex: 1 1 auto;\n            align-items: center;\n            min-inline-size: 0;\n            max-inline-size: 100%;\n        }\n\n        ::slotted(*) {\n            flex-shrink: 0;\n        }\n\n        ::slotted([data-hidden]) {\n            display: none !important;\n        }\n\n        /* Carbon: the buttons from the start, the menu at the end */\n        ui-overflow-menu {\n            flex-shrink: 0;\n            margin-inline-start: auto;\n        }\n\n        ui-overflow-menu[hidden] {\n            display: none;\n        }\n    `;\n\n    /** The overflow menu's name (default: the translation's \"More actions\"). */\n    @property({ attribute: 'overflow-label' }) overflowLabel = '';\n\n    @state() private collapsed: HTMLElement[] = [];\n\n    private readonly localize = new LocalizeController(this);\n\n    /** Which buttons fit (core/overflow, as Carbon's handler): measured with all of them shown, 48px kept for the menu. */\n    protected measure() {\n        const actions = [...this.children].filter((el): el is HTMLElement => el instanceof HTMLElement);\n        for (const action of actions) delete action.dataset.hidden;\n        const sizes = actions.map(naturalWidth);\n        const count = visibleCount({ container: this.clientWidth, sizes, offset: 48, keepFirst: false });\n        const hidden = actions.filter((action, index) => {\n            action.toggleAttribute('data-hidden', index >= count);\n            return index >= count;\n        });\n        if (hidden.length !== this.collapsed.length || hidden.some((action, i) => action !== this.collapsed[i])) this.collapsed = hidden;\n    }\n\n    private readonly onPick = (event: CustomEvent<{ value: string }>) => {\n        this.collapsed[Number(event.detail.value)]?.click();\n    };\n\n    override render() {\n        return html`<slot @slotchange=${this.schedule}></slot>\n            <ui-overflow-menu part=\"overflow\" size=\"md\" placement=\"bottom-end\" label=${this.overflowLabel || this.localize.t.common.moreActions} ?hidden=${this.collapsed.length === 0} @ui-select=${this.onPick}>\n                ${this.collapsed.map((action, index) => html`<ui-menu-item label=${actionLabel(action, index)} value=${String(index)}></ui-menu-item>`)}\n            </ui-overflow-menu>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header-actions': UiPageHeaderActions;\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-breadcrumb.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-breadcrumb.ts",
      "content": "import { css, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { defaultTrue } from '../shared/field.ts';\nimport { LocalizeController } from '../shared/localize.ts';\nimport { PageHeaderPart, rowStyles } from './page-header-shared.ts';\n\n/**\n * The page header's 40px breadcrumb bar: `slot=\"icon\"` (16px), the trail (a `<ui-breadcrumb>`), and at the end a\n * toolbar with `slot=\"content-actions\"` (shown once the content's page actions have scrolled away) and\n * `slot=\"page-actions\"` (always). It sticks while the content scrolls under it. `border` (default) draws its line.\n *\n * @slot - The breadcrumb trail\n * @slot icon - A 16px icon before the trail\n * @slot content-actions - The content's page actions again, for when they have scrolled away\n * @slot page-actions - Actions for the whole page (e.g. ghost icon buttons)\n */\n@customElement('ui-page-header-breadcrumb')\nexport class UiPageHeaderBreadcrumb extends PageHeaderPart {\n    static override readonly styles = [\n        rowStyles,\n        css`\n            :host {\n                position: sticky;\n                z-index: 2;\n                inset-block-start: var(--ui-page-header-bar-top, 0px);\n                display: block;\n                box-sizing: border-box;\n                block-size: 40px;\n                background-color: var(--ui-layer-1);\n            }\n\n            :host([border]) {\n                border-block-end: 1px solid var(--ui-border-subtle-2);\n            }\n\n            .container {\n                display: flex;\n                align-items: center;\n                justify-content: space-between;\n                block-size: 100%;\n                gap: var(--ui-space-xs);\n                min-inline-size: 0;\n            }\n\n            .trail {\n                display: flex;\n                flex: 1 1 75%;\n                align-items: center;\n                min-inline-size: 0;\n            }\n\n            ::slotted([slot='icon']) {\n                flex: none;\n                margin-inline-end: var(--ui-space-xs);\n            }\n\n            /* one line: the title crumb shrinks with an ellipsis instead of wrapping */\n            ::slotted(ui-breadcrumb) {\n                --ui-breadcrumb-wrap: nowrap;\n\n                flex: 1 1 0%;\n                min-inline-size: 0;\n            }\n\n            .actions {\n                display: flex;\n                flex: 0 1 25%;\n                align-items: center;\n                justify-content: flex-end;\n                gap: var(--ui-space-xs);\n                max-inline-size: 25%;\n                min-inline-size: 0;\n            }\n\n            @media (min-width: 42rem) {\n                .trail {\n                    flex: 1 1 auto;\n                    max-inline-size: 60%;\n                }\n\n                .actions {\n                    flex: 0 0 auto;\n                    max-inline-size: none;\n                }\n\n                :host(:not([content-actions-flush])) ::slotted([slot='content-actions']) {\n                    margin-inline-end: var(--ui-space-sm);\n                }\n            }\n\n            /* side by side, as Carbon's actions set; a <ui-page-header-actions> in it shrinks into its overflow menu */\n            .page-actions {\n                display: flex;\n                flex: 1 1 auto;\n                align-items: center;\n                justify-content: flex-end;\n                min-inline-size: 0;\n            }\n\n            .content-actions {\n                display: none;\n                min-inline-size: 0;\n                overflow: hidden;\n            }\n\n            @media (min-width: 42rem) {\n                .content-actions {\n                    display: flex;\n                    visibility: hidden;\n                    opacity: 0;\n                }\n\n                .content-actions.show {\n                    visibility: visible;\n                    opacity: 1;\n                    transition: opacity var(--ui-duration-moderate-01) var(--ui-easing);\n                }\n            }\n\n            :host([page-actions-flush]) .row {\n                padding-inline-end: 0;\n            }\n        `,\n    ];\n\n    /** The line under the bar. */\n    @property({ reflect: true, converter: defaultTrue }) border = true;\n\n    /** The page actions reach the screen's edge. */\n    @property({ type: Boolean, reflect: true, attribute: 'page-actions-flush' }) pageActionsFlush = false;\n\n    /** No 12px gap after the content actions. */\n    @property({ type: Boolean, reflect: true, attribute: 'content-actions-flush' }) contentActionsFlush = false;\n\n    /** The toolbar's name (default \"Page header actions\", translated). */\n    @property({ attribute: 'actions-aria-label' }) actionsAriaLabel = '';\n\n    private readonly localize = new LocalizeController(this);\n\n    override render() {\n        return html`<div class=${classMap(this.rowClasses)}>\n            <div class=\"container\">\n                <div class=\"trail\"><slot name=\"icon\"></slot><slot></slot></div>\n                <div class=\"actions\" role=\"toolbar\" aria-label=${this.actionsAriaLabel || this.localize.t.common.pageHeaderActions}>\n                    <div class=${classMap({ 'content-actions': true, show: this.state.contentActionsClipped })}><slot name=\"content-actions\"></slot></div>\n                    <div class=\"page-actions\"><slot name=\"page-actions\"></slot></div>\n                </div>\n            </div>\n        </div>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header-breadcrumb': UiPageHeaderBreadcrumb;\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-content-text.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-content-text.ts",
      "content": "import { css, nothing, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { html as staticHtml } from 'lit/static-html.js';\nimport { UiElement } from '../shared/element.ts';\nimport { headingTag } from './page-header-shared.ts';\n\n/**\n * The page header's text under the title: an optional `subtitle` (heading-03, 8px above the text), then body-01\n * text at most 640px wide, 24px above the header's end.\n *\n * @slot - The text\n * @csspart subtitle - The subtitle heading\n */\n@customElement('ui-page-header-content-text')\nexport class UiPageHeaderContentText extends UiElement {\n    static override readonly styles = css`\n        :host {\n            display: block;\n            max-inline-size: 640px;\n            padding-block-end: var(--ui-space-lg);\n            font: var(--ui-font-body-01);\n            letter-spacing: var(--ui-tracking-body);\n        }\n\n        .subtitle {\n            margin: 0 0 var(--ui-space-xs);\n            font: var(--ui-font-heading-03);\n            letter-spacing: normal;\n        }\n    `;\n\n    @property() subtitle = '';\n\n    /** The subtitle's element (h1 … h6). */\n    @property({ attribute: 'subtitle-level' }) subtitleLevel = 'h2';\n\n    override render() {\n        const tag = headingTag(this.subtitleLevel, 'h2');\n        const subtitle = this.subtitle ? staticHtml`<${tag} class=\"subtitle\" part=\"subtitle\">${this.subtitle}</${tag}>` : nothing;\n        return html`${subtitle}<slot></slot>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header-content-text': UiPageHeaderContentText;\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-content.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-content.ts",
      "content": "import { css, nothing, html } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html as staticHtml } from 'lit/static-html.js';\nimport { PageHeaderPart, rowStyles, headingTag } from './page-header-shared.ts';\nimport '../truncated-text/truncated-text.ts';\n\n/**\n * The page header's content, 48px under the bar: `slot=\"icon\"` (32px), the title (heading-04, at most 640px and two\n * lines — one beside contextual actions — the whole title in a tooltip when cut), `slot=\"contextual-actions\"`\n * (e.g. a tag) after it, `slot=\"page-actions\"` at the end (fading out once they have scrolled under the bar), then the\n * default slot (a `<ui-page-header-content-text>`).\n *\n * @slot - What follows the title (a `<ui-page-header-content-text>`)\n * @slot icon - An icon before the title\n * @slot title - Rich title instead of `heading`\n * @slot contextual-actions - Next to the title\n * @slot page-actions - At the end of the title row\n * @csspart title - The title heading\n */\n@customElement('ui-page-header-content')\nexport class UiPageHeaderContent extends PageHeaderPart {\n    static override readonly styles = [\n        rowStyles,\n        css`\n            :host {\n                display: block;\n                padding-block-start: var(--ui-space-xxl);\n            }\n\n            .title-wrapper {\n                display: flex;\n                flex-direction: column;\n                gap: var(--ui-space-md);\n                min-block-size: 40px;\n                margin-block-end: var(--ui-space-md);\n            }\n\n            @media (min-width: 42rem) {\n                .title-wrapper {\n                    display: grid;\n                    grid-template-columns: auto minmax(auto, auto);\n                }\n            }\n\n            .start {\n                display: flex;\n                flex-wrap: wrap;\n                gap: var(--ui-space-md);\n            }\n\n            .title-container {\n                display: flex;\n            }\n\n            ::slotted([slot='icon']) {\n                flex: none;\n                margin-inline-end: var(--ui-space-md);\n            }\n\n            .title {\n                max-inline-size: 640px;\n                margin: 0;\n                font: var(--ui-font-heading-04);\n            }\n\n            ::slotted([slot='contextual-actions']) {\n                display: flex;\n                align-items: center;\n            }\n\n            .page-actions {\n                display: flex;\n                justify-self: end;\n                transition: opacity var(--ui-duration-moderate-02) var(--ui-easing);\n            }\n\n            .page-actions.clipped {\n                visibility: hidden;\n                opacity: 0;\n            }\n\n            @media (max-width: 41.98rem) {\n                .page-actions {\n                    justify-content: start;\n                }\n            }\n        `,\n    ];\n\n    /** The page's title (Carbon `title`, which would also be the element's native tooltip). */\n    @property() heading = '';\n\n    /** The title's element (h1 … h6). */\n    @property({ attribute: 'heading-level' }) headingLevel = 'h1';\n\n    @state() private hasContextualActions = false;\n    @state() private hasTitleSlot = false;\n\n    @query('.title') readonly titleElement?: HTMLElement;\n\n    private readonly onTitleSlotChange = (event: Event) => {\n        this.hasTitleSlot = (event.target as HTMLSlotElement).assignedNodes().length > 0;\n    };\n\n    private renderTitle() {\n        const tag = headingTag(this.headingLevel, 'h1');\n        const lines = this.hasContextualActions ? 1 : 2;\n        const text = this.hasTitleSlot ? nothing : html`<ui-truncated-text value=${this.heading} lines=${lines} placement=\"bottom\"></ui-truncated-text>`;\n        return staticHtml`<${tag} class=\"title\" part=\"title\">${text}<slot name=\"title\" @slotchange=${this.onTitleSlotChange}></slot></${tag}>`;\n    }\n\n    override render() {\n        return html`<div class=${classMap(this.rowClasses)}>\n            <div class=\"title-wrapper\">\n                <div class=\"start\">\n                    <div class=\"title-container\"><slot name=\"icon\"></slot>${this.renderTitle()}</div>\n                    <slot name=\"contextual-actions\" @slotchange=${(e: Event) => (this.hasContextualActions = (e.target as HTMLSlotElement).assignedNodes().length > 0)}></slot>\n                </div>\n                <div class=${classMap({ 'page-actions': true, clipped: this.state.contentActionsClipped })}><slot name=\"page-actions\"></slot></div>\n            </div>\n            <slot></slot>\n        </div>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header-content': UiPageHeaderContent;\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-hero-image.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-hero-image.ts",
      "content": "import { css, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { UiElement } from '../shared/element.ts';\n\n/**\n * A hero image beside the page header's content: 3:2, 2:1 from lg; the slotted `<img>` covers it (`object-fit`).\n *\n * @slot - The `<img>` (or `<picture>`)\n */\n@customElement('ui-page-header-hero-image')\nexport class UiPageHeaderHeroImage extends UiElement {\n    static override readonly styles = css`\n        :host {\n            display: block;\n            overflow: hidden;\n            aspect-ratio: 3 / 2;\n        }\n\n        @media (min-width: 66rem) {\n            :host {\n                aspect-ratio: 2 / 1;\n            }\n        }\n\n        ::slotted(img),\n        ::slotted(picture) {\n            display: block;\n            inline-size: 100%;\n            block-size: 100%;\n            object-fit: var(--_fit, cover);\n            object-position: center;\n        }\n    `;\n\n    @property({ reflect: true, attribute: 'object-fit' }) objectFit: 'cover' | 'contain' = 'cover';\n\n    override render() {\n        return html`<slot style=\"--_fit: ${this.objectFit === 'contain' ? 'contain' : 'cover'}\"></slot>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header-hero-image': UiPageHeaderHeroImage;\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-overflow-shared.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-overflow-shared.ts",
      "content": "import { UiElement } from '../shared/element.ts';\n\n/** Measure an element at its natural width, every item shown. */\nexport function naturalWidth(el: HTMLElement) {\n    const shrink = el.style.flexShrink;\n    el.style.flexShrink = '0';\n    const width = el.getBoundingClientRect().width;\n    el.style.flexShrink = shrink;\n    return width;\n}\n\n/**\n * What the overflow sets share: measured in the next frame after every resize (as Carbon's handler) and when told to.\n */\nexport abstract class OverflowSet extends UiElement {\n    private observer?: ResizeObserver;\n    private frame = 0;\n\n    override connectedCallback() {\n        super.connectedCallback();\n        this.observer = new ResizeObserver(this.schedule);\n        this.observer.observe(this);\n    }\n\n    override disconnectedCallback() {\n        super.disconnectedCallback();\n        this.observer?.disconnect();\n        cancelAnimationFrame(this.frame);\n    }\n\n    protected readonly schedule = () => {\n        cancelAnimationFrame(this.frame);\n        this.frame = requestAnimationFrame(() => this.measure());\n    };\n\n    /** Which items fit; the rest go into the overflow. */\n    protected abstract measure(): void;\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-overflow.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-overflow.ts",
      "content": "// One element per file in this folder; this module is the entry point (package export, React wrappers, index).\nexport * from './page-header-actions.ts';\nexport * from './page-header-tags.ts';\n"
    },
    {
      "path": "src/primitives/page-header/page-header-scroller.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-scroller.ts",
      "content": "import { html, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { LocalizeController } from '../shared/localize.ts';\nimport { PageHeaderPart, scrollParent } from './page-header-shared.ts';\nimport '../icon-button/icon-button.ts';\n\nconst chevronUp = html`<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M8 5 13 10 12.3 10.7 8 6.4 3.7 10.7 3 10z\" /></svg>`;\n\n/**\n * The page header's collapse / expand button (Carbon `PageHeaderScrollButton`): a ghost 40px icon button with a\n * chevron; it scrolls the page so the content is just under the breadcrumb bar, or back to the top. Its name and\n * tooltip say which (\"Collapse\" / \"Expand\", translated).\n */\n@customElement('ui-page-header-scroller')\nexport class UiPageHeaderScroller extends PageHeaderPart {\n    static override readonly styles = css`\n        :host {\n            display: inline-flex;\n        }\n\n        /* Carbon .cds--page-header--scroller-button-icon: $transition-base (250ms, no token) with the browser's ease */\n        svg {\n            transition: transform 250ms;\n        }\n\n        .collapsed svg {\n            transform: rotate(180deg);\n        }\n\n        @media (prefers-reduced-motion: reduce) {\n            svg {\n                transition: none;\n            }\n        }\n    `;\n\n    @property({ attribute: 'collapse-text' }) collapseText = '';\n\n    @property({ attribute: 'expand-text' }) expandText = '';\n\n    private readonly localize = new LocalizeController(this);\n\n    private onClick() {\n        const content = this.header?.querySelector<HTMLElement>('ui-page-header-content');\n        if (!content) return;\n        const target = scrollParent(content);\n        target.scrollTo({ top: this.state.fullyCollapsed ? 0 : content.offsetHeight, behavior: 'smooth' });\n    }\n\n    override render() {\n        const collapsed = this.state.fullyCollapsed;\n        const { collapse, expand } = this.localize.t.common;\n        const label = collapsed ? this.expandText || expand : this.collapseText || collapse;\n        return html`<ui-icon-button class=${classMap({ collapsed })} kind=\"ghost\" size=\"md\" label=${label} tooltip-placement=\"top\" @click=${this.onClick}>${chevronUp}</ui-icon-button>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header-scroller': UiPageHeaderScroller;\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-shared.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-shared.ts",
      "content": "import { css } from 'lit';\nimport { unsafeStatic } from 'lit/static-html.js';\nimport { UiElement } from '../shared/element.ts';\nimport type { UiPageHeader } from './page-header.ts';\n\n/** What the page header's parts share: how far the header has scrolled away, and the grid they line up on. */\nexport interface PageHeaderState {\n    /** The content has scrolled under the breadcrumb bar. */\n    fullyCollapsed: boolean;\n    /** The title has scrolled under the breadcrumb bar (its crumb shows). */\n    titleClipped: boolean;\n    /** The content's page actions have scrolled under the bar (the bar's content actions show). */\n    contentActionsClipped: boolean;\n    /** There is a `<ui-page-header-content>`. */\n    withContent: boolean;\n    fullWidthGrid: boolean;\n    narrowGrid: boolean;\n}\n\nexport const HEADINGS = new Set(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']);\n\nexport const headingTag = (level: string, fallback: string) => unsafeStatic(HEADINGS.has(level) ? level : fallback);\n\n/** The scrolling box `el` sits in: an ancestor that scrolls, else the document. */\nexport function scrollParent(el: Element): Element {\n    for (let node = el.parentElement; node; node = node.parentElement) {\n        if (node === document.body || node === document.documentElement) break;\n        if (/(auto|scroll)/.test(getComputedStyle(node).overflowY)) return node;\n    }\n    return document.scrollingElement ?? document.documentElement;\n}\n\n/**\n * Carbon's 2x grid as the page header uses it: one full-width column, 1584px at most and centred, with the grid\n * margin (0 / 16px from md / 24px from max) and half a gutter; `narrow` hangs the text on the margin, `full-width`\n * drops the 1584px cap.\n */\nexport const rowStyles = css`\n    .row {\n        --_m: 0px;\n\n        box-sizing: border-box;\n        inline-size: 100%;\n        max-inline-size: 1584px;\n        margin-inline: auto;\n        padding-inline: calc(var(--_m) + 16px);\n    }\n\n    @media (min-width: 42rem) {\n        .row {\n            --_m: 16px;\n        }\n    }\n\n    @media (min-width: 99rem) {\n        .row {\n            --_m: 24px;\n        }\n    }\n\n    .row.narrow {\n        padding-inline-start: var(--_m);\n    }\n\n    .row.full-width {\n        max-inline-size: none;\n    }\n`;\n\n/** A part of a page header: finds its `<ui-page-header>` and re-renders when the header's state changes. */\nexport class PageHeaderPart extends UiElement {\n    protected header: UiPageHeader | null = null;\n\n    override connectedCallback() {\n        super.connectedCallback();\n        this.header = this.closest('ui-page-header');\n        this.header?.addEventListener('ui-page-header-state', this.onState);\n    }\n\n    override disconnectedCallback() {\n        super.disconnectedCallback();\n        this.header?.removeEventListener('ui-page-header-state', this.onState);\n        this.header = null;\n    }\n\n    private readonly onState = () => this.requestUpdate();\n\n    protected get state(): PageHeaderState {\n        return this.header?.state ?? { fullyCollapsed: false, titleClipped: false, contentActionsClipped: false, withContent: false, fullWidthGrid: false, narrowGrid: false };\n    }\n\n    protected get rowClasses() {\n        return { row: true, narrow: this.state.narrowGrid, 'full-width': this.state.fullWidthGrid };\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-tabs.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-tabs.ts",
      "content": "import { css, html, type PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { PageHeaderPart, rowStyles } from './page-header-shared.ts';\n\n/**\n * The page header's tab bar: a `<ui-tabs>` on the grid, `slot=\"tags\"` at its end (40%), `slot=\"scroller\"` (a\n * `<ui-page-header-scroller>`). It sticks under the breadcrumb bar; `disable-sticky-tab-bar` lets the header scroll\n * away and fixes the breadcrumb bar instead.\n *\n * @slot - The tabs\n * @slot tags - Tags at the end\n * @slot scroller - The collapse / expand button\n */\n@customElement('ui-page-header-tabs')\nexport class UiPageHeaderTabs extends PageHeaderPart {\n    static override readonly styles = [\n        rowStyles,\n        css`\n            :host {\n                position: sticky;\n                z-index: 1;\n                inset-block-start: var(--ui-page-header-bar-top, 0px);\n                display: block;\n                background-color: var(--ui-layer-1);\n            }\n\n            :host([disable-sticky-tab-bar]) {\n                position: static;\n            }\n\n            .bar {\n                display: flex;\n                align-items: center;\n            }\n\n            .row {\n                padding-inline: var(--_m);\n            }\n\n            .tablist {\n                display: flex;\n                flex: 1;\n                align-items: center;\n                min-inline-size: 0;\n            }\n\n            ::slotted(:not([slot])) {\n                flex: 1 1 auto;\n                min-inline-size: 0;\n            }\n\n            ::slotted([slot='tags']) {\n                display: inline-flex;\n                align-items: center;\n                justify-content: flex-end;\n                inline-size: 40%;\n                min-inline-size: 0;\n                margin-inline-start: auto;\n            }\n        `,\n    ];\n\n    @property({ type: Boolean, reflect: true, attribute: 'disable-sticky-tab-bar' }) disableStickyTabBar = false;\n\n    protected override updated(changed: PropertyValues<this>) {\n        super.updated(changed);\n        if (changed.has('disableStickyTabBar')) this.header?.setStatic(this.disableStickyTabBar);\n    }\n\n    override render() {\n        return html`<div class=\"bar\">\n            <div class=${classMap(this.rowClasses)}><div class=\"tablist\"><slot></slot><slot name=\"tags\"></slot></div></div>\n            <slot name=\"scroller\"></slot>\n        </div>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header-tabs': UiPageHeaderTabs;\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-tags.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-tags.ts",
      "content": "import { css, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport { LocalizeController } from '../shared/localize.ts';\nimport { srOnlyStyles } from '../shared/field.ts';\nimport { visibleCount } from '../../core/overflow.ts';\nimport type { TagType, TagSize } from '../tag/tag.ts';\nimport { OverflowSet, naturalWidth } from './page-header-overflow-shared.ts';\nimport '../tag/tag.ts';\nimport '../popover/popover.ts';\nimport '../button/button.ts';\nimport '../modal/modal.ts';\nimport '../search/search.ts';\nimport { isOwnEvent } from '../shared/events.ts';\n\n/** A tag of `<ui-page-header-tags>` (Carbon `tagsData`). */\nexport interface PageHeaderTag {\n    text: string;\n    type?: TagType;\n    size?: TagSize;\n    /** With a close button; dismissing it removes it and fires `ui-tag-dismiss`. */\n    dismissible?: boolean;\n    /** Kept for you (e.g. a record's id), handed back with `ui-tag-dismiss`. */\n    id?: string;\n}\n\n/** At most this many hidden tags in the popover; more, and a \"View all tags\" button opens them all in a modal. */\nconst POPOVER_TAGS = 10;\n\n/**\n * Carbon for IBM Products `PageHeaderTagsSet`: the page's tags on one line, at the end; those that don't fit — from the\n * end — make a \"+N\" operational tag that opens them in a high-contrast popover (ten at most: past ten, \"View all tags\"\n * opens a small modal of them all, with a search). Dismissible tags can be dismissed from any of the three. \"N more\n * tags\" is announced. Put it in `<ui-page-header-tabs>`'s `tags` slot (or the content's `contextual-actions`).\n *\n * @fires ui-tag-dismiss - detail: { tag, index } after a dismissible tag was dismissed (it is already gone from `tags`)\n * @csspart more - The \"+N\" tag\n * @csspart popover - The popover of hidden tags\n * @csspart modal - The \"All tags\" modal\n */\n@customElement('ui-page-header-tags')\nexport class UiPageHeaderTags extends OverflowSet {\n    static override readonly styles = [\n        srOnlyStyles,\n        css`\n            :host {\n                display: flex;\n                justify-content: flex-end;\n                min-inline-size: 0;\n                inline-size: 100%;\n            }\n\n            .tags {\n                display: flex;\n                align-items: center;\n                justify-content: flex-end;\n                gap: var(--ui-space-xs);\n                inline-size: 100%;\n                min-inline-size: 0;\n                white-space: nowrap;\n            }\n\n            .tags > ui-tag {\n                flex-shrink: 0;\n            }\n\n            [data-hidden],\n            .more[hidden] {\n                display: none;\n            }\n\n            .more {\n                flex-shrink: 0;\n            }\n\n            /* Carbon: the hidden tags one under the other, 4px apart, 16px in */\n            .list {\n                display: flex;\n                flex-direction: column;\n                gap: var(--ui-space-xxs);\n                padding: var(--ui-space-md);\n            }\n\n            /* Carbon: each hidden tag as wide as the popover, its text centred in label-02 (14px) */\n            .list > ui-tag {\n                display: flex;\n                margin: 0;\n            }\n\n            .list > ui-tag::part(base) {\n                justify-content: center;\n                inline-size: 100%;\n                max-inline-size: none;\n                font: var(--ui-font-body-sm);\n                line-height: 18px; /* label-02: 14 × 1.28572 */\n                letter-spacing: var(--ui-tracking-body);\n            }\n\n            /* on the high-contrast box: the inverse link colour */\n            .view-all {\n                --ui-link: var(--ui-link-inverse);\n                --ui-blue-60: var(--ui-link-inverse); /* the ghost button's hover text */\n\n                display: block;\n                margin-block-start: var(--ui-space-xs);\n            }\n\n            .search {\n                display: block;\n                margin-block-end: var(--ui-space-md);\n            }\n\n            .all {\n                display: flex;\n                flex-wrap: wrap;\n                gap: var(--ui-space-xxs) var(--ui-space-xs);\n            }\n        `,\n    ];\n\n    /** The tags, in order (Carbon `tags-data`; JSON as an attribute). */\n    @property({ type: Array }) tags: PageHeaderTag[] = [];\n\n    /** How many lead tags fit; the rest are behind \"+N\". */\n    @state() private shown = Number.POSITIVE_INFINITY;\n    @state() private popoverOpen = false;\n    @state() private modalOpen = false;\n    @state() private search = '';\n\n    private readonly localize = new LocalizeController(this);\n\n    protected override updated(changed: Map<string, unknown>) {\n        if (changed.has('tags')) this.schedule();\n    }\n\n    private get hiddenTags() {\n        return this.tags.slice(this.shown);\n    }\n\n    /** Which tags fit beside \"+N\" (core/overflow, as Carbon's handler; every tag can go). */\n    protected measure() {\n        const row = this.renderRoot.querySelector<HTMLElement>('.tags');\n        const more = this.renderRoot.querySelector<HTMLElement>('.more');\n        if (!row || !more) return;\n        const items = [...row.querySelectorAll<HTMLElement>(':scope > ui-tag')];\n        const gap = 8;\n        for (const item of items) delete item.dataset.hidden;\n        const wasHidden = more.hidden;\n        more.hidden = false;\n        const sizes = items.map((item) => naturalWidth(item) + gap);\n        const offset = naturalWidth(more) + gap;\n        more.hidden = wasHidden;\n        const count = visibleCount({ container: row.clientWidth, sizes, offset, gap, keepFirst: false });\n        items.forEach((item, index) => { item.toggleAttribute('data-hidden', index >= count); });\n        this.shown = count;\n    }\n\n    private dismiss(tag: PageHeaderTag) {\n        const index = this.tags.indexOf(tag);\n        if (index < 0) return;\n        this.tags = this.tags.filter((t) => t !== tag);\n        if (this.hiddenTags.length === 0) this.popoverOpen = false;\n        this.dispatchEvent(new CustomEvent('ui-tag-dismiss', { detail: { tag, index }, bubbles: true, composed: true }));\n    }\n\n    private renderTag(tag: PageHeaderTag) {\n        return html`<ui-tag type=${tag.type ?? 'gray'} size=${tag.size ?? 'md'} ?dismissible=${!!tag.dismissible} @ui-dismiss=${() => this.dismiss(tag)}>${tag.text}</ui-tag>`;\n    }\n\n    private renderPopover(hidden: PageHeaderTag[], more: string) {\n        return html`<ui-popover\n            class=\"more\"\n            part=\"popover\"\n            high-contrast\n            auto-close\n            placement=\"bottom-end\"\n            ?hidden=${hidden.length === 0}\n            ?open=${this.popoverOpen}\n            @ui-toggle=${(e: CustomEvent<{ open: boolean }>) => { if (isOwnEvent(e)) this.popoverOpen = e.detail.open; }}\n        >\n            <ui-tag slot=\"trigger\" part=\"more\" operational size=${this.tags[0]?.size ?? 'md'} label=${more} .expanded=${this.popoverOpen} @click=${() => (this.popoverOpen = !this.popoverOpen)}>+${hidden.length}</ui-tag>\n            <div class=\"list\">\n                ${hidden.slice(0, POPOVER_TAGS).map((tag) => this.renderTag(tag))}\n                ${hidden.length > POPOVER_TAGS\n                    ? html`<ui-button class=\"view-all\" kind=\"ghost\" size=\"sm\" @click=${this.openModal}>${this.localize.t.common.viewAllTags}</ui-button>`\n                    : nothing}\n            </div>\n        </ui-popover>`;\n    }\n\n    private readonly openModal = () => {\n        this.popoverOpen = false;\n        this.search = '';\n        this.modalOpen = true;\n    };\n\n    private renderModal() {\n        const t = this.localize.t.common;\n        const query = this.search.trim().toLowerCase();\n        const matches = this.tags.filter((tag) => tag.text.toLowerCase().includes(query));\n        return html`<ui-modal part=\"modal\" size=\"sm\" heading=${t.allTags} ?open=${this.modalOpen} @ui-close=${(e: Event) => { if (isOwnEvent(e)) this.modalOpen = false; }}>\n            <ui-search class=\"search\" size=\"lg\" label=${t.searchAllTags} placeholder=${t.searchAllTags} .value=${this.search} @input=${(e: Event) => (this.search = (e.target as HTMLInputElement).value)}></ui-search>\n            <div class=\"all\">${repeat(matches, (tag) => tag, (tag) => this.renderTag(tag))}</div>\n        </ui-modal>`;\n    }\n\n    override render() {\n        const hidden = this.hiddenTags;\n        const more = this.localize.t.common.moreTags.replace('{count}', String(hidden.length));\n        return html`<div class=\"tags\">\n                ${repeat(this.tags, (tag) => tag, (tag) => this.renderTag(tag))} ${this.renderPopover(hidden, more)}\n                <span class=\"sr-only\" role=\"status\">${hidden.length ? more : ''}</span>\n            </div>\n            ${this.tags.length > POPOVER_TAGS ? this.renderModal() : nothing}`;\n    }\n}\n\nexport interface UiPageHeaderTagsEventMap extends HTMLElementEventMap {\n    'ui-tag-dismiss': CustomEvent<{ tag: PageHeaderTag; index: number }>;\n}\n\n/** Typed listeners for UiPageHeaderTags's events (declaration merging with the class). */\nexport interface UiPageHeaderTags {\n    addEventListener<K extends keyof UiPageHeaderTagsEventMap>(type: K, listener: (this: UiPageHeaderTags, event: UiPageHeaderTagsEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;\n    addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;\n    removeEventListener<K extends keyof UiPageHeaderTagsEventMap>(type: K, listener: (this: UiPageHeaderTags, event: UiPageHeaderTagsEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;\n    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header-tags': UiPageHeaderTags;\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header-title-breadcrumb.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header-title-breadcrumb.ts",
      "content": "import { css } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { UiBreadcrumbItem } from '../breadcrumb/breadcrumb.ts';\nimport type { UiPageHeader } from './page-header.ts';\n\n/**\n * The page header's title as the last crumb (Carbon `PageHeaderTitleBreadcrumb`): hidden — and out of the tab\n * order — until the title has scrolled under the breadcrumb bar, then it rises in (150ms; a fade with reduced\n * motion). Without a `<ui-page-header-content>` it always shows. Put it last in the `<ui-breadcrumb>`.\n */\n@customElement('ui-page-header-title-breadcrumb')\nexport class UiPageHeaderTitleBreadcrumb extends UiBreadcrumbItem {\n    static override readonly styles = [\n        UiBreadcrumbItem.styles,\n        css`\n            :host {\n                opacity: 0;\n                transform: translateY(16px);\n                transition:\n                    transform var(--ui-duration-moderate-01) var(--ui-easing),\n                    opacity var(--ui-duration-moderate-01) var(--ui-easing);\n            }\n\n            :host([data-show]) {\n                opacity: 1;\n                transform: translateY(0);\n            }\n\n            @media (prefers-reduced-motion: reduce) {\n                :host {\n                    transform: none;\n                }\n            }\n\n            .slash {\n                display: none;\n            }\n\n            :host {\n                flex: 0 1 auto;\n                min-inline-size: 0;\n            }\n\n            .current {\n                overflow: hidden;\n                text-overflow: ellipsis;\n                white-space: nowrap;\n            }\n        `,\n    ];\n\n    private header: UiPageHeader | null = null;\n\n    override connectedCallback() {\n        this.current = true;\n        super.connectedCallback();\n        this.header = this.closest('ui-page-header');\n        this.header?.addEventListener('ui-page-header-state', this.sync);\n        this.sync();\n    }\n\n    override disconnectedCallback() {\n        super.disconnectedCallback();\n        this.header?.removeEventListener('ui-page-header-state', this.sync);\n        this.header = null;\n    }\n\n    private readonly sync = () => {\n        const state = this.header?.state;\n        const show = !state?.withContent || state.titleClipped;\n        this.toggleAttribute('data-show', show);\n        this.inert = !show;\n        if (show) this.removeAttribute('aria-hidden');\n        else this.setAttribute('aria-hidden', 'true');\n    };\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header-title-breadcrumb': UiPageHeaderTitleBreadcrumb;\n    }\n}\n"
    },
    {
      "path": "src/primitives/page-header/page-header.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/page-header/page-header.ts",
      "content": "// Its child elements are one per file beside it; this module re-exports them (one entry point).\nimport { css, html, type PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { UiElement } from '../shared/element.ts';\nimport { scrollParent, type PageHeaderState } from './page-header-shared.ts';\nimport '../truncated-text/truncated-text.ts';\nimport '../icon-button/icon-button.ts';\nimport './page-header-overflow.ts';\nexport * from './page-header-breadcrumb.ts';\nexport * from './page-header-content.ts';\nexport * from './page-header-content-text.ts';\nexport * from './page-header-hero-image.ts';\nexport * from './page-header-tabs.ts';\nexport * from './page-header-scroller.ts';\nexport * from './page-header-title-breadcrumb.ts';\nexport type { PageHeaderState } from './page-header-shared.ts';\nexport { UiPageHeaderActions, UiPageHeaderTags, type PageHeaderTag } from './page-header-overflow.ts';\n\n/** How far the header sits below the top of its scrolling box (a fixed UI shell above it), at rest. */\nfunction headerOffset(el: Element): number {\n    const box = scrollParent(el);\n    const top = el.getBoundingClientRect().top;\n    const boxTop = box === document.scrollingElement ? 0 : box.getBoundingClientRect().top;\n    return Math.max(top - boxTop, 0);\n}\n\n/**\n * Carbon `PageHeader` (Carbon for IBM Products `c4p-page-header`): the top of a page — a 40px breadcrumb bar\n * (`<ui-page-header-breadcrumb>`), the content (`<ui-page-header-content>`: heading-04 title, icon, contextual and\n * page actions, `<ui-page-header-content-text>`), and a tab bar (`<ui-page-header-tabs>`), on layer-01 with a line\n * below. It sticks as the page scrolls: the content slides under the breadcrumb bar, which stays (as do the tabs);\n * once the title has gone its `<ui-page-header-title-breadcrumb>` appears in the trail, and the content's page\n * actions give way to the bar's `slot=\"content-actions\"`. `<ui-page-header-scroller>` collapses / expands it.\n *\n * @fires ui-page-header-state - The state changed (`state`: fullyCollapsed, titleClipped, contentActionsClipped …); not bubbling\n * @slot - The parts\n * @cssprop --ui-page-header-top - Set by the header: how far up it sticks (minus the content's height)\n * @cssprop --ui-page-header-bar-top - Set by the header: where the bar sticks (under a fixed UI shell)\n */\n@customElement('ui-page-header')\nexport class UiPageHeader extends UiElement {\n    static override readonly styles = css`\n        :host {\n            position: sticky;\n            z-index: 1;\n            inset-block-start: var(--ui-page-header-top, 0px);\n            display: block;\n            background-color: var(--ui-layer-1);\n            border-block-end: 1px solid var(--ui-border-subtle-2);\n        }\n\n        /* Carbon --disable-sticky-tab-bar: the header scrolls away; the bar is fixed at the top, the padding keeping its room */\n        :host([data-static]) {\n            position: static;\n            padding-block-start: 40px;\n        }\n\n        :host([data-static]) ::slotted(ui-page-header-breadcrumb) {\n            position: fixed;\n            inset-block-start: 0;\n            inset-inline: 0;\n        }\n    `;\n\n    /** No 1584px cap on the grid. */\n    @property({ type: Boolean, reflect: true, attribute: 'full-width-grid' }) fullWidthGrid = false;\n\n    /** Hang the text on the grid margin. */\n    @property({ type: Boolean, reflect: true, attribute: 'narrow-grid' }) narrowGrid = false;\n\n    /** The shared state; its parts read it. */\n    state: PageHeaderState = { fullyCollapsed: false, titleClipped: false, contentActionsClipped: false, withContent: false, fullWidthGrid: false, narrowGrid: false };\n\n    private resizeObserver?: ResizeObserver;\n    private observers: IntersectionObserver[] = [];\n\n    override connectedCallback() {\n        super.connectedCallback();\n        if (typeof ResizeObserver === 'undefined') return;\n        this.resizeObserver = new ResizeObserver(() => this.measure());\n        this.resizeObserver.observe(this);\n    }\n\n    override disconnectedCallback() {\n        super.disconnectedCallback();\n        this.resizeObserver?.disconnect();\n        this.disconnectObservers();\n    }\n\n    protected override updated(changed: PropertyValues<this>) {\n        super.updated(changed);\n        if (changed.has('fullWidthGrid') || changed.has('narrowGrid')) this.setState({ fullWidthGrid: this.fullWidthGrid, narrowGrid: this.narrowGrid });\n    }\n\n    /** Merge into the state and tell the parts. */\n    setState(next: Partial<PageHeaderState>) {\n        const changed = Object.entries(next).some(([key, value]) => this.state[key as keyof PageHeaderState] !== value);\n        if (!changed) return;\n        this.state = { ...this.state, ...next };\n        this.dispatchEvent(new Event('ui-page-header-state'));\n    }\n\n    /** A tab bar asks the header not to stick (Carbon `disableStickyTabBar`): the bar is fixed instead. */\n    setStatic(on: boolean) {\n        this.toggleAttribute('data-static', on);\n    }\n\n    private disconnectObservers() {\n        for (const observer of this.observers) observer.disconnect();\n        this.observers = [];\n    }\n\n    /** Where the header and its bar stick, and what to watch scroll under the bar. */\n    private measure() {\n        const content = this.querySelector<HTMLElement>('ui-page-header-content');\n        const offset = headerOffset(this);\n        const contentHeight = content?.offsetHeight ?? 0;\n        this.style.setProperty('--ui-page-header-top', `${(Math.round(contentHeight) - offset) * -1}px`);\n        this.style.setProperty('--ui-page-header-bar-top', `${offset}px`);\n        this.setState({ withContent: !!content });\n        this.disconnectObservers();\n        if (!content || typeof IntersectionObserver === 'undefined') return;\n        // clipped: scrolled all the way under the bar (Carbon's intent; 1px more, as a box edge-to-edge with the bar still counts as intersecting)\n        // measured in the scrolling box the header sits in (Carbon watches the viewport, wrong for a box lower on the page)\n        const box = scrollParent(this);\n        const root = box === document.scrollingElement ? null : box;\n        const watch = (target: Element | null | undefined, key: 'fullyCollapsed' | 'titleClipped' | 'contentActionsClipped') => {\n            if (!target) return;\n            const observer = new IntersectionObserver((entries) => entries.forEach((entry) => { this.setState({ [key]: !entry.isIntersecting }); }), {\n                root,\n                rootMargin: `${(offset + 40 + 1) * -1}px 0px 0px 0px`,\n            });\n            observer.observe(target);\n            this.observers.push(observer);\n        };\n        watch(content, 'fullyCollapsed');\n        watch(content.shadowRoot?.querySelector('.title'), 'titleClipped');\n        watch(content.shadowRoot?.querySelector('.page-actions'), 'contentActionsClipped');\n    }\n\n    override render() {\n        return html`<slot></slot>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-page-header': UiPageHeader;\n    }\n}\n"
    }
  ]
}
