@brandlab-digital/site-next 3.20.0 → 4.1.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/README.md +24 -0
- package/dist/contact/client.d.ts +2 -0
- package/dist/contact/client.d.ts.map +1 -1
- package/dist/contact/client.js +6 -0
- package/dist/contact/client.js.map +1 -1
- package/dist/contact/form-client.d.ts.map +1 -1
- package/dist/contact/form-client.js +5 -1
- package/dist/contact/form-client.js.map +1 -1
- package/dist/contact/route-handler.d.ts +5 -0
- package/dist/contact/route-handler.d.ts.map +1 -1
- package/dist/contact/route-handler.js +1 -0
- package/dist/contact/route-handler.js.map +1 -1
- package/dist/contact/server-entry.d.ts +1 -0
- package/dist/contact/server-entry.d.ts.map +1 -1
- package/dist/contact/server-entry.js +1 -0
- package/dist/contact/server-entry.js.map +1 -1
- package/dist/contact/server.d.ts +8 -0
- package/dist/contact/server.d.ts.map +1 -1
- package/dist/contact/server.js +24 -0
- package/dist/contact/server.js.map +1 -1
- package/dist/contact/shared.d.ts +2 -0
- package/dist/contact/shared.d.ts.map +1 -1
- package/dist/contact/shared.js +2 -0
- package/dist/contact/shared.js.map +1 -1
- package/dist/contact/spam-filter.d.ts +65 -0
- package/dist/contact/spam-filter.d.ts.map +1 -0
- package/dist/contact/spam-filter.js +347 -0
- package/dist/contact/spam-filter.js.map +1 -0
- package/dist/contact/spam-places.d.ts +8 -0
- package/dist/contact/spam-places.d.ts.map +1 -0
- package/dist/contact/spam-places.js +8 -0
- package/dist/contact/spam-places.js.map +1 -0
- 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":"badge.js","sourceRoot":"","sources":["../../../src/ui-kit/primitives/badge.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,IAAI,EAAmB,MAAM,aAAa,CAAA;AAEnD,OAAO,EAAE,YAAY,EAAkB,MAAM,YAAY,CAAA;AAgBzD,SAAS,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAA+E;IAClH,OAAO,CACL,2BAAe,IAAI,aAChB,IAAI,CAAC,CAAC,CAAC,CACN,kBAAU,YAAY,CAAC,MAAM,CAAC,YAC5B,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,GACf,CACR,CAAC,CAAC,CAAC,IAAI,EACR,kBAAU,YAAY,CAAC,OAAO,CAAC,YAAG,QAAQ,GAAQ,IAC7C,CACR,CAAA;AACH,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAc;IAClD,OAAO,CACL,KAAC,KAAK,IAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,YAC3B,QAAQ,GACH,CACT,CAAA;AACH,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAa;IAChD,OAAO,CACL,KAAC,KAAK,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,YAC1B,QAAQ,GACH,CACT,CAAA;AACH,CAAC","sourcesContent":["/**\n * `Badge` and `Chip` (3.14.0): a short label as text, never an image of text, with an optional decorative icon.\n * Server components. A badge marks a fact (\"Licensed\", \"Fully insured\"); a chip names a filter or a tag, and is the only\n * one a skin may make a pill (Romie, Absolute: \"too many round elements\").\n *\n * Both are rendered once per entry of a list, so their parts take no class (3.14.0 repeated slots): the site styles\n * `[data-bl=\"badge\"]` and `[data-bl=\"chip\"]` once in `src/site/skin.css`.\n */\nimport { Icon, type UiIconName } from '../icons.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, type SkinEntry } from '../skin.js'\n\nexport type BadgeSlot = RepeatedSlotOf<'badge'>\nexport type BadgeSkin = SkinEntry<BadgeSlot, never, Record<never, never>, BadgeSlot>\nexport type ChipSlot = RepeatedSlotOf<'chip'>\nexport type ChipSkin = SkinEntry<ChipSlot, never, Record<never, never>, ChipSlot>\n\nexport interface BadgeProps extends BadgeSkin {\n /** The label, in the site's words. */\n readonly children: string\n /** A decorative icon before the label. */\n readonly icon?: UiIconName\n}\n\nexport type ChipProps = BadgeProps & ChipSkin\n\nfunction Label({ hook, children, icon }: { hook: 'badge' | 'chip'; children: string; icon?: UiIconName | undefined }) {\n return (\n <span data-bl={hook}>\n {icon ? (\n <span {...repeatedSlot('icon')}>\n <Icon name={icon} />\n </span>\n ) : null}\n <span {...repeatedSlot('label')}>{children}</span>\n </span>\n )\n}\n\nexport function Badge({ children, icon }: BadgeProps) {\n return (\n <Label hook=\"badge\" icon={icon}>\n {children}\n </Label>\n )\n}\n\nexport function Chip({ children, icon }: ChipProps) {\n return (\n <Label hook=\"chip\" icon={icon}>\n {children}\n </Label>\n )\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { BreadcrumbItem } from '@brandlab-digital/site-core/breadcrumbs';
|
|
2
|
-
import { type Schema } from '@brandlab-digital/site-core/schema';
|
|
3
|
-
import type { BrandlabRouteBreadcrumbOutput } from '../../breadcrumbs.js';
|
|
4
|
-
import type { RepeatedSlotOf } from '../repeated-slots.js';
|
|
5
|
-
import { type SkinEntry } from '../skin.js';
|
|
6
|
-
export type BreadcrumbsSlot = 'root' | 'list' | 'item' | 'link' | 'current';
|
|
7
|
-
/** Rendered once per crumb: styled from the skin stylesheet, never by class. */
|
|
8
|
-
export type BreadcrumbsRepeatedSlot = RepeatedSlotOf<'breadcrumbs'>;
|
|
9
|
-
export type BreadcrumbsSkin = SkinEntry<BreadcrumbsSlot, never, Record<never, never>, BreadcrumbsRepeatedSlot>;
|
|
10
|
-
/** The breadcrumb landmark's accessible name. Locked. */
|
|
11
|
-
export declare const BREADCRUMBS_LABEL = "Breadcrumb";
|
|
12
|
-
/** A trail with the site's URL, for a page without a route catalogue. */
|
|
13
|
-
export interface BreadcrumbTrail {
|
|
14
|
-
readonly items: readonly BreadcrumbItem[];
|
|
15
|
-
/** The site's origin, for example `https://www.aatreeservices.com.au`. */
|
|
16
|
-
readonly siteUrl: string;
|
|
17
|
-
}
|
|
18
|
-
export interface BreadcrumbsProps extends BreadcrumbsSkin {
|
|
19
|
-
/** The route lineage's output (`createRouteBreadcrumbOutput`) or a trail with the site's URL. Home first. */
|
|
20
|
-
readonly trail: BrandlabRouteBreadcrumbOutput | BreadcrumbTrail;
|
|
21
|
-
/** Opt in to writing the `BreadcrumbList` JSON-LD beside the trail. Off by default: the page's schema builder emits it (F14). */
|
|
22
|
-
readonly jsonLd?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/** The `BreadcrumbList` for a trail: the route output's own, or one built from the trail and the site's URL. */
|
|
25
|
-
export declare function breadcrumbsSchema(trail: BreadcrumbsProps['trail']): Schema<unknown>;
|
|
26
|
-
export declare function Breadcrumbs({ trail, jsonLd, classes }: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
-
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/breadcrumbs.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AAE7E,OAAO,EAA2C,KAAK,MAAM,EAAE,MAAM,oCAAoC,CAAA;AACzG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAE/D,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;AAC3E,gFAAgF;AAChF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAA;AACnE,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,uBAAuB,CAAC,CAAA;AAE9G,yDAAyD;AACzD,eAAO,MAAM,iBAAiB,eAAe,CAAA;AAE7C,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAA;IACzC,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,6GAA6G;IAC7G,QAAQ,CAAC,KAAK,EAAE,6BAA6B,GAAG,eAAe,CAAA;IAC/D,iIAAiI;IACjI,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAC1B;AAMD,gHAAgH;AAChH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAGnF;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,MAAc,EAAE,OAAO,EAAE,EAAE,gBAAgB,kDA4B/E"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* `Breadcrumbs` (F11, 3.14.0): the visible trail and its `BreadcrumbList` JSON-LD from one source. Server component.
|
|
4
|
-
* A `nav` named "Breadcrumb" (locked) holding an ordered list; earlier crumbs are links with prefetch off, the current
|
|
5
|
-
* page is plain text with `aria-current="page"`. The list is lean: no separator elements and no icons, so a long trail
|
|
6
|
-
* costs a few bytes per crumb. The separator is drawn by `structure.css` (a `/` with empty alternative text), which a
|
|
7
|
-
* skin may restyle on `[data-bl='breadcrumbs'] [data-slot='item'] + [data-slot='item']::before`.
|
|
8
|
-
*
|
|
9
|
-
* Components never write JSON-LD (F14): the page's schema builder emits the `BreadcrumbList`, so `jsonLd` is off by
|
|
10
|
-
* default. `breadcrumbsSchema(trail)` gives the page the matching schema from the same trail, through the site-core
|
|
11
|
-
* builders (`buildBreadcrumbListSchema`), either from a route lineage (`createRouteBreadcrumbOutput`, which also checks
|
|
12
|
-
* the two agree) or from a trail and the site's URL. A page without its own emitter may opt in with `jsonLd`. The
|
|
13
|
-
* trail is checked either way, so a bad trail fails the build whether or not the JSON-LD is written here.
|
|
14
|
-
*/
|
|
15
|
-
import Link from 'next/link';
|
|
16
|
-
import { getAbsoluteUrl } from '@brandlab-digital/site-core/metadata';
|
|
17
|
-
import { buildBreadcrumbListSchema, createSchema } from '@brandlab-digital/site-core/schema';
|
|
18
|
-
import { SchemaScript } from '../../schema.js';
|
|
19
|
-
import { repeatedSlot, slot } from '../skin.js';
|
|
20
|
-
/** The breadcrumb landmark's accessible name. Locked. */
|
|
21
|
-
export const BREADCRUMBS_LABEL = 'Breadcrumb';
|
|
22
|
-
function isRouteOutput(trail) {
|
|
23
|
-
return 'schema' in trail;
|
|
24
|
-
}
|
|
25
|
-
/** The `BreadcrumbList` for a trail: the route output's own, or one built from the trail and the site's URL. */
|
|
26
|
-
export function breadcrumbsSchema(trail) {
|
|
27
|
-
if (isRouteOutput(trail))
|
|
28
|
-
return trail.schema;
|
|
29
|
-
return createSchema(buildBreadcrumbListSchema([...trail.items], { absoluteUrl: (path) => getAbsoluteUrl(trail.siteUrl, path) }));
|
|
30
|
-
}
|
|
31
|
-
export function Breadcrumbs({ trail, jsonLd = false, classes }) {
|
|
32
|
-
const items = trail.items;
|
|
33
|
-
if (items.length === 0)
|
|
34
|
-
return null;
|
|
35
|
-
// Built even when not written, so a trail Google would reject fails here too.
|
|
36
|
-
const schema = breadcrumbsSchema(trail);
|
|
37
|
-
const last = items.length - 1;
|
|
38
|
-
return (_jsxs(_Fragment, { children: [_jsx("nav", { "aria-label": BREADCRUMBS_LABEL, "data-bl": "breadcrumbs", className: classes?.root, children: _jsx("ol", { ...slot(classes, 'list'), children: items.map((item, index) => (_jsx("li", { ...repeatedSlot('item'), children: index < last && item.href ? (_jsx(Link, { href: item.href, prefetch: false, ...repeatedSlot('link'), children: item.name })) : (_jsx("span", { ...repeatedSlot('current'), "aria-current": index === last ? 'page' : undefined, children: item.name })) }, `${item.href ?? 'current'}:${item.name}`))) }) }), jsonLd ? _jsx(SchemaScript, { id: "breadcrumbs", schema: schema }) : null] }));
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=breadcrumbs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"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U,aAAa,EAAC,SAAS,EAAE,OAAO,EAAE,IAAI,YAChF,gBAAQ,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,YAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,gBAAuD,YAAY,CAAC,MAAM,CAAC,YACxE,KAAK,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAC3B,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,KAAM,YAAY,CAAC,MAAM,CAAC,YAC7D,IAAI,CAAC,IAAI,GACL,CACR,CAAC,CAAC,CAAC,CACF,kBAAU,YAAY,CAAC,SAAS,CAAC,kBAAgB,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YACjF,IAAI,CAAC,IAAI,GACL,CACR,IATM,GAAG,IAAI,CAAC,IAAI,IAAI,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,CAU5C,CACN,CAAC,GACC,GACD,EACL,MAAM,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,EAAE,EAAC,aAAa,EAAC,MAAM,EAAE,MAAM,GAAI,CAAC,CAAC,CAAC,IAAI,IACjE,CACJ,CAAA;AACH,CAAC","sourcesContent":["/**\n * `Breadcrumbs` (F11, 3.14.0): the visible trail and its `BreadcrumbList` JSON-LD from one source. Server component.\n * A `nav` named \"Breadcrumb\" (locked) holding an ordered list; earlier crumbs are links with prefetch off, the current\n * page is plain text with `aria-current=\"page\"`. The list is lean: no separator elements and no icons, so a long trail\n * costs a few bytes per crumb. The separator is drawn by `structure.css` (a `/` with empty alternative text), which a\n * skin may restyle on `[data-bl='breadcrumbs'] [data-slot='item'] + [data-slot='item']::before`.\n *\n * Components never write JSON-LD (F14): the page's schema builder emits the `BreadcrumbList`, so `jsonLd` is off by\n * default. `breadcrumbsSchema(trail)` gives the page the matching schema from the same trail, through the site-core\n * builders (`buildBreadcrumbListSchema`), either from a route lineage (`createRouteBreadcrumbOutput`, which also checks\n * the two agree) or from a trail and the site's URL. A page without its own emitter may opt in with `jsonLd`. The\n * trail is checked either way, so a bad trail fails the build whether or not the JSON-LD is written here.\n */\nimport Link from 'next/link'\nimport type { BreadcrumbItem } from '@brandlab-digital/site-core/breadcrumbs'\nimport { getAbsoluteUrl } from '@brandlab-digital/site-core/metadata'\nimport { buildBreadcrumbListSchema, createSchema, type Schema } from '@brandlab-digital/site-core/schema'\nimport type { BrandlabRouteBreadcrumbOutput } from '../../breadcrumbs.js'\nimport { SchemaScript } from '../../schema.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, slot, type SkinEntry } from '../skin.js'\n\nexport type BreadcrumbsSlot = 'root' | 'list' | 'item' | 'link' | 'current'\n/** Rendered once per crumb: styled from the skin stylesheet, never by class. */\nexport type BreadcrumbsRepeatedSlot = RepeatedSlotOf<'breadcrumbs'>\nexport type BreadcrumbsSkin = SkinEntry<BreadcrumbsSlot, never, Record<never, never>, BreadcrumbsRepeatedSlot>\n\n/** The breadcrumb landmark's accessible name. Locked. */\nexport const BREADCRUMBS_LABEL = 'Breadcrumb'\n\n/** A trail with the site's URL, for a page without a route catalogue. */\nexport interface BreadcrumbTrail {\n readonly items: readonly BreadcrumbItem[]\n /** The site's origin, for example `https://www.aatreeservices.com.au`. */\n readonly siteUrl: string\n}\n\nexport interface BreadcrumbsProps extends BreadcrumbsSkin {\n /** The route lineage's output (`createRouteBreadcrumbOutput`) or a trail with the site's URL. Home first. */\n readonly trail: BrandlabRouteBreadcrumbOutput | BreadcrumbTrail\n /** Opt in to writing the `BreadcrumbList` JSON-LD beside the trail. Off by default: the page's schema builder emits it (F14). */\n readonly jsonLd?: boolean\n}\n\nfunction isRouteOutput(trail: BreadcrumbsProps['trail']): trail is BrandlabRouteBreadcrumbOutput {\n return 'schema' in trail\n}\n\n/** The `BreadcrumbList` for a trail: the route output's own, or one built from the trail and the site's URL. */\nexport function breadcrumbsSchema(trail: BreadcrumbsProps['trail']): Schema<unknown> {\n if (isRouteOutput(trail)) return trail.schema\n return createSchema(buildBreadcrumbListSchema([...trail.items], { absoluteUrl: (path) => getAbsoluteUrl(trail.siteUrl, path) }))\n}\n\nexport function Breadcrumbs({ trail, jsonLd = false, classes }: BreadcrumbsProps) {\n const items = trail.items\n if (items.length === 0) return null\n // Built even when not written, so a trail Google would reject fails here too.\n const schema = breadcrumbsSchema(trail)\n const last = items.length - 1\n return (\n <>\n <nav aria-label={BREADCRUMBS_LABEL} data-bl=\"breadcrumbs\" className={classes?.root}>\n <ol {...slot(classes, 'list')}>\n {items.map((item, index) => (\n <li key={`${item.href ?? 'current'}:${item.name}`} {...repeatedSlot('item')}>\n {index < last && item.href ? (\n <Link href={item.href} prefetch={false} {...repeatedSlot('link')}>\n {item.name}\n </Link>\n ) : (\n <span {...repeatedSlot('current')} aria-current={index === last ? 'page' : undefined}>\n {item.name}\n </span>\n )}\n </li>\n ))}\n </ol>\n </nav>\n {jsonLd ? <SchemaScript id=\"breadcrumbs\" schema={schema} /> : null}\n </>\n )\n}\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `Button` (3.14.0): an action on the page, as distinct from `ButtonLink`, which goes somewhere. A real `<button>`
|
|
3
|
-
* (default `type="button"`) with the same `data-bl="button"` hook, variants and sizes as `ButtonLink`, so one skin
|
|
4
|
-
* stylesheet rule and the shared 44 px minimum cover both; `button[data-bl='button']` tells them apart. Server
|
|
5
|
-
* component. It takes no event props: a form submits it, or a client island finds it by its `action` hook
|
|
6
|
-
* (`data-bl-action`) and listens there. `disabled` is the native attribute, so it is announced.
|
|
7
|
-
*/
|
|
8
|
-
import type { ReactNode } from 'react';
|
|
9
|
-
import { type UiIconName } from '../icons.js';
|
|
10
|
-
import { type SkinEntry } from '../skin.js';
|
|
11
|
-
import type { ButtonVariant } from './links.js';
|
|
12
|
-
export type ButtonSlot = 'root' | 'label' | 'icon';
|
|
13
|
-
export type ButtonSkin = SkinEntry<ButtonSlot, ButtonVariant, {
|
|
14
|
-
size?: 'regular' | 'large';
|
|
15
|
-
}>;
|
|
16
|
-
export interface ButtonProps extends ButtonSkin {
|
|
17
|
-
readonly children: ReactNode;
|
|
18
|
-
/** `button` by default; `submit` inside a form. */
|
|
19
|
-
readonly type?: 'button' | 'submit' | 'reset';
|
|
20
|
-
/** An icon after the label (`arrow`) or before it (`phone`). */
|
|
21
|
-
readonly icon?: UiIconName;
|
|
22
|
-
readonly iconPosition?: 'start' | 'end';
|
|
23
|
-
readonly disabled?: boolean;
|
|
24
|
-
/** The form field name and value it submits, and the id of a form outside it that it submits. */
|
|
25
|
-
readonly name?: string;
|
|
26
|
-
readonly value?: string;
|
|
27
|
-
readonly form?: string;
|
|
28
|
-
/** A stable name a client island listens for, rendered as `data-bl-action` (for example `show-more`). */
|
|
29
|
-
readonly action?: string;
|
|
30
|
-
}
|
|
31
|
-
export declare function Button({ children, type, icon, iconPosition, disabled, name, value, form, action, variant, layout, classes, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/button.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;AAClD,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,aAAa,EAAE;IAAE,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;CAAE,CAAC,CAAA;AAE7F,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,mDAAmD;IACnD,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC7C,gEAAgE;IAChE,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,iGAAiG;IACjG,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,yGAAyG;IACzG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,IAAe,EACf,IAAI,EACJ,YAAoB,EACpB,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EACN,OAAmB,EACnB,MAAM,EACN,OAAO,GACR,EAAE,WAAW,2CAoBb"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Icon } from '../icons.js';
|
|
3
|
-
import { slot } from '../skin.js';
|
|
4
|
-
export function Button({ children, type = 'button', icon, iconPosition = 'end', disabled, name, value, form, action, variant = 'primary', layout, classes, }) {
|
|
5
|
-
const iconNode = icon ? _jsx("span", { ...slot(classes, 'icon'), children: _jsx(Icon, { name: icon }) }) : null;
|
|
6
|
-
return (_jsxs("button", { type: type, name: name, value: value, form: form, disabled: disabled, "data-bl": "button", "data-variant": variant, "data-size": layout?.size ?? 'regular', "data-bl-action": action, className: classes?.root, children: [iconPosition === 'start' ? iconNode : null, _jsx("span", { ...slot(classes, 'label'), children: children }), iconPosition === 'end' ? iconNode : null] }));
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/ui-kit/primitives/button.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,IAAI,EAAmB,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AAsBjD,MAAM,UAAU,MAAM,CAAC,EACrB,QAAQ,EACR,IAAI,GAAG,QAAQ,EACf,IAAI,EACJ,YAAY,GAAG,KAAK,EACpB,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EACN,OAAO,GAAG,SAAS,EACnB,MAAM,EACN,OAAO,GACK;IACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,kBAAU,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,YAAE,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,GAAO,CAAC,CAAC,CAAC,IAAI,CAAA;IAC3F,OAAO,CACL,kBACE,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,aACV,QAAQ,kBACF,OAAO,eACV,MAAM,EAAE,IAAI,IAAI,SAAS,oBACpB,MAAM,EACtB,SAAS,EAAE,OAAO,EAAE,IAAI,aAEvB,YAAY,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAC3C,kBAAU,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,YAAG,QAAQ,GAAQ,EAClD,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAClC,CACV,CAAA;AACH,CAAC","sourcesContent":["/**\n * `Button` (3.14.0): an action on the page, as distinct from `ButtonLink`, which goes somewhere. A real `<button>`\n * (default `type=\"button\"`) with the same `data-bl=\"button\"` hook, variants and sizes as `ButtonLink`, so one skin\n * stylesheet rule and the shared 44 px minimum cover both; `button[data-bl='button']` tells them apart. Server\n * component. It takes no event props: a form submits it, or a client island finds it by its `action` hook\n * (`data-bl-action`) and listens there. `disabled` is the native attribute, so it is announced.\n */\nimport type { ReactNode } from 'react'\nimport { Icon, type UiIconName } from '../icons.js'\nimport { slot, type SkinEntry } from '../skin.js'\nimport type { ButtonVariant } from './links.js'\n\nexport type ButtonSlot = 'root' | 'label' | 'icon'\nexport type ButtonSkin = SkinEntry<ButtonSlot, ButtonVariant, { size?: 'regular' | 'large' }>\n\nexport interface ButtonProps extends ButtonSkin {\n readonly children: ReactNode\n /** `button` by default; `submit` inside a form. */\n readonly type?: 'button' | 'submit' | 'reset'\n /** An icon after the label (`arrow`) or before it (`phone`). */\n readonly icon?: UiIconName\n readonly iconPosition?: 'start' | 'end'\n readonly disabled?: boolean\n /** The form field name and value it submits, and the id of a form outside it that it submits. */\n readonly name?: string\n readonly value?: string\n readonly form?: string\n /** A stable name a client island listens for, rendered as `data-bl-action` (for example `show-more`). */\n readonly action?: string\n}\n\nexport function Button({\n children,\n type = 'button',\n icon,\n iconPosition = 'end',\n disabled,\n name,\n value,\n form,\n action,\n variant = 'primary',\n layout,\n classes,\n}: ButtonProps) {\n const iconNode = icon ? <span {...slot(classes, 'icon')}><Icon name={icon} /></span> : null\n return (\n <button\n type={type}\n name={name}\n value={value}\n form={form}\n disabled={disabled}\n data-bl=\"button\"\n data-variant={variant}\n data-size={layout?.size ?? 'regular'}\n data-bl-action={action}\n className={classes?.root}\n >\n {iconPosition === 'start' ? iconNode : null}\n <span {...slot(classes, 'label')}>{children}</span>\n {iconPosition === 'end' ? iconNode : null}\n </button>\n )\n}\n"]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `Card` (3.14.0): one entry of a grid or list (a service, a project, a guide). Server component. A heading inside
|
|
3
|
-
* every card; with `href` the whole card is one link, made by the title's own link and a stretched hit area
|
|
4
|
-
* (structure.css), so there are never nested links and the link's name is the title.
|
|
5
|
-
*
|
|
6
|
-
* A card is always rendered once per entry of a list, so none of its parts take a class (3.14.0 repeated slots): the
|
|
7
|
-
* site styles `[data-bl="card"]` and its `[data-slot]` parts once in `src/site/skin.css`. Its skin entry holds the
|
|
8
|
-
* media position only.
|
|
9
|
-
*/
|
|
10
|
-
import type { ReactNode } from 'react';
|
|
11
|
-
import type { LinkPrefetch } from '../prefetch.js';
|
|
12
|
-
import type { RepeatedSlotOf } from '../repeated-slots.js';
|
|
13
|
-
import { type SkinEntry } from '../skin.js';
|
|
14
|
-
/** Every part of a card is repeated: styled from the skin stylesheet through `[data-bl="card"] [data-slot]`. */
|
|
15
|
-
export type CardSlot = RepeatedSlotOf<'card'>;
|
|
16
|
-
export interface CardLayout {
|
|
17
|
-
/** Where the media sits beside the body at wider widths (default `top`). */
|
|
18
|
-
readonly media?: 'top' | 'start';
|
|
19
|
-
}
|
|
20
|
-
export type CardSkin = SkinEntry<CardSlot, never, CardLayout, CardSlot>;
|
|
21
|
-
export interface CardProps extends CardSkin {
|
|
22
|
-
/** The card's heading text; with `href` it is the link's whole name. */
|
|
23
|
-
readonly title: string;
|
|
24
|
-
/** The heading level from the page outline: 3 under a section's H2 (the default), 2 when the cards are the section. */
|
|
25
|
-
readonly headingLevel?: 2 | 3 | 4;
|
|
26
|
-
/** The root element: `article` (default), `li` inside a list the caller renders, or `div`. */
|
|
27
|
-
readonly as?: 'article' | 'li' | 'div';
|
|
28
|
-
/** Makes the whole card one link to this page. */
|
|
29
|
-
readonly href?: string;
|
|
30
|
-
/** Cards prefetch on intent by default (`LINK_PREFETCH_POLICY.contentCard`). */
|
|
31
|
-
readonly prefetch?: LinkPrefetch;
|
|
32
|
-
/** The card's image (a `MediaFrame` with a fixed or `vw` size), rendered before the body. */
|
|
33
|
-
readonly media?: ReactNode;
|
|
34
|
-
/** The card's text: a short summary. */
|
|
35
|
-
readonly children?: ReactNode;
|
|
36
|
-
/** A line under the text, for example the suburb and month of a project, or a price band. */
|
|
37
|
-
readonly meta?: ReactNode;
|
|
38
|
-
}
|
|
39
|
-
export declare function Card({ title, headingLevel, as: Root, href, prefetch, media, children, meta, layout }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,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;AAGzD,gHAAgH;AAChH,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAC7C,MAAM,WAAW,UAAU;IACzB,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;CACjC;AACD,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAA;AAEvE,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,uHAAuH;IACvH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACjC,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,KAAK,CAAA;IACtC,kDAAkD;IAClD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAA;IAChC,6FAA6F;IAC7F,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;IAC1B,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAC1B;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,YAAgB,EAAE,EAAE,EAAE,IAAgB,EAAE,IAAI,EAAE,QAAmB,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,SAAS,2CAoB1I"}
|
|
@@ -1,8 +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 Card({ title, headingLevel = 3, as: Root = 'article', href, prefetch = 'intent', media, children, meta, layout }) {
|
|
5
|
-
const Heading = `h${headingLevel}`;
|
|
6
|
-
return (_jsxs(Root, { "data-bl": "card", "data-media": media ? (layout?.media ?? 'top') : undefined, "data-linked": href ? '' : undefined, children: [media ? _jsx("div", { ...repeatedSlot('media'), children: media }) : null, _jsxs("div", { ...repeatedSlot('body'), children: [_jsx(Heading, { ...repeatedSlot('title'), children: href ? (_jsx(Anchor, { href: href, prefetch: prefetch, hooks: { 'data-slot': 'link' }, children: title })) : (title) }), children ? _jsx("div", { ...repeatedSlot('text'), children: children }) : null, meta ? _jsx("div", { ...repeatedSlot('meta'), children: meta }) : null] })] }));
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=card.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/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* `Card` (3.14.0): one entry of a grid or list (a service, a project, a guide). Server component. A heading inside\n * every card; with `href` the whole card is one link, made by the title's own link and a stretched hit area\n * (structure.css), so there are never nested links and the link's name is the title.\n *\n * A card is always rendered once per entry of a list, so none of its parts take a class (3.14.0 repeated slots): the\n * site styles `[data-bl=\"card\"]` and its `[data-slot]` parts once in `src/site/skin.css`. Its skin entry holds the\n * media position only.\n */\nimport type { ReactNode } from 'react'\nimport type { LinkPrefetch } from '../prefetch.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, type SkinEntry } from '../skin.js'\nimport { Anchor } from './links.js'\n\n/** Every part of a card is repeated: styled from the skin stylesheet through `[data-bl=\"card\"] [data-slot]`. */\nexport type CardSlot = RepeatedSlotOf<'card'>\nexport interface CardLayout {\n /** Where the media sits beside the body at wider widths (default `top`). */\n readonly media?: 'top' | 'start'\n}\nexport type CardSkin = SkinEntry<CardSlot, never, CardLayout, CardSlot>\n\nexport interface CardProps extends CardSkin {\n /** The card's heading text; with `href` it is the link's whole name. */\n readonly title: string\n /** The heading level from the page outline: 3 under a section's H2 (the default), 2 when the cards are the section. */\n readonly headingLevel?: 2 | 3 | 4\n /** The root element: `article` (default), `li` inside a list the caller renders, or `div`. */\n readonly as?: 'article' | 'li' | 'div'\n /** Makes the whole card one link to this page. */\n readonly href?: string\n /** Cards prefetch on intent by default (`LINK_PREFETCH_POLICY.contentCard`). */\n readonly prefetch?: LinkPrefetch\n /** The card's image (a `MediaFrame` with a fixed or `vw` size), rendered before the body. */\n readonly media?: ReactNode\n /** The card's text: a short summary. */\n readonly children?: ReactNode\n /** A line under the text, for example the suburb and month of a project, or a price band. */\n readonly meta?: ReactNode\n}\n\nexport function Card({ title, headingLevel = 3, as: Root = 'article', href, prefetch = 'intent', media, children, meta, layout }: CardProps) {\n const Heading = `h${headingLevel}` as const\n return (\n <Root data-bl=\"card\" data-media={media ? (layout?.media ?? 'top') : undefined} data-linked={href ? '' : undefined}>\n {media ? <div {...repeatedSlot('media')}>{media}</div> : null}\n <div {...repeatedSlot('body')}>\n <Heading {...repeatedSlot('title')}>\n {href ? (\n <Anchor href={href} prefetch={prefetch} hooks={{ 'data-slot': 'link' }}>\n {title}\n </Anchor>\n ) : (\n title\n )}\n </Heading>\n {children ? <div {...repeatedSlot('text')}>{children}</div> : null}\n {meta ? <div {...repeatedSlot('meta')}>{meta}</div> : null}\n </div>\n </Root>\n )\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { BUTTON_VARIANTS, ButtonLink, PhoneLink, TextLink, type ButtonLinkProps, type ButtonLinkSkin, type ButtonLinkSlot, type ButtonVariant, type PhoneLinkProps, type PhoneLinkSkin, type PhoneLinkSlot, type TextLinkProps, type TextLinkSkin, type TextLinkSlot, } from './links.js';
|
|
2
|
-
export { CONTAINER_WIDTHS, Container, Eyebrow, RatingStars, SECTION_TONES, Section, SectionHeading, VisuallyHidden, type ContainerSkin, type ContainerWidth, type EyebrowSkin, type EyebrowSlot, type SectionHeadingProps, type SectionHeadingSkin, type SectionHeadingSlot, type SectionProps, type SectionSlot, type SectionTone, } from './layout.js';
|
|
3
|
-
export { Button, type ButtonProps, type ButtonSkin, type ButtonSlot } from './button.js';
|
|
4
|
-
export { Card, type CardLayout, type CardProps, type CardSkin, type CardSlot } from './card.js';
|
|
5
|
-
export { Badge, Chip, type BadgeProps, type BadgeSkin, type BadgeSlot, type ChipProps, type ChipSkin, type ChipSlot } from './badge.js';
|
|
6
|
-
export { Stat, type StatProps, type StatSkin, type StatSlot } from './stat.js';
|
|
7
|
-
export { LINK_LIST_KINDS, LinkList, TickList, type LinkListKind, type LinkListLayout, type LinkListEntry, type LinkListProps, type LinkListSkin, type LinkListSlot, type TickItem, type TickListLayout, type TickListProps, type TickListRepeatedSlot, type TickListSkin, type TickListSlot, } from './lists.js';
|
|
8
|
-
export { ILLUSTRATION_LABEL, MediaFrame, type MediaFrameProps, type MediaFrameSizing, type MediaFrameSkin, type MediaFrameSlot, type UiMedia, } from './media-frame.js';
|
|
9
|
-
export { MEDIA_ILLUSTRATION_LABEL, Media, type MediaLayout, type MediaProps, type MediaSkin, type MediaSlot } from './media.js';
|
|
10
|
-
export { BREADCRUMBS_LABEL, Breadcrumbs, breadcrumbsSchema, type BreadcrumbTrail, type BreadcrumbsProps, type BreadcrumbsRepeatedSlot, type BreadcrumbsSkin, type BreadcrumbsSlot, } from './breadcrumbs.js';
|
|
11
|
-
export { QuoteButton, type QuoteButtonProps, type QuoteButtonSkin, type QuoteButtonSlot } from './quote-button.js';
|
|
12
|
-
export { Icon, SocialIcon, UI_ICON_NAMES, createSiteIcon, iconSpriteHref, type IconProps, type UiIconName } from '../icons.js';
|
|
13
|
-
export { defineSiteIcons, type IconGlyph, type SiteIconSet } from '../icon-glyphs.js';
|
|
14
|
-
export { UI_SOCIAL_KINDS, type UiLink, type UiPhone, type UiSocial, type UiSocialKind } from '../types.js';
|
|
15
|
-
export { INTENT_PREFETCH_SELECTOR, LINK_PREFETCH_LIMITS, LINK_PREFETCH_POLICY, linkPrefetchProps, type LinkPrefetch, type LinkPrefetchRole, } from '../prefetch.js';
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,UAAU,EACV,SAAS,EACT,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,KAAK,aAAa,EA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AE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAC/H,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAClH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAA;AAC9H,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACrF,OAAO,EAAE,eAAe,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1G,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { BUTTON_VARIANTS, ButtonLink, PhoneLink, TextLink, } from './links.js';
|
|
2
|
-
export { CONTAINER_WIDTHS, Container, Eyebrow, RatingStars, SECTION_TONES, Section, SectionHeading, VisuallyHidden, } from './layout.js';
|
|
3
|
-
export { Button } from './button.js';
|
|
4
|
-
export { Card } from './card.js';
|
|
5
|
-
export { Badge, Chip } from './badge.js';
|
|
6
|
-
export { Stat } from './stat.js';
|
|
7
|
-
export { LINK_LIST_KINDS, LinkList, TickList, } from './lists.js';
|
|
8
|
-
export { ILLUSTRATION_LABEL, MediaFrame, } from './media-frame.js';
|
|
9
|
-
export { MEDIA_ILLUSTRATION_LABEL, Media } from './media.js';
|
|
10
|
-
export { BREADCRUMBS_LABEL, Breadcrumbs, breadcrumbsSchema, } from './breadcrumbs.js';
|
|
11
|
-
export { QuoteButton } from './quote-button.js';
|
|
12
|
-
export { Icon, SocialIcon, UI_ICON_NAMES, createSiteIcon, iconSpriteHref } from '../icons.js';
|
|
13
|
-
export { defineSiteIcons } from '../icon-glyphs.js';
|
|
14
|
-
export { UI_SOCIAL_KINDS } from '../types.js';
|
|
15
|
-
export { INTENT_PREFETCH_SELECTOR, LINK_PREFETCH_LIMITS, LINK_PREFETCH_POLICY, linkPrefetchProps, } from '../prefetch.js';
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui-kit/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,UAAU,EACV,SAAS,EACT,QAAQ,GAWT,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,GAWf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,MAAM,EAAsD,MAAM,aAAa,CAAA;AACxF,OAAO,EAAE,IAAI,EAAiE,MAAM,WAAW,CAAA;AAC/F,OAAO,EAAE,KAAK,EAAE,IAAI,EAAiG,MAAM,YAAY,CAAA;AACvI,OAAO,EAAE,IAAI,EAAgD,MAAM,WAAW,CAAA;AAC9E,OAAO,EACL,eAAe,EACf,QAAQ,EACR,QAAQ,GAaT,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,kBAAkB,EAClB,UAAU,GAMX,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,wBAAwB,EAAE,KAAK,EAAqE,MAAM,YAAY,CAAA;AAC/H,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,iBAAiB,GAMlB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAqE,MAAM,mBAAmB,CAAA;AAClH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAmC,MAAM,aAAa,CAAA;AAC9H,OAAO,EAAE,eAAe,EAAoC,MAAM,mBAAmB,CAAA;AACrF,OAAO,EAAE,eAAe,EAA+D,MAAM,aAAa,CAAA;AAC1G,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,GAGlB,MAAM,gBAAgB,CAAA","sourcesContent":["export {\n BUTTON_VARIANTS,\n ButtonLink,\n PhoneLink,\n TextLink,\n type ButtonLinkProps,\n type ButtonLinkSkin,\n type ButtonLinkSlot,\n type ButtonVariant,\n type PhoneLinkProps,\n type PhoneLinkSkin,\n type PhoneLinkSlot,\n type TextLinkProps,\n type TextLinkSkin,\n type TextLinkSlot,\n} from './links.js'\nexport {\n CONTAINER_WIDTHS,\n Container,\n Eyebrow,\n RatingStars,\n SECTION_TONES,\n Section,\n SectionHeading,\n VisuallyHidden,\n type ContainerSkin,\n type ContainerWidth,\n type EyebrowSkin,\n type EyebrowSlot,\n type SectionHeadingProps,\n type SectionHeadingSkin,\n type SectionHeadingSlot,\n type SectionProps,\n type SectionSlot,\n type SectionTone,\n} from './layout.js'\nexport { Button, type ButtonProps, type ButtonSkin, type ButtonSlot } from './button.js'\nexport { Card, type CardLayout, type CardProps, type CardSkin, type CardSlot } from './card.js'\nexport { Badge, Chip, type BadgeProps, type BadgeSkin, type BadgeSlot, type ChipProps, type ChipSkin, type ChipSlot } from './badge.js'\nexport { Stat, type StatProps, type StatSkin, type StatSlot } from './stat.js'\nexport {\n LINK_LIST_KINDS,\n LinkList,\n TickList,\n type LinkListKind,\n type LinkListLayout,\n type LinkListEntry,\n type LinkListProps,\n type LinkListSkin,\n type LinkListSlot,\n type TickItem,\n type TickListLayout,\n type TickListProps,\n type TickListRepeatedSlot,\n type TickListSkin,\n type TickListSlot,\n} from './lists.js'\nexport {\n ILLUSTRATION_LABEL,\n MediaFrame,\n type MediaFrameProps,\n type MediaFrameSizing,\n type MediaFrameSkin,\n type MediaFrameSlot,\n type UiMedia,\n} from './media-frame.js'\nexport { MEDIA_ILLUSTRATION_LABEL, Media, type MediaLayout, type MediaProps, type MediaSkin, type MediaSlot } from './media.js'\nexport {\n BREADCRUMBS_LABEL,\n Breadcrumbs,\n breadcrumbsSchema,\n type BreadcrumbTrail,\n type BreadcrumbsProps,\n type BreadcrumbsRepeatedSlot,\n type BreadcrumbsSkin,\n type BreadcrumbsSlot,\n} from './breadcrumbs.js'\nexport { QuoteButton, type QuoteButtonProps, type QuoteButtonSkin, type QuoteButtonSlot } from './quote-button.js'\nexport { Icon, SocialIcon, UI_ICON_NAMES, createSiteIcon, iconSpriteHref, type IconProps, type UiIconName } from '../icons.js'\nexport { defineSiteIcons, type IconGlyph, type SiteIconSet } from '../icon-glyphs.js'\nexport { UI_SOCIAL_KINDS, type UiLink, type UiPhone, type UiSocial, type UiSocialKind } from '../types.js'\nexport {\n INTENT_PREFETCH_SELECTOR,\n LINK_PREFETCH_LIMITS,\n LINK_PREFETCH_POLICY,\n linkPrefetchProps,\n type LinkPrefetch,\n type LinkPrefetchRole,\n} from '../prefetch.js'\n"]}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layout primitives: `Container`, `Section`, `SectionHeading`, `Eyebrow`, `RatingStars` and `VisuallyHidden`.
|
|
3
|
-
* Server components. Heading levels come from the page outline (one H1 in the hero or page header, an H2 per
|
|
4
|
-
* section), never from a look.
|
|
5
|
-
*/
|
|
6
|
-
import type { ReactNode } from 'react';
|
|
7
|
-
import type { PhoneCallPlacement } from '../../analytics.js';
|
|
8
|
-
import { type SkinEntry } from '../skin.js';
|
|
9
|
-
export declare const CONTAINER_WIDTHS: readonly ["default", "narrow", "wide"];
|
|
10
|
-
export type ContainerWidth = (typeof CONTAINER_WIDTHS)[number];
|
|
11
|
-
export type ContainerSkin = SkinEntry<'root', never, {
|
|
12
|
-
width?: ContainerWidth;
|
|
13
|
-
}>;
|
|
14
|
-
/** One container width shared by the header, the page and the footer (`--bl-container`, `--bl-gutter`). */
|
|
15
|
-
export declare function Container({ children, layout, classes }: ContainerSkin & {
|
|
16
|
-
readonly children: ReactNode;
|
|
17
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
/** The four section tones `SectionSequence` assigns: two alternating grounds, one optional band, one photo ground. */
|
|
19
|
-
export declare const SECTION_TONES: readonly ["canvas", "surface", "band", "photo"];
|
|
20
|
-
export type SectionTone = (typeof SECTION_TONES)[number];
|
|
21
|
-
export type SectionSlot = 'root' | 'inner';
|
|
22
|
-
export interface SectionProps {
|
|
23
|
-
/** The matrix id, rendered as `data-bl-section` (for example `reviews`, `cta`, `faqs`). */
|
|
24
|
-
readonly id: string;
|
|
25
|
-
/** The id of the section's H2. A section is a `<section>` labelled by its heading. */
|
|
26
|
-
readonly labelledBy: string;
|
|
27
|
-
readonly tone?: SectionTone | undefined;
|
|
28
|
-
readonly variant?: string | undefined;
|
|
29
|
-
readonly classes?: Readonly<Partial<Record<SectionSlot, string>>> | undefined;
|
|
30
|
-
/** Signature art, rendered `aria-hidden`. */
|
|
31
|
-
readonly decoration?: ReactNode;
|
|
32
|
-
/**
|
|
33
|
-
* Extra layout hooks on the root, for example `{ 'data-columns': '3' }`. They cannot override `data-bl-section`,
|
|
34
|
-
* `data-variant`, `data-tone` or `data-phone-location`.
|
|
35
|
-
*/
|
|
36
|
-
readonly hooks?: Readonly<Record<`data-${string}`, string | undefined>>;
|
|
37
|
-
/** The placement a `tel:` link inside the section reports when it has none of its own. */
|
|
38
|
-
readonly phonePlacement?: PhoneCallPlacement | undefined;
|
|
39
|
-
readonly children: ReactNode;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The root every section component renders: `<section data-bl-section aria-labelledby>`, its tone and variant, an
|
|
43
|
-
* optional `aria-hidden` decoration and the inner container slot.
|
|
44
|
-
*/
|
|
45
|
-
export declare function Section({ id, labelledBy, tone, variant, classes, decoration, hooks, phonePlacement, children }: SectionProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
export type SectionHeadingSlot = 'head' | 'eyebrow' | 'heading' | 'lead';
|
|
47
|
-
export type SectionHeadingSkin = SkinEntry<SectionHeadingSlot, never, {
|
|
48
|
-
align?: 'start' | 'center';
|
|
49
|
-
}>;
|
|
50
|
-
export interface SectionHeadingProps extends SectionHeadingSkin {
|
|
51
|
-
/** The H2's id, which the section's `aria-labelledby` points at. */
|
|
52
|
-
readonly id: string;
|
|
53
|
-
readonly title: ReactNode;
|
|
54
|
-
/** A short label above the H2 (at least 13 px; never the only label for the section). */
|
|
55
|
-
readonly eyebrow?: ReactNode;
|
|
56
|
-
readonly lead?: ReactNode;
|
|
57
|
-
}
|
|
58
|
-
/** A section's heading block: an optional eyebrow, the H2 and an optional lead paragraph. */
|
|
59
|
-
export declare function SectionHeading({ id, title, eyebrow, lead, layout, classes }: SectionHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
-
export type EyebrowSlot = 'root';
|
|
61
|
-
export type EyebrowSkin = SkinEntry<EyebrowSlot>;
|
|
62
|
-
/**
|
|
63
|
-
* A short label above a site's own heading (3.14.0), for signature sections that don't use `SectionHeading`. At
|
|
64
|
-
* least 13 px; never the only label for a section. `SectionHeading` and the hero keep their own `eyebrow` slot.
|
|
65
|
-
*/
|
|
66
|
-
export declare function Eyebrow({ children, classes }: EyebrowSkin & {
|
|
67
|
-
readonly children: ReactNode;
|
|
68
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
69
|
-
/**
|
|
70
|
-
* Five stars with one text alternative ("Rated 4.9 out of 5"). The stars use `--bl-color-star`; whole stars only,
|
|
71
|
-
* rounded to the nearest. The rating always comes from the feed, never typed by hand (T4).
|
|
72
|
-
*
|
|
73
|
-
* From 3.14.0 the row is one `<svg>` holding five `<use>` references to the sprite's star (`data-slot="star"`,
|
|
74
|
-
* `data-state="on" | "off"`), not five icons; without the sprite each star is a `<g>` with the glyph inline.
|
|
75
|
-
*/
|
|
76
|
-
export declare function RatingStars({ rating, label, className }: {
|
|
77
|
-
readonly rating: number;
|
|
78
|
-
readonly label?: string;
|
|
79
|
-
readonly className?: string;
|
|
80
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
81
|
-
/** Text for assistive technology only. */
|
|
82
|
-
export declare function VisuallyHidden({ children }: {
|
|
83
|
-
readonly children: ReactNode;
|
|
84
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
85
|
-
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/layout.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE5D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAEjD,eAAO,MAAM,gBAAgB,wCAAyC,CAAA;AACtE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC9D,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC,CAAA;AAEhF,2GAA2G;AAC3G,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,aAAa,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAMxG;AAED,sHAAsH;AACtH,eAAO,MAAM,aAAa,iDAAkD,CAAA;AAC5E,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAExD,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ACpE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,yFAAyF;IACzF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAC1B;AAED,6FAA6F;AAC7F,wBAAgB,cAAc,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,mBAAmB,2CAUhG;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAChC,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC,CAAA;AAEhD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,WAAW,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAM5F;AAOD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAuB1I;AAED,0CAA0C;AAC1C,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAE5E"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { starGlyph } from '../icons.js';
|
|
3
|
-
import { slot } from '../skin.js';
|
|
4
|
-
export const CONTAINER_WIDTHS = ['default', 'narrow', 'wide'];
|
|
5
|
-
/** One container width shared by the header, the page and the footer (`--bl-container`, `--bl-gutter`). */
|
|
6
|
-
export function Container({ children, layout, classes }) {
|
|
7
|
-
return (_jsx("div", { "data-bl": "container", "data-width": layout?.width ?? 'default', className: classes?.root, children: children }));
|
|
8
|
-
}
|
|
9
|
-
/** The four section tones `SectionSequence` assigns: two alternating grounds, one optional band, one photo ground. */
|
|
10
|
-
export const SECTION_TONES = ['canvas', 'surface', 'band', 'photo'];
|
|
11
|
-
/**
|
|
12
|
-
* The root every section component renders: `<section data-bl-section aria-labelledby>`, its tone and variant, an
|
|
13
|
-
* optional `aria-hidden` decoration and the inner container slot.
|
|
14
|
-
*/
|
|
15
|
-
export function Section({ id, labelledBy, tone, variant, classes, decoration, hooks, phonePlacement, children }) {
|
|
16
|
-
return (_jsxs("section", { ...hooks, "data-bl-section": id, "data-variant": variant, "data-tone": tone, "data-phone-location": phonePlacement, "aria-labelledby": labelledBy, className: classes?.root, children: [decoration ? (_jsx("div", { "data-slot": "decoration", "aria-hidden": "true", children: decoration })) : null, _jsx("div", { ...slot(classes, 'inner'), children: children })] }));
|
|
17
|
-
}
|
|
18
|
-
/** A section's heading block: an optional eyebrow, the H2 and an optional lead paragraph. */
|
|
19
|
-
export function SectionHeading({ id, title, eyebrow, lead, layout, classes }) {
|
|
20
|
-
return (_jsxs("div", { ...slot(classes, 'head'), "data-align": layout?.align ?? 'start', children: [eyebrow ? _jsx("p", { ...slot(classes, 'eyebrow'), children: eyebrow }) : null, _jsx("h2", { id: id, ...slot(classes, 'heading'), children: title }), lead ? _jsx("p", { ...slot(classes, 'lead'), children: lead }) : null] }));
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* A short label above a site's own heading (3.14.0), for signature sections that don't use `SectionHeading`. At
|
|
24
|
-
* least 13 px; never the only label for a section. `SectionHeading` and the hero keep their own `eyebrow` slot.
|
|
25
|
-
*/
|
|
26
|
-
export function Eyebrow({ children, classes }) {
|
|
27
|
-
return (_jsx("p", { "data-bl": "eyebrow", className: classes?.root, children: children }));
|
|
28
|
-
}
|
|
29
|
-
/** The rating row's geometry: five 20-unit stars, 2 units apart, in one `viewBox`. */
|
|
30
|
-
const STAR_SIZE = 20;
|
|
31
|
-
const STAR_STRIDE = 22;
|
|
32
|
-
const STARS_VIEW_BOX = `0 0 ${STAR_STRIDE * 4 + STAR_SIZE} ${STAR_SIZE}`;
|
|
33
|
-
/**
|
|
34
|
-
* Five stars with one text alternative ("Rated 4.9 out of 5"). The stars use `--bl-color-star`; whole stars only,
|
|
35
|
-
* rounded to the nearest. The rating always comes from the feed, never typed by hand (T4).
|
|
36
|
-
*
|
|
37
|
-
* From 3.14.0 the row is one `<svg>` holding five `<use>` references to the sprite's star (`data-slot="star"`,
|
|
38
|
-
* `data-state="on" | "off"`), not five icons; without the sprite each star is a `<g>` with the glyph inline.
|
|
39
|
-
*/
|
|
40
|
-
export function RatingStars({ rating, label, className }) {
|
|
41
|
-
const filled = Math.max(0, Math.min(5, Math.round(rating)));
|
|
42
|
-
const star = starGlyph();
|
|
43
|
-
return (_jsx("span", { "data-bl": "stars", role: "img", "aria-label": label ?? `Rated ${rating.toFixed(1)} out of 5`, className: className, children: _jsx("svg", { "aria-hidden": "true", viewBox: STARS_VIEW_BOX, children: Array.from({ length: 5 }, (_, index) => {
|
|
44
|
-
const state = index < filled ? 'on' : 'off';
|
|
45
|
-
return star.href ? (_jsx("use", { href: star.href, x: index * STAR_STRIDE, width: STAR_SIZE, height: STAR_SIZE, "data-slot": "star", "data-state": state }, index)) : (_jsx("g", { transform: index === 0 ? undefined : `translate(${index * STAR_STRIDE})`, "data-slot": "star", "data-state": state, dangerouslySetInnerHTML: { __html: star.glyph.body } }, index));
|
|
46
|
-
}) }) }));
|
|
47
|
-
}
|
|
48
|
-
/** Text for assistive technology only. */
|
|
49
|
-
export function VisuallyHidden({ children }) {
|
|
50
|
-
return _jsx("span", { "data-bl-visually-hidden": "", children: children });
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=layout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file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M,EAAC,OAAO,EAAE,cAAc,YAC5C,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;gBACtC,MAAM,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAA;gBAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACjB,cAAiB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,GAAG,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,eAAY,MAAM,gBAAa,KAAK,IAAvH,KAAK,CAAsH,CACtI,CAAC,CAAC,CAAC,CACF,YAEE,SAAS,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,KAAK,GAAG,WAAW,GAAG,eAC9D,MAAM,gBACJ,KAAK,EACjB,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAJ/C,KAAK,CAKV,CACH,CAAA;YACH,CAAC,CAAC,GACE,GACD,CACR,CAAA;AACH,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAoC;IAC3E,OAAO,0CAA8B,EAAE,YAAE,QAAQ,GAAQ,CAAA;AAC3D,CAAC","sourcesContent":["/**\n * Layout primitives: `Container`, `Section`, `SectionHeading`, `Eyebrow`, `RatingStars` and `VisuallyHidden`.\n * Server components. Heading levels come from the page outline (one H1 in the hero or page header, an H2 per\n * section), never from a look.\n */\nimport type { ReactNode } from 'react'\nimport type { PhoneCallPlacement } from '../../analytics.js'\nimport { starGlyph } from '../icons.js'\nimport { slot, type SkinEntry } from '../skin.js'\n\nexport const CONTAINER_WIDTHS = ['default', 'narrow', 'wide'] as const\nexport type ContainerWidth = (typeof CONTAINER_WIDTHS)[number]\nexport type ContainerSkin = SkinEntry<'root', never, { width?: ContainerWidth }>\n\n/** One container width shared by the header, the page and the footer (`--bl-container`, `--bl-gutter`). */\nexport function Container({ children, layout, classes }: ContainerSkin & { readonly children: ReactNode }) {\n return (\n <div data-bl=\"container\" data-width={layout?.width ?? 'default'} className={classes?.root}>\n {children}\n </div>\n )\n}\n\n/** The four section tones `SectionSequence` assigns: two alternating grounds, one optional band, one photo ground. */\nexport const SECTION_TONES = ['canvas', 'surface', 'band', 'photo'] as const\nexport type SectionTone = (typeof SECTION_TONES)[number]\n\nexport type SectionSlot = 'root' | 'inner'\n\nexport interface SectionProps {\n /** The matrix id, rendered as `data-bl-section` (for example `reviews`, `cta`, `faqs`). */\n readonly id: string\n /** The id of the section's H2. A section is a `<section>` labelled by its heading. */\n readonly labelledBy: string\n readonly tone?: SectionTone | undefined\n readonly variant?: string | undefined\n readonly classes?: Readonly<Partial<Record<SectionSlot, string>>> | undefined\n /** Signature art, rendered `aria-hidden`. */\n readonly decoration?: ReactNode\n /**\n * Extra layout hooks on the root, for example `{ 'data-columns': '3' }`. They cannot override `data-bl-section`,\n * `data-variant`, `data-tone` or `data-phone-location`.\n */\n readonly hooks?: Readonly<Record<`data-${string}`, string | undefined>>\n /** The placement a `tel:` link inside the section reports when it has none of its own. */\n readonly phonePlacement?: PhoneCallPlacement | undefined\n readonly children: ReactNode\n}\n\n/**\n * The root every section component renders: `<section data-bl-section aria-labelledby>`, its tone and variant, an\n * optional `aria-hidden` decoration and the inner container slot.\n */\nexport function Section({ id, labelledBy, tone, variant, classes, decoration, hooks, phonePlacement, children }: SectionProps) {\n return (\n <section\n {...hooks}\n data-bl-section={id}\n data-variant={variant}\n data-tone={tone}\n data-phone-location={phonePlacement}\n aria-labelledby={labelledBy}\n className={classes?.root}\n >\n {decoration ? (\n <div data-slot=\"decoration\" aria-hidden=\"true\">\n {decoration}\n </div>\n ) : null}\n <div {...slot(classes, 'inner')}>{children}</div>\n </section>\n )\n}\n\nexport type SectionHeadingSlot = 'head' | 'eyebrow' | 'heading' | 'lead'\nexport type SectionHeadingSkin = SkinEntry<SectionHeadingSlot, never, { align?: 'start' | 'center' }>\n\nexport interface SectionHeadingProps extends SectionHeadingSkin {\n /** The H2's id, which the section's `aria-labelledby` points at. */\n readonly id: string\n readonly title: ReactNode\n /** A short label above the H2 (at least 13 px; never the only label for the section). */\n readonly eyebrow?: ReactNode\n readonly lead?: ReactNode\n}\n\n/** A section's heading block: an optional eyebrow, the H2 and an optional lead paragraph. */\nexport function SectionHeading({ id, title, eyebrow, lead, layout, classes }: SectionHeadingProps) {\n return (\n <div {...slot(classes, 'head')} data-align={layout?.align ?? 'start'}>\n {eyebrow ? <p {...slot(classes, 'eyebrow')}>{eyebrow}</p> : null}\n <h2 id={id} {...slot(classes, 'heading')}>\n {title}\n </h2>\n {lead ? <p {...slot(classes, 'lead')}>{lead}</p> : null}\n </div>\n )\n}\n\nexport type EyebrowSlot = 'root'\nexport type EyebrowSkin = SkinEntry<EyebrowSlot>\n\n/**\n * A short label above a site's own heading (3.14.0), for signature sections that don't use `SectionHeading`. At\n * least 13 px; never the only label for a section. `SectionHeading` and the hero keep their own `eyebrow` slot.\n */\nexport function Eyebrow({ children, classes }: EyebrowSkin & { readonly children: ReactNode }) {\n return (\n <p data-bl=\"eyebrow\" className={classes?.root}>\n {children}\n </p>\n )\n}\n\n/** The rating row's geometry: five 20-unit stars, 2 units apart, in one `viewBox`. */\nconst STAR_SIZE = 20\nconst STAR_STRIDE = 22\nconst STARS_VIEW_BOX = `0 0 ${STAR_STRIDE * 4 + STAR_SIZE} ${STAR_SIZE}`\n\n/**\n * Five stars with one text alternative (\"Rated 4.9 out of 5\"). The stars use `--bl-color-star`; whole stars only,\n * rounded to the nearest. The rating always comes from the feed, never typed by hand (T4).\n *\n * From 3.14.0 the row is one `<svg>` holding five `<use>` references to the sprite's star (`data-slot=\"star\"`,\n * `data-state=\"on\" | \"off\"`), not five icons; without the sprite each star is a `<g>` with the glyph inline.\n */\nexport function RatingStars({ rating, label, className }: { readonly rating: number; readonly label?: string; readonly className?: string }) {\n const filled = Math.max(0, Math.min(5, Math.round(rating)))\n const star = starGlyph()\n return (\n <span data-bl=\"stars\" role=\"img\" aria-label={label ?? `Rated ${rating.toFixed(1)} out of 5`} className={className}>\n <svg aria-hidden=\"true\" viewBox={STARS_VIEW_BOX}>\n {Array.from({ length: 5 }, (_, index) => {\n const state = index < filled ? 'on' : 'off'\n return star.href ? (\n <use key={index} href={star.href} x={index * STAR_STRIDE} width={STAR_SIZE} height={STAR_SIZE} data-slot=\"star\" data-state={state} />\n ) : (\n <g\n key={index}\n transform={index === 0 ? undefined : `translate(${index * STAR_STRIDE})`}\n data-slot=\"star\"\n data-state={state}\n dangerouslySetInnerHTML={{ __html: star.glyph.body }}\n />\n )\n })}\n </svg>\n </span>\n )\n}\n\n/** Text for assistive technology only. */\nexport function VisuallyHidden({ children }: { readonly children: ReactNode }) {\n return <span data-bl-visually-hidden=\"\">{children}</span>\n}\n"]}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { PhoneCallPlacement } from '../../analytics.js';
|
|
3
|
-
import { type UiIconName } from '../icons.js';
|
|
4
|
-
import { type LinkPrefetch } from '../prefetch.js';
|
|
5
|
-
import { type SkinEntry } from '../skin.js';
|
|
6
|
-
import type { UiPhone } from '../types.js';
|
|
7
|
-
/** Data hooks and the skin class for an anchor's root. */
|
|
8
|
-
export type AnchorHooks = {
|
|
9
|
-
readonly className?: string | undefined;
|
|
10
|
-
} & Readonly<Record<`data-${string}`, string | undefined>>;
|
|
11
|
-
/**
|
|
12
|
-
* The one anchor every ui-kit link renders (internal; not exported from the subpath): `next/link` with the prefetch
|
|
13
|
-
* role for internal links, a plain `<a target="_blank" rel="noopener noreferrer">` for external ones.
|
|
14
|
-
*/
|
|
15
|
-
export declare function Anchor({ href, external, prefetch, hooks, children, }: {
|
|
16
|
-
href: string;
|
|
17
|
-
external?: boolean | undefined;
|
|
18
|
-
prefetch?: LinkPrefetch | undefined;
|
|
19
|
-
hooks: AnchorHooks;
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export type ButtonLinkSlot = 'root' | 'label' | 'icon';
|
|
23
|
-
export declare const BUTTON_VARIANTS: readonly ["primary", "secondary", "quiet"];
|
|
24
|
-
export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
|
|
25
|
-
export type ButtonLinkSkin = SkinEntry<ButtonLinkSlot, ButtonVariant, {
|
|
26
|
-
size?: 'regular' | 'large';
|
|
27
|
-
}>;
|
|
28
|
-
export interface ButtonLinkProps extends ButtonLinkSkin {
|
|
29
|
-
readonly href: string;
|
|
30
|
-
readonly children: ReactNode;
|
|
31
|
-
/** An icon after the label (`arrow`) or before it (`phone`). */
|
|
32
|
-
readonly icon?: UiIconName;
|
|
33
|
-
readonly iconPosition?: 'start' | 'end';
|
|
34
|
-
/** Force external handling; by default `http(s)://` links are external. */
|
|
35
|
-
readonly external?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Prefetch by link role (`LINK_PREFETCH_POLICY`): `auto` (the default, Next's prefetch in view) for a main action,
|
|
38
|
-
* `intent` for an in-content card link, `false` for footer, area, nearby, map and finder links.
|
|
39
|
-
*/
|
|
40
|
-
readonly prefetch?: LinkPrefetch;
|
|
41
|
-
}
|
|
42
|
-
/** A link styled as a button. A primary action is at least 44 px tall (structure.css). */
|
|
43
|
-
export declare function ButtonLink({ href, children, icon, iconPosition, external, prefetch, variant, layout, classes }: ButtonLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
export type TextLinkSlot = 'root';
|
|
45
|
-
export type TextLinkSkin = SkinEntry<TextLinkSlot, 'inline' | 'standalone'>;
|
|
46
|
-
export interface TextLinkProps extends TextLinkSkin {
|
|
47
|
-
readonly href: string;
|
|
48
|
-
readonly children: ReactNode;
|
|
49
|
-
readonly external?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Prefetch by link role (`LINK_PREFETCH_POLICY`): `auto` (the default, Next's prefetch in view) for a main action,
|
|
52
|
-
* `intent` for an in-content card link, `false` for footer, area, nearby, map and finder links.
|
|
53
|
-
*/
|
|
54
|
-
readonly prefetch?: LinkPrefetch;
|
|
55
|
-
}
|
|
56
|
-
/** An inline or standalone text link. */
|
|
57
|
-
export declare function TextLink({ href, children, external, prefetch, variant, classes }: TextLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
-
export type PhoneLinkSlot = 'root' | 'icon' | 'label' | 'number';
|
|
59
|
-
export type PhoneLinkSkin = SkinEntry<PhoneLinkSlot, 'text' | 'button'>;
|
|
60
|
-
export interface PhoneLinkProps extends PhoneLinkSkin {
|
|
61
|
-
readonly phone: UiPhone;
|
|
62
|
-
/** Where the link sits, for `phone_link_click`. Required: a section sets its own. */
|
|
63
|
-
readonly placement: PhoneCallPlacement;
|
|
64
|
-
/** Optional words before the number, for example "Call". The accessible name is always the visible text. */
|
|
65
|
-
readonly label?: string;
|
|
66
|
-
/** The phone icon on the left (header and hero). */
|
|
67
|
-
readonly showIcon?: boolean;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* A `tel:` link. Its accessible name is its visible text, which always includes the number (WCAG 2.5.3). Use it for
|
|
71
|
-
* every call link: a literal `tel:` anywhere else fails lint (K1) and C10 checks the href against the evidence file.
|
|
72
|
-
*/
|
|
73
|
-
export declare function PhoneLink({ phone, placement, label, showIcon, variant, classes }: PhoneLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
-
//# sourceMappingURL=links.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/primitives/links.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAC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GAA4G;IAC5G,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC5B;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAgB,EAAE,OAAgB,EAAE,OAAO,EAAE,EAAE,cAAc,2CAgBjH"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Link primitives: `ButtonLink`, `TextLink` and `PhoneLink`. Server components; every link is a real `<a href>`.
|
|
4
|
-
* External links open in a new tab with `rel="noopener noreferrer"`. `PhoneLink` requires a typed placement, which the
|
|
5
|
-
* shared instrumentation reads to send one `phone_link_click` per tap; nothing here emits events itself.
|
|
6
|
-
*/
|
|
7
|
-
import Link from 'next/link';
|
|
8
|
-
import { Icon } from '../icons.js';
|
|
9
|
-
import { linkPrefetchProps } from '../prefetch.js';
|
|
10
|
-
import { slot } from '../skin.js';
|
|
11
|
-
function isExternal(href) {
|
|
12
|
-
return /^https?:\/\//i.test(href);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* The one anchor every ui-kit link renders (internal; not exported from the subpath): `next/link` with the prefetch
|
|
16
|
-
* role for internal links, a plain `<a target="_blank" rel="noopener noreferrer">` for external ones.
|
|
17
|
-
*/
|
|
18
|
-
export function Anchor({ href, external, prefetch, hooks, children, }) {
|
|
19
|
-
if (external ?? isExternal(href)) {
|
|
20
|
-
return (_jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", ...hooks, children: children }));
|
|
21
|
-
}
|
|
22
|
-
return (_jsx(Link, { href: href, ...linkPrefetchProps(prefetch, href), ...hooks, children: children }));
|
|
23
|
-
}
|
|
24
|
-
export const BUTTON_VARIANTS = ['primary', 'secondary', 'quiet'];
|
|
25
|
-
/** A link styled as a button. A primary action is at least 44 px tall (structure.css). */
|
|
26
|
-
export function ButtonLink({ href, children, icon, iconPosition = 'end', external, prefetch, variant = 'primary', layout, classes }) {
|
|
27
|
-
const iconNode = icon ? _jsx("span", { ...slot(classes, 'icon'), children: _jsx(Icon, { name: icon }) }) : null;
|
|
28
|
-
return (_jsxs(Anchor, { href: href, external: external, prefetch: prefetch, hooks: { 'data-bl': 'button', 'data-variant': variant, 'data-size': layout?.size ?? 'regular', className: classes?.root }, children: [iconPosition === 'start' ? iconNode : null, _jsx("span", { ...slot(classes, 'label'), children: children }), iconPosition === 'end' ? iconNode : null] }));
|
|
29
|
-
}
|
|
30
|
-
/** An inline or standalone text link. */
|
|
31
|
-
export function TextLink({ href, children, external, prefetch, variant = 'inline', classes }) {
|
|
32
|
-
return (_jsx(Anchor, { href: href, external: external, prefetch: prefetch, hooks: { 'data-bl': 'text-link', 'data-variant': variant, className: classes?.root }, children: children }));
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* A `tel:` link. Its accessible name is its visible text, which always includes the number (WCAG 2.5.3). Use it for
|
|
36
|
-
* every call link: a literal `tel:` anywhere else fails lint (K1) and C10 checks the href against the evidence file.
|
|
37
|
-
*/
|
|
38
|
-
export function PhoneLink({ phone, placement, label, showIcon = false, variant = 'text', classes }) {
|
|
39
|
-
return (_jsxs("a", { href: phone.telHref, "data-bl": "phone-link", "data-variant": variant, "data-phone-location": placement, className: classes?.root, children: [showIcon ? (_jsx("span", { ...slot(classes, 'icon'), children: _jsx(Icon, { name: "phone" }) })) : null, label ? (_jsxs(_Fragment, { children: [_jsx("span", { ...slot(classes, 'label'), children: label }), ' '] })) : null, _jsx("span", { ...slot(classes, 'number'), children: phone.display })] }));
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=links.js.map
|