@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.
Files changed (313) hide show
  1. package/dist/instrumentation-client.d.ts +1 -1
  2. package/dist/instrumentation-client.js +1 -1
  3. package/dist/instrumentation-client.js.map +1 -1
  4. package/dist/navigation/index.d.ts +2 -3
  5. package/dist/navigation/index.d.ts.map +1 -1
  6. package/dist/navigation/index.js +2 -3
  7. package/dist/navigation/index.js.map +1 -1
  8. package/dist/next-config.d.ts +1 -17
  9. package/dist/next-config.d.ts.map +1 -1
  10. package/dist/next-config.js +2 -33
  11. package/dist/next-config.js.map +1 -1
  12. package/package.json +4 -33
  13. package/dist/ui-kit/brandlab-skin.d.ts +0 -112
  14. package/dist/ui-kit/brandlab-skin.d.ts.map +0 -1
  15. package/dist/ui-kit/brandlab-skin.js +0 -2
  16. package/dist/ui-kit/brandlab-skin.js.map +0 -1
  17. package/dist/ui-kit/form/copy.d.ts +0 -3
  18. package/dist/ui-kit/form/copy.d.ts.map +0 -1
  19. package/dist/ui-kit/form/copy.js +0 -5
  20. package/dist/ui-kit/form/copy.js.map +0 -1
  21. package/dist/ui-kit/form/dialog.d.ts +0 -24
  22. package/dist/ui-kit/form/dialog.d.ts.map +0 -1
  23. package/dist/ui-kit/form/dialog.js +0 -17
  24. package/dist/ui-kit/form/dialog.js.map +0 -1
  25. package/dist/ui-kit/form/field.d.ts +0 -30
  26. package/dist/ui-kit/form/field.d.ts.map +0 -1
  27. package/dist/ui-kit/form/field.js +0 -11
  28. package/dist/ui-kit/form/field.js.map +0 -1
  29. package/dist/ui-kit/form/index.d.ts +0 -7
  30. package/dist/ui-kit/form/index.d.ts.map +0 -1
  31. package/dist/ui-kit/form/index.js +0 -7
  32. package/dist/ui-kit/form/index.js.map +0 -1
  33. package/dist/ui-kit/form/photo-upload.d.ts +0 -40
  34. package/dist/ui-kit/form/photo-upload.d.ts.map +0 -1
  35. package/dist/ui-kit/form/photo-upload.js +0 -19
  36. package/dist/ui-kit/form/photo-upload.js.map +0 -1
  37. package/dist/ui-kit/form/quote-dialog.d.ts +0 -15
  38. package/dist/ui-kit/form/quote-dialog.d.ts.map +0 -1
  39. package/dist/ui-kit/form/quote-dialog.js +0 -68
  40. package/dist/ui-kit/form/quote-dialog.js.map +0 -1
  41. package/dist/ui-kit/form/quote-form.d.ts +0 -172
  42. package/dist/ui-kit/form/quote-form.d.ts.map +0 -1
  43. package/dist/ui-kit/form/quote-form.js +0 -238
  44. package/dist/ui-kit/form/quote-form.js.map +0 -1
  45. package/dist/ui-kit/form/thank-you.d.ts +0 -40
  46. package/dist/ui-kit/form/thank-you.d.ts.map +0 -1
  47. package/dist/ui-kit/form/thank-you.js +0 -36
  48. package/dist/ui-kit/form/thank-you.js.map +0 -1
  49. package/dist/ui-kit/icon-glyphs.d.ts +0 -41
  50. package/dist/ui-kit/icon-glyphs.d.ts.map +0 -1
  51. package/dist/ui-kit/icon-glyphs.js +0 -138
  52. package/dist/ui-kit/icon-glyphs.js.map +0 -1
  53. package/dist/ui-kit/icon-sprite.d.ts +0 -19
  54. package/dist/ui-kit/icon-sprite.d.ts.map +0 -1
  55. package/dist/ui-kit/icon-sprite.js +0 -44
  56. package/dist/ui-kit/icon-sprite.js.map +0 -1
  57. package/dist/ui-kit/icons.d.ts +0 -50
  58. package/dist/ui-kit/icons.d.ts.map +0 -1
  59. package/dist/ui-kit/icons.js +0 -55
  60. package/dist/ui-kit/icons.js.map +0 -1
  61. package/dist/ui-kit/prefetch.d.ts +0 -59
  62. package/dist/ui-kit/prefetch.d.ts.map +0 -1
  63. package/dist/ui-kit/prefetch.js +0 -63
  64. package/dist/ui-kit/prefetch.js.map +0 -1
  65. package/dist/ui-kit/primitives/badge.d.ts +0 -25
  66. package/dist/ui-kit/primitives/badge.d.ts.map +0 -1
  67. package/dist/ui-kit/primitives/badge.js +0 -21
  68. package/dist/ui-kit/primitives/badge.js.map +0 -1
  69. package/dist/ui-kit/primitives/breadcrumbs.d.ts +0 -27
  70. package/dist/ui-kit/primitives/breadcrumbs.d.ts.map +0 -1
  71. package/dist/ui-kit/primitives/breadcrumbs.js +0 -40
  72. package/dist/ui-kit/primitives/breadcrumbs.js.map +0 -1
  73. package/dist/ui-kit/primitives/button.d.ts +0 -32
  74. package/dist/ui-kit/primitives/button.d.ts.map +0 -1
  75. package/dist/ui-kit/primitives/button.js +0 -8
  76. package/dist/ui-kit/primitives/button.js.map +0 -1
  77. package/dist/ui-kit/primitives/card.d.ts +0 -40
  78. package/dist/ui-kit/primitives/card.d.ts.map +0 -1
  79. package/dist/ui-kit/primitives/card.js +0 -8
  80. package/dist/ui-kit/primitives/card.js.map +0 -1
  81. package/dist/ui-kit/primitives/index.d.ts +0 -16
  82. package/dist/ui-kit/primitives/index.d.ts.map +0 -1
  83. package/dist/ui-kit/primitives/index.js +0 -16
  84. package/dist/ui-kit/primitives/index.js.map +0 -1
  85. package/dist/ui-kit/primitives/layout.d.ts +0 -85
  86. package/dist/ui-kit/primitives/layout.d.ts.map +0 -1
  87. package/dist/ui-kit/primitives/layout.js +0 -52
  88. package/dist/ui-kit/primitives/layout.js.map +0 -1
  89. package/dist/ui-kit/primitives/links.d.ts +0 -74
  90. package/dist/ui-kit/primitives/links.d.ts.map +0 -1
  91. package/dist/ui-kit/primitives/links.js +0 -41
  92. package/dist/ui-kit/primitives/links.js.map +0 -1
  93. package/dist/ui-kit/primitives/lists.d.ts +0 -51
  94. package/dist/ui-kit/primitives/lists.d.ts.map +0 -1
  95. package/dist/ui-kit/primitives/lists.js +0 -34
  96. package/dist/ui-kit/primitives/lists.js.map +0 -1
  97. package/dist/ui-kit/primitives/media-frame.d.ts +0 -33
  98. package/dist/ui-kit/primitives/media-frame.d.ts.map +0 -1
  99. package/dist/ui-kit/primitives/media-frame.js +0 -61
  100. package/dist/ui-kit/primitives/media-frame.js.map +0 -1
  101. package/dist/ui-kit/primitives/media.d.ts +0 -40
  102. package/dist/ui-kit/primitives/media.d.ts.map +0 -1
  103. package/dist/ui-kit/primitives/media.js +0 -9
  104. package/dist/ui-kit/primitives/media.js.map +0 -1
  105. package/dist/ui-kit/primitives/quote-button.d.ts +0 -46
  106. package/dist/ui-kit/primitives/quote-button.d.ts.map +0 -1
  107. package/dist/ui-kit/primitives/quote-button.js +0 -38
  108. package/dist/ui-kit/primitives/quote-button.js.map +0 -1
  109. package/dist/ui-kit/primitives/stat.d.ts +0 -25
  110. package/dist/ui-kit/primitives/stat.d.ts.map +0 -1
  111. package/dist/ui-kit/primitives/stat.js +0 -7
  112. package/dist/ui-kit/primitives/stat.js.map +0 -1
  113. package/dist/ui-kit/repeated-slots.d.ts +0 -153
  114. package/dist/ui-kit/repeated-slots.d.ts.map +0 -1
  115. package/dist/ui-kit/repeated-slots.js +0 -100
  116. package/dist/ui-kit/repeated-slots.js.map +0 -1
  117. package/dist/ui-kit/sections/accordion.d.ts +0 -28
  118. package/dist/ui-kit/sections/accordion.d.ts.map +0 -1
  119. package/dist/ui-kit/sections/accordion.js +0 -14
  120. package/dist/ui-kit/sections/accordion.js.map +0 -1
  121. package/dist/ui-kit/sections/area-map.d.ts +0 -64
  122. package/dist/ui-kit/sections/area-map.d.ts.map +0 -1
  123. package/dist/ui-kit/sections/area-map.js +0 -146
  124. package/dist/ui-kit/sections/area-map.js.map +0 -1
  125. package/dist/ui-kit/sections/before-after.d.ts +0 -59
  126. package/dist/ui-kit/sections/before-after.d.ts.map +0 -1
  127. package/dist/ui-kit/sections/before-after.js +0 -42
  128. package/dist/ui-kit/sections/before-after.js.map +0 -1
  129. package/dist/ui-kit/sections/contact-block.d.ts +0 -77
  130. package/dist/ui-kit/sections/contact-block.d.ts.map +0 -1
  131. package/dist/ui-kit/sections/contact-block.js +0 -23
  132. package/dist/ui-kit/sections/contact-block.js.map +0 -1
  133. package/dist/ui-kit/sections/council-rules.d.ts +0 -64
  134. package/dist/ui-kit/sections/council-rules.d.ts.map +0 -1
  135. package/dist/ui-kit/sections/council-rules.js +0 -46
  136. package/dist/ui-kit/sections/council-rules.js.map +0 -1
  137. package/dist/ui-kit/sections/coverage.d.ts +0 -53
  138. package/dist/ui-kit/sections/coverage.d.ts.map +0 -1
  139. package/dist/ui-kit/sections/coverage.js +0 -57
  140. package/dist/ui-kit/sections/coverage.js.map +0 -1
  141. package/dist/ui-kit/sections/cta-band.d.ts +0 -67
  142. package/dist/ui-kit/sections/cta-band.d.ts.map +0 -1
  143. package/dist/ui-kit/sections/cta-band.js +0 -11
  144. package/dist/ui-kit/sections/cta-band.js.map +0 -1
  145. package/dist/ui-kit/sections/emergency-band.d.ts +0 -60
  146. package/dist/ui-kit/sections/emergency-band.d.ts.map +0 -1
  147. package/dist/ui-kit/sections/emergency-band.js +0 -43
  148. package/dist/ui-kit/sections/emergency-band.js.map +0 -1
  149. package/dist/ui-kit/sections/faqs.d.ts +0 -46
  150. package/dist/ui-kit/sections/faqs.d.ts.map +0 -1
  151. package/dist/ui-kit/sections/faqs.js +0 -39
  152. package/dist/ui-kit/sections/faqs.js.map +0 -1
  153. package/dist/ui-kit/sections/gallery.d.ts +0 -60
  154. package/dist/ui-kit/sections/gallery.d.ts.map +0 -1
  155. package/dist/ui-kit/sections/gallery.js +0 -39
  156. package/dist/ui-kit/sections/gallery.js.map +0 -1
  157. package/dist/ui-kit/sections/hero.d.ts +0 -168
  158. package/dist/ui-kit/sections/hero.d.ts.map +0 -1
  159. package/dist/ui-kit/sections/hero.js +0 -147
  160. package/dist/ui-kit/sections/hero.js.map +0 -1
  161. package/dist/ui-kit/sections/index.d.ts +0 -29
  162. package/dist/ui-kit/sections/index.d.ts.map +0 -1
  163. package/dist/ui-kit/sections/index.js +0 -29
  164. package/dist/ui-kit/sections/index.js.map +0 -1
  165. package/dist/ui-kit/sections/licences.d.ts +0 -95
  166. package/dist/ui-kit/sections/licences.d.ts.map +0 -1
  167. package/dist/ui-kit/sections/licences.js +0 -72
  168. package/dist/ui-kit/sections/licences.js.map +0 -1
  169. package/dist/ui-kit/sections/local-facts.d.ts +0 -107
  170. package/dist/ui-kit/sections/local-facts.d.ts.map +0 -1
  171. package/dist/ui-kit/sections/local-facts.js +0 -44
  172. package/dist/ui-kit/sections/local-facts.js.map +0 -1
  173. package/dist/ui-kit/sections/nearby-areas.d.ts +0 -50
  174. package/dist/ui-kit/sections/nearby-areas.d.ts.map +0 -1
  175. package/dist/ui-kit/sections/nearby-areas.js +0 -49
  176. package/dist/ui-kit/sections/nearby-areas.js.map +0 -1
  177. package/dist/ui-kit/sections/nearby-jobs.d.ts +0 -84
  178. package/dist/ui-kit/sections/nearby-jobs.d.ts.map +0 -1
  179. package/dist/ui-kit/sections/nearby-jobs.js +0 -72
  180. package/dist/ui-kit/sections/nearby-jobs.js.map +0 -1
  181. package/dist/ui-kit/sections/page-header.d.ts +0 -29
  182. package/dist/ui-kit/sections/page-header.d.ts.map +0 -1
  183. package/dist/ui-kit/sections/page-header.js +0 -9
  184. package/dist/ui-kit/sections/page-header.js.map +0 -1
  185. package/dist/ui-kit/sections/price-guide.d.ts +0 -59
  186. package/dist/ui-kit/sections/price-guide.d.ts.map +0 -1
  187. package/dist/ui-kit/sections/price-guide.js +0 -28
  188. package/dist/ui-kit/sections/price-guide.js.map +0 -1
  189. package/dist/ui-kit/sections/price-table.d.ts +0 -42
  190. package/dist/ui-kit/sections/price-table.d.ts.map +0 -1
  191. package/dist/ui-kit/sections/price-table.js +0 -29
  192. package/dist/ui-kit/sections/price-table.js.map +0 -1
  193. package/dist/ui-kit/sections/projects.d.ts +0 -79
  194. package/dist/ui-kit/sections/projects.d.ts.map +0 -1
  195. package/dist/ui-kit/sections/projects.js +0 -69
  196. package/dist/ui-kit/sections/projects.js.map +0 -1
  197. package/dist/ui-kit/sections/proof-strip.d.ts +0 -68
  198. package/dist/ui-kit/sections/proof-strip.d.ts.map +0 -1
  199. package/dist/ui-kit/sections/proof-strip.js +0 -27
  200. package/dist/ui-kit/sections/proof-strip.js.map +0 -1
  201. package/dist/ui-kit/sections/quote-checklist.d.ts +0 -43
  202. package/dist/ui-kit/sections/quote-checklist.d.ts.map +0 -1
  203. package/dist/ui-kit/sections/quote-checklist.js +0 -19
  204. package/dist/ui-kit/sections/quote-checklist.js.map +0 -1
  205. package/dist/ui-kit/sections/rating-chip.d.ts +0 -35
  206. package/dist/ui-kit/sections/rating-chip.d.ts.map +0 -1
  207. package/dist/ui-kit/sections/rating-chip.js +0 -21
  208. package/dist/ui-kit/sections/rating-chip.js.map +0 -1
  209. package/dist/ui-kit/sections/related-services.d.ts +0 -41
  210. package/dist/ui-kit/sections/related-services.d.ts.map +0 -1
  211. package/dist/ui-kit/sections/related-services.js +0 -52
  212. package/dist/ui-kit/sections/related-services.js.map +0 -1
  213. package/dist/ui-kit/sections/reviews-band.d.ts +0 -124
  214. package/dist/ui-kit/sections/reviews-band.d.ts.map +0 -1
  215. package/dist/ui-kit/sections/reviews-band.js +0 -115
  216. package/dist/ui-kit/sections/reviews-band.js.map +0 -1
  217. package/dist/ui-kit/sections/section-sequence.d.ts +0 -41
  218. package/dist/ui-kit/sections/section-sequence.d.ts.map +0 -1
  219. package/dist/ui-kit/sections/section-sequence.js +0 -36
  220. package/dist/ui-kit/sections/section-sequence.js.map +0 -1
  221. package/dist/ui-kit/sections/services-grid.d.ts +0 -82
  222. package/dist/ui-kit/sections/services-grid.d.ts.map +0 -1
  223. package/dist/ui-kit/sections/services-grid.js +0 -90
  224. package/dist/ui-kit/sections/services-grid.js.map +0 -1
  225. package/dist/ui-kit/sections/signature-section.d.ts +0 -42
  226. package/dist/ui-kit/sections/signature-section.d.ts.map +0 -1
  227. package/dist/ui-kit/sections/signature-section.js +0 -14
  228. package/dist/ui-kit/sections/signature-section.js.map +0 -1
  229. package/dist/ui-kit/sections/site-footer-columns.d.ts +0 -12
  230. package/dist/ui-kit/sections/site-footer-columns.d.ts.map +0 -1
  231. package/dist/ui-kit/sections/site-footer-columns.js +0 -63
  232. package/dist/ui-kit/sections/site-footer-columns.js.map +0 -1
  233. package/dist/ui-kit/sections/site-footer.d.ts +0 -66
  234. package/dist/ui-kit/sections/site-footer.d.ts.map +0 -1
  235. package/dist/ui-kit/sections/site-footer.js +0 -49
  236. package/dist/ui-kit/sections/site-footer.js.map +0 -1
  237. package/dist/ui-kit/sections/work-photos.d.ts +0 -15
  238. package/dist/ui-kit/sections/work-photos.d.ts.map +0 -1
  239. package/dist/ui-kit/sections/work-photos.js +0 -24
  240. package/dist/ui-kit/sections/work-photos.js.map +0 -1
  241. package/dist/ui-kit/shell/back-to-top-client.d.ts +0 -9
  242. package/dist/ui-kit/shell/back-to-top-client.d.ts.map +0 -1
  243. package/dist/ui-kit/shell/back-to-top-client.js +0 -8
  244. package/dist/ui-kit/shell/back-to-top-client.js.map +0 -1
  245. package/dist/ui-kit/shell/back-to-top.d.ts +0 -13
  246. package/dist/ui-kit/shell/back-to-top.d.ts.map +0 -1
  247. package/dist/ui-kit/shell/back-to-top.js +0 -14
  248. package/dist/ui-kit/shell/back-to-top.js.map +0 -1
  249. package/dist/ui-kit/shell/call-bar-client.d.ts +0 -8
  250. package/dist/ui-kit/shell/call-bar-client.d.ts.map +0 -1
  251. package/dist/ui-kit/shell/call-bar-client.js +0 -13
  252. package/dist/ui-kit/shell/call-bar-client.js.map +0 -1
  253. package/dist/ui-kit/shell/current-link.d.ts +0 -45
  254. package/dist/ui-kit/shell/current-link.d.ts.map +0 -1
  255. package/dist/ui-kit/shell/current-link.js +0 -54
  256. package/dist/ui-kit/shell/current-link.js.map +0 -1
  257. package/dist/ui-kit/shell/drawer-client.d.ts +0 -22
  258. package/dist/ui-kit/shell/drawer-client.d.ts.map +0 -1
  259. package/dist/ui-kit/shell/drawer-client.js +0 -70
  260. package/dist/ui-kit/shell/drawer-client.js.map +0 -1
  261. package/dist/ui-kit/shell/header-client.d.ts +0 -44
  262. package/dist/ui-kit/shell/header-client.d.ts.map +0 -1
  263. package/dist/ui-kit/shell/header-client.js +0 -59
  264. package/dist/ui-kit/shell/header-client.js.map +0 -1
  265. package/dist/ui-kit/shell/index.d.ts +0 -7
  266. package/dist/ui-kit/shell/index.d.ts.map +0 -1
  267. package/dist/ui-kit/shell/index.js +0 -7
  268. package/dist/ui-kit/shell/index.js.map +0 -1
  269. package/dist/ui-kit/shell/intent-prefetch.d.ts +0 -4
  270. package/dist/ui-kit/shell/intent-prefetch.d.ts.map +0 -1
  271. package/dist/ui-kit/shell/intent-prefetch.js +0 -62
  272. package/dist/ui-kit/shell/intent-prefetch.js.map +0 -1
  273. package/dist/ui-kit/shell/mobile-call-bar.d.ts +0 -25
  274. package/dist/ui-kit/shell/mobile-call-bar.d.ts.map +0 -1
  275. package/dist/ui-kit/shell/mobile-call-bar.js +0 -21
  276. package/dist/ui-kit/shell/mobile-call-bar.js.map +0 -1
  277. package/dist/ui-kit/shell/mobile-drawer.d.ts +0 -41
  278. package/dist/ui-kit/shell/mobile-drawer.d.ts.map +0 -1
  279. package/dist/ui-kit/shell/mobile-drawer.js +0 -41
  280. package/dist/ui-kit/shell/mobile-drawer.js.map +0 -1
  281. package/dist/ui-kit/shell/shell-context.d.ts +0 -3
  282. package/dist/ui-kit/shell/shell-context.d.ts.map +0 -1
  283. package/dist/ui-kit/shell/shell-context.js +0 -5
  284. package/dist/ui-kit/shell/shell-context.js.map +0 -1
  285. package/dist/ui-kit/shell/shell-quote.d.ts +0 -10
  286. package/dist/ui-kit/shell/shell-quote.d.ts.map +0 -1
  287. package/dist/ui-kit/shell/shell-quote.js +0 -13
  288. package/dist/ui-kit/shell/shell-quote.js.map +0 -1
  289. package/dist/ui-kit/shell/site-header.d.ts +0 -55
  290. package/dist/ui-kit/shell/site-header.d.ts.map +0 -1
  291. package/dist/ui-kit/shell/site-header.js +0 -35
  292. package/dist/ui-kit/shell/site-header.js.map +0 -1
  293. package/dist/ui-kit/shell/social-links.d.ts +0 -7
  294. package/dist/ui-kit/shell/social-links.d.ts.map +0 -1
  295. package/dist/ui-kit/shell/social-links.js +0 -12
  296. package/dist/ui-kit/shell/social-links.js.map +0 -1
  297. package/dist/ui-kit/shell/utility-bar.d.ts +0 -33
  298. package/dist/ui-kit/shell/utility-bar.d.ts.map +0 -1
  299. package/dist/ui-kit/shell/utility-bar.js +0 -15
  300. package/dist/ui-kit/shell/utility-bar.js.map +0 -1
  301. package/dist/ui-kit/skin-index.d.ts +0 -4
  302. package/dist/ui-kit/skin-index.d.ts.map +0 -1
  303. package/dist/ui-kit/skin-index.js +0 -3
  304. package/dist/ui-kit/skin-index.js.map +0 -1
  305. package/dist/ui-kit/skin.d.ts +0 -65
  306. package/dist/ui-kit/skin.d.ts.map +0 -1
  307. package/dist/ui-kit/skin.js +0 -60
  308. package/dist/ui-kit/skin.js.map +0 -1
  309. package/dist/ui-kit/structure.css +0 -2546
  310. package/dist/ui-kit/types.d.ts +0 -27
  311. package/dist/ui-kit/types.d.ts.map +0 -1
  312. package/dist/ui-kit/types.js +0 -6
  313. package/dist/ui-kit/types.js.map +0 -1
