@brandlab-digital/site-next 3.20.0 → 4.0.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/instrumentation-client.d.ts +1 -1
- package/dist/instrumentation-client.js +1 -1
- package/dist/instrumentation-client.js.map +1 -1
- package/dist/navigation/index.d.ts +2 -3
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +2 -3
- package/dist/navigation/index.js.map +1 -1
- package/dist/next-config.d.ts +1 -17
- package/dist/next-config.d.ts.map +1 -1
- package/dist/next-config.js +2 -33
- package/dist/next-config.js.map +1 -1
- package/package.json +4 -33
- package/dist/ui-kit/brandlab-skin.d.ts +0 -112
- package/dist/ui-kit/brandlab-skin.d.ts.map +0 -1
- package/dist/ui-kit/brandlab-skin.js +0 -2
- package/dist/ui-kit/brandlab-skin.js.map +0 -1
- package/dist/ui-kit/form/copy.d.ts +0 -3
- package/dist/ui-kit/form/copy.d.ts.map +0 -1
- package/dist/ui-kit/form/copy.js +0 -5
- package/dist/ui-kit/form/copy.js.map +0 -1
- package/dist/ui-kit/form/dialog.d.ts +0 -24
- package/dist/ui-kit/form/dialog.d.ts.map +0 -1
- package/dist/ui-kit/form/dialog.js +0 -17
- package/dist/ui-kit/form/dialog.js.map +0 -1
- package/dist/ui-kit/form/field.d.ts +0 -30
- package/dist/ui-kit/form/field.d.ts.map +0 -1
- package/dist/ui-kit/form/field.js +0 -11
- package/dist/ui-kit/form/field.js.map +0 -1
- package/dist/ui-kit/form/index.d.ts +0 -7
- package/dist/ui-kit/form/index.d.ts.map +0 -1
- package/dist/ui-kit/form/index.js +0 -7
- package/dist/ui-kit/form/index.js.map +0 -1
- package/dist/ui-kit/form/photo-upload.d.ts +0 -40
- package/dist/ui-kit/form/photo-upload.d.ts.map +0 -1
- package/dist/ui-kit/form/photo-upload.js +0 -19
- package/dist/ui-kit/form/photo-upload.js.map +0 -1
- package/dist/ui-kit/form/quote-dialog.d.ts +0 -15
- package/dist/ui-kit/form/quote-dialog.d.ts.map +0 -1
- package/dist/ui-kit/form/quote-dialog.js +0 -68
- package/dist/ui-kit/form/quote-dialog.js.map +0 -1
- package/dist/ui-kit/form/quote-form.d.ts +0 -172
- package/dist/ui-kit/form/quote-form.d.ts.map +0 -1
- package/dist/ui-kit/form/quote-form.js +0 -238
- package/dist/ui-kit/form/quote-form.js.map +0 -1
- package/dist/ui-kit/form/thank-you.d.ts +0 -40
- package/dist/ui-kit/form/thank-you.d.ts.map +0 -1
- package/dist/ui-kit/form/thank-you.js +0 -36
- package/dist/ui-kit/form/thank-you.js.map +0 -1
- package/dist/ui-kit/icon-glyphs.d.ts +0 -41
- package/dist/ui-kit/icon-glyphs.d.ts.map +0 -1
- package/dist/ui-kit/icon-glyphs.js +0 -138
- package/dist/ui-kit/icon-glyphs.js.map +0 -1
- package/dist/ui-kit/icon-sprite.d.ts +0 -19
- package/dist/ui-kit/icon-sprite.d.ts.map +0 -1
- package/dist/ui-kit/icon-sprite.js +0 -44
- package/dist/ui-kit/icon-sprite.js.map +0 -1
- package/dist/ui-kit/icons.d.ts +0 -50
- package/dist/ui-kit/icons.d.ts.map +0 -1
- package/dist/ui-kit/icons.js +0 -55
- package/dist/ui-kit/icons.js.map +0 -1
- package/dist/ui-kit/prefetch.d.ts +0 -59
- package/dist/ui-kit/prefetch.d.ts.map +0 -1
- package/dist/ui-kit/prefetch.js +0 -63
- package/dist/ui-kit/prefetch.js.map +0 -1
- package/dist/ui-kit/primitives/badge.d.ts +0 -25
- package/dist/ui-kit/primitives/badge.d.ts.map +0 -1
- package/dist/ui-kit/primitives/badge.js +0 -21
- package/dist/ui-kit/primitives/badge.js.map +0 -1
- package/dist/ui-kit/primitives/breadcrumbs.d.ts +0 -27
- package/dist/ui-kit/primitives/breadcrumbs.d.ts.map +0 -1
- package/dist/ui-kit/primitives/breadcrumbs.js +0 -40
- package/dist/ui-kit/primitives/breadcrumbs.js.map +0 -1
- package/dist/ui-kit/primitives/button.d.ts +0 -32
- package/dist/ui-kit/primitives/button.d.ts.map +0 -1
- package/dist/ui-kit/primitives/button.js +0 -8
- package/dist/ui-kit/primitives/button.js.map +0 -1
- package/dist/ui-kit/primitives/card.d.ts +0 -40
- package/dist/ui-kit/primitives/card.d.ts.map +0 -1
- package/dist/ui-kit/primitives/card.js +0 -8
- package/dist/ui-kit/primitives/card.js.map +0 -1
- package/dist/ui-kit/primitives/index.d.ts +0 -16
- package/dist/ui-kit/primitives/index.d.ts.map +0 -1
- package/dist/ui-kit/primitives/index.js +0 -16
- package/dist/ui-kit/primitives/index.js.map +0 -1
- package/dist/ui-kit/primitives/layout.d.ts +0 -85
- package/dist/ui-kit/primitives/layout.d.ts.map +0 -1
- package/dist/ui-kit/primitives/layout.js +0 -52
- package/dist/ui-kit/primitives/layout.js.map +0 -1
- package/dist/ui-kit/primitives/links.d.ts +0 -74
- package/dist/ui-kit/primitives/links.d.ts.map +0 -1
- package/dist/ui-kit/primitives/links.js +0 -41
- package/dist/ui-kit/primitives/links.js.map +0 -1
- package/dist/ui-kit/primitives/lists.d.ts +0 -51
- package/dist/ui-kit/primitives/lists.d.ts.map +0 -1
- package/dist/ui-kit/primitives/lists.js +0 -34
- package/dist/ui-kit/primitives/lists.js.map +0 -1
- package/dist/ui-kit/primitives/media-frame.d.ts +0 -33
- package/dist/ui-kit/primitives/media-frame.d.ts.map +0 -1
- package/dist/ui-kit/primitives/media-frame.js +0 -61
- package/dist/ui-kit/primitives/media-frame.js.map +0 -1
- package/dist/ui-kit/primitives/media.d.ts +0 -40
- package/dist/ui-kit/primitives/media.d.ts.map +0 -1
- package/dist/ui-kit/primitives/media.js +0 -9
- package/dist/ui-kit/primitives/media.js.map +0 -1
- package/dist/ui-kit/primitives/quote-button.d.ts +0 -46
- package/dist/ui-kit/primitives/quote-button.d.ts.map +0 -1
- package/dist/ui-kit/primitives/quote-button.js +0 -38
- package/dist/ui-kit/primitives/quote-button.js.map +0 -1
- package/dist/ui-kit/primitives/stat.d.ts +0 -25
- package/dist/ui-kit/primitives/stat.d.ts.map +0 -1
- package/dist/ui-kit/primitives/stat.js +0 -7
- package/dist/ui-kit/primitives/stat.js.map +0 -1
- package/dist/ui-kit/repeated-slots.d.ts +0 -153
- package/dist/ui-kit/repeated-slots.d.ts.map +0 -1
- package/dist/ui-kit/repeated-slots.js +0 -100
- package/dist/ui-kit/repeated-slots.js.map +0 -1
- package/dist/ui-kit/sections/accordion.d.ts +0 -28
- package/dist/ui-kit/sections/accordion.d.ts.map +0 -1
- package/dist/ui-kit/sections/accordion.js +0 -14
- package/dist/ui-kit/sections/accordion.js.map +0 -1
- package/dist/ui-kit/sections/area-map.d.ts +0 -64
- package/dist/ui-kit/sections/area-map.d.ts.map +0 -1
- package/dist/ui-kit/sections/area-map.js +0 -146
- package/dist/ui-kit/sections/area-map.js.map +0 -1
- package/dist/ui-kit/sections/before-after.d.ts +0 -59
- package/dist/ui-kit/sections/before-after.d.ts.map +0 -1
- package/dist/ui-kit/sections/before-after.js +0 -42
- package/dist/ui-kit/sections/before-after.js.map +0 -1
- package/dist/ui-kit/sections/contact-block.d.ts +0 -77
- package/dist/ui-kit/sections/contact-block.d.ts.map +0 -1
- package/dist/ui-kit/sections/contact-block.js +0 -23
- package/dist/ui-kit/sections/contact-block.js.map +0 -1
- package/dist/ui-kit/sections/council-rules.d.ts +0 -64
- package/dist/ui-kit/sections/council-rules.d.ts.map +0 -1
- package/dist/ui-kit/sections/council-rules.js +0 -46
- package/dist/ui-kit/sections/council-rules.js.map +0 -1
- package/dist/ui-kit/sections/coverage.d.ts +0 -53
- package/dist/ui-kit/sections/coverage.d.ts.map +0 -1
- package/dist/ui-kit/sections/coverage.js +0 -57
- package/dist/ui-kit/sections/coverage.js.map +0 -1
- package/dist/ui-kit/sections/cta-band.d.ts +0 -67
- package/dist/ui-kit/sections/cta-band.d.ts.map +0 -1
- package/dist/ui-kit/sections/cta-band.js +0 -11
- package/dist/ui-kit/sections/cta-band.js.map +0 -1
- package/dist/ui-kit/sections/emergency-band.d.ts +0 -60
- package/dist/ui-kit/sections/emergency-band.d.ts.map +0 -1
- package/dist/ui-kit/sections/emergency-band.js +0 -43
- package/dist/ui-kit/sections/emergency-band.js.map +0 -1
- package/dist/ui-kit/sections/faqs.d.ts +0 -46
- package/dist/ui-kit/sections/faqs.d.ts.map +0 -1
- package/dist/ui-kit/sections/faqs.js +0 -39
- package/dist/ui-kit/sections/faqs.js.map +0 -1
- package/dist/ui-kit/sections/gallery.d.ts +0 -60
- package/dist/ui-kit/sections/gallery.d.ts.map +0 -1
- package/dist/ui-kit/sections/gallery.js +0 -39
- package/dist/ui-kit/sections/gallery.js.map +0 -1
- package/dist/ui-kit/sections/hero.d.ts +0 -168
- package/dist/ui-kit/sections/hero.d.ts.map +0 -1
- package/dist/ui-kit/sections/hero.js +0 -147
- package/dist/ui-kit/sections/hero.js.map +0 -1
- package/dist/ui-kit/sections/index.d.ts +0 -29
- package/dist/ui-kit/sections/index.d.ts.map +0 -1
- package/dist/ui-kit/sections/index.js +0 -29
- package/dist/ui-kit/sections/index.js.map +0 -1
- package/dist/ui-kit/sections/licences.d.ts +0 -95
- package/dist/ui-kit/sections/licences.d.ts.map +0 -1
- package/dist/ui-kit/sections/licences.js +0 -72
- package/dist/ui-kit/sections/licences.js.map +0 -1
- package/dist/ui-kit/sections/local-facts.d.ts +0 -107
- package/dist/ui-kit/sections/local-facts.d.ts.map +0 -1
- package/dist/ui-kit/sections/local-facts.js +0 -44
- package/dist/ui-kit/sections/local-facts.js.map +0 -1
- package/dist/ui-kit/sections/nearby-areas.d.ts +0 -50
- package/dist/ui-kit/sections/nearby-areas.d.ts.map +0 -1
- package/dist/ui-kit/sections/nearby-areas.js +0 -49
- package/dist/ui-kit/sections/nearby-areas.js.map +0 -1
- package/dist/ui-kit/sections/nearby-jobs.d.ts +0 -84
- package/dist/ui-kit/sections/nearby-jobs.d.ts.map +0 -1
- package/dist/ui-kit/sections/nearby-jobs.js +0 -72
- package/dist/ui-kit/sections/nearby-jobs.js.map +0 -1
- package/dist/ui-kit/sections/page-header.d.ts +0 -29
- package/dist/ui-kit/sections/page-header.d.ts.map +0 -1
- package/dist/ui-kit/sections/page-header.js +0 -9
- package/dist/ui-kit/sections/page-header.js.map +0 -1
- package/dist/ui-kit/sections/price-guide.d.ts +0 -59
- package/dist/ui-kit/sections/price-guide.d.ts.map +0 -1
- package/dist/ui-kit/sections/price-guide.js +0 -28
- package/dist/ui-kit/sections/price-guide.js.map +0 -1
- package/dist/ui-kit/sections/price-table.d.ts +0 -42
- package/dist/ui-kit/sections/price-table.d.ts.map +0 -1
- package/dist/ui-kit/sections/price-table.js +0 -29
- package/dist/ui-kit/sections/price-table.js.map +0 -1
- package/dist/ui-kit/sections/projects.d.ts +0 -79
- package/dist/ui-kit/sections/projects.d.ts.map +0 -1
- package/dist/ui-kit/sections/projects.js +0 -69
- package/dist/ui-kit/sections/projects.js.map +0 -1
- package/dist/ui-kit/sections/proof-strip.d.ts +0 -68
- package/dist/ui-kit/sections/proof-strip.d.ts.map +0 -1
- package/dist/ui-kit/sections/proof-strip.js +0 -27
- package/dist/ui-kit/sections/proof-strip.js.map +0 -1
- package/dist/ui-kit/sections/quote-checklist.d.ts +0 -43
- package/dist/ui-kit/sections/quote-checklist.d.ts.map +0 -1
- package/dist/ui-kit/sections/quote-checklist.js +0 -19
- package/dist/ui-kit/sections/quote-checklist.js.map +0 -1
- package/dist/ui-kit/sections/rating-chip.d.ts +0 -35
- package/dist/ui-kit/sections/rating-chip.d.ts.map +0 -1
- package/dist/ui-kit/sections/rating-chip.js +0 -21
- package/dist/ui-kit/sections/rating-chip.js.map +0 -1
- package/dist/ui-kit/sections/related-services.d.ts +0 -41
- package/dist/ui-kit/sections/related-services.d.ts.map +0 -1
- package/dist/ui-kit/sections/related-services.js +0 -52
- package/dist/ui-kit/sections/related-services.js.map +0 -1
- package/dist/ui-kit/sections/reviews-band.d.ts +0 -124
- package/dist/ui-kit/sections/reviews-band.d.ts.map +0 -1
- package/dist/ui-kit/sections/reviews-band.js +0 -115
- package/dist/ui-kit/sections/reviews-band.js.map +0 -1
- package/dist/ui-kit/sections/section-sequence.d.ts +0 -41
- package/dist/ui-kit/sections/section-sequence.d.ts.map +0 -1
- package/dist/ui-kit/sections/section-sequence.js +0 -36
- package/dist/ui-kit/sections/section-sequence.js.map +0 -1
- package/dist/ui-kit/sections/services-grid.d.ts +0 -82
- package/dist/ui-kit/sections/services-grid.d.ts.map +0 -1
- package/dist/ui-kit/sections/services-grid.js +0 -90
- package/dist/ui-kit/sections/services-grid.js.map +0 -1
- package/dist/ui-kit/sections/signature-section.d.ts +0 -42
- package/dist/ui-kit/sections/signature-section.d.ts.map +0 -1
- package/dist/ui-kit/sections/signature-section.js +0 -14
- package/dist/ui-kit/sections/signature-section.js.map +0 -1
- package/dist/ui-kit/sections/site-footer-columns.d.ts +0 -12
- package/dist/ui-kit/sections/site-footer-columns.d.ts.map +0 -1
- package/dist/ui-kit/sections/site-footer-columns.js +0 -63
- package/dist/ui-kit/sections/site-footer-columns.js.map +0 -1
- package/dist/ui-kit/sections/site-footer.d.ts +0 -66
- package/dist/ui-kit/sections/site-footer.d.ts.map +0 -1
- package/dist/ui-kit/sections/site-footer.js +0 -49
- package/dist/ui-kit/sections/site-footer.js.map +0 -1
- package/dist/ui-kit/sections/work-photos.d.ts +0 -15
- package/dist/ui-kit/sections/work-photos.d.ts.map +0 -1
- package/dist/ui-kit/sections/work-photos.js +0 -24
- package/dist/ui-kit/sections/work-photos.js.map +0 -1
- package/dist/ui-kit/shell/back-to-top-client.d.ts +0 -9
- package/dist/ui-kit/shell/back-to-top-client.d.ts.map +0 -1
- package/dist/ui-kit/shell/back-to-top-client.js +0 -8
- package/dist/ui-kit/shell/back-to-top-client.js.map +0 -1
- package/dist/ui-kit/shell/back-to-top.d.ts +0 -13
- package/dist/ui-kit/shell/back-to-top.d.ts.map +0 -1
- package/dist/ui-kit/shell/back-to-top.js +0 -14
- package/dist/ui-kit/shell/back-to-top.js.map +0 -1
- package/dist/ui-kit/shell/call-bar-client.d.ts +0 -8
- package/dist/ui-kit/shell/call-bar-client.d.ts.map +0 -1
- package/dist/ui-kit/shell/call-bar-client.js +0 -13
- package/dist/ui-kit/shell/call-bar-client.js.map +0 -1
- package/dist/ui-kit/shell/current-link.d.ts +0 -45
- package/dist/ui-kit/shell/current-link.d.ts.map +0 -1
- package/dist/ui-kit/shell/current-link.js +0 -54
- package/dist/ui-kit/shell/current-link.js.map +0 -1
- package/dist/ui-kit/shell/drawer-client.d.ts +0 -22
- package/dist/ui-kit/shell/drawer-client.d.ts.map +0 -1
- package/dist/ui-kit/shell/drawer-client.js +0 -70
- package/dist/ui-kit/shell/drawer-client.js.map +0 -1
- package/dist/ui-kit/shell/header-client.d.ts +0 -44
- package/dist/ui-kit/shell/header-client.d.ts.map +0 -1
- package/dist/ui-kit/shell/header-client.js +0 -59
- package/dist/ui-kit/shell/header-client.js.map +0 -1
- package/dist/ui-kit/shell/index.d.ts +0 -7
- package/dist/ui-kit/shell/index.d.ts.map +0 -1
- package/dist/ui-kit/shell/index.js +0 -7
- package/dist/ui-kit/shell/index.js.map +0 -1
- package/dist/ui-kit/shell/intent-prefetch.d.ts +0 -4
- package/dist/ui-kit/shell/intent-prefetch.d.ts.map +0 -1
- package/dist/ui-kit/shell/intent-prefetch.js +0 -62
- package/dist/ui-kit/shell/intent-prefetch.js.map +0 -1
- package/dist/ui-kit/shell/mobile-call-bar.d.ts +0 -25
- package/dist/ui-kit/shell/mobile-call-bar.d.ts.map +0 -1
- package/dist/ui-kit/shell/mobile-call-bar.js +0 -21
- package/dist/ui-kit/shell/mobile-call-bar.js.map +0 -1
- package/dist/ui-kit/shell/mobile-drawer.d.ts +0 -41
- package/dist/ui-kit/shell/mobile-drawer.d.ts.map +0 -1
- package/dist/ui-kit/shell/mobile-drawer.js +0 -41
- package/dist/ui-kit/shell/mobile-drawer.js.map +0 -1
- package/dist/ui-kit/shell/shell-context.d.ts +0 -3
- package/dist/ui-kit/shell/shell-context.d.ts.map +0 -1
- package/dist/ui-kit/shell/shell-context.js +0 -5
- package/dist/ui-kit/shell/shell-context.js.map +0 -1
- package/dist/ui-kit/shell/shell-quote.d.ts +0 -10
- package/dist/ui-kit/shell/shell-quote.d.ts.map +0 -1
- package/dist/ui-kit/shell/shell-quote.js +0 -13
- package/dist/ui-kit/shell/shell-quote.js.map +0 -1
- package/dist/ui-kit/shell/site-header.d.ts +0 -55
- package/dist/ui-kit/shell/site-header.d.ts.map +0 -1
- package/dist/ui-kit/shell/site-header.js +0 -35
- package/dist/ui-kit/shell/site-header.js.map +0 -1
- package/dist/ui-kit/shell/social-links.d.ts +0 -7
- package/dist/ui-kit/shell/social-links.d.ts.map +0 -1
- package/dist/ui-kit/shell/social-links.js +0 -12
- package/dist/ui-kit/shell/social-links.js.map +0 -1
- package/dist/ui-kit/shell/utility-bar.d.ts +0 -33
- package/dist/ui-kit/shell/utility-bar.d.ts.map +0 -1
- package/dist/ui-kit/shell/utility-bar.js +0 -15
- package/dist/ui-kit/shell/utility-bar.js.map +0 -1
- package/dist/ui-kit/skin-index.d.ts +0 -4
- package/dist/ui-kit/skin-index.d.ts.map +0 -1
- package/dist/ui-kit/skin-index.js +0 -3
- package/dist/ui-kit/skin-index.js.map +0 -1
- package/dist/ui-kit/skin.d.ts +0 -65
- package/dist/ui-kit/skin.d.ts.map +0 -1
- package/dist/ui-kit/skin.js +0 -60
- package/dist/ui-kit/skin.js.map +0 -1
- package/dist/ui-kit/structure.css +0 -2546
- package/dist/ui-kit/types.d.ts +0 -27
- package/dist/ui-kit/types.d.ts.map +0 -1
- package/dist/ui-kit/types.js +0 -6
- package/dist/ui-kit/types.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../../src/ui-kit/primitives/links.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,OAAO,IAAI,MAAM,WAAW,CAAA;AAG5B,OAAO,EAAE,IAAI,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,CACR,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,8BACE,kBAAU,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,YAAG,KAAK,GAAQ,EAAC,GAAG,IACnD,CACJ,CAAC,CAAC,CAAC,IAAI,EACR,kBAAU,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,YAAG,KAAK,CAAC,OAAO,GAAQ,IACvD,CACL,CAAA;AACH,CAAC","sourcesContent":["/**\n * Link primitives: `ButtonLink`, `TextLink` and `PhoneLink`. Server components; every link is a real `<a href>`.\n * External links open in a new tab with `rel=\"noopener noreferrer\"`. `PhoneLink` requires a typed placement, which the\n * shared instrumentation reads to send one `phone_link_click` per tap; nothing here emits events itself.\n */\nimport Link from 'next/link'\nimport type { ReactNode } from 'react'\nimport type { PhoneCallPlacement } from '../../analytics.js'\nimport { Icon, type UiIconName } from '../icons.js'\nimport { linkPrefetchProps, type LinkPrefetch } from '../prefetch.js'\nimport { slot, type SkinEntry } from '../skin.js'\nimport type { UiPhone } from '../types.js'\n\nfunction isExternal(href: string) {\n return /^https?:\\/\\//i.test(href)\n}\n\n/** Data hooks and the skin class for an anchor's root. */\nexport type AnchorHooks = { readonly className?: string | undefined } & Readonly<Record<`data-${string}`, string | undefined>>\n\n/**\n * The one anchor every ui-kit link renders (internal; not exported from the subpath): `next/link` with the prefetch\n * role for internal links, a plain `<a target=\"_blank\" rel=\"noopener noreferrer\">` for external ones.\n */\nexport function Anchor({\n href,\n external,\n prefetch,\n hooks,\n children,\n}: {\n href: string\n external?: boolean | undefined\n prefetch?: LinkPrefetch | undefined\n hooks: AnchorHooks\n children: ReactNode\n}) {\n if (external ?? isExternal(href)) {\n return (\n <a href={href} target=\"_blank\" rel=\"noopener noreferrer\" {...hooks}>\n {children}\n </a>\n )\n }\n return (\n <Link href={href} {...linkPrefetchProps(prefetch, href)} {...hooks}>\n {children}\n </Link>\n )\n}\n\nexport type ButtonLinkSlot = 'root' | 'label' | 'icon'\nexport const BUTTON_VARIANTS = ['primary', 'secondary', 'quiet'] as const\nexport type ButtonVariant = (typeof BUTTON_VARIANTS)[number]\nexport type ButtonLinkSkin = SkinEntry<ButtonLinkSlot, ButtonVariant, { size?: 'regular' | 'large' }>\n\nexport interface ButtonLinkProps extends ButtonLinkSkin {\n readonly href: string\n readonly children: ReactNode\n /** An icon after the label (`arrow`) or before it (`phone`). */\n readonly icon?: UiIconName\n readonly iconPosition?: 'start' | 'end'\n /** Force external handling; by default `http(s)://` links are external. */\n readonly external?: boolean\n /**\n * Prefetch by link role (`LINK_PREFETCH_POLICY`): `auto` (the default, Next's prefetch in view) for a main action,\n * `intent` for an in-content card link, `false` for footer, area, nearby, map and finder links.\n */\n readonly prefetch?: LinkPrefetch\n}\n\n/** A link styled as a button. A primary action is at least 44 px tall (structure.css). */\nexport function ButtonLink({ href, children, icon, iconPosition = 'end', external, prefetch, variant = 'primary', layout, classes }: ButtonLinkProps) {\n const iconNode = icon ? <span {...slot(classes, 'icon')}><Icon name={icon} /></span> : null\n return (\n <Anchor\n href={href}\n external={external}\n prefetch={prefetch}\n hooks={{ 'data-bl': 'button', 'data-variant': variant, 'data-size': layout?.size ?? 'regular', className: classes?.root }}\n >\n {iconPosition === 'start' ? iconNode : null}\n <span {...slot(classes, 'label')}>{children}</span>\n {iconPosition === 'end' ? iconNode : null}\n </Anchor>\n )\n}\n\nexport type TextLinkSlot = 'root'\nexport type TextLinkSkin = SkinEntry<TextLinkSlot, 'inline' | 'standalone'>\n\nexport interface TextLinkProps extends TextLinkSkin {\n readonly href: string\n readonly children: ReactNode\n readonly external?: boolean\n /**\n * Prefetch by link role (`LINK_PREFETCH_POLICY`): `auto` (the default, Next's prefetch in view) for a main action,\n * `intent` for an in-content card link, `false` for footer, area, nearby, map and finder links.\n */\n readonly prefetch?: LinkPrefetch\n}\n\n/** An inline or standalone text link. */\nexport function TextLink({ href, children, external, prefetch, variant = 'inline', classes }: TextLinkProps) {\n return (\n <Anchor href={href} external={external} prefetch={prefetch} hooks={{ 'data-bl': 'text-link', 'data-variant': variant, className: classes?.root }}>\n {children}\n </Anchor>\n )\n}\n\nexport type PhoneLinkSlot = 'root' | 'icon' | 'label' | 'number'\nexport type PhoneLinkSkin = SkinEntry<PhoneLinkSlot, 'text' | 'button'>\n\nexport interface PhoneLinkProps extends PhoneLinkSkin {\n readonly phone: UiPhone\n /** Where the link sits, for `phone_link_click`. Required: a section sets its own. */\n readonly placement: PhoneCallPlacement\n /** Optional words before the number, for example \"Call\". The accessible name is always the visible text. */\n readonly label?: string\n /** The phone icon on the left (header and hero). */\n readonly showIcon?: boolean\n}\n\n/**\n * A `tel:` link. Its accessible name is its visible text, which always includes the number (WCAG 2.5.3). Use it for\n * every call link: a literal `tel:` anywhere else fails lint (K1) and C10 checks the href against the evidence file.\n */\nexport function PhoneLink({ phone, placement, label, showIcon = false, variant = 'text', classes }: PhoneLinkProps) {\n return (\n <a href={phone.telHref} data-bl=\"phone-link\" data-variant={variant} data-phone-location={placement} className={classes?.root}>\n {showIcon ? (\n <span {...slot(classes, 'icon')}>\n <Icon name=\"phone\" />\n </span>\n ) : null}\n {label ? (\n <>\n <span {...slot(classes, 'label')}>{label}</span>{' '}\n </>\n ) : null}\n <span {...slot(classes, 'number')}>{phone.display}</span>\n </a>\n )\n}\n"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { LinkPrefetch } from '../prefetch.js';
|
|
2
|
-
import type { RepeatedSlotOf } from '../repeated-slots.js';
|
|
3
|
-
import { type SkinEntry } from '../skin.js';
|
|
4
|
-
import type { UiLink } from '../types.js';
|
|
5
|
-
/** One checklist entry: the fact, and optionally where to check it. */
|
|
6
|
-
export type TickItem = string | {
|
|
7
|
-
readonly text: string;
|
|
8
|
-
readonly link?: UiLink;
|
|
9
|
-
};
|
|
10
|
-
export type TickListSlot = 'root' | RepeatedSlotOf<'tickList'>;
|
|
11
|
-
export type TickListRepeatedSlot = RepeatedSlotOf<'tickList'>;
|
|
12
|
-
export interface TickListLayout {
|
|
13
|
-
/** One column (the default) or two, from the phone breakpoint up. */
|
|
14
|
-
readonly columns?: 1 | 2;
|
|
15
|
-
/**
|
|
16
|
-
* The tick: `icon` (the default) is the sprite's check; `rule` ships no svg, only an empty decorative element the
|
|
17
|
-
* stylesheet draws as a short rule (`data-tick="rule"` on the list), about 120 bytes less a fact.
|
|
18
|
-
*/
|
|
19
|
-
readonly tick?: 'icon' | 'rule';
|
|
20
|
-
}
|
|
21
|
-
export type TickListSkin = SkinEntry<TickListSlot, never, TickListLayout, TickListRepeatedSlot>;
|
|
22
|
-
export interface TickListProps extends TickListSkin {
|
|
23
|
-
readonly items: readonly TickItem[];
|
|
24
|
-
}
|
|
25
|
-
export declare function TickList({ items, layout, classes }: TickListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
-
/** The `data-bl-links` roles W2 reads: links in these lists never prefetch. */
|
|
27
|
-
export declare const LINK_LIST_KINDS: readonly ["area", "nearby", "map", "finder", "other-services"];
|
|
28
|
-
export type LinkListKind = (typeof LINK_LIST_KINDS)[number];
|
|
29
|
-
export type LinkListSlot = 'root';
|
|
30
|
-
export interface LinkListLayout {
|
|
31
|
-
/** Columns at the widest width (default 3); phones show one, then two. */
|
|
32
|
-
readonly columns?: 1 | 2 | 3 | 4;
|
|
33
|
-
}
|
|
34
|
-
export type LinkListSkin = SkinEntry<LinkListSlot, never, LinkListLayout>;
|
|
35
|
-
/**
|
|
36
|
-
* One entry: a link, or (3.15.0) a name with no `href`, rendered as plain text in the same list (`<li>Putney</li>`, no
|
|
37
|
-
* anchor), for an area whose page is still noindex while it waits for its return wave.
|
|
38
|
-
*/
|
|
39
|
-
export type LinkListEntry = UiLink | {
|
|
40
|
-
readonly label: string;
|
|
41
|
-
readonly href?: undefined;
|
|
42
|
-
};
|
|
43
|
-
export interface LinkListProps extends LinkListSkin {
|
|
44
|
-
readonly links: readonly LinkListEntry[];
|
|
45
|
-
/** What the list holds, rendered as `data-bl-links` for W2. Leave it out for a list of other destinations. */
|
|
46
|
-
readonly kind?: LinkListKind;
|
|
47
|
-
/** Off by default; `intent` only for a short list of in-content destinations. */
|
|
48
|
-
readonly prefetch?: Exclude<LinkPrefetch, 'auto'>;
|
|
49
|
-
}
|
|
50
|
-
export declare function LinkList({ links, kind, prefetch, layout, classes }: LinkListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
51
|
-
//# sourceMappingURL=lists.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/lists.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,uEAAuE;AACvE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEjF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAC9D,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAC7D,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACxB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAChC;AACD,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,oBAAoB,CAAC,CAAA;AAE/F,MAAM,WAAW,aAAc,SAAQ,YAAY;IACj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are a real `<ul>`.
|
|
4
|
-
*
|
|
5
|
-
* `TickList`: verified facts or the scope of a service, each after a decorative tick (the check icon, or a ruled mark
|
|
6
|
-
* with `layout.tick: 'rule'`). One or two columns; the hero's trust checklist uses two (Romie, Prestige and Sydney
|
|
7
|
-
* Waterproofing). An item may end with a link to where the fact can be checked, for example the licence register.
|
|
8
|
-
*
|
|
9
|
-
* `LinkList`: a ruled list of destinations (AA's `RuledLinkList`): service areas, nearby suburbs, other services. Lean
|
|
10
|
-
* by design (cost item 1f): each entry is a plain `<li><a>` with no class, hook or icon, so a 120-suburb hub stays near
|
|
11
|
-
* 120 bytes a link; a skin draws rules and arrows from `src/site/skin.css`. Its links never prefetch (area and nearby
|
|
12
|
-
* lists are `false` in `LINK_PREFETCH_POLICY`), and `kind` marks the list for W2 (`data-bl-links`).
|
|
13
|
-
*/
|
|
14
|
-
import { Icon } from '../icons.js';
|
|
15
|
-
import { repeatedSlot } from '../skin.js';
|
|
16
|
-
import { Anchor } from './links.js';
|
|
17
|
-
const itemText = (item) => (typeof item === 'string' ? item : item.text);
|
|
18
|
-
export function TickList({ items, layout, classes }) {
|
|
19
|
-
if (items.length === 0)
|
|
20
|
-
return null;
|
|
21
|
-
const rule = layout?.tick === 'rule';
|
|
22
|
-
return (_jsx("ul", { role: "list", "data-bl": "tick-list", "data-columns": String(layout?.columns ?? 1), "data-tick": rule ? 'rule' : undefined, className: classes?.root, children: items.map((item) => {
|
|
23
|
-
const link = typeof item === 'string' ? undefined : item.link;
|
|
24
|
-
return (_jsxs("li", { ...repeatedSlot('item'), children: [_jsx("span", { ...repeatedSlot('tick'), "aria-hidden": "true", children: rule ? null : _jsx(Icon, { name: "check" }) }), _jsxs("span", { ...repeatedSlot('text'), children: [itemText(item), link ? (_jsxs(_Fragment, { children: [' ', _jsx(Anchor, { href: link.href, prefetch: false, hooks: { 'data-slot': 'link' }, children: link.label })] })) : null] })] }, itemText(item)));
|
|
25
|
-
}) }));
|
|
26
|
-
}
|
|
27
|
-
/** The `data-bl-links` roles W2 reads: links in these lists never prefetch. */
|
|
28
|
-
export const LINK_LIST_KINDS = ['area', 'nearby', 'map', 'finder', 'other-services'];
|
|
29
|
-
export function LinkList({ links, kind, prefetch = false, layout, classes }) {
|
|
30
|
-
if (links.length === 0)
|
|
31
|
-
return null;
|
|
32
|
-
return (_jsx("ul", { role: "list", "data-bl": "link-list", "data-columns": String(layout?.columns ?? 3), "data-bl-links": kind, className: classes?.root, children: links.map((link) => link.href === undefined ? (_jsx("li", { children: link.label }, `text:${link.label}`)) : (_jsx("li", { children: _jsx(Anchor, { href: link.href, prefetch: prefetch, hooks: {}, children: link.label }) }, link.href))) }));
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=lists.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lists.js","sourceRoot":"","sources":["../../../src/ui-kit/primitives/lists.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAGlC,OAAO,EAAE,YAAY,EAAkB,MAAM,YAAY,CAAA;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAsBnC,MAAM,QAAQ,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAElF,MAAM,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAiB;IAChE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACnC,MAAM,IAAI,GAAG,MAAM,EAAE,IAAI,KAAK,MAAM,CAAA;IACpC,OAAO,CACL,aACE,IAAI,EAAC,MAAM,aACH,WAAW,kBACL,MAAM,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,CAAC,eAC/B,IAAI,CAAC,CA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AAC,MAAM,EAAE,OAAO,IAAI,CAAC,CAAC,mBAAiB,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,YAC1H,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAClB,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CACxB,uBAAgC,IAAI,CAAC,KAAK,IAAjC,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAmB,CACjD,CAAC,CAAC,CAAC,CACF,uBACE,KAAC,MAAM,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,YACnD,IAAI,CAAC,KAAK,GACJ,IAHF,IAAI,CAAC,IAAI,CAIb,CACN,CACF,GACE,CACN,CAAA;AACH,CAAC","sourcesContent":["/**\n * `TickList` and `LinkList` (3.14.0). Server components; both are a real `<ul>`.\n *\n * `TickList`: verified facts or the scope of a service, each after a decorative tick (the check icon, or a ruled mark\n * with `layout.tick: 'rule'`). One or two columns; the hero's trust checklist uses two (Romie, Prestige and Sydney\n * Waterproofing). An item may end with a link to where the fact can be checked, for example the licence register.\n *\n * `LinkList`: a ruled list of destinations (AA's `RuledLinkList`): service areas, nearby suburbs, other services. Lean\n * by design (cost item 1f): each entry is a plain `<li><a>` with no class, hook or icon, so a 120-suburb hub stays near\n * 120 bytes a link; a skin draws rules and arrows from `src/site/skin.css`. Its links never prefetch (area and nearby\n * lists are `false` in `LINK_PREFETCH_POLICY`), and `kind` marks the list for W2 (`data-bl-links`).\n */\nimport { Icon } from '../icons.js'\nimport type { LinkPrefetch } from '../prefetch.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, type SkinEntry } from '../skin.js'\nimport type { UiLink } from '../types.js'\nimport { Anchor } from './links.js'\n\n/** One checklist entry: the fact, and optionally where to check it. */\nexport type TickItem = string | { readonly text: string; readonly link?: UiLink }\n\nexport type TickListSlot = 'root' | RepeatedSlotOf<'tickList'>\nexport type TickListRepeatedSlot = RepeatedSlotOf<'tickList'>\nexport interface TickListLayout {\n /** One column (the default) or two, from the phone breakpoint up. */\n readonly columns?: 1 | 2\n /**\n * The tick: `icon` (the default) is the sprite's check; `rule` ships no svg, only an empty decorative element the\n * stylesheet draws as a short rule (`data-tick=\"rule\"` on the list), about 120 bytes less a fact.\n */\n readonly tick?: 'icon' | 'rule'\n}\nexport type TickListSkin = SkinEntry<TickListSlot, never, TickListLayout, TickListRepeatedSlot>\n\nexport interface TickListProps extends TickListSkin {\n readonly items: readonly TickItem[]\n}\n\nconst itemText = (item: TickItem) => (typeof item === 'string' ? item : item.text)\n\nexport function TickList({ items, layout, classes }: TickListProps) {\n if (items.length === 0) return null\n const rule = layout?.tick === 'rule'\n return (\n <ul\n role=\"list\"\n data-bl=\"tick-list\"\n data-columns={String(layout?.columns ?? 1)}\n data-tick={rule ? 'rule' : undefined}\n className={classes?.root}\n >\n {items.map((item) => {\n const link = typeof item === 'string' ? undefined : item.link\n return (\n <li key={itemText(item)} {...repeatedSlot('item')}>\n <span {...repeatedSlot('tick')} aria-hidden=\"true\">\n {rule ? null : <Icon name=\"check\" />}\n </span>\n <span {...repeatedSlot('text')}>\n {itemText(item)}\n {link ? (\n <>\n {' '}\n <Anchor href={link.href} prefetch={false} hooks={{ 'data-slot': 'link' }}>\n {link.label}\n </Anchor>\n </>\n ) : null}\n </span>\n </li>\n )\n })}\n </ul>\n )\n}\n\n/** The `data-bl-links` roles W2 reads: links in these lists never prefetch. */\nexport const LINK_LIST_KINDS = ['area', 'nearby', 'map', 'finder', 'other-services'] as const\nexport type LinkListKind = (typeof LINK_LIST_KINDS)[number]\n\nexport type LinkListSlot = 'root'\nexport interface LinkListLayout {\n /** Columns at the widest width (default 3); phones show one, then two. */\n readonly columns?: 1 | 2 | 3 | 4\n}\nexport type LinkListSkin = SkinEntry<LinkListSlot, never, LinkListLayout>\n\n/**\n * One entry: a link, or (3.15.0) a name with no `href`, rendered as plain text in the same list (`<li>Putney</li>`, no\n * anchor), for an area whose page is still noindex while it waits for its return wave.\n */\nexport type LinkListEntry = UiLink | { readonly label: string; readonly href?: undefined }\n\nexport interface LinkListProps extends LinkListSkin {\n readonly links: readonly LinkListEntry[]\n /** What the list holds, rendered as `data-bl-links` for W2. Leave it out for a list of other destinations. */\n readonly kind?: LinkListKind\n /** Off by default; `intent` only for a short list of in-content destinations. */\n readonly prefetch?: Exclude<LinkPrefetch, 'auto'>\n}\n\nexport function LinkList({ links, kind, prefetch = false, layout, classes }: LinkListProps) {\n if (links.length === 0) return null\n return (\n <ul role=\"list\" data-bl=\"link-list\" data-columns={String(layout?.columns ?? 3)} data-bl-links={kind} className={classes?.root}>\n {links.map((link) =>\n link.href === undefined ? (\n <li key={`text:${link.label}`}>{link.label}</li>\n ) : (\n <li key={link.href}>\n <Anchor href={link.href} prefetch={prefetch} hooks={{}}>\n {link.label}\n </Anchor>\n </li>\n ),\n )}\n </ul>\n )\n}\n"]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { type BrandlabMediaEntry, type BrandlabMediaRatio } from '@brandlab-digital/site-core/media';
|
|
3
|
-
import { type SkinEntry } from '../skin.js';
|
|
4
|
-
/** What a frame needs from a `media.ts` entry; a whole `BrandlabMediaEntry` fits. */
|
|
5
|
-
export type UiMedia = Pick<BrandlabMediaEntry, 'src' | 'width' | 'height' | 'alt' | 'provenance'> & Partial<Pick<BrandlabMediaEntry, 'decorative' | 'focalPoint'>>;
|
|
6
|
-
export type MediaFrameSlot = 'root' | 'img' | 'caption' | 'label';
|
|
7
|
-
export type MediaFrameSkin = SkinEntry<MediaFrameSlot>;
|
|
8
|
-
/** The locked visible label on an AI image (F13; truth wording, not site copy). */
|
|
9
|
-
export declare const ILLUSTRATION_LABEL = "Illustration";
|
|
10
|
-
/** Exactly one sizing: `sizes` with a `vw` part for a fluid image, or `displayWidth` for a fixed-size one. */
|
|
11
|
-
export type MediaFrameSizing = {
|
|
12
|
-
readonly sizes: string;
|
|
13
|
-
readonly displayWidth?: never;
|
|
14
|
-
} | {
|
|
15
|
-
readonly displayWidth: number;
|
|
16
|
-
readonly sizes?: never;
|
|
17
|
-
};
|
|
18
|
-
export type MediaFrameProps = MediaFrameSkin & MediaFrameSizing & {
|
|
19
|
-
readonly media: UiMedia;
|
|
20
|
-
/** Crop to an allowed ratio; by default the frame keeps the image's own shape. */
|
|
21
|
-
readonly ratio?: BrandlabMediaRatio;
|
|
22
|
-
/** "{what}, {suburb}, {month year}", only when the photo really shows that job. */
|
|
23
|
-
readonly caption?: ReactNode;
|
|
24
|
-
/** The page's largest image: preloaded, high fetch priority, never lazy. */
|
|
25
|
-
readonly priority?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* The WebP quality, 1 to 100 (3.18.0; Next's default is 75). The site lists it in `brandlabNextConfig`'s
|
|
28
|
-
* `images.qualities`, or Next refuses it. A photo-heavy hero over B1's 200 KB usually passes at 60 to 65.
|
|
29
|
-
*/
|
|
30
|
-
readonly quality?: number;
|
|
31
|
-
};
|
|
32
|
-
export declare function MediaFrame(props: MediaFrameProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
//# sourceMappingURL=media-frame.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-frame.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/media-frame.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAyB,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC3H,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAEjD,qFAAqF;AACrF,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,YAAY,CAAC,GAC/F,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,YAAY,GAAG,YAAY,CAAC,CAAC,CAAA;AAEhE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,CAAA;AACjE,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,CAAC,CAAA;AAEtD,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,iBAAiB,CAAA;AAEhD,8GAA8G;AAC9G,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,CAAA;CAAE,GACzD;IAAE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AAE7D,MAAM,MAAM,eAAe,GAAG,cAAc,GAC1C,gBAAgB,GAAG;IACjB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,kFAAkF;IAClF,QAAQ,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAA;IACnC,mFAAmF;IACnF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAUH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAyDhD"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* `MediaFrame` (3.14.0, F13): one image from the site's media manifest in a frame of an allowed ratio. Server
|
|
4
|
-
* component over `next/image`, and the library's one image path: `Media` and the hero render through it, so the
|
|
5
|
-
* "Illustration" label and the sizing rule below live here only. It is provenance-aware: the root carries
|
|
6
|
-
* `data-provenance`, and an AI image shows the locked visible label "Illustration" inside the `<figcaption>`, so the
|
|
7
|
-
* figure's accessible caption names it an illustration too. A caption ("{what}, {suburb}, {month year}") or the label
|
|
8
|
-
* makes the root a `<figure>`; otherwise it is a `<div>`.
|
|
9
|
-
*
|
|
10
|
-
* Sizing (cost item 1g) is one of two kinds, and the type takes exactly one:
|
|
11
|
-
* - **fluid** (`sizes`, which must have a `vw` part, for example `(min-width: 1024px) 50vw, 100vw`): Next keeps only the
|
|
12
|
-
* widths the layout can use.
|
|
13
|
-
* - **fixed** (`displayWidth`, the CSS width in pixels): no `sizes` at all, so Next emits a 1x and a 2x candidate only.
|
|
14
|
-
* A `sizes` without `vw` (for example `sizes="148px"`) makes Next list all 16 widths, which was 28–30% of some pages'
|
|
15
|
-
* HTML; it is refused here.
|
|
16
|
-
*
|
|
17
|
-
* `priority` is for the page's largest image (the hero): preloaded and fetched with high priority, never lazy. Every
|
|
18
|
-
* other image loads lazily.
|
|
19
|
-
*/
|
|
20
|
-
import Image from 'next/image';
|
|
21
|
-
import { BRANDLAB_MEDIA_RATIOS } from '@brandlab-digital/site-core/media';
|
|
22
|
-
import { slot } from '../skin.js';
|
|
23
|
-
/** The locked visible label on an AI image (F13; truth wording, not site copy). */
|
|
24
|
-
export const ILLUSTRATION_LABEL = 'Illustration';
|
|
25
|
-
/** Next's own test for a `vw` part in `sizes` (shared/lib/get-img-props). */
|
|
26
|
-
const VIEWPORT_WIDTH = /(^|\s)(1?\d?\d)vw/;
|
|
27
|
-
function ratioOf(ratio) {
|
|
28
|
-
const [width, height] = ratio.split(':').map(Number);
|
|
29
|
-
return height / width;
|
|
30
|
-
}
|
|
31
|
-
export function MediaFrame(props) {
|
|
32
|
-
const { media, ratio, caption, priority = false, quality, classes } = props;
|
|
33
|
-
if (quality !== undefined && (!Number.isInteger(quality) || quality < 1 || quality > 100)) {
|
|
34
|
-
throw new Error(`MediaFrame ${media.src}: quality must be a whole number from 1 to 100.`);
|
|
35
|
-
}
|
|
36
|
-
if (ratio !== undefined && !BRANDLAB_MEDIA_RATIOS.includes(ratio)) {
|
|
37
|
-
throw new Error(`MediaFrame ${media.src}: ratio "${ratio}" is not one of ${BRANDLAB_MEDIA_RATIOS.join(', ')}.`);
|
|
38
|
-
}
|
|
39
|
-
let width = media.width;
|
|
40
|
-
let height = media.height;
|
|
41
|
-
let sizes;
|
|
42
|
-
if (props.sizes !== undefined) {
|
|
43
|
-
if (!VIEWPORT_WIDTH.test(props.sizes)) {
|
|
44
|
-
throw new Error(`MediaFrame ${media.src}: sizes "${props.sizes}" has no vw part, so Next would list every width. Give a fluid image a vw size, or a fixed-size image its displayWidth instead.`);
|
|
45
|
-
}
|
|
46
|
-
sizes = props.sizes;
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
if (!Number.isInteger(props.displayWidth) || props.displayWidth <= 0) {
|
|
50
|
-
throw new Error(`MediaFrame ${media.src}: displayWidth must be the image's CSS width in whole pixels.`);
|
|
51
|
-
}
|
|
52
|
-
width = props.displayWidth;
|
|
53
|
-
height = Math.round(props.displayWidth * (ratio ? ratioOf(ratio) : media.height / media.width));
|
|
54
|
-
}
|
|
55
|
-
const illustration = media.provenance === 'illustrative-ai';
|
|
56
|
-
const hasCaption = caption !== undefined && caption !== null && caption !== '';
|
|
57
|
-
const Root = illustration || hasCaption ? 'figure' : 'div';
|
|
58
|
-
const focal = media.focalPoint ? { objectPosition: `${media.focalPoint.x}% ${media.focalPoint.y}%` } : undefined;
|
|
59
|
-
return (_jsxs(Root, { "data-bl": "media", "data-ratio": ratio, "data-fit": sizes ? 'fluid' : 'fixed', "data-provenance": media.provenance, className: classes?.root, children: [_jsx(Image, { src: media.src, alt: media.decorative ? '' : media.alt, width: width, height: height, sizes: sizes, ...(quality === undefined ? {} : { quality }), style: focal, ...(priority ? { preload: true, fetchPriority: 'high' } : { loading: 'lazy' }), ...slot(classes, 'img') }), illustration || hasCaption ? (_jsxs("figcaption", { ...slot(classes, 'caption'), children: [illustration ? _jsx("span", { ...slot(classes, 'label'), children: ILLUSTRATION_LABEL }) : null, illustration && hasCaption ? ' ' : null, hasCaption ? caption : null] })) : null] }));
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=media-frame.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-frame.js","sourceRoot":"","sources":["../../../src/ui-kit/primitives/media-frame.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,MAAM,YAAY,CAAA;AAE9B,OAAO,EAAE,qBAAqB,EAAoD,MAAM,mCAAmC,CAAA;AAC3H,OAAO,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AASjD,mFAAmF;AACnF,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAA;AAuBhD,6EAA6E;AAC7E,MAAM,cAAc,GAAG,mBAAmB,CAAA;AAE1C,SAAS,OAAO,CAAC,KAAyB;IACxC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAqB,CAAA;IACxE,OAAO,MAAM,GAAG,KAAK,CAAA;AACvB,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;IAC3E,IAAI,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,GAAG,GAAG,CAAC,EAAE,CAAC;QAC1F,MAAM,IAAI,KAAK,CAAC,cAAc,KAAK,CAAC,GAAG,iDAAiD,CAAC,CAAA;IAC3F,CAAC;IACD,IAAI,KAAK,KAAK,SAAS,IAAI,CAAE,qBAA2C,CAAC,QAAQ,CAAC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G,CAAC,CAAC,CAAC,IAAI,EACvC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,IACjB,CACd,CAAC,CAAC,CAAC,IAAI,IACH,CACR,CAAA;AACH,CAAC","sourcesContent":["/**\n * `MediaFrame` (3.14.0, F13): one image from the site's media manifest in a frame of an allowed ratio. Server\n * component over `next/image`, and the library's one image path: `Media` and the hero render through it, so the\n * \"Illustration\" label and the sizing rule below live here only. It is provenance-aware: the root carries\n * `data-provenance`, and an AI image shows the locked visible label \"Illustration\" inside the `<figcaption>`, so the\n * figure's accessible caption names it an illustration too. A caption (\"{what}, {suburb}, {month year}\") or the label\n * makes the root a `<figure>`; otherwise it is a `<div>`.\n *\n * Sizing (cost item 1g) is one of two kinds, and the type takes exactly one:\n * - **fluid** (`sizes`, which must have a `vw` part, for example `(min-width: 1024px) 50vw, 100vw`): Next keeps only the\n * widths the layout can use.\n * - **fixed** (`displayWidth`, the CSS width in pixels): no `sizes` at all, so Next emits a 1x and a 2x candidate only.\n * A `sizes` without `vw` (for example `sizes=\"148px\"`) makes Next list all 16 widths, which was 28–30% of some pages'\n * HTML; it is refused here.\n *\n * `priority` is for the page's largest image (the hero): preloaded and fetched with high priority, never lazy. Every\n * other image loads lazily.\n */\nimport Image from 'next/image'\nimport type { ReactNode } from 'react'\nimport { BRANDLAB_MEDIA_RATIOS, type BrandlabMediaEntry, type BrandlabMediaRatio } from '@brandlab-digital/site-core/media'\nimport { slot, type SkinEntry } from '../skin.js'\n\n/** What a frame needs from a `media.ts` entry; a whole `BrandlabMediaEntry` fits. */\nexport type UiMedia = Pick<BrandlabMediaEntry, 'src' | 'width' | 'height' | 'alt' | 'provenance'> &\n Partial<Pick<BrandlabMediaEntry, 'decorative' | 'focalPoint'>>\n\nexport type MediaFrameSlot = 'root' | 'img' | 'caption' | 'label'\nexport type MediaFrameSkin = SkinEntry<MediaFrameSlot>\n\n/** The locked visible label on an AI image (F13; truth wording, not site copy). */\nexport const ILLUSTRATION_LABEL = 'Illustration'\n\n/** Exactly one sizing: `sizes` with a `vw` part for a fluid image, or `displayWidth` for a fixed-size one. */\nexport type MediaFrameSizing =\n | { readonly sizes: string; readonly displayWidth?: never }\n | { readonly displayWidth: number; readonly sizes?: never }\n\nexport type MediaFrameProps = MediaFrameSkin &\n MediaFrameSizing & {\n readonly media: UiMedia\n /** Crop to an allowed ratio; by default the frame keeps the image's own shape. */\n readonly ratio?: BrandlabMediaRatio\n /** \"{what}, {suburb}, {month year}\", only when the photo really shows that job. */\n readonly caption?: ReactNode\n /** The page's largest image: preloaded, high fetch priority, never lazy. */\n readonly priority?: boolean\n /**\n * The WebP quality, 1 to 100 (3.18.0; Next's default is 75). The site lists it in `brandlabNextConfig`'s\n * `images.qualities`, or Next refuses it. A photo-heavy hero over B1's 200 KB usually passes at 60 to 65.\n */\n readonly quality?: number\n }\n\n/** Next's own test for a `vw` part in `sizes` (shared/lib/get-img-props). */\nconst VIEWPORT_WIDTH = /(^|\\s)(1?\\d?\\d)vw/\n\nfunction ratioOf(ratio: BrandlabMediaRatio): number {\n const [width, height] = ratio.split(':').map(Number) as [number, number]\n return height / width\n}\n\nexport function MediaFrame(props: MediaFrameProps) {\n const { media, ratio, caption, priority = false, quality, classes } = props\n if (quality !== undefined && (!Number.isInteger(quality) || quality < 1 || quality > 100)) {\n throw new Error(`MediaFrame ${media.src}: quality must be a whole number from 1 to 100.`)\n }\n if (ratio !== undefined && !(BRANDLAB_MEDIA_RATIOS as readonly string[]).includes(ratio)) {\n throw new Error(`MediaFrame ${media.src}: ratio \"${ratio}\" is not one of ${BRANDLAB_MEDIA_RATIOS.join(', ')}.`)\n }\n let width = media.width\n let height = media.height\n let sizes: string | undefined\n if (props.sizes !== undefined) {\n if (!VIEWPORT_WIDTH.test(props.sizes)) {\n throw new Error(\n `MediaFrame ${media.src}: sizes \"${props.sizes}\" has no vw part, so Next would list every width. Give a fluid image a vw size, or a fixed-size image its displayWidth instead.`,\n )\n }\n sizes = props.sizes\n } else {\n if (!Number.isInteger(props.displayWidth) || props.displayWidth <= 0) {\n throw new Error(`MediaFrame ${media.src}: displayWidth must be the image's CSS width in whole pixels.`)\n }\n width = props.displayWidth\n height = Math.round(props.displayWidth * (ratio ? ratioOf(ratio) : media.height / media.width))\n }\n const illustration = media.provenance === 'illustrative-ai'\n const hasCaption = caption !== undefined && caption !== null && caption !== ''\n const Root = illustration || hasCaption ? 'figure' : 'div'\n const focal = media.focalPoint ? { objectPosition: `${media.focalPoint.x}% ${media.focalPoint.y}%` } : undefined\n return (\n <Root\n data-bl=\"media\"\n data-ratio={ratio}\n data-fit={sizes ? 'fluid' : 'fixed'}\n data-provenance={media.provenance}\n className={classes?.root}\n >\n <Image\n src={media.src}\n alt={media.decorative ? '' : media.alt}\n width={width}\n height={height}\n sizes={sizes}\n {...(quality === undefined ? {} : { quality })}\n style={focal}\n {...(priority ? { preload: true, fetchPriority: 'high' as const } : { loading: 'lazy' as const })}\n {...slot(classes, 'img')}\n />\n {illustration || hasCaption ? (\n <figcaption {...slot(classes, 'caption')}>\n {illustration ? <span {...slot(classes, 'label')}>{ILLUSTRATION_LABEL}</span> : null}\n {illustration && hasCaption ? ' ' : null}\n {hasCaption ? caption : null}\n </figcaption>\n ) : null}\n </Root>\n )\n}\n"]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `Media` (F13, 3.14.0): one image from the site's media manifest (`src/data/media.ts`, `defineMedia`), rendered through
|
|
3
|
-
* `MediaFrame`, the library's one image path. Server component. It takes a skin entry with `layout.ratio`, which the
|
|
4
|
-
* services grid uses for its photos; everything else (provenance, the locked "Illustration" label, the focal point
|
|
5
|
-
* and the sizing rule) is `MediaFrame`'s.
|
|
6
|
-
*
|
|
7
|
-
* - `sizes` is required. A number is a fixed CSS width (logos, avatars, thumbnails, the header's featured image): it
|
|
8
|
-
* becomes `MediaFrame`'s `displayWidth`, so the image renders no `sizes` and Next emits only the 1x and 2x candidates
|
|
9
|
-
* (cost item 1g). A string is a fluid `sizes` value and must have a `vw` part.
|
|
10
|
-
* - `preload` is for the page's main (hero) image only: preloaded at high priority and never lazy.
|
|
11
|
-
* - `layout.ratio` crops to one of the allowed ratios, keeping the entry's focal point in view.
|
|
12
|
-
*/
|
|
13
|
-
import type { ReactNode } from 'react';
|
|
14
|
-
import type { BrandlabMediaEntry, BrandlabMediaRatio } from '@brandlab-digital/site-core/media';
|
|
15
|
-
import type { SkinEntry } from '../skin.js';
|
|
16
|
-
export type MediaSlot = 'root' | 'img' | 'caption' | 'label';
|
|
17
|
-
export interface MediaLayout {
|
|
18
|
-
/** Crop to one of the allowed ratios (16:9, 4:5, 4:3, 3:2). Left out, the image keeps its own shape. */
|
|
19
|
-
readonly ratio?: BrandlabMediaRatio;
|
|
20
|
-
/** The WebP quality, 1 to 100 (3.18.0), for example a page header photo over B1's budget; see `MediaFrame`. */
|
|
21
|
-
readonly imageQuality?: number;
|
|
22
|
-
}
|
|
23
|
-
export type MediaSkin = SkinEntry<MediaSlot, never, MediaLayout>;
|
|
24
|
-
/** The visible label on an AI image (F13). Locked: a site can't rename or hide it. The same value as `ILLUSTRATION_LABEL`. */
|
|
25
|
-
export declare const MEDIA_ILLUSTRATION_LABEL = "Illustration";
|
|
26
|
-
export interface MediaProps extends MediaSkin {
|
|
27
|
-
/** The manifest entry, for example `media['castle-hill-gum-removal']`. */
|
|
28
|
-
readonly media: BrandlabMediaEntry;
|
|
29
|
-
/**
|
|
30
|
-
* The rendered width: a whole number of CSS pixels for a fixed-size image (no `sizes`, so 1x and 2x only), or a
|
|
31
|
-
* fluid `sizes` string with a `vw` part such as `(min-width: 1024px) 50vw, 100vw`.
|
|
32
|
-
*/
|
|
33
|
-
readonly sizes: number | string;
|
|
34
|
-
/** The page's main image: preloaded at high priority, never lazy. One per page. */
|
|
35
|
-
readonly preload?: boolean;
|
|
36
|
-
/** A visible caption, for example "Gum removal over a pool, Epping, March 2026". */
|
|
37
|
-
readonly caption?: ReactNode;
|
|
38
|
-
}
|
|
39
|
-
export declare function Media({ media, sizes, preload, caption, layout, classes }: MediaProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
//# sourceMappingURL=media.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/media.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC/F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAG3C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,CAAA;AAC5D,MAAM,WAAW,WAAW;IAC1B,wGAAwG;IACxG,QAAQ,CAAC,KAAK,CAAC,EAAE,kBAAkB,CAAA;IACnC,+GAA+G;IAC/G,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAC/B;AACD,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,CAAA;AAEhE,8HAA8H;AAC9H,eAAO,MAAM,wBAAwB,iBAAqB,CAAA;AAE1D,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAA;IAClC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,mFAAmF;IACnF,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,oFAAoF;IACpF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAe,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,UAAU,2CAK5F"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ILLUSTRATION_LABEL, MediaFrame } from './media-frame.js';
|
|
3
|
-
/** The visible label on an AI image (F13). Locked: a site can't rename or hide it. The same value as `ILLUSTRATION_LABEL`. */
|
|
4
|
-
export const MEDIA_ILLUSTRATION_LABEL = ILLUSTRATION_LABEL;
|
|
5
|
-
export function Media({ media, sizes, preload = false, caption, layout, classes }) {
|
|
6
|
-
const sizing = typeof sizes === 'number' ? { displayWidth: sizes } : { sizes };
|
|
7
|
-
return (_jsx(MediaFrame, { media: media, ...sizing, ratio: layout?.ratio, quality: layout?.imageQuality, caption: caption, priority: preload, classes: classes }));
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=media.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../../src/ui-kit/primitives/media.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAWjE,8HAA8H;AAC9H,MAAM,CAAC,MAAM,wBAAwB,GAAG,kBAAkB,CAAA;AAgB1D,MAAM,UAAU,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAc;IAC3F,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAA;IAC9E,OAAO,CACL,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,KAAM,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAI,CACrJ,CAAA;AACH,CAAC","sourcesContent":["/**\n * `Media` (F13, 3.14.0): one image from the site's media manifest (`src/data/media.ts`, `defineMedia`), rendered through\n * `MediaFrame`, the library's one image path. Server component. It takes a skin entry with `layout.ratio`, which the\n * services grid uses for its photos; everything else (provenance, the locked \"Illustration\" label, the focal point\n * and the sizing rule) is `MediaFrame`'s.\n *\n * - `sizes` is required. A number is a fixed CSS width (logos, avatars, thumbnails, the header's featured image): it\n * becomes `MediaFrame`'s `displayWidth`, so the image renders no `sizes` and Next emits only the 1x and 2x candidates\n * (cost item 1g). A string is a fluid `sizes` value and must have a `vw` part.\n * - `preload` is for the page's main (hero) image only: preloaded at high priority and never lazy.\n * - `layout.ratio` crops to one of the allowed ratios, keeping the entry's focal point in view.\n */\nimport type { ReactNode } from 'react'\nimport type { BrandlabMediaEntry, BrandlabMediaRatio } from '@brandlab-digital/site-core/media'\nimport type { SkinEntry } from '../skin.js'\nimport { ILLUSTRATION_LABEL, MediaFrame } from './media-frame.js'\n\nexport type MediaSlot = 'root' | 'img' | 'caption' | 'label'\nexport interface MediaLayout {\n /** Crop to one of the allowed ratios (16:9, 4:5, 4:3, 3:2). Left out, the image keeps its own shape. */\n readonly ratio?: BrandlabMediaRatio\n /** The WebP quality, 1 to 100 (3.18.0), for example a page header photo over B1's budget; see `MediaFrame`. */\n readonly imageQuality?: number\n}\nexport type MediaSkin = SkinEntry<MediaSlot, never, MediaLayout>\n\n/** The visible label on an AI image (F13). Locked: a site can't rename or hide it. The same value as `ILLUSTRATION_LABEL`. */\nexport const MEDIA_ILLUSTRATION_LABEL = ILLUSTRATION_LABEL\n\nexport interface MediaProps extends MediaSkin {\n /** The manifest entry, for example `media['castle-hill-gum-removal']`. */\n readonly media: BrandlabMediaEntry\n /**\n * The rendered width: a whole number of CSS pixels for a fixed-size image (no `sizes`, so 1x and 2x only), or a\n * fluid `sizes` string with a `vw` part such as `(min-width: 1024px) 50vw, 100vw`.\n */\n readonly sizes: number | string\n /** The page's main image: preloaded at high priority, never lazy. One per page. */\n readonly preload?: boolean\n /** A visible caption, for example \"Gum removal over a pool, Epping, March 2026\". */\n readonly caption?: ReactNode\n}\n\nexport function Media({ media, sizes, preload = false, caption, layout, classes }: MediaProps) {\n const sizing = typeof sizes === 'number' ? { displayWidth: sizes } : { sizes }\n return (\n <MediaFrame media={media} {...sizing} ratio={layout?.ratio} quality={layout?.imageQuality} caption={caption} priority={preload} classes={classes} />\n )\n}\n"]}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { LeadCtaPlacement } from '../../analytics.js';
|
|
2
|
-
import { type LinkPrefetch } from '../prefetch.js';
|
|
3
|
-
import { type SkinEntry } from '../skin.js';
|
|
4
|
-
import type { ButtonVariant } from './links.js';
|
|
5
|
-
export type QuoteButtonSlot = 'root' | 'label' | 'icon';
|
|
6
|
-
export type QuoteButtonSkin = SkinEntry<QuoteButtonSlot, ButtonVariant, {
|
|
7
|
-
size?: 'regular' | 'large';
|
|
8
|
-
icon?: boolean;
|
|
9
|
-
}>;
|
|
10
|
-
export interface QuoteButtonProps extends QuoteButtonSkin {
|
|
11
|
-
/** The site's recorded quote label, or one from the closed list (C5), for example "Get a free quote". */
|
|
12
|
-
readonly label: string;
|
|
13
|
-
/** The quote form this falls back to without scripts, for example `/contact#quote`. */
|
|
14
|
-
readonly href: string;
|
|
15
|
-
/** Where the button sits, for `lead_cta_click`. */
|
|
16
|
-
readonly placement: LeadCtaPlacement;
|
|
17
|
-
/** A stable id for `lead_cta_click`, for example `quote-header` or `quote-cta`. */
|
|
18
|
-
readonly ctaId: string;
|
|
19
|
-
/**
|
|
20
|
-
* `auto` by default: the main quote action keeps Next's prefetch (`LINK_PREFETCH_POLICY.primaryAction`). A link to a
|
|
21
|
-
* place on the same page (`#quote-hero`) never prefetches, and in the header, drawer and call bar the button never
|
|
22
|
-
* prefetches its own page (on `/contact`, `/contact#quote`).
|
|
23
|
-
*/
|
|
24
|
-
readonly prefetch?: LinkPrefetch;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* The quote button's anchor props and content (internal; not exported from the subpath). `QuoteButton` renders them
|
|
28
|
-
* through `next/link`; the shell's header, drawer and call bar render them through a link that also turns prefetch
|
|
29
|
-
* off on the quote page itself.
|
|
30
|
-
*/
|
|
31
|
-
export declare function quoteButtonParts({ label, href, placement, ctaId, variant, layout, classes }: QuoteButtonProps, options?: {
|
|
32
|
-
readonly compactLabel?: string | undefined;
|
|
33
|
-
}): {
|
|
34
|
-
href: string;
|
|
35
|
-
hooks: {
|
|
36
|
-
'data-bl': string;
|
|
37
|
-
'data-variant': "primary" | "secondary" | "quiet";
|
|
38
|
-
'data-size': "regular" | "large";
|
|
39
|
-
'data-bl-cta': string;
|
|
40
|
-
'data-bl-cta-placement': "header" | "footer" | "hero" | "page" | "section" | "navigation" | "floating";
|
|
41
|
-
className: string | undefined;
|
|
42
|
-
};
|
|
43
|
-
children: import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
};
|
|
45
|
-
export declare function QuoteButton(props: QuoteButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
//# sourceMappingURL=quote-button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quote-button.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/quote-button.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;AACvD,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,aAAa,EAAE;IAAE,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAA;AAEvH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,yGAAyG;IACzG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,mDAAmD;IACnD,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAA;IACpC,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAA;CACjC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAmB,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,gBAAgB,EACzF,OAAO,GAAE;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAO;;;;;;;;;;;EAiC7D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAOlD"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* `QuoteButton`: the quote action. A server-rendered link to the page's quote form (for example `/contact#quote`), so
|
|
4
|
-
* it works before scripts run. When a `QuoteDialog` is on the page (3.10.0) it opens the dialog instead; on the
|
|
5
|
-
* contact page the link scrolls to the form. It carries the `data-bl-cta` hooks only: from 3.9.0 the shared
|
|
6
|
-
* instrumentation reads them and sends `lead_cta_click` when lead diagnostics are on. Nothing is sent in 3.8.0, and
|
|
7
|
-
* nothing here emits events itself.
|
|
8
|
-
*/
|
|
9
|
-
import Link from 'next/link';
|
|
10
|
-
import { Icon } from '../icons.js';
|
|
11
|
-
import { linkPrefetchProps } from '../prefetch.js';
|
|
12
|
-
import { slot } from '../skin.js';
|
|
13
|
-
/**
|
|
14
|
-
* The quote button's anchor props and content (internal; not exported from the subpath). `QuoteButton` renders them
|
|
15
|
-
* through `next/link`; the shell's header, drawer and call bar render them through a link that also turns prefetch
|
|
16
|
-
* off on the quote page itself.
|
|
17
|
-
*/
|
|
18
|
-
export function quoteButtonParts({ label, href, placement, ctaId, variant = 'primary', layout, classes }, options = {}) {
|
|
19
|
-
const compact = options.compactLabel?.trim();
|
|
20
|
-
if (compact !== undefined && (compact === '' || !label.toLowerCase().includes(compact.toLowerCase()))) {
|
|
21
|
-
throw new Error(`The compact quote label "${options.compactLabel}" must be part of the quote label "${label}" (WCAG 2.5.3: the visible label is in the name).`);
|
|
22
|
-
}
|
|
23
|
-
const hooks = {
|
|
24
|
-
'data-bl': 'quote-button',
|
|
25
|
-
'data-variant': variant,
|
|
26
|
-
'data-size': layout?.size ?? 'regular',
|
|
27
|
-
'data-bl-cta': ctaId,
|
|
28
|
-
'data-bl-cta-placement': placement,
|
|
29
|
-
className: classes?.root,
|
|
30
|
-
};
|
|
31
|
-
const children = (_jsxs(_Fragment, { children: [compact ? (_jsx("span", { ...slot(classes, 'label'), "data-compact-label": compact, children: _jsx("span", { "data-bl-full-label": "", children: label }) })) : (_jsx("span", { ...slot(classes, 'label'), children: label })), layout?.icon === false ? null : (_jsx("span", { ...slot(classes, 'icon'), children: _jsx(Icon, { name: "arrow" }) }))] }));
|
|
32
|
-
return { href, hooks, children };
|
|
33
|
-
}
|
|
34
|
-
export function QuoteButton(props) {
|
|
35
|
-
const { href, hooks, children } = quoteButtonParts(props);
|
|
36
|
-
return (_jsx(Link, { href: href, ...linkPrefetchProps(props.prefetch, href), ...hooks, children: children }));
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=quote-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quote-button.js","sourceRoot":"","sources":["../../../src/ui-kit/primitives/quote-button.ts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IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC/B,kBAAU,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,YAC7B,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GAChB,CACR,IACA,CACJ,CAAA;IACD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAA;AAClC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAA;IACzD,OAAO,CACL,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,KAAM,iBAAiB,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAM,KAAK,YACrE,QAAQ,GACJ,CACR,CAAA;AACH,CAAC","sourcesContent":["/**\n * `QuoteButton`: the quote action. A server-rendered link to the page's quote form (for example `/contact#quote`), so\n * it works before scripts run. When a `QuoteDialog` is on the page (3.10.0) it opens the dialog instead; on the\n * contact page the link scrolls to the form. It carries the `data-bl-cta` hooks only: from 3.9.0 the shared\n * instrumentation reads them and sends `lead_cta_click` when lead diagnostics are on. Nothing is sent in 3.8.0, and\n * nothing here emits events itself.\n */\nimport Link from 'next/link'\nimport type { LeadCtaPlacement } from '../../analytics.js'\nimport { Icon } from '../icons.js'\nimport { linkPrefetchProps, type LinkPrefetch } from '../prefetch.js'\nimport { slot, type SkinEntry } from '../skin.js'\nimport type { ButtonVariant } from './links.js'\n\nexport type QuoteButtonSlot = 'root' | 'label' | 'icon'\nexport type QuoteButtonSkin = SkinEntry<QuoteButtonSlot, ButtonVariant, { size?: 'regular' | 'large'; icon?: boolean }>\n\nexport interface QuoteButtonProps extends QuoteButtonSkin {\n /** The site's recorded quote label, or one from the closed list (C5), for example \"Get a free quote\". */\n readonly label: string\n /** The quote form this falls back to without scripts, for example `/contact#quote`. */\n readonly href: string\n /** Where the button sits, for `lead_cta_click`. */\n readonly placement: LeadCtaPlacement\n /** A stable id for `lead_cta_click`, for example `quote-header` or `quote-cta`. */\n readonly ctaId: string\n /**\n * `auto` by default: the main quote action keeps Next's prefetch (`LINK_PREFETCH_POLICY.primaryAction`). A link to a\n * place on the same page (`#quote-hero`) never prefetches, and in the header, drawer and call bar the button never\n * prefetches its own page (on `/contact`, `/contact#quote`).\n */\n readonly prefetch?: LinkPrefetch\n}\n\n/**\n * The quote button's anchor props and content (internal; not exported from the subpath). `QuoteButton` renders them\n * through `next/link`; the shell's header, drawer and call bar render them through a link that also turns prefetch\n * off on the quote page itself.\n */\nexport function quoteButtonParts(\n { label, href, placement, ctaId, variant = 'primary', layout, classes }: QuoteButtonProps,\n options: { readonly compactLabel?: string | undefined } = {},\n) {\n const compact = options.compactLabel?.trim()\n if (compact !== undefined && (compact === '' || !label.toLowerCase().includes(compact.toLowerCase()))) {\n throw new Error(`The compact quote label \"${options.compactLabel}\" must be part of the quote label \"${label}\" (WCAG 2.5.3: the visible label is in the name).`)\n }\n const hooks = {\n 'data-bl': 'quote-button',\n 'data-variant': variant,\n 'data-size': layout?.size ?? 'regular',\n 'data-bl-cta': ctaId,\n 'data-bl-cta-placement': placement,\n className: classes?.root,\n }\n const children = (\n <>\n {compact ? (\n // The compact label is drawn from the attribute by the structure CSS on narrow phones (with empty alternative\n // text), so the text, the accessible name and C5 still read the full label.\n <span {...slot(classes, 'label')} data-compact-label={compact}>\n <span data-bl-full-label=\"\">{label}</span>\n </span>\n ) : (\n <span {...slot(classes, 'label')}>{label}</span>\n )}\n {layout?.icon === false ? null : (\n <span {...slot(classes, 'icon')}>\n <Icon name=\"arrow\" />\n </span>\n )}\n </>\n )\n return { href, hooks, children }\n}\n\nexport function QuoteButton(props: QuoteButtonProps) {\n const { href, hooks, children } = quoteButtonParts(props)\n return (\n <Link href={href} {...linkPrefetchProps(props.prefetch, href)} {...hooks}>\n {children}\n </Link>\n )\n}\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `Stat` (3.14.0): one proof figure, set large with its label (AA's proof strip, Astute's work numbers). Server
|
|
3
|
-
* component. The value comes from a verified fact and is the final text in the server HTML: no count-up and nothing
|
|
4
|
-
* hidden before scripts run. An optional link says where the figure can be checked (the reviews, the licence register).
|
|
5
|
-
*
|
|
6
|
-
* Stats are rendered once per entry of a strip, so their parts take no class (3.14.0 repeated slots): the site styles
|
|
7
|
-
* `[data-bl="stat"]` once in `src/site/skin.css`.
|
|
8
|
-
*/
|
|
9
|
-
import type { RepeatedSlotOf } from '../repeated-slots.js';
|
|
10
|
-
import { type SkinEntry } from '../skin.js';
|
|
11
|
-
import type { UiLink } from '../types.js';
|
|
12
|
-
export type StatSlot = RepeatedSlotOf<'stat'>;
|
|
13
|
-
export type StatSkin = SkinEntry<StatSlot, never, Record<never, never>, StatSlot>;
|
|
14
|
-
export interface StatProps extends StatSkin {
|
|
15
|
-
/** The figure itself, for example "1,200+" or "4.9". From a verified fact, never typed for effect. */
|
|
16
|
-
readonly value: string;
|
|
17
|
-
/** What it counts, for example "trees removed safely since 2009". */
|
|
18
|
-
readonly label: string;
|
|
19
|
-
/** Where to check it, for example `{ label: 'Read the reviews', href: '/reviews' }`. Never prefetched. */
|
|
20
|
-
readonly link?: UiLink;
|
|
21
|
-
/** `li` inside a list the caller renders, or `div` (the default). */
|
|
22
|
-
readonly as?: 'div' | 'li';
|
|
23
|
-
}
|
|
24
|
-
export declare function Stat({ value, label, link, as: Root }: StatProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
//# sourceMappingURL=stat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stat.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/stat.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAC7C,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAA;AAEjF,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,sGAAsG;IACtG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,0GAA0G;IAC1G,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;CAC3B;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,IAAY,EAAE,EAAE,SAAS,2CAWvE"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { repeatedSlot } from '../skin.js';
|
|
3
|
-
import { Anchor } from './links.js';
|
|
4
|
-
export function Stat({ value, label, link, as: Root = 'div' }) {
|
|
5
|
-
return (_jsxs(Root, { "data-bl": "stat", children: [_jsx("span", { ...repeatedSlot('value'), children: value }), " ", _jsx("span", { ...repeatedSlot('label'), children: label }), link ? (_jsx(Anchor, { href: link.href, prefetch: false, hooks: { 'data-slot': 'link' }, children: link.label })) : null] }));
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=stat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stat.js","sourceRoot":"","sources":["../../../src/ui-kit/primitives/stat.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,YAAY,EAAkB,MAAM,YAAY,CAAA;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAgBnC,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,KAAK,EAAa;IACtE,OAAO,CACL,MAAC,IAAI,eAAS,MAAM,aAClB,kBAAU,YAAY,CAAC,OAAO,CAAC,YAAG,KAAK,GAAQ,OAAC,kBAAU,YAAY,CAAC,OAAO,CAAC,YAAG,KAAK,GAAQ,EAC9F,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,MAAM,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,YACrE,IAAI,CAAC,KAAK,GACJ,CACV,CAAC,CAAC,CAAC,IAAI,IACH,CACR,CAAA;AACH,CAAC","sourcesContent":["/**\n * `Stat` (3.14.0): one proof figure, set large with its label (AA's proof strip, Astute's work numbers). Server\n * component. The value comes from a verified fact and is the final text in the server HTML: no count-up and nothing\n * hidden before scripts run. An optional link says where the figure can be checked (the reviews, the licence register).\n *\n * Stats are rendered once per entry of a strip, so their parts take no class (3.14.0 repeated slots): the site styles\n * `[data-bl=\"stat\"]` once in `src/site/skin.css`.\n */\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, type SkinEntry } from '../skin.js'\nimport type { UiLink } from '../types.js'\nimport { Anchor } from './links.js'\n\nexport type StatSlot = RepeatedSlotOf<'stat'>\nexport type StatSkin = SkinEntry<StatSlot, never, Record<never, never>, StatSlot>\n\nexport interface StatProps extends StatSkin {\n /** The figure itself, for example \"1,200+\" or \"4.9\". From a verified fact, never typed for effect. */\n readonly value: string\n /** What it counts, for example \"trees removed safely since 2009\". */\n readonly label: string\n /** Where to check it, for example `{ label: 'Read the reviews', href: '/reviews' }`. Never prefetched. */\n readonly link?: UiLink\n /** `li` inside a list the caller renders, or `div` (the default). */\n readonly as?: 'div' | 'li'\n}\n\nexport function Stat({ value, label, link, as: Root = 'div' }: StatProps) {\n return (\n <Root data-bl=\"stat\">\n <span {...repeatedSlot('value')}>{value}</span> <span {...repeatedSlot('label')}>{label}</span>\n {link ? (\n <Anchor href={link.href} prefetch={false} hooks={{ 'data-slot': 'link' }}>\n {link.label}\n </Anchor>\n ) : null}\n </Root>\n )\n}\n"]}
|