{"version":3,"file":"PageHeader.cjs","names":[],"sources":["../../../src/components/PageHeader/PageHeader.tsx"],"sourcesContent":["/*\nCopyright 2026 Element Creations Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport classnames from \"classnames\";\nimport React, {\n  forwardRef,\n  type ComponentType,\n  type PropsWithChildren,\n  type ReactNode,\n  type SVGAttributes,\n} from \"react\";\nimport styles from \"./PageHeader.module.css\";\nimport { BigIcon } from \"../Icon/BigIcon\";\nimport { Heading } from \"../Typography/Heading\";\n\ntype PageHeaderProps = {\n  Icon: ComponentType<SVGAttributes<SVGElement>>;\n  /**\n   * The heading text.\n   */\n  heading: string;\n  /**\n   * The t-shirt size of the header.\n   * @default \"lg\"\n   */\n  size?: \"md\" | \"lg\";\n  /**\n   * The contents of the header. At a minimum, this should include a description\n   * wrapped in a `<p>` element.\n   */\n  children: ReactNode;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nexport const PageHeader = forwardRef<HTMLDivElement, PageHeaderProps>(\n  function PageHeader(\n    {\n      children,\n      className,\n      Icon,\n      heading,\n      size = \"lg\",\n      ...props\n    }: PropsWithChildren<PageHeaderProps>,\n    ref,\n  ) {\n    return (\n      <div\n        {...props}\n        className={classnames(styles.header, className)}\n        ref={ref}\n        data-size={size}\n      >\n        <BigIcon size={size} className={styles.icon}>\n          <Icon aria-hidden />\n        </BigIcon>\n        <Heading as=\"h1\" weight=\"semibold\" size={size === \"lg\" ? \"md\" : \"sm\"}>\n          {heading}\n        </Heading>\n        {children}\n      </div>\n    );\n  },\n);\n"],"mappings":";;;;;;;;;;AAqCA,IAAa,cAAA,GAAA,MAAA,YACX,SAAS,WACP,EACE,UACA,WACA,MACA,SACA,OAAO,MACP,GAAG,SAEL,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,GAAI;EACJ,YAAA,GAAA,WAAA,SAAsB,0BAAA,QAAO,QAAQ,UAAU;EAC1C;EACL,aAAW;YAJb;GAME,iBAAA,GAAA,kBAAA,KAAC,gBAAA,SAAD;IAAe;IAAM,WAAW,0BAAA,QAAO;cACrC,iBAAA,GAAA,kBAAA,KAAC,MAAD,EAAM,eAAA,MAAc,CAAA;IACZ,CAAA;GACV,iBAAA,GAAA,kBAAA,KAAC,gBAAA,SAAD;IAAS,IAAG;IAAK,QAAO;IAAW,MAAM,SAAS,OAAO,OAAO;cAC7D;IACO,CAAA;GACT;GACG;;EAGX"}