@@ -1,115 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /**
3
- * S7 `ReviewsBand` (`reviews`): prominent, honest proof from the Business Profile feed. Server component, no client
4
- * JS. Google's own average and total sit beside the selected reviews with a link to the profile; the text is verbatim
5
- * and always in the HTML (a long review folds behind a native "Read more" disclosure); the band says how the reviews
6
- * were chosen ("Selected five-star Google reviews" or "Recent Google reviews"). No review or rating schema: a business
7
- * that controls its own reviews isn't eligible for review stars.
8
- *
9
- * Data comes only from `prepareBusinessProfileReviews` (site-core), which applies the policy, mention ordering, the
10
- * 3.7.0 exclude guard and the limit. No prepared reviews, or none and no rating, renders nothing at all (no heading).
11
- * With no written reviews but a rating, every variant renders as `summary`: the heading and the rating chip only.
12
- * Never place it on the contact page or inside another section.
13
- *
14
- * Sites that arrange their own layout use the parts (`ReviewsBand.Root`, `.Heading`, `.Summary`, `.List`, `.Item`):
15
- * the root keeps the section semantics, the empty rule and the disclosure line; the parts keep the data and markup.
16
- */
17
- import { Children } from 'react';
18
- import { businessProfileReviewMentions, } from '@brandlab-digital/site-core/google-business-reviews';
19
- import { SECTION_READY } from '@brandlab-digital/site-core/section-order';
20
- import { RatingStars, Section, SectionHeading } from '../primitives/layout.js';
21
- import { repeatedSlot, slot } from '../skin.js';
22
- import { hasGoogleRating, RatingChip } from './rating-chip.js';
23
- export const REVIEWS_BAND_VARIANTS = ['band', 'feature', 'cards', 'wall', 'summary'];
24
- export const REVIEWS_BAND_HEADING_ID = 'bl-reviews-heading';
25
- const DEFAULT_EXCERPT = 320;
26
- /**
27
- * The variant a band renders, or null when it has nothing true to show. With no written reviews every variant is
28
- * `summary`, and `summary` needs Google's rating: a heading over nothing never renders.
29
- */
30
- function shownVariant(reviews, variant) {
31
- if (!reviews)
32
- return null;
33
- const shown = reviews.reviews.length === 0 ? 'summary' : variant;
34
- return shown === 'summary' && !hasGoogleRating(reviews) ? null : shown;
35
- }
36
- const MONTH = new Intl.DateTimeFormat('en-AU', { month: 'long', year: 'numeric', timeZone: 'Australia/Sydney' });
37
- const DAY = new Intl.DateTimeFormat('en-CA', { year: 'numeric', month: '2-digit', day: '2-digit', timeZone: 'Australia/Sydney' });
38
- /** The skip reason a band with nothing to show records in the section manifest: the feed has no reviews or rating. */
39
- export const REVIEWS_BAND_SKIP_REASON = 'no-feed-reviews';
40
- /**
41
- * The guard for `SectionSequence` (3.15.0), from the same prepared reviews the band renders: ready when the band
42
- * renders (written reviews, or Google's rating alone as the summary fallback); otherwise `no-feed-reviews`, for a
43
- * missing feed, an empty one, or the `summary` variant without a rating.
44
- */
45
- export function reviewsBandReady(reviews, { variant = 'band' } = {}) {
46
- return shownVariant(reviews, variant) ? SECTION_READY : { render: false, reason: REVIEWS_BAND_SKIP_REASON };
47
- }
48
- /**
49
- * A long review split at a sentence end (or else a space) near `limit`, so the first part reads on its own. The two
50
- * parts together are the review word for word. Short reviews, and reviews only a little over the limit, don't fold.
51
- */
52
- export function splitReviewText(text, limit) {
53
- if (limit === false || text.length <= limit * 1.25)
54
- return null;
55
- const window = text.slice(0, limit);
56
- const sentence = Math.max(...['. ', '! ', '? ', '\n'].map((mark) => window.lastIndexOf(mark)));
57
- const space = window.lastIndexOf(' ');
58
- const cut = sentence >= limit * 0.4 ? sentence + 1 : space > 0 ? space : limit;
59
- return [text.slice(0, cut).trimEnd(), text.slice(cut).trimStart()];
60
- }
61
- /** The `feature` variant leads with the longest review naming a mention word, or else the longest review. */
62
- function featureOrder(reviews) {
63
- const named = reviews.mention.length > 0 ? reviews.reviews.filter((review) => businessProfileReviewMentions(review, reviews.mention)) : [];
64
- const pool = named.length > 0 ? named : reviews.reviews;
65
- const lead = pool.reduce((longest, review) => (!longest || review.text.length > longest.text.length ? review : longest), undefined);
66
- return lead ? [lead, ...reviews.reviews.filter((review) => review !== lead)] : [];
67
- }
68
- /**
69
- * The section: `data-bl-section="reviews"` with `data-bl-source="feed"` (the ready gate's mark for feed numbers),
70
- * the empty rule, and the locked disclosure line after the children.
71
- */
72
- export function ReviewsBandRoot({ reviews, headingId = REVIEWS_BAND_HEADING_ID, tone, decoration, variant = 'band', layout, classes, children, }) {
73
- const shown = shownVariant(reviews, variant);
74
- if (!shown || !reviews)
75
- return null;
76
- return (_jsxs(Section, { id: "reviews", labelledBy: headingId, tone: tone, variant: shown, classes: { root: classes?.root, inner: classes?.inner }, decoration: decoration, hooks: { 'data-bl-source': 'feed', 'data-columns': String(layout?.columns ?? 3), 'data-align': layout?.align ?? 'start' }, children: [children, shown === 'summary' ? null : (_jsxs("p", { ...slot(classes, 'disclosure'), children: [reviews.policy === 'five-star' ? 'Selected five-star Google reviews.' : 'Recent Google reviews.', ' ', _jsx("a", { ...slot(classes, 'profileLink'), href: reviews.profileUrl, target: "_blank", rel: "noopener noreferrer", children: "Read all reviews on Google" })] }))] }));
77
- }
78
- /** The heading block: an optional eyebrow, the H2 and an optional intro. */
79
- export function ReviewsBandHeading({ id = REVIEWS_BAND_HEADING_ID, children, eyebrow, intro, layout, classes }) {
80
- return (_jsx(SectionHeading, { id: id, title: children, eyebrow: eyebrow, lead: intro, layout: { align: layout?.align ?? 'start' }, classes: { head: classes?.head, eyebrow: classes?.eyebrow, heading: classes?.heading, lead: classes?.lead } }));
81
- }
82
- /** Google's own average and total with the profile link; nothing when the feed has no rating. */
83
- export function ReviewsBandSummary({ reviews, classes }) {
84
- if (!hasGoogleRating(reviews))
85
- return null;
86
- return (_jsx("div", { ...slot(classes, 'summary'), children: _jsx(RatingChip, { reviews: reviews, classes: { rating: classes?.rating, source: classes?.source } }) }));
87
- }
88
- /** The review list; nothing without items. */
89
- export function ReviewsBandList({ classes, children }) {
90
- if (Children.toArray(children).length === 0)
91
- return null;
92
- return _jsx("ul", { ...slot(classes, 'list'), children: children });
93
- }
94
- /** One review, word for word: its stars, the quote and the reviewer with the month. */
95
- export function ReviewsBandItem({ review, lead = false, layout, classes }) {
96
- const parts = splitReviewText(review.text, layout?.excerpt ?? DEFAULT_EXCERPT);
97
- const date = new Date(review.createTime);
98
- return (_jsx("li", { ...repeatedSlot('item'), "data-lead": lead ? 'true' : undefined, children: _jsxs("figure", { children: [_jsx("span", { ...repeatedSlot('stars'), children: _jsx(RatingStars, { rating: review.rating, label: `Rated ${review.rating} out of 5` }) }), _jsx("blockquote", { ...repeatedSlot('quote'), children: parts ? (_jsxs(_Fragment, { children: [_jsx("p", { children: parts[0] }), _jsxs("details", { ...repeatedSlot('more'), children: [_jsx("summary", { children: "Read more" }), _jsx("p", { children: parts[1] })] })] })) : (_jsx("p", { children: review.text })) }), _jsxs("figcaption", { ...repeatedSlot('author'), children: [layout?.avatars && review.authorPhotoUrl ? (_jsx("img", { ...repeatedSlot('avatar'), src: review.authorPhotoUrl, alt: "", width: 48, height: 48, loading: "lazy", decoding: "async", referrerPolicy: "no-referrer" })) : null, _jsx("span", { ...repeatedSlot('name'), children: review.authorName }), ' ', _jsx("time", { ...repeatedSlot('date'), dateTime: DAY.format(date), children: MONTH.format(date) })] })] }) }));
99
- }
100
- function ReviewsBandSection({ reviews, heading, eyebrow, intro, headingId = REVIEWS_BAND_HEADING_ID, tone, decoration, variant = 'band', layout, classes }) {
101
- const shown = shownVariant(reviews, variant);
102
- if (!shown || !reviews)
103
- return null;
104
- const items = shown === 'summary' ? [] : shown === 'feature' ? featureOrder(reviews) : reviews.reviews;
105
- return (_jsxs(ReviewsBandRoot, { reviews: reviews, headingId: headingId, tone: tone, decoration: decoration, variant: shown, layout: layout, classes: classes, children: [_jsxs("div", { ...slot(classes, 'top'), children: [_jsx(ReviewsBandHeading, { id: headingId, eyebrow: eyebrow, intro: intro, layout: layout, classes: classes, children: heading }), _jsx(ReviewsBandSummary, { reviews: reviews, classes: classes })] }), _jsx(ReviewsBandList, { classes: classes, children: items.map((review, index) => (_jsx(ReviewsBandItem, { review: review, lead: shown === 'feature' && index === 0, layout: layout, classes: classes }, review.id))) })] }));
106
- }
107
- /** The reviews band, with its parts for sites that arrange their own layout. */
108
- export const ReviewsBand = Object.assign(ReviewsBandSection, {
109
- Root: ReviewsBandRoot,
110
- Heading: ReviewsBandHeading,
111
- Summary: ReviewsBandSummary,
112
- List: ReviewsBandList,
113
- Item: ReviewsBandItem,
114
- });
115
- //# sourceMappingURL=reviews-band.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reviews-band.js","sourceRoot":"","sources":["../../../src/ui-kit/sections/reviews-band.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAChD,OAAO,EACL,6BAA6B,GAG9B,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAiC,MAAM,2CAA2C,CAAA;AACxG,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAoB,MAAM,yBAAyB,CAAA;AAEhG,OAAO,EAAE,YAAY,EAAE,IAAI,EAAoC,MAAM,YAAY,CAAA;AACjF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,C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AE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,aAC3I,kBAAS,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,aAC3B,KAAC,kBAAkB,IAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,YAChG,OAAO,GACW,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAI,IACtD,EACN,KAAC,eAAe,IAAC,OAAO,EAAE,OAAO,YAC9B,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,eAAe,IAAiB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,IAArG,MAAM,CAAC,EAAE,CAAgG,CAChI,CAAC,GACc,IACF,CACnB,CAAA;AACH,CAAC;AAED,gFAAgF;AAChF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;IAC3D,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,kBAAkB;IAC3B,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,eAAe;CACtB,CAAC,CAAA","sourcesContent":["/**\n * S7 `ReviewsBand` (`reviews`): prominent, honest proof from the Business Profile feed. Server component, no client\n * JS. Google's own average and total sit beside the selected reviews with a link to the profile; the text is verbatim\n * and always in the HTML (a long review folds behind a native \"Read more\" disclosure); the band says how the reviews\n * were chosen (\"Selected five-star Google reviews\" or \"Recent Google reviews\"). No review or rating schema: a business\n * that controls its own reviews isn't eligible for review stars.\n *\n * Data comes only from `prepareBusinessProfileReviews` (site-core), which applies the policy, mention ordering, the\n * 3.7.0 exclude guard and the limit. No prepared reviews, or none and no rating, renders nothing at all (no heading).\n * With no written reviews but a rating, every variant renders as `summary`: the heading and the rating chip only.\n * Never place it on the contact page or inside another section.\n *\n * Sites that arrange their own layout use the parts (`ReviewsBand.Root`, `.Heading`, `.Summary`, `.List`, `.Item`):\n * the root keeps the section semantics, the empty rule and the disclosure line; the parts keep the data and markup.\n */\nimport { Children, type ReactNode } from 'react'\nimport {\n businessProfileReviewMentions,\n type BusinessProfileReview,\n type PreparedBusinessProfileReviews,\n} from '@brandlab-digital/site-core/google-business-reviews'\nimport { SECTION_READY, type BrandlabSectionReadiness } from '@brandlab-digital/site-core/section-order'\nimport { RatingStars, Section, SectionHeading, type SectionTone } from '../primitives/layout.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, slot, type SkinEntry, type SlotClasses } from '../skin.js'\nimport { hasGoogleRating, RatingChip } from './rating-chip.js'\n\nexport const REVIEWS_BAND_VARIANTS = ['band', 'feature', 'cards', 'wall', 'summary'] as const\nexport type ReviewsBandVariant = (typeof REVIEWS_BAND_VARIANTS)[number]\n\nexport type ReviewsBandSlot =\n | 'root'\n | 'inner'\n | 'top'\n | 'head'\n | 'eyebrow'\n | 'heading'\n | 'lead'\n | 'summary'\n | 'rating'\n | 'source'\n | 'list'\n | 'item'\n | 'stars'\n | 'quote'\n | 'more'\n | 'author'\n | 'avatar'\n | 'name'\n | 'date'\n | 'disclosure'\n | 'profileLink'\n\nexport interface ReviewsBandLayout {\n readonly columns?: 1 | 2 | 3\n readonly align?: 'start' | 'center'\n /** Reviewer photos beside the names (Google's own small photos, decorative). */\n readonly avatars?: boolean\n /** Characters shown before a long review folds behind \"Read more\" (default 320); `false` never folds. */\n readonly excerpt?: number | false\n}\n\n/** Rendered once per review: styled from the skin stylesheet, never by class (3.14.0). */\nexport type ReviewsBandRepeatedSlot = RepeatedSlotOf<'reviewsBand'>\nexport type ReviewsBandSkin = SkinEntry<ReviewsBandSlot, ReviewsBandVariant, ReviewsBandLayout, ReviewsBandRepeatedSlot>\n\ntype Classes = SlotClasses<Exclude<ReviewsBandSlot, ReviewsBandRepeatedSlot>> | undefined\n\nexport const REVIEWS_BAND_HEADING_ID = 'bl-reviews-heading'\nconst DEFAULT_EXCERPT = 320\n\n/**\n * The variant a band renders, or null when it has nothing true to show. With no written reviews every variant is\n * `summary`, and `summary` needs Google's rating: a heading over nothing never renders.\n */\nfunction shownVariant(reviews: PreparedBusinessProfileReviews | null | undefined, variant: ReviewsBandVariant): ReviewsBandVariant | null {\n if (!reviews) return null\n const shown = reviews.reviews.length === 0 ? 'summary' : variant\n return shown === 'summary' && !hasGoogleRating(reviews) ? null : shown\n}\n\nconst MONTH = new Intl.DateTimeFormat('en-AU', { month: 'long', year: 'numeric', timeZone: 'Australia/Sydney' })\nconst DAY = new Intl.DateTimeFormat('en-CA', { year: 'numeric', month: '2-digit', day: '2-digit', timeZone: 'Australia/Sydney' })\n\n/** The skip reason a band with nothing to show records in the section manifest: the feed has no reviews or rating. */\nexport const REVIEWS_BAND_SKIP_REASON = 'no-feed-reviews'\n\n/**\n * The guard for `SectionSequence` (3.15.0), from the same prepared reviews the band renders: ready when the band\n * renders (written reviews, or Google's rating alone as the summary fallback); otherwise `no-feed-reviews`, for a\n * missing feed, an empty one, or the `summary` variant without a rating.\n */\nexport function reviewsBandReady(\n reviews: PreparedBusinessProfileReviews | null | undefined,\n { variant = 'band' }: { readonly variant?: ReviewsBandVariant } = {},\n): BrandlabSectionReadiness {\n return shownVariant(reviews, variant) ? SECTION_READY : { render: false, reason: REVIEWS_BAND_SKIP_REASON }\n}\n\n/**\n * A long review split at a sentence end (or else a space) near `limit`, so the first part reads on its own. The two\n * parts together are the review word for word. Short reviews, and reviews only a little over the limit, don't fold.\n */\nexport function splitReviewText(text: string, limit: number | false): readonly [string, string] | null {\n if (limit === false || text.length <= limit * 1.25) return null\n const window = text.slice(0, limit)\n const sentence = Math.max(...['. ', '! ', '? ', '\\n'].map((mark) => window.lastIndexOf(mark)))\n const space = window.lastIndexOf(' ')\n const cut = sentence >= limit * 0.4 ? sentence + 1 : space > 0 ? space : limit\n return [text.slice(0, cut).trimEnd(), text.slice(cut).trimStart()]\n}\n\n/** The `feature` variant leads with the longest review naming a mention word, or else the longest review. */\nfunction featureOrder(reviews: PreparedBusinessProfileReviews): BusinessProfileReview[] {\n const named = reviews.mention.length > 0 ? reviews.reviews.filter((review) => businessProfileReviewMentions(review, reviews.mention)) : []\n const pool = named.length > 0 ? named : reviews.reviews\n const lead = pool.reduce<BusinessProfileReview | undefined>((longest, review) => (!longest || review.text.length > longest.text.length ? review : longest), undefined)\n return lead ? [lead, ...reviews.reviews.filter((review) => review !== lead)] : []\n}\n\nexport interface ReviewsBandRootProps extends ReviewsBandSkin {\n readonly reviews: PreparedBusinessProfileReviews | null | undefined\n /** The id of the band's H2 (default `bl-reviews-heading`). */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n /** Signature art, rendered `aria-hidden`. */\n readonly decoration?: ReactNode\n readonly children: ReactNode\n}\n\n/**\n * The section: `data-bl-section=\"reviews\"` with `data-bl-source=\"feed\"` (the ready gate's mark for feed numbers),\n * the empty rule, and the locked disclosure line after the children.\n */\nexport function ReviewsBandRoot({\n reviews,\n headingId = REVIEWS_BAND_HEADING_ID,\n tone,\n decoration,\n variant = 'band',\n layout,\n classes,\n children,\n}: ReviewsBandRootProps) {\n const shown = shownVariant(reviews, variant)\n if (!shown || !reviews) return null\n return (\n <Section\n id=\"reviews\"\n labelledBy={headingId}\n tone={tone}\n variant={shown}\n classes={{ root: classes?.root, inner: classes?.inner }}\n decoration={decoration}\n hooks={{ 'data-bl-source': 'feed', 'data-columns': String(layout?.columns ?? 3), 'data-align': layout?.align ?? 'start' }}\n >\n {children}\n {shown === 'summary' ? null : (\n <p {...slot(classes, 'disclosure')}>\n {reviews.policy === 'five-star' ? 'Selected five-star Google reviews.' : 'Recent Google reviews.'}{' '}\n <a {...slot(classes, 'profileLink')} href={reviews.profileUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n Read all reviews on Google\n </a>\n </p>\n )}\n </Section>\n )\n}\n\nexport interface ReviewsBandHeadingProps {\n /** The H2's id; the same `headingId` the root has (default `bl-reviews-heading`). */\n readonly id?: string\n /** The H2 text the site owns. */\n readonly children: string\n readonly eyebrow?: string\n readonly intro?: string\n readonly layout?: Pick<ReviewsBandLayout, 'align'>\n readonly classes?: Classes\n}\n\n/** The heading block: an optional eyebrow, the H2 and an optional intro. */\nexport function ReviewsBandHeading({ id = REVIEWS_BAND_HEADING_ID, children, eyebrow, intro, layout, classes }: ReviewsBandHeadingProps) {\n return (\n <SectionHeading\n id={id}\n title={children}\n eyebrow={eyebrow}\n lead={intro}\n layout={{ align: layout?.align ?? 'start' }}\n classes={{ head: classes?.head, eyebrow: classes?.eyebrow, heading: classes?.heading, lead: classes?.lead }}\n />\n )\n}\n\nexport interface ReviewsBandSummaryProps {\n readonly reviews: PreparedBusinessProfileReviews | null | undefined\n readonly classes?: Classes\n}\n\n/** Google's own average and total with the profile link; nothing when the feed has no rating. */\nexport function ReviewsBandSummary({ reviews, classes }: ReviewsBandSummaryProps) {\n if (!hasGoogleRating(reviews)) return null\n return (\n <div {...slot(classes, 'summary')}>\n <RatingChip reviews={reviews} classes={{ rating: classes?.rating, source: classes?.source }} />\n </div>\n )\n}\n\n/** The review list; nothing without items. */\nexport function ReviewsBandList({ classes, children }: { readonly classes?: Classes; readonly children: ReactNode }) {\n if (Children.toArray(children).length === 0) return null\n return <ul {...slot(classes, 'list')}>{children}</ul>\n}\n\nexport interface ReviewsBandItemProps {\n readonly review: BusinessProfileReview\n /** The `feature` variant's wide lead card. */\n readonly lead?: boolean\n readonly layout?: Pick<ReviewsBandLayout, 'avatars' | 'excerpt'>\n readonly classes?: Classes\n}\n\n/** One review, word for word: its stars, the quote and the reviewer with the month. */\nexport function ReviewsBandItem({ review, lead = false, layout, classes }: ReviewsBandItemProps) {\n const parts = splitReviewText(review.text, layout?.excerpt ?? DEFAULT_EXCERPT)\n const date = new Date(review.createTime)\n return (\n <li {...repeatedSlot('item')} data-lead={lead ? 'true' : undefined}>\n <figure>\n <span {...repeatedSlot('stars')}>\n <RatingStars rating={review.rating} label={`Rated ${review.rating} out of 5`} />\n </span>\n <blockquote {...repeatedSlot('quote')}>\n {parts ? (\n <>\n <p>{parts[0]}</p>\n <details {...repeatedSlot('more')}>\n <summary>Read more</summary>\n <p>{parts[1]}</p>\n </details>\n </>\n ) : (\n <p>{review.text}</p>\n )}\n </blockquote>\n <figcaption {...repeatedSlot('author')}>\n {layout?.avatars && review.authorPhotoUrl ? (\n <img\n {...repeatedSlot('avatar')}\n src={review.authorPhotoUrl}\n alt=\"\"\n width={48}\n height={48}\n loading=\"lazy\"\n decoding=\"async\"\n referrerPolicy=\"no-referrer\"\n />\n ) : null}\n <span {...repeatedSlot('name')}>{review.authorName}</span>{' '}\n <time {...repeatedSlot('date')} dateTime={DAY.format(date)}>\n {MONTH.format(date)}\n </time>\n </figcaption>\n </figure>\n </li>\n )\n}\n\nexport interface ReviewsBandProps extends ReviewsBandSkin {\n /** From `prepareBusinessProfileReviews`; null renders nothing at all. */\n readonly reviews: PreparedBusinessProfileReviews | null | undefined\n /** The H2 text the site owns. */\n readonly heading: string\n readonly eyebrow?: string\n readonly intro?: string\n /** The id of the band's H2 (default `bl-reviews-heading`). */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n /** Signature art, rendered `aria-hidden`. */\n readonly decoration?: ReactNode\n}\n\nfunction ReviewsBandSection({ reviews, heading, eyebrow, intro, headingId = REVIEWS_BAND_HEADING_ID, tone, decoration, variant = 'band', layout, classes }: ReviewsBandProps) {\n const shown = shownVariant(reviews, variant)\n if (!shown || !reviews) return null\n const items = shown === 'summary' ? [] : shown === 'feature' ? featureOrder(reviews) : reviews.reviews\n return (\n <ReviewsBandRoot reviews={reviews} headingId={headingId} tone={tone} decoration={decoration} variant={shown} layout={layout} classes={classes}>\n <div {...slot(classes, 'top')}>\n <ReviewsBandHeading id={headingId} eyebrow={eyebrow} intro={intro} layout={layout} classes={classes}>\n {heading}\n </ReviewsBandHeading>\n <ReviewsBandSummary reviews={reviews} classes={classes} />\n </div>\n <ReviewsBandList classes={classes}>\n {items.map((review, index) => (\n <ReviewsBandItem key={review.id} review={review} lead={shown === 'feature' && index === 0} layout={layout} classes={classes} />\n ))}\n </ReviewsBandList>\n </ReviewsBandRoot>\n )\n}\n\n/** The reviews band, with its parts for sites that arrange their own layout. */\nexport const ReviewsBand = Object.assign(ReviewsBandSection, {\n Root: ReviewsBandRoot,\n Heading: ReviewsBandHeading,\n Summary: ReviewsBandSummary,\n List: ReviewsBandList,\n Item: ReviewsBandItem,\n})\n"]}
@@ -1,41 +0,0 @@
1
- /**
2
- * `SectionSequence` (F15): renders a page family's sections in order. Server component, ported from Omega's
3
- * `Sequence` and `alternateTones`. Each section the page offers comes with its guard, computed from the same data it
4
- * renders (`faqsReady(props)`, `priceGuideReady(props)` …), so a section that would render nothing is skipped with
5
- * its reason without rendering twice. Then the cap drops optional sections first, the light tones alternate so
6
- * neighbours never share a background (at most one `band` and one `photo`), and the page's manifest is written as
7
- * `<script type="application/json" data-bl-manifest>` (`SECTION_MANIFEST_ATTRIBUTE`) for K12: what was planned, what
8
- * rendered with which tone, and what was skipped and why. The strips (proof strip, emergency band) and signature
9
- * sections don't count toward the cap (3.16.0); a `signature` section names itself and may say which section it
10
- * follows: `{ id: 'signature', signature: 'storm-line', after: 'services', render: (tone) => <StormLine tone={tone} /> }`.
11
- *
12
- * ```tsx
13
- * <SectionSequence
14
- * order={orders.service}
15
- * page="/tree-removal"
16
- * sections={[
17
- * { id: 'hero', tone: 'photo', render: (tone) => <Hero tone={tone} {...hero} /> },
18
- * { id: 'price-guide', ready: priceGuideReady(guide), render: (tone) => <PriceGuide tone={tone} {...guide} /> },
19
- * { id: 'cta', tone: 'band', render: (tone) => <CTABand tone={tone} {...cta} /> },
20
- * ]}
21
- * />
22
- * ```
23
- */
24
- import { type ReactNode } from 'react';
25
- import { type BrandlabFamilyOrder, type BrandlabSectionManifest, type BrandlabSequenceCandidate } from '@brandlab-digital/site-core/section-order';
26
- import type { SectionTone } from '../primitives/layout.js';
27
- /** One section the page offers: its matrix id, its guard, the tone it asks for and how to render it with a tone. */
28
- export interface SequenceSection extends BrandlabSequenceCandidate {
29
- readonly render: (tone: SectionTone) => ReactNode;
30
- }
31
- export interface SectionSequenceProps {
32
- /** The family's order, from the site's `defineSectionOrder` (or `defaultSectionOrder`). */
33
- readonly order: BrandlabFamilyOrder;
34
- readonly sections: readonly SequenceSection[];
35
- /** The page path, recorded in the manifest. */
36
- readonly page?: string;
37
- }
38
- /** The manifest as safe inline JSON (no `<`, `>` or `&` that could close the script). */
39
- export declare function serialiseSectionManifest(manifest: BrandlabSectionManifest): string;
40
- export declare function SectionSequence({ order, sections, page }: SectionSequenceProps): import("react/jsx-runtime").JSX.Element;
41
- //# sourceMappingURL=section-sequence.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"section-sequence.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/sections/section-sequence.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC/B,MAAM,2CAA2C,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,oHAAoH;AACpH,MAAM,WAAW,eAAgB,SAAQ,yBAAyB;IAChE,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,SAAS,CAAA;CAClD;AAED,MAAM,WAAW,oBAAoB;IACnC,2FAA2F;IAC3F,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAA;IAC7C,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,yFAAyF;AACzF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,uBAAuB,GAAG,MAAM,CAElF;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,oBAAoB,2CAc9E"}
@@ -1,36 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * `SectionSequence` (F15): renders a page family's sections in order. Server component, ported from Omega's
4
- * `Sequence` and `alternateTones`. Each section the page offers comes with its guard, computed from the same data it
5
- * renders (`faqsReady(props)`, `priceGuideReady(props)` …), so a section that would render nothing is skipped with
6
- * its reason without rendering twice. Then the cap drops optional sections first, the light tones alternate so
7
- * neighbours never share a background (at most one `band` and one `photo`), and the page's manifest is written as
8
- * `<script type="application/json" data-bl-manifest>` (`SECTION_MANIFEST_ATTRIBUTE`) for K12: what was planned, what
9
- * rendered with which tone, and what was skipped and why. The strips (proof strip, emergency band) and signature
10
- * sections don't count toward the cap (3.16.0); a `signature` section names itself and may say which section it
11
- * follows: `{ id: 'signature', signature: 'storm-line', after: 'services', render: (tone) => <StormLine tone={tone} /> }`.
12
- *
13
- * ```tsx
14
- * <SectionSequence
15
- * order={orders.service}
16
- * page="/tree-removal"
17
- * sections={[
18
- * { id: 'hero', tone: 'photo', render: (tone) => <Hero tone={tone} {...hero} /> },
19
- * { id: 'price-guide', ready: priceGuideReady(guide), render: (tone) => <PriceGuide tone={tone} {...guide} /> },
20
- * { id: 'cta', tone: 'band', render: (tone) => <CTABand tone={tone} {...cta} /> },
21
- * ]}
22
- * />
23
- * ```
24
- */
25
- import { Fragment } from 'react';
26
- import { sanitizeJsonLd } from '@brandlab-digital/site-core/schema';
27
- import { SECTION_MANIFEST_ATTRIBUTE, planSectionSequence, } from '@brandlab-digital/site-core/section-order';
28
- /** The manifest as safe inline JSON (no `<`, `>` or `&` that could close the script). */
29
- export function serialiseSectionManifest(manifest) {
30
- return sanitizeJsonLd(manifest);
31
- }
32
- export function SectionSequence({ order, sections, page }) {
33
- const plan = planSectionSequence(order, sections, page);
34
- return (_jsxs(_Fragment, { children: [plan.rendered.map((item) => (_jsx(Fragment, { children: sections[item.candidate]?.render(item.tone) }, `${item.id}-${item.candidate}`))), _jsx("script", { type: "application/json", [SECTION_MANIFEST_ATTRIBUTE]: '', dangerouslySetInnerHTML: { __html: serialiseSectionManifest(plan.manifest) } })] }));
35
- }
36
- //# sourceMappingURL=section-sequence.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"section-sequence.js","sourceRoot":"","sources":["../../../src/ui-kit/sections/section-sequence.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,GAIpB,MAAM,2CAA2C,CAAA;AAgBlD,yFAAyF;AACzF,MAAM,UAAU,wBAAwB,CAAC,QAAiC;IACxE,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAwB;IAC7E,MAAM,IAAI,GAAG,mBAAmB,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;IACvD,OAAO,CACL,8BACG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC3B,KAAC,QAAQ,cAAuC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAA5E,GAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE,CAA0D,CACxG,CAAC,EACF,iBACE,IAAI,EAAC,kBAAkB,EACjB,CAAC,0BAA0B,CAAC,EAAE,EAAE,EACtC,uBAAuB,EAAE,EAAE,MAAM,EAAE,wBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,GAC5E,IACD,CACJ,CAAA;AACH,CAAC","sourcesContent":["/**\n * `SectionSequence` (F15): renders a page family's sections in order. Server component, ported from Omega's\n * `Sequence` and `alternateTones`. Each section the page offers comes with its guard, computed from the same data it\n * renders (`faqsReady(props)`, `priceGuideReady(props)` …), so a section that would render nothing is skipped with\n * its reason without rendering twice. Then the cap drops optional sections first, the light tones alternate so\n * neighbours never share a background (at most one `band` and one `photo`), and the page's manifest is written as\n * `<script type=\"application/json\" data-bl-manifest>` (`SECTION_MANIFEST_ATTRIBUTE`) for K12: what was planned, what\n * rendered with which tone, and what was skipped and why. The strips (proof strip, emergency band) and signature\n * sections don't count toward the cap (3.16.0); a `signature` section names itself and may say which section it\n * follows: `{ id: 'signature', signature: 'storm-line', after: 'services', render: (tone) => <StormLine tone={tone} /> }`.\n *\n * ```tsx\n * <SectionSequence\n * order={orders.service}\n * page=\"/tree-removal\"\n * sections={[\n * { id: 'hero', tone: 'photo', render: (tone) => <Hero tone={tone} {...hero} /> },\n * { id: 'price-guide', ready: priceGuideReady(guide), render: (tone) => <PriceGuide tone={tone} {...guide} /> },\n * { id: 'cta', tone: 'band', render: (tone) => <CTABand tone={tone} {...cta} /> },\n * ]}\n * />\n * ```\n */\nimport { Fragment, type ReactNode } from 'react'\nimport { sanitizeJsonLd } from '@brandlab-digital/site-core/schema'\nimport {\n SECTION_MANIFEST_ATTRIBUTE,\n planSectionSequence,\n type BrandlabFamilyOrder,\n type BrandlabSectionManifest,\n type BrandlabSequenceCandidate,\n} from '@brandlab-digital/site-core/section-order'\nimport type { SectionTone } from '../primitives/layout.js'\n\n/** One section the page offers: its matrix id, its guard, the tone it asks for and how to render it with a tone. */\nexport interface SequenceSection extends BrandlabSequenceCandidate {\n readonly render: (tone: SectionTone) => ReactNode\n}\n\nexport interface SectionSequenceProps {\n /** The family's order, from the site's `defineSectionOrder` (or `defaultSectionOrder`). */\n readonly order: BrandlabFamilyOrder\n readonly sections: readonly SequenceSection[]\n /** The page path, recorded in the manifest. */\n readonly page?: string\n}\n\n/** The manifest as safe inline JSON (no `<`, `>` or `&` that could close the script). */\nexport function serialiseSectionManifest(manifest: BrandlabSectionManifest): string {\n return sanitizeJsonLd(manifest)\n}\n\nexport function SectionSequence({ order, sections, page }: SectionSequenceProps) {\n const plan = planSectionSequence(order, sections, page)\n return (\n <>\n {plan.rendered.map((item) => (\n <Fragment key={`${item.id}-${item.candidate}`}>{sections[item.candidate]?.render(item.tone)}</Fragment>\n ))}\n <script\n type=\"application/json\"\n {...{ [SECTION_MANIFEST_ATTRIBUTE]: '' }}\n dangerouslySetInnerHTML={{ __html: serialiseSectionManifest(plan.manifest) }}\n />\n </>\n )\n}\n"]}
@@ -1,82 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { BrandlabMediaEntry } from '@brandlab-digital/site-core/media';
3
- import { type LinkPrefetch } from '../prefetch.js';
4
- import { type MediaLayout } from '../primitives/media.js';
5
- import { type SectionHeadingSlot, type SectionSlot, type SectionTone } from '../primitives/layout.js';
6
- import type { RepeatedSlotOf } from '../repeated-slots.js';
7
- import { type SkinEntry } from '../skin.js';
8
- import type { UiLink } from '../types.js';
9
- export declare const SERVICES_GRID_VARIANTS: readonly ["rows", "cards", "compact"];
10
- export type ServicesGridVariant = (typeof SERVICES_GRID_VARIANTS)[number];
11
- export type ServiceCardSlot = 'item' | 'media' | 'body' | 'title' | 'summary' | 'points' | 'point' | 'action' | 'link';
12
- export type ServicesGridSlot = SectionSlot | SectionHeadingSlot | 'list' | 'more' | ServiceCardSlot;
13
- /** Rendered once per service: styled from the skin stylesheet, never by class. */
14
- export type ServicesGridRepeatedSlot = RepeatedSlotOf<'servicesGrid'>;
15
- export interface ServicesGridLayout {
16
- /** `cards`: columns on wide screens. Defaults to 3. */
17
- readonly columns?: 2 | 3 | 4;
18
- /** `rows` and `cards`: the photo's crop. Defaults to 4:3. */
19
- readonly ratio?: NonNullable<MediaLayout['ratio']>;
20
- /** `rows`: the photo's side on wide screens. Defaults to `alternate` (first photo at the start). */
21
- readonly mediaSide?: 'alternate' | 'start' | 'end';
22
- }
23
- export type ServicesGridSkin = SkinEntry<ServicesGridSlot, ServicesGridVariant, ServicesGridLayout, ServicesGridRepeatedSlot>;
24
- /** The most services `rows` and `cards` show (K11; the in-content intent-prefetch limit). */
25
- export declare const SERVICES_GRID_CARD_LIMIT: 8;
26
- /** One service, in money order. */
27
- export interface ServiceCardData {
28
- /** A stable slug, rendered as `data-item`. */
29
- readonly id: string;
30
- /** The service's name, the card's H3 (`rows`, `cards`) or the link text (`compact`). */
31
- readonly title: string;
32
- /**
33
- * Where the card goes: the service page, its service-in-suburb page or its anchored section on this page
34
- * (`#tree-pruning`). From the site's data, never built here.
35
- */
36
- readonly href: string;
37
- /** One line on what the service is. `rows` and `cards`; never a price. */
38
- readonly summary?: ReactNode;
39
- /** `rows`: a few scope points under the summary (verified service scope, never prices). */
40
- readonly points?: readonly string[];
41
- /** The service's own photo from the media manifest. `rows` and `cards`; no image on two cards. */
42
- readonly image?: BrandlabMediaEntry;
43
- /**
44
- * `rows`: the link under the text, for example "Tree removal in Castle Hill". Left out, the title is the link, as on
45
- * `cards`. Name the service: never "Learn more".
46
- */
47
- readonly linkLabel?: string;
48
- }
49
- export interface ServiceCardProps {
50
- readonly service: ServiceCardData;
51
- readonly variant: ServicesGridVariant;
52
- /** `rows` and `cards`: the photo's `sizes`. */
53
- readonly imageSizes?: string;
54
- readonly ratio?: ServicesGridLayout['ratio'];
55
- /** `rows` and `cards` default to `intent`; `compact` is always off. */
56
- readonly prefetch?: LinkPrefetch;
57
- }
58
- /**
59
- * One service as a list item of `ServicesGrid` (also the building block for `RelatedServices`). Its parts are the
60
- * grid's repeated slots: the root sets no classes on them.
61
- */
62
- export declare function ServiceCard({ service, variant, imageSizes, ratio, prefetch }: ServiceCardProps): import("react/jsx-runtime").JSX.Element;
63
- /** The photo `sizes` for each variant: half the container in rows, one column of the grid in cards. */
64
- export declare function defaultImageSizes(variant: Exclude<ServicesGridVariant, 'compact'>, columns: 2 | 3 | 4): string;
65
- export interface ServicesGridProps extends ServicesGridSkin {
66
- /** The H2, for example "Our tree services" or "Tree services in Castle Hill". */
67
- readonly title: ReactNode;
68
- readonly eyebrow?: ReactNode;
69
- readonly lead?: ReactNode;
70
- /** Every service the page offers, in money order. */
71
- readonly services: readonly ServiceCardData[];
72
- /** A link after the list, for example the services hub or "Find your area". Never prefetched. */
73
- readonly more?: UiLink;
74
- /** `rows` and `cards`: override the photo `sizes` when the skin's grid differs from the defaults. */
75
- readonly imageSizes?: string;
76
- /** Defaults to `services-heading`. */
77
- readonly headingId?: string;
78
- /** Set by `SectionSequence`. */
79
- readonly tone?: SectionTone;
80
- }
81
- export declare function ServicesGrid({ title, eyebrow, lead, services, more, imageSizes, headingId, tone, variant, layout, classes, }: ServicesGridProps): import("react/jsx-runtime").JSX.Element | null;
82
- //# sourceMappingURL=services-grid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"services-grid.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/sections/services-grid.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,EAAiE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACjH,OAAO,EAAS,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAA2B,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC9H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,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EAAE,MAAM,CAAA;IACtB,qGAAqG;IACrG,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,sCAAsC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,gCAAgC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAC5B;AA0BD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,SAA8B,EAC9B,IAAI,EACJ,OAAgB,EAChB,MAAM,EACN,OAAO,GACR,EAAE,iBAAiB,kDAiCnB"}
@@ -1,90 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * `ServicesGrid` (S4, `services`, 3.14.0) and `ServiceCard`: route the visitor to the right service. Server components.
4
- *
5
- * Variants:
6
- * - `rows` (the fleet reference, AA's `ServiceRows`): one full-width row per service, the photo beside the text and
7
- * alternating sides on wide screens, with an optional line of scope points and the service's own link;
8
- * - `cards`: a grid of cards, each headed by its linked title;
9
- * - `compact` (suburb and region pages): a lean list of every service offered there, each a single link to its
10
- * service-in-suburb page or to its anchored section on the same page (`#tree-pruning`). No photos and no summaries.
11
- *
12
- * Locked rules (S4): one link per card; no prices and no before-and-afters in cards; no image on two cards; at most 8
13
- * `rows` or `cards` (K11's card limit, and the most in-content links that prefetch on intent), so a page that offers
14
- * more services lists them `compact` or links its services hub. Card links prefetch on intent (`LINK_PREFETCH_POLICY`
15
- * `contentCard`); compact links, the hub link and same-page anchors never prefetch.
16
- */
17
- import Link from 'next/link';
18
- import { LINK_PREFETCH_LIMITS, LINK_PREFETCH_POLICY, linkPrefetchProps } from '../prefetch.js';
19
- import { Media } from '../primitives/media.js';
20
- import { Section, SectionHeading } from '../primitives/layout.js';
21
- import { repeatedSlot, slot } from '../skin.js';
22
- export const SERVICES_GRID_VARIANTS = ['rows', 'cards', 'compact'];
23
- /** The most services `rows` and `cards` show (K11; the in-content intent-prefetch limit). */
24
- export const SERVICES_GRID_CARD_LIMIT = LINK_PREFETCH_LIMITS.contentCard;
25
- function ServiceLink({ href, prefetch, children }) {
26
- // A same-page section needs no route prefetch: a plain anchor.
27
- if (href.startsWith('#')) {
28
- return (_jsx("a", { href: href, ...repeatedSlot('link'), children: children }));
29
- }
30
- return (_jsx(Link, { href: href, ...linkPrefetchProps(prefetch, href), ...repeatedSlot('link'), children: children }));
31
- }
32
- /**
33
- * One service as a list item of `ServicesGrid` (also the building block for `RelatedServices`). Its parts are the
34
- * grid's repeated slots: the root sets no classes on them.
35
- */
36
- export function ServiceCard({ service, variant, imageSizes, ratio = '4:3', prefetch }) {
37
- if (variant === 'compact') {
38
- return (_jsx("li", { ...repeatedSlot('item'), "data-item": service.id, children: _jsx(ServiceLink, { href: service.href, prefetch: LINK_PREFETCH_POLICY.otherServicesInSuburb, children: service.title }) }));
39
- }
40
- const linkPrefetch = prefetch ?? LINK_PREFETCH_POLICY.contentCard;
41
- const separateLink = variant === 'rows' && service.linkLabel !== undefined && service.linkLabel.trim() !== '';
42
- return (_jsxs("li", { ...repeatedSlot('item'), "data-item": service.id, children: [_jsxs("div", { ...repeatedSlot('body'), children: [_jsx("h3", { ...repeatedSlot('title'), children: separateLink ? (service.title) : (_jsx(ServiceLink, { href: service.href, prefetch: linkPrefetch, children: service.title })) }), service.summary ? _jsx("p", { ...repeatedSlot('summary'), children: service.summary }) : null, variant === 'rows' && service.points && service.points.length > 0 ? (_jsx("ul", { role: "list", ...repeatedSlot('points'), children: service.points.map((point) => (_jsx("li", { ...repeatedSlot('point'), children: point }, point))) })) : null, separateLink ? (_jsx("p", { ...repeatedSlot('action'), children: _jsx(ServiceLink, { href: service.href, prefetch: linkPrefetch, children: service.linkLabel }) })) : null] }), service.image ? (_jsx("div", { ...repeatedSlot('media'), children: _jsx(Media, { media: service.image, sizes: imageSizes ?? defaultImageSizes(variant, 3), layout: { ratio } }) })) : null] }));
43
- }
44
- /** The photo `sizes` for each variant: half the container in rows, one column of the grid in cards. */
45
- export function defaultImageSizes(variant, columns) {
46
- if (variant === 'rows')
47
- return '(min-width: 1024px) 50vw, 100vw';
48
- return `(min-width: 1024px) ${Math.round(100 / columns)}vw, (min-width: 640px) 50vw, 100vw`;
49
- }
50
- function assertServices(services, variant) {
51
- const ids = new Set();
52
- const hrefs = new Set();
53
- const images = new Map();
54
- for (const service of services) {
55
- if (!service.id || ids.has(service.id))
56
- throw new Error(`ServicesGrid: every service needs its own id ("${service.id}" is empty or repeated).`);
57
- ids.add(service.id);
58
- if (!service.title?.trim())
59
- throw new Error(`ServicesGrid: the service "${service.id}" has no title.`);
60
- if (!service.href?.trim())
61
- throw new Error(`ServicesGrid: the service "${service.id}" has no link.`);
62
- if (hrefs.has(service.href))
63
- throw new Error(`ServicesGrid: two services link to ${service.href}; each card has its own page or section.`);
64
- hrefs.add(service.href);
65
- if (variant !== 'compact' && service.image) {
66
- const other = images.get(service.image.src);
67
- if (other)
68
- throw new Error(`ServicesGrid: "${service.id}" and "${other}" use the same image (${service.image.src}); no image is on two cards.`);
69
- images.set(service.image.src, service.id);
70
- }
71
- }
72
- if (variant !== 'compact' && services.length > SERVICES_GRID_CARD_LIMIT) {
73
- throw new Error(`ServicesGrid: ${services.length} services in ${variant}; ${variant} shows at most ${SERVICES_GRID_CARD_LIMIT} (K11). List every service with the compact variant, or show the money services and link the services hub.`);
74
- }
75
- }
76
- export function ServicesGrid({ title, eyebrow, lead, services, more, imageSizes, headingId = 'services-heading', tone, variant = 'rows', layout, classes, }) {
77
- if (services.length === 0)
78
- return null;
79
- assertServices(services, variant);
80
- const columns = layout?.columns ?? 3;
81
- const ratio = layout?.ratio ?? '4:3';
82
- const hooks = variant === 'compact'
83
- ? undefined
84
- : variant === 'cards'
85
- ? { 'data-columns': String(columns), 'data-ratio': ratio }
86
- : { 'data-media-side': layout?.mediaSide ?? 'alternate', 'data-ratio': ratio };
87
- const sizes = variant === 'compact' ? undefined : (imageSizes ?? defaultImageSizes(variant, columns));
88
- return (_jsxs(Section, { id: "services", labelledBy: headingId, tone: tone, variant: variant, classes: classes, hooks: hooks, children: [_jsx(SectionHeading, { id: headingId, title: title, eyebrow: eyebrow, lead: lead, classes: classes }), _jsx("ul", { role: "list", ...slot(classes, 'list'), children: services.map((service) => (_jsx(ServiceCard, { service: service, variant: variant, imageSizes: sizes, ratio: ratio }, service.id))) }), more ? (_jsx("p", { ...slot(classes, 'more'), children: more.href.startsWith('#') ? (_jsx("a", { href: more.href, children: more.label })) : (_jsx(Link, { href: more.href, prefetch: false, children: more.label })) })) : null] }));
89
- }
90
- //# sourceMappingURL=services-grid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"services-grid.js","sourceRoot":"","sources":["../../../src/ui-kit/sections/services-grid.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,IAAI,MAAM,WAAW,CAAA;AAG5B,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAqB,MAAM,gBAAgB,CAAA;AACjH,OAAO,EAAE,KAAK,EAAoB,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,cAAc,EAA+D,MAAM,yBAAyB,CAAA;AAE9H,OAAO,EAAE,YAAY,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AAG/D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAU,CAAA;AAgB3E,6FAA6F;AAC7F,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,WAAW,CAAA;AAoCxE,SAAS,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAiE;IAC9G,+DAA+D;IAC/D,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,CACL,YAAG,IAAI,EAAE,IAAI,KAAM,YAAY,CAAC,MAAM,CAA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E,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,aACxG,KAAC,cAAc,IAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,EAC/F,aAAI,IAAI,EAAC,MAAM,KAAK,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,YACtC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACzB,KAAC,WAAW,IAAkB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAA/E,OAAO,CAAC,EAAE,CAAyE,CACtG,CAAC,GACC,EACJ,IAAI,CAAC,CAAC,CAAC,CACN,eAAO,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,YACzB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAC3B,YAAG,IAAI,EAAE,IAAI,CAAC,IAAI,YAAG,IAAI,CAAC,KAAK,GAAK,CACrC,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,YACnC,IAAI,CAAC,KAAK,GACN,CACR,GACC,CACL,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAA;AACH,CAAC","sourcesContent":["/**\n * `ServicesGrid` (S4, `services`, 3.14.0) and `ServiceCard`: route the visitor to the right service. Server components.\n *\n * Variants:\n * - `rows` (the fleet reference, AA's `ServiceRows`): one full-width row per service, the photo beside the text and\n * alternating sides on wide screens, with an optional line of scope points and the service's own link;\n * - `cards`: a grid of cards, each headed by its linked title;\n * - `compact` (suburb and region pages): a lean list of every service offered there, each a single link to its\n * service-in-suburb page or to its anchored section on the same page (`#tree-pruning`). No photos and no summaries.\n *\n * Locked rules (S4): one link per card; no prices and no before-and-afters in cards; no image on two cards; at most 8\n * `rows` or `cards` (K11's card limit, and the most in-content links that prefetch on intent), so a page that offers\n * more services lists them `compact` or links its services hub. Card links prefetch on intent (`LINK_PREFETCH_POLICY`\n * `contentCard`); compact links, the hub link and same-page anchors never prefetch.\n */\nimport Link from 'next/link'\nimport type { ReactNode } from 'react'\nimport type { BrandlabMediaEntry } from '@brandlab-digital/site-core/media'\nimport { LINK_PREFETCH_LIMITS, LINK_PREFETCH_POLICY, linkPrefetchProps, type LinkPrefetch } from '../prefetch.js'\nimport { Media, type MediaLayout } from '../primitives/media.js'\nimport { Section, SectionHeading, type SectionHeadingSlot, type SectionSlot, type SectionTone } from '../primitives/layout.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, slot, type SkinEntry } from '../skin.js'\nimport type { UiLink } from '../types.js'\n\nexport const SERVICES_GRID_VARIANTS = ['rows', 'cards', 'compact'] as const\nexport type ServicesGridVariant = (typeof SERVICES_GRID_VARIANTS)[number]\nexport type ServiceCardSlot = 'item' | 'media' | 'body' | 'title' | 'summary' | 'points' | 'point' | 'action' | 'link'\nexport type ServicesGridSlot = SectionSlot | SectionHeadingSlot | 'list' | 'more' | ServiceCardSlot\n/** Rendered once per service: styled from the skin stylesheet, never by class. */\nexport type ServicesGridRepeatedSlot = RepeatedSlotOf<'servicesGrid'>\nexport interface ServicesGridLayout {\n /** `cards`: columns on wide screens. Defaults to 3. */\n readonly columns?: 2 | 3 | 4\n /** `rows` and `cards`: the photo's crop. Defaults to 4:3. */\n readonly ratio?: NonNullable<MediaLayout['ratio']>\n /** `rows`: the photo's side on wide screens. Defaults to `alternate` (first photo at the start). */\n readonly mediaSide?: 'alternate' | 'start' | 'end'\n}\nexport type ServicesGridSkin = SkinEntry<ServicesGridSlot, ServicesGridVariant, ServicesGridLayout, ServicesGridRepeatedSlot>\n\n/** The most services `rows` and `cards` show (K11; the in-content intent-prefetch limit). */\nexport const SERVICES_GRID_CARD_LIMIT = LINK_PREFETCH_LIMITS.contentCard\n\n/** One service, in money order. */\nexport interface ServiceCardData {\n /** A stable slug, rendered as `data-item`. */\n readonly id: string\n /** The service's name, the card's H3 (`rows`, `cards`) or the link text (`compact`). */\n readonly title: string\n /**\n * Where the card goes: the service page, its service-in-suburb page or its anchored section on this page\n * (`#tree-pruning`). From the site's data, never built here.\n */\n readonly href: string\n /** One line on what the service is. `rows` and `cards`; never a price. */\n readonly summary?: ReactNode\n /** `rows`: a few scope points under the summary (verified service scope, never prices). */\n readonly points?: readonly string[]\n /** The service's own photo from the media manifest. `rows` and `cards`; no image on two cards. */\n readonly image?: BrandlabMediaEntry\n /**\n * `rows`: the link under the text, for example \"Tree removal in Castle Hill\". Left out, the title is the link, as on\n * `cards`. Name the service: never \"Learn more\".\n */\n readonly linkLabel?: string\n}\n\nexport interface ServiceCardProps {\n readonly service: ServiceCardData\n readonly variant: ServicesGridVariant\n /** `rows` and `cards`: the photo's `sizes`. */\n readonly imageSizes?: string\n readonly ratio?: ServicesGridLayout['ratio']\n /** `rows` and `cards` default to `intent`; `compact` is always off. */\n readonly prefetch?: LinkPrefetch\n}\n\nfunction ServiceLink({ href, prefetch, children }: { href: string; prefetch: LinkPrefetch; children: ReactNode }) {\n // A same-page section needs no route prefetch: a plain anchor.\n if (href.startsWith('#')) {\n return (\n <a href={href} {...repeatedSlot('link')}>\n {children}\n </a>\n )\n }\n return (\n <Link href={href} {...linkPrefetchProps(prefetch, href)} {...repeatedSlot('link')}>\n {children}\n </Link>\n )\n}\n\n/**\n * One service as a list item of `ServicesGrid` (also the building block for `RelatedServices`). Its parts are the\n * grid's repeated slots: the root sets no classes on them.\n */\nexport function ServiceCard({ service, variant, imageSizes, ratio = '4:3', prefetch }: ServiceCardProps) {\n if (variant === 'compact') {\n return (\n <li {...repeatedSlot('item')} data-item={service.id}>\n <ServiceLink href={service.href} prefetch={LINK_PREFETCH_POLICY.otherServicesInSuburb}>\n {service.title}\n </ServiceLink>\n </li>\n )\n }\n const linkPrefetch = prefetch ?? LINK_PREFETCH_POLICY.contentCard\n const separateLink = variant === 'rows' && service.linkLabel !== undefined && service.linkLabel.trim() !== ''\n return (\n <li {...repeatedSlot('item')} data-item={service.id}>\n <div {...repeatedSlot('body')}>\n <h3 {...repeatedSlot('title')}>\n {separateLink ? (\n service.title\n ) : (\n <ServiceLink href={service.href} prefetch={linkPrefetch}>\n {service.title}\n </ServiceLink>\n )}\n </h3>\n {service.summary ? <p {...repeatedSlot('summary')}>{service.summary}</p> : null}\n {variant === 'rows' && service.points && service.points.length > 0 ? (\n <ul role=\"list\" {...repeatedSlot('points')}>\n {service.points.map((point) => (\n <li key={point} {...repeatedSlot('point')}>\n {point}\n </li>\n ))}\n </ul>\n ) : null}\n {separateLink ? (\n <p {...repeatedSlot('action')}>\n <ServiceLink href={service.href} prefetch={linkPrefetch}>\n {service.linkLabel}\n </ServiceLink>\n </p>\n ) : null}\n </div>\n {service.image ? (\n <div {...repeatedSlot('media')}>\n <Media media={service.image} sizes={imageSizes ?? defaultImageSizes(variant, 3)} layout={{ ratio }} />\n </div>\n ) : null}\n </li>\n )\n}\n\n/** The photo `sizes` for each variant: half the container in rows, one column of the grid in cards. */\nexport function defaultImageSizes(variant: Exclude<ServicesGridVariant, 'compact'>, columns: 2 | 3 | 4): string {\n if (variant === 'rows') return '(min-width: 1024px) 50vw, 100vw'\n return `(min-width: 1024px) ${Math.round(100 / columns)}vw, (min-width: 640px) 50vw, 100vw`\n}\n\nexport interface ServicesGridProps extends ServicesGridSkin {\n /** The H2, for example \"Our tree services\" or \"Tree services in Castle Hill\". */\n readonly title: ReactNode\n readonly eyebrow?: ReactNode\n readonly lead?: ReactNode\n /** Every service the page offers, in money order. */\n readonly services: readonly ServiceCardData[]\n /** A link after the list, for example the services hub or \"Find your area\". Never prefetched. */\n readonly more?: UiLink\n /** `rows` and `cards`: override the photo `sizes` when the skin's grid differs from the defaults. */\n readonly imageSizes?: string\n /** Defaults to `services-heading`. */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n}\n\nfunction assertServices(services: readonly ServiceCardData[], variant: ServicesGridVariant): void {\n const ids = new Set<string>()\n const hrefs = new Set<string>()\n const images = new Map<string, string>()\n for (const service of services) {\n if (!service.id || ids.has(service.id)) throw new Error(`ServicesGrid: every service needs its own id (\"${service.id}\" is empty or repeated).`)\n ids.add(service.id)\n if (!service.title?.trim()) throw new Error(`ServicesGrid: the service \"${service.id}\" has no title.`)\n if (!service.href?.trim()) throw new Error(`ServicesGrid: the service \"${service.id}\" has no link.`)\n if (hrefs.has(service.href)) throw new Error(`ServicesGrid: two services link to ${service.href}; each card has its own page or section.`)\n hrefs.add(service.href)\n if (variant !== 'compact' && service.image) {\n const other = images.get(service.image.src)\n if (other) throw new Error(`ServicesGrid: \"${service.id}\" and \"${other}\" use the same image (${service.image.src}); no image is on two cards.`)\n images.set(service.image.src, service.id)\n }\n }\n if (variant !== 'compact' && services.length > SERVICES_GRID_CARD_LIMIT) {\n throw new Error(\n `ServicesGrid: ${services.length} services in ${variant}; ${variant} shows at most ${SERVICES_GRID_CARD_LIMIT} (K11). List every service with the compact variant, or show the money services and link the services hub.`,\n )\n }\n}\n\nexport function ServicesGrid({\n title,\n eyebrow,\n lead,\n services,\n more,\n imageSizes,\n headingId = 'services-heading',\n tone,\n variant = 'rows',\n layout,\n classes,\n}: ServicesGridProps) {\n if (services.length === 0) return null\n assertServices(services, variant)\n const columns = layout?.columns ?? 3\n const ratio = layout?.ratio ?? '4:3'\n const hooks =\n variant === 'compact'\n ? undefined\n : variant === 'cards'\n ? { 'data-columns': String(columns), 'data-ratio': ratio }\n : { 'data-media-side': layout?.mediaSide ?? 'alternate', 'data-ratio': ratio }\n const sizes = variant === 'compact' ? undefined : (imageSizes ?? defaultImageSizes(variant, columns))\n return (\n <Section id=\"services\" labelledBy={headingId} tone={tone} variant={variant} classes={classes} hooks={hooks}>\n <SectionHeading id={headingId} title={title} eyebrow={eyebrow} lead={lead} classes={classes} />\n <ul role=\"list\" {...slot(classes, 'list')}>\n {services.map((service) => (\n <ServiceCard key={service.id} service={service} variant={variant} imageSizes={sizes} ratio={ratio} />\n ))}\n </ul>\n {more ? (\n <p {...slot(classes, 'more')}>\n {more.href.startsWith('#') ? (\n <a href={more.href}>{more.label}</a>\n ) : (\n <Link href={more.href} prefetch={false}>\n {more.label}\n </Link>\n )}\n </p>\n ) : null}\n </Section>\n )\n}\n"]}
@@ -1,42 +0,0 @@
1
- /**
2
- * `SignatureSection` (`signature`, 3.16.0): the frame for one of a client's signature features, the sections that give
3
- * a site its own character (Superior's waterline story, AA's storm line, Finishing Touch's `FinishBoard`). Server
4
- * component. The site builds the body from the library's primitives in `src/site/signature/`; the frame keeps the
5
- * rules every section keeps:
6
- * - a `<section data-bl-section="signature" data-bl-signature="<name>">` labelled by its one H2, so K8, K11 and axe read
7
- * it like any other section;
8
- * - the name matches the `signature` the page offers `SectionSequence` and the look record in `strategy.ts`
9
- * (`homeSections.signatures`), which D4 compares with the competitors' and K13 holds the rendered page to;
10
- * - decoration is `aria-hidden`, and the body carries no client JS of its own (B1 budgets the page);
11
- * - claims inside it come from the business facts (`renderableCredentials`) or the reviews feed, as everywhere else
12
- * (T4, E8): a signature adds character, never an unsupported claim.
13
- *
14
- * `SectionSequence` places it where the site declares (`{ id: 'signature', signature: 'storm-line', after: 'services',
15
- * render }`), outside the cap: up to two on the home page and one on service pages (`SIGNATURE_LIMITS`).
16
- */
17
- import type { ReactNode } from 'react';
18
- import { type SectionSlot, type SectionTone } from '../primitives/layout.js';
19
- import { type SkinEntry } from '../skin.js';
20
- export type SignatureSectionSlot = SectionSlot | 'head' | 'eyebrow' | 'heading' | 'lead' | 'body';
21
- export interface SignatureSectionLayout {
22
- readonly align?: 'start' | 'center';
23
- }
24
- export type SignatureSectionSkin = SkinEntry<SignatureSectionSlot, never, SignatureSectionLayout>;
25
- export interface SignatureSectionProps extends SignatureSectionSkin {
26
- /** The signature's name, as the page offers it to `SectionSequence` and `strategy.ts` records it: `storm-line`. */
27
- readonly name: string;
28
- /** The H2. */
29
- readonly title: string;
30
- readonly eyebrow?: string;
31
- readonly lead?: string;
32
- /** Defaults to `signature-<name>-heading`. */
33
- readonly headingId?: string;
34
- /** Set by `SectionSequence`. */
35
- readonly tone?: SectionTone;
36
- /** Signature art, rendered `aria-hidden`. */
37
- readonly decoration?: ReactNode;
38
- /** The feature itself, built from the library's primitives. */
39
- readonly children: ReactNode;
40
- }
41
- export declare function SignatureSection({ name, title, eyebrow, lead, headingId, tone, decoration, layout, classes, children }: SignatureSectionProps): import("react/jsx-runtime").JSX.Element;
42
- //# sourceMappingURL=signature-section.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signature-section.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/sections/signature-section.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAA2B,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrG,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAEjD,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;AACjG,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;CACpC;AACD,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,oBAAoB,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAA;AAEjG,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,mHAAmH;IACnH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,cAAc;IACd,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,gCAAgC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAA;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAA;IAC/B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAmB7I"}
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { SIGNATURE_NAME_PATTERN } from '@brandlab-digital/site-core/section-order';
3
- import { Section, SectionHeading } from '../primitives/layout.js';
4
- import { slot } from '../skin.js';
5
- export function SignatureSection({ name, title, eyebrow, lead, headingId, tone, decoration, layout, classes, children }) {
6
- if (!SIGNATURE_NAME_PATTERN.test(name)) {
7
- throw new Error(`SignatureSection: "${name}" is not a signature name (lower-case words joined by hyphens, for example "storm-line").`);
8
- }
9
- if (title.trim() === '')
10
- throw new Error(`SignatureSection "${name}": the heading is empty.`);
11
- const id = headingId ?? `signature-${name}-heading`;
12
- return (_jsxs(Section, { id: "signature", labelledBy: id, tone: tone, classes: classes, decoration: decoration, hooks: { 'data-bl-signature': name }, children: [_jsx(SectionHeading, { id: id, title: title, eyebrow: eyebrow, lead: lead, layout: { align: layout?.align ?? 'start' }, classes: { head: classes?.head, eyebrow: classes?.eyebrow, heading: classes?.heading, lead: classes?.lead } }), _jsx("div", { ...slot(classes, 'body'), children: children })] }));
13
- }
14
- //# sourceMappingURL=signature-section.js.map
@@ -1 +0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OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAC3G,EACF,iBAAS,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,YAAG,QAAQ,GAAO,IACxC,CACX,CAAA;AACH,CAAC","sourcesContent":["/**\n * `SignatureSection` (`signature`, 3.16.0): the frame for one of a client's signature features, the sections that give\n * a site its own character (Superior's waterline story, AA's storm line, Finishing Touch's `FinishBoard`). Server\n * component. The site builds the body from the library's primitives in `src/site/signature/`; the frame keeps the\n * rules every section keeps:\n * - a `<section data-bl-section=\"signature\" data-bl-signature=\"<name>\">` labelled by its one H2, so K8, K11 and axe read\n * it like any other section;\n * - the name matches the `signature` the page offers `SectionSequence` and the look record in `strategy.ts`\n * (`homeSections.signatures`), which D4 compares with the competitors' and K13 holds the rendered page to;\n * - decoration is `aria-hidden`, and the body carries no client JS of its own (B1 budgets the page);\n * - claims inside it come from the business facts (`renderableCredentials`) or the reviews feed, as everywhere else\n * (T4, E8): a signature adds character, never an unsupported claim.\n *\n * `SectionSequence` places it where the site declares (`{ id: 'signature', signature: 'storm-line', after: 'services',\n * render }`), outside the cap: up to two on the home page and one on service pages (`SIGNATURE_LIMITS`).\n */\nimport type { ReactNode } from 'react'\nimport { SIGNATURE_NAME_PATTERN } from '@brandlab-digital/site-core/section-order'\nimport { Section, SectionHeading, type SectionSlot, type SectionTone } from '../primitives/layout.js'\nimport { slot, type SkinEntry } from '../skin.js'\n\nexport type SignatureSectionSlot = SectionSlot | 'head' | 'eyebrow' | 'heading' | 'lead' | 'body'\nexport interface SignatureSectionLayout {\n readonly align?: 'start' | 'center'\n}\nexport type SignatureSectionSkin = SkinEntry<SignatureSectionSlot, never, SignatureSectionLayout>\n\nexport interface SignatureSectionProps extends SignatureSectionSkin {\n /** The signature's name, as the page offers it to `SectionSequence` and `strategy.ts` records it: `storm-line`. */\n readonly name: string\n /** The H2. */\n readonly title: string\n readonly eyebrow?: string\n readonly lead?: string\n /** Defaults to `signature-<name>-heading`. */\n readonly headingId?: string\n /** Set by `SectionSequence`. */\n readonly tone?: SectionTone\n /** Signature art, rendered `aria-hidden`. */\n readonly decoration?: ReactNode\n /** The feature itself, built from the library's primitives. */\n readonly children: ReactNode\n}\n\nexport function SignatureSection({ name, title, eyebrow, lead, headingId, tone, decoration, layout, classes, children }: SignatureSectionProps) {\n if (!SIGNATURE_NAME_PATTERN.test(name)) {\n throw new Error(`SignatureSection: \"${name}\" is not a signature name (lower-case words joined by hyphens, for example \"storm-line\").`)\n }\n if (title.trim() === '') throw new Error(`SignatureSection \"${name}\": the heading is empty.`)\n const id = headingId ?? `signature-${name}-heading`\n return (\n <Section id=\"signature\" labelledBy={id} tone={tone} classes={classes} decoration={decoration} hooks={{ 'data-bl-signature': name }}>\n <SectionHeading\n id={id}\n title={title}\n eyebrow={eyebrow}\n lead={lead}\n layout={{ align: layout?.align ?? 'start' }}\n classes={{ head: classes?.head, eyebrow: classes?.eyebrow, heading: classes?.heading, lead: classes?.lead }}\n />\n <div {...slot(classes, 'body')}>{children}</div>\n </Section>\n )\n}\n"]}
@@ -1,12 +0,0 @@
1
- /**
2
- * The footer's phone accordion (client island). Below 640 px of footer width each column's H2 shows its disclosure
3
- * button and one column is open at a time; wider, every list shows and the buttons stay hidden. The headings, buttons
4
- * and links are server HTML passed in as children; this island only toggles `hidden`, `aria-expanded` and
5
- * `data-state`, so without scripts every link shows.
6
- */
7
- import { type ReactNode } from 'react';
8
- export declare function SiteFooterColumns({ className, children }: {
9
- readonly className?: string | undefined;
10
- readonly children: ReactNode;
11
- }): import("react/jsx-runtime").JSX.Element;
12
- //# sourceMappingURL=site-footer-columns.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"site-footer-columns.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/sections/site-footer-columns.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEzD,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAsDnI"}