@brandlab-digital/site-next 3.16.0 → 3.16.1
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.
|
@@ -32,8 +32,9 @@
|
|
|
32
32
|
* adds the site's link to all the reviews;
|
|
33
33
|
* - `formHeading` puts an eyebrow, an H2 and a line above the quote form (the hero's one H2);
|
|
34
34
|
* - `seal` stamps one verified fact on the photo (`{ value: '15+', label: 'years of tree work' }`);
|
|
35
|
-
* - `layout.scrim` chooses the overlay: `full` over the whole photo, `column` behind the text side only
|
|
36
|
-
* (the default on `split`; `full-bleed` defaults to
|
|
35
|
+
* - `layout.scrim` chooses the overlay: `full` over the whole photo, `column` behind the text side only (as wide as
|
|
36
|
+
* `--bl-hero-scrim-column-width`, 60% by default), or `none` (the default on `split`; `full-bleed` defaults to
|
|
37
|
+
* `full`), coloured by the skin's `--bl-hero-scrim`;
|
|
37
38
|
* - the photo's corners, shadow and filter come from `--bl-hero-photo-radius`, `--bl-hero-photo-shadow` and
|
|
38
39
|
* `--bl-hero-photo-filter`, and the `decoration` slot holds the site's motif.
|
|
39
40
|
*/
|
|
@@ -153,7 +154,10 @@ export interface HeroProps extends HeroSkin {
|
|
|
153
154
|
}
|
|
154
155
|
/** The form heading's id (3.16.0). */
|
|
155
156
|
export declare const HERO_FORM_HEADING_ID = "quote-hero-title";
|
|
156
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* The text column's order: the site's order, then the parts it left out in the default order. A left-out eyebrow goes
|
|
159
|
+
* straight before the H1, where it always sits (3.16.1).
|
|
160
|
+
*/
|
|
157
161
|
export declare function heroContentOrder(order?: readonly HeroContentPart[]): HeroContentPart[];
|
|
158
162
|
export declare function Hero(props: HeroProps): import("react/jsx-runtime").JSX.Element;
|
|
159
163
|
//# sourceMappingURL=hero.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/sections/hero.tsx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QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACpG,oHAAoH;IACpH,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CACnE;AAED,sCAAsC;AACtC,eAAO,MAAM,oBAAoB,qBAA0B,CAAA;AAE3D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,GAAE,SAAS,eAAe,EAAO,GAAG,eAAe,EAAE,CAe1F;AAkBD,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2CA4HpC"}
|
|
@@ -33,8 +33,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
33
33
|
* adds the site's link to all the reviews;
|
|
34
34
|
* - `formHeading` puts an eyebrow, an H2 and a line above the quote form (the hero's one H2);
|
|
35
35
|
* - `seal` stamps one verified fact on the photo (`{ value: '15+', label: 'years of tree work' }`);
|
|
36
|
-
* - `layout.scrim` chooses the overlay: `full` over the whole photo, `column` behind the text side only
|
|
37
|
-
* (the default on `split`; `full-bleed` defaults to
|
|
36
|
+
* - `layout.scrim` chooses the overlay: `full` over the whole photo, `column` behind the text side only (as wide as
|
|
37
|
+
* `--bl-hero-scrim-column-width`, 60% by default), or `none` (the default on `split`; `full-bleed` defaults to
|
|
38
|
+
* `full`), coloured by the skin's `--bl-hero-scrim`;
|
|
38
39
|
* - the photo's corners, shadow and filter come from `--bl-hero-photo-radius`, `--bl-hero-photo-shadow` and
|
|
39
40
|
* `--bl-hero-photo-filter`, and the `decoration` slot holds the site's motif.
|
|
40
41
|
*/
|
|
@@ -69,7 +70,10 @@ export const HERO_CHECKLIST_MAX = 6;
|
|
|
69
70
|
export const HERO_SUMMARY_MAX_WORDS = 25;
|
|
70
71
|
/** The form heading's id (3.16.0). */
|
|
71
72
|
export const HERO_FORM_HEADING_ID = `${HERO_FORM_ID}-title`;
|
|
72
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* The text column's order: the site's order, then the parts it left out in the default order. A left-out eyebrow goes
|
|
75
|
+
* straight before the H1, where it always sits (3.16.1).
|
|
76
|
+
*/
|
|
73
77
|
export function heroContentOrder(order = []) {
|
|
74
78
|
const problems = [];
|
|
75
79
|
const seen = new Set();
|
|
@@ -80,7 +84,9 @@ export function heroContentOrder(order = []) {
|
|
|
80
84
|
problems.push(`"${part}" appears twice`);
|
|
81
85
|
seen.add(part);
|
|
82
86
|
}
|
|
83
|
-
const full = [...order, ...HERO_CONTENT_PARTS.filter((part) => !seen.has(part))];
|
|
87
|
+
const full = [...order, ...HERO_CONTENT_PARTS.filter((part) => !seen.has(part) && part !== 'eyebrow')];
|
|
88
|
+
if (!seen.has('eyebrow'))
|
|
89
|
+
full.splice(full.indexOf('h1'), 0, 'eyebrow');
|
|
84
90
|
const at = (part) => full.indexOf(part);
|
|
85
91
|
if (at('eyebrow') !== at('h1') - 1)
|
|
86
92
|
problems.push('the eyebrow sits straight before the H1');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.js","sourceRoot":"","sources":["../../../src/ui-kit/sections/hero.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,cAAc,EAAoB,MAAM,sCAAsC,CAAA;AACvF,OAAO,EAAE,OAAO,EAAoB,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAiB,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,UAAU,EAAgB,MAAM,8BAA8B,CAAA;AACvE,OAA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AU,CAAC,YAAG,WAAW,CAAC,IAAI,GAAK,CAAC,CAAC,CAAC,IAAI,IAC/E,CACP,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,IACD,CACP,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAA;AACH,CAAC","sourcesContent":["/**\n * `Hero` (S1, `hero`, 3.14.0): the first screen of the home, service and service-in-suburb pages. Server component;\n * it wins the click and starts the enquiry. Light by default: every colour comes from the site's tokens and skin.\n *\n * In source order, which is the phone order: breadcrumbs (service and location pages), an optional eyebrow, the H1\n * (once, as plain text; on a location page the built \"{Service} {Suburb}\" string), one offer line of 25 words or fewer,\n * the two actions, the trust checklist (up to six verified facts, two columns), Google's feed rating, partner badges,\n * the photo and then the site's quote form. On desktop the form sits beside the text (`split`, the photo on the other side) or over the photo\n * as a card (`full-bleed`, under a text-side scrim the skin colours).\n *\n * Locked:\n * - the actions are the phone link (`data-phone-location=\"hero\"`, icon on the left) then the quote button\n * (`lead_cta_click` placement `hero`, id `quote-hero`): the same phone-first order as the header, the call bar and the\n * CTA band (K6). Job mode only moves the primary styling (`data-primary`), never the order;\n * - the actions are the page's call path (`data-bl-call-path`), so the phone call bar stays hidden while they are on\n * screen and shows once they scroll out (F6);\n * - with a form, the quote button links to it (`#quote-hero`, the form's own id) and the form is in the hero, so C1 sees\n * the H1, a call and a quote action in the first phone screen and the form in the first desktop screen;\n * - the photo is the page's largest image: preloaded, high priority, never lazy. It must be real work or licensed stock\n * (an AI illustration is supporting only, F13), and a job caption needs a genuine photo;\n * - no review quote, and no visible words the site doesn't pass.\n *\n * `family` is the page family (`data-family`): `home` takes no breadcrumbs and is `tall` by default; `service` and\n * `location` take breadcrumbs. A skin styles families apart through `[data-family]`; the variant is the site's one\n * hero structure.\n *\n * The site's own hero (3.16.0), inside the same skeleton:\n * - `layout.contentOrder` arranges the text column's parts (AA: H1, rating, summary, checklist, actions). The\n * breadcrumbs stay first, an eyebrow sits straight before the H1, and the H1 comes before the summary and actions;\n * parts left out follow in the default order;\n * - `layout.rating: 'figure'` shows Google's rating as a large figure with the stars and count, and `ratingMoreLabel`\n * adds the site's link to all the reviews;\n * - `formHeading` puts an eyebrow, an H2 and a line above the quote form (the hero's one H2);\n * - `seal` stamps one verified fact on the photo (`{ value: '15+', label: 'years of tree work' }`);\n * - `layout.scrim` chooses the overlay: `full` over the whole photo, `column` behind the text side only, or `none`\n * (the default on `split`; `full-bleed` defaults to `full`), coloured by the skin's `--bl-hero-scrim`;\n * - the photo's corners, shadow and filter come from `--bl-hero-photo-radius`, `--bl-hero-photo-shadow` and\n * `--bl-hero-photo-filter`, and the `decoration` slot holds the site's motif.\n */\nimport { Fragment, type ReactNode } from 'react'\nimport { SITE_JOB_MODES, type SiteJobMode } from '@brandlab-digital/site-core/strategy'\nimport { Section, type SectionTone } from '../primitives/layout.js'\nimport { PhoneLink } from '../primitives/links.js'\nimport { TickList, type TickItem } from '../primitives/lists.js'\nimport { MediaFrame, type UiMedia } from '../primitives/media-frame.js'\nimport { QuoteButton } from '../primitives/quote-button.js'\nimport { slot, type SkinEntry } from '../skin.js'\nimport type { UiPhone } from '../types.js'\nimport { RatingChip, hasGoogleRating, type RatingChipData } from './rating-chip.js'\n\n/** The text column's parts, in their default order (3.16.0). The breadcrumbs always come first. */\nexport const HERO_CONTENT_PARTS = ['eyebrow', 'h1', 'summary', 'actions', 'checklist', 'rating', 'badges'] as const\nexport type HeroContentPart = (typeof HERO_CONTENT_PARTS)[number]\n\nexport const HERO_SCRIMS = ['none', 'full', 'column'] as const\nexport type HeroScrim = (typeof HERO_SCRIMS)[number]\n\nexport const HERO_VARIANTS = ['split', 'full-bleed'] as const\nexport type HeroVariant = (typeof HERO_VARIANTS)[number]\n\n/**\n * The hero's family (`data-family`). Site-core's page families are finer (`service-in-suburb`, `region`, `suburb` all\n * take the `location` hero), so this stays a hero-level grouping.\n */\nexport const HERO_FAMILIES = ['home', 'service', 'location'] as const\nexport type HeroFamily = (typeof HERO_FAMILIES)[number]\n\n/**\n * A service's job mode (v2 §2.2), as the site's strategy decision card records it (`SiteJobMode` in\n * `site-core/strategy`): which action is styled primary. Never the order.\n */\nexport const HERO_JOB_MODES = SITE_JOB_MODES\nexport type HeroJobMode = SiteJobMode\n\nexport type HeroSlot =\n | 'root'\n | 'inner'\n | 'content'\n | 'crumbs'\n | 'eyebrow'\n | 'h1'\n | 'summary'\n | 'actions'\n | 'phone'\n | 'quote'\n | 'checklist'\n | 'rating'\n | 'badges'\n | 'media'\n | 'caption'\n | 'scrim'\n | 'form'\n | 'formHead'\n | 'formEyebrow'\n | 'formTitle'\n | 'formText'\n | 'seal'\n | 'sealValue'\n | 'sealLabel'\n\nexport interface HeroLayout {\n /** `split`: the photo's side on desktop (default `end`). */\n readonly mediaSide?: 'start' | 'end'\n /** Default `tall` on the home page, `standard` elsewhere. */\n readonly height?: 'standard' | 'tall'\n /** The trust checklist's columns (default 2). */\n readonly checklistColumns?: 1 | 2\n /**\n * The checklist's ticks (3.15.0): `icon` (the default) is the sprite's check; `rule` ships no svg, only a mark the\n * stylesheet draws as a short rule (`TickList`'s `layout.tick`), about 100 bytes less a fact.\n */\n readonly checklistTick?: 'icon' | 'rule'\n /** The text column's order (3.16.0); parts left out follow in the default order. */\n readonly contentOrder?: readonly HeroContentPart[]\n /** Google's rating as one line (`chip`, the default) or a large figure with the stars and count (3.16.0). */\n readonly rating?: 'chip' | 'figure'\n /** The photo's overlay (3.16.0): `full`, `column` (behind the text side only) or `none`. */\n readonly scrim?: HeroScrim\n}\n\nexport type HeroSkin = SkinEntry<HeroSlot, HeroVariant, HeroLayout>\n\n/** The form's id and lead diagnostics `form_id` in the hero; the quote button links here. */\nexport const HERO_FORM_ID = 'quote-hero'\n/** The most facts the trust checklist holds (v2 S1: three to six). */\nexport const HERO_CHECKLIST_MAX = 6\n/** The offer line's word limit (v2 §9.2). */\nexport const HERO_SUMMARY_MAX_WORDS = 25\n\nexport interface HeroProps extends HeroSkin {\n readonly family: HeroFamily\n /** The H1 text: the recorded H1 on live pages, the title builder's on new ones (\"Tree Removal Castle Hill\"). */\n readonly title: string\n /** The one offer line under the H1, 25 words or fewer. */\n readonly summary: string\n /** A short label above the H1. */\n readonly eyebrow?: string\n /** The page's breadcrumbs (the shared `Breadcrumbs`, with its own `nav`). Service and location pages only. */\n readonly breadcrumbs?: ReactNode\n /** The trust checklist: verified facts only (licence, insurance, rating source, years), at most six. */\n readonly checklist: readonly TickItem[]\n /**\n * Google's average and total from the reviews feed (`prepareBusinessProfileReviews`), shown as the shared\n * `RatingChip` (`data-bl=\"rating-chip\"`, the `rating` class on its root, like `phone` and `quote`) after the\n * checklist, linked to the Business Profile. Never typed by hand: without a feed average and a total of 1 or more,\n * nothing renders.\n */\n readonly rating?: RatingChipData | null\n /** Partner badges or logos held and verified (a `LogoStrip`). */\n readonly badges?: ReactNode\n /** The best genuine photo of this page's service; on a location page the nearest job's. From `media.ts`. */\n readonly media: UiMedia\n /** \"{what}, {suburb}, {month year}\" for a genuine job photo, for example on a location page. */\n readonly caption?: string\n readonly phone: UiPhone\n /** Optional words before the number, for example \"Call\". */\n readonly phoneLabel?: string\n /**\n * The site's recorded quote label (C5). `href` defaults to the hero's own form (`#quote-hero`); without a form it\n * is required (for example `/contact#quote`).\n */\n readonly quote: { readonly label: string; readonly href?: string }\n /** The site's bound quote form: `<QuoteForm formId=\"quote-hero\" />`. Required on money pages (C1). */\n readonly form?: ReactNode\n /** The page's service job mode (default `planned`): `urgent` styles the phone link primary. */\n readonly jobMode?: HeroJobMode\n /** The H1's id (default `hero-title`). */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n /** Signature art, rendered `aria-hidden` (Superior's waterline, Absolute's grass edge). */\n readonly decoration?: ReactNode\n /** The site's words for a link to all the reviews on Google, after the rating (3.16.0). */\n readonly ratingMoreLabel?: string\n /** A heading block above the quote form (3.16.0): an optional eyebrow, the H2 and an optional line. */\n readonly formHeading?: { readonly eyebrow?: string; readonly title: string; readonly text?: string }\n /** One verified fact stamped on the photo (3.16.0), for example `{ value: '15+', label: 'years of tree work' }`. */\n readonly seal?: { readonly value: string; readonly label: string }\n}\n\n/** The form heading's id (3.16.0). */\nexport const HERO_FORM_HEADING_ID = `${HERO_FORM_ID}-title`\n\n/** The text column's order: the site's order, then the parts it left out in the default order. */\nexport function heroContentOrder(order: readonly HeroContentPart[] = []): HeroContentPart[] {\n const problems: string[] = []\n const seen = new Set<string>()\n for (const part of order) {\n if (!(HERO_CONTENT_PARTS as readonly string[]).includes(part)) problems.push(`\"${part}\" is not a hero part (${HERO_CONTENT_PARTS.join(', ')})`)\n else if (seen.has(part)) problems.push(`\"${part}\" appears twice`)\n seen.add(part)\n }\n const full = [...order, ...HERO_CONTENT_PARTS.filter((part) => !seen.has(part))]\n const at = (part: HeroContentPart) => full.indexOf(part)\n if (at('eyebrow') !== at('h1') - 1) problems.push('the eyebrow sits straight before the H1')\n if (at('summary') < at('h1') || at('actions') < at('h1')) problems.push('the H1 comes before the summary and the actions')\n if (problems.length > 0) throw new Error(`Hero content order: ${problems.join('; ')}.`)\n return full\n}\n\nconst words = (text: string) => text.trim().split(/\\s+/).filter(Boolean).length\n\nfunction assertHero({ title, summary, checklist, media, caption, quote, form, formHeading, seal }: HeroProps): void {\n const problems: string[] = []\n if (title.trim() === '') problems.push('the H1 is empty')\n if (words(summary) > HERO_SUMMARY_MAX_WORDS) problems.push(`the offer line has ${words(summary)} words (${HERO_SUMMARY_MAX_WORDS} at most)`)\n if (checklist.length > HERO_CHECKLIST_MAX) problems.push(`the checklist has ${checklist.length} facts (${HERO_CHECKLIST_MAX} at most)`)\n if (media.provenance === 'illustrative-ai') problems.push(`${media.src} is an AI illustration; the hero shows real work or licensed stock`)\n if (caption && media.provenance !== 'genuine') problems.push(`a job caption needs a genuine photo (${media.src} is ${media.provenance})`)\n if (!form && !quote.href) problems.push('without a form, quote.href must name the quote form, for example /contact#quote')\n if (formHeading && !form) problems.push('a form heading needs the form')\n if (formHeading && formHeading.title.trim() === '') problems.push('the form heading is empty')\n if (seal && (seal.value.trim() === '' || seal.label.trim() === '')) problems.push('the seal needs a value and a label')\n if (problems.length > 0) throw new Error(`Hero \"${title}\": ${problems.join('; ')}.`)\n}\n\nexport function Hero(props: HeroProps) {\n assertHero(props)\n const {\n family,\n title,\n summary,\n eyebrow,\n breadcrumbs,\n checklist,\n rating,\n badges,\n media,\n caption,\n phone,\n phoneLabel,\n quote,\n form,\n jobMode = 'planned',\n headingId = 'hero-title',\n tone,\n decoration,\n ratingMoreLabel,\n formHeading,\n seal,\n variant = 'split',\n layout,\n classes,\n } = props\n const primary = jobMode === 'urgent' ? 'phone' : 'quote'\n const crumbs = family === 'home' ? null : breadcrumbs\n const scrim = layout?.scrim ?? (variant === 'full-bleed' ? 'full' : 'none')\n const parts: Record<HeroContentPart, ReactNode> = {\n eyebrow: eyebrow ? <p {...slot(classes, 'eyebrow')}>{eyebrow}</p> : null,\n h1: (\n <h1 id={headingId} {...slot(classes, 'h1')}>\n {title}\n </h1>\n ),\n summary: <p {...slot(classes, 'summary')}>{summary}</p>,\n actions: (\n <div {...slot(classes, 'actions')} data-bl-call-path=\"\" data-primary={primary}>\n <PhoneLink phone={phone} placement=\"hero\" label={phoneLabel} showIcon variant=\"button\" classes={{ root: classes?.phone }} />\n <QuoteButton\n label={quote.label}\n href={quote.href ?? `#${HERO_FORM_ID}`}\n placement=\"hero\"\n ctaId=\"quote-hero\"\n variant={primary === 'quote' ? 'primary' : 'secondary'}\n classes={{ root: classes?.quote }}\n />\n </div>\n ),\n checklist:\n checklist.length > 0 ? (\n <div {...slot(classes, 'checklist')}>\n <TickList items={checklist} layout={{ columns: layout?.checklistColumns ?? 2, ...(layout?.checklistTick ? { tick: layout.checklistTick } : {}) }} />\n </div>\n ) : null,\n rating: hasGoogleRating(rating) ? (\n <RatingChip\n reviews={rating}\n moreLabel={ratingMoreLabel}\n layout={layout?.rating === 'figure' ? { display: 'figure' } : undefined}\n classes={{ root: classes?.rating }}\n />\n ) : null,\n badges: badges ? <div {...slot(classes, 'badges')}>{badges}</div> : null,\n }\n return (\n <Section\n id=\"hero\"\n labelledBy={headingId}\n tone={tone}\n variant={variant}\n classes={classes}\n decoration={decoration}\n phonePlacement=\"hero\"\n hooks={{\n 'data-family': family,\n 'data-job-mode': jobMode,\n 'data-height': layout?.height ?? (family === 'home' ? 'tall' : 'standard'),\n 'data-media-side': variant === 'split' ? (layout?.mediaSide ?? 'end') : undefined,\n 'data-form': form ? '' : undefined,\n 'data-scrim': scrim === 'none' ? undefined : scrim,\n }}\n >\n <div {...slot(classes, 'content')}>\n {crumbs ? <div {...slot(classes, 'crumbs')}>{crumbs}</div> : null}\n {heroContentOrder(layout?.contentOrder).map((part) => (\n <Fragment key={part}>{parts[part]}</Fragment>\n ))}\n </div>\n <div {...slot(classes, 'media')}>\n <MediaFrame\n media={media}\n ratio=\"4:3\"\n sizes={variant === 'full-bleed' ? '100vw' : '(min-width: 1024px) 50vw, 100vw'}\n caption={caption}\n priority\n classes={{ caption: classes?.caption }}\n />\n {scrim === 'none' ? null : <div {...slot(classes, 'scrim')} aria-hidden=\"true\" />}\n {seal ? (\n <p {...slot(classes, 'seal')}>\n <span {...slot(classes, 'sealValue')}>{seal.value}</span> <span {...slot(classes, 'sealLabel')}>{seal.label}</span>\n </p>\n ) : null}\n </div>\n {form ? (\n <div {...slot(classes, 'form')}>\n {formHeading ? (\n <div {...slot(classes, 'formHead')}>\n {formHeading.eyebrow ? <p {...slot(classes, 'formEyebrow')}>{formHeading.eyebrow}</p> : null}\n <h2 id={HERO_FORM_HEADING_ID} {...slot(classes, 'formTitle')}>\n {formHeading.title}\n </h2>\n {formHeading.text ? <p {...slot(classes, 'formText')}>{formHeading.text}</p> : null}\n </div>\n ) : null}\n {form}\n </div>\n ) : null}\n </Section>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"file":"hero.js","sourceRoot":"","sources":["../../../src/ui-kit/sections/hero.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;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,KAAK,GAAQ,IACjH,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,IAAI,CAAC,CAAC,CAAC,CACN,kBAAS,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,aAC3B,WAAW,CAAC,CAAC,CAAC,CACb,kBAAS,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,aAC/B,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,eAAO,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,YAAG,WAAW,CAAC,OAAO,GAAK,CAAC,CAAC,CAAC,IAAI,EAC5F,aAAI,EAAE,EAAE,oBAAoB,KAAM,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,YACzD,WAAW,CAAC,KAAK,GACf,EACJ,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,eAAO,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,YAAG,WAAW,CAAC,IAAI,GAAK,CAAC,CAAC,CAAC,IAAI,IAC/E,CACP,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,IACD,CACP,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAA;AACH,CAAC","sourcesContent":["/**\n * `Hero` (S1, `hero`, 3.14.0): the first screen of the home, service and service-in-suburb pages. Server component;\n * it wins the click and starts the enquiry. Light by default: every colour comes from the site's tokens and skin.\n *\n * In source order, which is the phone order: breadcrumbs (service and location pages), an optional eyebrow, the H1\n * (once, as plain text; on a location page the built \"{Service} {Suburb}\" string), one offer line of 25 words or fewer,\n * the two actions, the trust checklist (up to six verified facts, two columns), Google's feed rating, partner badges,\n * the photo and then the site's quote form. On desktop the form sits beside the text (`split`, the photo on the other side) or over the photo\n * as a card (`full-bleed`, under a text-side scrim the skin colours).\n *\n * Locked:\n * - the actions are the phone link (`data-phone-location=\"hero\"`, icon on the left) then the quote button\n * (`lead_cta_click` placement `hero`, id `quote-hero`): the same phone-first order as the header, the call bar and the\n * CTA band (K6). Job mode only moves the primary styling (`data-primary`), never the order;\n * - the actions are the page's call path (`data-bl-call-path`), so the phone call bar stays hidden while they are on\n * screen and shows once they scroll out (F6);\n * - with a form, the quote button links to it (`#quote-hero`, the form's own id) and the form is in the hero, so C1 sees\n * the H1, a call and a quote action in the first phone screen and the form in the first desktop screen;\n * - the photo is the page's largest image: preloaded, high priority, never lazy. It must be real work or licensed stock\n * (an AI illustration is supporting only, F13), and a job caption needs a genuine photo;\n * - no review quote, and no visible words the site doesn't pass.\n *\n * `family` is the page family (`data-family`): `home` takes no breadcrumbs and is `tall` by default; `service` and\n * `location` take breadcrumbs. A skin styles families apart through `[data-family]`; the variant is the site's one\n * hero structure.\n *\n * The site's own hero (3.16.0), inside the same skeleton:\n * - `layout.contentOrder` arranges the text column's parts (AA: H1, rating, summary, checklist, actions). The\n * breadcrumbs stay first, an eyebrow sits straight before the H1, and the H1 comes before the summary and actions;\n * parts left out follow in the default order;\n * - `layout.rating: 'figure'` shows Google's rating as a large figure with the stars and count, and `ratingMoreLabel`\n * adds the site's link to all the reviews;\n * - `formHeading` puts an eyebrow, an H2 and a line above the quote form (the hero's one H2);\n * - `seal` stamps one verified fact on the photo (`{ value: '15+', label: 'years of tree work' }`);\n * - `layout.scrim` chooses the overlay: `full` over the whole photo, `column` behind the text side only (as wide as\n * `--bl-hero-scrim-column-width`, 60% by default), or `none` (the default on `split`; `full-bleed` defaults to\n * `full`), coloured by the skin's `--bl-hero-scrim`;\n * - the photo's corners, shadow and filter come from `--bl-hero-photo-radius`, `--bl-hero-photo-shadow` and\n * `--bl-hero-photo-filter`, and the `decoration` slot holds the site's motif.\n */\nimport { Fragment, type ReactNode } from 'react'\nimport { SITE_JOB_MODES, type SiteJobMode } from '@brandlab-digital/site-core/strategy'\nimport { Section, type SectionTone } from '../primitives/layout.js'\nimport { PhoneLink } from '../primitives/links.js'\nimport { TickList, type TickItem } from '../primitives/lists.js'\nimport { MediaFrame, type UiMedia } from '../primitives/media-frame.js'\nimport { QuoteButton } from '../primitives/quote-button.js'\nimport { slot, type SkinEntry } from '../skin.js'\nimport type { UiPhone } from '../types.js'\nimport { RatingChip, hasGoogleRating, type RatingChipData } from './rating-chip.js'\n\n/** The text column's parts, in their default order (3.16.0). The breadcrumbs always come first. */\nexport const HERO_CONTENT_PARTS = ['eyebrow', 'h1', 'summary', 'actions', 'checklist', 'rating', 'badges'] as const\nexport type HeroContentPart = (typeof HERO_CONTENT_PARTS)[number]\n\nexport const HERO_SCRIMS = ['none', 'full', 'column'] as const\nexport type HeroScrim = (typeof HERO_SCRIMS)[number]\n\nexport const HERO_VARIANTS = ['split', 'full-bleed'] as const\nexport type HeroVariant = (typeof HERO_VARIANTS)[number]\n\n/**\n * The hero's family (`data-family`). Site-core's page families are finer (`service-in-suburb`, `region`, `suburb` all\n * take the `location` hero), so this stays a hero-level grouping.\n */\nexport const HERO_FAMILIES = ['home', 'service', 'location'] as const\nexport type HeroFamily = (typeof HERO_FAMILIES)[number]\n\n/**\n * A service's job mode (v2 §2.2), as the site's strategy decision card records it (`SiteJobMode` in\n * `site-core/strategy`): which action is styled primary. Never the order.\n */\nexport const HERO_JOB_MODES = SITE_JOB_MODES\nexport type HeroJobMode = SiteJobMode\n\nexport type HeroSlot =\n | 'root'\n | 'inner'\n | 'content'\n | 'crumbs'\n | 'eyebrow'\n | 'h1'\n | 'summary'\n | 'actions'\n | 'phone'\n | 'quote'\n | 'checklist'\n | 'rating'\n | 'badges'\n | 'media'\n | 'caption'\n | 'scrim'\n | 'form'\n | 'formHead'\n | 'formEyebrow'\n | 'formTitle'\n | 'formText'\n | 'seal'\n | 'sealValue'\n | 'sealLabel'\n\nexport interface HeroLayout {\n /** `split`: the photo's side on desktop (default `end`). */\n readonly mediaSide?: 'start' | 'end'\n /** Default `tall` on the home page, `standard` elsewhere. */\n readonly height?: 'standard' | 'tall'\n /** The trust checklist's columns (default 2). */\n readonly checklistColumns?: 1 | 2\n /**\n * The checklist's ticks (3.15.0): `icon` (the default) is the sprite's check; `rule` ships no svg, only a mark the\n * stylesheet draws as a short rule (`TickList`'s `layout.tick`), about 100 bytes less a fact.\n */\n readonly checklistTick?: 'icon' | 'rule'\n /** The text column's order (3.16.0); parts left out follow in the default order. */\n readonly contentOrder?: readonly HeroContentPart[]\n /** Google's rating as one line (`chip`, the default) or a large figure with the stars and count (3.16.0). */\n readonly rating?: 'chip' | 'figure'\n /** The photo's overlay (3.16.0): `full`, `column` (behind the text side only) or `none`. */\n readonly scrim?: HeroScrim\n}\n\nexport type HeroSkin = SkinEntry<HeroSlot, HeroVariant, HeroLayout>\n\n/** The form's id and lead diagnostics `form_id` in the hero; the quote button links here. */\nexport const HERO_FORM_ID = 'quote-hero'\n/** The most facts the trust checklist holds (v2 S1: three to six). */\nexport const HERO_CHECKLIST_MAX = 6\n/** The offer line's word limit (v2 §9.2). */\nexport const HERO_SUMMARY_MAX_WORDS = 25\n\nexport interface HeroProps extends HeroSkin {\n readonly family: HeroFamily\n /** The H1 text: the recorded H1 on live pages, the title builder's on new ones (\"Tree Removal Castle Hill\"). */\n readonly title: string\n /** The one offer line under the H1, 25 words or fewer. */\n readonly summary: string\n /** A short label above the H1. */\n readonly eyebrow?: string\n /** The page's breadcrumbs (the shared `Breadcrumbs`, with its own `nav`). Service and location pages only. */\n readonly breadcrumbs?: ReactNode\n /** The trust checklist: verified facts only (licence, insurance, rating source, years), at most six. */\n readonly checklist: readonly TickItem[]\n /**\n * Google's average and total from the reviews feed (`prepareBusinessProfileReviews`), shown as the shared\n * `RatingChip` (`data-bl=\"rating-chip\"`, the `rating` class on its root, like `phone` and `quote`) after the\n * checklist, linked to the Business Profile. Never typed by hand: without a feed average and a total of 1 or more,\n * nothing renders.\n */\n readonly rating?: RatingChipData | null\n /** Partner badges or logos held and verified (a `LogoStrip`). */\n readonly badges?: ReactNode\n /** The best genuine photo of this page's service; on a location page the nearest job's. From `media.ts`. */\n readonly media: UiMedia\n /** \"{what}, {suburb}, {month year}\" for a genuine job photo, for example on a location page. */\n readonly caption?: string\n readonly phone: UiPhone\n /** Optional words before the number, for example \"Call\". */\n readonly phoneLabel?: string\n /**\n * The site's recorded quote label (C5). `href` defaults to the hero's own form (`#quote-hero`); without a form it\n * is required (for example `/contact#quote`).\n */\n readonly quote: { readonly label: string; readonly href?: string }\n /** The site's bound quote form: `<QuoteForm formId=\"quote-hero\" />`. Required on money pages (C1). */\n readonly form?: ReactNode\n /** The page's service job mode (default `planned`): `urgent` styles the phone link primary. */\n readonly jobMode?: HeroJobMode\n /** The H1's id (default `hero-title`). */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n /** Signature art, rendered `aria-hidden` (Superior's waterline, Absolute's grass edge). */\n readonly decoration?: ReactNode\n /** The site's words for a link to all the reviews on Google, after the rating (3.16.0). */\n readonly ratingMoreLabel?: string\n /** A heading block above the quote form (3.16.0): an optional eyebrow, the H2 and an optional line. */\n readonly formHeading?: { readonly eyebrow?: string; readonly title: string; readonly text?: string }\n /** One verified fact stamped on the photo (3.16.0), for example `{ value: '15+', label: 'years of tree work' }`. */\n readonly seal?: { readonly value: string; readonly label: string }\n}\n\n/** The form heading's id (3.16.0). */\nexport const HERO_FORM_HEADING_ID = `${HERO_FORM_ID}-title`\n\n/**\n * The text column's order: the site's order, then the parts it left out in the default order. A left-out eyebrow goes\n * straight before the H1, where it always sits (3.16.1).\n */\nexport function heroContentOrder(order: readonly HeroContentPart[] = []): HeroContentPart[] {\n const problems: string[] = []\n const seen = new Set<string>()\n for (const part of order) {\n if (!(HERO_CONTENT_PARTS as readonly string[]).includes(part)) problems.push(`\"${part}\" is not a hero part (${HERO_CONTENT_PARTS.join(', ')})`)\n else if (seen.has(part)) problems.push(`\"${part}\" appears twice`)\n seen.add(part)\n }\n const full = [...order, ...HERO_CONTENT_PARTS.filter((part) => !seen.has(part) && part !== 'eyebrow')]\n if (!seen.has('eyebrow')) full.splice(full.indexOf('h1'), 0, 'eyebrow')\n const at = (part: HeroContentPart) => full.indexOf(part)\n if (at('eyebrow') !== at('h1') - 1) problems.push('the eyebrow sits straight before the H1')\n if (at('summary') < at('h1') || at('actions') < at('h1')) problems.push('the H1 comes before the summary and the actions')\n if (problems.length > 0) throw new Error(`Hero content order: ${problems.join('; ')}.`)\n return full\n}\n\nconst words = (text: string) => text.trim().split(/\\s+/).filter(Boolean).length\n\nfunction assertHero({ title, summary, checklist, media, caption, quote, form, formHeading, seal }: HeroProps): void {\n const problems: string[] = []\n if (title.trim() === '') problems.push('the H1 is empty')\n if (words(summary) > HERO_SUMMARY_MAX_WORDS) problems.push(`the offer line has ${words(summary)} words (${HERO_SUMMARY_MAX_WORDS} at most)`)\n if (checklist.length > HERO_CHECKLIST_MAX) problems.push(`the checklist has ${checklist.length} facts (${HERO_CHECKLIST_MAX} at most)`)\n if (media.provenance === 'illustrative-ai') problems.push(`${media.src} is an AI illustration; the hero shows real work or licensed stock`)\n if (caption && media.provenance !== 'genuine') problems.push(`a job caption needs a genuine photo (${media.src} is ${media.provenance})`)\n if (!form && !quote.href) problems.push('without a form, quote.href must name the quote form, for example /contact#quote')\n if (formHeading && !form) problems.push('a form heading needs the form')\n if (formHeading && formHeading.title.trim() === '') problems.push('the form heading is empty')\n if (seal && (seal.value.trim() === '' || seal.label.trim() === '')) problems.push('the seal needs a value and a label')\n if (problems.length > 0) throw new Error(`Hero \"${title}\": ${problems.join('; ')}.`)\n}\n\nexport function Hero(props: HeroProps) {\n assertHero(props)\n const {\n family,\n title,\n summary,\n eyebrow,\n breadcrumbs,\n checklist,\n rating,\n badges,\n media,\n caption,\n phone,\n phoneLabel,\n quote,\n form,\n jobMode = 'planned',\n headingId = 'hero-title',\n tone,\n decoration,\n ratingMoreLabel,\n formHeading,\n seal,\n variant = 'split',\n layout,\n classes,\n } = props\n const primary = jobMode === 'urgent' ? 'phone' : 'quote'\n const crumbs = family === 'home' ? null : breadcrumbs\n const scrim = layout?.scrim ?? (variant === 'full-bleed' ? 'full' : 'none')\n const parts: Record<HeroContentPart, ReactNode> = {\n eyebrow: eyebrow ? <p {...slot(classes, 'eyebrow')}>{eyebrow}</p> : null,\n h1: (\n <h1 id={headingId} {...slot(classes, 'h1')}>\n {title}\n </h1>\n ),\n summary: <p {...slot(classes, 'summary')}>{summary}</p>,\n actions: (\n <div {...slot(classes, 'actions')} data-bl-call-path=\"\" data-primary={primary}>\n <PhoneLink phone={phone} placement=\"hero\" label={phoneLabel} showIcon variant=\"button\" classes={{ root: classes?.phone }} />\n <QuoteButton\n label={quote.label}\n href={quote.href ?? `#${HERO_FORM_ID}`}\n placement=\"hero\"\n ctaId=\"quote-hero\"\n variant={primary === 'quote' ? 'primary' : 'secondary'}\n classes={{ root: classes?.quote }}\n />\n </div>\n ),\n checklist:\n checklist.length > 0 ? (\n <div {...slot(classes, 'checklist')}>\n <TickList items={checklist} layout={{ columns: layout?.checklistColumns ?? 2, ...(layout?.checklistTick ? { tick: layout.checklistTick } : {}) }} />\n </div>\n ) : null,\n rating: hasGoogleRating(rating) ? (\n <RatingChip\n reviews={rating}\n moreLabel={ratingMoreLabel}\n layout={layout?.rating === 'figure' ? { display: 'figure' } : undefined}\n classes={{ root: classes?.rating }}\n />\n ) : null,\n badges: badges ? <div {...slot(classes, 'badges')}>{badges}</div> : null,\n }\n return (\n <Section\n id=\"hero\"\n labelledBy={headingId}\n tone={tone}\n variant={variant}\n classes={classes}\n decoration={decoration}\n phonePlacement=\"hero\"\n hooks={{\n 'data-family': family,\n 'data-job-mode': jobMode,\n 'data-height': layout?.height ?? (family === 'home' ? 'tall' : 'standard'),\n 'data-media-side': variant === 'split' ? (layout?.mediaSide ?? 'end') : undefined,\n 'data-form': form ? '' : undefined,\n 'data-scrim': scrim === 'none' ? undefined : scrim,\n }}\n >\n <div {...slot(classes, 'content')}>\n {crumbs ? <div {...slot(classes, 'crumbs')}>{crumbs}</div> : null}\n {heroContentOrder(layout?.contentOrder).map((part) => (\n <Fragment key={part}>{parts[part]}</Fragment>\n ))}\n </div>\n <div {...slot(classes, 'media')}>\n <MediaFrame\n media={media}\n ratio=\"4:3\"\n sizes={variant === 'full-bleed' ? '100vw' : '(min-width: 1024px) 50vw, 100vw'}\n caption={caption}\n priority\n classes={{ caption: classes?.caption }}\n />\n {scrim === 'none' ? null : <div {...slot(classes, 'scrim')} aria-hidden=\"true\" />}\n {seal ? (\n <p {...slot(classes, 'seal')}>\n <span {...slot(classes, 'sealValue')}>{seal.value}</span> <span {...slot(classes, 'sealLabel')}>{seal.label}</span>\n </p>\n ) : null}\n </div>\n {form ? (\n <div {...slot(classes, 'form')}>\n {formHeading ? (\n <div {...slot(classes, 'formHead')}>\n {formHeading.eyebrow ? <p {...slot(classes, 'formEyebrow')}>{formHeading.eyebrow}</p> : null}\n <h2 id={HERO_FORM_HEADING_ID} {...slot(classes, 'formTitle')}>\n {formHeading.title}\n </h2>\n {formHeading.text ? <p {...slot(classes, 'formText')}>{formHeading.text}</p> : null}\n </div>\n ) : null}\n {form}\n </div>\n ) : null}\n </Section>\n )\n}\n"]}
|
|
@@ -312,40 +312,46 @@
|
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
/* 07-motif.css */
|
|
315
|
-
/* 3.16.0 brand motif tokens: a client's own marks, available to every section. Each
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
315
|
+
/* 3.16.0 brand motif tokens: a client's own marks, available to every section. Each draws nothing until the site
|
|
316
|
+
sets it, and none touches a property a skin already sets (3.16.1: the two marks drawn before a heading or eyebrow
|
|
317
|
+
are switched on with `on`, through a style query, so a site's own ::before mark is left alone; a browser without
|
|
318
|
+
style queries simply draws no motif):
|
|
319
|
+
--bl-motif-rule: on a short rule above each section H2 (-size, -weight, -color, -gap tokens below);
|
|
320
|
+
--bl-motif-dash: on a dash before each eyebrow (-size, -weight, -color, -gap);
|
|
319
321
|
--bl-motif-divider: 2px solid … a border between neighbouring sections;
|
|
320
322
|
--bl-motif-texture: url(…) a background image on the page's band;
|
|
321
323
|
--bl-motif-media-clip: polygon(…) a corner shape for section photos. */
|
|
322
324
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
325
|
+
@container style(--bl-motif-rule: on) {
|
|
326
|
+
[data-bl-section] h2[data-slot='heading']::before {
|
|
327
|
+
content: '';
|
|
328
|
+
display: block;
|
|
329
|
+
inline-size: var(--bl-motif-rule-size, 3rem);
|
|
330
|
+
block-size: var(--bl-motif-rule-weight, 3px);
|
|
331
|
+
margin-block-end: var(--bl-motif-rule-gap, 0.75rem);
|
|
332
|
+
background: var(--bl-motif-rule-color, currentColor);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
@container style(--bl-motif-dash: on) {
|
|
336
|
+
[data-bl-section] [data-slot='eyebrow']::before,
|
|
337
|
+
[data-bl='eyebrow']::before {
|
|
338
|
+
content: '';
|
|
339
|
+
display: inline-block;
|
|
340
|
+
inline-size: var(--bl-motif-dash-size, 1.5rem);
|
|
341
|
+
block-size: var(--bl-motif-dash-weight, 2px);
|
|
342
|
+
margin-inline-end: var(--bl-motif-dash-gap, 0.5rem);
|
|
343
|
+
vertical-align: middle;
|
|
344
|
+
background: var(--bl-motif-dash-color, currentColor);
|
|
345
|
+
}
|
|
340
346
|
}
|
|
341
347
|
[data-bl-section] + [data-bl-section] {
|
|
342
|
-
border-block-start: var(--bl-motif-divider
|
|
348
|
+
border-block-start: var(--bl-motif-divider);
|
|
343
349
|
}
|
|
344
350
|
[data-bl-section][data-tone='band'] {
|
|
345
|
-
background-image: var(--bl-motif-texture
|
|
351
|
+
background-image: var(--bl-motif-texture);
|
|
346
352
|
}
|
|
347
353
|
[data-bl-section] [data-bl='media'] {
|
|
348
|
-
clip-path: var(--bl-motif-media-clip
|
|
354
|
+
clip-path: var(--bl-motif-media-clip);
|
|
349
355
|
}
|
|
350
356
|
|
|
351
357
|
/* 10-header.css */
|
|
@@ -1304,7 +1310,7 @@
|
|
|
1304
1310
|
pointer-events: none;
|
|
1305
1311
|
}
|
|
1306
1312
|
[data-bl-section='hero'][data-variant='full-bleed'][data-scrim='column'] [data-slot='scrim'] {
|
|
1307
|
-
inset-inline-end: var(--bl-hero-scrim-column-
|
|
1313
|
+
inset-inline-end: calc(100% - var(--bl-hero-scrim-column-width, 60%));
|
|
1308
1314
|
}
|
|
1309
1315
|
[data-bl-section='hero'][data-variant='full-bleed'] [data-slot='seal'] {
|
|
1310
1316
|
inset-inline: auto 1.5rem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brandlab-digital/site-next",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@brandlab-digital/site-core": "3.16.
|
|
28
|
+
"@brandlab-digital/site-core": "3.16.1",
|
|
29
29
|
"browser-image-compression": "2.0.2",
|
|
30
30
|
"pdf-lib": "1.17.1",
|
|
31
31
|
"server-only": "0.0.1",
|