import * as class_variance_authority_types from 'class-variance-authority/types'; import { VariantProps } from 'class-variance-authority'; import React__default from 'react'; import { IconSlot, ButtonLink } from './button.js'; import { Link } from './link.js'; import '@base-ui/react/button'; /** * Surface colours the footer can be themed with. Each one names its LIGHT-mode * surface; dark mode deepens it onto the same family's dark steps (see the * `color` variants below), so `color` expresses tonal weight rather than a * literal colour. * * Every light pair clears WCAG 2.2 AA (1.4.3, 4.5:1) for the footer's smallest * text and 11 of the 13 also clear AAA (1.4.6, 7:1). The two AA-only pairs are * `primary-600` (4.57:1) and `accent-600` (5.18:1), both with white ink; prefer * the `-800` steps when a service is held to AAA. In dark mode all thirteen * clear AAA (worst 13.6:1). * * Unlike `Masthead` — which is restricted to verified AAA pairs because it is * legally-mandated identification — the footer carries supporting content, so * the full tonal range is offered here. */ declare const footerColors: readonly ["primary-800", "primary-600", "primary-400", "primary-200", "grey-800", "grey-600", "grey-400", "grey-200", "accent-800", "accent-600", "accent-400", "accent-200", "white"]; type FooterColor = (typeof footerColors)[number]; /** * The `Logo` treatment the masterbrand guidelines call for on a given footer * surface. * * The brand mark does not inherit: its wordmark and waratah are painted from * fixed palette values under `logoType='default'`, so nothing in the footer's * ink chain reaches them and the treatment has to be chosen against the * surface. Getting it wrong is not subtle — `--primary-800` and * `--nsw-blue-800` are the same value, so `default` on a `primary-800` footer * paints the wordmark in exactly its own background at 1:1 contrast. * * The guidelines rank the colourways, and this follows that order: * * - **Full colour (`default`)** "must be given preference over all other * versions". Used on every light surface. * - **Full colour reversed (`reversed`)** is the sanctioned alternative "where * the primary logo is illegible" — the `-800` steps. Measured against those * three surfaces the white wordmark runs 13.6–15.1:1 and the waratah * 2.6–2.9:1, so both halves of the mark read. * - **Mono is RESTRICTED USE ONLY** and needs Brand Team approval. It is the * last resort here, not the default, and only the `-600` steps reach it: * against those the waratah measures 1.00, 1.13 and 1.59:1 — on * `accent-600` it is literally the same value as the surface * (`--accent-600` IS `--nsw-red-600`), so a reversed mark would lose its * flower exactly the way `default` lost its wordmark. That matches the * guidelines' own accessibility table, where the mid-tone row is crossed * for full colour AND for reversed. * * Light mode only, in every case: under `.dark` the mark's waratah flips to * white and every surface deepens, so all thirteen render an all-white logo. */ declare function footerLogoType(color?: FooterColor | null): 'default' | 'reversed' | 'mono-white'; declare const footerVariants: (props?: ({ color?: "white" | "primary-800" | "primary-600" | "primary-400" | "primary-200" | "grey-800" | "grey-600" | "grey-400" | "grey-200" | "accent-800" | "accent-600" | "accent-400" | "accent-200" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; declare const footerContainerVariants: (props?: ({ container?: "fluid" | "contained" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; /** A link rendered anywhere in the footer — legal row or site-map column. */ type FooterLinkItem = { /** Visible link text, e.g. "Privacy". */ name: string; href: string; }; /** Alias kept for the legal-links context, where the name reads better. */ type FooterLegalLinkItem = FooterLinkItem; /** A social channel rendered as an icon-only link in the small print row. */ type FooterSocialLinkItem = { /** Channel name, e.g. "LinkedIn". Used to build the accessible name. */ name: string; href: string; /** * Icon for the channel — the component (`IconLinkedIn`) or an element * (``). Rendered through `ButtonLink`'s `leadingVisual` slot, * which sizes and colours it. * * Brand marks are not in the NSWDS icon set — which is Material Symbols — but * the six the NSW Government uses ship in the package's own `icons/brands` * subpath, already client-safe. (Registry consumers copy source, so they get * them from the `icon-brands` registry item instead; see the README.) * * `Footer` is server-compatible but `ButtonLink` is not, so a React Server * Component assembling `socialLinks` from its OWN plain icon modules must use * the element form — a bare function cannot cross the RSC boundary. The marks * above are client references, so either form works for them. See `IconSlot`. */ icon: IconSlot; /** * Accessible name for the link. Defaults to `Follow us on {name}`. */ label?: string; }; type FooterSocialLinkProps = Omit, 'children' | 'color' | 'leadingVisual' | 'size' | 'variant'> & { /** Channel mark — component or element. See `IconSlot`. */ icon: IconSlot; /** Accessible name, e.g. "Follow us on LinkedIn". */ label: string; }; /** * Icon-only link to a social channel. Renders through `ButtonLink`, so it * picks up the framework link component from `LinkProvider` and the 44px touch * target. The label is supplied as `aria-label` — there is no visible text. */ declare function FooterSocialLink({ className, icon, label, ...props }: FooterSocialLinkProps): React__default.JSX.Element; type FooterAcknowledgementProps = React__default.ComponentPropsWithoutRef<'div'> & { ref?: React__default.Ref; }; /** * Acknowledgement of Country. Renders the standard NSW Government wording * unless `children` are supplied — pass your own text when an agency has * agreed different wording with the relevant Traditional Custodians. */ declare function FooterAcknowledgement({ className, children, ref, ...props }: FooterAcknowledgementProps): React__default.JSX.Element; type FooterLegalLinksProps = Omit, 'children'> & { legalLinks: FooterLegalLinkItem[]; ref?: React__default.Ref; }; /** * Navigation landmark holding the footer's supporting/legal links. Renders * nothing when `legalLinks` is empty, so an empty landmark is never exposed to * assistive tech. */ declare function FooterLegalLinks({ className, legalLinks, 'aria-label': ariaLabel, ref, ...props }: FooterLegalLinksProps): React__default.JSX.Element | null; type FooterNavLinkProps = Omit, 'variant'>; /** * A single site-map link, carrying the same ink-derived treatment as the legal * row. Exposed so a bespoke column layout (a mobile accordion, say) can match * the built-in columns without copying class strings. */ declare function FooterNavLink({ className, children, ...props }: FooterNavLinkProps): React__default.JSX.Element; type FooterNavProps = React__default.ComponentPropsWithoutRef<'nav'> & { ref?: React__default.Ref; }; /** * Navigation landmark wrapping the footer's site-map columns. * * One landmark for the whole site map rather than one per column: a large * footer would otherwise add five nav landmarks to the page, burying the ones * that matter when a screen-reader user lists them. Columns are headed lists * inside it. The default four-column grid is overridable — `cn` lets a * `lg:grid-cols-3` on `className` win. */ declare function FooterNav({ className, 'aria-label': ariaLabel, ref, ...props }: FooterNavProps): React__default.JSX.Element; type FooterNavColumnProps = Omit, 'children'> & { heading: React__default.ReactNode; links: FooterLinkItem[]; /** * Heading level for the column title. Defaults to `2` — correct when the * footer sits at the top level of the document outline. Step it down if the * surrounding page nests the footer under another heading, so the outline * stays in order (WCAG 1.3.1). * * The two bounds are not symmetric. `6` is simply the deepest heading HTML * defines. `1` is excluded on purpose: a site-map column title is never the * page's own title, so an `h1` here would be the very outline error the prop * exists to avoid. */ headingLevel?: 2 | 3 | 4 | 5 | 6; ref?: React__default.Ref; }; /** A headed column of site-map links. Sits inside `FooterNav`. */ declare function FooterNavColumn({ className, heading, links, headingLevel, ref, ...props }: FooterNavColumnProps): React__default.JSX.Element; type FooterSmallPrintProps = React__default.ComponentPropsWithoutRef<'div'> & { /** Owning agency, e.g. "Digital NSW, Department of Customer Service". */ department?: string; socialLinks?: FooterSocialLinkItem[]; /** * Copyright year. Defaults to the current year read at render time — which * on a server-rendered page is the *server's* year, so a request that * straddles new year (or a server in a different timezone to the audience) * can hydrate with a mismatch. Pass an explicit year to pin it. */ year?: number; ref?: React__default.Ref; }; /** * Copyright line and social channels. `children` replace the generated * copyright sentence when an agency needs different wording. */ declare function FooterSmallPrint({ className, department, socialLinks, year, children, ref, ...props }: FooterSmallPrintProps): React__default.JSX.Element; type FooterProps = React__default.ComponentPropsWithoutRef<'footer'> & VariantProps & VariantProps & { /** Supporting/legal links — privacy, accessibility, copyright, etc. */ legalLinks?: FooterLegalLinkItem[]; /** Social channels rendered as icon-only links beside the copyright line. */ socialLinks?: FooterSocialLinkItem[]; /** Owning agency, named in the copyright line. */ department?: string; /** * Acknowledgement of Country. `true` (default) renders the standard * wording, `false` omits it, and a node replaces the wording. */ acknowledgement?: boolean | React__default.ReactNode; /** * Copyright line and social channels. Defaults to `true` — the copyright * line renders even with no `department` to name, since it is the footer's * core content. */ smallPrint?: boolean; /** Rule along the top edge of the footer content. Defaults to `true`. */ topBorder?: boolean; /** Copyright year. See `FooterSmallPrint` for the SSR caveat. */ year?: number; /** Classes applied to the inner width-constraining wrapper. */ containerClassName?: string; /** * Extra content rendered above the acknowledgement — a logo, contact * details, or link columns. */ children?: React__default.ReactNode; ref?: React__default.Ref; }; /** * End-of-page `contentinfo` landmark: acknowledgement of Country, supporting * links, ownership and social channels. Render it once in a shared layout so * the same content appears on every page. * * - `color` themes the surface and names its light-mode tone; dark mode deepens * it onto the same family's dark steps. Every option meets WCAG 2.2 AA in * light mode and AAA in dark (see `footerColors`). All link, border and hover * colours derive from the surface's ink, so they follow automatically in both * themes. * - `container` selects the inner wrapper layout: `fluid` (full-bleed, * nswds-app parity) or `contained` (centred 1200px column, legacy * `nsw-container` parity). Fine-tune either with the `--footer-max-width` * and `--footer-padding-x` custom properties. * - Each section is independently omissible: `acknowledgement={false}`, * `smallPrint={false}`, or simply pass no `legalLinks` (an empty nav * landmark is never rendered). The rule between the acknowledgement and the * link row appears only when there is content on both sides of it. * * For a layout this does not cover, compose `FooterAcknowledgement`, * `FooterLegalLinks`, `FooterSmallPrint` and `FooterSocialLink` directly * inside your own `