@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.
Files changed (345) hide show
  1. package/README.md +24 -0
  2. package/dist/contact/client.d.ts +2 -0
  3. package/dist/contact/client.d.ts.map +1 -1
  4. package/dist/contact/client.js +6 -0
  5. package/dist/contact/client.js.map +1 -1
  6. package/dist/contact/form-client.d.ts.map +1 -1
  7. package/dist/contact/form-client.js +5 -1
  8. package/dist/contact/form-client.js.map +1 -1
  9. package/dist/contact/route-handler.d.ts +5 -0
  10. package/dist/contact/route-handler.d.ts.map +1 -1
  11. package/dist/contact/route-handler.js +1 -0
  12. package/dist/contact/route-handler.js.map +1 -1
  13. package/dist/contact/server-entry.d.ts +1 -0
  14. package/dist/contact/server-entry.d.ts.map +1 -1
  15. package/dist/contact/server-entry.js +1 -0
  16. package/dist/contact/server-entry.js.map +1 -1
  17. package/dist/contact/server.d.ts +8 -0
  18. package/dist/contact/server.d.ts.map +1 -1
  19. package/dist/contact/server.js +24 -0
  20. package/dist/contact/server.js.map +1 -1
  21. package/dist/contact/shared.d.ts +2 -0
  22. package/dist/contact/shared.d.ts.map +1 -1
  23. package/dist/contact/shared.js +2 -0
  24. package/dist/contact/shared.js.map +1 -1
  25. package/dist/contact/spam-filter.d.ts +65 -0
  26. package/dist/contact/spam-filter.d.ts.map +1 -0
  27. package/dist/contact/spam-filter.js +347 -0
  28. package/dist/contact/spam-filter.js.map +1 -0
  29. package/dist/contact/spam-places.d.ts +8 -0
  30. package/dist/contact/spam-places.d.ts.map +1 -0
  31. package/dist/contact/spam-places.js +8 -0
  32. package/dist/contact/spam-places.js.map +1 -0
  33. package/dist/instrumentation-client.d.ts +1 -1
  34. package/dist/instrumentation-client.js +1 -1
  35. package/dist/instrumentation-client.js.map +1 -1
  36. package/dist/navigation/index.d.ts +2 -3
  37. package/dist/navigation/index.d.ts.map +1 -1
  38. package/dist/navigation/index.js +2 -3
  39. package/dist/navigation/index.js.map +1 -1
  40. package/dist/next-config.d.ts +1 -17
  41. package/dist/next-config.d.ts.map +1 -1
  42. package/dist/next-config.js +2 -33
  43. package/dist/next-config.js.map +1 -1
  44. package/package.json +4 -33
  45. package/dist/ui-kit/brandlab-skin.d.ts +0 -112
  46. package/dist/ui-kit/brandlab-skin.d.ts.map +0 -1
  47. package/dist/ui-kit/brandlab-skin.js +0 -2
  48. package/dist/ui-kit/brandlab-skin.js.map +0 -1
  49. package/dist/ui-kit/form/copy.d.ts +0 -3
  50. package/dist/ui-kit/form/copy.d.ts.map +0 -1
  51. package/dist/ui-kit/form/copy.js +0 -5
  52. package/dist/ui-kit/form/copy.js.map +0 -1
  53. package/dist/ui-kit/form/dialog.d.ts +0 -24
  54. package/dist/ui-kit/form/dialog.d.ts.map +0 -1
  55. package/dist/ui-kit/form/dialog.js +0 -17
  56. package/dist/ui-kit/form/dialog.js.map +0 -1
  57. package/dist/ui-kit/form/field.d.ts +0 -30
  58. package/dist/ui-kit/form/field.d.ts.map +0 -1
  59. package/dist/ui-kit/form/field.js +0 -11
  60. package/dist/ui-kit/form/field.js.map +0 -1
  61. package/dist/ui-kit/form/index.d.ts +0 -7
  62. package/dist/ui-kit/form/index.d.ts.map +0 -1
  63. package/dist/ui-kit/form/index.js +0 -7
  64. package/dist/ui-kit/form/index.js.map +0 -1
  65. package/dist/ui-kit/form/photo-upload.d.ts +0 -40
  66. package/dist/ui-kit/form/photo-upload.d.ts.map +0 -1
  67. package/dist/ui-kit/form/photo-upload.js +0 -19
  68. package/dist/ui-kit/form/photo-upload.js.map +0 -1
  69. package/dist/ui-kit/form/quote-dialog.d.ts +0 -15
  70. package/dist/ui-kit/form/quote-dialog.d.ts.map +0 -1
  71. package/dist/ui-kit/form/quote-dialog.js +0 -68
  72. package/dist/ui-kit/form/quote-dialog.js.map +0 -1
  73. package/dist/ui-kit/form/quote-form.d.ts +0 -172
  74. package/dist/ui-kit/form/quote-form.d.ts.map +0 -1
  75. package/dist/ui-kit/form/quote-form.js +0 -238
  76. package/dist/ui-kit/form/quote-form.js.map +0 -1
  77. package/dist/ui-kit/form/thank-you.d.ts +0 -40
  78. package/dist/ui-kit/form/thank-you.d.ts.map +0 -1
  79. package/dist/ui-kit/form/thank-you.js +0 -36
  80. package/dist/ui-kit/form/thank-you.js.map +0 -1
  81. package/dist/ui-kit/icon-glyphs.d.ts +0 -41
  82. package/dist/ui-kit/icon-glyphs.d.ts.map +0 -1
  83. package/dist/ui-kit/icon-glyphs.js +0 -138
  84. package/dist/ui-kit/icon-glyphs.js.map +0 -1
  85. package/dist/ui-kit/icon-sprite.d.ts +0 -19
  86. package/dist/ui-kit/icon-sprite.d.ts.map +0 -1
  87. package/dist/ui-kit/icon-sprite.js +0 -44
  88. package/dist/ui-kit/icon-sprite.js.map +0 -1
  89. package/dist/ui-kit/icons.d.ts +0 -50
  90. package/dist/ui-kit/icons.d.ts.map +0 -1
  91. package/dist/ui-kit/icons.js +0 -55
  92. package/dist/ui-kit/icons.js.map +0 -1
  93. package/dist/ui-kit/prefetch.d.ts +0 -59
  94. package/dist/ui-kit/prefetch.d.ts.map +0 -1
  95. package/dist/ui-kit/prefetch.js +0 -63
  96. package/dist/ui-kit/prefetch.js.map +0 -1
  97. package/dist/ui-kit/primitives/badge.d.ts +0 -25
  98. package/dist/ui-kit/primitives/badge.d.ts.map +0 -1
  99. package/dist/ui-kit/primitives/badge.js +0 -21
  100. package/dist/ui-kit/primitives/badge.js.map +0 -1
  101. package/dist/ui-kit/primitives/breadcrumbs.d.ts +0 -27
  102. package/dist/ui-kit/primitives/breadcrumbs.d.ts.map +0 -1
  103. package/dist/ui-kit/primitives/breadcrumbs.js +0 -40
  104. package/dist/ui-kit/primitives/breadcrumbs.js.map +0 -1
  105. package/dist/ui-kit/primitives/button.d.ts +0 -32
  106. package/dist/ui-kit/primitives/button.d.ts.map +0 -1
  107. package/dist/ui-kit/primitives/button.js +0 -8
  108. package/dist/ui-kit/primitives/button.js.map +0 -1
  109. package/dist/ui-kit/primitives/card.d.ts +0 -40
  110. package/dist/ui-kit/primitives/card.d.ts.map +0 -1
  111. package/dist/ui-kit/primitives/card.js +0 -8
  112. package/dist/ui-kit/primitives/card.js.map +0 -1
  113. package/dist/ui-kit/primitives/index.d.ts +0 -16
  114. package/dist/ui-kit/primitives/index.d.ts.map +0 -1
  115. package/dist/ui-kit/primitives/index.js +0 -16
  116. package/dist/ui-kit/primitives/index.js.map +0 -1
  117. package/dist/ui-kit/primitives/layout.d.ts +0 -85
  118. package/dist/ui-kit/primitives/layout.d.ts.map +0 -1
  119. package/dist/ui-kit/primitives/layout.js +0 -52
  120. package/dist/ui-kit/primitives/layout.js.map +0 -1
  121. package/dist/ui-kit/primitives/links.d.ts +0 -74
  122. package/dist/ui-kit/primitives/links.d.ts.map +0 -1
  123. package/dist/ui-kit/primitives/links.js +0 -41
  124. package/dist/ui-kit/primitives/links.js.map +0 -1
  125. package/dist/ui-kit/primitives/lists.d.ts +0 -51
  126. package/dist/ui-kit/primitives/lists.d.ts.map +0 -1
  127. package/dist/ui-kit/primitives/lists.js +0 -34
  128. package/dist/ui-kit/primitives/lists.js.map +0 -1
  129. package/dist/ui-kit/primitives/media-frame.d.ts +0 -33
  130. package/dist/ui-kit/primitives/media-frame.d.ts.map +0 -1
  131. package/dist/ui-kit/primitives/media-frame.js +0 -61
  132. package/dist/ui-kit/primitives/media-frame.js.map +0 -1
  133. package/dist/ui-kit/primitives/media.d.ts +0 -40
  134. package/dist/ui-kit/primitives/media.d.ts.map +0 -1
  135. package/dist/ui-kit/primitives/media.js +0 -9
  136. package/dist/ui-kit/primitives/media.js.map +0 -1
  137. package/dist/ui-kit/primitives/quote-button.d.ts +0 -46
  138. package/dist/ui-kit/primitives/quote-button.d.ts.map +0 -1
  139. package/dist/ui-kit/primitives/quote-button.js +0 -38
  140. package/dist/ui-kit/primitives/quote-button.js.map +0 -1
  141. package/dist/ui-kit/primitives/stat.d.ts +0 -25
  142. package/dist/ui-kit/primitives/stat.d.ts.map +0 -1
  143. package/dist/ui-kit/primitives/stat.js +0 -7
  144. package/dist/ui-kit/primitives/stat.js.map +0 -1
  145. package/dist/ui-kit/repeated-slots.d.ts +0 -153
  146. package/dist/ui-kit/repeated-slots.d.ts.map +0 -1
  147. package/dist/ui-kit/repeated-slots.js +0 -100
  148. package/dist/ui-kit/repeated-slots.js.map +0 -1
  149. package/dist/ui-kit/sections/accordion.d.ts +0 -28
  150. package/dist/ui-kit/sections/accordion.d.ts.map +0 -1
  151. package/dist/ui-kit/sections/accordion.js +0 -14
  152. package/dist/ui-kit/sections/accordion.js.map +0 -1
  153. package/dist/ui-kit/sections/area-map.d.ts +0 -64
  154. package/dist/ui-kit/sections/area-map.d.ts.map +0 -1
  155. package/dist/ui-kit/sections/area-map.js +0 -146
  156. package/dist/ui-kit/sections/area-map.js.map +0 -1
  157. package/dist/ui-kit/sections/before-after.d.ts +0 -59
  158. package/dist/ui-kit/sections/before-after.d.ts.map +0 -1
  159. package/dist/ui-kit/sections/before-after.js +0 -42
  160. package/dist/ui-kit/sections/before-after.js.map +0 -1
  161. package/dist/ui-kit/sections/contact-block.d.ts +0 -77
  162. package/dist/ui-kit/sections/contact-block.d.ts.map +0 -1
  163. package/dist/ui-kit/sections/contact-block.js +0 -23
  164. package/dist/ui-kit/sections/contact-block.js.map +0 -1
  165. package/dist/ui-kit/sections/council-rules.d.ts +0 -64
  166. package/dist/ui-kit/sections/council-rules.d.ts.map +0 -1
  167. package/dist/ui-kit/sections/council-rules.js +0 -46
  168. package/dist/ui-kit/sections/council-rules.js.map +0 -1
  169. package/dist/ui-kit/sections/coverage.d.ts +0 -53
  170. package/dist/ui-kit/sections/coverage.d.ts.map +0 -1
  171. package/dist/ui-kit/sections/coverage.js +0 -57
  172. package/dist/ui-kit/sections/coverage.js.map +0 -1
  173. package/dist/ui-kit/sections/cta-band.d.ts +0 -67
  174. package/dist/ui-kit/sections/cta-band.d.ts.map +0 -1
  175. package/dist/ui-kit/sections/cta-band.js +0 -11
  176. package/dist/ui-kit/sections/cta-band.js.map +0 -1
  177. package/dist/ui-kit/sections/emergency-band.d.ts +0 -60
  178. package/dist/ui-kit/sections/emergency-band.d.ts.map +0 -1
  179. package/dist/ui-kit/sections/emergency-band.js +0 -43
  180. package/dist/ui-kit/sections/emergency-band.js.map +0 -1
  181. package/dist/ui-kit/sections/faqs.d.ts +0 -46
  182. package/dist/ui-kit/sections/faqs.d.ts.map +0 -1
  183. package/dist/ui-kit/sections/faqs.js +0 -39
  184. package/dist/ui-kit/sections/faqs.js.map +0 -1
  185. package/dist/ui-kit/sections/gallery.d.ts +0 -60
  186. package/dist/ui-kit/sections/gallery.d.ts.map +0 -1
  187. package/dist/ui-kit/sections/gallery.js +0 -39
  188. package/dist/ui-kit/sections/gallery.js.map +0 -1
  189. package/dist/ui-kit/sections/hero.d.ts +0 -168
  190. package/dist/ui-kit/sections/hero.d.ts.map +0 -1
  191. package/dist/ui-kit/sections/hero.js +0 -147
  192. package/dist/ui-kit/sections/hero.js.map +0 -1
  193. package/dist/ui-kit/sections/index.d.ts +0 -29
  194. package/dist/ui-kit/sections/index.d.ts.map +0 -1
  195. package/dist/ui-kit/sections/index.js +0 -29
  196. package/dist/ui-kit/sections/index.js.map +0 -1
  197. package/dist/ui-kit/sections/licences.d.ts +0 -95
  198. package/dist/ui-kit/sections/licences.d.ts.map +0 -1
  199. package/dist/ui-kit/sections/licences.js +0 -72
  200. package/dist/ui-kit/sections/licences.js.map +0 -1
  201. package/dist/ui-kit/sections/local-facts.d.ts +0 -107
  202. package/dist/ui-kit/sections/local-facts.d.ts.map +0 -1
  203. package/dist/ui-kit/sections/local-facts.js +0 -44
  204. package/dist/ui-kit/sections/local-facts.js.map +0 -1
  205. package/dist/ui-kit/sections/nearby-areas.d.ts +0 -50
  206. package/dist/ui-kit/sections/nearby-areas.d.ts.map +0 -1
  207. package/dist/ui-kit/sections/nearby-areas.js +0 -49
  208. package/dist/ui-kit/sections/nearby-areas.js.map +0 -1
  209. package/dist/ui-kit/sections/nearby-jobs.d.ts +0 -84
  210. package/dist/ui-kit/sections/nearby-jobs.d.ts.map +0 -1
  211. package/dist/ui-kit/sections/nearby-jobs.js +0 -72
  212. package/dist/ui-kit/sections/nearby-jobs.js.map +0 -1
  213. package/dist/ui-kit/sections/page-header.d.ts +0 -29
  214. package/dist/ui-kit/sections/page-header.d.ts.map +0 -1
  215. package/dist/ui-kit/sections/page-header.js +0 -9
  216. package/dist/ui-kit/sections/page-header.js.map +0 -1
  217. package/dist/ui-kit/sections/price-guide.d.ts +0 -59
  218. package/dist/ui-kit/sections/price-guide.d.ts.map +0 -1
  219. package/dist/ui-kit/sections/price-guide.js +0 -28
  220. package/dist/ui-kit/sections/price-guide.js.map +0 -1
  221. package/dist/ui-kit/sections/price-table.d.ts +0 -42
  222. package/dist/ui-kit/sections/price-table.d.ts.map +0 -1
  223. package/dist/ui-kit/sections/price-table.js +0 -29
  224. package/dist/ui-kit/sections/price-table.js.map +0 -1
  225. package/dist/ui-kit/sections/projects.d.ts +0 -79
  226. package/dist/ui-kit/sections/projects.d.ts.map +0 -1
  227. package/dist/ui-kit/sections/projects.js +0 -69
  228. package/dist/ui-kit/sections/projects.js.map +0 -1
  229. package/dist/ui-kit/sections/proof-strip.d.ts +0 -68
  230. package/dist/ui-kit/sections/proof-strip.d.ts.map +0 -1
  231. package/dist/ui-kit/sections/proof-strip.js +0 -27
  232. package/dist/ui-kit/sections/proof-strip.js.map +0 -1
  233. package/dist/ui-kit/sections/quote-checklist.d.ts +0 -43
  234. package/dist/ui-kit/sections/quote-checklist.d.ts.map +0 -1
  235. package/dist/ui-kit/sections/quote-checklist.js +0 -19
  236. package/dist/ui-kit/sections/quote-checklist.js.map +0 -1
  237. package/dist/ui-kit/sections/rating-chip.d.ts +0 -35
  238. package/dist/ui-kit/sections/rating-chip.d.ts.map +0 -1
  239. package/dist/ui-kit/sections/rating-chip.js +0 -21
  240. package/dist/ui-kit/sections/rating-chip.js.map +0 -1
  241. package/dist/ui-kit/sections/related-services.d.ts +0 -41
  242. package/dist/ui-kit/sections/related-services.d.ts.map +0 -1
  243. package/dist/ui-kit/sections/related-services.js +0 -52
  244. package/dist/ui-kit/sections/related-services.js.map +0 -1
  245. package/dist/ui-kit/sections/reviews-band.d.ts +0 -124
  246. package/dist/ui-kit/sections/reviews-band.d.ts.map +0 -1
  247. package/dist/ui-kit/sections/reviews-band.js +0 -115
  248. package/dist/ui-kit/sections/reviews-band.js.map +0 -1
  249. package/dist/ui-kit/sections/section-sequence.d.ts +0 -41
  250. package/dist/ui-kit/sections/section-sequence.d.ts.map +0 -1
  251. package/dist/ui-kit/sections/section-sequence.js +0 -36
  252. package/dist/ui-kit/sections/section-sequence.js.map +0 -1
  253. package/dist/ui-kit/sections/services-grid.d.ts +0 -82
  254. package/dist/ui-kit/sections/services-grid.d.ts.map +0 -1
  255. package/dist/ui-kit/sections/services-grid.js +0 -90
  256. package/dist/ui-kit/sections/services-grid.js.map +0 -1
  257. package/dist/ui-kit/sections/signature-section.d.ts +0 -42
  258. package/dist/ui-kit/sections/signature-section.d.ts.map +0 -1
  259. package/dist/ui-kit/sections/signature-section.js +0 -14
  260. package/dist/ui-kit/sections/signature-section.js.map +0 -1
  261. package/dist/ui-kit/sections/site-footer-columns.d.ts +0 -12
  262. package/dist/ui-kit/sections/site-footer-columns.d.ts.map +0 -1
  263. package/dist/ui-kit/sections/site-footer-columns.js +0 -63
  264. package/dist/ui-kit/sections/site-footer-columns.js.map +0 -1
  265. package/dist/ui-kit/sections/site-footer.d.ts +0 -66
  266. package/dist/ui-kit/sections/site-footer.d.ts.map +0 -1
  267. package/dist/ui-kit/sections/site-footer.js +0 -49
  268. package/dist/ui-kit/sections/site-footer.js.map +0 -1
  269. package/dist/ui-kit/sections/work-photos.d.ts +0 -15
  270. package/dist/ui-kit/sections/work-photos.d.ts.map +0 -1
  271. package/dist/ui-kit/sections/work-photos.js +0 -24
  272. package/dist/ui-kit/sections/work-photos.js.map +0 -1
  273. package/dist/ui-kit/shell/back-to-top-client.d.ts +0 -9
  274. package/dist/ui-kit/shell/back-to-top-client.d.ts.map +0 -1
  275. package/dist/ui-kit/shell/back-to-top-client.js +0 -8
  276. package/dist/ui-kit/shell/back-to-top-client.js.map +0 -1
  277. package/dist/ui-kit/shell/back-to-top.d.ts +0 -13
  278. package/dist/ui-kit/shell/back-to-top.d.ts.map +0 -1
  279. package/dist/ui-kit/shell/back-to-top.js +0 -14
  280. package/dist/ui-kit/shell/back-to-top.js.map +0 -1
  281. package/dist/ui-kit/shell/call-bar-client.d.ts +0 -8
  282. package/dist/ui-kit/shell/call-bar-client.d.ts.map +0 -1
  283. package/dist/ui-kit/shell/call-bar-client.js +0 -13
  284. package/dist/ui-kit/shell/call-bar-client.js.map +0 -1
  285. package/dist/ui-kit/shell/current-link.d.ts +0 -45
  286. package/dist/ui-kit/shell/current-link.d.ts.map +0 -1
  287. package/dist/ui-kit/shell/current-link.js +0 -54
  288. package/dist/ui-kit/shell/current-link.js.map +0 -1
  289. package/dist/ui-kit/shell/drawer-client.d.ts +0 -22
  290. package/dist/ui-kit/shell/drawer-client.d.ts.map +0 -1
  291. package/dist/ui-kit/shell/drawer-client.js +0 -70
  292. package/dist/ui-kit/shell/drawer-client.js.map +0 -1
  293. package/dist/ui-kit/shell/header-client.d.ts +0 -44
  294. package/dist/ui-kit/shell/header-client.d.ts.map +0 -1
  295. package/dist/ui-kit/shell/header-client.js +0 -59
  296. package/dist/ui-kit/shell/header-client.js.map +0 -1
  297. package/dist/ui-kit/shell/index.d.ts +0 -7
  298. package/dist/ui-kit/shell/index.d.ts.map +0 -1
  299. package/dist/ui-kit/shell/index.js +0 -7
  300. package/dist/ui-kit/shell/index.js.map +0 -1
  301. package/dist/ui-kit/shell/intent-prefetch.d.ts +0 -4
  302. package/dist/ui-kit/shell/intent-prefetch.d.ts.map +0 -1
  303. package/dist/ui-kit/shell/intent-prefetch.js +0 -62
  304. package/dist/ui-kit/shell/intent-prefetch.js.map +0 -1
  305. package/dist/ui-kit/shell/mobile-call-bar.d.ts +0 -25
  306. package/dist/ui-kit/shell/mobile-call-bar.d.ts.map +0 -1
  307. package/dist/ui-kit/shell/mobile-call-bar.js +0 -21
  308. package/dist/ui-kit/shell/mobile-call-bar.js.map +0 -1
  309. package/dist/ui-kit/shell/mobile-drawer.d.ts +0 -41
  310. package/dist/ui-kit/shell/mobile-drawer.d.ts.map +0 -1
  311. package/dist/ui-kit/shell/mobile-drawer.js +0 -41
  312. package/dist/ui-kit/shell/mobile-drawer.js.map +0 -1
  313. package/dist/ui-kit/shell/shell-context.d.ts +0 -3
  314. package/dist/ui-kit/shell/shell-context.d.ts.map +0 -1
  315. package/dist/ui-kit/shell/shell-context.js +0 -5
  316. package/dist/ui-kit/shell/shell-context.js.map +0 -1
  317. package/dist/ui-kit/shell/shell-quote.d.ts +0 -10
  318. package/dist/ui-kit/shell/shell-quote.d.ts.map +0 -1
  319. package/dist/ui-kit/shell/shell-quote.js +0 -13
  320. package/dist/ui-kit/shell/shell-quote.js.map +0 -1
  321. package/dist/ui-kit/shell/site-header.d.ts +0 -55
  322. package/dist/ui-kit/shell/site-header.d.ts.map +0 -1
  323. package/dist/ui-kit/shell/site-header.js +0 -35
  324. package/dist/ui-kit/shell/site-header.js.map +0 -1
  325. package/dist/ui-kit/shell/social-links.d.ts +0 -7
  326. package/dist/ui-kit/shell/social-links.d.ts.map +0 -1
  327. package/dist/ui-kit/shell/social-links.js +0 -12
  328. package/dist/ui-kit/shell/social-links.js.map +0 -1
  329. package/dist/ui-kit/shell/utility-bar.d.ts +0 -33
  330. package/dist/ui-kit/shell/utility-bar.d.ts.map +0 -1
  331. package/dist/ui-kit/shell/utility-bar.js +0 -15
  332. package/dist/ui-kit/shell/utility-bar.js.map +0 -1
  333. package/dist/ui-kit/skin-index.d.ts +0 -4
  334. package/dist/ui-kit/skin-index.d.ts.map +0 -1
  335. package/dist/ui-kit/skin-index.js +0 -3
  336. package/dist/ui-kit/skin-index.js.map +0 -1
  337. package/dist/ui-kit/skin.d.ts +0 -65
  338. package/dist/ui-kit/skin.d.ts.map +0 -1
  339. package/dist/ui-kit/skin.js +0 -60
  340. package/dist/ui-kit/skin.js.map +0 -1
  341. package/dist/ui-kit/structure.css +0 -2546
  342. package/dist/ui-kit/types.d.ts +0 -27
  343. package/dist/ui-kit/types.d.ts.map +0 -1
  344. package/dist/ui-kit/types.js +0 -6
  345. package/dist/ui-kit/types.js.map +0 -1
