@nswds/ui 5.1.0 → 5.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/footer.d.ts +34 -2
- package/dist/components/footer.js +48 -5
- package/dist/components/footer.js.map +1 -1
- package/dist/components/masthead.d.ts +8 -1
- package/dist/components/masthead.js +7 -6
- package/dist/components/masthead.js.map +1 -1
- package/dist/components/skip-link.js +3 -3
- package/dist/components/skip-link.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -23,6 +23,38 @@ import '@base-ui/react/button';
|
|
|
23
23
|
*/
|
|
24
24
|
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"];
|
|
25
25
|
type FooterColor = (typeof footerColors)[number];
|
|
26
|
+
/**
|
|
27
|
+
* The `Logo` treatment the masterbrand guidelines call for on a given footer
|
|
28
|
+
* surface.
|
|
29
|
+
*
|
|
30
|
+
* The brand mark does not inherit: its wordmark and waratah are painted from
|
|
31
|
+
* fixed palette values under `logoType='default'`, so nothing in the footer's
|
|
32
|
+
* ink chain reaches them and the treatment has to be chosen against the
|
|
33
|
+
* surface. Getting it wrong is not subtle — `--primary-800` and
|
|
34
|
+
* `--nsw-blue-800` are the same value, so `default` on a `primary-800` footer
|
|
35
|
+
* paints the wordmark in exactly its own background at 1:1 contrast.
|
|
36
|
+
*
|
|
37
|
+
* The guidelines rank the colourways, and this follows that order:
|
|
38
|
+
*
|
|
39
|
+
* - **Full colour (`default`)** "must be given preference over all other
|
|
40
|
+
* versions". Used on every light surface.
|
|
41
|
+
* - **Full colour reversed (`reversed`)** is the sanctioned alternative "where
|
|
42
|
+
* the primary logo is illegible" — the `-800` steps. Measured against those
|
|
43
|
+
* three surfaces the white wordmark runs 13.6–15.1:1 and the waratah
|
|
44
|
+
* 2.6–2.9:1, so both halves of the mark read.
|
|
45
|
+
* - **Mono is RESTRICTED USE ONLY** and needs Brand Team approval. It is the
|
|
46
|
+
* last resort here, not the default, and only the `-600` steps reach it:
|
|
47
|
+
* against those the waratah measures 1.00, 1.13 and 1.59:1 — on
|
|
48
|
+
* `accent-600` it is literally the same value as the surface
|
|
49
|
+
* (`--accent-600` IS `--nsw-red-600`), so a reversed mark would lose its
|
|
50
|
+
* flower exactly the way `default` lost its wordmark. That matches the
|
|
51
|
+
* guidelines' own accessibility table, where the mid-tone row is crossed
|
|
52
|
+
* for full colour AND for reversed.
|
|
53
|
+
*
|
|
54
|
+
* Light mode only, in every case: under `.dark` the mark's waratah flips to
|
|
55
|
+
* white and every surface deepens, so all thirteen render an all-white logo.
|
|
56
|
+
*/
|
|
57
|
+
declare function footerLogoType(color?: FooterColor | null): 'default' | 'reversed' | 'mono-white';
|
|
26
58
|
declare const footerVariants: (props?: ({
|
|
27
59
|
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;
|
|
28
60
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -96,7 +128,7 @@ type FooterNavLinkProps = Omit<React__default.ComponentPropsWithoutRef<typeof Li
|
|
|
96
128
|
* row. Exposed so a bespoke column layout (a mobile accordion, say) can match
|
|
97
129
|
* the built-in columns without copying class strings.
|
|
98
130
|
*/
|
|
99
|
-
declare function FooterNavLink({ className, ...props }: FooterNavLinkProps): React__default.JSX.Element;
|
|
131
|
+
declare function FooterNavLink({ className, children, ...props }: FooterNavLinkProps): React__default.JSX.Element;
|
|
100
132
|
type FooterNavProps = React__default.ComponentPropsWithoutRef<'nav'> & {
|
|
101
133
|
ref?: React__default.Ref<HTMLElement>;
|
|
102
134
|
};
|
|
@@ -203,4 +235,4 @@ type FooterProps = React__default.ComponentPropsWithoutRef<'footer'> & VariantPr
|
|
|
203
235
|
*/
|
|
204
236
|
declare function Footer({ className, color, container, containerClassName, legalLinks, socialLinks, department, acknowledgement, smallPrint, topBorder, year, children, ref, ...props }: FooterProps): React__default.JSX.Element;
|
|
205
237
|
|
|
206
|
-
export { Footer, FooterAcknowledgement, type FooterAcknowledgementProps, type FooterColor, type FooterLegalLinkItem, FooterLegalLinks, type FooterLegalLinksProps, type FooterLinkItem, FooterNav, FooterNavColumn, type FooterNavColumnProps, FooterNavLink, type FooterNavLinkProps, type FooterNavProps, type FooterProps, FooterSmallPrint, type FooterSmallPrintProps, FooterSocialLink, type FooterSocialLinkItem, type FooterSocialLinkProps, footerColors, footerContainerVariants, footerVariants };
|
|
238
|
+
export { Footer, FooterAcknowledgement, type FooterAcknowledgementProps, type FooterColor, type FooterLegalLinkItem, FooterLegalLinks, type FooterLegalLinksProps, type FooterLinkItem, FooterNav, FooterNavColumn, type FooterNavColumnProps, FooterNavLink, type FooterNavLinkProps, type FooterNavProps, type FooterProps, FooterSmallPrint, type FooterSmallPrintProps, FooterSocialLink, type FooterSocialLinkItem, type FooterSocialLinkProps, footerColors, footerContainerVariants, footerLogoType, footerVariants };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { cva } from 'class-variance-authority';
|
|
3
3
|
import { cn } from '../lib/utils.js';
|
|
4
|
-
import { ButtonLink } from '../components/button.js';
|
|
4
|
+
import { ButtonLink, TouchTarget } from '../components/button.js';
|
|
5
5
|
import { Link } from '../components/link.js';
|
|
6
6
|
import { Separator } from '../components/separator.js';
|
|
7
7
|
|
|
@@ -21,6 +21,27 @@ const footerColors = [
|
|
|
21
21
|
"white"
|
|
22
22
|
];
|
|
23
23
|
const DEFAULT_FOOTER_COLOR = "white";
|
|
24
|
+
const footerReversedLogoColors = /* @__PURE__ */ new Set(["primary-800", "grey-800", "accent-800"]);
|
|
25
|
+
const footerMonoLogoColors = /* @__PURE__ */ new Set(["primary-600", "grey-600", "accent-600"]);
|
|
26
|
+
function warnIfMonoLogoRequired(color) {
|
|
27
|
+
if (process.env.NODE_ENV === "production") {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
console.warn(
|
|
31
|
+
`[nswds/ui] Footer color="${color}" leaves the NSW Government logo no legible masterbrand colourway, so the RESTRICTED mono logo is used. The guidelines require NSW Government Brand Team approval for mono. Prefer the "-800" step of this family, which takes the sanctioned reversed logo.`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function footerLogoType(color) {
|
|
35
|
+
const resolved = color ?? DEFAULT_FOOTER_COLOR;
|
|
36
|
+
if (footerReversedLogoColors.has(resolved)) {
|
|
37
|
+
return "reversed";
|
|
38
|
+
}
|
|
39
|
+
if (footerMonoLogoColors.has(resolved)) {
|
|
40
|
+
warnIfMonoLogoRequired(resolved);
|
|
41
|
+
return "mono-white";
|
|
42
|
+
}
|
|
43
|
+
return "default";
|
|
44
|
+
}
|
|
24
45
|
const footerVariants = cva(
|
|
25
46
|
[
|
|
26
47
|
"w-full",
|
|
@@ -101,6 +122,27 @@ const footerContainerVariants = cva(
|
|
|
101
122
|
const footerLinkClassName = [
|
|
102
123
|
// Negative margin + padding keeps the hover/focus halo from shifting layout.
|
|
103
124
|
"-m-1 rounded-sm p-1 text-(--footer-ink)",
|
|
125
|
+
// relative + inline-flex position the TouchTarget expansion layer these links
|
|
126
|
+
// render (see FooterNavLink / FooterLegalLinks). At text-sm the visible box is
|
|
127
|
+
// 28px — 20px line box plus the 8px of padding above — which clears WCAG 2.2
|
|
128
|
+
// AA 2.5.8 (24px) but sits well under the 44px floor DESIGN.md commits the
|
|
129
|
+
// system to, and which the sibling FooterSocialLink already gets for free by
|
|
130
|
+
// going through ButtonLink. Growing the box instead would have pushed a
|
|
131
|
+
// mobile site map roughly 300px taller and broken the icon alignment in
|
|
132
|
+
// FooterContact, so the hit area grows and the layout does not. inline-flex
|
|
133
|
+
// (not inline) gives the absolutely-positioned layer a predictable box to
|
|
134
|
+
// measure 100% against — an inline <a> that wraps has no single box.
|
|
135
|
+
//
|
|
136
|
+
// The list gaps are deliberately NOT widened to stop adjacent expansions
|
|
137
|
+
// overlapping. In a site-map column the 28px boxes sit 8px apart, so 44px
|
|
138
|
+
// layers overlap by 8px and each link's exclusive area is the 36px between
|
|
139
|
+
// midpoints — still better than 28px boxes separated by 8px of dead gap,
|
|
140
|
+
// and it leaves no unclickable band at all. Widening the gap under
|
|
141
|
+
// `pointer:coarse` would also mean pairing a bare utility with a conditional
|
|
142
|
+
// override of the same property, which check:cascade rejects, and guarding
|
|
143
|
+
// it with `pointer:fine` instead would drop the gap to zero on `pointer:none`
|
|
144
|
+
// devices.
|
|
145
|
+
"relative inline-flex items-center",
|
|
104
146
|
"underline decoration-current underline-offset-4",
|
|
105
147
|
"motion-safe:transition-colors",
|
|
106
148
|
"hover:bg-(--footer-halo) hover:decoration-2",
|
|
@@ -168,19 +210,20 @@ function FooterLegalLinks({
|
|
|
168
210
|
// derived from --footer-ink so it tracks the surface colour. Link's own
|
|
169
211
|
// variants are pinned to the primary palette (and flip in dark mode),
|
|
170
212
|
// which would break on a coloured footer.
|
|
171
|
-
/* @__PURE__ */ jsx(Link, { variant: "unstyled", href: item.href, className: footerLinkClassName, children: item.name }, item.name)
|
|
213
|
+
/* @__PURE__ */ jsx(Link, { variant: "unstyled", href: item.href, className: footerLinkClassName, children: /* @__PURE__ */ jsx(TouchTarget, { children: item.name }) }, item.name)
|
|
172
214
|
))
|
|
173
215
|
}
|
|
174
216
|
);
|
|
175
217
|
}
|
|
176
|
-
function FooterNavLink({ className, ...props }) {
|
|
218
|
+
function FooterNavLink({ className, children, ...props }) {
|
|
177
219
|
return /* @__PURE__ */ jsx(
|
|
178
220
|
Link,
|
|
179
221
|
{
|
|
180
222
|
"data-slot": "footer-nav-link",
|
|
181
223
|
variant: "unstyled",
|
|
182
224
|
...props,
|
|
183
|
-
className: cn(footerLinkClassName, className)
|
|
225
|
+
className: cn(footerLinkClassName, className),
|
|
226
|
+
children: /* @__PURE__ */ jsx(TouchTarget, { children })
|
|
184
227
|
}
|
|
185
228
|
);
|
|
186
229
|
}
|
|
@@ -307,6 +350,6 @@ function Footer({
|
|
|
307
350
|
);
|
|
308
351
|
}
|
|
309
352
|
|
|
310
|
-
export { Footer, FooterAcknowledgement, FooterLegalLinks, FooterNav, FooterNavColumn, FooterNavLink, FooterSmallPrint, FooterSocialLink, footerColors, footerContainerVariants, footerVariants };
|
|
353
|
+
export { Footer, FooterAcknowledgement, FooterLegalLinks, FooterNav, FooterNavColumn, FooterNavLink, FooterSmallPrint, FooterSocialLink, footerColors, footerContainerVariants, footerLogoType, footerVariants };
|
|
311
354
|
//# sourceMappingURL=footer.js.map
|
|
312
355
|
//# sourceMappingURL=footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/footer.tsx"],"names":[],"mappings":";;;;;;;AAyBA,MAAM,YAAA,GAAe;AAAA,EACnB,aAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF;AAMA,MAAM,oBAAA,GAAoC,OAAA;AAE1C,MAAM,cAAA,GAAiB,GAAA;AAAA,EACrB;AAAA,IACE,QAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,yEAAA;AAAA,IACA,uEAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAiBR,KAAA,EAAO;AAAA,QACL,aAAA,EACE,iFAAA;AAAA,QACF,aAAA,EACE,iFAAA;AAAA,QACF,aAAA,EACE,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AAA,EAAU,UAAA,EAAU,IAAA,EAAC,WAAU,2BAAA,EAA4B,CAAA;AAAA,YACzE,QAAA;AAAA,YACA,uCACC,GAAA,CAAC,qBAAA,EAAA,EACE,QAAA,EAAA,eAAA,KAAoB,IAAA,GAAO,SAAY,eAAA,EAC1C,CAAA;AAAA,YAGD,mBAAA,KAAwB,kBAAkB,UAAA,CAAA,oBACzC,GAAA,CAAC,aAAU,UAAA,EAAU,IAAA,EAAC,WAAU,2BAAA,EAA4B,CAAA;AAAA,YAE7D,cAAA,oBAAkB,GAAA,CAAC,gBAAA,EAAA,EAAiB,UAAA,EAAwB,CAAA;AAAA,YAC5D,UAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAiB,UAAA,EAAwB,aAA0B,IAAA,EAAY;AAAA;AAAA;AAAA;AAEpF;AAAA,GACF;AAEJ","file":"footer.js","sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\nimport { ButtonLink, type IconSlot } from '../components/button.js'\nimport { Link } from '../components/link.js'\nimport { Separator } from '../components/separator.js'\n\n/**\n * Surface colours the footer can be themed with. Each one names its LIGHT-mode\n * surface; dark mode deepens it onto the same family's dark steps (see the\n * `color` variants below), so `color` expresses tonal weight rather than a\n * literal colour.\n *\n * Every light pair clears WCAG 2.2 AA (1.4.3, 4.5:1) for the footer's smallest\n * text and 11 of the 13 also clear AAA (1.4.6, 7:1). The two AA-only pairs are\n * `primary-600` (4.57:1) and `accent-600` (5.18:1), both with white ink; prefer\n * the `-800` steps when a service is held to AAA. In dark mode all thirteen\n * clear AAA (worst 13.6:1).\n *\n * Unlike `Masthead` — which is restricted to verified AAA pairs because it is\n * legally-mandated identification — the footer carries supporting content, so\n * the full tonal range is offered here.\n */\nconst footerColors = [\n 'primary-800',\n 'primary-600',\n 'primary-400',\n 'primary-200',\n 'grey-800',\n 'grey-600',\n 'grey-400',\n 'grey-200',\n 'accent-800',\n 'accent-600',\n 'accent-400',\n 'accent-200',\n 'white',\n] as const\n\ntype FooterColor = (typeof footerColors)[number]\n\n// Shared by cva's defaultVariants and the data-color attribute, so the two\n// can't drift apart.\nconst DEFAULT_FOOTER_COLOR: FooterColor = 'white'\n\nconst footerVariants = cva(\n [\n 'w-full',\n // Every derived colour in the footer resolves from a single --footer-ink\n // token, so a colour variant only has to declare the surface utilities and\n // that one value. The derivations are written literally here (once) rather\n // than per-variant: Tailwind scans source text for class names, so a\n // template-built arbitrary property would never be emitted.\n //\n // Mirrors the color-mix derivation in link.tsx (--link-halo).\n '[--footer-border:color-mix(in_oklch,var(--footer-ink)_15%,transparent)]',\n '[--footer-halo:color-mix(in_oklch,var(--footer-ink)_10%,transparent)]',\n '[--footer-halo-active:color-mix(in_oklch,var(--footer-ink)_18%,transparent)]',\n ],\n {\n variants: {\n // Ink values use the RAW masterbrand tokens (--primary-800, --grey-800,\n // --accent-800) rather than Tailwind's --color-* bridge aliases. Tailwind\n // v4 tree-shakes an unreferenced @theme key, and referencing one from\n // inside an arbitrary property is not a usage signal — the raw tokens are\n // plain :root declarations from @nswds/tokens and always resolve.\n // (--color-white is safe: `text-white` / `bg-white` below are real\n // utilities, so that key is always emitted.)\n //\n // Note: a bracketed example in a comment here would itself be scanned by\n // Tailwind and emitted as a dead rule — keep such examples out of prose.\n // Dark mode deepens every surface onto the same family's dark steps —\n // -800→-950, -600→-900, -400→-850, -200→-800, white→grey-900 — so the\n // luminance ORDER within a family is preserved: the variant named for the\n // heaviest tone stays the heaviest. Ink goes white on all thirteen, and\n // every dark pair is WCAG 2.2 AAA (worst 13.6:1) — better than light\n // mode, where primary-600 and accent-600 are AA-only.\n color: {\n 'primary-800':\n 'bg-primary-800 text-white [--footer-ink:var(--color-white)] dark:bg-primary-950',\n 'primary-600':\n 'bg-primary-600 text-white [--footer-ink:var(--color-white)] dark:bg-primary-900',\n 'primary-400':\n 'bg-primary-400 text-primary-800 [--footer-ink:var(--primary-800)] dark:bg-primary-850 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'primary-200':\n 'bg-primary-200 text-primary-800 [--footer-ink:var(--primary-800)] dark:bg-primary-800 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'grey-800': 'bg-grey-800 text-white [--footer-ink:var(--color-white)] dark:bg-grey-950',\n 'grey-600': 'bg-grey-600 text-white [--footer-ink:var(--color-white)] dark:bg-grey-900',\n 'grey-400':\n 'bg-grey-400 text-grey-800 [--footer-ink:var(--grey-800)] dark:bg-grey-850 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'grey-200':\n 'bg-grey-200 text-grey-800 [--footer-ink:var(--grey-800)] dark:bg-grey-800 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'accent-800':\n 'bg-accent-800 text-white [--footer-ink:var(--color-white)] dark:bg-accent-950',\n 'accent-600':\n 'bg-accent-600 text-white [--footer-ink:var(--color-white)] dark:bg-accent-900',\n 'accent-400':\n 'bg-accent-400 text-accent-800 [--footer-ink:var(--accent-800)] dark:bg-accent-850 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'accent-200':\n 'bg-accent-200 text-accent-800 [--footer-ink:var(--accent-800)] dark:bg-accent-800 dark:text-white dark:[--footer-ink:var(--color-white)]',\n white:\n 'bg-white text-grey-800 [--footer-ink:var(--grey-800)] dark:bg-grey-900 dark:text-white dark:[--footer-ink:var(--color-white)]',\n },\n },\n defaultVariants: {\n color: DEFAULT_FOOTER_COLOR,\n },\n },\n)\n\nconst footerContainerVariants = cva(\n [\n 'mx-auto flex w-full flex-col max-sm:py-6 sm:py-8',\n // Lateral padding funnels through --footer-padding-x so an app can retune\n // it once (via the `style` prop or a utility class) without a new variant.\n // Same mechanism, and the same 16px → 24px → 48px rhythm, as the Masthead.\n 'px-(--footer-padding-x)',\n '[--footer-padding-x:--spacing(4)] sm:[--footer-padding-x:--spacing(6)] lg:[--footer-padding-x:--spacing(12)]',\n ],\n {\n variants: {\n container: {\n // Full-bleed (nswds-app parity). --footer-max-width is still read so a\n // shell app can constrain the inner wrapper without switching variants.\n fluid: 'max-w-[var(--footer-max-width,none)]',\n // Centred content column, legacy nsw-container parity (1200px).\n contained: 'max-w-[var(--footer-max-width,75rem)]',\n },\n },\n defaultVariants: {\n container: 'fluid',\n },\n },\n)\n\n/** A link rendered anywhere in the footer — legal row or site-map column. */\ntype FooterLinkItem = {\n /** Visible link text, e.g. \"Privacy\". */\n name: string\n href: string\n}\n\n/** Alias kept for the legal-links context, where the name reads better. */\ntype FooterLegalLinkItem = FooterLinkItem\n\n/** A social channel rendered as an icon-only link in the small print row. */\ntype FooterSocialLinkItem = {\n /** Channel name, e.g. \"LinkedIn\". Used to build the accessible name. */\n name: string\n href: string\n /**\n * Icon for the channel — the component (`IconLinkedIn`) or an element\n * (`<IconLinkedIn />`). Brand marks (LinkedIn, X, Facebook…) are not part of\n * the NSWDS icon set — which is Material Symbols — so the mark is supplied by\n * the consuming app. It is rendered through `ButtonLink`'s `leadingVisual`\n * slot, which sizes and colours it.\n *\n * `Footer` is server-compatible but `ButtonLink` is not, so a React Server\n * Component assembling `socialLinks` must use the element form; the component\n * form cannot cross the RSC boundary. See `IconSlot`.\n */\n icon: IconSlot\n /**\n * Accessible name for the link. Defaults to `Follow us on {name}`.\n */\n label?: string\n}\n\n// One link treatment for the whole footer — legal row and site-map columns\n// alike — so a consumer never has to reason about which kind they are styling.\nconst footerLinkClassName = [\n // Negative margin + padding keeps the hover/focus halo from shifting layout.\n '-m-1 rounded-sm p-1 text-(--footer-ink)',\n 'underline decoration-current underline-offset-4',\n 'motion-safe:transition-colors',\n 'hover:bg-(--footer-halo) hover:decoration-2',\n 'active:bg-(--footer-halo-active) active:decoration-2',\n // outline-(--footer-ink) guarantees the indicator contrasts with the surface\n // on every colour variant (2.4.13 Focus Appearance).\n 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--footer-ink)',\n].join(' ')\n\n// Repoints ButtonLink's ghost-variant tokens at the footer's ink and halos so\n// the social buttons follow the surface colour instead of the button palette.\n// The `dark:` repeat is load-bearing, not redundant: `styles.colors` in\n// button.tsx gives each colour a `dark:[--btn-bg:…]` ink counterpart, which\n// would otherwise outrank the bare declaration here and repaint these glyphs in\n// the palette's ink. Restating it under the same variant makes the two\n// equal-specificity, and tailwind-merge keeps this one because the component's\n// className is merged last. `--footer-ink` already resolves per theme.\nconst footerSocialLinkClassName = [\n '[--btn-bg:var(--footer-ink)] dark:[--btn-bg:var(--footer-ink)]',\n '[--btn-icon:var(--footer-ink)]',\n '[--btn-transparent:transparent]',\n '[--btn-hover-overlay:var(--footer-halo)]',\n '[--btn-active-overlay:var(--footer-halo-active)]',\n].join(' ')\n\ntype FooterSocialLinkProps = Omit<\n React.ComponentPropsWithoutRef<typeof ButtonLink>,\n 'children' | 'color' | 'leadingVisual' | 'size' | 'variant'\n> & {\n /** Channel mark — component or element. See `IconSlot`. */\n icon: IconSlot\n /** Accessible name, e.g. \"Follow us on LinkedIn\". */\n label: string\n}\n\n/**\n * Icon-only link to a social channel. Renders through `ButtonLink`, so it\n * picks up the framework link component from `LinkProvider` and the 44px touch\n * target. The label is supplied as `aria-label` — there is no visible text.\n */\nfunction FooterSocialLink({ className, icon, label, ...props }: FooterSocialLinkProps) {\n return (\n <ButtonLink\n data-slot='footer-social-link'\n {...props}\n aria-label={label}\n variant='ghost'\n size='icon'\n leadingVisual={icon}\n className={cn(footerSocialLinkClassName, className)}\n />\n )\n}\n\ntype FooterAcknowledgementProps = React.ComponentPropsWithoutRef<'div'> & {\n ref?: React.Ref<HTMLDivElement>\n}\n\n/**\n * Acknowledgement of Country. Renders the standard NSW Government wording\n * unless `children` are supplied — pass your own text when an agency has\n * agreed different wording with the relevant Traditional Custodians.\n */\nfunction FooterAcknowledgement({ className, children, ref, ...props }: FooterAcknowledgementProps) {\n return (\n <div\n data-slot='footer-acknowledgement'\n {...props}\n className={cn('flex flex-row items-center gap-5 py-4', className)}\n ref={ref}\n >\n <p className='text-base text-pretty text-(--footer-ink) max-lg:text-center lg:text-left'>\n {children ??\n 'We acknowledge the Traditional Custodians of the land on which we work and live, and pay our respects to Elders past, present and emerging.'}\n </p>\n </div>\n )\n}\n\ntype FooterLegalLinksProps = Omit<React.ComponentPropsWithoutRef<'nav'>, 'children'> & {\n legalLinks: FooterLegalLinkItem[]\n ref?: React.Ref<HTMLElement>\n}\n\n/**\n * Navigation landmark holding the footer's supporting/legal links. Renders\n * nothing when `legalLinks` is empty, so an empty landmark is never exposed to\n * assistive tech.\n */\nfunction FooterLegalLinks({\n className,\n legalLinks,\n 'aria-label': ariaLabel = 'Footer',\n ref,\n ...props\n}: FooterLegalLinksProps) {\n if (legalLinks.length === 0) {\n return null\n }\n\n return (\n <nav\n data-slot='footer-legal-links'\n {...props}\n aria-label={ariaLabel}\n className={cn(\n 'flex flex-wrap gap-x-4 gap-y-3 py-4 text-sm max-lg:justify-center lg:justify-start',\n className,\n )}\n ref={ref}\n >\n {legalLinks.map((item) => (\n // variant='unstyled' — the footer supplies its own link treatment,\n // derived from --footer-ink so it tracks the surface colour. Link's own\n // variants are pinned to the primary palette (and flip in dark mode),\n // which would break on a coloured footer.\n <Link key={item.name} variant='unstyled' href={item.href} className={footerLinkClassName}>\n {item.name}\n </Link>\n ))}\n </nav>\n )\n}\n\ntype FooterNavLinkProps = Omit<React.ComponentPropsWithoutRef<typeof Link>, 'variant'>\n\n/**\n * A single site-map link, carrying the same ink-derived treatment as the legal\n * row. Exposed so a bespoke column layout (a mobile accordion, say) can match\n * the built-in columns without copying class strings.\n */\nfunction FooterNavLink({ className, ...props }: FooterNavLinkProps) {\n return (\n <Link\n data-slot='footer-nav-link'\n variant='unstyled'\n {...props}\n className={cn(footerLinkClassName, className)}\n />\n )\n}\n\ntype FooterNavProps = React.ComponentPropsWithoutRef<'nav'> & {\n ref?: React.Ref<HTMLElement>\n}\n\n/**\n * Navigation landmark wrapping the footer's site-map columns.\n *\n * One landmark for the whole site map rather than one per column: a large\n * footer would otherwise add five nav landmarks to the page, burying the ones\n * that matter when a screen-reader user lists them. Columns are headed lists\n * inside it. The default four-column grid is overridable — `cn` lets a\n * `lg:grid-cols-3` on `className` win.\n */\nfunction FooterNav({\n className,\n 'aria-label': ariaLabel = 'Site map',\n ref,\n ...props\n}: FooterNavProps) {\n return (\n <nav\n data-slot='footer-nav'\n {...props}\n aria-label={ariaLabel}\n className={cn('grid gap-8 py-4 sm:max-lg:grid-cols-2 lg:grid-cols-4', className)}\n ref={ref}\n />\n )\n}\n\ntype FooterNavColumnProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> & {\n heading: React.ReactNode\n links: FooterLinkItem[]\n /**\n * Heading level for the column title. Defaults to `2` — correct when the\n * footer sits at the top level of the document outline. Step it down if the\n * surrounding page nests the footer under another heading, so the outline\n * stays in order (WCAG 1.3.1).\n *\n * The two bounds are not symmetric. `6` is simply the deepest heading HTML\n * defines. `1` is excluded on purpose: a site-map column title is never the\n * page's own title, so an `h1` here would be the very outline error the prop\n * exists to avoid.\n */\n headingLevel?: 2 | 3 | 4 | 5 | 6\n ref?: React.Ref<HTMLDivElement>\n}\n\n/** A headed column of site-map links. Sits inside `FooterNav`. */\nfunction FooterNavColumn({\n className,\n heading,\n links,\n headingLevel = 2,\n ref,\n ...props\n}: FooterNavColumnProps) {\n const Heading = `h${headingLevel}` as const\n\n return (\n <div\n data-slot='footer-nav-column'\n {...props}\n className={cn('flex flex-col gap-3', className)}\n ref={ref}\n >\n <Heading className='text-sm font-bold text-(--footer-ink)'>{heading}</Heading>\n <ul className='flex list-none flex-col gap-2 text-sm'>\n {links.map((item) => (\n <li key={item.name}>\n <FooterNavLink href={item.href}>{item.name}</FooterNavLink>\n </li>\n ))}\n </ul>\n </div>\n )\n}\n\ntype FooterSmallPrintProps = React.ComponentPropsWithoutRef<'div'> & {\n /** Owning agency, e.g. \"Digital NSW, Department of Customer Service\". */\n department?: string\n socialLinks?: FooterSocialLinkItem[]\n /**\n * Copyright year. Defaults to the current year read at render time — which\n * on a server-rendered page is the *server's* year, so a request that\n * straddles new year (or a server in a different timezone to the audience)\n * can hydrate with a mismatch. Pass an explicit year to pin it.\n */\n year?: number\n ref?: React.Ref<HTMLDivElement>\n}\n\n/**\n * Copyright line and social channels. `children` replace the generated\n * copyright sentence when an agency needs different wording.\n */\nfunction FooterSmallPrint({\n className,\n department,\n socialLinks,\n year = new Date().getFullYear(),\n children,\n ref,\n ...props\n}: FooterSmallPrintProps) {\n return (\n <div\n data-slot='footer-small-print'\n {...props}\n className={cn(\n 'flex items-center justify-between gap-5 pt-4 max-sm:flex-col sm:flex-row',\n className,\n )}\n ref={ref}\n >\n <p className='text-sm text-(--footer-ink) max-lg:text-center lg:text-left'>\n {children ?? (\n <>\n © Copyright {year}\n {department ? ` ${department}` : ''}. All rights reserved.\n </>\n )}\n </p>\n {socialLinks && socialLinks.length > 0 && (\n <ul className='flex list-none gap-4 max-lg:justify-center lg:justify-end'>\n {socialLinks.map((item) => (\n <li key={item.name}>\n <FooterSocialLink\n href={item.href}\n icon={item.icon}\n label={item.label ?? `Follow us on ${item.name}`}\n />\n </li>\n ))}\n </ul>\n )}\n </div>\n )\n}\n\ntype FooterProps = React.ComponentPropsWithoutRef<'footer'> &\n VariantProps<typeof footerVariants> &\n VariantProps<typeof footerContainerVariants> & {\n /** Supporting/legal links — privacy, accessibility, copyright, etc. */\n legalLinks?: FooterLegalLinkItem[]\n /** Social channels rendered as icon-only links beside the copyright line. */\n socialLinks?: FooterSocialLinkItem[]\n /** Owning agency, named in the copyright line. */\n department?: string\n /**\n * Acknowledgement of Country. `true` (default) renders the standard\n * wording, `false` omits it, and a node replaces the wording.\n */\n acknowledgement?: boolean | React.ReactNode\n /**\n * Copyright line and social channels. Defaults to `true` — the copyright\n * line renders even with no `department` to name, since it is the footer's\n * core content.\n */\n smallPrint?: boolean\n /** Rule along the top edge of the footer content. Defaults to `true`. */\n topBorder?: boolean\n /** Copyright year. See `FooterSmallPrint` for the SSR caveat. */\n year?: number\n /** Classes applied to the inner width-constraining wrapper. */\n containerClassName?: string\n /**\n * Extra content rendered above the acknowledgement — a logo, contact\n * details, or link columns.\n */\n children?: React.ReactNode\n ref?: React.Ref<HTMLElement>\n }\n\n/**\n * End-of-page `contentinfo` landmark: acknowledgement of Country, supporting\n * links, ownership and social channels. Render it once in a shared layout so\n * the same content appears on every page.\n *\n * - `color` themes the surface and names its light-mode tone; dark mode deepens\n * it onto the same family's dark steps. Every option meets WCAG 2.2 AA in\n * light mode and AAA in dark (see `footerColors`). All link, border and hover\n * colours derive from the surface's ink, so they follow automatically in both\n * themes.\n * - `container` selects the inner wrapper layout: `fluid` (full-bleed,\n * nswds-app parity) or `contained` (centred 1200px column, legacy\n * `nsw-container` parity). Fine-tune either with the `--footer-max-width`\n * and `--footer-padding-x` custom properties.\n * - Each section is independently omissible: `acknowledgement={false}`,\n * `smallPrint={false}`, or simply pass no `legalLinks` (an empty nav\n * landmark is never rendered). The rule between the acknowledgement and the\n * link row appears only when there is content on both sides of it.\n *\n * For a layout this does not cover, compose `FooterAcknowledgement`,\n * `FooterLegalLinks`, `FooterSmallPrint` and `FooterSocialLink` directly\n * inside your own `<footer>` — they all read the same `--footer-*` tokens.\n */\nfunction Footer({\n className,\n color,\n container,\n containerClassName,\n legalLinks = [],\n socialLinks,\n department,\n acknowledgement = true,\n smallPrint = true,\n topBorder = true,\n year,\n children,\n ref,\n ...props\n}: FooterProps) {\n // Boolean() rather than `!== false`: an empty string or 0 reaching this prop\n // would otherwise render an empty acknowledgement block.\n const showAcknowledgement = Boolean(acknowledgement)\n const showLegalLinks = legalLinks.length > 0\n\n return (\n <footer\n data-slot='footer'\n data-color={color ?? DEFAULT_FOOTER_COLOR}\n {...props}\n className={cn(footerVariants({ color }), className)}\n ref={ref}\n >\n <div\n data-slot='footer-container'\n className={cn(footerContainerVariants({ container }), containerClassName)}\n >\n {topBorder && <Separator decorative className='mb-4 bg-(--footer-border)' />}\n {children}\n {showAcknowledgement && (\n <FooterAcknowledgement>\n {acknowledgement === true ? undefined : acknowledgement}\n </FooterAcknowledgement>\n )}\n {/* Only a divider — never a boundary between two empty regions. */}\n {showAcknowledgement && (showLegalLinks || smallPrint) && (\n <Separator decorative className='my-4 bg-(--footer-border)' />\n )}\n {showLegalLinks && <FooterLegalLinks legalLinks={legalLinks} />}\n {smallPrint && (\n <FooterSmallPrint department={department} socialLinks={socialLinks} year={year} />\n )}\n </div>\n </footer>\n )\n}\n\nexport {\n Footer,\n FooterAcknowledgement,\n footerColors,\n footerContainerVariants,\n FooterLegalLinks,\n FooterNav,\n FooterNavColumn,\n FooterNavLink,\n FooterSmallPrint,\n FooterSocialLink,\n footerVariants,\n}\nexport type {\n FooterAcknowledgementProps,\n FooterColor,\n FooterLegalLinkItem,\n FooterLegalLinksProps,\n FooterLinkItem,\n FooterNavColumnProps,\n FooterNavLinkProps,\n FooterNavProps,\n FooterProps,\n FooterSmallPrintProps,\n FooterSocialLinkItem,\n FooterSocialLinkProps,\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/footer.tsx"],"names":[],"mappings":";;;;;;;AAyBA,MAAM,YAAA,GAAe;AAAA,EACnB,aAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF;AAMA,MAAM,oBAAA,GAAoC,OAAA;AAO1C,MAAM,2CAA2B,IAAI,GAAA,CAAiB,CAAC,aAAA,EAAe,UAAA,EAAY,YAAY,CAAC,CAAA;AAO/F,MAAM,uCAAuB,IAAI,GAAA,CAAiB,CAAC,aAAA,EAAe,UAAA,EAAY,YAAY,CAAC,CAAA;AAU3F,SAAS,uBAAuB,KAAA,EAAoB;AAClD,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,YAAA,EAAc;AACzC,IAAA;AAAA,EACF;AACA,EA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C,CAAA;AAAA,YAGD,mBAAA,KAAwB,kBAAkB,UAAA,CAAA,oBACzC,GAAA,CAAC,aAAU,UAAA,EAAU,IAAA,EAAC,WAAU,2BAAA,EAA4B,CAAA;AAAA,YAE7D,cAAA,oBAAkB,GAAA,CAAC,gBAAA,EAAA,EAAiB,UAAA,EAAwB,CAAA;AAAA,YAC5D,UAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAiB,UAAA,EAAwB,aAA0B,IAAA,EAAY;AAAA;AAAA;AAAA;AAEpF;AAAA,GACF;AAEJ","file":"footer.js","sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\nimport { ButtonLink, type IconSlot, TouchTarget } from '../components/button.js'\nimport { Link } from '../components/link.js'\nimport { Separator } from '../components/separator.js'\n\n/**\n * Surface colours the footer can be themed with. Each one names its LIGHT-mode\n * surface; dark mode deepens it onto the same family's dark steps (see the\n * `color` variants below), so `color` expresses tonal weight rather than a\n * literal colour.\n *\n * Every light pair clears WCAG 2.2 AA (1.4.3, 4.5:1) for the footer's smallest\n * text and 11 of the 13 also clear AAA (1.4.6, 7:1). The two AA-only pairs are\n * `primary-600` (4.57:1) and `accent-600` (5.18:1), both with white ink; prefer\n * the `-800` steps when a service is held to AAA. In dark mode all thirteen\n * clear AAA (worst 13.6:1).\n *\n * Unlike `Masthead` — which is restricted to verified AAA pairs because it is\n * legally-mandated identification — the footer carries supporting content, so\n * the full tonal range is offered here.\n */\nconst footerColors = [\n 'primary-800',\n 'primary-600',\n 'primary-400',\n 'primary-200',\n 'grey-800',\n 'grey-600',\n 'grey-400',\n 'grey-200',\n 'accent-800',\n 'accent-600',\n 'accent-400',\n 'accent-200',\n 'white',\n] as const\n\ntype FooterColor = (typeof footerColors)[number]\n\n// Shared by cva's defaultVariants and the data-color attribute, so the two\n// can't drift apart.\nconst DEFAULT_FOOTER_COLOR: FooterColor = 'white'\n\n/**\n * Surfaces dark enough that the full-colour mark is illegible but the waratah\n * still reads — the `-800` steps. These take the masterbrand's \"full colour\n * reversed\" logo: white wordmark, red waratah.\n */\nconst footerReversedLogoColors = new Set<FooterColor>(['primary-800', 'grey-800', 'accent-800'])\n\n/**\n * Mid-tone surfaces — the `-600` steps — where NEITHER masterbrand colourway is\n * legible, so the restricted mono logo is the only option left. See\n * `footerLogoType` for the approval this carries.\n */\nconst footerMonoLogoColors = new Set<FooterColor>(['primary-600', 'grey-600', 'accent-600'])\n\n/**\n * Dev-only notice that a surface has forced the mark onto the mono logo. The\n * masterbrand guidelines class mono as RESTRICTED USE ONLY — \"only when a\n * design cannot accommodate for the full colour or reverse (red waratah)\n * logos\" — and require approval from the NSW Government Brand Team before it\n * is used. A design system cannot grant that approval, so it says so rather\n * than applying the treatment silently. No-op in production.\n */\nfunction warnIfMonoLogoRequired(color: FooterColor) {\n if (process.env.NODE_ENV === 'production') {\n return\n }\n console.warn(\n `[nswds/ui] Footer color=\"${color}\" leaves the NSW Government logo no legible masterbrand colourway, so the RESTRICTED mono logo is used. The guidelines require NSW Government Brand Team approval for mono. Prefer the \"-800\" step of this family, which takes the sanctioned reversed logo.`,\n )\n}\n\n/**\n * The `Logo` treatment the masterbrand guidelines call for on a given footer\n * surface.\n *\n * The brand mark does not inherit: its wordmark and waratah are painted from\n * fixed palette values under `logoType='default'`, so nothing in the footer's\n * ink chain reaches them and the treatment has to be chosen against the\n * surface. Getting it wrong is not subtle — `--primary-800` and\n * `--nsw-blue-800` are the same value, so `default` on a `primary-800` footer\n * paints the wordmark in exactly its own background at 1:1 contrast.\n *\n * The guidelines rank the colourways, and this follows that order:\n *\n * - **Full colour (`default`)** \"must be given preference over all other\n * versions\". Used on every light surface.\n * - **Full colour reversed (`reversed`)** is the sanctioned alternative \"where\n * the primary logo is illegible\" — the `-800` steps. Measured against those\n * three surfaces the white wordmark runs 13.6–15.1:1 and the waratah\n * 2.6–2.9:1, so both halves of the mark read.\n * - **Mono is RESTRICTED USE ONLY** and needs Brand Team approval. It is the\n * last resort here, not the default, and only the `-600` steps reach it:\n * against those the waratah measures 1.00, 1.13 and 1.59:1 — on\n * `accent-600` it is literally the same value as the surface\n * (`--accent-600` IS `--nsw-red-600`), so a reversed mark would lose its\n * flower exactly the way `default` lost its wordmark. That matches the\n * guidelines' own accessibility table, where the mid-tone row is crossed\n * for full colour AND for reversed.\n *\n * Light mode only, in every case: under `.dark` the mark's waratah flips to\n * white and every surface deepens, so all thirteen render an all-white logo.\n */\nfunction footerLogoType(color?: FooterColor | null): 'default' | 'reversed' | 'mono-white' {\n const resolved = color ?? DEFAULT_FOOTER_COLOR\n if (footerReversedLogoColors.has(resolved)) {\n return 'reversed'\n }\n if (footerMonoLogoColors.has(resolved)) {\n warnIfMonoLogoRequired(resolved)\n return 'mono-white'\n }\n return 'default'\n}\n\nconst footerVariants = cva(\n [\n 'w-full',\n // Every derived colour in the footer resolves from a single --footer-ink\n // token, so a colour variant only has to declare the surface utilities and\n // that one value. The derivations are written literally here (once) rather\n // than per-variant: Tailwind scans source text for class names, so a\n // template-built arbitrary property would never be emitted.\n //\n // Mirrors the color-mix derivation in link.tsx (--link-halo).\n '[--footer-border:color-mix(in_oklch,var(--footer-ink)_15%,transparent)]',\n '[--footer-halo:color-mix(in_oklch,var(--footer-ink)_10%,transparent)]',\n '[--footer-halo-active:color-mix(in_oklch,var(--footer-ink)_18%,transparent)]',\n ],\n {\n variants: {\n // Ink values use the RAW masterbrand tokens (--primary-800, --grey-800,\n // --accent-800) rather than Tailwind's --color-* bridge aliases. Tailwind\n // v4 tree-shakes an unreferenced @theme key, and referencing one from\n // inside an arbitrary property is not a usage signal — the raw tokens are\n // plain :root declarations from @nswds/tokens and always resolve.\n // (--color-white is safe: `text-white` / `bg-white` below are real\n // utilities, so that key is always emitted.)\n //\n // Note: a bracketed example in a comment here would itself be scanned by\n // Tailwind and emitted as a dead rule — keep such examples out of prose.\n // Dark mode deepens every surface onto the same family's dark steps —\n // -800→-950, -600→-900, -400→-850, -200→-800, white→grey-900 — so the\n // luminance ORDER within a family is preserved: the variant named for the\n // heaviest tone stays the heaviest. Ink goes white on all thirteen, and\n // every dark pair is WCAG 2.2 AAA (worst 13.6:1) — better than light\n // mode, where primary-600 and accent-600 are AA-only.\n color: {\n 'primary-800':\n 'bg-primary-800 text-white [--footer-ink:var(--color-white)] dark:bg-primary-950',\n 'primary-600':\n 'bg-primary-600 text-white [--footer-ink:var(--color-white)] dark:bg-primary-900',\n 'primary-400':\n 'bg-primary-400 text-primary-800 [--footer-ink:var(--primary-800)] dark:bg-primary-850 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'primary-200':\n 'bg-primary-200 text-primary-800 [--footer-ink:var(--primary-800)] dark:bg-primary-800 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'grey-800': 'bg-grey-800 text-white [--footer-ink:var(--color-white)] dark:bg-grey-950',\n 'grey-600': 'bg-grey-600 text-white [--footer-ink:var(--color-white)] dark:bg-grey-900',\n 'grey-400':\n 'bg-grey-400 text-grey-800 [--footer-ink:var(--grey-800)] dark:bg-grey-850 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'grey-200':\n 'bg-grey-200 text-grey-800 [--footer-ink:var(--grey-800)] dark:bg-grey-800 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'accent-800':\n 'bg-accent-800 text-white [--footer-ink:var(--color-white)] dark:bg-accent-950',\n 'accent-600':\n 'bg-accent-600 text-white [--footer-ink:var(--color-white)] dark:bg-accent-900',\n 'accent-400':\n 'bg-accent-400 text-accent-800 [--footer-ink:var(--accent-800)] dark:bg-accent-850 dark:text-white dark:[--footer-ink:var(--color-white)]',\n 'accent-200':\n 'bg-accent-200 text-accent-800 [--footer-ink:var(--accent-800)] dark:bg-accent-800 dark:text-white dark:[--footer-ink:var(--color-white)]',\n white:\n 'bg-white text-grey-800 [--footer-ink:var(--grey-800)] dark:bg-grey-900 dark:text-white dark:[--footer-ink:var(--color-white)]',\n },\n },\n defaultVariants: {\n color: DEFAULT_FOOTER_COLOR,\n },\n },\n)\n\nconst footerContainerVariants = cva(\n [\n 'mx-auto flex w-full flex-col max-sm:py-6 sm:py-8',\n // Lateral padding funnels through --footer-padding-x so an app can retune\n // it once (via the `style` prop or a utility class) without a new variant.\n // Same mechanism, and the same 16px → 24px → 48px rhythm, as the Masthead.\n 'px-(--footer-padding-x)',\n '[--footer-padding-x:--spacing(4)] sm:[--footer-padding-x:--spacing(6)] lg:[--footer-padding-x:--spacing(12)]',\n ],\n {\n variants: {\n container: {\n // Full-bleed (nswds-app parity). --footer-max-width is still read so a\n // shell app can constrain the inner wrapper without switching variants.\n fluid: 'max-w-[var(--footer-max-width,none)]',\n // Centred content column, legacy nsw-container parity (1200px).\n contained: 'max-w-[var(--footer-max-width,75rem)]',\n },\n },\n defaultVariants: {\n container: 'fluid',\n },\n },\n)\n\n/** A link rendered anywhere in the footer — legal row or site-map column. */\ntype FooterLinkItem = {\n /** Visible link text, e.g. \"Privacy\". */\n name: string\n href: string\n}\n\n/** Alias kept for the legal-links context, where the name reads better. */\ntype FooterLegalLinkItem = FooterLinkItem\n\n/** A social channel rendered as an icon-only link in the small print row. */\ntype FooterSocialLinkItem = {\n /** Channel name, e.g. \"LinkedIn\". Used to build the accessible name. */\n name: string\n href: string\n /**\n * Icon for the channel — the component (`IconLinkedIn`) or an element\n * (`<IconLinkedIn />`). Brand marks (LinkedIn, X, Facebook…) are not part of\n * the NSWDS icon set — which is Material Symbols — so the mark is supplied by\n * the consuming app. It is rendered through `ButtonLink`'s `leadingVisual`\n * slot, which sizes and colours it.\n *\n * `Footer` is server-compatible but `ButtonLink` is not, so a React Server\n * Component assembling `socialLinks` must use the element form; the component\n * form cannot cross the RSC boundary. See `IconSlot`.\n */\n icon: IconSlot\n /**\n * Accessible name for the link. Defaults to `Follow us on {name}`.\n */\n label?: string\n}\n\n// One link treatment for the whole footer — legal row and site-map columns\n// alike — so a consumer never has to reason about which kind they are styling.\nconst footerLinkClassName = [\n // Negative margin + padding keeps the hover/focus halo from shifting layout.\n '-m-1 rounded-sm p-1 text-(--footer-ink)',\n // relative + inline-flex position the TouchTarget expansion layer these links\n // render (see FooterNavLink / FooterLegalLinks). At text-sm the visible box is\n // 28px — 20px line box plus the 8px of padding above — which clears WCAG 2.2\n // AA 2.5.8 (24px) but sits well under the 44px floor DESIGN.md commits the\n // system to, and which the sibling FooterSocialLink already gets for free by\n // going through ButtonLink. Growing the box instead would have pushed a\n // mobile site map roughly 300px taller and broken the icon alignment in\n // FooterContact, so the hit area grows and the layout does not. inline-flex\n // (not inline) gives the absolutely-positioned layer a predictable box to\n // measure 100% against — an inline <a> that wraps has no single box.\n //\n // The list gaps are deliberately NOT widened to stop adjacent expansions\n // overlapping. In a site-map column the 28px boxes sit 8px apart, so 44px\n // layers overlap by 8px and each link's exclusive area is the 36px between\n // midpoints — still better than 28px boxes separated by 8px of dead gap,\n // and it leaves no unclickable band at all. Widening the gap under\n // `pointer:coarse` would also mean pairing a bare utility with a conditional\n // override of the same property, which check:cascade rejects, and guarding\n // it with `pointer:fine` instead would drop the gap to zero on `pointer:none`\n // devices.\n 'relative inline-flex items-center',\n 'underline decoration-current underline-offset-4',\n 'motion-safe:transition-colors',\n 'hover:bg-(--footer-halo) hover:decoration-2',\n 'active:bg-(--footer-halo-active) active:decoration-2',\n // outline-(--footer-ink) guarantees the indicator contrasts with the surface\n // on every colour variant (2.4.13 Focus Appearance).\n 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--footer-ink)',\n].join(' ')\n\n// Repoints ButtonLink's ghost-variant tokens at the footer's ink and halos so\n// the social buttons follow the surface colour instead of the button palette.\n// The `dark:` repeat is load-bearing, not redundant: `styles.colors` in\n// button.tsx gives each colour a `dark:[--btn-bg:…]` ink counterpart, which\n// would otherwise outrank the bare declaration here and repaint these glyphs in\n// the palette's ink. Restating it under the same variant makes the two\n// equal-specificity, and tailwind-merge keeps this one because the component's\n// className is merged last. `--footer-ink` already resolves per theme.\nconst footerSocialLinkClassName = [\n '[--btn-bg:var(--footer-ink)] dark:[--btn-bg:var(--footer-ink)]',\n '[--btn-icon:var(--footer-ink)]',\n '[--btn-transparent:transparent]',\n '[--btn-hover-overlay:var(--footer-halo)]',\n '[--btn-active-overlay:var(--footer-halo-active)]',\n].join(' ')\n\ntype FooterSocialLinkProps = Omit<\n React.ComponentPropsWithoutRef<typeof ButtonLink>,\n 'children' | 'color' | 'leadingVisual' | 'size' | 'variant'\n> & {\n /** Channel mark — component or element. See `IconSlot`. */\n icon: IconSlot\n /** Accessible name, e.g. \"Follow us on LinkedIn\". */\n label: string\n}\n\n/**\n * Icon-only link to a social channel. Renders through `ButtonLink`, so it\n * picks up the framework link component from `LinkProvider` and the 44px touch\n * target. The label is supplied as `aria-label` — there is no visible text.\n */\nfunction FooterSocialLink({ className, icon, label, ...props }: FooterSocialLinkProps) {\n return (\n <ButtonLink\n data-slot='footer-social-link'\n {...props}\n aria-label={label}\n variant='ghost'\n size='icon'\n leadingVisual={icon}\n className={cn(footerSocialLinkClassName, className)}\n />\n )\n}\n\ntype FooterAcknowledgementProps = React.ComponentPropsWithoutRef<'div'> & {\n ref?: React.Ref<HTMLDivElement>\n}\n\n/**\n * Acknowledgement of Country. Renders the standard NSW Government wording\n * unless `children` are supplied — pass your own text when an agency has\n * agreed different wording with the relevant Traditional Custodians.\n */\nfunction FooterAcknowledgement({ className, children, ref, ...props }: FooterAcknowledgementProps) {\n return (\n <div\n data-slot='footer-acknowledgement'\n {...props}\n className={cn('flex flex-row items-center gap-5 py-4', className)}\n ref={ref}\n >\n <p className='text-base text-pretty text-(--footer-ink) max-lg:text-center lg:text-left'>\n {children ??\n 'We acknowledge the Traditional Custodians of the land on which we work and live, and pay our respects to Elders past, present and emerging.'}\n </p>\n </div>\n )\n}\n\ntype FooterLegalLinksProps = Omit<React.ComponentPropsWithoutRef<'nav'>, 'children'> & {\n legalLinks: FooterLegalLinkItem[]\n ref?: React.Ref<HTMLElement>\n}\n\n/**\n * Navigation landmark holding the footer's supporting/legal links. Renders\n * nothing when `legalLinks` is empty, so an empty landmark is never exposed to\n * assistive tech.\n */\nfunction FooterLegalLinks({\n className,\n legalLinks,\n 'aria-label': ariaLabel = 'Footer',\n ref,\n ...props\n}: FooterLegalLinksProps) {\n if (legalLinks.length === 0) {\n return null\n }\n\n return (\n <nav\n data-slot='footer-legal-links'\n {...props}\n aria-label={ariaLabel}\n className={cn(\n 'flex flex-wrap gap-x-4 gap-y-3 py-4 text-sm max-lg:justify-center lg:justify-start',\n className,\n )}\n ref={ref}\n >\n {legalLinks.map((item) => (\n // variant='unstyled' — the footer supplies its own link treatment,\n // derived from --footer-ink so it tracks the surface colour. Link's own\n // variants are pinned to the primary palette (and flip in dark mode),\n // which would break on a coloured footer.\n <Link key={item.name} variant='unstyled' href={item.href} className={footerLinkClassName}>\n <TouchTarget>{item.name}</TouchTarget>\n </Link>\n ))}\n </nav>\n )\n}\n\ntype FooterNavLinkProps = Omit<React.ComponentPropsWithoutRef<typeof Link>, 'variant'>\n\n/**\n * A single site-map link, carrying the same ink-derived treatment as the legal\n * row. Exposed so a bespoke column layout (a mobile accordion, say) can match\n * the built-in columns without copying class strings.\n */\nfunction FooterNavLink({ className, children, ...props }: FooterNavLinkProps) {\n return (\n <Link\n data-slot='footer-nav-link'\n variant='unstyled'\n {...props}\n className={cn(footerLinkClassName, className)}\n >\n <TouchTarget>{children}</TouchTarget>\n </Link>\n )\n}\n\ntype FooterNavProps = React.ComponentPropsWithoutRef<'nav'> & {\n ref?: React.Ref<HTMLElement>\n}\n\n/**\n * Navigation landmark wrapping the footer's site-map columns.\n *\n * One landmark for the whole site map rather than one per column: a large\n * footer would otherwise add five nav landmarks to the page, burying the ones\n * that matter when a screen-reader user lists them. Columns are headed lists\n * inside it. The default four-column grid is overridable — `cn` lets a\n * `lg:grid-cols-3` on `className` win.\n */\nfunction FooterNav({\n className,\n 'aria-label': ariaLabel = 'Site map',\n ref,\n ...props\n}: FooterNavProps) {\n return (\n <nav\n data-slot='footer-nav'\n {...props}\n aria-label={ariaLabel}\n className={cn('grid gap-8 py-4 sm:max-lg:grid-cols-2 lg:grid-cols-4', className)}\n ref={ref}\n />\n )\n}\n\ntype FooterNavColumnProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> & {\n heading: React.ReactNode\n links: FooterLinkItem[]\n /**\n * Heading level for the column title. Defaults to `2` — correct when the\n * footer sits at the top level of the document outline. Step it down if the\n * surrounding page nests the footer under another heading, so the outline\n * stays in order (WCAG 1.3.1).\n *\n * The two bounds are not symmetric. `6` is simply the deepest heading HTML\n * defines. `1` is excluded on purpose: a site-map column title is never the\n * page's own title, so an `h1` here would be the very outline error the prop\n * exists to avoid.\n */\n headingLevel?: 2 | 3 | 4 | 5 | 6\n ref?: React.Ref<HTMLDivElement>\n}\n\n/** A headed column of site-map links. Sits inside `FooterNav`. */\nfunction FooterNavColumn({\n className,\n heading,\n links,\n headingLevel = 2,\n ref,\n ...props\n}: FooterNavColumnProps) {\n const Heading = `h${headingLevel}` as const\n\n return (\n <div\n data-slot='footer-nav-column'\n {...props}\n className={cn('flex flex-col gap-3', className)}\n ref={ref}\n >\n <Heading className='text-sm font-bold text-(--footer-ink)'>{heading}</Heading>\n <ul className='flex list-none flex-col gap-2 text-sm'>\n {links.map((item) => (\n <li key={item.name}>\n <FooterNavLink href={item.href}>{item.name}</FooterNavLink>\n </li>\n ))}\n </ul>\n </div>\n )\n}\n\ntype FooterSmallPrintProps = React.ComponentPropsWithoutRef<'div'> & {\n /** Owning agency, e.g. \"Digital NSW, Department of Customer Service\". */\n department?: string\n socialLinks?: FooterSocialLinkItem[]\n /**\n * Copyright year. Defaults to the current year read at render time — which\n * on a server-rendered page is the *server's* year, so a request that\n * straddles new year (or a server in a different timezone to the audience)\n * can hydrate with a mismatch. Pass an explicit year to pin it.\n */\n year?: number\n ref?: React.Ref<HTMLDivElement>\n}\n\n/**\n * Copyright line and social channels. `children` replace the generated\n * copyright sentence when an agency needs different wording.\n */\nfunction FooterSmallPrint({\n className,\n department,\n socialLinks,\n year = new Date().getFullYear(),\n children,\n ref,\n ...props\n}: FooterSmallPrintProps) {\n return (\n <div\n data-slot='footer-small-print'\n {...props}\n className={cn(\n 'flex items-center justify-between gap-5 pt-4 max-sm:flex-col sm:flex-row',\n className,\n )}\n ref={ref}\n >\n <p className='text-sm text-(--footer-ink) max-lg:text-center lg:text-left'>\n {children ?? (\n <>\n © Copyright {year}\n {department ? ` ${department}` : ''}. All rights reserved.\n </>\n )}\n </p>\n {socialLinks && socialLinks.length > 0 && (\n <ul className='flex list-none gap-4 max-lg:justify-center lg:justify-end'>\n {socialLinks.map((item) => (\n <li key={item.name}>\n <FooterSocialLink\n href={item.href}\n icon={item.icon}\n label={item.label ?? `Follow us on ${item.name}`}\n />\n </li>\n ))}\n </ul>\n )}\n </div>\n )\n}\n\ntype FooterProps = React.ComponentPropsWithoutRef<'footer'> &\n VariantProps<typeof footerVariants> &\n VariantProps<typeof footerContainerVariants> & {\n /** Supporting/legal links — privacy, accessibility, copyright, etc. */\n legalLinks?: FooterLegalLinkItem[]\n /** Social channels rendered as icon-only links beside the copyright line. */\n socialLinks?: FooterSocialLinkItem[]\n /** Owning agency, named in the copyright line. */\n department?: string\n /**\n * Acknowledgement of Country. `true` (default) renders the standard\n * wording, `false` omits it, and a node replaces the wording.\n */\n acknowledgement?: boolean | React.ReactNode\n /**\n * Copyright line and social channels. Defaults to `true` — the copyright\n * line renders even with no `department` to name, since it is the footer's\n * core content.\n */\n smallPrint?: boolean\n /** Rule along the top edge of the footer content. Defaults to `true`. */\n topBorder?: boolean\n /** Copyright year. See `FooterSmallPrint` for the SSR caveat. */\n year?: number\n /** Classes applied to the inner width-constraining wrapper. */\n containerClassName?: string\n /**\n * Extra content rendered above the acknowledgement — a logo, contact\n * details, or link columns.\n */\n children?: React.ReactNode\n ref?: React.Ref<HTMLElement>\n }\n\n/**\n * End-of-page `contentinfo` landmark: acknowledgement of Country, supporting\n * links, ownership and social channels. Render it once in a shared layout so\n * the same content appears on every page.\n *\n * - `color` themes the surface and names its light-mode tone; dark mode deepens\n * it onto the same family's dark steps. Every option meets WCAG 2.2 AA in\n * light mode and AAA in dark (see `footerColors`). All link, border and hover\n * colours derive from the surface's ink, so they follow automatically in both\n * themes.\n * - `container` selects the inner wrapper layout: `fluid` (full-bleed,\n * nswds-app parity) or `contained` (centred 1200px column, legacy\n * `nsw-container` parity). Fine-tune either with the `--footer-max-width`\n * and `--footer-padding-x` custom properties.\n * - Each section is independently omissible: `acknowledgement={false}`,\n * `smallPrint={false}`, or simply pass no `legalLinks` (an empty nav\n * landmark is never rendered). The rule between the acknowledgement and the\n * link row appears only when there is content on both sides of it.\n *\n * For a layout this does not cover, compose `FooterAcknowledgement`,\n * `FooterLegalLinks`, `FooterSmallPrint` and `FooterSocialLink` directly\n * inside your own `<footer>` — they all read the same `--footer-*` tokens.\n */\nfunction Footer({\n className,\n color,\n container,\n containerClassName,\n legalLinks = [],\n socialLinks,\n department,\n acknowledgement = true,\n smallPrint = true,\n topBorder = true,\n year,\n children,\n ref,\n ...props\n}: FooterProps) {\n // Boolean() rather than `!== false`: an empty string or 0 reaching this prop\n // would otherwise render an empty acknowledgement block.\n const showAcknowledgement = Boolean(acknowledgement)\n const showLegalLinks = legalLinks.length > 0\n\n return (\n <footer\n data-slot='footer'\n data-color={color ?? DEFAULT_FOOTER_COLOR}\n {...props}\n className={cn(footerVariants({ color }), className)}\n ref={ref}\n >\n <div\n data-slot='footer-container'\n className={cn(footerContainerVariants({ container }), containerClassName)}\n >\n {topBorder && <Separator decorative className='mb-4 bg-(--footer-border)' />}\n {children}\n {showAcknowledgement && (\n <FooterAcknowledgement>\n {acknowledgement === true ? undefined : acknowledgement}\n </FooterAcknowledgement>\n )}\n {/* Only a divider — never a boundary between two empty regions. */}\n {showAcknowledgement && (showLegalLinks || smallPrint) && (\n <Separator decorative className='my-4 bg-(--footer-border)' />\n )}\n {showLegalLinks && <FooterLegalLinks legalLinks={legalLinks} />}\n {smallPrint && (\n <FooterSmallPrint department={department} socialLinks={socialLinks} year={year} />\n )}\n </div>\n </footer>\n )\n}\n\nexport {\n Footer,\n FooterAcknowledgement,\n footerColors,\n footerContainerVariants,\n FooterLegalLinks,\n footerLogoType,\n FooterNav,\n FooterNavColumn,\n FooterNavLink,\n FooterSmallPrint,\n FooterSocialLink,\n footerVariants,\n}\nexport type {\n FooterAcknowledgementProps,\n FooterColor,\n FooterLegalLinkItem,\n FooterLegalLinksProps,\n FooterLinkItem,\n FooterNavColumnProps,\n FooterNavLinkProps,\n FooterNavProps,\n FooterProps,\n FooterSmallPrintProps,\n FooterSocialLinkItem,\n FooterSocialLinkProps,\n}\n"]}
|
|
@@ -2,6 +2,13 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
|
|
5
|
+
declare const mastheadColors: {
|
|
6
|
+
dark: string;
|
|
7
|
+
light: string;
|
|
8
|
+
white: string;
|
|
9
|
+
grey: string;
|
|
10
|
+
};
|
|
11
|
+
type MastheadColor = keyof typeof mastheadColors;
|
|
5
12
|
declare const mastheadVariants: (props?: ({
|
|
6
13
|
color?: "light" | "white" | "grey" | "dark" | null | undefined;
|
|
7
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -31,4 +38,4 @@ type MastheadProps = React__default.ComponentPropsWithoutRef<'div'> & VariantPro
|
|
|
31
38
|
*/
|
|
32
39
|
declare function Masthead({ className, color, container, containerClassName, children, ref, ...props }: MastheadProps): React__default.JSX.Element;
|
|
33
40
|
|
|
34
|
-
export { Masthead, type MastheadProps, mastheadContainerVariants, mastheadVariants };
|
|
41
|
+
export { Masthead, type MastheadColor, type MastheadProps, mastheadContainerVariants, mastheadVariants };
|
|
@@ -3,21 +3,21 @@ import { cva } from 'class-variance-authority';
|
|
|
3
3
|
import { cn } from '../lib/utils.js';
|
|
4
4
|
|
|
5
5
|
const mastheadColors = {
|
|
6
|
-
// Legacy .nsw-masthead (brand dark).
|
|
7
|
-
// original nswds-app implementation.
|
|
6
|
+
// Legacy .nsw-masthead (brand dark).
|
|
8
7
|
dark: "bg-primary-800 text-white dark:bg-primary-950",
|
|
9
8
|
// Legacy .nsw-masthead--light (off-white). grey-100 is the same value as
|
|
10
9
|
// the legacy --nsw-off-white (#f2f2f2).
|
|
11
|
-
light: "bg-grey-100 text-grey-900",
|
|
12
|
-
white: "bg-white text-grey-900",
|
|
13
|
-
grey: "bg-grey-800 text-white"
|
|
10
|
+
light: "bg-grey-100 text-grey-900 dark:bg-grey-850 dark:text-white",
|
|
11
|
+
white: "bg-white text-grey-900 dark:bg-grey-900 dark:text-white",
|
|
12
|
+
grey: "bg-grey-800 text-white dark:bg-grey-950"
|
|
14
13
|
};
|
|
14
|
+
const DEFAULT_MASTHEAD_COLOR = "dark";
|
|
15
15
|
const mastheadVariants = cva("w-full text-xs", {
|
|
16
16
|
variants: {
|
|
17
17
|
color: mastheadColors
|
|
18
18
|
},
|
|
19
19
|
defaultVariants: {
|
|
20
|
-
color:
|
|
20
|
+
color: DEFAULT_MASTHEAD_COLOR
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const mastheadContainerVariants = cva(
|
|
@@ -59,6 +59,7 @@ function Masthead({
|
|
|
59
59
|
{
|
|
60
60
|
id: "nsw-masthead",
|
|
61
61
|
"data-slot": "masthead",
|
|
62
|
+
"data-color": color ?? DEFAULT_MASTHEAD_COLOR,
|
|
62
63
|
...props,
|
|
63
64
|
className: cn(mastheadVariants({ color }), className),
|
|
64
65
|
ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/masthead.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"sources":["../../src/components/masthead.tsx"],"names":[],"mappings":";;;;AAqBA,MAAM,cAAA,GAAiB;AAAA;AAAA,EAErB,IAAA,EAAM,+CAAA;AAAA;AAAA;AAAA,EAGN,KAAA,EAA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EzE,QAAA,EAAA,QAAA,IAAY;AAAA;AAAA;AACf;AAAA,GACF;AAEJ","file":"masthead.js","sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\n// Colour pairs are curated for WCAG 2.2 AAA (1.4.6 Contrast Enhanced): every\n// text/background combination below resolves to at least 7:1, in BOTH themes.\n// This is why the Masthead does not accept the full Button colour palette —\n// accent/danger/warning backgrounds with white text sit under 7:1 and would\n// silently break the AAA guarantee. Add new colours only with a verified pair.\n//\n// Light mode: 14.4 (dark), 17.4 (light), 19.0 (white), 15.1 (grey).\n// Dark mode: 20.0 (dark), 17.2 (light), 19.0 (white), 20.2 (grey).\n//\n// Every variant deepens in dark mode, on the same ramp steps `Header` uses —\n// -100→-850, white→-900, -800→-950 — because the two are designed to be themed\n// together and sit flush against each other. Only `dark` used to flip: a\n// `white` masthead stayed pure white above a `grey-900` header, an 18.9:1 band\n// across the top of a dark page, and `light` did the same at 15.8:1. The\n// asymmetry was the tell that this was an omission rather than a policy — a\n// deliberately theme-invariant set would not have flipped one of its four.\nconst mastheadColors = {\n // Legacy .nsw-masthead (brand dark).\n dark: 'bg-primary-800 text-white dark:bg-primary-950',\n // Legacy .nsw-masthead--light (off-white). grey-100 is the same value as\n // the legacy --nsw-off-white (#f2f2f2).\n light: 'bg-grey-100 text-grey-900 dark:bg-grey-850 dark:text-white',\n white: 'bg-white text-grey-900 dark:bg-grey-900 dark:text-white',\n grey: 'bg-grey-800 text-white dark:bg-grey-950',\n}\n\ntype MastheadColor = keyof typeof mastheadColors\n\n// Shared by cva's defaultVariants and the data-color attribute, so the two\n// can't drift apart — the same arrangement as Header, Footer and MainNav.\nconst DEFAULT_MASTHEAD_COLOR: MastheadColor = 'dark'\n\nconst mastheadVariants = cva('w-full text-xs', {\n variants: {\n color: mastheadColors,\n },\n defaultVariants: {\n color: DEFAULT_MASTHEAD_COLOR,\n },\n})\n\nconst mastheadContainerVariants = cva(\n [\n 'mx-auto flex w-full items-center justify-between gap-x-4 py-2',\n // Lateral padding funnels through --masthead-padding-x so an app can\n // retune it once (via the `style` prop or a utility class) without a new\n // variant. Defaults reproduce the nswds-app rhythm: 16px → 24px → 48px.\n 'px-(--masthead-padding-x)',\n '[--masthead-padding-x:--spacing(4)] sm:[--masthead-padding-x:--spacing(6)] lg:[--masthead-padding-x:--spacing(12)]',\n ],\n {\n variants: {\n container: {\n // Full-bleed (nswds-app style). --masthead-max-width is still read so\n // a shell app can constrain the inner wrapper without switching\n // variants (the archive/practice `#nsw-masthead > div` override).\n fluid: 'max-w-[var(--masthead-max-width,none)]',\n // Centred content column, legacy nsw-container parity (1200px).\n contained: 'max-w-[var(--masthead-max-width,75rem)]',\n },\n },\n defaultVariants: {\n container: 'fluid',\n },\n },\n)\n\ntype MastheadProps = React.ComponentPropsWithoutRef<'div'> &\n VariantProps<typeof mastheadVariants> &\n VariantProps<typeof mastheadContainerVariants> & {\n /** Classes applied to the inner width-constraining wrapper. */\n containerClassName?: string\n ref?: React.Ref<HTMLDivElement>\n }\n\n/**\n * The \"A NSW Government website\" strip shown above the site header on every\n * NSW Government page. Successor to the legacy `.nsw-masthead`.\n *\n * - `color` selects a WCAG 2.2 AAA text/background pair (`dark` matches the\n * legacy default, `light` matches the legacy `--light` theme).\n * - `container` selects the inner wrapper layout: `fluid` (full-bleed,\n * nswds-app parity) or `contained` (centred 1200px column, legacy\n * `nsw-container` parity). Fine-tune either with the `--masthead-max-width`\n * and `--masthead-padding-x` custom properties.\n * - Children replace the default message; pass a `SkipLinks` sibling before\n * the Masthead for bypass-blocks support.\n *\n * The default `id=\"nsw-masthead\"` is kept for compatibility with existing\n * shells that target it (override via the `id` prop).\n */\nfunction Masthead({\n className,\n color,\n container,\n containerClassName,\n children,\n ref,\n ...props\n}: MastheadProps) {\n return (\n <div\n id='nsw-masthead'\n data-slot='masthead'\n // Named surface, exposed for styling hooks and test diagnostics — the\n // convention Header, Footer and MainNav already follow.\n data-color={color ?? DEFAULT_MASTHEAD_COLOR}\n {...props}\n className={cn(mastheadVariants({ color }), className)}\n ref={ref}\n >\n <div\n data-slot='masthead-container'\n className={cn(mastheadContainerVariants({ container }), containerClassName)}\n >\n {children ?? 'A NSW Government website'}\n </div>\n </div>\n )\n}\n\nexport { Masthead, mastheadContainerVariants, mastheadVariants }\nexport type { MastheadColor, MastheadProps }\n"]}
|
|
@@ -5,9 +5,9 @@ import { cn } from '../lib/utils.js';
|
|
|
5
5
|
|
|
6
6
|
const skipLinkColors = {
|
|
7
7
|
dark: "bg-primary-800 text-white dark:bg-primary-950",
|
|
8
|
-
light: "bg-grey-100 text-grey-900",
|
|
9
|
-
white: "bg-white text-grey-900",
|
|
10
|
-
grey: "bg-grey-800 text-white"
|
|
8
|
+
light: "bg-grey-100 text-grey-900 dark:bg-grey-850 dark:text-white",
|
|
9
|
+
white: "bg-white text-grey-900 dark:bg-grey-900 dark:text-white",
|
|
10
|
+
grey: "bg-grey-800 text-white dark:bg-grey-950"
|
|
11
11
|
};
|
|
12
12
|
const skipLinkVariants = cva(
|
|
13
13
|
[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/skip-link.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"sources":["../../src/components/skip-link.tsx"],"names":[],"mappings":";;;;AAmBA,MAAM,cAAA,GAAiB;AAAA,EACrB,IAAA,EAAM,+CAAA;AAAA,EACN,KAAA,EAAO,4DAAA;AAAA,EACP,KAAA,EAAO,yDAAA;AAAA,EACP,IAAA,EAAM;AACR,CAAA;AAEA,MAAM,gBAAA,GAAmB,GAAA;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,IAIE,qDAAA;AAAA,IACA,kCAAA;AAAA,IACA,qBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,+EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU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,QAAA,OAAA,GAAU,KAAK,CAAA;AACf,QAAA,IAAI,CAAC,MAAM,gBAAA,EAAkB;AAC3B,UAAA,eAAA,CAAgB,KAAK,CAAA;AAAA,QACvB;AAAA,MACF,CAAA;AAAA,MACA,WAAW,EAAA,CAAG,gBAAA,CAAiB,EAAE,KAAA,EAAO,GAAG,SAAS,CAAA;AAAA,MACpD,GAAA;AAAA,MAEA,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,oGAAA,EACb,QAAA,EACH;AAAA;AAAA,GACF;AAEJ;AA6BA,SAAS,SAAA,CAAU;AAAA,EACjB,SAAA;AAAA,EACA,KAAA;AAAA;AAAA;AAAA;AAAA,EAIA,2BACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAc,IAAA,EAAK,MAAA,EAAO,QAAA,EAAA,oBAAA,EAEpC,CAAA;AAAA,oBACA,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAc,IAAA,EAAK,YAAW,QAAA,EAAA,iBAAA,EAExC;AAAA,GAAA,EACF,CAAA;AAAA,EAEF,GAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAmB;AACjB,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,YAAA,EAAW,YAAA;AAAA,MACX,WAAA,EAAU,YAAA;AAAA,MACT,GAAG,KAAA;AAAA,MACJ,SAAA,EAAW,EAAA,CAAG,mCAAA,EAAqC,SAAS,CAAA;AAAA,MAC5D,GAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ","file":"skip-link.js","sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\n// Same curated WCAG 2.2 AAA (7:1) pairs as the Masthead, in both themes — the\n// two components are designed to be themed together, mirroring how the legacy\n// `masthead-theme` option drove both `.nsw-masthead--light` and\n// `.nsw-skip--light`. Kept as a local map (not imported from masthead.tsx) so\n// each file stays standalone for registry distribution; the duplication is the\n// cost of that, so a change here belongs in masthead.tsx too.\n//\n// The dark-mode steps match Masthead's exactly (-100→-850, white→-900,\n// -800→-950). Previously only `dark` flipped, so a revealed `white` skip link\n// was a pure-white bar on a dark page — worse here than on the Masthead,\n// because this bar appears without warning at the moment a keyboard user takes\n// focus, rather than sitting statically at the top of the page.\nconst skipLinkColors = {\n dark: 'bg-primary-800 text-white dark:bg-primary-950',\n light: 'bg-grey-100 text-grey-900 dark:bg-grey-850 dark:text-white',\n white: 'bg-white text-grey-900 dark:bg-grey-900 dark:text-white',\n grey: 'bg-grey-800 text-white dark:bg-grey-950',\n}\n\nconst skipLinkVariants = cva(\n [\n // Parked above the viewport until focused (legacy translateY(-101%)\n // pattern) — still in the tab order, so it is the first thing keyboard\n // and screen-reader users reach.\n 'absolute inset-x-0 top-0 w-full -translate-y-[101%]',\n 'motion-safe:transition-transform',\n 'focus:translate-y-0',\n // min-h-11 keeps the revealed bar at ≥44px — 2.5.5 Target Size (AAA).\n //\n // text-base, not the legacy text-xs: this is the first thing a keyboard or\n // screen-magnifier user meets on the page, and 12px is below the smallest\n // step DESIGN.md names for running copy. font-medium keeps it in the\n // system's label voice. The bar is min-h-11, and 16px text on py-2 comes\n // to 40px, so the floor still governs the height — nothing moves.\n 'group flex min-h-11 items-center px-4 py-2 text-base font-medium no-underline',\n // The visible focus indicator is the ring around the label span\n // (2.4.13 Focus Appearance): outline-current guarantees it contrasts with\n // the bar on every colour variant. outline-hidden (not outline-none) on\n // the anchor keeps a forced-colors fallback outline.\n 'focus:outline-hidden',\n ],\n {\n variants: {\n color: skipLinkColors,\n },\n defaultVariants: {\n color: 'dark',\n },\n },\n)\n\n/**\n * Move focus to the skip target. Fragment navigation alone only moves the\n * sequential-focus starting point; explicitly focusing the target makes\n * screen readers announce it. Non-focusable targets get a temporary\n * `tabindex=\"-1\"` (removed on blur), matching the legacy skip-to behaviour.\n */\nfunction focusSkipTarget(event: React.MouseEvent<HTMLAnchorElement>) {\n const hash = event.currentTarget.hash\n if (!hash || hash === '#') {\n return\n }\n\n let id = hash.slice(1)\n try {\n id = decodeURIComponent(id)\n } catch {\n // Malformed escape sequence — fall back to the raw fragment.\n }\n\n const target = document.getElementById(id)\n if (!target) {\n return\n }\n\n if (target.tabIndex < 0 && !target.hasAttribute('tabindex')) {\n target.setAttribute('tabindex', '-1')\n target.addEventListener(\n 'blur',\n () => {\n target.removeAttribute('tabindex')\n },\n { once: true },\n )\n }\n\n target.focus()\n}\n\ntype SkipLinkProps = React.ComponentPropsWithoutRef<'a'> &\n VariantProps<typeof skipLinkVariants> & {\n /** Same-page fragment target, e.g. `\"#content\"`. */\n href: string\n ref?: React.Ref<HTMLAnchorElement>\n }\n\n/**\n * A single focus-revealed bypass link (2.4.1 Bypass Blocks). Hidden above the\n * viewport until it receives keyboard focus, then slides in as a full-width\n * bar. Designed to sit inside `SkipLinks`, which provides the positioned\n * `<nav>` landmark; standalone use needs a positioned ancestor.\n *\n * Renders a plain `<a>` (not the themeable `Link`) because skip links are\n * same-page fragment jumps — routing framework link components are\n * unnecessary and can interfere with fragment navigation.\n */\nfunction SkipLink({ className, color, href, onClick, children, ref, ...props }: SkipLinkProps) {\n return (\n <a\n data-slot='skip-link'\n {...props}\n href={href}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) {\n focusSkipTarget(event)\n }\n }}\n className={cn(skipLinkVariants({ color }), className)}\n ref={ref}\n >\n <span className='group-focus:outline group-focus:outline-2 group-focus:outline-offset-2 group-focus:outline-current'>\n {children}\n </span>\n </a>\n )\n}\n\ntype SkipLinksProps = React.ComponentPropsWithoutRef<'nav'> &\n VariantProps<typeof skipLinkVariants> & {\n ref?: React.Ref<HTMLElement>\n }\n\n/**\n * Fixed landmark that holds the page's skip links, rendered as the first\n * element in the body (before the `Masthead`). Successor to the legacy\n * `.nsw-skip` nav.\n *\n * When the `children` prop is omitted it renders the legacy default pair —\n * \"Skip to navigation\" (`#nav`) and \"Skip to content\" (`#content`) — themed\n * by `color`. Any provided children (including an explicitly empty list from\n * a `.map()` or a false conditional) render exactly as given, per normal\n * React semantics — the defaults are never injected alongside or instead of\n * explicit content, since their `#nav`/`#content` targets may not exist on a\n * page that opted into custom links. Compose your own `SkipLink` children\n * for different targets or extra links:\n *\n * ```tsx\n * <SkipLinks>\n * <SkipLink href=\"#main-navigation\">Skip to navigation</SkipLink>\n * <SkipLink href=\"#main-content\">Skip to content</SkipLink>\n * <SkipLink href=\"#search\">Skip to search</SkipLink>\n * </SkipLinks>\n * ```\n */\nfunction SkipLinks({\n className,\n color,\n // Destructuring default: applies only when the prop is `undefined`\n // (omitted), never for explicit null/false/[] children. `color` is\n // initialised earlier in the pattern, so it is in scope here.\n children = (\n <>\n <SkipLink color={color} href='#nav'>\n Skip to navigation\n </SkipLink>\n <SkipLink color={color} href='#content'>\n Skip to content\n </SkipLink>\n </>\n ),\n ref,\n ...props\n}: SkipLinksProps) {\n return (\n <nav\n aria-label='Skip links'\n data-slot='skip-links'\n {...props}\n className={cn('fixed inset-x-0 top-0 z-50 w-full', className)}\n ref={ref}\n >\n {children}\n </nav>\n )\n}\n\nexport { SkipLink, SkipLinks, skipLinkVariants }\nexport type { SkipLinkProps, SkipLinksProps }\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './component
|
|
|
6
6
|
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from './components/drawer.js';
|
|
7
7
|
export { ExpandableSearch, ExpandableSearchButtonProps, ExpandableSearchField, ExpandableSearchFieldProps, ExpandableSearchProps, ExpandableSearchVariant, expandableSearchVariants } from './components/expandable-search.js';
|
|
8
8
|
export { Field, FieldContent, FieldContentProps, FieldDescription, FieldDescriptionProps, FieldError, FieldErrorProps, FieldGroup, FieldGroupProps, FieldLabel, FieldLabelProps, FieldLegend, FieldLegendProps, FieldProps, FieldSeparator, FieldSeparatorProps, FieldSet, FieldSetProps, FieldTitle, FieldTitleProps } from './components/field.js';
|
|
9
|
-
export { Footer, FooterAcknowledgement, FooterAcknowledgementProps, FooterColor, FooterLegalLinkItem, FooterLegalLinks, FooterLegalLinksProps, FooterLinkItem, FooterNav, FooterNavColumn, FooterNavColumnProps, FooterNavLink, FooterNavLinkProps, FooterNavProps, FooterProps, FooterSmallPrint, FooterSmallPrintProps, FooterSocialLink, FooterSocialLinkItem, FooterSocialLinkProps, footerColors, footerContainerVariants, footerVariants } from './components/footer.js';
|
|
9
|
+
export { Footer, FooterAcknowledgement, FooterAcknowledgementProps, FooterColor, FooterLegalLinkItem, FooterLegalLinks, FooterLegalLinksProps, FooterLinkItem, FooterNav, FooterNavColumn, FooterNavColumnProps, FooterNavLink, FooterNavLinkProps, FooterNavProps, FooterProps, FooterSmallPrint, FooterSmallPrintProps, FooterSocialLink, FooterSocialLinkItem, FooterSocialLinkProps, footerColors, footerContainerVariants, footerLogoType, footerVariants } from './components/footer.js';
|
|
10
10
|
export { Header, HeaderActions, HeaderActionsProps, HeaderBrand, HeaderBrandProps, HeaderColor, HeaderProps, headerColors, headerContainerVariants, headerVariants } from './components/header.js';
|
|
11
11
|
export { HoverCard, HoverCardContent, HoverCardTrigger } from './components/hover-card.js';
|
|
12
12
|
export { Input, InputProps } from './components/input.js';
|
|
@@ -15,7 +15,7 @@ export { LabeledSeparator, LabeledSeparatorProps } from './components/labeled-se
|
|
|
15
15
|
export { ExternalLink, ExternalLinkProps, Link, LinkComponent, LinkProps, LinkProvider, LinkUrlObject, linkVariants } from './components/link.js';
|
|
16
16
|
export { Logo, LogoProps } from './components/logo.js';
|
|
17
17
|
export { MainNav, MainNavColor, MainNavItem, MainNavLinkItem, MainNavProps, mainNavColors, mainNavContainerVariants, mainNavPanelVariants, mainNavVariants } from './components/main-nav.js';
|
|
18
|
-
export { Masthead, MastheadProps, mastheadContainerVariants, mastheadVariants } from './components/masthead.js';
|
|
18
|
+
export { Masthead, MastheadColor, MastheadProps, mastheadContainerVariants, mastheadVariants } from './components/masthead.js';
|
|
19
19
|
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from './components/popover.js';
|
|
20
20
|
export { PUSH_MENU_DURATION_MS, PushMenu, PushMenuItem, PushMenuLevel, PushMenuProps, generatePushMenuBreadcrumb } from './components/push-menu.js';
|
|
21
21
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from './components/resizable.js';
|