@brandlab-digital/site-next 3.16.0 → 3.17.0
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/ui-kit/repeated-slots.d.ts +3 -3
- package/dist/ui-kit/repeated-slots.d.ts.map +1 -1
- package/dist/ui-kit/repeated-slots.js +6 -3
- package/dist/ui-kit/repeated-slots.js.map +1 -1
- package/dist/ui-kit/sections/area-map.d.ts.map +1 -1
- package/dist/ui-kit/sections/area-map.js +8 -4
- package/dist/ui-kit/sections/area-map.js.map +1 -1
- package/dist/ui-kit/sections/contact-block.d.ts +24 -2
- package/dist/ui-kit/sections/contact-block.d.ts.map +1 -1
- package/dist/ui-kit/sections/contact-block.js +9 -3
- package/dist/ui-kit/sections/contact-block.js.map +1 -1
- package/dist/ui-kit/sections/hero.d.ts +7 -3
- package/dist/ui-kit/sections/hero.d.ts.map +1 -1
- package/dist/ui-kit/sections/hero.js +10 -4
- package/dist/ui-kit/sections/hero.js.map +1 -1
- package/dist/ui-kit/sections/local-facts.d.ts +33 -4
- package/dist/ui-kit/sections/local-facts.d.ts.map +1 -1
- package/dist/ui-kit/sections/local-facts.js +18 -6
- package/dist/ui-kit/sections/local-facts.js.map +1 -1
- package/dist/ui-kit/sections/nearby-jobs.d.ts +20 -2
- package/dist/ui-kit/sections/nearby-jobs.d.ts.map +1 -1
- package/dist/ui-kit/sections/nearby-jobs.js +23 -6
- package/dist/ui-kit/sections/nearby-jobs.js.map +1 -1
- package/dist/ui-kit/sections/proof-strip.d.ts +3 -1
- package/dist/ui-kit/sections/proof-strip.d.ts.map +1 -1
- package/dist/ui-kit/sections/proof-strip.js +5 -2
- package/dist/ui-kit/sections/proof-strip.js.map +1 -1
- package/dist/ui-kit/sections/site-footer.d.ts +6 -2
- package/dist/ui-kit/sections/site-footer.d.ts.map +1 -1
- package/dist/ui-kit/sections/site-footer.js +7 -2
- package/dist/ui-kit/sections/site-footer.js.map +1 -1
- package/dist/ui-kit/structure.css +170 -25
- package/package.json +2 -2
|
@@ -53,7 +53,7 @@ export declare const REPEATED_SLOTS: {
|
|
|
53
53
|
};
|
|
54
54
|
readonly proofStrip: {
|
|
55
55
|
readonly scope: "[data-bl-section=\"proof-strip\"] [data-slot=\"list\"]";
|
|
56
|
-
readonly slots: readonly ["item", "link", "icon", "stars", "value", "label"];
|
|
56
|
+
readonly slots: readonly ["item", "link", "icon", "stars", "value", "label", "linkLabel"];
|
|
57
57
|
};
|
|
58
58
|
readonly reviewsBand: {
|
|
59
59
|
readonly scope: "[data-bl-section=\"reviews\"] [data-slot=\"list\"]";
|
|
@@ -61,7 +61,7 @@ export declare const REPEATED_SLOTS: {
|
|
|
61
61
|
};
|
|
62
62
|
readonly contactBlock: {
|
|
63
63
|
readonly scope: "[data-bl-section=\"contact\"] [data-slot=\"details\"]";
|
|
64
|
-
readonly slots: readonly ["line"];
|
|
64
|
+
readonly slots: readonly ["line", "note"];
|
|
65
65
|
};
|
|
66
66
|
readonly servicesGrid: {
|
|
67
67
|
readonly scope: "[data-bl-section=\"services\"] [data-slot=\"list\"]";
|
|
@@ -81,7 +81,7 @@ export declare const REPEATED_SLOTS: {
|
|
|
81
81
|
};
|
|
82
82
|
readonly nearbyJobs: {
|
|
83
83
|
readonly scope: "[data-bl-section=\"nearby-jobs\"] [data-slot=\"list\"]";
|
|
84
|
-
readonly slots: readonly ["item", "body", "media", "title", "link", "outcome"];
|
|
84
|
+
readonly slots: readonly ["item", "body", "media", "title", "link", "outcome", "cue"];
|
|
85
85
|
};
|
|
86
86
|
readonly coverage: {
|
|
87
87
|
readonly scope: "[data-bl-section=\"coverage\"] [data-slot=\"groups\"]";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repeated-slots.d.ts","sourceRoot":"","sources":["../../src/ui-kit/repeated-slots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;QAqBvB,kGAAkG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"repeated-slots.d.ts","sourceRoot":"","sources":["../../src/ui-kit/repeated-slots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;QAqBvB,kGAAkG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsDpG,mGAAmG;;;;;;;;;CAE3F,CAAA;AAEV,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,cAAc,CAAA;AAC/D,6HAA6H;AAC7H,MAAM,MAAM,cAAc,CAAC,SAAS,SAAS,qBAAqB,IAAI,CAAC,OAAO,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzH,sHAAsH;AACtH,wBAAgB,oBAAoB,CAAC,SAAS,SAAS,qBAAqB,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,MAAM,CAG3I"}
|
|
@@ -49,12 +49,15 @@ export const REPEATED_SLOTS = {
|
|
|
49
49
|
'figures', 'band', 'factor', 'name', 'effect', 'detail',
|
|
50
50
|
],
|
|
51
51
|
},
|
|
52
|
-
proofStrip: {
|
|
52
|
+
proofStrip: {
|
|
53
|
+
scope: '[data-bl-section="proof-strip"] [data-slot="list"]',
|
|
54
|
+
slots: ['item', 'link', 'icon', 'stars', 'value', 'label', 'linkLabel'],
|
|
55
|
+
},
|
|
53
56
|
reviewsBand: {
|
|
54
57
|
scope: '[data-bl-section="reviews"] [data-slot="list"]',
|
|
55
58
|
slots: ['item', 'stars', 'quote', 'more', 'author', 'avatar', 'name', 'date'],
|
|
56
59
|
},
|
|
57
|
-
contactBlock: { scope: '[data-bl-section="contact"] [data-slot="details"]', slots: ['line'] },
|
|
60
|
+
contactBlock: { scope: '[data-bl-section="contact"] [data-slot="details"]', slots: ['line', 'note'] },
|
|
58
61
|
servicesGrid: {
|
|
59
62
|
scope: '[data-bl-section="services"] [data-slot="list"]',
|
|
60
63
|
slots: ['item', 'body', 'media', 'title', 'summary', 'points', 'point', 'action', 'link'],
|
|
@@ -63,7 +66,7 @@ export const REPEATED_SLOTS = {
|
|
|
63
66
|
// Location sections (3.15.0). Their link lists are `LinkList`s, reached through `linkList` (`[data-bl="link-list"]`).
|
|
64
67
|
localFacts: { scope: '[data-bl-section="local-facts"]', slots: ['fact', 'factSource', 'fee'] },
|
|
65
68
|
councilRules: { scope: '[data-bl-section="council-rules"]', slots: ['fee'] },
|
|
66
|
-
nearbyJobs: { scope: '[data-bl-section="nearby-jobs"] [data-slot="list"]', slots: ['item', 'body', 'media', 'title', 'link', 'outcome'] },
|
|
69
|
+
nearbyJobs: { scope: '[data-bl-section="nearby-jobs"] [data-slot="list"]', slots: ['item', 'body', 'media', 'title', 'link', 'outcome', 'cue'] },
|
|
67
70
|
coverage: { scope: '[data-bl-section="coverage"] [data-slot="groups"]', slots: ['group', 'groupHeading'] },
|
|
68
71
|
relatedServices: {
|
|
69
72
|
scope: '[data-bl-section="related-services"] [data-slot="list"]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repeated-slots.js","sourceRoot":"","sources":["../../src/ui-kit/repeated-slots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,UAAU,EAAE;QACV,KAAK,EAAE,uCAAuC;QAC9C,KAAK,EAAE;YACL,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE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EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;IAC/D,IAAI,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;IAC7D,IAAI,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;IACtE,QAAQ,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;IACrF,mGAAmG;IACnG,QAAQ,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;CACxG,CAAA;AAMV,sHAAsH;AACtH,MAAM,UAAU,oBAAoB,CAA0C,SAAoB,EAAE,IAA+B;IACjI,MAAM,KAAK,GAAkF,cAAc,CAAC,SAAS,CAAC,CAAA;IACtH,OAAO,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,eAAe,IAAI,IAAI,EAAE,CAAA;AAC3E,CAAC","sourcesContent":["/**\n * The repeated slots of every shared component (3.14.0): the parts a component renders once per entry of a list in\n * its data. They carry their `data-slot` hook and never a class, so a long class string is not repeated in the HTML and\n * the RSC payload for every link, review, star, card or chip. A site styles them once in `src/site/skin.css`:\n *\n * ```css\n * @layer components {\n * [data-bl=\"footer\"] [data-slot=\"link\"] { @apply text-sm text-white/80 hover:text-white; }\n * [data-bl=\"header\"] [data-slot=\"list\"] [data-slot=\"panelLink\"] { padding: 0.5rem 0.75rem; }\n * }\n * ```\n *\n * `scope` is the selector that holds the repeated slots without reaching a nested component that reuses a slot name\n * (the drawer sits inside the header; the rating chip inside the reviews band uses `stars` too).\n * `repeatedSlotSelector()` joins the two. Pure data: safe to import anywhere.\n */\nexport const REPEATED_SLOTS = {\n siteHeader: {\n scope: '[data-bl=\"header\"] [data-slot=\"list\"]',\n slots: [\n 'item', 'itemRow', 'link', 'trigger', 'panel', 'panelBody', 'panelList', 'panelGroup', 'panelHeading', 'panelLink',\n 'panelLabel', 'panelText', 'featured', 'featuredMedia', 'featuredLabel', 'featuredText',\n ],\n },\n mobileDrawer: {\n scope: '[data-bl=\"drawer\"]',\n slots: ['group', 'groupTrigger', 'groupLinks', 'groupLink', 'link', 'socialLink'],\n },\n utilityBar: { scope: '[data-bl=\"utility\"]', slots: ['item', 'licence', 'socialLink'] },\n siteFooter: {\n scope: '[data-bl=\"footer\"]',\n slots: ['licenceLink', 'socialLink', 'column', 'heading', 'toggle', 'list', 'link', 'policyLink'],\n },\n accordion: { scope: '[data-bl=\"accordion\"]', slots: ['item', 'summary', 'label', 'marker', 'content'] },\n faqs: {\n scope: '[data-bl-section=\"faqs\"] [data-slot=\"columns\"]',\n slots: ['column', 'group', 'subheading', 'accordion', 'item', 'summary', 'label', 'marker', 'content'],\n /** The nested accordion's root is its own component: `data-bl=\"accordion\"`, not a `data-slot`. */\n hooks: { accordion: '[data-bl=\"accordion\"]' },\n },\n priceTable: {\n scope: '[data-bl=\"price-table\"]',\n slots: ['row', 'job', 'cell', 'label', 'range', 'unit', 'gst', 'parts', 'part', 'includes', 'excludes'],\n },\n priceGuide: {\n scope: '[data-bl-section=\"price-guide\"]',\n slots: [\n 'row', 'job', 'cell', 'label', 'range', 'unit', 'gst', 'parts', 'part', 'includes', 'excludes', 'card', 'title',\n 'figures', 'band', 'factor', 'name', 'effect', 'detail',\n ],\n },\n proofStrip: { scope: '[data-bl-section=\"proof-strip\"] [data-slot=\"list\"]', slots: ['item', 'link', 'icon', 'stars', 'value', 'label'] },\n reviewsBand: {\n scope: '[data-bl-section=\"reviews\"] [data-slot=\"list\"]',\n slots: ['item', 'stars', 'quote', 'more', 'author', 'avatar', 'name', 'date'],\n },\n contactBlock: { scope: '[data-bl-section=\"contact\"] [data-slot=\"details\"]', slots: ['line'] },\n servicesGrid: {\n scope: '[data-bl-section=\"services\"] [data-slot=\"list\"]',\n slots: ['item', 'body', 'media', 'title', 'summary', 'points', 'point', 'action', 'link'],\n },\n breadcrumbs: { scope: '[data-bl=\"breadcrumbs\"]', slots: ['item', 'link', 'current'] },\n // Location sections (3.15.0). Their link lists are `LinkList`s, reached through `linkList` (`[data-bl=\"link-list\"]`).\n localFacts: { scope: '[data-bl-section=\"local-facts\"]', slots: ['fact', 'factSource', 'fee'] },\n councilRules: { scope: '[data-bl-section=\"council-rules\"]', slots: ['fee'] },\n nearbyJobs: { scope: '[data-bl-section=\"nearby-jobs\"] [data-slot=\"list\"]', slots: ['item', 'body', 'media', 'title', 'link', 'outcome'] },\n coverage: { scope: '[data-bl-section=\"coverage\"] [data-slot=\"groups\"]', slots: ['group', 'groupHeading'] },\n relatedServices: {\n scope: '[data-bl-section=\"related-services\"] [data-slot=\"list\"]',\n slots: ['item', 'body', 'media', 'title', 'summary', 'link'],\n },\n // Proof sections (3.15.0). Their photos are nested `[data-bl=\"media\"]` frames; project cards are `[data-bl=\"card\"]`.\n gallery: { scope: '[data-bl-section=\"gallery\"] [data-slot=\"list\"]', slots: ['item', 'link'] },\n beforeAfter: { scope: '[data-bl-section=\"before-after\"] [data-slot=\"list\"]', slots: ['pair', 'frames', 'frame', 'note'] },\n licences: {\n scope: '[data-bl-section=\"licences\"] [data-slot=\"list\"]',\n slots: ['row', 'label', 'value', 'number', 'holder', 'classes', 'class', 'register', 'cover', 'amount'],\n },\n thankYou: { scope: '[data-bl=\"thank-you\"]', slots: ['step'] },\n photoUpload: { scope: '[data-bl=\"photo-upload\"]', slots: ['photo', 'thumb', 'remove'] },\n quoteForm: { scope: '[data-bl=\"quote-form\"] [data-bl=\"photo-upload\"]', slots: ['photo', 'thumb', 'remove'] },\n // Primitives rendered once per list entry (3.14.0): every part is repeated, the root included (style the root\n // through its own hook, `[data-bl=\"card\"]`).\n card: { scope: '[data-bl=\"card\"]', slots: ['media', 'body', 'title', 'link', 'text', 'meta'] },\n badge: { scope: '[data-bl=\"badge\"]', slots: ['icon', 'label'] },\n chip: { scope: '[data-bl=\"chip\"]', slots: ['icon', 'label'] },\n stat: { scope: '[data-bl=\"stat\"]', slots: ['value', 'label', 'link'] },\n tickList: { scope: '[data-bl=\"tick-list\"]', slots: ['item', 'tick', 'text', 'link'] },\n /** A lean list (cost item 1f): plain `<li><a>` entries with no `data-slot`, reached by element. */\n linkList: { scope: '[data-bl=\"link-list\"]', slots: ['item', 'link'], hooks: { item: '> li', link: '> li > a' } },\n} as const\n\nexport type RepeatedSlotComponent = keyof typeof REPEATED_SLOTS\n/** The repeated slots of one component, for example `RepeatedSlotOf<'siteFooter'>` is `'licenceLink' | … | 'policyLink'`. */\nexport type RepeatedSlotOf<Component extends RepeatedSlotComponent> = (typeof REPEATED_SLOTS)[Component]['slots'][number]\n\n/** The selector a skin stylesheet uses for one repeated slot, for example `[data-bl=\"footer\"] [data-slot=\"link\"]`. */\nexport function repeatedSlotSelector<Component extends RepeatedSlotComponent>(component: Component, slot: RepeatedSlotOf<Component>): string {\n const entry: { readonly scope: string; readonly hooks?: Readonly<Record<string, string>> } = REPEATED_SLOTS[component]\n return `${entry.scope} ${entry.hooks?.[slot] ?? `[data-slot=\"${slot}\"]`}`\n}\n"]}
|
|
1
|
+
{"version":3,"file":"repeated-slots.js","sourceRoot":"","sources":["../../src/ui-kit/repeated-slots.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,UAAU,EAAE;QACV,KAAK,EAAE,uCAAuC;QAC9C,KAAK,EAAE;YACL,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW;YACl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AE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;IAC/D,IAAI,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;IAC7D,IAAI,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;IACtE,QAAQ,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;IACrF,mGAAmG;IACnG,QAAQ,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;CACxG,CAAA;AAMV,sHAAsH;AACtH,MAAM,UAAU,oBAAoB,CAA0C,SAAoB,EAAE,IAA+B;IACjI,MAAM,KAAK,GAAkF,cAAc,CAAC,SAAS,CAAC,CAAA;IACtH,OAAO,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,eAAe,IAAI,IAAI,EAAE,CAAA;AAC3E,CAAC","sourcesContent":["/**\n * The repeated slots of every shared component (3.14.0): the parts a component renders once per entry of a list in\n * its data. They carry their `data-slot` hook and never a class, so a long class string is not repeated in the HTML and\n * the RSC payload for every link, review, star, card or chip. A site styles them once in `src/site/skin.css`:\n *\n * ```css\n * @layer components {\n * [data-bl=\"footer\"] [data-slot=\"link\"] { @apply text-sm text-white/80 hover:text-white; }\n * [data-bl=\"header\"] [data-slot=\"list\"] [data-slot=\"panelLink\"] { padding: 0.5rem 0.75rem; }\n * }\n * ```\n *\n * `scope` is the selector that holds the repeated slots without reaching a nested component that reuses a slot name\n * (the drawer sits inside the header; the rating chip inside the reviews band uses `stars` too).\n * `repeatedSlotSelector()` joins the two. Pure data: safe to import anywhere.\n */\nexport const REPEATED_SLOTS = {\n siteHeader: {\n scope: '[data-bl=\"header\"] [data-slot=\"list\"]',\n slots: [\n 'item', 'itemRow', 'link', 'trigger', 'panel', 'panelBody', 'panelList', 'panelGroup', 'panelHeading', 'panelLink',\n 'panelLabel', 'panelText', 'featured', 'featuredMedia', 'featuredLabel', 'featuredText',\n ],\n },\n mobileDrawer: {\n scope: '[data-bl=\"drawer\"]',\n slots: ['group', 'groupTrigger', 'groupLinks', 'groupLink', 'link', 'socialLink'],\n },\n utilityBar: { scope: '[data-bl=\"utility\"]', slots: ['item', 'licence', 'socialLink'] },\n siteFooter: {\n scope: '[data-bl=\"footer\"]',\n slots: ['licenceLink', 'socialLink', 'column', 'heading', 'toggle', 'list', 'link', 'policyLink'],\n },\n accordion: { scope: '[data-bl=\"accordion\"]', slots: ['item', 'summary', 'label', 'marker', 'content'] },\n faqs: {\n scope: '[data-bl-section=\"faqs\"] [data-slot=\"columns\"]',\n slots: ['column', 'group', 'subheading', 'accordion', 'item', 'summary', 'label', 'marker', 'content'],\n /** The nested accordion's root is its own component: `data-bl=\"accordion\"`, not a `data-slot`. */\n hooks: { accordion: '[data-bl=\"accordion\"]' },\n },\n priceTable: {\n scope: '[data-bl=\"price-table\"]',\n slots: ['row', 'job', 'cell', 'label', 'range', 'unit', 'gst', 'parts', 'part', 'includes', 'excludes'],\n },\n priceGuide: {\n scope: '[data-bl-section=\"price-guide\"]',\n slots: [\n 'row', 'job', 'cell', 'label', 'range', 'unit', 'gst', 'parts', 'part', 'includes', 'excludes', 'card', 'title',\n 'figures', 'band', 'factor', 'name', 'effect', 'detail',\n ],\n },\n proofStrip: {\n scope: '[data-bl-section=\"proof-strip\"] [data-slot=\"list\"]',\n slots: ['item', 'link', 'icon', 'stars', 'value', 'label', 'linkLabel'],\n },\n reviewsBand: {\n scope: '[data-bl-section=\"reviews\"] [data-slot=\"list\"]',\n slots: ['item', 'stars', 'quote', 'more', 'author', 'avatar', 'name', 'date'],\n },\n contactBlock: { scope: '[data-bl-section=\"contact\"] [data-slot=\"details\"]', slots: ['line', 'note'] },\n servicesGrid: {\n scope: '[data-bl-section=\"services\"] [data-slot=\"list\"]',\n slots: ['item', 'body', 'media', 'title', 'summary', 'points', 'point', 'action', 'link'],\n },\n breadcrumbs: { scope: '[data-bl=\"breadcrumbs\"]', slots: ['item', 'link', 'current'] },\n // Location sections (3.15.0). Their link lists are `LinkList`s, reached through `linkList` (`[data-bl=\"link-list\"]`).\n localFacts: { scope: '[data-bl-section=\"local-facts\"]', slots: ['fact', 'factSource', 'fee'] },\n councilRules: { scope: '[data-bl-section=\"council-rules\"]', slots: ['fee'] },\n nearbyJobs: { scope: '[data-bl-section=\"nearby-jobs\"] [data-slot=\"list\"]', slots: ['item', 'body', 'media', 'title', 'link', 'outcome', 'cue'] },\n coverage: { scope: '[data-bl-section=\"coverage\"] [data-slot=\"groups\"]', slots: ['group', 'groupHeading'] },\n relatedServices: {\n scope: '[data-bl-section=\"related-services\"] [data-slot=\"list\"]',\n slots: ['item', 'body', 'media', 'title', 'summary', 'link'],\n },\n // Proof sections (3.15.0). Their photos are nested `[data-bl=\"media\"]` frames; project cards are `[data-bl=\"card\"]`.\n gallery: { scope: '[data-bl-section=\"gallery\"] [data-slot=\"list\"]', slots: ['item', 'link'] },\n beforeAfter: { scope: '[data-bl-section=\"before-after\"] [data-slot=\"list\"]', slots: ['pair', 'frames', 'frame', 'note'] },\n licences: {\n scope: '[data-bl-section=\"licences\"] [data-slot=\"list\"]',\n slots: ['row', 'label', 'value', 'number', 'holder', 'classes', 'class', 'register', 'cover', 'amount'],\n },\n thankYou: { scope: '[data-bl=\"thank-you\"]', slots: ['step'] },\n photoUpload: { scope: '[data-bl=\"photo-upload\"]', slots: ['photo', 'thumb', 'remove'] },\n quoteForm: { scope: '[data-bl=\"quote-form\"] [data-bl=\"photo-upload\"]', slots: ['photo', 'thumb', 'remove'] },\n // Primitives rendered once per list entry (3.14.0): every part is repeated, the root included (style the root\n // through its own hook, `[data-bl=\"card\"]`).\n card: { scope: '[data-bl=\"card\"]', slots: ['media', 'body', 'title', 'link', 'text', 'meta'] },\n badge: { scope: '[data-bl=\"badge\"]', slots: ['icon', 'label'] },\n chip: { scope: '[data-bl=\"chip\"]', slots: ['icon', 'label'] },\n stat: { scope: '[data-bl=\"stat\"]', slots: ['value', 'label', 'link'] },\n tickList: { scope: '[data-bl=\"tick-list\"]', slots: ['item', 'tick', 'text', 'link'] },\n /** A lean list (cost item 1f): plain `<li><a>` entries with no `data-slot`, reached by element. */\n linkList: { scope: '[data-bl=\"link-list\"]', slots: ['item', 'link'], hooks: { item: '> li', link: '> li > a' } },\n} as const\n\nexport type RepeatedSlotComponent = keyof typeof REPEATED_SLOTS\n/** The repeated slots of one component, for example `RepeatedSlotOf<'siteFooter'>` is `'licenceLink' | … | 'policyLink'`. */\nexport type RepeatedSlotOf<Component extends RepeatedSlotComponent> = (typeof REPEATED_SLOTS)[Component]['slots'][number]\n\n/** The selector a skin stylesheet uses for one repeated slot, for example `[data-bl=\"footer\"] [data-slot=\"link\"]`. */\nexport function repeatedSlotSelector<Component extends RepeatedSlotComponent>(component: Component, slot: RepeatedSlotOf<Component>): string {\n const entry: { readonly scope: string; readonly hooks?: Readonly<Record<string, string>> } = REPEATED_SLOTS[component]\n return `${entry.scope} ${entry.hooks?.[slot] ?? `[data-slot=\"${slot}\"]`}`\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area-map.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/sections/area-map.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AACrD,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,sCAAsC,CAAA;AACtF,OAAO,EAAiB,KAAK,wBAAwB,EAAE,MAAM,2CAA2C,CAAA;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V,IAAI,EACJ,SAA8B,EAC9B,IAAI,EACJ,MAAM,EACN,OAAO,GACR,EAAE,YAAY,kDAoId"}
|
|
@@ -80,16 +80,20 @@ function keepInside(point, r, model) {
|
|
|
80
80
|
return { x: Math.round(Math.min(Math.max(point.x, pad), model.width - pad)), y: Math.round(Math.min(Math.max(point.y, pad), model.height - pad)), r };
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
|
-
* Where a name sits (3.15.0): centred on its label point and inside the frame, or, when that would cover a job pin or
|
|
83
|
+
* Where a name sits (3.15.0): centred on its label point and inside the frame (and the phone crop, 3.17.0), or, when that would cover a job pin or
|
|
84
84
|
* the base, just below or above the marker if that stays near its shape. A name with no clear place is not drawn (the
|
|
85
85
|
* place list still names it). Returns the text's x and baseline, or undefined.
|
|
86
86
|
*/
|
|
87
87
|
function placeName(label, size, marks, model) {
|
|
88
88
|
const half = (label.name.length * size * 0.56) / 2;
|
|
89
89
|
const pad = size * 0.3;
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
const
|
|
90
|
+
// 3.17.0: a name whose point is inside the phone crop stays inside the crop too, so phones never cut it off.
|
|
91
|
+
const { crop } = model;
|
|
92
|
+
const inCrop = label.x >= crop.x && label.x <= crop.x + crop.width && label.y >= crop.y && label.y <= crop.y + crop.height;
|
|
93
|
+
const box = inCrop && crop.width >= 2 * (half + pad) ? crop : { x: 0, y: 0, width: model.width, height: model.height };
|
|
94
|
+
const x = Math.min(Math.max(label.x, box.x + half + pad), box.x + box.width - half - pad);
|
|
95
|
+
const top = box.y + size * 0.8 + pad;
|
|
96
|
+
const bottom = box.y + box.height - size * 0.25 - pad;
|
|
93
97
|
const clear = (baseline) => marks.every((mark) => mark.x + mark.r + pad < x - half ||
|
|
94
98
|
mark.x - mark.r - pad > x + half ||
|
|
95
99
|
mark.y + mark.r + pad < baseline - size * 0.8 ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area-map.js","sourceRoot":"","sources":["../../../src/ui-k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C,CACN,eAAO,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,YAC1B,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,YACnC,IAAI,CAAC,KAAK,GACN,GACL,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,IACE,CACX,CAAA;AACH,CAAC","sourcesContent":["/**\n * `AreaMap` (`area-map`, 3.15.0): the service-area map of a suburb page (`locator`: the suburb, its nearest served\n * neighbours and nearby jobs) or a region page (`region`: the region's suburbs), and the overview of the home page or\n * locations hub (`overview`). Server component, no client JS.\n *\n * Data comes from site-core's map engine (`./area-map`, since 3.6.0): `suburbLocator`, `regionMap` or `overviewMap`\n * build a plain model on the server, and the site serves the model's static base layer once as a cached SVG file\n * (`renderAreaMapBaseSvg(site, model, { linked: true })`, for example at `/area-maps/<model.id>.svg`). The page's SVG\n * is lean: land, the focus area, served areas and outlines are `<use>` references into that file, and each linked\n * place is an `<a>` around a `<use>` of its shape (`areaMapShapeId`), so no boundary path sits in the page's HTML.\n *\n * The drawing is `aria-hidden` and its links are out of the tab order; the text alternative is the place list beside\n * it (`areaMapPlaces(model)`: the linked places as links, served places without an indexable page as plain names), a\n * lean `LinkList` marked `data-bl-links=\"map\"` that never prefetches (W2). Where the page's `NearbyAreas` or `Coverage`\n * already links the same places, pass `areaMapPlaces(model, { links: false })` so the map lists their names only. The\n * figure's caption is site copy; the boundary credit (CC BY 4.0) always follows it.\n */\nimport Link from 'next/link'\nimport type { CSSProperties, ReactNode } from 'react'\nimport type { AreaMapLabel, AreaMapModel } from '@brandlab-digital/site-core/area-map'\nimport { SECTION_READY, type BrandlabSectionReadiness } from '@brandlab-digital/site-core/section-order'\nimport { LinkList, type LinkListEntry, type LinkListLayout } from '../primitives/lists.js'\nimport { Section, SectionHeading, type SectionHeadingSlot, type SectionSlot, type SectionTone } from '../primitives/layout.js'\nimport { slot, type SkinEntry } from '../skin.js'\nimport type { UiLink } from '../types.js'\n\n/** The map a page shows, from its model's kind: `locator` (suburb or town), `region` or `overview`. */\nexport const AREA_MAP_VARIANTS = ['locator', 'region', 'overview'] as const\nexport type AreaMapVariant = (typeof AREA_MAP_VARIANTS)[number]\n\nexport type AreaMapSlot =\n | SectionSlot\n | SectionHeadingSlot\n | 'body'\n | 'figure'\n | 'frame'\n | 'map'\n | 'caption'\n | 'legend'\n | 'legendBase'\n | 'legendJobs'\n | 'credit'\n | 'places'\n | 'placesTitle'\n | 'list'\n | 'region'\n | 'more'\n\nexport interface AreaMapLayout extends LinkListLayout {\n /** The place list beside the map on wide screens (default) or below it. */\n readonly list?: 'beside' | 'below'\n /** Draw place names inside their shapes where they fit (default true). */\n readonly names?: boolean\n}\n\n/** The variant follows the model, so a skin sets the look (layout and classes) only. */\nexport type AreaMapSkin = SkinEntry<AreaMapSlot, never, AreaMapLayout>\n\n/** A model from site-core's map engine and the URL of its base layer file (written with `linked: true`). */\nexport interface AreaMapData {\n readonly model: AreaMapModel\n /** For example `/area-maps/suburb-castle-hill.svg`. */\n readonly baseHref: string\n}\n\nexport interface AreaMapProps extends AreaMapSkin {\n /** The H2, for example \"Where we work around Castle Hill\". */\n readonly title: ReactNode\n readonly eyebrow?: ReactNode\n readonly lead?: ReactNode\n /** The model and its base file; `undefined` (a locator with no neighbours or jobs) renders nothing. */\n readonly map: AreaMapData | undefined\n /** What the map shows, in the site's words (the figure's caption, before the boundary credit). */\n readonly caption: ReactNode\n /** A heading over the place list (an H3), for example \"Suburbs we serve near Castle Hill\". */\n readonly placesTitle?: ReactNode\n /** The text alternative. Defaults to `areaMapPlaces(map.model)`. */\n readonly places?: readonly LinkListEntry[]\n /** Legend lines in the site's words, shown only when the map has that marker. */\n readonly legend?: { readonly base?: ReactNode; readonly jobs?: ReactNode }\n /** The region's page on a locator, for example `{ label: 'All of the Hills District', href }`. Never prefetched. */\n readonly regionLink?: UiLink\n /** A link after the list, for example the areas hub. Never prefetched. */\n readonly more?: UiLink\n /** Defaults to `area-map-heading`. */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n}\n\nconst VARIANT_OF: Readonly<Record<AreaMapModel['kind'], AreaMapVariant>> = { overview: 'overview', region: 'region', suburb: 'locator' }\n\n/** Which shapes carry their name: the overview names every region with room; close-ups name the served places. */\nconst NAMED: Readonly<Record<AreaMapModel['kind'], readonly AreaMapLabel['state'][]>> = {\n overview: ['linked', 'served', 'muted'],\n region: ['linked', 'served'],\n suburb: ['focus', 'linked', 'served'],\n}\n\n/** A link's element id in the base file, as site-core's `areaMapShapeId` (kept here so the page never loads the boundary data). */\nconst shapeId = (key: string) => key.replace(':', '-')\n\n/**\n * The map's text alternative: its linked places as links and its served places without an indexable page as plain\n * names, in the model's order (a locator's nearest first, a region's by name). The page's own place is left out.\n * `links: false` lists every name as plain text, for a page whose `NearbyAreas` or `Coverage` links them already.\n */\nexport function areaMapPlaces(model: AreaMapModel, { links = true }: { readonly links?: boolean } = {}): LinkListEntry[] {\n const hrefOf = new Map(model.shapes.map((shape) => [shape.key, shape.href]))\n const seen = new Set<string>()\n const entries: LinkListEntry[] = []\n const add = (key: string, label: string) => {\n if (seen.has(key)) return\n seen.add(key)\n const href = hrefOf.get(key)\n entries.push(links && href !== undefined ? { label, href } : { label })\n }\n for (const label of model.labels) if (label.state === 'linked' || label.state === 'served') add(label.key, label.name)\n for (const shape of model.shapes) add(shape.key, shape.name)\n // A region's outlying served places are left out of its frame (3.15.0), so only the list names them.\n for (const place of model.outside ?? []) {\n if (seen.has(place.key)) continue\n seen.add(place.key)\n entries.push(links && place.href !== undefined ? { label: place.name, href: place.href } : { label: place.name })\n }\n if (model.kind === 'region') entries.sort((a, b) => a.label.localeCompare(b.label))\n return entries\n}\n\n/** The guard for `SectionSequence`: a locator with no neighbours and no jobs has no map. */\nexport function areaMapReady({ map }: Pick<AreaMapProps, 'map'>): BrandlabSectionReadiness {\n return map ? SECTION_READY : { render: false, reason: 'no-area-map' }\n}\n\n/** Whether a name fits inside its shape around the label point (`room` is the distance to the nearest edge). */\nfunction fits(label: AreaMapLabel, size: number): boolean {\n const halfWidth = (label.name.length * size * 0.56) / 2\n return halfWidth <= label.room * 1.4 && size * 0.6 <= label.room\n}\n\nconst percent = (value: number) => `${Math.round(value * 100) / 100}%`\n\ninterface Mark {\n readonly x: number\n readonly y: number\n readonly r: number\n}\n\n/** A marker's centre moved inside the frame by its radius and stroke. */\nfunction keepInside(point: { x: number; y: number }, r: number, model: AreaMapModel): Mark {\n const pad = r * 1.2\n return { x: Math.round(Math.min(Math.max(point.x, pad), model.width - pad)), y: Math.round(Math.min(Math.max(point.y, pad), model.height - pad)), r }\n}\n\n/**\n * Where a name sits (3.15.0): centred on its label point and inside the frame, or, when that would cover a job pin or\n * the base, just below or above the marker if that stays near its shape. A name with no clear place is not drawn (the\n * place list still names it). Returns the text's x and baseline, or undefined.\n */\nfunction placeName(label: AreaMapLabel, size: number, marks: readonly Mark[], model: AreaMapModel): { x: number; y: number } | undefined {\n const half = (label.name.length * size * 0.56) / 2\n const pad = size * 0.3\n const x = Math.min(Math.max(label.x, half + pad), model.width - half - pad)\n const top = size * 0.8 + pad\n const bottom = model.height - size * 0.25 - pad\n const clear = (baseline: number) =>\n marks.every(\n (mark) =>\n mark.x + mark.r + pad < x - half ||\n mark.x - mark.r - pad > x + half ||\n mark.y + mark.r + pad < baseline - size * 0.8 ||\n mark.y - mark.r - pad > baseline + size * 0.25,\n )\n const natural = label.y + size * 0.35\n // The nearest clear place first: just below or above whichever marker it would cover.\n const candidates = [natural, ...marks.flatMap((mark) => [mark.y + mark.r + pad + size * 0.85, mark.y - mark.r - pad - size * 0.3])].sort(\n (one, other) => Math.abs(one - natural) - Math.abs(other - natural),\n )\n for (const candidate of candidates) {\n const y = Math.min(Math.max(candidate, top), bottom)\n if (Math.abs(y - natural) > Math.max(label.room * 1.5, size)) continue\n if (clear(y)) return { x: Math.round(x), y: Math.round(y) }\n }\n return undefined\n}\n\nexport function AreaMap({\n title,\n eyebrow,\n lead,\n map,\n caption,\n placesTitle,\n places,\n legend,\n regionLink,\n more,\n headingId = 'area-map-heading',\n tone,\n layout,\n classes,\n}: AreaMapProps) {\n if (!map) return null\n const { model, baseHref } = map\n if (!/\\.svg(?:$|[?#])/.test(baseHref)) throw new Error(`AreaMap: baseHref must be the model's base SVG file, not \"${baseHref}\".`)\n const list = places ?? areaMapPlaces(model)\n if (regionLink && list.some((entry) => entry.href === regionLink.href)) throw new Error('AreaMap: the region link repeats a listed place.')\n const size = Math.round(model.width * 0.022)\n const marker = Math.round(model.width * 0.009)\n const names = layout?.names === false ? [] : model.labels.filter((label) => NAMED[model.kind].includes(label.state) && fits(label, size))\n const baseMarker = model.markers.find((point) => point.kind === 'base')\n const base = baseMarker ? keepInside(baseMarker, marker, model) : undefined\n const jobs = model.markers.filter((point) => point.kind === 'job').map((point) => ({ slug: point.slug, ...keepInside(point, marker, model) }))\n const marks: readonly Mark[] = base ? [...jobs, base] : jobs\n const placed = names.flatMap((label) => {\n const at = placeName(label, size, marks, model)\n return at ? [{ label, ...at }] : []\n })\n const { crop } = model\n const frame = {\n '--bl-map-ratio': `${model.width} / ${model.height}`,\n '--bl-map-crop-ratio': `${crop.width} / ${crop.height}`,\n '--bl-map-crop-size': percent((model.width / crop.width) * 100),\n '--bl-map-crop-x': percent((-crop.x / crop.width) * 100),\n '--bl-map-crop-y': percent((-crop.y / crop.height) * 100),\n } as CSSProperties\n const use = (id: string) => `${baseHref}#${id}`\n const legendBase = base && legend?.base ? legend.base : null\n const legendJobs = jobs.length > 0 && legend?.jobs ? legend.jobs : null\n return (\n <Section\n id=\"area-map\"\n labelledBy={headingId}\n tone={tone}\n variant={VARIANT_OF[model.kind]}\n classes={classes}\n hooks={{ 'data-list': layout?.list ?? 'beside' }}\n >\n <SectionHeading id={headingId} title={title} eyebrow={eyebrow} lead={lead} classes={classes} />\n <div {...slot(classes, 'body')}>\n <figure {...slot(classes, 'figure')}>\n <div {...slot(classes, 'frame')} style={frame}>\n <svg {...slot(classes, 'map')} viewBox={model.viewBox} aria-hidden=\"true\" focusable=\"false\">\n <rect data-layer=\"water\" width={model.width} height={model.height} />\n <use data-layer=\"land\" href={use('land')} />\n {model.layers.focus.length > 0 ? <use data-layer=\"focus\" href={use('focus')} /> : null}\n {model.layers.served.length > 0 ? <use data-layer=\"served\" href={use('served')} /> : null}\n {model.shapes.length > 0 ? (\n <g data-layer=\"linked\">\n {model.shapes.map((shape) => (\n <a key={shape.key} href={shape.href} tabIndex={-1}>\n <use href={use(shapeId(shape.key))} />\n </a>\n ))}\n </g>\n ) : null}\n <use data-layer=\"outline\" href={use('outline')} />\n {placed.length > 0 ? (\n <g data-layer=\"names\" fontSize={size} strokeWidth={Math.round(size * 0.2)}>\n {placed.map(({ label, x, y }) => (\n <text key={label.key} x={x} y={y} data-state={label.state}>\n {label.name}\n </text>\n ))}\n </g>\n ) : null}\n {jobs.length > 0 ? (\n <g data-layer=\"jobs\" strokeWidth={Math.round(marker * 0.35)}>\n {jobs.map((point) => (\n <circle key={point.slug} cx={point.x} cy={point.y} r={marker} />\n ))}\n </g>\n ) : null}\n {base ? (\n <rect\n data-layer=\"base\"\n x={base.x - marker}\n y={base.y - marker}\n width={marker * 2}\n height={marker * 2}\n strokeWidth={Math.round(marker * 0.35)}\n />\n ) : null}\n </svg>\n </div>\n <figcaption {...slot(classes, 'caption')}>\n {caption}\n {legendBase || legendJobs ? (\n <span {...slot(classes, 'legend')}>\n {legendBase ? (\n <span {...slot(classes, 'legendBase')}>\n <svg viewBox=\"0 0 12 12\" aria-hidden=\"true\" focusable=\"false\" data-layer=\"base\">\n <rect x=\"2\" y=\"2\" width=\"8\" height=\"8\" strokeWidth=\"1.5\" />\n </svg>\n {legendBase}\n </span>\n ) : null}\n {legendJobs ? (\n <span {...slot(classes, 'legendJobs')}>\n <svg viewBox=\"0 0 12 12\" aria-hidden=\"true\" focusable=\"false\" data-layer=\"jobs\">\n <circle cx=\"6\" cy=\"6\" r=\"4.5\" strokeWidth=\"1.5\" />\n </svg>\n {legendJobs}\n </span>\n ) : null}\n </span>\n ) : null}\n <small {...slot(classes, 'credit')}>{model.attribution}</small>\n </figcaption>\n </figure>\n {list.length > 0 || regionLink || more ? (\n <div {...slot(classes, 'places')}>\n {placesTitle && list.length > 0 ? <h3 {...slot(classes, 'placesTitle')}>{placesTitle}</h3> : null}\n <LinkList links={list} kind=\"map\" layout={layout?.columns !== undefined ? { columns: layout.columns } : undefined} classes={{ root: classes?.list }} />\n {regionLink ? (\n <p {...slot(classes, 'region')}>\n <Link href={regionLink.href} prefetch={false}>\n {regionLink.label}\n </Link>\n </p>\n ) : null}\n {more ? (\n <p {...slot(classes, 'more')}>\n <Link href={more.href} prefetch={false}>\n {more.label}\n </Link>\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\n </Section>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"file":"area-map.js","sourceRoot":"","sources":["../../../src/ui-kit/sections/area-map.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,IAAI,MAAM,WAAW,CAAA;AAG5B,OAAO,EAAE,aAAa,EAAiC,MAAM,2CAA2C,CAAA;AACxG,OAAO,EAAE,QAAQ,EAA2C,MAAM,wBAAwB,CAAA;AAC1F,OAAO,EAAE,OAAO,EAAE,cAAc,EAA+D,MAAM,yBAAyB,CAAA;AAC9H,OAAO,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AAGjD,uGAAuG;AACvG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAA;AA+D3E,MAAM,UAAU,GAA2D,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;AAExI,kHAAkH;AAClH,MAAM,KAAK,GAA6E;IACtF,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,O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AAK,GACZ,GACL,CACL,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,CAAC,CAAC,CAAC,CACN,eAAO,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,YAC1B,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,YACnC,IAAI,CAAC,KAAK,GACN,GACL,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,IACE,CACX,CAAA;AACH,CAAC","sourcesContent":["/**\n * `AreaMap` (`area-map`, 3.15.0): the service-area map of a suburb page (`locator`: the suburb, its nearest served\n * neighbours and nearby jobs) or a region page (`region`: the region's suburbs), and the overview of the home page or\n * locations hub (`overview`). Server component, no client JS.\n *\n * Data comes from site-core's map engine (`./area-map`, since 3.6.0): `suburbLocator`, `regionMap` or `overviewMap`\n * build a plain model on the server, and the site serves the model's static base layer once as a cached SVG file\n * (`renderAreaMapBaseSvg(site, model, { linked: true })`, for example at `/area-maps/<model.id>.svg`). The page's SVG\n * is lean: land, the focus area, served areas and outlines are `<use>` references into that file, and each linked\n * place is an `<a>` around a `<use>` of its shape (`areaMapShapeId`), so no boundary path sits in the page's HTML.\n *\n * The drawing is `aria-hidden` and its links are out of the tab order; the text alternative is the place list beside\n * it (`areaMapPlaces(model)`: the linked places as links, served places without an indexable page as plain names), a\n * lean `LinkList` marked `data-bl-links=\"map\"` that never prefetches (W2). Where the page's `NearbyAreas` or `Coverage`\n * already links the same places, pass `areaMapPlaces(model, { links: false })` so the map lists their names only. The\n * figure's caption is site copy; the boundary credit (CC BY 4.0) always follows it.\n */\nimport Link from 'next/link'\nimport type { CSSProperties, ReactNode } from 'react'\nimport type { AreaMapLabel, AreaMapModel } from '@brandlab-digital/site-core/area-map'\nimport { SECTION_READY, type BrandlabSectionReadiness } from '@brandlab-digital/site-core/section-order'\nimport { LinkList, type LinkListEntry, type LinkListLayout } from '../primitives/lists.js'\nimport { Section, SectionHeading, type SectionHeadingSlot, type SectionSlot, type SectionTone } from '../primitives/layout.js'\nimport { slot, type SkinEntry } from '../skin.js'\nimport type { UiLink } from '../types.js'\n\n/** The map a page shows, from its model's kind: `locator` (suburb or town), `region` or `overview`. */\nexport const AREA_MAP_VARIANTS = ['locator', 'region', 'overview'] as const\nexport type AreaMapVariant = (typeof AREA_MAP_VARIANTS)[number]\n\nexport type AreaMapSlot =\n | SectionSlot\n | SectionHeadingSlot\n | 'body'\n | 'figure'\n | 'frame'\n | 'map'\n | 'caption'\n | 'legend'\n | 'legendBase'\n | 'legendJobs'\n | 'credit'\n | 'places'\n | 'placesTitle'\n | 'list'\n | 'region'\n | 'more'\n\nexport interface AreaMapLayout extends LinkListLayout {\n /** The place list beside the map on wide screens (default) or below it. */\n readonly list?: 'beside' | 'below'\n /** Draw place names inside their shapes where they fit (default true). */\n readonly names?: boolean\n}\n\n/** The variant follows the model, so a skin sets the look (layout and classes) only. */\nexport type AreaMapSkin = SkinEntry<AreaMapSlot, never, AreaMapLayout>\n\n/** A model from site-core's map engine and the URL of its base layer file (written with `linked: true`). */\nexport interface AreaMapData {\n readonly model: AreaMapModel\n /** For example `/area-maps/suburb-castle-hill.svg`. */\n readonly baseHref: string\n}\n\nexport interface AreaMapProps extends AreaMapSkin {\n /** The H2, for example \"Where we work around Castle Hill\". */\n readonly title: ReactNode\n readonly eyebrow?: ReactNode\n readonly lead?: ReactNode\n /** The model and its base file; `undefined` (a locator with no neighbours or jobs) renders nothing. */\n readonly map: AreaMapData | undefined\n /** What the map shows, in the site's words (the figure's caption, before the boundary credit). */\n readonly caption: ReactNode\n /** A heading over the place list (an H3), for example \"Suburbs we serve near Castle Hill\". */\n readonly placesTitle?: ReactNode\n /** The text alternative. Defaults to `areaMapPlaces(map.model)`. */\n readonly places?: readonly LinkListEntry[]\n /** Legend lines in the site's words, shown only when the map has that marker. */\n readonly legend?: { readonly base?: ReactNode; readonly jobs?: ReactNode }\n /** The region's page on a locator, for example `{ label: 'All of the Hills District', href }`. Never prefetched. */\n readonly regionLink?: UiLink\n /** A link after the list, for example the areas hub. Never prefetched. */\n readonly more?: UiLink\n /** Defaults to `area-map-heading`. */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n}\n\nconst VARIANT_OF: Readonly<Record<AreaMapModel['kind'], AreaMapVariant>> = { overview: 'overview', region: 'region', suburb: 'locator' }\n\n/** Which shapes carry their name: the overview names every region with room; close-ups name the served places. */\nconst NAMED: Readonly<Record<AreaMapModel['kind'], readonly AreaMapLabel['state'][]>> = {\n overview: ['linked', 'served', 'muted'],\n region: ['linked', 'served'],\n suburb: ['focus', 'linked', 'served'],\n}\n\n/** A link's element id in the base file, as site-core's `areaMapShapeId` (kept here so the page never loads the boundary data). */\nconst shapeId = (key: string) => key.replace(':', '-')\n\n/**\n * The map's text alternative: its linked places as links and its served places without an indexable page as plain\n * names, in the model's order (a locator's nearest first, a region's by name). The page's own place is left out.\n * `links: false` lists every name as plain text, for a page whose `NearbyAreas` or `Coverage` links them already.\n */\nexport function areaMapPlaces(model: AreaMapModel, { links = true }: { readonly links?: boolean } = {}): LinkListEntry[] {\n const hrefOf = new Map(model.shapes.map((shape) => [shape.key, shape.href]))\n const seen = new Set<string>()\n const entries: LinkListEntry[] = []\n const add = (key: string, label: string) => {\n if (seen.has(key)) return\n seen.add(key)\n const href = hrefOf.get(key)\n entries.push(links && href !== undefined ? { label, href } : { label })\n }\n for (const label of model.labels) if (label.state === 'linked' || label.state === 'served') add(label.key, label.name)\n for (const shape of model.shapes) add(shape.key, shape.name)\n // A region's outlying served places are left out of its frame (3.15.0), so only the list names them.\n for (const place of model.outside ?? []) {\n if (seen.has(place.key)) continue\n seen.add(place.key)\n entries.push(links && place.href !== undefined ? { label: place.name, href: place.href } : { label: place.name })\n }\n if (model.kind === 'region') entries.sort((a, b) => a.label.localeCompare(b.label))\n return entries\n}\n\n/** The guard for `SectionSequence`: a locator with no neighbours and no jobs has no map. */\nexport function areaMapReady({ map }: Pick<AreaMapProps, 'map'>): BrandlabSectionReadiness {\n return map ? SECTION_READY : { render: false, reason: 'no-area-map' }\n}\n\n/** Whether a name fits inside its shape around the label point (`room` is the distance to the nearest edge). */\nfunction fits(label: AreaMapLabel, size: number): boolean {\n const halfWidth = (label.name.length * size * 0.56) / 2\n return halfWidth <= label.room * 1.4 && size * 0.6 <= label.room\n}\n\nconst percent = (value: number) => `${Math.round(value * 100) / 100}%`\n\ninterface Mark {\n readonly x: number\n readonly y: number\n readonly r: number\n}\n\n/** A marker's centre moved inside the frame by its radius and stroke. */\nfunction keepInside(point: { x: number; y: number }, r: number, model: AreaMapModel): Mark {\n const pad = r * 1.2\n return { x: Math.round(Math.min(Math.max(point.x, pad), model.width - pad)), y: Math.round(Math.min(Math.max(point.y, pad), model.height - pad)), r }\n}\n\n/**\n * Where a name sits (3.15.0): centred on its label point and inside the frame (and the phone crop, 3.17.0), or, when that would cover a job pin or\n * the base, just below or above the marker if that stays near its shape. A name with no clear place is not drawn (the\n * place list still names it). Returns the text's x and baseline, or undefined.\n */\nfunction placeName(label: AreaMapLabel, size: number, marks: readonly Mark[], model: AreaMapModel): { x: number; y: number } | undefined {\n const half = (label.name.length * size * 0.56) / 2\n const pad = size * 0.3\n // 3.17.0: a name whose point is inside the phone crop stays inside the crop too, so phones never cut it off.\n const { crop } = model\n const inCrop = label.x >= crop.x && label.x <= crop.x + crop.width && label.y >= crop.y && label.y <= crop.y + crop.height\n const box = inCrop && crop.width >= 2 * (half + pad) ? crop : { x: 0, y: 0, width: model.width, height: model.height }\n const x = Math.min(Math.max(label.x, box.x + half + pad), box.x + box.width - half - pad)\n const top = box.y + size * 0.8 + pad\n const bottom = box.y + box.height - size * 0.25 - pad\n const clear = (baseline: number) =>\n marks.every(\n (mark) =>\n mark.x + mark.r + pad < x - half ||\n mark.x - mark.r - pad > x + half ||\n mark.y + mark.r + pad < baseline - size * 0.8 ||\n mark.y - mark.r - pad > baseline + size * 0.25,\n )\n const natural = label.y + size * 0.35\n // The nearest clear place first: just below or above whichever marker it would cover.\n const candidates = [natural, ...marks.flatMap((mark) => [mark.y + mark.r + pad + size * 0.85, mark.y - mark.r - pad - size * 0.3])].sort(\n (one, other) => Math.abs(one - natural) - Math.abs(other - natural),\n )\n for (const candidate of candidates) {\n const y = Math.min(Math.max(candidate, top), bottom)\n if (Math.abs(y - natural) > Math.max(label.room * 1.5, size)) continue\n if (clear(y)) return { x: Math.round(x), y: Math.round(y) }\n }\n return undefined\n}\n\nexport function AreaMap({\n title,\n eyebrow,\n lead,\n map,\n caption,\n placesTitle,\n places,\n legend,\n regionLink,\n more,\n headingId = 'area-map-heading',\n tone,\n layout,\n classes,\n}: AreaMapProps) {\n if (!map) return null\n const { model, baseHref } = map\n if (!/\\.svg(?:$|[?#])/.test(baseHref)) throw new Error(`AreaMap: baseHref must be the model's base SVG file, not \"${baseHref}\".`)\n const list = places ?? areaMapPlaces(model)\n if (regionLink && list.some((entry) => entry.href === regionLink.href)) throw new Error('AreaMap: the region link repeats a listed place.')\n const size = Math.round(model.width * 0.022)\n const marker = Math.round(model.width * 0.009)\n const names = layout?.names === false ? [] : model.labels.filter((label) => NAMED[model.kind].includes(label.state) && fits(label, size))\n const baseMarker = model.markers.find((point) => point.kind === 'base')\n const base = baseMarker ? keepInside(baseMarker, marker, model) : undefined\n const jobs = model.markers.filter((point) => point.kind === 'job').map((point) => ({ slug: point.slug, ...keepInside(point, marker, model) }))\n const marks: readonly Mark[] = base ? [...jobs, base] : jobs\n const placed = names.flatMap((label) => {\n const at = placeName(label, size, marks, model)\n return at ? [{ label, ...at }] : []\n })\n const { crop } = model\n const frame = {\n '--bl-map-ratio': `${model.width} / ${model.height}`,\n '--bl-map-crop-ratio': `${crop.width} / ${crop.height}`,\n '--bl-map-crop-size': percent((model.width / crop.width) * 100),\n '--bl-map-crop-x': percent((-crop.x / crop.width) * 100),\n '--bl-map-crop-y': percent((-crop.y / crop.height) * 100),\n } as CSSProperties\n const use = (id: string) => `${baseHref}#${id}`\n const legendBase = base && legend?.base ? legend.base : null\n const legendJobs = jobs.length > 0 && legend?.jobs ? legend.jobs : null\n return (\n <Section\n id=\"area-map\"\n labelledBy={headingId}\n tone={tone}\n variant={VARIANT_OF[model.kind]}\n classes={classes}\n hooks={{ 'data-list': layout?.list ?? 'beside' }}\n >\n <SectionHeading id={headingId} title={title} eyebrow={eyebrow} lead={lead} classes={classes} />\n <div {...slot(classes, 'body')}>\n <figure {...slot(classes, 'figure')}>\n <div {...slot(classes, 'frame')} style={frame}>\n <svg {...slot(classes, 'map')} viewBox={model.viewBox} aria-hidden=\"true\" focusable=\"false\">\n <rect data-layer=\"water\" width={model.width} height={model.height} />\n <use data-layer=\"land\" href={use('land')} />\n {model.layers.focus.length > 0 ? <use data-layer=\"focus\" href={use('focus')} /> : null}\n {model.layers.served.length > 0 ? <use data-layer=\"served\" href={use('served')} /> : null}\n {model.shapes.length > 0 ? (\n <g data-layer=\"linked\">\n {model.shapes.map((shape) => (\n <a key={shape.key} href={shape.href} tabIndex={-1}>\n <use href={use(shapeId(shape.key))} />\n </a>\n ))}\n </g>\n ) : null}\n <use data-layer=\"outline\" href={use('outline')} />\n {placed.length > 0 ? (\n <g data-layer=\"names\" fontSize={size} strokeWidth={Math.round(size * 0.2)}>\n {placed.map(({ label, x, y }) => (\n <text key={label.key} x={x} y={y} data-state={label.state}>\n {label.name}\n </text>\n ))}\n </g>\n ) : null}\n {jobs.length > 0 ? (\n <g data-layer=\"jobs\" strokeWidth={Math.round(marker * 0.35)}>\n {jobs.map((point) => (\n <circle key={point.slug} cx={point.x} cy={point.y} r={marker} />\n ))}\n </g>\n ) : null}\n {base ? (\n <rect\n data-layer=\"base\"\n x={base.x - marker}\n y={base.y - marker}\n width={marker * 2}\n height={marker * 2}\n strokeWidth={Math.round(marker * 0.35)}\n />\n ) : null}\n </svg>\n </div>\n <figcaption {...slot(classes, 'caption')}>\n {caption}\n {legendBase || legendJobs ? (\n <span {...slot(classes, 'legend')}>\n {legendBase ? (\n <span {...slot(classes, 'legendBase')}>\n <svg viewBox=\"0 0 12 12\" aria-hidden=\"true\" focusable=\"false\" data-layer=\"base\">\n <rect x=\"2\" y=\"2\" width=\"8\" height=\"8\" strokeWidth=\"1.5\" />\n </svg>\n {legendBase}\n </span>\n ) : null}\n {legendJobs ? (\n <span {...slot(classes, 'legendJobs')}>\n <svg viewBox=\"0 0 12 12\" aria-hidden=\"true\" focusable=\"false\" data-layer=\"jobs\">\n <circle cx=\"6\" cy=\"6\" r=\"4.5\" strokeWidth=\"1.5\" />\n </svg>\n {legendJobs}\n </span>\n ) : null}\n </span>\n ) : null}\n <small {...slot(classes, 'credit')}>{model.attribution}</small>\n </figcaption>\n </figure>\n {list.length > 0 || regionLink || more ? (\n <div {...slot(classes, 'places')}>\n {placesTitle && list.length > 0 ? <h3 {...slot(classes, 'placesTitle')}>{placesTitle}</h3> : null}\n <LinkList links={list} kind=\"map\" layout={layout?.columns !== undefined ? { columns: layout.columns } : undefined} classes={{ root: classes?.list }} />\n {regionLink ? (\n <p {...slot(classes, 'region')}>\n <Link href={regionLink.href} prefetch={false}>\n {regionLink.label}\n </Link>\n </p>\n ) : null}\n {more ? (\n <p {...slot(classes, 'more')}>\n <Link href={more.href} prefetch={false}>\n {more.label}\n </Link>\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\n </Section>\n )\n}\n"]}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* `contact`), email, hours, the public address only where the site passes it, licences and areas. Nothing else: it
|
|
5
5
|
* takes no other content, and the page is the page header then this block (K12-contact). The form side always has
|
|
6
6
|
* `id="quote"`, the target of `QuoteButton`'s no-script fallback (`/contact#quote`).
|
|
7
|
+
*
|
|
8
|
+
* 3.17.0: `formHeading` puts an eyebrow, an H2 and a line above the form, as the hero's does. In the details:
|
|
9
|
+
* `notes` is a labelled list apart from `licences` (credentials as ticks with `display: 'ticks'`), `links` are links
|
|
10
|
+
* such as "Read our Google reviews", and `reply` is a line on its own after the list, such as the reply time.
|
|
7
11
|
*/
|
|
8
12
|
import type { ReactNode } from 'react';
|
|
9
13
|
import { type SectionTone } from '../primitives/layout.js';
|
|
@@ -11,7 +15,7 @@ import type { RepeatedSlotOf } from '../repeated-slots.js';
|
|
|
11
15
|
import { type SkinEntry } from '../skin.js';
|
|
12
16
|
import type { UiLink, UiPhone } from '../types.js';
|
|
13
17
|
/** `phone` and `link` are the classes for the nested `PhoneLink` and the email and areas links. */
|
|
14
|
-
export type ContactBlockSlot = 'root' | 'inner' | 'form' | 'details' | 'heading' | 'list' | 'item' | 'label' | 'value' | 'line' | 'phone' | 'link';
|
|
18
|
+
export type ContactBlockSlot = 'root' | 'inner' | 'form' | 'details' | 'heading' | 'list' | 'item' | 'label' | 'value' | 'line' | 'note' | 'phone' | 'link' | 'formHead' | 'formEyebrow' | 'formTitle' | 'formText' | 'notes' | 'links' | 'reply';
|
|
15
19
|
/** Rendered once per line of hours, address, licences or areas: styled from the skin stylesheet, never by class (3.14.0). */
|
|
16
20
|
export type ContactBlockRepeatedSlot = RepeatedSlotOf<'contactBlock'>;
|
|
17
21
|
export type ContactBlockSkin = SkinEntry<ContactBlockSlot, never, {
|
|
@@ -22,6 +26,12 @@ export interface ContactDetailLines {
|
|
|
22
26
|
readonly label: string;
|
|
23
27
|
readonly lines: readonly string[];
|
|
24
28
|
}
|
|
29
|
+
/** A labelled list of short items (3.17.0), for example credentials. `ticks` shows them as a tick list. */
|
|
30
|
+
export interface ContactDetailNotes {
|
|
31
|
+
readonly label: string;
|
|
32
|
+
readonly items: readonly string[];
|
|
33
|
+
readonly display?: 'lines' | 'ticks';
|
|
34
|
+
}
|
|
25
35
|
export interface ContactBlockProps extends ContactBlockSkin {
|
|
26
36
|
/** The details' H2, for example "Contact details". */
|
|
27
37
|
readonly title: ReactNode;
|
|
@@ -45,10 +55,22 @@ export interface ContactBlockProps extends ContactBlockSkin {
|
|
|
45
55
|
readonly text: string;
|
|
46
56
|
readonly link?: UiLink;
|
|
47
57
|
};
|
|
58
|
+
/** Above the form (3.17.0): an eyebrow, an H2 and a line, for example "Get a free quote". */
|
|
59
|
+
readonly formHeading?: {
|
|
60
|
+
readonly eyebrow?: string;
|
|
61
|
+
readonly title: string;
|
|
62
|
+
readonly text?: string;
|
|
63
|
+
};
|
|
64
|
+
/** A labelled list apart from licences (3.17.0), for example credentials as ticks. */
|
|
65
|
+
readonly notes?: ContactDetailNotes;
|
|
66
|
+
/** Links in the details (3.17.0), for example "Read our Google reviews". External links open in a new tab. */
|
|
67
|
+
readonly links?: readonly UiLink[];
|
|
68
|
+
/** A line on its own after the details (3.17.0), for example the reply time. */
|
|
69
|
+
readonly reply?: ReactNode;
|
|
48
70
|
/** Defaults to `contact-heading`. */
|
|
49
71
|
readonly headingId?: string;
|
|
50
72
|
/** Set by `SectionSequence`. */
|
|
51
73
|
readonly tone?: SectionTone;
|
|
52
74
|
}
|
|
53
|
-
export declare function ContactBlock({ title, form, phone, email, hours, address, licences, areas, headingId, tone, layout, classes, }: ContactBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export declare function ContactBlock({ title, form, phone, email, hours, address, licences, areas, formHeading, notes, links, reply, headingId, tone, layout, classes, }: ContactBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
54
76
|
//# sourceMappingURL=contact-block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-block.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/sections/contact-block.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contact-block.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/sections/contact-block.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAW,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAGnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAA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AK,EACL,SAA6B,EAC7B,IAAI,EACJ,MAAM,EACN,OAAO,GACR,EAAE,iBAAiB,2CAoGnB"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Section } from '../primitives/layout.js';
|
|
3
3
|
import { PhoneLink, TextLink } from '../primitives/links.js';
|
|
4
|
+
import { TickList } from '../primitives/lists.js';
|
|
4
5
|
import { repeatedSlot, slot } from '../skin.js';
|
|
5
6
|
const EMAIL = /^[^\s@<>()]+@[^\s@<>()]+\.[^\s@<>()]+$/;
|
|
6
|
-
export function ContactBlock({ title, form, phone, email, hours, address, licences, areas, headingId = 'contact-heading', tone, layout, classes, }) {
|
|
7
|
+
export function ContactBlock({ title, form, phone, email, hours, address, licences, areas, formHeading, notes, links = [], reply, headingId = 'contact-heading', tone, layout, classes, }) {
|
|
7
8
|
if (email && !EMAIL.test(email.address))
|
|
8
9
|
throw new Error(`ContactBlock: "${email.address}" is not an email address.`);
|
|
10
|
+
if (formHeading && formHeading.title.trim() === '')
|
|
11
|
+
throw new Error('ContactBlock: the form heading is empty.');
|
|
12
|
+
const formHeadingId = `${headingId}-form`;
|
|
9
13
|
const item = (key, label, value) => (_jsxs("div", { ...slot(classes, 'item'), "data-item": key, children: [_jsx("dt", { ...slot(classes, 'label'), children: label }), _jsx("dd", { ...slot(classes, 'value'), children: value })] }, key));
|
|
10
14
|
const lines = (detail) => detail.lines.map((line) => (_jsx("span", { ...repeatedSlot('line'), children: line }, line)));
|
|
11
|
-
return (_jsxs(Section, { id: "contact", labelledBy: headingId, tone: tone, classes: classes, phonePlacement: "contact", hooks: { 'data-form-side': layout?.formSide ?? 'start' }, children: [
|
|
15
|
+
return (_jsxs(Section, { id: "contact", labelledBy: headingId, tone: tone, classes: classes, phonePlacement: "contact", hooks: { 'data-form-side': layout?.formSide ?? 'start' }, children: [_jsxs("div", { id: "quote", ...slot(classes, 'form'), children: [formHeading ? (_jsxs("div", { ...slot(classes, 'formHead'), children: [formHeading.eyebrow ? _jsx("p", { ...slot(classes, 'formEyebrow'), children: formHeading.eyebrow }) : null, _jsx("h2", { id: formHeadingId, ...slot(classes, 'formTitle'), children: formHeading.title }), formHeading.text ? _jsx("p", { ...slot(classes, 'formText'), children: formHeading.text }) : null] })) : null, form] }), _jsxs("div", { ...slot(classes, 'details'), children: [_jsx("h2", { id: headingId, ...slot(classes, 'heading'), children: title }), phone || email || hours || address || licences || notes || areas ? (_jsxs("dl", { ...slot(classes, 'list'), children: [phone ? item('phone', phone.label, _jsx(PhoneLink, { phone: phone.phone, placement: "contact", classes: { root: classes?.phone } })) : null, email ? item('email', email.label, _jsx("a", { href: `mailto:${email.address}`, ...slot(classes, 'link'), children: email.address })) : null, hours ? item('hours', hours.label, lines(hours)) : null, address ? item('address', address.label, lines(address)) : null, licences ? item('licences', licences.label, lines(licences)) : null, notes && notes.items.length > 0
|
|
16
|
+
? item('notes', notes.label, notes.display === 'ticks' ? (_jsx("span", { ...slot(classes, 'notes'), children: _jsx(TickList, { items: notes.items }) })) : (notes.items.map((note) => (_jsx("span", { ...repeatedSlot('note'), children: note }, note)))))
|
|
17
|
+
: null, areas
|
|
12
18
|
? item('areas', areas.label, _jsxs(_Fragment, { children: [_jsx("span", { ...repeatedSlot('line'), children: areas.text }), areas.link ? (_jsx("span", { ...repeatedSlot('line'), children: _jsx(TextLink, { href: areas.link.href, classes: { root: classes?.link }, children: areas.link.label }) })) : null] }))
|
|
13
|
-
: null] })) : null] })] }));
|
|
19
|
+
: null] })) : null, links.length > 0 ? (_jsx("ul", { role: "list", ...slot(classes, 'links'), children: links.map((link) => (_jsx("li", { children: _jsx(TextLink, { href: link.href, prefetch: false, classes: { root: classes?.link }, children: link.label }) }, link.href))) })) : null, reply ? _jsx("p", { ...slot(classes, 'reply'), children: reply }) : null] })] }));
|
|
14
20
|
}
|
|
15
21
|
//# sourceMappingURL=contact-block.js.map
|
|
@@ -1 +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CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAC/D,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EACnE,KAAK;gCACJ,CAAC,CAAC,IAAI,CACF,OAAO,EACP,KAAK,CAAC,KAAK,EACX,8BACE,kBAAU,YAAY,CAAC,MAAM,CAAC,YAAG,KAAK,CAAC,IAAI,GAAQ,EAClD,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CACZ,kBAAU,YAAY,CAAC,MAAM,CAAC,YAC5B,KAAC,QAAQ,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,YAC9D,KAAK,CAAC,IAAI,CAAC,KAAK,GACR,GACN,CACR,CAAC,CAAC,CAAC,IAAI,IACP,CACJ;gCACH,CAAC,CAAC,IAAI,IACL,CACN,CAAC,CAAC,CAAC,IAAI,IACJ,IACE,CACX,CAAA;AACH,CAAC","sourcesContent":["/**\n * `ContactBlock` (S25, `contact`): the contact page itself. Server component. The site's quote form on one side\n * (the start by default: form left, details right) and the contact details on the other: phone (placement\n * `contact`), email, hours, the public address only where the site passes it, licences and areas. Nothing else: it\n * takes no other content, and the page is the page header then this block (K12-contact). The form side always has\n * `id=\"quote\"`, the target of `QuoteButton`'s no-script fallback (`/contact#quote`).\n */\nimport type { ReactNode } from 'react'\nimport { Section, type SectionTone } from '../primitives/layout.js'\nimport { PhoneLink, TextLink } from '../primitives/links.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, slot, type SkinEntry } from '../skin.js'\nimport type { UiLink, UiPhone } from '../types.js'\n\n/** `phone` and `link` are the classes for the nested `PhoneLink` and the email and areas links. */\nexport type ContactBlockSlot =\n | 'root'\n | 'inner'\n | 'form'\n | 'details'\n | 'heading'\n | 'list'\n | 'item'\n | 'label'\n | 'value'\n | 'line'\n | 'phone'\n | 'link'\n/** Rendered once per line of hours, address, licences or areas: styled from the skin stylesheet, never by class (3.14.0). */\nexport type ContactBlockRepeatedSlot = RepeatedSlotOf<'contactBlock'>\nexport type ContactBlockSkin = SkinEntry<ContactBlockSlot, never, { formSide?: 'start' | 'end' }, ContactBlockRepeatedSlot>\n\n/** A labelled detail of one or more lines, for example hours or a licence. */\nexport interface ContactDetailLines {\n readonly label: string\n readonly lines: readonly string[]\n}\n\nexport interface ContactBlockProps extends ContactBlockSkin {\n /** The details' H2, for example \"Contact details\". */\n readonly title: ReactNode\n /** The site's quote form (`QuoteForm`, plain). */\n readonly form: ReactNode\n /** From the derived business facts; never typed by hand (C10). */\n readonly phone?: { readonly label: string; readonly phone: UiPhone }\n readonly email?: { readonly label: string; readonly address: string }\n readonly hours?: ContactDetailLines\n /** The public address, only where it shows (customers visit, and Romie said so). Never derived here. */\n readonly address?: ContactDetailLines\n readonly licences?: ContactDetailLines\n readonly areas?: { readonly label: string; readonly text: string; readonly link?: UiLink }\n /** Defaults to `contact-heading`. */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n}\n\nconst EMAIL = /^[^\\s@<>()]+@[^\\s@<>()]+\\.[^\\s@<>()]+$/\n\nexport function ContactBlock({\n title,\n form,\n phone,\n email,\n hours,\n address,\n licences,\n areas,\n headingId = 'contact-heading',\n tone,\n layout,\n classes,\n}: ContactBlockProps) {\n if (email && !EMAIL.test(email.address)) throw new Error(`ContactBlock: \"${email.address}\" is not an email address.`)\n const item = (key: string, label: string, value: ReactNode) => (\n <div key={key} {...slot(classes, 'item')} data-item={key}>\n <dt {...slot(classes, 'label')}>{label}</dt>\n <dd {...slot(classes, 'value')}>{value}</dd>\n </div>\n )\n const lines = (detail: ContactDetailLines) =>\n detail.lines.map((line) => (\n <span key={line} {...repeatedSlot('line')}>\n {line}\n </span>\n ))\n return (\n <Section\n id=\"contact\"\n labelledBy={headingId}\n tone={tone}\n classes={classes}\n phonePlacement=\"contact\"\n hooks={{ 'data-form-side': layout?.formSide ?? 'start' }}\n >\n <div id=\"quote\" {...slot(classes, 'form')}>\n {form}\n </div>\n <div {...slot(classes, 'details')}>\n <h2 id={headingId} {...slot(classes, 'heading')}>\n {title}\n </h2>\n {phone || email || hours || address || licences || areas ? (\n <dl {...slot(classes, 'list')}>\n {phone ? item('phone', phone.label, <PhoneLink phone={phone.phone} placement=\"contact\" classes={{ root: classes?.phone }} />) : null}\n {email ? item('email', email.label, <a href={`mailto:${email.address}`} {...slot(classes, 'link')}>\n {email.address}\n </a>) : null}\n {hours ? item('hours', hours.label, lines(hours)) : null}\n {address ? item('address', address.label, lines(address)) : null}\n {licences ? item('licences', licences.label, lines(licences)) : null}\n {areas\n ? item(\n 'areas',\n areas.label,\n <>\n <span {...repeatedSlot('line')}>{areas.text}</span>\n {areas.link ? (\n <span {...repeatedSlot('line')}>\n <TextLink href={areas.link.href} classes={{ root: classes?.link }}>\n {areas.link.label}\n </TextLink>\n </span>\n ) : null}\n </>,\n )\n : null}\n </dl>\n ) : null}\n </div>\n </Section>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"file":"contact-block.js","sourceRoot":"","sources":["../../../src/ui-kit/sections/contact-block.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,OAAO,EAAoB,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AAqE/D,MAAM,KAAK,GAAG,wCAAwC,CAAA;AAEtD,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,EACR,KAAK,EACL,WAAW,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CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,YAC9D,KAAK,CAAC,IAAI,CAAC,KAAK,GACR,GACN,CACR,CAAC,CAAC,CAAC,IAAI,IACP,CACJ;gCACH,CAAC,CAAC,IAAI,IACL,CACN,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAClB,aAAI,IAAI,EAAC,MAAM,KAAK,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,YACvC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,uBACE,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,YACzE,IAAI,CAAC,KAAK,GACF,IAHJ,IAAI,CAAC,IAAI,CAIb,CACN,CAAC,GACC,CACN,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,eAAO,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,YAAG,KAAK,GAAK,CAAC,CAAC,CAAC,IAAI,IACtD,IACE,CACX,CAAA;AACH,CAAC","sourcesContent":["/**\n * `ContactBlock` (S25, `contact`): the contact page itself. Server component. The site's quote form on one side\n * (the start by default: form left, details right) and the contact details on the other: phone (placement\n * `contact`), email, hours, the public address only where the site passes it, licences and areas. Nothing else: it\n * takes no other content, and the page is the page header then this block (K12-contact). The form side always has\n * `id=\"quote\"`, the target of `QuoteButton`'s no-script fallback (`/contact#quote`).\n *\n * 3.17.0: `formHeading` puts an eyebrow, an H2 and a line above the form, as the hero's does. In the details:\n * `notes` is a labelled list apart from `licences` (credentials as ticks with `display: 'ticks'`), `links` are links\n * such as \"Read our Google reviews\", and `reply` is a line on its own after the list, such as the reply time.\n */\nimport type { ReactNode } from 'react'\nimport { Section, type SectionTone } from '../primitives/layout.js'\nimport { PhoneLink, TextLink } from '../primitives/links.js'\nimport { TickList } from '../primitives/lists.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, slot, type SkinEntry } from '../skin.js'\nimport type { UiLink, UiPhone } from '../types.js'\n\n/** `phone` and `link` are the classes for the nested `PhoneLink` and the email and areas links. */\nexport type ContactBlockSlot =\n | 'root'\n | 'inner'\n | 'form'\n | 'details'\n | 'heading'\n | 'list'\n | 'item'\n | 'label'\n | 'value'\n | 'line'\n | 'note'\n | 'phone'\n | 'link'\n | 'formHead'\n | 'formEyebrow'\n | 'formTitle'\n | 'formText'\n | 'notes'\n | 'links'\n | 'reply'\n/** Rendered once per line of hours, address, licences or areas: styled from the skin stylesheet, never by class (3.14.0). */\nexport type ContactBlockRepeatedSlot = RepeatedSlotOf<'contactBlock'>\nexport type ContactBlockSkin = SkinEntry<ContactBlockSlot, never, { formSide?: 'start' | 'end' }, ContactBlockRepeatedSlot>\n\n/** A labelled detail of one or more lines, for example hours or a licence. */\nexport interface ContactDetailLines {\n readonly label: string\n readonly lines: readonly string[]\n}\n\n/** A labelled list of short items (3.17.0), for example credentials. `ticks` shows them as a tick list. */\nexport interface ContactDetailNotes {\n readonly label: string\n readonly items: readonly string[]\n readonly display?: 'lines' | 'ticks'\n}\n\nexport interface ContactBlockProps extends ContactBlockSkin {\n /** The details' H2, for example \"Contact details\". */\n readonly title: ReactNode\n /** The site's quote form (`QuoteForm`, plain). */\n readonly form: ReactNode\n /** From the derived business facts; never typed by hand (C10). */\n readonly phone?: { readonly label: string; readonly phone: UiPhone }\n readonly email?: { readonly label: string; readonly address: string }\n readonly hours?: ContactDetailLines\n /** The public address, only where it shows (customers visit, and Romie said so). Never derived here. */\n readonly address?: ContactDetailLines\n readonly licences?: ContactDetailLines\n readonly areas?: { readonly label: string; readonly text: string; readonly link?: UiLink }\n /** Above the form (3.17.0): an eyebrow, an H2 and a line, for example \"Get a free quote\". */\n readonly formHeading?: { readonly eyebrow?: string; readonly title: string; readonly text?: string }\n /** A labelled list apart from licences (3.17.0), for example credentials as ticks. */\n readonly notes?: ContactDetailNotes\n /** Links in the details (3.17.0), for example \"Read our Google reviews\". External links open in a new tab. */\n readonly links?: readonly UiLink[]\n /** A line on its own after the details (3.17.0), for example the reply time. */\n readonly reply?: ReactNode\n /** Defaults to `contact-heading`. */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n}\n\nconst EMAIL = /^[^\\s@<>()]+@[^\\s@<>()]+\\.[^\\s@<>()]+$/\n\nexport function ContactBlock({\n title,\n form,\n phone,\n email,\n hours,\n address,\n licences,\n areas,\n formHeading,\n notes,\n links = [],\n reply,\n headingId = 'contact-heading',\n tone,\n layout,\n classes,\n}: ContactBlockProps) {\n if (email && !EMAIL.test(email.address)) throw new Error(`ContactBlock: \"${email.address}\" is not an email address.`)\n if (formHeading && formHeading.title.trim() === '') throw new Error('ContactBlock: the form heading is empty.')\n const formHeadingId = `${headingId}-form`\n const item = (key: string, label: string, value: ReactNode) => (\n <div key={key} {...slot(classes, 'item')} data-item={key}>\n <dt {...slot(classes, 'label')}>{label}</dt>\n <dd {...slot(classes, 'value')}>{value}</dd>\n </div>\n )\n const lines = (detail: ContactDetailLines) =>\n detail.lines.map((line) => (\n <span key={line} {...repeatedSlot('line')}>\n {line}\n </span>\n ))\n return (\n <Section\n id=\"contact\"\n labelledBy={headingId}\n tone={tone}\n classes={classes}\n phonePlacement=\"contact\"\n hooks={{ 'data-form-side': layout?.formSide ?? 'start' }}\n >\n <div id=\"quote\" {...slot(classes, 'form')}>\n {formHeading ? (\n <div {...slot(classes, 'formHead')}>\n {formHeading.eyebrow ? <p {...slot(classes, 'formEyebrow')}>{formHeading.eyebrow}</p> : null}\n <h2 id={formHeadingId} {...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 <div {...slot(classes, 'details')}>\n <h2 id={headingId} {...slot(classes, 'heading')}>\n {title}\n </h2>\n {phone || email || hours || address || licences || notes || areas ? (\n <dl {...slot(classes, 'list')}>\n {phone ? item('phone', phone.label, <PhoneLink phone={phone.phone} placement=\"contact\" classes={{ root: classes?.phone }} />) : null}\n {email ? item('email', email.label, <a href={`mailto:${email.address}`} {...slot(classes, 'link')}>\n {email.address}\n </a>) : null}\n {hours ? item('hours', hours.label, lines(hours)) : null}\n {address ? item('address', address.label, lines(address)) : null}\n {licences ? item('licences', licences.label, lines(licences)) : null}\n {notes && notes.items.length > 0\n ? item(\n 'notes',\n notes.label,\n notes.display === 'ticks' ? (\n <span {...slot(classes, 'notes')}>\n <TickList items={notes.items} />\n </span>\n ) : (\n notes.items.map((note) => (\n <span key={note} {...repeatedSlot('note')}>\n {note}\n </span>\n ))\n ),\n )\n : null}\n {areas\n ? item(\n 'areas',\n areas.label,\n <>\n <span {...repeatedSlot('line')}>{areas.text}</span>\n {areas.link ? (\n <span {...repeatedSlot('line')}>\n <TextLink href={areas.link.href} classes={{ root: classes?.link }}>\n {areas.link.label}\n </TextLink>\n </span>\n ) : null}\n </>,\n )\n : null}\n </dl>\n ) : null}\n {links.length > 0 ? (\n <ul role=\"list\" {...slot(classes, 'links')}>\n {links.map((link) => (\n <li key={link.href}>\n <TextLink href={link.href} prefetch={false} classes={{ root: classes?.link }}>\n {link.label}\n </TextLink>\n </li>\n ))}\n </ul>\n ) : null}\n {reply ? <p {...slot(classes, 'reply')}>{reply}</p> : null}\n </div>\n </Section>\n )\n}\n"]}
|
|
@@ -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"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/sections/hero.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,sCAAsC,CAAA;AACvF,OAAO,EAAW,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEnE,OAAO,EAAY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AA;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');
|