@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,112 +0,0 @@
1
- /**
2
- * A site's whole look for the ui-kit: one entry per shared component it renders (`src/site/skin.ts`, written with
3
- * `satisfies BrandlabSkin`). Each release adds the entries for its components. K2 checks that every rendered
4
- * component has an entry and that no reference-skin class ships.
5
- */
6
- import type { ButtonLinkSkin, PhoneLinkSkin, TextLinkSkin } from './primitives/links.js';
7
- import type { QuoteButtonSkin } from './primitives/quote-button.js';
8
- import type { ContainerSkin, EyebrowSkin, SectionHeadingSkin } from './primitives/layout.js';
9
- import type { BadgeSkin, ChipSkin } from './primitives/badge.js';
10
- import type { ButtonSkin } from './primitives/button.js';
11
- import type { CardSkin } from './primitives/card.js';
12
- import type { LinkListSkin, TickListSkin } from './primitives/lists.js';
13
- import type { MediaFrameSkin } from './primitives/media-frame.js';
14
- import type { StatSkin } from './primitives/stat.js';
15
- import type { BackToTopSkin } from './shell/back-to-top.js';
16
- import type { MobileCallBarSkin } from './shell/mobile-call-bar.js';
17
- import type { MobileDrawerSkin } from './shell/mobile-drawer.js';
18
- import type { SiteHeaderSkin } from './shell/site-header.js';
19
- import type { UtilityBarSkin } from './shell/utility-bar.js';
20
- import type { DialogSkin } from './form/dialog.js';
21
- import type { FieldSkin } from './form/field.js';
22
- import type { PhotoUploadSkin } from './form/photo-upload.js';
23
- import type { QuoteDialogSkin } from './form/quote-dialog.js';
24
- import type { QuoteFormSkin } from './form/quote-form.js';
25
- import type { ThankYouSkin } from './form/thank-you.js';
26
- import type { CTABandSkin } from './sections/cta-band.js';
27
- import type { RatingChipSkin } from './sections/rating-chip.js';
28
- import type { ReviewsBandSkin } from './sections/reviews-band.js';
29
- import type { SiteFooterSkin } from './sections/site-footer.js';
30
- import type { AccordionSkin } from './sections/accordion.js';
31
- import type { ContactBlockSkin } from './sections/contact-block.js';
32
- import type { FAQsSkin } from './sections/faqs.js';
33
- import type { PageHeaderSkin } from './sections/page-header.js';
34
- import type { PriceGuideSkin } from './sections/price-guide.js';
35
- import type { PriceTableSkin } from './sections/price-table.js';
36
- import type { ProofStripSkin } from './sections/proof-strip.js';
37
- import type { HeroSkin } from './sections/hero.js';
38
- import type { ServicesGridSkin } from './sections/services-grid.js';
39
- import type { MediaSkin } from './primitives/media.js';
40
- import type { BreadcrumbsSkin } from './primitives/breadcrumbs.js';
41
- import type { CouncilRulesSkin } from './sections/council-rules.js';
42
- import type { CoverageSkin } from './sections/coverage.js';
43
- import type { LocalFactsSkin } from './sections/local-facts.js';
44
- import type { AreaMapSkin } from './sections/area-map.js';
45
- import type { NearbyAreasSkin } from './sections/nearby-areas.js';
46
- import type { NearbyJobsSkin } from './sections/nearby-jobs.js';
47
- import type { RelatedServicesSkin } from './sections/related-services.js';
48
- import type { ProjectsSkin } from './sections/projects.js';
49
- import type { GallerySkin } from './sections/gallery.js';
50
- import type { BeforeAfterSkin } from './sections/before-after.js';
51
- import type { LicencesSkin } from './sections/licences.js';
52
- import type { QuoteChecklistSkin } from './sections/quote-checklist.js';
53
- import type { EmergencyBandSkin } from './sections/emergency-band.js';
54
- import type { SignatureSectionSkin } from './sections/signature-section.js';
55
- export interface BrandlabSkin {
56
- readonly buttonLink?: ButtonLinkSkin;
57
- readonly textLink?: TextLinkSkin;
58
- readonly phoneLink?: PhoneLinkSkin;
59
- readonly quoteButton?: QuoteButtonSkin;
60
- readonly container?: ContainerSkin;
61
- readonly sectionHeading?: SectionHeadingSkin;
62
- readonly button?: ButtonSkin;
63
- readonly eyebrow?: EyebrowSkin;
64
- readonly card?: CardSkin;
65
- readonly badge?: BadgeSkin;
66
- readonly chip?: ChipSkin;
67
- readonly stat?: StatSkin;
68
- readonly tickList?: TickListSkin;
69
- readonly linkList?: LinkListSkin;
70
- readonly mediaFrame?: MediaFrameSkin;
71
- readonly siteHeader?: SiteHeaderSkin;
72
- readonly mobileDrawer?: MobileDrawerSkin;
73
- readonly utilityBar?: UtilityBarSkin;
74
- readonly mobileCallBar?: MobileCallBarSkin;
75
- readonly backToTop?: BackToTopSkin;
76
- readonly quoteForm?: QuoteFormSkin;
77
- readonly quoteDialog?: QuoteDialogSkin;
78
- readonly photoUpload?: PhotoUploadSkin;
79
- readonly dialog?: DialogSkin;
80
- readonly field?: FieldSkin;
81
- readonly thankYou?: ThankYouSkin;
82
- readonly ratingChip?: RatingChipSkin;
83
- readonly reviewsBand?: ReviewsBandSkin;
84
- readonly ctaBand?: CTABandSkin;
85
- readonly siteFooter?: SiteFooterSkin;
86
- readonly accordion?: AccordionSkin;
87
- readonly faqs?: FAQsSkin;
88
- readonly priceTable?: PriceTableSkin;
89
- readonly priceGuide?: PriceGuideSkin;
90
- readonly proofStrip?: ProofStripSkin;
91
- readonly pageHeader?: PageHeaderSkin;
92
- readonly contactBlock?: ContactBlockSkin;
93
- readonly hero?: HeroSkin;
94
- readonly servicesGrid?: ServicesGridSkin;
95
- readonly media?: MediaSkin;
96
- readonly breadcrumbs?: BreadcrumbsSkin;
97
- readonly localFacts?: LocalFactsSkin;
98
- readonly councilRules?: CouncilRulesSkin;
99
- readonly nearbyJobs?: NearbyJobsSkin;
100
- readonly nearbyAreas?: NearbyAreasSkin;
101
- readonly areaMap?: AreaMapSkin;
102
- readonly coverage?: CoverageSkin;
103
- readonly relatedServices?: RelatedServicesSkin;
104
- readonly projects?: ProjectsSkin;
105
- readonly gallery?: GallerySkin;
106
- readonly beforeAfter?: BeforeAfterSkin;
107
- readonly licences?: LicencesSkin;
108
- readonly quoteChecklist?: QuoteChecklistSkin;
109
- readonly emergencyBand?: EmergencyBandSkin;
110
- readonly signatureSection?: SignatureSectionSkin;
111
- }
112
- //# sourceMappingURL=brandlab-skin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brandlab-skin.d.ts","sourceRoot":"","sources":["../../src/ui-kit/brandlab-skin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC5F,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,K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-1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=brandlab-skin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brandlab-skin.js","sourceRoot":"","sources":["../../src/ui-kit/brandlab-skin.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A site's whole look for the ui-kit: one entry per shared component it renders (`src/site/skin.ts`, written with\n * `satisfies BrandlabSkin`). Each release adds the entries for its components. K2 checks that every rendered\n * component has an entry and that no reference-skin class ships.\n */\nimport type { ButtonLinkSkin, PhoneLinkSkin, TextLinkSkin } from './primitives/links.js'\nimport type { QuoteButtonSkin } from './primitives/quote-button.js'\nimport type { ContainerSkin, EyebrowSkin, SectionHeadingSkin } from './primitives/layout.js'\nimport type { BadgeSkin, ChipSkin } from './primitives/badge.js'\nimport type { ButtonSkin } from './primitives/button.js'\nimport type { CardSkin } from './primitives/card.js'\nimport type { LinkListSkin, TickListSkin } from './primitives/lists.js'\nimport type { MediaFrameSkin } from './primitives/media-frame.js'\nimport type { StatSkin } from './primitives/stat.js'\nimport type { BackToTopSkin } from './shell/back-to-top.js'\nimport type { MobileCallBarSkin } from './shell/mobile-call-bar.js'\nimport type { MobileDrawerSkin } from './shell/mobile-drawer.js'\nimport type { SiteHeaderSkin } from './shell/site-header.js'\nimport type { UtilityBarSkin } from './shell/utility-bar.js'\nimport type { DialogSkin } from './form/dialog.js'\nimport type { FieldSkin } from './form/field.js'\nimport type { PhotoUploadSkin } from './form/photo-upload.js'\nimport type { QuoteDialogSkin } from './form/quote-dialog.js'\nimport type { QuoteFormSkin } from './form/quote-form.js'\nimport type { ThankYouSkin } from './form/thank-you.js'\nimport type { CTABandSkin } from './sections/cta-band.js'\nimport type { RatingChipSkin } from './sections/rating-chip.js'\nimport type { ReviewsBandSkin } from './sections/reviews-band.js'\nimport type { SiteFooterSkin } from './sections/site-footer.js'\nimport type { AccordionSkin } from './sections/accordion.js'\nimport type { ContactBlockSkin } from './sections/contact-block.js'\nimport type { FAQsSkin } from './sections/faqs.js'\nimport type { PageHeaderSkin } from './sections/page-header.js'\nimport type { PriceGuideSkin } from './sections/price-guide.js'\nimport type { PriceTableSkin } from './sections/price-table.js'\nimport type { ProofStripSkin } from './sections/proof-strip.js'\nimport type { HeroSkin } from './sections/hero.js'\nimport type { ServicesGridSkin } from './sections/services-grid.js'\nimport type { MediaSkin } from './primitives/media.js'\nimport type { BreadcrumbsSkin } from './primitives/breadcrumbs.js'\nimport type { CouncilRulesSkin } from './sections/council-rules.js'\nimport type { CoverageSkin } from './sections/coverage.js'\nimport type { LocalFactsSkin } from './sections/local-facts.js'\nimport type { AreaMapSkin } from './sections/area-map.js'\nimport type { NearbyAreasSkin } from './sections/nearby-areas.js'\nimport type { NearbyJobsSkin } from './sections/nearby-jobs.js'\nimport type { RelatedServicesSkin } from './sections/related-services.js'\nimport type { ProjectsSkin } from './sections/projects.js'\nimport type { GallerySkin } from './sections/gallery.js'\nimport type { BeforeAfterSkin } from './sections/before-after.js'\nimport type { LicencesSkin } from './sections/licences.js'\nimport type { QuoteChecklistSkin } from './sections/quote-checklist.js'\nimport type { EmergencyBandSkin } from './sections/emergency-band.js'\nimport type { SignatureSectionSkin } from './sections/signature-section.js'\n\nexport interface BrandlabSkin {\n readonly buttonLink?: ButtonLinkSkin\n readonly textLink?: TextLinkSkin\n readonly phoneLink?: PhoneLinkSkin\n readonly quoteButton?: QuoteButtonSkin\n readonly container?: ContainerSkin\n readonly sectionHeading?: SectionHeadingSkin\n // primitives (3.14.0)\n readonly button?: ButtonSkin\n readonly eyebrow?: EyebrowSkin\n readonly card?: CardSkin\n readonly badge?: BadgeSkin\n readonly chip?: ChipSkin\n readonly stat?: StatSkin\n readonly tickList?: TickListSkin\n readonly linkList?: LinkListSkin\n readonly mediaFrame?: MediaFrameSkin\n readonly siteHeader?: SiteHeaderSkin\n readonly mobileDrawer?: MobileDrawerSkin\n readonly utilityBar?: UtilityBarSkin\n readonly mobileCallBar?: MobileCallBarSkin\n readonly backToTop?: BackToTopSkin\n // form (3.10.0)\n readonly quoteForm?: QuoteFormSkin\n readonly quoteDialog?: QuoteDialogSkin\n readonly photoUpload?: PhotoUploadSkin\n readonly dialog?: DialogSkin\n readonly field?: FieldSkin\n readonly thankYou?: ThankYouSkin\n readonly ratingChip?: RatingChipSkin\n readonly reviewsBand?: ReviewsBandSkin\n readonly ctaBand?: CTABandSkin\n readonly siteFooter?: SiteFooterSkin\n readonly accordion?: AccordionSkin\n readonly faqs?: FAQsSkin\n readonly priceTable?: PriceTableSkin\n readonly priceGuide?: PriceGuideSkin\n readonly proofStrip?: ProofStripSkin\n readonly pageHeader?: PageHeaderSkin\n readonly contactBlock?: ContactBlockSkin\n // hero (3.14.0)\n readonly hero?: HeroSkin\n // 3.14.0\n readonly servicesGrid?: ServicesGridSkin\n readonly media?: MediaSkin\n readonly breadcrumbs?: BreadcrumbsSkin\n // location sections (3.15.0)\n readonly localFacts?: LocalFactsSkin\n readonly councilRules?: CouncilRulesSkin\n readonly nearbyJobs?: NearbyJobsSkin\n readonly nearbyAreas?: NearbyAreasSkin\n readonly areaMap?: AreaMapSkin\n readonly coverage?: CoverageSkin\n readonly relatedServices?: RelatedServicesSkin\n // proof sections (3.15.0)\n readonly projects?: ProjectsSkin\n readonly gallery?: GallerySkin\n readonly beforeAfter?: BeforeAfterSkin\n readonly licences?: LicencesSkin\n readonly quoteChecklist?: QuoteChecklistSkin\n readonly emergencyBand?: EmergencyBandSkin\n // 3.16.0\n readonly signatureSection?: SignatureSectionSkin\n}\n"]}
@@ -1,3 +0,0 @@
1
- /** Fills `{name}` tokens in a site's copy template, for example `"{count} of {max}"`. Unknown tokens stay visible. */
2
- export declare function fillCopy(template: string, values: Readonly<Record<string, string | number>>): string;
3
- //# sourceMappingURL=copy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/form/copy.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,CAEpG"}
@@ -1,5 +0,0 @@
1
- /** Fills `{name}` tokens in a site's copy template, for example `"{count} of {max}"`. Unknown tokens stay visible. */
2
- export function fillCopy(template, values) {
3
- return template.replace(/\{([a-zA-Z]+)\}/g, (token, key) => (key in values ? String(values[key]) : token));
4
- }
5
- //# sourceMappingURL=copy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy.js","sourceRoot":"","sources":["../../../src/ui-kit/form/copy.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,MAAM,UAAU,QAAQ,CAAC,QAAgB,EAAE,MAAiD;IAC1F,OAAO,QAAQ,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA;AACpH,CAAC","sourcesContent":["/** Fills `{name}` tokens in a site's copy template, for example `\"{count} of {max}\"`. Unknown tokens stay visible. */\nexport function fillCopy(template: string, values: Readonly<Record<string, string | number>>): string {\n return template.replace(/\\{([a-zA-Z]+)\\}/g, (token, key: string) => (key in values ? String(values[key]) : token))\n}\n"]}
@@ -1,24 +0,0 @@
1
- /**
2
- * `Dialog`: a modal dialog over `HeadlessDialog` (native `<dialog>` with `showModal()`, so the page behind is inert).
3
- * Its H2 title names it and takes focus when it opens, so a phone keyboard doesn't jump up; Escape and the close
4
- * button close it and focus returns to the control that opened it. The page doesn't scroll behind it (structure.css).
5
- */
6
- import { type ReactNode, type RefObject } from 'react';
7
- import { type SkinEntry } from '../skin.js';
8
- export type DialogSlot = 'root' | 'header' | 'title' | 'close' | 'body';
9
- export type DialogSkin = SkinEntry<DialogSlot>;
10
- export interface DialogProps extends DialogSkin {
11
- /** The dialog's id; its title is `${id}-title`. */
12
- readonly id: string;
13
- readonly open: boolean;
14
- readonly onClose: () => void;
15
- /** The H2 that names the dialog, for example "Get a free quote". */
16
- readonly title: string;
17
- /** The close button's accessible name, for example "Close". */
18
- readonly closeLabel: string;
19
- /** Where focus returns on close; by default the element focused when it opened. */
20
- readonly returnFocusRef?: RefObject<HTMLElement | null> | undefined;
21
- readonly children: ReactNode;
22
- }
23
- export declare function Dialog({ id, open, onClose, title, closeLabel, returnFocusRef, classes, children }: DialogProps): import("react/jsx-runtime").JSX.Element;
24
- //# sourceMappingURL=dialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/form/dialog.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,OAAO,EAAU,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAG9D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAEjD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;AACvE,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC,CAAA;AAE9C,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,mDAAmD;IACnD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;IAC5B,oEAAoE;IACpE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,SAAS,CAAA;IACnE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,WAAW,2CA2B9G"}
@@ -1,17 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- /**
4
- * `Dialog`: a modal dialog over `HeadlessDialog` (native `<dialog>` with `showModal()`, so the page behind is inert).
5
- * Its H2 title names it and takes focus when it opens, so a phone keyboard doesn't jump up; Escape and the close
6
- * button close it and focus returns to the control that opened it. The page doesn't scroll behind it (structure.css).
7
- */
8
- import { useRef } from 'react';
9
- import { HeadlessDialog } from '../../ui-client.js';
10
- import { Icon } from '../icons.js';
11
- import { slot } from '../skin.js';
12
- export function Dialog({ id, open, onClose, title, closeLabel, returnFocusRef, classes, children }) {
13
- const titleRef = useRef(null);
14
- const titleId = `${id}-title`;
15
- return (_jsxs(HeadlessDialog, { id: id, open: open, onClose: onClose, labelledBy: titleId, initialFocusRef: titleRef, ...(returnFocusRef ? { returnFocusRef } : {}), "data-bl": "dialog", "data-state": open ? 'open' : 'closed', className: classes?.root, children: [_jsxs("div", { ...slot(classes, 'header'), children: [_jsx("h2", { ...slot(classes, 'title'), id: titleId, ref: titleRef, tabIndex: -1, children: title }), _jsxs("button", { ...slot(classes, 'close'), type: "button", onClick: onClose, children: [_jsx(Icon, { name: "close" }), _jsx("span", { "data-bl-visually-hidden": "", children: closeLabel })] })] }), _jsx("div", { ...slot(classes, 'body'), children: children })] }));
16
- }
17
- //# sourceMappingURL=dialog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/ui-kit/form/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAkC,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,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\n * `Dialog`: a modal dialog over `HeadlessDialog` (native `<dialog>` with `showModal()`, so the page behind is inert).\n * Its H2 title names it and takes focus when it opens, so a phone keyboard doesn't jump up; Escape and the close\n * button close it and focus returns to the control that opened it. The page doesn't scroll behind it (structure.css).\n */\nimport { useRef, type ReactNode, type RefObject } from 'react'\nimport { HeadlessDialog } from '../../ui-client.js'\nimport { Icon } from '../icons.js'\nimport { slot, type SkinEntry } from '../skin.js'\n\nexport type DialogSlot = 'root' | 'header' | 'title' | 'close' | 'body'\nexport type DialogSkin = SkinEntry<DialogSlot>\n\nexport interface DialogProps extends DialogSkin {\n /** The dialog's id; its title is `${id}-title`. */\n readonly id: string\n readonly open: boolean\n readonly onClose: () => void\n /** The H2 that names the dialog, for example \"Get a free quote\". */\n readonly title: string\n /** The close button's accessible name, for example \"Close\". */\n readonly closeLabel: string\n /** Where focus returns on close; by default the element focused when it opened. */\n readonly returnFocusRef?: RefObject<HTMLElement | null> | undefined\n readonly children: ReactNode\n}\n\nexport function Dialog({ id, open, onClose, title, closeLabel, returnFocusRef, classes, children }: DialogProps) {\n const titleRef = useRef<HTMLHeadingElement>(null)\n const titleId = `${id}-title`\n return (\n <HeadlessDialog\n id={id}\n open={open}\n onClose={onClose}\n labelledBy={titleId}\n initialFocusRef={titleRef}\n {...(returnFocusRef ? { returnFocusRef } : {})}\n data-bl=\"dialog\"\n data-state={open ? 'open' : 'closed'}\n className={classes?.root}\n >\n <div {...slot(classes, 'header')}>\n <h2 {...slot(classes, 'title')} id={titleId} ref={titleRef} tabIndex={-1}>\n {title}\n </h2>\n <button {...slot(classes, 'close')} type=\"button\" onClick={onClose}>\n <Icon name=\"close\" />\n <span data-bl-visually-hidden=\"\">{closeLabel}</span>\n </button>\n </div>\n <div {...slot(classes, 'body')}>{children}</div>\n </HeadlessDialog>\n )\n}\n"]}
@@ -1,30 +0,0 @@
1
- /**
2
- * `Field`: one labelled control over `HeadlessField`. The label sits above the control; a description and an error
3
- * are wired to it with `aria-describedby`, the error is `role="alert"` and the control gets `aria-invalid` while it
4
- * has one. A required control carries `required` and `aria-required`, never a visible "(required)". Server-safe: it
5
- * holds no state, so it works in server and client components alike.
6
- */
7
- import type { ReactNode } from 'react';
8
- import type { SkinEntry } from '../skin.js';
9
- export type FieldSlot = 'field' | 'label' | 'description' | 'error';
10
- export type FieldSkin = SkinEntry<FieldSlot>;
11
- /** Spread onto the control (`input`, `select`, `textarea` or a file input). */
12
- export interface FieldControlProps {
13
- readonly id: string;
14
- readonly required: boolean;
15
- readonly 'aria-required': true | undefined;
16
- readonly 'aria-invalid': true | undefined;
17
- readonly 'aria-describedby': string | undefined;
18
- }
19
- export interface FieldProps extends FieldSkin {
20
- /** The control's id; the description and error ids are `${id}-description` and `${id}-error`. */
21
- readonly id: string;
22
- readonly label: string;
23
- readonly description?: string | undefined;
24
- /** The error message, shown only once there is one (after a submit attempt). */
25
- readonly error?: string | undefined;
26
- readonly required?: boolean;
27
- readonly children: (control: FieldControlProps) => ReactNode;
28
- }
29
- export declare function Field({ id, label, description, error, required, classes, children }: FieldProps): import("react/jsx-runtime").JSX.Element;
30
- //# sourceMappingURL=field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/form/field.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,OAAO,CAAA;AACnE,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAA;AAE5C,+EAA+E;AAC/E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,eAAe,EAAE,IAAI,GAAG,SAAS,CAAA;IAC1C,QAAQ,CAAC,cAAc,EAAE,IAAI,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAA;CAChD;AAED,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,iGAAiG;IACjG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzC,gFAAgF;IAChF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,SAAS,CAAA;CAC7D;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,UAAU,2CAsBvG"}
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { HeadlessField } from '../../ui.js';
3
- export function Field({ id, label, description, error, required = false, classes, children }) {
4
- return (_jsx(HeadlessField, { id: id, label: label, description: description, error: error, required: required, className: classes?.field, labelClassName: classes?.label, descriptionClassName: classes?.description, errorClassName: classes?.error, dataAttributes: {
5
- field: { 'data-bl': 'field', 'data-slot': 'field' },
6
- label: { 'data-slot': 'label' },
7
- description: { 'data-slot': 'description' },
8
- error: { 'data-slot': 'error' },
9
- }, children: (control) => children({ ...control, 'aria-required': required ? true : undefined }) }));
10
- }
11
- //# sourceMappingURL=field.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field.js","sourceRoot":"","sources":["../../../src/ui-kit/form/field.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AA0B3C,MAAM,UAAU,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAc;IACtG,OAAO,CACL,KAAC,aAAa,IACZ,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,EAAE,KAAK,EACzB,cAAc,EAAE,OAAO,EAAE,KAAK,EAC9B,oBAAoB,EAAE,OAAO,EAAE,WAAW,EAC1C,cAAc,EAAE,OAAO,EAAE,KAAK,EAC9B,cAAc,EAAE;YACd,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE;YACnD,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE;YAC/B,WAAW,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE;YAC3C,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE;SAChC,YAEA,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,GACtE,CACjB,CAAA;AACH,CAAC","sourcesContent":["/**\n * `Field`: one labelled control over `HeadlessField`. The label sits above the control; a description and an error\n * are wired to it with `aria-describedby`, the error is `role=\"alert\"` and the control gets `aria-invalid` while it\n * has one. A required control carries `required` and `aria-required`, never a visible \"(required)\". Server-safe: it\n * holds no state, so it works in server and client components alike.\n */\nimport type { ReactNode } from 'react'\nimport { HeadlessField } from '../../ui.js'\nimport type { SkinEntry } from '../skin.js'\n\nexport type FieldSlot = 'field' | 'label' | 'description' | 'error'\nexport type FieldSkin = SkinEntry<FieldSlot>\n\n/** Spread onto the control (`input`, `select`, `textarea` or a file input). */\nexport interface FieldControlProps {\n readonly id: string\n readonly required: boolean\n readonly 'aria-required': true | undefined\n readonly 'aria-invalid': true | undefined\n readonly 'aria-describedby': string | undefined\n}\n\nexport interface FieldProps extends FieldSkin {\n /** The control's id; the description and error ids are `${id}-description` and `${id}-error`. */\n readonly id: string\n readonly label: string\n readonly description?: string | undefined\n /** The error message, shown only once there is one (after a submit attempt). */\n readonly error?: string | undefined\n readonly required?: boolean\n readonly children: (control: FieldControlProps) => ReactNode\n}\n\nexport function Field({ id, label, description, error, required = false, classes, children }: FieldProps) {\n return (\n <HeadlessField\n id={id}\n label={label}\n description={description}\n error={error}\n required={required}\n className={classes?.field}\n labelClassName={classes?.label}\n descriptionClassName={classes?.description}\n errorClassName={classes?.error}\n dataAttributes={{\n field: { 'data-bl': 'field', 'data-slot': 'field' },\n label: { 'data-slot': 'label' },\n description: { 'data-slot': 'description' },\n error: { 'data-slot': 'error' },\n }}\n >\n {(control) => children({ ...control, 'aria-required': required ? true : undefined })}\n </HeadlessField>\n )\n}\n"]}
@@ -1,7 +0,0 @@
1
- export { QUOTE_FORM_PLACEMENTS, QUOTE_FORM_PLACEMENT_VARIANTS, QUOTE_FORM_VARIANTS, QuoteForm, createQuoteForm, type BoundQuoteDialogProps, type BoundQuoteForm, type BoundQuoteFormProps, type CreateQuoteFormOptions, type QuoteFormCopy, type QuoteFormLayout, type QuoteFormPlacement, type QuoteFormProps, type QuoteFormSkin, type QuoteFormSlot, type QuoteFormVariant, } from './quote-form.js';
2
- export { QuoteDialog, type QuoteDialogProps, type QuoteDialogSkin } from './quote-dialog.js';
3
- export { PhotoUpload, type PhotoUploadProps, type PhotoUploadSkin, type PhotoUploadSlot } from './photo-upload.js';
4
- export { Dialog, type DialogProps, type DialogSkin, type DialogSlot } from './dialog.js';
5
- export { Field, type FieldControlProps, type FieldProps, type FieldSkin, type FieldSlot } from './field.js';
6
- export { THANK_YOU_DEFAULT_REPLY_TIME, ThankYou, thankYouMetadata, type ThankYouProps, type ThankYouSkin, type ThankYouSlot, } from './thank-you.js';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,mBAAmB,EACnB,SAAS,EACT,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC5F,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAClH,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAA;AACxF,OAAO,EAAE,KAAK,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAC3G,OAAO,EACL,4BAA4B,EAC5B,QAAQ,EACR,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAA"}
@@ -1,7 +0,0 @@
1
- export { QUOTE_FORM_PLACEMENTS, QUOTE_FORM_PLACEMENT_VARIANTS, QUOTE_FORM_VARIANTS, QuoteForm, createQuoteForm, } from './quote-form.js';
2
- export { QuoteDialog } from './quote-dialog.js';
3
- export { PhotoUpload } from './photo-upload.js';
4
- export { Dialog } from './dialog.js';
5
- export { Field } from './field.js';
6
- export { THANK_YOU_DEFAULT_REPLY_TIME, ThankYou, thankYouMetadata, } from './thank-you.js';
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui-kit/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,mBAAmB,EACnB,SAAS,EACT,eAAe,GAYhB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,WAAW,EAA+C,MAAM,mBAAmB,CAAA;AAC5F,OAAO,EAAE,WAAW,EAAqE,MAAM,mBAAmB,CAAA;AAClH,OAAO,EAAE,MAAM,EAAsD,MAAM,aAAa,CAAA;AACxF,OAAO,EAAE,KAAK,EAA2E,MAAM,YAAY,CAAA;AAC3G,OAAO,EACL,4BAA4B,EAC5B,QAAQ,EACR,gBAAgB,GAIjB,MAAM,gBAAgB,CAAA","sourcesContent":["export {\n QUOTE_FORM_PLACEMENTS,\n QUOTE_FORM_PLACEMENT_VARIANTS,\n QUOTE_FORM_VARIANTS,\n QuoteForm,\n createQuoteForm,\n type BoundQuoteDialogProps,\n type BoundQuoteForm,\n type BoundQuoteFormProps,\n type CreateQuoteFormOptions,\n type QuoteFormCopy,\n type QuoteFormLayout,\n type QuoteFormPlacement,\n type QuoteFormProps,\n type QuoteFormSkin,\n type QuoteFormSlot,\n type QuoteFormVariant,\n} from './quote-form.js'\nexport { QuoteDialog, type QuoteDialogProps, type QuoteDialogSkin } from './quote-dialog.js'\nexport { PhotoUpload, type PhotoUploadProps, type PhotoUploadSkin, type PhotoUploadSlot } from './photo-upload.js'\nexport { Dialog, type DialogProps, type DialogSkin, type DialogSlot } from './dialog.js'\nexport { Field, type FieldControlProps, type FieldProps, type FieldSkin, type FieldSlot } from './field.js'\nexport {\n THANK_YOU_DEFAULT_REPLY_TIME,\n ThankYou,\n thankYouMetadata,\n type ThankYouProps,\n type ThankYouSkin,\n type ThankYouSlot,\n} from './thank-you.js'\n"]}
@@ -1,40 +0,0 @@
1
- /**
2
- * `PhotoUpload`: the "Add photos" drop box over the shared photo preparation (`useBrandlabContactAttachments`). A
3
- * real file input, visually hidden but focusable, so the keyboard opens the picker with Enter or Space; the whole
4
- * box is its label and a drop target. `accept="image/*"` and never a `capture` attribute, so phones offer the
5
- * library as well as the camera. The "0 of 5" counter is a `HeadlessStatus`, so each change is announced. Chosen
6
- * photos show as thumbnails with a remove button each.
7
- */
8
- import type { BrandlabContactAttachmentErrorReason, UseBrandlabContactAttachmentsResult } from '../../contact/attachments-client.js';
9
- import type { RepeatedSlotOf } from '../repeated-slots.js';
10
- import { type SkinEntry } from '../skin.js';
11
- export type PhotoUploadSlot = 'field' | 'label' | 'drop' | 'dropIcon' | 'counter' | 'photos' | 'photo' | 'thumb' | 'remove' | 'error';
12
- /** Rendered once per chosen photo: styled from the skin stylesheet, never by class (3.14.0). */
13
- export type PhotoUploadRepeatedSlot = RepeatedSlotOf<'photoUpload'>;
14
- export type PhotoUploadSkin = SkinEntry<PhotoUploadSlot, never, Record<never, never>, PhotoUploadRepeatedSlot>;
15
- export interface PhotoUploadProps extends PhotoUploadSkin {
16
- /** The file input's id. */
17
- readonly id: string;
18
- /** The drop box's label, for example "Add photos". */
19
- readonly label: string;
20
- /** The prepared photos, from `useBrandlabContactForm().attachments` or `useBrandlabContactAttachments()`. */
21
- readonly attachments: UseBrandlabContactAttachmentsResult;
22
- /** The counter, with `{count}` and `{max}`, for example "{count} of {max}". */
23
- readonly counter: string;
24
- /** Each remove button's name, with `{number}`, for example "Remove photo {number}". */
25
- readonly removeLabel: string;
26
- /** `image/*` by default; `image/*,application/pdf` where the contract takes PDFs. */
27
- readonly accept?: string;
28
- /**
29
- * The site's message for each reason a photo is refused (`count` may use `{max}`). Without them the shared photo
30
- * preparation's own wording shows.
31
- */
32
- readonly errorMessages?: Readonly<Record<BrandlabContactAttachmentErrorReason, string>> | undefined;
33
- /** A form-level message, for example when photos are required. A refused photo's message wins. */
34
- readonly error?: string | undefined;
35
- readonly required?: boolean;
36
- /** Locks the box while an enquiry is sending. */
37
- readonly disabled?: boolean;
38
- }
39
- export declare function PhotoUpload({ id, label, attachments, counter, removeLabel, accept, errorMessages, error, required, disabled, classes, }: PhotoUploadProps): import("react/jsx-runtime").JSX.Element;
40
- //# sourceMappingURL=photo-upload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"photo-upload.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/form/photo-upload.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,oCAAoC,EACpC,mCAAmC,EACpC,MAAM,qCAAqC,CAAA;AAG5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAG/D,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,OAAO,GACP,MAAM,GACN,UAAU,GACV,SAAS,GACT,QAAQ,GACR,OAAO,GACP,OAAO,GACP,QAAQ,GACR,OAAO,CAAA;AACX,gGAAgG;AAChG,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAA;AACnE,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,uBAAuB,CAAC,CAAA;AAE9G,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,6GAA6G;IAC7G,QAAQ,CAAC,WAAW,EAAE,mCAAmC,CAAA;IACzD,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,uFAAuF;IACvF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,qFAAqF;IACrF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,oCAAoC,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAA;IACnG,kGAAkG;IAClG,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC5B;AAED,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,KAAK,EACL,WAAW,EACX,OAAO,EACP,WAAW,EACX,MAAkB,EAClB,aAAa,EACb,KAAK,EACL,QAAgB,EAChB,QAAgB,EAChB,OAAO,GACR,EAAE,gBAAgB,2CAgElB"}
@@ -1,19 +0,0 @@
1
- 'use client';
2
- import { createElement as _createElement } from "react";
3
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
- import { HeadlessStatus } from '../../ui.js';
5
- import { Icon } from '../icons.js';
6
- import { repeatedSlot, slot } from '../skin.js';
7
- import { fillCopy } from './copy.js';
8
- export function PhotoUpload({ id, label, attachments, counter, removeLabel, accept = 'image/*', errorMessages, error, required = false, disabled = false, classes, }) {
9
- const counterId = `${id}-count`;
10
- const errorId = `${id}-error`;
11
- const reason = attachments.errorReason;
12
- const refused = reason && errorMessages ? fillCopy(errorMessages[reason], { max: attachments.maxImages }) : attachments.errorMessage;
13
- const message = refused ?? error;
14
- const state = attachments.isProcessing ? 'busy' : attachments.isDragging ? 'dragging' : 'idle';
15
- return (_jsxs("div", { "data-bl": "photo-upload", ...slot(classes, 'field'), children: [_jsxs("div", { ...slot(classes, 'drop'), "data-state": state, "data-disabled": disabled ? 'true' : undefined, onDragOver: disabled ? undefined : attachments.handleDragOver, onDragLeave: disabled ? undefined : attachments.handleDragLeave, onDrop: disabled ? undefined : (event) => void attachments.handleDrop(event), children: [_jsx("input", { id: id, type: "file", accept: accept, multiple: true, disabled: disabled, "aria-required": required ? true : undefined, "aria-invalid": message ? true : undefined, "aria-describedby": [counterId, message ? errorId : undefined].filter(Boolean).join(' '), "data-bl-visually-hidden": "", onChange: (event) => void attachments.handleImageChange(event) }), _jsxs("label", { ...slot(classes, 'label'), htmlFor: id, children: [_jsx("span", { ...slot(classes, 'dropIcon'), children: _jsx(Icon, { name: "camera" }) }), _jsx("span", { children: label })] }), _jsx(HeadlessStatus, { ...slot(classes, 'counter'), id: counterId, children: fillCopy(counter, { count: attachments.images.length, max: attachments.maxImages }) })] }), attachments.images.length > 0 ? (_jsx("ul", { ...slot(classes, 'photos'), children: attachments.images.map((image, index) => (_createElement("li", { ...repeatedSlot('photo'), key: image.preview },
16
- _jsx("img", { ...repeatedSlot('thumb'), src: image.preview, alt: "", width: 64, height: 64 }),
17
- _jsxs("button", { ...repeatedSlot('remove'), type: "button", disabled: disabled, onClick: () => attachments.removeImage(index), children: [_jsx(Icon, { name: "close" }), _jsx("span", { "data-bl-visually-hidden": "", children: fillCopy(removeLabel, { number: index + 1 }) })] })))) })) : null, message ? (_jsx("div", { ...slot(classes, 'error'), id: errorId, role: "alert", children: message })) : null] }));
18
- }
19
- //# sourceMappingURL=photo-upload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"photo-upload.js","sourceRoot":"","sources":["../../../src/ui-kit/form/photo-upload.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;AAaZ,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AA0CpC,MAAM,UAAU,WAAW,CAAC,EAC1B,EAAE,EACF,KAAK,EACL,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AK,CAAC,OAAO,EAAE,GAAG,EAAC,EAAE,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI;oBACpF,qBACM,YAAY,CAAC,QAAQ,CAAC,EAC1B,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,aAE7C,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,EACrB,0CAA8B,EAAE,YAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,GAAQ,IAC/E,CACN,CACN,CAAC,GACC,CACN,CAAC,CAAC,CAAC,IAAI,EACP,OAAO,CAAC,CAAC,CAAC,CACT,iBAAS,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC,OAAO,YACvD,OAAO,GACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC","sourcesContent":["'use client'\n\n/**\n * `PhotoUpload`: the \"Add photos\" drop box over the shared photo preparation (`useBrandlabContactAttachments`). A\n * real file input, visually hidden but focusable, so the keyboard opens the picker with Enter or Space; the whole\n * box is its label and a drop target. `accept=\"image/*\"` and never a `capture` attribute, so phones offer the\n * library as well as the camera. The \"0 of 5\" counter is a `HeadlessStatus`, so each change is announced. Chosen\n * photos show as thumbnails with a remove button each.\n */\nimport type {\n BrandlabContactAttachmentErrorReason,\n UseBrandlabContactAttachmentsResult,\n} from '../../contact/attachments-client.js'\nimport { HeadlessStatus } from '../../ui.js'\nimport { Icon } from '../icons.js'\nimport type { RepeatedSlotOf } from '../repeated-slots.js'\nimport { repeatedSlot, slot, type SkinEntry } from '../skin.js'\nimport { fillCopy } from './copy.js'\n\nexport type PhotoUploadSlot =\n | 'field'\n | 'label'\n | 'drop'\n | 'dropIcon'\n | 'counter'\n | 'photos'\n | 'photo'\n | 'thumb'\n | 'remove'\n | 'error'\n/** Rendered once per chosen photo: styled from the skin stylesheet, never by class (3.14.0). */\nexport type PhotoUploadRepeatedSlot = RepeatedSlotOf<'photoUpload'>\nexport type PhotoUploadSkin = SkinEntry<PhotoUploadSlot, never, Record<never, never>, PhotoUploadRepeatedSlot>\n\nexport interface PhotoUploadProps extends PhotoUploadSkin {\n /** The file input's id. */\n readonly id: string\n /** The drop box's label, for example \"Add photos\". */\n readonly label: string\n /** The prepared photos, from `useBrandlabContactForm().attachments` or `useBrandlabContactAttachments()`. */\n readonly attachments: UseBrandlabContactAttachmentsResult\n /** The counter, with `{count}` and `{max}`, for example \"{count} of {max}\". */\n readonly counter: string\n /** Each remove button's name, with `{number}`, for example \"Remove photo {number}\". */\n readonly removeLabel: string\n /** `image/*` by default; `image/*,application/pdf` where the contract takes PDFs. */\n readonly accept?: string\n /**\n * The site's message for each reason a photo is refused (`count` may use `{max}`). Without them the shared photo\n * preparation's own wording shows.\n */\n readonly errorMessages?: Readonly<Record<BrandlabContactAttachmentErrorReason, string>> | undefined\n /** A form-level message, for example when photos are required. A refused photo's message wins. */\n readonly error?: string | undefined\n readonly required?: boolean\n /** Locks the box while an enquiry is sending. */\n readonly disabled?: boolean\n}\n\nexport function PhotoUpload({\n id,\n label,\n attachments,\n counter,\n removeLabel,\n accept = 'image/*',\n errorMessages,\n error,\n required = false,\n disabled = false,\n classes,\n}: PhotoUploadProps) {\n const counterId = `${id}-count`\n const errorId = `${id}-error`\n const reason = attachments.errorReason\n const refused = reason && errorMessages ? fillCopy(errorMessages[reason], { max: attachments.maxImages }) : attachments.errorMessage\n const message = refused ?? error\n const state = attachments.isProcessing ? 'busy' : attachments.isDragging ? 'dragging' : 'idle'\n return (\n <div data-bl=\"photo-upload\" {...slot(classes, 'field')}>\n <div\n {...slot(classes, 'drop')}\n data-state={state}\n data-disabled={disabled ? 'true' : undefined}\n onDragOver={disabled ? undefined : attachments.handleDragOver}\n onDragLeave={disabled ? undefined : attachments.handleDragLeave}\n onDrop={disabled ? undefined : (event) => void attachments.handleDrop(event)}\n >\n <input\n id={id}\n type=\"file\"\n accept={accept}\n multiple\n disabled={disabled}\n aria-required={required ? true : undefined}\n aria-invalid={message ? true : undefined}\n aria-describedby={[counterId, message ? errorId : undefined].filter(Boolean).join(' ')}\n data-bl-visually-hidden=\"\"\n onChange={(event) => void attachments.handleImageChange(event)}\n />\n <label {...slot(classes, 'label')} htmlFor={id}>\n <span {...slot(classes, 'dropIcon')}>\n <Icon name=\"camera\" />\n </span>\n <span>{label}</span>\n </label>\n <HeadlessStatus {...slot(classes, 'counter')} id={counterId}>\n {fillCopy(counter, { count: attachments.images.length, max: attachments.maxImages })}\n </HeadlessStatus>\n </div>\n {attachments.images.length > 0 ? (\n <ul {...slot(classes, 'photos')}>\n {attachments.images.map((image, index) => (\n <li {...repeatedSlot('photo')} key={image.preview}>\n <img {...repeatedSlot('thumb')} src={image.preview} alt=\"\" width={64} height={64} />\n <button\n {...repeatedSlot('remove')}\n type=\"button\"\n disabled={disabled}\n onClick={() => attachments.removeImage(index)}\n >\n <Icon name=\"close\" />\n <span data-bl-visually-hidden=\"\">{fillCopy(removeLabel, { number: index + 1 })}</span>\n </button>\n </li>\n ))}\n </ul>\n ) : null}\n {message ? (\n <div {...slot(classes, 'error')} id={errorId} role=\"alert\">\n {message}\n </div>\n ) : null}\n </div>\n )\n}\n"]}
@@ -1,15 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type DialogSkin } from './dialog.js';
3
- export type QuoteDialogSkin = DialogSkin;
4
- export interface QuoteDialogProps extends QuoteDialogSkin {
5
- /** The dialog's H2, for example "Get a free quote". */
6
- readonly title: string;
7
- /** The close button's accessible name, for example "Close". */
8
- readonly closeLabel: string;
9
- /** The dialog's id (default `quote-dialog-panel`; the form inside is `quote-dialog`). */
10
- readonly id?: string;
11
- /** The form, rendered once the dialog first opens. */
12
- readonly children: ReactNode;
13
- }
14
- export declare function QuoteDialog({ title, closeLabel, id, classes, children }: QuoteDialogProps): import("react/jsx-runtime").JSX.Element;
15
- //# sourceMappingURL=quote-dialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quote-dialog.d.ts","sourceRoot":"","sources":["../../../src/ui-kit/form/quote-dialog.tsx"],"names":[],"mappings":"AAWA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,aAAa,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAA;AAExC,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,uDAAuD;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,yFAAyF;IACzF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B;AA0BD,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAyB,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CAwChH"}
@@ -1,68 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- /**
4
- * `QuoteDialog`: the quote form in a modal `Dialog`, opened by any `QuoteButton` (`[data-bl="quote-button"]`) on the
5
- * page through one delegated click listener while the dialog is mounted. On the page the button links to (the form's
6
- * own page, for example `/contact`) the link keeps its default and scrolls to the form. Without scripts every button
7
- * stays a plain link to the form. The form mounts on the first open and stays mounted, so typed values survive
8
- * closing and reopening; focus returns to the button that opened it. A client navigation (the consent link, for
9
- * example) closes it.
10
- */
11
- import { usePathname } from 'next/navigation';
12
- import { useEffect, useRef, useState } from 'react';
13
- import { Dialog } from './dialog.js';
14
- function samePath(left, right) {
15
- const trim = (path) => path.replace(/\/+$/, '') || '/';
16
- return trim(left) === trim(right);
17
- }
18
- /** The quote button a click landed on, when the click should open the dialog. */
19
- function quoteButtonFor(event) {
20
- if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
21
- return undefined;
22
- }
23
- const target = event.target instanceof Element ? event.target.closest('a[data-bl="quote-button"]') : null;
24
- if (!(target instanceof HTMLAnchorElement) || (target.target && target.target !== '_self'))
25
- return undefined;
26
- let url;
27
- try {
28
- url = new URL(target.href, window.location.href);
29
- }
30
- catch {
31
- return undefined;
32
- }
33
- if (url.origin !== window.location.origin)
34
- return undefined;
35
- // On the form's own page the link scrolls to the form instead.
36
- if (samePath(url.pathname, window.location.pathname))
37
- return undefined;
38
- return target;
39
- }
40
- export function QuoteDialog({ title, closeLabel, id = 'quote-dialog-panel', classes, children }) {
41
- const [open, setOpen] = useState(false);
42
- const [mounted, setMounted] = useState(false);
43
- const returnFocusRef = useRef(null);
44
- const pathname = usePathname();
45
- const shownPath = useRef(pathname);
46
- useEffect(() => {
47
- if (shownPath.current === pathname)
48
- return;
49
- shownPath.current = pathname;
50
- setOpen(false);
51
- }, [pathname]);
52
- useEffect(() => {
53
- // Capture phase: decided before a framework link handler starts a client navigation.
54
- const onClick = (event) => {
55
- const button = quoteButtonFor(event);
56
- if (!button)
57
- return;
58
- event.preventDefault();
59
- returnFocusRef.current = button;
60
- setMounted(true);
61
- setOpen(true);
62
- };
63
- document.addEventListener('click', onClick, true);
64
- return () => document.removeEventListener('click', onClick, true);
65
- }, []);
66
- return (_jsx(Dialog, { id: id, open: open, onClose: () => setOpen(false), title: title, closeLabel: closeLabel, returnFocusRef: returnFocusRef, classes: classes, children: mounted ? children : null }));
67
- }
68
- //# sourceMappingURL=quote-dialog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quote-dialog.js","sourceRoot":"","sources":["../../../src/ui-kit/form/quote-dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;GAOG;AACH,OAAO,EAAE,WA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EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;QACjD,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;IACnE,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CACL,KAAC,MAAM,IACL,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAC7B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,YAEf,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,GACnB,CACV,CAAA;AACH,CAAC","sourcesContent":["'use client'\n\n/**\n * `QuoteDialog`: the quote form in a modal `Dialog`, opened by any `QuoteButton` (`[data-bl=\"quote-button\"]`) on the\n * page through one delegated click listener while the dialog is mounted. On the page the button links to (the form's\n * own page, for example `/contact`) the link keeps its default and scrolls to the form. Without scripts every button\n * stays a plain link to the form. The form mounts on the first open and stays mounted, so typed values survive\n * closing and reopening; focus returns to the button that opened it. A client navigation (the consent link, for\n * example) closes it.\n */\nimport { usePathname } from 'next/navigation'\nimport { useEffect, useRef, useState, type ReactNode } from 'react'\nimport { Dialog, type DialogSkin } from './dialog.js'\n\nexport type QuoteDialogSkin = DialogSkin\n\nexport interface QuoteDialogProps extends QuoteDialogSkin {\n /** The dialog's H2, for example \"Get a free quote\". */\n readonly title: string\n /** The close button's accessible name, for example \"Close\". */\n readonly closeLabel: string\n /** The dialog's id (default `quote-dialog-panel`; the form inside is `quote-dialog`). */\n readonly id?: string\n /** The form, rendered once the dialog first opens. */\n readonly children: ReactNode\n}\n\nfunction samePath(left: string, right: string) {\n const trim = (path: string) => path.replace(/\\/+$/, '') || '/'\n return trim(left) === trim(right)\n}\n\n/** The quote button a click landed on, when the click should open the dialog. */\nfunction quoteButtonFor(event: MouseEvent): HTMLAnchorElement | undefined {\n if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {\n return undefined\n }\n const target = event.target instanceof Element ? event.target.closest('a[data-bl=\"quote-button\"]') : null\n if (!(target instanceof HTMLAnchorElement) || (target.target && target.target !== '_self')) return undefined\n let url: URL\n try {\n url = new URL(target.href, window.location.href)\n } catch {\n return undefined\n }\n if (url.origin !== window.location.origin) return undefined\n // On the form's own page the link scrolls to the form instead.\n if (samePath(url.pathname, window.location.pathname)) return undefined\n return target\n}\n\nexport function QuoteDialog({ title, closeLabel, id = 'quote-dialog-panel', classes, children }: QuoteDialogProps) {\n const [open, setOpen] = useState(false)\n const [mounted, setMounted] = useState(false)\n const returnFocusRef = useRef<HTMLElement | null>(null)\n const pathname = usePathname()\n const shownPath = useRef(pathname)\n\n useEffect(() => {\n if (shownPath.current === pathname) return\n shownPath.current = pathname\n setOpen(false)\n }, [pathname])\n\n useEffect(() => {\n // Capture phase: decided before a framework link handler starts a client navigation.\n const onClick = (event: MouseEvent) => {\n const button = quoteButtonFor(event)\n if (!button) return\n event.preventDefault()\n returnFocusRef.current = button\n setMounted(true)\n setOpen(true)\n }\n document.addEventListener('click', onClick, true)\n return () => document.removeEventListener('click', onClick, true)\n }, [])\n\n return (\n <Dialog\n id={id}\n open={open}\n onClose={() => setOpen(false)}\n title={title}\n closeLabel={closeLabel}\n returnFocusRef={returnFocusRef}\n classes={classes}\n >\n {mounted ? children : null}\n </Dialog>\n )\n}\n"]}