@@ -1,70 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- /**
4
- * The drawer's client leaf: the Menu button and the modal `<dialog>` (top layer, the page inert, focus kept inside).
5
- * The menu, the actions and the social links are server-rendered children. The drawer closes on Escape, the close
6
- * button, a tap on the backdrop, a link click, a route change and any change of the header's mode (crossing 1024 or
7
- * 1200 px), so the page is never left inert. Groups are `<details name>` (one open at a time, no script needed); the
8
- * toggle listener below keeps that rule in browsers without exclusive `<details>`.
9
- */
10
- import { usePathname } from 'next/navigation';
11
- import { useCallback, useContext, useEffect, useRef, useState } from 'react';
12
- import { HeaderModeContext } from './shell-context.js';
13
- export function DrawerController({ id, variant, side, classes, logo, menuIcon, closeIcon, children, }) {
14
- const pathname = usePathname();
15
- const mode = useContext(HeaderModeContext);
16
- const dialogRef = useRef(null);
17
- const buttonRef = useRef(null);
18
- const closeRef = useRef(null);
19
- const [open, setOpen] = useState(false);
20
- const titleId = `${id}-title`;
21
- const close = useCallback(() => {
22
- const dialog = dialogRef.current;
23
- if (dialog?.open)
24
- dialog.close();
25
- }, []);
26
- const show = () => {
27
- const dialog = dialogRef.current;
28
- if (!dialog || dialog.open)
29
- return;
30
- for (const group of dialog.querySelectorAll('details[open]'))
31
- group.open = false;
32
- dialog.showModal();
33
- // The close button comes first in focus order and takes focus when the drawer opens.
34
- closeRef.current?.focus();
35
- setOpen(true);
36
- };
37
- // A route change or a mode change (breakpoint crossing) resets the drawer.
38
- useEffect(() => {
39
- close();
40
- }, [pathname, mode, close]);
41
- useEffect(() => {
42
- const dialog = dialogRef.current;
43
- if (!dialog)
44
- return;
45
- const onToggle = (event) => {
46
- const opened = event.target;
47
- if (!(opened instanceof HTMLDetailsElement) || !opened.open)
48
- return;
49
- for (const other of dialog.querySelectorAll('details[open]'))
50
- if (other !== opened)
51
- other.open = false;
52
- };
53
- dialog.addEventListener('toggle', onToggle, true);
54
- return () => dialog.removeEventListener('toggle', onToggle, true);
55
- }, []);
56
- return (_jsxs(_Fragment, { children: [_jsxs("button", { ref: buttonRef, type: "button", "data-slot": "menuButton", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": id, className: classes.menuButton, onClick: show, children: [menuIcon, _jsx("span", { "data-slot": "menuLabel", className: classes.menuLabel, children: "Menu" })] }), _jsx("dialog", { ref: dialogRef, id: id, "data-bl": "drawer", "data-variant": variant, "data-side": side, "aria-labelledby": titleId, className: classes.root, ...{ closedby: 'any' }, onClose: () => {
57
- setOpen(false);
58
- // Safari doesn't focus a clicked button, so the dialog may have nothing to return focus to.
59
- const active = document.activeElement;
60
- if (!active || active === document.body || dialogRef.current?.contains(active))
61
- buttonRef.current?.focus();
62
- }, onClick: (event) => {
63
- // A tap on the backdrop (where closedby="any" isn't supported yet) or on any link closes the drawer.
64
- if (event.target === dialogRef.current)
65
- close();
66
- else if (event.target.closest('a[href]'))
67
- close();
68
- }, children: _jsxs("div", { "data-slot": "panel", className: classes.panel, children: [_jsxs("div", { "data-slot": "top", className: classes.top, children: [_jsx("button", { ref: closeRef, type: "button", "data-slot": "close", "aria-label": "Close menu", className: classes.close, onClick: close, children: closeIcon }), _jsx("p", { id: titleId, "data-slot": "title", className: classes.title, children: "Menu" }), logo ? (_jsx("span", { "data-slot": "logo", "aria-hidden": "true", className: classes.logo, children: logo })) : null] }), children] }) })] }));
69
- }
70
- //# sourceMappingURL=drawer-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-client.js","sourceRoot":"","sources":["../../../src/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IAAI,GACA,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,QAAQ,IACL,GACC,IACR,CACJ,CAAA;AACH,CAAC","sourcesContent":["'use client'\n\n/**\n * The drawer's client leaf: the Menu button and the modal `<dialog>` (top layer, the page inert, focus kept inside).\n * The menu, the actions and the social links are server-rendered children. The drawer closes on Escape, the close\n * button, a tap on the backdrop, a link click, a route change and any change of the header's mode (crossing 1024 or\n * 1200 px), so the page is never left inert. Groups are `<details name>` (one open at a time, no script needed); the\n * toggle listener below keeps that rule in browsers without exclusive `<details>`.\n */\nimport { usePathname } from 'next/navigation'\nimport { useCallback, useContext, useEffect, useRef, useState, type ReactNode } from 'react'\nimport { HeaderModeContext } from './shell-context.js'\n\nexport interface DrawerControllerClasses {\n readonly root?: string | undefined\n readonly menuButton?: string | undefined\n readonly menuLabel?: string | undefined\n readonly panel?: string | undefined\n readonly top?: string | undefined\n readonly close?: string | undefined\n readonly title?: string | undefined\n readonly logo?: string | undefined\n}\n\nexport function DrawerController({\n id,\n variant,\n side,\n classes,\n logo,\n menuIcon,\n closeIcon,\n children,\n}: {\n readonly id: string\n readonly variant: string\n readonly side: string\n readonly classes: DrawerControllerClasses\n readonly logo?: ReactNode\n readonly menuIcon: ReactNode\n readonly closeIcon: ReactNode\n readonly children: ReactNode\n}) {\n const pathname = usePathname()\n const mode = useContext(HeaderModeContext)\n const dialogRef = useRef<HTMLDialogElement>(null)\n const buttonRef = useRef<HTMLButtonElement>(null)\n const closeRef = useRef<HTMLButtonElement>(null)\n const [open, setOpen] = useState(false)\n const titleId = `${id}-title`\n\n const close = useCallback(() => {\n const dialog = dialogRef.current\n if (dialog?.open) dialog.close()\n }, [])\n\n const show = () => {\n const dialog = dialogRef.current\n if (!dialog || dialog.open) return\n for (const group of dialog.querySelectorAll<HTMLDetailsElement>('details[open]')) group.open = false\n dialog.showModal()\n // The close button comes first in focus order and takes focus when the drawer opens.\n closeRef.current?.focus()\n setOpen(true)\n }\n\n // A route change or a mode change (breakpoint crossing) resets the drawer.\n useEffect(() => {\n close()\n }, [pathname, mode, close])\n\n useEffect(() => {\n const dialog = dialogRef.current\n if (!dialog) return\n const onToggle = (event: Event) => {\n const opened = event.target\n if (!(opened instanceof HTMLDetailsElement) || !opened.open) return\n for (const other of dialog.querySelectorAll<HTMLDetailsElement>('details[open]')) if (other !== opened) other.open = false\n }\n dialog.addEventListener('toggle', onToggle, true)\n return () => dialog.removeEventListener('toggle', onToggle, true)\n }, [])\n\n return (\n <>\n <button\n ref={buttonRef}\n type=\"button\"\n data-slot=\"menuButton\"\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n aria-controls={id}\n className={classes.menuButton}\n onClick={show}\n >\n {menuIcon}\n <span data-slot=\"menuLabel\" className={classes.menuLabel}>\n Menu\n </span>\n </button>\n <dialog\n ref={dialogRef}\n id={id}\n data-bl=\"drawer\"\n data-variant={variant}\n data-side={side}\n aria-labelledby={titleId}\n className={classes.root}\n {...({ closedby: 'any' } as Record<string, string>)}\n onClose={() => {\n setOpen(false)\n // Safari doesn't focus a clicked button, so the dialog may have nothing to return focus to.\n const active = document.activeElement\n if (!active || active === document.body || dialogRef.current?.contains(active)) buttonRef.current?.focus()\n }}\n onClick={(event) => {\n // A tap on the backdrop (where closedby=\"any\" isn't supported yet) or on any link closes the drawer.\n if (event.target === dialogRef.current) close()\n else if ((event.target as Element).closest('a[href]')) close()\n }}\n >\n <div data-slot=\"panel\" className={classes.panel}>\n <div data-slot=\"top\" className={classes.top}>\n <button ref={closeRef} type=\"button\" data-slot=\"close\" aria-label=\"Close menu\" className={classes.close} onClick={close}>\n {closeIcon}\n </button>\n <p id={titleId} data-slot=\"title\" className={classes.title}>\n Menu\n </p>\n {logo ? (\n <span data-slot=\"logo\" aria-hidden=\"true\" className={classes.logo}>\n {logo}\n </span>\n ) : null}\n </div>\n {children}\n </div>\n </dialog>\n </>\n )\n}\n"]}
@@ -1,44 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- /** The `<header>` root: measures the header (mode, height, compact) and shares its mode. */
3
- export declare function HeaderRoot({ variant, navAlign, compactAfterScroll, className, children, }: {
4
- readonly variant: string;
5
- readonly navAlign: string;
6
- readonly compactAfterScroll: boolean;
7
- readonly className?: string | undefined;
8
- readonly children: ReactNode;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- /** The `<nav>` landmark and the menu state (F3 engine) for the items inside it. */
11
- export declare function NavController({ label, className, children }: {
12
- readonly label: string;
13
- readonly className?: string | undefined;
14
- readonly children: ReactNode;
15
- }): import("react/jsx-runtime").JSX.Element;
16
- /**
17
- * One top-level item. `data-current` marks the current section: the page is the item's hub or one of its active
18
- * paths (or below them), or one of its panel links is the current page.
19
- */
20
- export declare function NavItem({ menuId, paths, className, children, }: {
21
- /** Set for an item with a panel. */
22
- readonly menuId?: string;
23
- readonly paths: readonly string[];
24
- readonly className?: string | undefined;
25
- readonly children: ReactNode;
26
- }): import("react/jsx-runtime").JSX.Element;
27
- /** The disclosure button beside an item's hub link, named "{label} menu". */
28
- export declare function NavTrigger({ menuId, panelId, label, className, children, }: {
29
- readonly menuId: string;
30
- readonly panelId: string;
31
- readonly label: string;
32
- readonly className?: string | undefined;
33
- readonly children: ReactNode;
34
- }): import("react/jsx-runtime").JSX.Element;
35
- /** The panel box. Its links are the server-rendered children; the panel only changes state. */
36
- export declare function NavPanel({ menuId, panelId, variant, columns, className, children, }: {
37
- readonly menuId: string;
38
- readonly panelId: string;
39
- readonly variant: string;
40
- readonly columns?: number | undefined;
41
- readonly className?: string | undefined;
42
- readonly children: ReactNode;
43
- }): import("react/jsx-runtime").JSX.Element;
44
- //# sourceMappingURL=header-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"header-client.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/shell/header-client.tsx"],"names":[],"mappings":"AASA,OAAO,EAA0D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAM9F,4FAA4F;AAC5F,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,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CAAA;CAC7B,2CAgBA;AAED,+FAA+F;AAC/F,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,2CAkBA"}
@@ -1,59 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- /**
4
- * The header's client leaves. They receive ids, labels, flags and class strings only; every link and panel is
5
- * server-rendered and passed in as `children`. The leaves toggle `data-state`, `aria-expanded` and `inert` on those
6
- * server nodes, so opening a panel never re-renders its links. `inert` is added only after hydration: closed panels
7
- * are `visibility: hidden` in the server HTML, and inert content would break the pre-hydration hover fallback.
8
- */
9
- import { usePathname } from 'next/navigation';
10
- import { createContext, useContext, useEffect, useRef, useState } from 'react';
11
- import { useHeaderMetrics } from '../../navigation/use-header-metrics.js';
12
- import { useNavigationMenu } from '../../navigation/use-navigation-menu.js';
13
- import { isCurrentSection } from './current-link.js';
14
- import { HeaderModeContext } from './shell-context.js';
15
- /** The `<header>` root: measures the header (mode, height, compact) and shares its mode. */
16
- export function HeaderRoot({ variant, navAlign, compactAfterScroll, className, children, }) {
17
- const ref = useRef(null);
18
- const { mode } = useHeaderMetrics(ref, { compactAfterScroll });
19
- return (_jsx("header", { ref: ref, "data-bl": "header", "data-variant": variant, "data-nav-align": navAlign, className: className, children: _jsx(HeaderModeContext, { value: mode, children: children }) }));
20
- }
21
- const NavContext = createContext(null);
22
- /** The `<nav>` landmark and the menu state (F3 engine) for the items inside it. */
23
- export function NavController({ label, className, children }) {
24
- const navRef = useRef(null);
25
- const pathname = usePathname();
26
- const mode = useContext(HeaderModeContext);
27
- const menu = useNavigationMenu(navRef, `${pathname}|${mode}`);
28
- const [hydrated, setHydrated] = useState(false);
29
- useEffect(() => setHydrated(true), []);
30
- return (_jsx("nav", { ref: navRef, "aria-label": label, "data-slot": "nav", className: className, children: _jsx(NavContext, { value: { menu, hydrated }, children: children }) }));
31
- }
32
- /**
33
- * One top-level item. `data-current` marks the current section: the page is the item's hub or one of its active
34
- * paths (or below them), or one of its panel links is the current page.
35
- */
36
- export function NavItem({ menuId, paths, className, children, }) {
37
- const ref = useRef(null);
38
- const pathname = usePathname();
39
- const nav = useContext(NavContext);
40
- const [panelLinkCurrent, setPanelLinkCurrent] = useState(false);
41
- useEffect(() => {
42
- setPanelLinkCurrent(ref.current?.querySelector('[data-slot="panel"] [aria-current="page"]') != null);
43
- }, [pathname]);
44
- const current = panelLinkCurrent || isCurrentSection(pathname, paths);
45
- const open = menuId !== undefined && nav?.menu.openId === menuId;
46
- return (_jsx("li", { ref: ref, "data-slot": "item", "data-has-panel": menuId !== undefined ? 'true' : undefined, "data-state": menuId !== undefined ? (open ? 'open' : 'closed') : undefined, "data-current": current ? 'true' : undefined, className: className, ...(menuId !== undefined && nav ? nav.menu.itemHandlers(menuId) : {}), children: children }));
47
- }
48
- /** The disclosure button beside an item's hub link, named "{label} menu". */
49
- export function NavTrigger({ menuId, panelId, label, className, children, }) {
50
- const nav = useContext(NavContext);
51
- return (_jsx("button", { type: "button", "data-slot": "trigger", "data-menu-id": menuId, "aria-expanded": nav?.menu.openId === menuId, "aria-controls": panelId, "aria-label": `${label} menu`, className: className, ...nav?.menu.triggerHandlers(menuId), children: children }));
52
- }
53
- /** The panel box. Its links are the server-rendered children; the panel only changes state. */
54
- export function NavPanel({ menuId, panelId, variant, columns, className, children, }) {
55
- const nav = useContext(NavContext);
56
- const open = nav?.menu.openId === menuId;
57
- return (_jsx("div", { id: panelId, "data-slot": "panel", "data-menu-id": menuId, "data-variant": variant, "data-columns": columns, "data-state": open ? 'open' : 'closed', inert: Boolean(nav?.hydrated) && !open, className: className, ...nav?.menu.panelHandlers(menuId), children: children }));
58
- }
59
- //# sourceMappingURL=header-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"header-client.js","sourceRoot":"","sources":["../../../src/ui-kit/shell/header-client.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,yCAAyC,CAAA;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtD,4FAA4F;AAC5F,MAAM,UAAU,UAAU,CAAC,EACzB,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,QAAQ,GAOT;IACC,MAAM,GAAG,GAAG,MAAM,CAAc,IAAI,CAAC,CAAA;IACrC,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC,GAAG,EAAE,EAAE,kBAAkB,EAAE,CAAC,CAAA;IAC9D,OAAO,CACL,iBAAQ,GAAG,EAAE,GAAG,aAAU,QAAQ,kBAAe,OAAO,oBAAkB,QAAQ,EAAE,SAAS,EAAE,SAAS,YACtG,KAAC,iBAAiB,IAAC,KAAK,EAAE,IAAI,YAAG,QAAQ,GAAqB,GACvD,CACV,CAAA;AACH,CAAC;AAOD,MAAM,UAAU,GAAG,aAAa,CAAkB,IAAI,CAAC,CAAA;AAEvD,mFAAmF;AACnF,MAAM,UAAU,aAAa,CA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AC,UAAU,CAAC,CAAA;IAClC,MAAM,IAAI,GAAG,GAAG,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM,CAAA;IACxC,OAAO,CACL,cACE,EAAE,EAAE,OAAO,eACD,OAAO,kBACH,MAAM,kBACN,OAAO,kBACP,OAAO,gBACT,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EACpC,KAAK,EAAE,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EACtC,SAAS,EAAE,SAAS,KAChB,GAAG,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,YAElC,QAAQ,GACL,CACP,CAAA;AACH,CAAC","sourcesContent":["'use client'\n\n/**\n * The header's client leaves. They receive ids, labels, flags and class strings only; every link and panel is\n * server-rendered and passed in as `children`. The leaves toggle `data-state`, `aria-expanded` and `inert` on those\n * server nodes, so opening a panel never re-renders its links. `inert` is added only after hydration: closed panels\n * are `visibility: hidden` in the server HTML, and inert content would break the pre-hydration hover fallback.\n */\nimport { usePathname } from 'next/navigation'\nimport { createContext, useContext, useEffect, useRef, useState, type ReactNode } from 'react'\nimport { useHeaderMetrics } from '../../navigation/use-header-metrics.js'\nimport { useNavigationMenu, type NavigationMenu } from '../../navigation/use-navigation-menu.js'\nimport { isCurrentSection } from './current-link.js'\nimport { HeaderModeContext } from './shell-context.js'\n\n/** The `<header>` root: measures the header (mode, height, compact) and shares its mode. */\nexport function HeaderRoot({\n variant,\n navAlign,\n compactAfterScroll,\n className,\n children,\n}: {\n readonly variant: string\n readonly navAlign: string\n readonly compactAfterScroll: boolean\n readonly className?: string | undefined\n readonly children: ReactNode\n}) {\n const ref = useRef<HTMLElement>(null)\n const { mode } = useHeaderMetrics(ref, { compactAfterScroll })\n return (\n <header ref={ref} data-bl=\"header\" data-variant={variant} data-nav-align={navAlign} className={className}>\n <HeaderModeContext value={mode}>{children}</HeaderModeContext>\n </header>\n )\n}\n\ninterface NavState {\n readonly menu: NavigationMenu\n readonly hydrated: boolean\n}\n\nconst NavContext = createContext<NavState | null>(null)\n\n/** The `<nav>` landmark and the menu state (F3 engine) for the items inside it. */\nexport function NavController({ label, className, children }: { readonly label: string; readonly className?: string | undefined; readonly children: ReactNode }) {\n const navRef = useRef<HTMLElement>(null)\n const pathname = usePathname()\n const mode = useContext(HeaderModeContext)\n const menu = useNavigationMenu(navRef, `${pathname}|${mode}`)\n const [hydrated, setHydrated] = useState(false)\n useEffect(() => setHydrated(true), [])\n return (\n <nav ref={navRef} aria-label={label} data-slot=\"nav\" className={className}>\n <NavContext value={{ menu, hydrated }}>{children}</NavContext>\n </nav>\n )\n}\n\n/**\n * One top-level item. `data-current` marks the current section: the page is the item's hub or one of its active\n * paths (or below them), or one of its panel links is the current page.\n */\nexport function NavItem({\n menuId,\n paths,\n className,\n children,\n}: {\n /** Set for an item with a panel. */\n readonly menuId?: string\n readonly paths: readonly string[]\n readonly className?: string | undefined\n readonly children: ReactNode\n}) {\n const ref = useRef<HTMLLIElement>(null)\n const pathname = usePathname()\n const nav = useContext(NavContext)\n const [panelLinkCurrent, setPanelLinkCurrent] = useState(false)\n useEffect(() => {\n setPanelLinkCurrent(ref.current?.querySelector('[data-slot=\"panel\"] [aria-current=\"page\"]') != null)\n }, [pathname])\n const current = panelLinkCurrent || isCurrentSection(pathname, paths)\n const open = menuId !== undefined && nav?.menu.openId === menuId\n return (\n <li\n ref={ref}\n data-slot=\"item\"\n data-has-panel={menuId !== undefined ? 'true' : undefined}\n data-state={menuId !== undefined ? (open ? 'open' : 'closed') : undefined}\n data-current={current ? 'true' : undefined}\n className={className}\n {...(menuId !== undefined && nav ? nav.menu.itemHandlers(menuId) : {})}\n >\n {children}\n </li>\n )\n}\n\n/** The disclosure button beside an item's hub link, named \"{label} menu\". */\nexport function NavTrigger({\n menuId,\n panelId,\n label,\n className,\n children,\n}: {\n readonly menuId: string\n readonly panelId: string\n readonly label: string\n readonly className?: string | undefined\n readonly children: ReactNode\n}) {\n const nav = useContext(NavContext)\n return (\n <button\n type=\"button\"\n data-slot=\"trigger\"\n data-menu-id={menuId}\n aria-expanded={nav?.menu.openId === menuId}\n aria-controls={panelId}\n aria-label={`${label} menu`}\n className={className}\n {...nav?.menu.triggerHandlers(menuId)}\n >\n {children}\n </button>\n )\n}\n\n/** The panel box. Its links are the server-rendered children; the panel only changes state. */\nexport function NavPanel({\n menuId,\n panelId,\n variant,\n columns,\n className,\n children,\n}: {\n readonly menuId: string\n readonly panelId: string\n readonly variant: string\n readonly columns?: number | undefined\n readonly className?: string | undefined\n readonly children: ReactNode\n}) {\n const nav = useContext(NavContext)\n const open = nav?.menu.openId === menuId\n return (\n <div\n id={panelId}\n data-slot=\"panel\"\n data-menu-id={menuId}\n data-variant={variant}\n data-columns={columns}\n data-state={open ? 'open' : 'closed'}\n inert={Boolean(nav?.hydrated) && !open}\n className={className}\n {...nav?.menu.panelHandlers(menuId)}\n >\n {children}\n </div>\n )\n}\n"]}
@@ -1,7 +0,0 @@
1
- export { SITE_HEADER_VARIANTS, SiteHeader, type SiteHeaderLayout, type SiteHeaderProps, type SiteHeaderSkin, type SiteHeaderSlot, type SiteHeaderVariant, } from './site-header.js';
2
- export { MOBILE_DRAWER_VARIANTS, MobileDrawer, type MobileDrawerLayout, type MobileDrawerProps, type MobileDrawerSkin, type MobileDrawerSlot, type MobileDrawerVariant, type ShellQuote, } from './mobile-drawer.js';
3
- export { UtilityBar, type UtilityBarLayout, type UtilityBarProps, type UtilityBarSkin, type UtilityBarSlot, type UtilityLicence, type UtilityRating, } from './utility-bar.js';
4
- export { MOBILE_CALL_BAR_VARIANTS, MobileCallBar, type MobileCallBarProps, type MobileCallBarSkin, type MobileCallBarSlot, type MobileCallBarVariant, } from './mobile-call-bar.js';
5
- export { BACK_TO_TOP_OFFSETS, BackToTop, type BackToTopLayout, type BackToTopProps, type BackToTopSkin, type BackToTopSlot } from './back-to-top.js';
6
- export { IntentPrefetch, intentPrefetchTarget } from './intent-prefetch.js';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/shell/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,UAAU,GAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACpJ,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA"}
@@ -1,7 +0,0 @@
1
- export { SITE_HEADER_VARIANTS, SiteHeader, } from './site-header.js';
2
- export { MOBILE_DRAWER_VARIANTS, MobileDrawer, } from './mobile-drawer.js';
3
- export { UtilityBar, } from './utility-bar.js';
4
- export { MOBILE_CALL_BAR_VARIANTS, MobileCallBar, } from './mobile-call-bar.js';
5
- export { BACK_TO_TOP_OFFSETS, BackToTop } from './back-to-top.js';
6
- export { IntentPrefetch, intentPrefetchTarget } from './intent-prefetch.js';
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui-kit/shell/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,UAAU,GAMX,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,sBAAsB,EACtB,YAAY,GAOb,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,UAAU,GAOX,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,wBAAwB,EACxB,aAAa,GAKd,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAqF,MAAM,kBAAkB,CAAA;AACpJ,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA","sourcesContent":["export {\n SITE_HEADER_VARIANTS,\n SiteHeader,\n type SiteHeaderLayout,\n type SiteHeaderProps,\n type SiteHeaderSkin,\n type SiteHeaderSlot,\n type SiteHeaderVariant,\n} from './site-header.js'\nexport {\n MOBILE_DRAWER_VARIANTS,\n MobileDrawer,\n type MobileDrawerLayout,\n type MobileDrawerProps,\n type MobileDrawerSkin,\n type MobileDrawerSlot,\n type MobileDrawerVariant,\n type ShellQuote,\n} from './mobile-drawer.js'\nexport {\n UtilityBar,\n type UtilityBarLayout,\n type UtilityBarProps,\n type UtilityBarSkin,\n type UtilityBarSlot,\n type UtilityLicence,\n type UtilityRating,\n} from './utility-bar.js'\nexport {\n MOBILE_CALL_BAR_VARIANTS,\n MobileCallBar,\n type MobileCallBarProps,\n type MobileCallBarSkin,\n type MobileCallBarSlot,\n type MobileCallBarVariant,\n} from './mobile-call-bar.js'\nexport { BACK_TO_TOP_OFFSETS, BackToTop, type BackToTopLayout, type BackToTopProps, type BackToTopSkin, type BackToTopSlot } from './back-to-top.js'\nexport { IntentPrefetch, intentPrefetchTarget } from './intent-prefetch.js'\n"]}
@@ -1,4 +0,0 @@
1
- /** The site path an intent link points to, without its fragment; null for another site or no href. */
2
- export declare function intentPrefetchTarget(href: string | null): string | null;
3
- export declare function IntentPrefetch(): null;
4
- //# sourceMappingURL=intent-prefetch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intent-prefetch.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/shell/intent-prefetch.tsx"],"names":[],"mappings":"AA6BA,sGAAsG;AACtG,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAIvE;AAOD,wBAAgB,cAAc,IAAI,IAAI,CAsBrC"}
@@ -1,62 +0,0 @@
1
- 'use client';
2
- /**
3
- * `IntentPrefetch`: prefetches a top-level header link (from 3.15.0) or an in-content card link when a visitor shows
4
- * intent, not when it scrolls into view. Links with `prefetch="intent"` (ButtonLink, TextLink, QuoteButton and the
5
- * SiteHeader's top-level links) render `prefetch={false}` and
6
- * `data-prefetch="intent"`; this island holds one document listener for pointer entry, focus and touch, and calls
7
- * `router.prefetch(href)` for the one link the visitor points at, focuses or touches, once per page address. A touch
8
- * prefetches only the touched link, never the list around it; the current page and links to other sites are never
9
- * prefetched.
10
- *
11
- * Mount it once, in the root layout, beside the header:
12
- *
13
- * // src/app/layout.tsx
14
- * import { IntentPrefetch } from '@brandlab-digital/site-next/ui-kit/shell'
15
- * <body>
16
- * <SiteHeader … />
17
- * <IntentPrefetch />
18
- * …
19
- * </body>
20
- *
21
- * It renders nothing; without scripts the links still work and simply do not prefetch.
22
- */
23
- import { useRouter } from 'next/navigation';
24
- import { useEffect } from 'react';
25
- import { INTENT_PREFETCH_SELECTOR } from '../prefetch.js';
26
- const INTENT_EVENTS = ['pointerenter', 'focusin', 'touchstart'];
27
- /** The site path an intent link points to, without its fragment; null for another site or no href. */
28
- export function intentPrefetchTarget(href) {
29
- if (!href || !href.startsWith('/') || href.startsWith('//'))
30
- return null;
31
- const target = href.split('#', 1)[0] ?? '';
32
- return target || null;
33
- }
34
- function samePage(target, location) {
35
- const path = (value) => value.replace(/\/+$/, '') || '/';
36
- return path(target.split('?', 1)[0] ?? '') === path(location.pathname);
37
- }
38
- export function IntentPrefetch() {
39
- const router = useRouter();
40
- useEffect(() => {
41
- const prefetched = new Set();
42
- const onIntent = (event) => {
43
- const element = event.target instanceof Element ? event.target : null;
44
- const link = element?.closest(INTENT_PREFETCH_SELECTOR);
45
- const target = intentPrefetchTarget(link?.getAttribute('href') ?? null);
46
- if (!target || prefetched.has(target) || samePage(target, window.location))
47
- return;
48
- prefetched.add(target);
49
- router.prefetch(target);
50
- };
51
- // Capture, so pointerenter (which does not bubble) reaches the document; passive, so touch never waits on it.
52
- const options = { capture: true, passive: true };
53
- for (const type of INTENT_EVENTS)
54
- document.addEventListener(type, onIntent, options);
55
- return () => {
56
- for (const type of INTENT_EVENTS)
57
- document.removeEventListener(type, onIntent, options);
58
- };
59
- }, [router]);
60
- return null;
61
- }
62
- //# sourceMappingURL=intent-prefetch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intent-prefetch.js","sourceRoot":"","sources":["../../../src/ui-kit/shell/intent-prefetch.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,MAAM,aAAa,GAAG,CAAC,cAAc,EAAE,SAAS,EAAE,YAAY,CAAU,CAAA;AAExE,sGAAsG;AACtG,MAAM,UAAU,oBAAoB,CAAC,IAAmB;IACtD,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IACxE,MAAM,MAAM,GAAG,IAAI,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A4B,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;QACzE,KAAK,MAAM,IAAI,IAAI,aAAa;YAAE,QAAQ,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;QACpF,OAAO,GAAG,EAAE;YACV,KAAK,MAAM,IAAI,IAAI,aAAa;gBAAE,QAAQ,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;QACzF,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["'use client'\n\n/**\n * `IntentPrefetch`: prefetches a top-level header link (from 3.15.0) or an in-content card link when a visitor shows\n * intent, not when it scrolls into view. Links with `prefetch=\"intent\"` (ButtonLink, TextLink, QuoteButton and the\n * SiteHeader's top-level links) render `prefetch={false}` and\n * `data-prefetch=\"intent\"`; this island holds one document listener for pointer entry, focus and touch, and calls\n * `router.prefetch(href)` for the one link the visitor points at, focuses or touches, once per page address. A touch\n * prefetches only the touched link, never the list around it; the current page and links to other sites are never\n * prefetched.\n *\n * Mount it once, in the root layout, beside the header:\n *\n * // src/app/layout.tsx\n * import { IntentPrefetch } from '@brandlab-digital/site-next/ui-kit/shell'\n * <body>\n * <SiteHeader … />\n * <IntentPrefetch />\n * …\n * </body>\n *\n * It renders nothing; without scripts the links still work and simply do not prefetch.\n */\nimport { useRouter } from 'next/navigation'\nimport { useEffect } from 'react'\nimport { INTENT_PREFETCH_SELECTOR } from '../prefetch.js'\n\nconst INTENT_EVENTS = ['pointerenter', 'focusin', 'touchstart'] as const\n\n/** The site path an intent link points to, without its fragment; null for another site or no href. */\nexport function intentPrefetchTarget(href: string | null): string | null {\n if (!href || !href.startsWith('/') || href.startsWith('//')) return null\n const target = href.split('#', 1)[0] ?? ''\n return target || null\n}\n\nfunction samePage(target: string, location: Location) {\n const path = (value: string) => value.replace(/\\/+$/, '') || '/'\n return path(target.split('?', 1)[0] ?? '') === path(location.pathname)\n}\n\nexport function IntentPrefetch(): null {\n const router = useRouter()\n\n useEffect(() => {\n const prefetched = new Set<string>()\n const onIntent = (event: Event) => {\n const element = event.target instanceof Element ? event.target : null\n const link = element?.closest<HTMLAnchorElement>(INTENT_PREFETCH_SELECTOR)\n const target = intentPrefetchTarget(link?.getAttribute('href') ?? null)\n if (!target || prefetched.has(target) || samePage(target, window.location)) return\n prefetched.add(target)\n router.prefetch(target)\n }\n // Capture, so pointerenter (which does not bubble) reaches the document; passive, so touch never waits on it.\n const options: AddEventListenerOptions = { capture: true, passive: true }\n for (const type of INTENT_EVENTS) document.addEventListener(type, onIntent, options)\n return () => {\n for (const type of INTENT_EVENTS) document.removeEventListener(type, onIntent, options)\n }\n }, [router])\n\n return null\n}\n"]}
@@ -1,25 +0,0 @@
1
- import type { SkinEntry } from '../skin.js';
2
- import type { UiPhone } from '../types.js';
3
- import type { ShellQuote } from './mobile-drawer.js';
4
- export type MobileCallBarSlot = 'root' | 'call' | 'quote';
5
- export declare const MOBILE_CALL_BAR_VARIANTS: readonly ["bar", "float"];
6
- /** `bar`: full width; `float`: two pills at the end. */
7
- export type MobileCallBarVariant = (typeof MOBILE_CALL_BAR_VARIANTS)[number];
8
- export interface MobileCallBarLayout {
9
- /** `after-call-path` (the default): once the hero's buttons scroll out; `always`: from the first phone screen. */
10
- readonly show?: 'after-call-path' | 'always';
11
- }
12
- export type MobileCallBarSkin = SkinEntry<MobileCallBarSlot, MobileCallBarVariant, MobileCallBarLayout>;
13
- export interface MobileCallBarProps extends MobileCallBarSkin {
14
- readonly phone: UiPhone;
15
- /** Words before the number, for example "Call". The button's name always includes the number. */
16
- readonly phoneLabel?: string | undefined;
17
- readonly quote: ShellQuote;
18
- /**
19
- * A shorter quote label for phones narrower than 420 px, for example "Free quote" for "Get a Free Quote". It must be
20
- * part of the quote label; the button's text and name stay the full label.
21
- */
22
- readonly compactLabel?: string | undefined;
23
- }
24
- export declare function MobileCallBar({ phone, phoneLabel, quote, compactLabel, variant, layout, classes }: MobileCallBarProps): import("react/jsx-runtime").JSX.Element;
25
- //# sourceMappingURL=mobile-call-bar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mobile-call-bar.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/shell/mobile-call-bar.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AACzD,eAAO,MAAM,wBAAwB,2BAA4B,CAAA;AACjE,wDAAwD;AACxD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC5E,MAAM,WAAW,mBAAmB;IAClC,kHAAkH;IAClH,QAAQ,CAAC,IAAI,CAAC,EAAE,iBAAiB,GAAG,QAAQ,CAAA;CAC7C;AACD,MAAM,MAAM,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,EAAE,oBAAoB,EAAE,mBAAmB,CAAC,CAAA;AAEvG,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,iGAAiG;IACjG,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3C;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,OAAe,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,kBAAkB,2CAO7H"}
@@ -1,21 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * F6: the phone call bar (server component). Call and quote always one tap away below 1024 px: it shows once the
4
- * hero's own call and quote buttons (`data-bl-call-path`) have scrolled out, and hides over the footer, the drawer, a
5
- * dialog, any call path and while a form field has focus. Call reports placement `fab`; the quote button sends
6
- * `lead_cta_click` with placement `floating`. Render it once, after the page's `<main>`.
7
- *
8
- * Both buttons stay on one line down to 360 px (3.15.0): the number never wraps or truncates; below 420 px the verb
9
- * ("Call") is visually hidden (the link's name keeps it) and the quote button shows `compactLabel` when given.
10
- *
11
- * `layout.show: 'always'` (3.16.0, as AA's live site): the bar shows from the first phone screen, beside the hero's
12
- * buttons, still Call before Quote (K6), and still hides over the footer, a dialog and a focused field.
13
- */
14
- import { PhoneLink } from '../primitives/links.js';
15
- import { ShellQuoteButton } from './shell-quote.js';
16
- import { CallBarController } from './call-bar-client.js';
17
- export const MOBILE_CALL_BAR_VARIANTS = ['bar', 'float'];
18
- export function MobileCallBar({ phone, phoneLabel, quote, compactLabel, variant = 'bar', layout, classes }) {
19
- return (_jsxs(CallBarController, { variant: variant, always: layout?.show === 'always', className: classes?.root, children: [_jsx(PhoneLink, { phone: phone, placement: "fab", label: phoneLabel, showIcon: true, variant: "button", classes: { root: classes?.call } }), _jsx(ShellQuoteButton, { label: quote.label, href: quote.href, placement: "floating", ctaId: "quote-callbar", compactLabel: compactLabel, classes: { root: classes?.quote } })] }));
20
- }
21
- //# sourceMappingURL=mobile-call-bar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mobile-call-bar.js","sourceRoot":"","sources":["../../../src/ui-kit/shell/mobile-call-bar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAGnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAIxD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,OAAO,CAAU,CAAA;AAqBjE,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,GAAG,KAAK,EAAE,MAAM,EAAE,OAAO,EAAsB;IAC5H,OAAO,CACL,MAAC,iBAAiB,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,KAAK,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,aAC9F,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAC,KAAK,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,QAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAI,EAC1H,KAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,EAAC,UAAU,EAAC,KAAK,EAAC,eAAe,EAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAI,IAClJ,CACrB,CAAA;AACH,CAAC","sourcesContent":["/**\n * F6: the phone call bar (server component). Call and quote always one tap away below 1024 px: it shows once the\n * hero's own call and quote buttons (`data-bl-call-path`) have scrolled out, and hides over the footer, the drawer, a\n * dialog, any call path and while a form field has focus. Call reports placement `fab`; the quote button sends\n * `lead_cta_click` with placement `floating`. Render it once, after the page's `<main>`.\n *\n * Both buttons stay on one line down to 360 px (3.15.0): the number never wraps or truncates; below 420 px the verb\n * (\"Call\") is visually hidden (the link's name keeps it) and the quote button shows `compactLabel` when given.\n *\n * `layout.show: 'always'` (3.16.0, as AA's live site): the bar shows from the first phone screen, beside the hero's\n * buttons, still Call before Quote (K6), and still hides over the footer, a dialog and a focused field.\n */\nimport { PhoneLink } from '../primitives/links.js'\nimport { ShellQuoteButton } from './shell-quote.js'\nimport type { SkinEntry } from '../skin.js'\nimport type { UiPhone } from '../types.js'\nimport { CallBarController } from './call-bar-client.js'\nimport type { ShellQuote } from './mobile-drawer.js'\n\nexport type MobileCallBarSlot = 'root' | 'call' | 'quote'\nexport const MOBILE_CALL_BAR_VARIANTS = ['bar', 'float'] as const\n/** `bar`: full width; `float`: two pills at the end. */\nexport type MobileCallBarVariant = (typeof MOBILE_CALL_BAR_VARIANTS)[number]\nexport interface MobileCallBarLayout {\n /** `after-call-path` (the default): once the hero's buttons scroll out; `always`: from the first phone screen. */\n readonly show?: 'after-call-path' | 'always'\n}\nexport type MobileCallBarSkin = SkinEntry<MobileCallBarSlot, MobileCallBarVariant, MobileCallBarLayout>\n\nexport interface MobileCallBarProps extends MobileCallBarSkin {\n readonly phone: UiPhone\n /** Words before the number, for example \"Call\". The button's name always includes the number. */\n readonly phoneLabel?: string | undefined\n readonly quote: ShellQuote\n /**\n * A shorter quote label for phones narrower than 420 px, for example \"Free quote\" for \"Get a Free Quote\". It must be\n * part of the quote label; the button's text and name stay the full label.\n */\n readonly compactLabel?: string | undefined\n}\n\nexport function MobileCallBar({ phone, phoneLabel, quote, compactLabel, variant = 'bar', layout, classes }: MobileCallBarProps) {\n return (\n <CallBarController variant={variant} always={layout?.show === 'always'} className={classes?.root}>\n <PhoneLink phone={phone} placement=\"fab\" label={phoneLabel} showIcon variant=\"button\" classes={{ root: classes?.call }} />\n <ShellQuoteButton label={quote.label} href={quote.href} placement=\"floating\" ctaId=\"quote-callbar\" compactLabel={compactLabel} classes={{ root: classes?.quote }} />\n </CallBarController>\n )\n}\n"]}
@@ -1,41 +0,0 @@
1
- /**
2
- * F4: the phone and compact-band menu (server component). A modal dialog named "Menu", sliding in at
3
- * `min(100%, 420px)`: the close button first, then the menu in the desktop order (F1, 3.14.0), each dropdown an
4
- * accordion where it stands (one open at a time) and each run of plain links one list, then full-width Call and quote
5
- * buttons, and the social links. Every link is in the server HTML. `SiteHeader` renders it;
6
- * render it on its own only inside a recorded bespoke header.
7
- */
8
- import type { BrandlabNavigation } from '@brandlab-digital/site-core/navigation';
9
- import type { ReactNode } from 'react';
10
- import type { RepeatedSlotOf } from '../repeated-slots.js';
11
- import { type SkinEntry } from '../skin.js';
12
- import type { UiPhone, UiSocial } from '../types.js';
13
- export type MobileDrawerSlot = 'root' | 'menuButton' | 'menuLabel' | 'panel' | 'top' | 'close' | 'title' | 'logo' | 'nav' | 'group' | 'groupTrigger' | 'groupLinks' | 'groupLink' | 'links' | 'link' | 'actions' | 'call' | 'quote' | 'social' | 'socialLink';
14
- export declare const MOBILE_DRAWER_VARIANTS: readonly ["side", "full"];
15
- export type MobileDrawerVariant = (typeof MOBILE_DRAWER_VARIANTS)[number];
16
- export interface MobileDrawerLayout {
17
- /** The side the panel slides from (`side` variant). */
18
- readonly side?: 'end' | 'start';
19
- }
20
- /** Rendered once per group, link or social profile: styled from the skin stylesheet, never by class (3.14.0). */
21
- export type MobileDrawerRepeatedSlot = RepeatedSlotOf<'mobileDrawer'>;
22
- export type MobileDrawerSkin = SkinEntry<MobileDrawerSlot, MobileDrawerVariant, MobileDrawerLayout, MobileDrawerRepeatedSlot>;
23
- /** The quote action. `href` is the quote form it falls back to without scripts, for example `/contact#quote`. */
24
- export interface ShellQuote {
25
- readonly label: string;
26
- readonly href: string;
27
- }
28
- export interface MobileDrawerProps extends MobileDrawerSkin {
29
- readonly navigation: BrandlabNavigation;
30
- readonly phone: UiPhone;
31
- /** Words before the number on the Call button, for example "Call". */
32
- readonly phoneLabel?: string | undefined;
33
- readonly quote: ShellQuote;
34
- readonly socials?: readonly UiSocial[] | undefined;
35
- /** An optional logo in the drawer's top bar (decorative there). */
36
- readonly logo?: ReactNode;
37
- /** Prefix for element ids; one per header on the page. */
38
- readonly idPrefix?: string | undefined;
39
- }
40
- export declare function MobileDrawer({ navigation, phone, phoneLabel, quote, socials, logo, idPrefix, variant, layout, classes, }: MobileDrawerProps): import("react/jsx-runtime").JSX.Element;
41
- //# sourceMappingURL=mobile-drawer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mobile-drawer.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/shell/mobile-drawer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAA4C,MAAM,wCAAwC,CAAA;AAC1H,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAKpD,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,YAAY,GACZ,WAAW,GACX,OAAO,GACP,KAAK,GACL,OAAO,GACP,OAAO,GACP,MAAM,GACN,KAAK,GACL,OAAO,GACP,cAAc,GACd,YAAY,GACZ,WAAW,GACX,OAAO,GACP,MAAM,GACN,SAAS,GACT,MAAM,GACN,OAAO,GACP,QAAQ,GACR,YAAY,CAAA;AAChB,eAAO,MAAM,sBAAsB,2BAA4B,CAAA;AAC/D,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AACzE,MAAM,WAAW,kBAAkB;IACjC,uDAAuD;IACvD,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;CAChC;AACD,iHAAiH;AACjH,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;AACrE,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,wBAAwB,CAAC,CAAA;AAE7H,iHAAiH;AACjH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAA;IACvC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,sEAAsE;IACtE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,CAAA;IAClD,mEAAmE;IACnE,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;IACzB,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACvC;AAED,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,KAAK,EACL,UAAU,EACV,KAAK,EACL,OAAY,EACZ,IAAI,EACJ,QAAsB,EACtB,OAAgB,EAChB,MAAM,EACN,OAAO,GACR,EAAE,iBAAiB,2CAwDnB"}
@@ -1,41 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Icon } from '../icons.js';
3
- import { PhoneLink } from '../primitives/links.js';
4
- import { ShellQuoteButton } from './shell-quote.js';
5
- import { repeatedSlot, slot } from '../skin.js';
6
- import { CurrentLink } from './current-link.js';
7
- import { DrawerController } from './drawer-client.js';
8
- import { SocialLinks } from './social-links.js';
9
- export const MOBILE_DRAWER_VARIANTS = ['side', 'full'];
10
- export function MobileDrawer({ navigation, phone, phoneLabel, quote, socials = [], logo, idPrefix = 'bl-header', variant = 'side', layout, classes, }) {
11
- const id = `${idPrefix}-drawer`;
12
- // The drawer keeps the desktop menu's order (F1): a dropdown becomes an accordion where it stands, and each run of
13
- // plain links between dropdowns is one list.
14
- const runs = [];
15
- for (const item of navigation.items) {
16
- if (item.kind === 'menu')
17
- runs.push(item);
18
- else {
19
- const last = runs[runs.length - 1];
20
- if (Array.isArray(last))
21
- last.push(item);
22
- else
23
- runs.push([item]);
24
- }
25
- }
26
- return (_jsxs(DrawerController, { id: id, variant: variant, side: layout?.side ?? 'end', classes: {
27
- root: classes?.root,
28
- menuButton: classes?.menuButton,
29
- menuLabel: classes?.menuLabel,
30
- panel: classes?.panel,
31
- top: classes?.top,
32
- close: classes?.close,
33
- title: classes?.title,
34
- logo: classes?.logo,
35
- }, logo: logo, menuIcon: _jsx(Icon, { name: "menu" }), closeIcon: _jsx(Icon, { name: "close" }), children: [_jsx("nav", { "aria-label": "Main", ...slot(classes, 'nav'), children: runs.map((run) => Array.isArray(run) ? (_jsx("ul", { ...slot(classes, 'links'), children: run.map((link) => (_jsx("li", { children: _jsx(CurrentLink, { href: link.href, slot: "link", prefetch: false, children: link.label }) }, link.id))) }, `links-${run[0].id}`)) : (_jsx(GroupAccordion, { group: run, name: `${id}-groups` }, run.id))) }), _jsxs("div", { ...slot(classes, 'actions'), children: [_jsx(PhoneLink, { phone: phone, placement: "header", label: phoneLabel, showIcon: true, variant: "button", classes: { root: classes?.call } }), _jsx(ShellQuoteButton, { label: quote.label, href: quote.href, placement: "navigation", ctaId: "quote-menu", classes: { root: classes?.quote } })] }), _jsx(SocialLinks, { socials: socials, slotName: "social", className: classes?.social })] }));
36
- }
37
- /** One dropdown as an accordion: its hub link first, the featured card's page, then its links. */
38
- function GroupAccordion({ group, name }) {
39
- return (_jsxs("details", { name: name, ...repeatedSlot('group'), children: [_jsxs("summary", { ...repeatedSlot('groupTrigger'), children: [_jsx("span", { children: group.label }), _jsx(Icon, { name: "chevron" })] }), _jsxs("ul", { ...repeatedSlot('groupLinks'), children: [_jsx("li", { children: _jsx(CurrentLink, { href: group.href, slot: "groupLink", prefetch: false, hub: true, children: group.hubLabel }) }), group.featured && !group.links.some((link) => link.href === group.featured?.href) ? (_jsx("li", { children: _jsx(CurrentLink, { href: group.featured.href, slot: "groupLink", prefetch: false, children: group.featured.label }) })) : null, group.links.map((link) => (_jsx("li", { children: _jsx(CurrentLink, { href: link.href, slot: "groupLink", prefetch: false, children: link.label }) }, link.href)))] })] }));
40
- }
41
- //# sourceMappingURL=mobile-drawer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mobile-drawer.js","sourceRoot":"","sources":["../../../src/ui-kit/shell/mobile-drawer.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAuB/C,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAA;AA6B/D,MAAM,UAAU,YAAY,CAAC,EAC3B,UAAU,EACV,KAAK,EACL,UAAU,EACV,KAAK,EACL,OAAO,GAAG,EAAE,EACZ,IAAI,EACJ,QAAQ,GAAG,WAAW,EACtB,OAAO,GAAG,MAAM,EAChB,MAAM,EACN,OAAO,GACW;IAClB,MAAM,EAAE,GAAG,GAAG,QAAQ,SAAS,CAAA;IAC/B,mHAAmH;IACnH,6CAA6C;IAC7C,MAAM,IAAI,GAAoD,EAAE,CAAA;IAChE,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;aACpC,C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C,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAC,WAAW,EAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,kBACjE,KAAK,CAAC,QAAQ,GACH,GACX,EACJ,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CACnF,uBACE,KAAC,WAAW,IAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAC,WAAW,EAAC,QAAQ,EAAE,KAAK,YACrE,KAAK,CAAC,QAAQ,CAAC,KAAK,GACT,GACX,CACN,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACzB,uBACE,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAC,WAAW,EAAC,QAAQ,EAAE,KAAK,YAC3D,IAAI,CAAC,KAAK,GACC,IAHP,IAAI,CAAC,IAAI,CAIb,CACN,CAAC,IACC,IACG,CACX,CAAA;AACH,CAAC","sourcesContent":["/**\n * F4: the phone and compact-band menu (server component). A modal dialog named \"Menu\", sliding in at\n * `min(100%, 420px)`: the close button first, then the menu in the desktop order (F1, 3.14.0), each dropdown an\n * accordion where it stands (one open at a time) and each run of plain links one list, then full-width Call and quote\n * buttons, and the social links. Every link is in the server HTML. `SiteHeader` renders it;\n * render it on its own only inside a recorded bespoke header.\n */\nimport type { BrandlabNavigation, BrandlabNavLinkItem, BrandlabNavMenuItem } from '@brandlab-digital/site-core/navigation'\nimport type { ReactNode } from 'react'\nimport { Icon } from '../icons.js'\nimport { PhoneLink } from '../primitives/links.js'\nimport { ShellQuoteButton } from './shell-quote.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, slot, type SkinEntry } from '../skin.js'\nimport type { UiPhone, UiSocial } from '../types.js'\nimport { CurrentLink } from './current-link.js'\nimport { DrawerController } from './drawer-client.js'\nimport { SocialLinks } from './social-links.js'\n\nexport type MobileDrawerSlot =\n | 'root'\n | 'menuButton'\n | 'menuLabel'\n | 'panel'\n | 'top'\n | 'close'\n | 'title'\n | 'logo'\n | 'nav'\n | 'group'\n | 'groupTrigger'\n | 'groupLinks'\n | 'groupLink'\n | 'links'\n | 'link'\n | 'actions'\n | 'call'\n | 'quote'\n | 'social'\n | 'socialLink'\nexport const MOBILE_DRAWER_VARIANTS = ['side', 'full'] as const\nexport type MobileDrawerVariant = (typeof MOBILE_DRAWER_VARIANTS)[number]\nexport interface MobileDrawerLayout {\n /** The side the panel slides from (`side` variant). */\n readonly side?: 'end' | 'start'\n}\n/** Rendered once per group, link or social profile: styled from the skin stylesheet, never by class (3.14.0). */\nexport type MobileDrawerRepeatedSlot = RepeatedSlotOf<'mobileDrawer'>\nexport type MobileDrawerSkin = SkinEntry<MobileDrawerSlot, MobileDrawerVariant, MobileDrawerLayout, MobileDrawerRepeatedSlot>\n\n/** The quote action. `href` is the quote form it falls back to without scripts, for example `/contact#quote`. */\nexport interface ShellQuote {\n readonly label: string\n readonly href: string\n}\n\nexport interface MobileDrawerProps extends MobileDrawerSkin {\n readonly navigation: BrandlabNavigation\n readonly phone: UiPhone\n /** Words before the number on the Call button, for example \"Call\". */\n readonly phoneLabel?: string | undefined\n readonly quote: ShellQuote\n readonly socials?: readonly UiSocial[] | undefined\n /** An optional logo in the drawer's top bar (decorative there). */\n readonly logo?: ReactNode\n /** Prefix for element ids; one per header on the page. */\n readonly idPrefix?: string | undefined\n}\n\nexport function MobileDrawer({\n navigation,\n phone,\n phoneLabel,\n quote,\n socials = [],\n logo,\n idPrefix = 'bl-header',\n variant = 'side',\n layout,\n classes,\n}: MobileDrawerProps) {\n const id = `${idPrefix}-drawer`\n // The drawer keeps the desktop menu's order (F1): a dropdown becomes an accordion where it stands, and each run of\n // plain links between dropdowns is one list.\n const runs: (BrandlabNavMenuItem | BrandlabNavLinkItem[])[] = []\n for (const item of navigation.items) {\n if (item.kind === 'menu') runs.push(item)\n else {\n const last = runs[runs.length - 1]\n if (Array.isArray(last)) last.push(item)\n else runs.push([item])\n }\n }\n return (\n <DrawerController\n id={id}\n variant={variant}\n side={layout?.side ?? 'end'}\n classes={{\n root: classes?.root,\n menuButton: classes?.menuButton,\n menuLabel: classes?.menuLabel,\n panel: classes?.panel,\n top: classes?.top,\n close: classes?.close,\n title: classes?.title,\n logo: classes?.logo,\n }}\n logo={logo}\n menuIcon={<Icon name=\"menu\" />}\n closeIcon={<Icon name=\"close\" />}\n >\n <nav aria-label=\"Main\" {...slot(classes, 'nav')}>\n {runs.map((run) =>\n Array.isArray(run) ? (\n <ul key={`links-${run[0]!.id}`} {...slot(classes, 'links')}>\n {run.map((link) => (\n <li key={link.id}>\n <CurrentLink href={link.href} slot=\"link\" prefetch={false}>\n {link.label}\n </CurrentLink>\n </li>\n ))}\n </ul>\n ) : (\n <GroupAccordion key={run.id} group={run} name={`${id}-groups`} />\n ),\n )}\n </nav>\n <div {...slot(classes, 'actions')}>\n <PhoneLink phone={phone} placement=\"header\" label={phoneLabel} showIcon variant=\"button\" classes={{ root: classes?.call }} />\n <ShellQuoteButton label={quote.label} href={quote.href} placement=\"navigation\" ctaId=\"quote-menu\" classes={{ root: classes?.quote }} />\n </div>\n <SocialLinks socials={socials} slotName=\"social\" className={classes?.social} />\n </DrawerController>\n )\n}\n\n/** One dropdown as an accordion: its hub link first, the featured card's page, then its links. */\nfunction GroupAccordion({ group, name }: { readonly group: BrandlabNavMenuItem; readonly name: string }) {\n return (\n <details name={name} {...repeatedSlot('group')}>\n <summary {...repeatedSlot('groupTrigger')}>\n <span>{group.label}</span>\n <Icon name=\"chevron\" />\n </summary>\n <ul {...repeatedSlot('groupLinks')}>\n <li>\n <CurrentLink href={group.href} slot=\"groupLink\" prefetch={false} hub>\n {group.hubLabel}\n </CurrentLink>\n </li>\n {group.featured && !group.links.some((link) => link.href === group.featured?.href) ? (\n <li>\n <CurrentLink href={group.featured.href} slot=\"groupLink\" prefetch={false}>\n {group.featured.label}\n </CurrentLink>\n </li>\n ) : null}\n {group.links.map((link) => (\n <li key={link.href}>\n <CurrentLink href={link.href} slot=\"groupLink\" prefetch={false}>\n {link.label}\n </CurrentLink>\n </li>\n ))}\n </ul>\n </details>\n )\n}\n"]}
@@ -1,3 +0,0 @@
1
- import type { HeaderMode } from '../../navigation/constants.js';
2
- export declare const HeaderModeContext: import("react").Context<HeaderMode | null>;
3
- //# sourceMappingURL=shell-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell-context.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/shell/shell-context.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAE/D,eAAO,MAAM,iBAAiB,4CAAyC,CAAA"}
@@ -1,5 +0,0 @@
1
- 'use client';
2
- /** The header's measured mode, shared by the header root with the menu and the drawer (both reset when it changes). */
3
- import { createContext } from 'react';
4
- export const HeaderModeContext = createContext(null);
5
- //# sourceMappingURL=shell-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell-context.js","sourceRoot":"","sources":["../../../src/ui-kit/shell/shell-context.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,uHAAuH;AACvH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAGrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAoB,IAAI,CAAC,CAAA","sourcesContent":["'use client'\n\n/** The header's measured mode, shared by the header root with the menu and the drawer (both reset when it changes). */\nimport { createContext } from 'react'\nimport type { HeaderMode } from '../../navigation/constants.js'\n\nexport const HeaderModeContext = createContext<HeaderMode | null>(null)\n"]}
@@ -1,10 +0,0 @@
1
- /**
2
- * The quote button the shell renders in the header, the drawer and the call bar (internal). The same DOM as
3
- * `QuoteButton`, through `PageLink`, so it keeps Next's prefetch (`LINK_PREFETCH_POLICY.primaryAction`) everywhere
4
- * but on its own page: on `/contact` the `/contact#quote` button never prefetches the page the visitor is on (W2).
5
- */
6
- import { type QuoteButtonProps } from '../primitives/quote-button.js';
7
- export declare function ShellQuoteButton({ compactLabel, ...props }: QuoteButtonProps & {
8
- readonly compactLabel?: string | undefined;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- //# sourceMappingURL=shell-quote.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell-quote.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/shell/shell-quote.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAGvF,wBAAgB,gBAAgB,CAAC,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,GAAG;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,2CAO7H"}
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * The quote button the shell renders in the header, the drawer and the call bar (internal). The same DOM as
4
- * `QuoteButton`, through `PageLink`, so it keeps Next's prefetch (`LINK_PREFETCH_POLICY.primaryAction`) everywhere
5
- * but on its own page: on `/contact` the `/contact#quote` button never prefetches the page the visitor is on (W2).
6
- */
7
- import { quoteButtonParts } from '../primitives/quote-button.js';
8
- import { PageLink } from './current-link.js';
9
- export function ShellQuoteButton({ compactLabel, ...props }) {
10
- const { href, hooks, children } = quoteButtonParts(props, { compactLabel });
11
- return (_jsx(PageLink, { href: href, prefetch: props.prefetch, hooks: hooks, children: children }));
12
- }
13
- //# sourceMappingURL=shell-quote.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell-quote.js","sourceRoot":"","sources":["../../../src/ui-kit/shell/shell-quote.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,OAAO,EAAE,gBAAgB,EAAyB,MAAM,+BAA+B,CAAA;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,MAAM,UAAU,gBAAgB,CAAC,EAAE,YAAY,EAAE,GAAG,KAAK,EAAqE;IAC5H,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,EAAE,YAAY,EAAE,CAAC,CAAA;IAC3E,OAAO,CACL,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,YACzD,QAAQ,GACA,CACZ,CAAA;AACH,CAAC","sourcesContent":["/**\n * The quote button the shell renders in the header, the drawer and the call bar (internal). The same DOM as\n * `QuoteButton`, through `PageLink`, so it keeps Next's prefetch (`LINK_PREFETCH_POLICY.primaryAction`) everywhere\n * but on its own page: on `/contact` the `/contact#quote` button never prefetches the page the visitor is on (W2).\n */\nimport { quoteButtonParts, type QuoteButtonProps } from '../primitives/quote-button.js'\nimport { PageLink } from './current-link.js'\n\nexport function ShellQuoteButton({ compactLabel, ...props }: QuoteButtonProps & { readonly compactLabel?: string | undefined }) {\n const { href, hooks, children } = quoteButtonParts(props, { compactLabel })\n return (\n <PageLink href={href} prefetch={props.prefetch} hooks={hooks}>\n {children}\n </PageLink>\n )\n}\n"]}