nhsuk-frontend 10.5.2 → 10.6.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 (1061) hide show
  1. package/dist/nhsuk/assets/images/nhsuk-icon-arrow-up-down.svg +5 -0
  2. package/dist/nhsuk/common/nhsuk-frontend-version.js +1 -1
  3. package/dist/nhsuk/common/nhsuk-frontend-version.mjs +1 -1
  4. package/dist/nhsuk/component.d.mts +14 -6
  5. package/dist/nhsuk/component.d.mts.map +1 -1
  6. package/dist/nhsuk/component.js +20 -5
  7. package/dist/nhsuk/component.js.map +1 -1
  8. package/dist/nhsuk/component.mjs +20 -5
  9. package/dist/nhsuk/component.mjs.map +1 -1
  10. package/dist/nhsuk/components/_index.scss +1 -0
  11. package/dist/nhsuk/components/_index.scss.map +1 -1
  12. package/dist/nhsuk/components/action-link/_index.scss +17 -5
  13. package/dist/nhsuk/components/action-link/_index.scss.map +1 -1
  14. package/dist/nhsuk/components/action-link/fixtures.d.mts +27 -2
  15. package/dist/nhsuk/components/action-link/fixtures.d.mts.map +1 -1
  16. package/dist/nhsuk/components/action-link/fixtures.js +34 -13
  17. package/dist/nhsuk/components/action-link/fixtures.js.map +1 -1
  18. package/dist/nhsuk/components/action-link/fixtures.json +42 -8
  19. package/dist/nhsuk/components/action-link/fixtures.mjs +34 -13
  20. package/dist/nhsuk/components/action-link/fixtures.mjs.map +1 -1
  21. package/dist/nhsuk/components/action-link/macro-options.d.mts +27 -16
  22. package/dist/nhsuk/components/action-link/macro-options.d.mts.map +1 -1
  23. package/dist/nhsuk/components/action-link/macro-options.js +9 -2
  24. package/dist/nhsuk/components/action-link/macro-options.js.map +1 -1
  25. package/dist/nhsuk/components/action-link/macro-options.json +10 -2
  26. package/dist/nhsuk/components/action-link/macro-options.mjs +9 -2
  27. package/dist/nhsuk/components/action-link/macro-options.mjs.map +1 -1
  28. package/dist/nhsuk/components/action-link/macro.njk +1 -1
  29. package/dist/nhsuk/components/action-link/template.njk +10 -7
  30. package/dist/nhsuk/components/back-link/_index.scss +4 -1
  31. package/dist/nhsuk/components/back-link/_index.scss.map +1 -1
  32. package/dist/nhsuk/components/back-link/fixtures.d.mts +11 -5
  33. package/dist/nhsuk/components/back-link/fixtures.d.mts.map +1 -1
  34. package/dist/nhsuk/components/back-link/fixtures.js +23 -17
  35. package/dist/nhsuk/components/back-link/fixtures.js.map +1 -1
  36. package/dist/nhsuk/components/back-link/fixtures.json +22 -7
  37. package/dist/nhsuk/components/back-link/fixtures.mjs +23 -17
  38. package/dist/nhsuk/components/back-link/fixtures.mjs.map +1 -1
  39. package/dist/nhsuk/components/back-link/macro-options.d.mts +23 -12
  40. package/dist/nhsuk/components/back-link/macro-options.d.mts.map +1 -1
  41. package/dist/nhsuk/components/back-link/macro-options.js +9 -2
  42. package/dist/nhsuk/components/back-link/macro-options.js.map +1 -1
  43. package/dist/nhsuk/components/back-link/macro-options.json +10 -2
  44. package/dist/nhsuk/components/back-link/macro-options.mjs +9 -2
  45. package/dist/nhsuk/components/back-link/macro-options.mjs.map +1 -1
  46. package/dist/nhsuk/components/back-link/macro.njk +1 -1
  47. package/dist/nhsuk/components/back-link/template.njk +15 -9
  48. package/dist/nhsuk/components/breadcrumb/_index.scss +6 -3
  49. package/dist/nhsuk/components/breadcrumb/_index.scss.map +1 -1
  50. package/dist/nhsuk/components/breadcrumb/fixtures.d.mts +3 -3
  51. package/dist/nhsuk/components/breadcrumb/fixtures.js +43 -43
  52. package/dist/nhsuk/components/breadcrumb/fixtures.js.map +1 -1
  53. package/dist/nhsuk/components/breadcrumb/fixtures.json +6 -6
  54. package/dist/nhsuk/components/breadcrumb/fixtures.mjs +43 -43
  55. package/dist/nhsuk/components/breadcrumb/fixtures.mjs.map +1 -1
  56. package/dist/nhsuk/components/breadcrumb/macro-options.d.mts +51 -26
  57. package/dist/nhsuk/components/breadcrumb/macro-options.d.mts.map +1 -1
  58. package/dist/nhsuk/components/breadcrumb/macro-options.js +21 -6
  59. package/dist/nhsuk/components/breadcrumb/macro-options.js.map +1 -1
  60. package/dist/nhsuk/components/breadcrumb/macro-options.json +23 -6
  61. package/dist/nhsuk/components/breadcrumb/macro-options.mjs +21 -6
  62. package/dist/nhsuk/components/breadcrumb/macro-options.mjs.map +1 -1
  63. package/dist/nhsuk/components/breadcrumb/macro.njk +1 -1
  64. package/dist/nhsuk/components/breadcrumb/template.njk +19 -8
  65. package/dist/nhsuk/components/button/_index.scss +12 -12
  66. package/dist/nhsuk/components/button/_index.scss.map +1 -1
  67. package/dist/nhsuk/components/button/fixtures.d.mts +60 -60
  68. package/dist/nhsuk/components/button/fixtures.js +290 -290
  69. package/dist/nhsuk/components/button/fixtures.mjs +290 -290
  70. package/dist/nhsuk/components/button/macro-options.d.mts +1 -0
  71. package/dist/nhsuk/components/button/macro-options.d.mts.map +1 -1
  72. package/dist/nhsuk/components/button/macro-options.js +2 -1
  73. package/dist/nhsuk/components/button/macro-options.js.map +1 -1
  74. package/dist/nhsuk/components/button/macro-options.json +2 -1
  75. package/dist/nhsuk/components/button/macro-options.mjs +2 -1
  76. package/dist/nhsuk/components/button/macro-options.mjs.map +1 -1
  77. package/dist/nhsuk/components/button/macro.njk +1 -1
  78. package/dist/nhsuk/components/button/template.njk +10 -13
  79. package/dist/nhsuk/components/caption/README.md +9 -0
  80. package/dist/nhsuk/components/caption/fixtures.json +5 -0
  81. package/dist/nhsuk/components/caption/macro-options.d.mts +99 -0
  82. package/dist/nhsuk/components/caption/macro-options.d.mts.map +1 -0
  83. package/dist/nhsuk/components/caption/macro-options.js +81 -0
  84. package/dist/nhsuk/components/caption/macro-options.js.map +1 -0
  85. package/dist/nhsuk/components/caption/macro-options.json +65 -0
  86. package/dist/nhsuk/components/caption/macro-options.mjs +78 -0
  87. package/dist/nhsuk/components/caption/macro-options.mjs.map +1 -0
  88. package/dist/nhsuk/components/caption/macro.njk +3 -0
  89. package/dist/nhsuk/components/caption/template.njk +42 -0
  90. package/dist/nhsuk/components/card/_index.scss +28 -27
  91. package/dist/nhsuk/components/card/_index.scss.map +1 -1
  92. package/dist/nhsuk/components/card/action/macro.njk +3 -0
  93. package/dist/nhsuk/components/card/action/template.njk +65 -0
  94. package/dist/nhsuk/components/card/fixtures.d.mts +285 -121
  95. package/dist/nhsuk/components/card/fixtures.d.mts.map +1 -1
  96. package/dist/nhsuk/components/card/fixtures.js +465 -267
  97. package/dist/nhsuk/components/card/fixtures.js.map +1 -1
  98. package/dist/nhsuk/components/card/fixtures.json +359 -130
  99. package/dist/nhsuk/components/card/fixtures.mjs +465 -267
  100. package/dist/nhsuk/components/card/fixtures.mjs.map +1 -1
  101. package/dist/nhsuk/components/card/macro-options.d.mts +459 -266
  102. package/dist/nhsuk/components/card/macro-options.d.mts.map +1 -1
  103. package/dist/nhsuk/components/card/macro-options.js +139 -31
  104. package/dist/nhsuk/components/card/macro-options.js.map +1 -1
  105. package/dist/nhsuk/components/card/macro-options.json +155 -31
  106. package/dist/nhsuk/components/card/macro-options.mjs +139 -31
  107. package/dist/nhsuk/components/card/macro-options.mjs.map +1 -1
  108. package/dist/nhsuk/components/card/macro.njk +1 -1
  109. package/dist/nhsuk/components/card/template.njk +110 -92
  110. package/dist/nhsuk/components/character-count/_index.scss +5 -4
  111. package/dist/nhsuk/components/character-count/_index.scss.map +1 -1
  112. package/dist/nhsuk/components/character-count/character-count.d.mts +0 -7
  113. package/dist/nhsuk/components/character-count/character-count.d.mts.map +1 -1
  114. package/dist/nhsuk/components/character-count/fixtures.d.mts +28 -16
  115. package/dist/nhsuk/components/character-count/fixtures.d.mts.map +1 -1
  116. package/dist/nhsuk/components/character-count/fixtures.js +183 -171
  117. package/dist/nhsuk/components/character-count/fixtures.js.map +1 -1
  118. package/dist/nhsuk/components/character-count/fixtures.json +26 -10
  119. package/dist/nhsuk/components/character-count/fixtures.mjs +183 -171
  120. package/dist/nhsuk/components/character-count/fixtures.mjs.map +1 -1
  121. package/dist/nhsuk/components/character-count/macro-options.js +1 -1
  122. package/dist/nhsuk/components/character-count/macro-options.js.map +1 -1
  123. package/dist/nhsuk/components/character-count/macro-options.json +1 -1
  124. package/dist/nhsuk/components/character-count/macro-options.mjs +1 -1
  125. package/dist/nhsuk/components/character-count/macro-options.mjs.map +1 -1
  126. package/dist/nhsuk/components/character-count/macro.njk +1 -1
  127. package/dist/nhsuk/components/character-count/template.njk +16 -10
  128. package/dist/nhsuk/components/checkboxes/_index.scss +52 -15
  129. package/dist/nhsuk/components/checkboxes/_index.scss.map +1 -1
  130. package/dist/nhsuk/components/checkboxes/checkboxes.d.mts +68 -10
  131. package/dist/nhsuk/components/checkboxes/checkboxes.d.mts.map +1 -1
  132. package/dist/nhsuk/components/checkboxes/checkboxes.js +162 -49
  133. package/dist/nhsuk/components/checkboxes/checkboxes.js.map +1 -1
  134. package/dist/nhsuk/components/checkboxes/checkboxes.mjs +162 -49
  135. package/dist/nhsuk/components/checkboxes/checkboxes.mjs.map +1 -1
  136. package/dist/nhsuk/components/checkboxes/fixtures.d.mts +188 -46
  137. package/dist/nhsuk/components/checkboxes/fixtures.d.mts.map +1 -1
  138. package/dist/nhsuk/components/checkboxes/fixtures.js +517 -291
  139. package/dist/nhsuk/components/checkboxes/fixtures.js.map +1 -1
  140. package/dist/nhsuk/components/checkboxes/fixtures.json +404 -84
  141. package/dist/nhsuk/components/checkboxes/fixtures.mjs +517 -291
  142. package/dist/nhsuk/components/checkboxes/fixtures.mjs.map +1 -1
  143. package/dist/nhsuk/components/checkboxes/macro-options.d.mts +54 -31
  144. package/dist/nhsuk/components/checkboxes/macro-options.d.mts.map +1 -1
  145. package/dist/nhsuk/components/checkboxes/macro-options.js +18 -4
  146. package/dist/nhsuk/components/checkboxes/macro-options.js.map +1 -1
  147. package/dist/nhsuk/components/checkboxes/macro-options.json +20 -4
  148. package/dist/nhsuk/components/checkboxes/macro-options.mjs +18 -4
  149. package/dist/nhsuk/components/checkboxes/macro-options.mjs.map +1 -1
  150. package/dist/nhsuk/components/checkboxes/macro.njk +1 -1
  151. package/dist/nhsuk/components/checkboxes/template.njk +64 -34
  152. package/dist/nhsuk/components/code/_index.scss +4 -7
  153. package/dist/nhsuk/components/code/_index.scss.map +1 -1
  154. package/dist/nhsuk/components/code/code.d.mts +7 -0
  155. package/dist/nhsuk/components/code/code.d.mts.map +1 -1
  156. package/dist/nhsuk/components/code/code.js +18 -5
  157. package/dist/nhsuk/components/code/code.js.map +1 -1
  158. package/dist/nhsuk/components/code/code.mjs +18 -5
  159. package/dist/nhsuk/components/code/code.mjs.map +1 -1
  160. package/dist/nhsuk/components/code/fixtures.d.mts +9 -9
  161. package/dist/nhsuk/components/code/fixtures.js +29 -29
  162. package/dist/nhsuk/components/code/fixtures.mjs +29 -29
  163. package/dist/nhsuk/components/code/macro.njk +1 -1
  164. package/dist/nhsuk/components/code/template.njk +6 -3
  165. package/dist/nhsuk/components/contents-list/fixtures.d.mts +16 -2
  166. package/dist/nhsuk/components/contents-list/fixtures.d.mts.map +1 -1
  167. package/dist/nhsuk/components/contents-list/fixtures.js +51 -29
  168. package/dist/nhsuk/components/contents-list/fixtures.js.map +1 -1
  169. package/dist/nhsuk/components/contents-list/fixtures.json +32 -0
  170. package/dist/nhsuk/components/contents-list/fixtures.mjs +51 -29
  171. package/dist/nhsuk/components/contents-list/fixtures.mjs.map +1 -1
  172. package/dist/nhsuk/components/contents-list/macro-options.d.mts +19 -8
  173. package/dist/nhsuk/components/contents-list/macro-options.d.mts.map +1 -1
  174. package/dist/nhsuk/components/contents-list/macro-options.js +15 -8
  175. package/dist/nhsuk/components/contents-list/macro-options.js.map +1 -1
  176. package/dist/nhsuk/components/contents-list/macro-options.json +17 -9
  177. package/dist/nhsuk/components/contents-list/macro-options.mjs +15 -8
  178. package/dist/nhsuk/components/contents-list/macro-options.mjs.map +1 -1
  179. package/dist/nhsuk/components/contents-list/macro.njk +1 -1
  180. package/dist/nhsuk/components/contents-list/template.njk +3 -1
  181. package/dist/nhsuk/components/date-input/fixtures.d.mts +45 -43
  182. package/dist/nhsuk/components/date-input/fixtures.d.mts.map +1 -1
  183. package/dist/nhsuk/components/date-input/fixtures.js +238 -236
  184. package/dist/nhsuk/components/date-input/fixtures.js.map +1 -1
  185. package/dist/nhsuk/components/date-input/fixtures.json +32 -26
  186. package/dist/nhsuk/components/date-input/fixtures.mjs +238 -236
  187. package/dist/nhsuk/components/date-input/fixtures.mjs.map +1 -1
  188. package/dist/nhsuk/components/date-input/macro.njk +1 -1
  189. package/dist/nhsuk/components/date-input/template.njk +42 -27
  190. package/dist/nhsuk/components/details/_index.scss +15 -24
  191. package/dist/nhsuk/components/details/_index.scss.map +1 -1
  192. package/dist/nhsuk/components/details/fixtures.d.mts +13 -5
  193. package/dist/nhsuk/components/details/fixtures.d.mts.map +1 -1
  194. package/dist/nhsuk/components/details/fixtures.js +24 -16
  195. package/dist/nhsuk/components/details/fixtures.js.map +1 -1
  196. package/dist/nhsuk/components/details/fixtures.json +18 -10
  197. package/dist/nhsuk/components/details/fixtures.mjs +24 -16
  198. package/dist/nhsuk/components/details/fixtures.mjs.map +1 -1
  199. package/dist/nhsuk/components/details/macro-options.d.mts +114 -55
  200. package/dist/nhsuk/components/details/macro-options.d.mts.map +1 -1
  201. package/dist/nhsuk/components/details/macro-options.js +38 -4
  202. package/dist/nhsuk/components/details/macro-options.js.map +1 -1
  203. package/dist/nhsuk/components/details/macro-options.json +43 -4
  204. package/dist/nhsuk/components/details/macro-options.mjs +38 -4
  205. package/dist/nhsuk/components/details/macro-options.mjs.map +1 -1
  206. package/dist/nhsuk/components/details/macro.njk +1 -1
  207. package/dist/nhsuk/components/details/template.njk +19 -6
  208. package/dist/nhsuk/components/do-dont-list/_index.scss +4 -1
  209. package/dist/nhsuk/components/do-dont-list/_index.scss.map +1 -1
  210. package/dist/nhsuk/components/do-dont-list/fixtures.d.mts +5 -5
  211. package/dist/nhsuk/components/do-dont-list/fixtures.js +50 -50
  212. package/dist/nhsuk/components/do-dont-list/fixtures.js.map +1 -1
  213. package/dist/nhsuk/components/do-dont-list/fixtures.json +6 -6
  214. package/dist/nhsuk/components/do-dont-list/fixtures.mjs +50 -50
  215. package/dist/nhsuk/components/do-dont-list/fixtures.mjs.map +1 -1
  216. package/dist/nhsuk/components/do-dont-list/macro-options.d.mts +159 -66
  217. package/dist/nhsuk/components/do-dont-list/macro-options.d.mts.map +1 -1
  218. package/dist/nhsuk/components/do-dont-list/macro-options.js +63 -10
  219. package/dist/nhsuk/components/do-dont-list/macro-options.js.map +1 -1
  220. package/dist/nhsuk/components/do-dont-list/macro-options.json +72 -11
  221. package/dist/nhsuk/components/do-dont-list/macro-options.mjs +63 -10
  222. package/dist/nhsuk/components/do-dont-list/macro-options.mjs.map +1 -1
  223. package/dist/nhsuk/components/do-dont-list/macro.njk +1 -1
  224. package/dist/nhsuk/components/do-dont-list/template.njk +24 -4
  225. package/dist/nhsuk/components/error-message/fixtures.d.mts +40 -11
  226. package/dist/nhsuk/components/error-message/fixtures.d.mts.map +1 -1
  227. package/dist/nhsuk/components/error-message/fixtures.js +28 -3
  228. package/dist/nhsuk/components/error-message/fixtures.js.map +1 -1
  229. package/dist/nhsuk/components/error-message/fixtures.json +47 -1
  230. package/dist/nhsuk/components/error-message/fixtures.mjs +28 -3
  231. package/dist/nhsuk/components/error-message/fixtures.mjs.map +1 -1
  232. package/dist/nhsuk/components/error-message/macro-options.d.mts +17 -7
  233. package/dist/nhsuk/components/error-message/macro-options.d.mts.map +1 -1
  234. package/dist/nhsuk/components/error-message/macro-options.js +6 -0
  235. package/dist/nhsuk/components/error-message/macro-options.js.map +1 -1
  236. package/dist/nhsuk/components/error-message/macro-options.json +7 -0
  237. package/dist/nhsuk/components/error-message/macro-options.mjs +6 -0
  238. package/dist/nhsuk/components/error-message/macro-options.mjs.map +1 -1
  239. package/dist/nhsuk/components/error-message/macro.njk +1 -1
  240. package/dist/nhsuk/components/error-message/template.njk +14 -4
  241. package/dist/nhsuk/components/error-summary/_index.scss +1 -1
  242. package/dist/nhsuk/components/error-summary/_index.scss.map +1 -1
  243. package/dist/nhsuk/components/error-summary/error-summary.d.mts +0 -7
  244. package/dist/nhsuk/components/error-summary/error-summary.d.mts.map +1 -1
  245. package/dist/nhsuk/components/error-summary/fixtures.d.mts +95 -15
  246. package/dist/nhsuk/components/error-summary/fixtures.d.mts.map +1 -1
  247. package/dist/nhsuk/components/error-summary/fixtures.js +111 -32
  248. package/dist/nhsuk/components/error-summary/fixtures.js.map +1 -1
  249. package/dist/nhsuk/components/error-summary/fixtures.json +129 -20
  250. package/dist/nhsuk/components/error-summary/fixtures.mjs +111 -32
  251. package/dist/nhsuk/components/error-summary/fixtures.mjs.map +1 -1
  252. package/dist/nhsuk/components/error-summary/macro-options.d.mts +240 -106
  253. package/dist/nhsuk/components/error-summary/macro-options.d.mts.map +1 -1
  254. package/dist/nhsuk/components/error-summary/macro-options.js +83 -8
  255. package/dist/nhsuk/components/error-summary/macro-options.js.map +1 -1
  256. package/dist/nhsuk/components/error-summary/macro-options.json +94 -8
  257. package/dist/nhsuk/components/error-summary/macro-options.mjs +83 -8
  258. package/dist/nhsuk/components/error-summary/macro-options.mjs.map +1 -1
  259. package/dist/nhsuk/components/error-summary/macro.njk +1 -1
  260. package/dist/nhsuk/components/error-summary/template.njk +40 -11
  261. package/dist/nhsuk/components/fieldset/_index.scss +1 -0
  262. package/dist/nhsuk/components/fieldset/_index.scss.map +1 -1
  263. package/dist/nhsuk/components/fieldset/fixtures.d.mts +7 -30
  264. package/dist/nhsuk/components/fieldset/fixtures.d.mts.map +1 -1
  265. package/dist/nhsuk/components/fieldset/fixtures.js +26 -65
  266. package/dist/nhsuk/components/fieldset/fixtures.js.map +1 -1
  267. package/dist/nhsuk/components/fieldset/fixtures.json +16 -83
  268. package/dist/nhsuk/components/fieldset/fixtures.mjs +26 -65
  269. package/dist/nhsuk/components/fieldset/fixtures.mjs.map +1 -1
  270. package/dist/nhsuk/components/fieldset/macro.njk +1 -1
  271. package/dist/nhsuk/components/fieldset/template.njk +17 -5
  272. package/dist/nhsuk/components/file-upload/_index.scss +2 -2
  273. package/dist/nhsuk/components/file-upload/_index.scss.map +1 -1
  274. package/dist/nhsuk/components/file-upload/fixtures.d.mts +20 -10
  275. package/dist/nhsuk/components/file-upload/fixtures.d.mts.map +1 -1
  276. package/dist/nhsuk/components/file-upload/fixtures.js +93 -83
  277. package/dist/nhsuk/components/file-upload/fixtures.js.map +1 -1
  278. package/dist/nhsuk/components/file-upload/fixtures.json +19 -5
  279. package/dist/nhsuk/components/file-upload/fixtures.mjs +93 -83
  280. package/dist/nhsuk/components/file-upload/fixtures.mjs.map +1 -1
  281. package/dist/nhsuk/components/file-upload/macro.njk +1 -1
  282. package/dist/nhsuk/components/file-upload/template.njk +44 -26
  283. package/dist/nhsuk/components/footer/_index.scss +7 -4
  284. package/dist/nhsuk/components/footer/_index.scss.map +1 -1
  285. package/dist/nhsuk/components/footer/fixtures.d.mts +40 -12
  286. package/dist/nhsuk/components/footer/fixtures.d.mts.map +1 -1
  287. package/dist/nhsuk/components/footer/fixtures.js +238 -206
  288. package/dist/nhsuk/components/footer/fixtures.js.map +1 -1
  289. package/dist/nhsuk/components/footer/fixtures.json +67 -25
  290. package/dist/nhsuk/components/footer/fixtures.mjs +238 -206
  291. package/dist/nhsuk/components/footer/fixtures.mjs.map +1 -1
  292. package/dist/nhsuk/components/footer/macro-options.d.mts +236 -120
  293. package/dist/nhsuk/components/footer/macro-options.d.mts.map +1 -1
  294. package/dist/nhsuk/components/footer/macro-options.js +70 -4
  295. package/dist/nhsuk/components/footer/macro-options.js.map +1 -1
  296. package/dist/nhsuk/components/footer/macro-options.json +80 -4
  297. package/dist/nhsuk/components/footer/macro-options.mjs +70 -4
  298. package/dist/nhsuk/components/footer/macro-options.mjs.map +1 -1
  299. package/dist/nhsuk/components/footer/macro.njk +1 -1
  300. package/dist/nhsuk/components/footer/template.njk +37 -20
  301. package/dist/nhsuk/components/header/_index.scss +38 -37
  302. package/dist/nhsuk/components/header/_index.scss.map +1 -1
  303. package/dist/nhsuk/components/header/fixtures.d.mts +62 -40
  304. package/dist/nhsuk/components/header/fixtures.d.mts.map +1 -1
  305. package/dist/nhsuk/components/header/fixtures.js +287 -265
  306. package/dist/nhsuk/components/header/fixtures.js.map +1 -1
  307. package/dist/nhsuk/components/header/fixtures.json +66 -26
  308. package/dist/nhsuk/components/header/fixtures.mjs +287 -265
  309. package/dist/nhsuk/components/header/fixtures.mjs.map +1 -1
  310. package/dist/nhsuk/components/header/header.d.mts +2 -2
  311. package/dist/nhsuk/components/header/header.js +2 -2
  312. package/dist/nhsuk/components/header/header.mjs +2 -2
  313. package/dist/nhsuk/components/header/macro-options.d.mts +234 -153
  314. package/dist/nhsuk/components/header/macro-options.d.mts.map +1 -1
  315. package/dist/nhsuk/components/header/macro-options.js +55 -7
  316. package/dist/nhsuk/components/header/macro-options.js.map +1 -1
  317. package/dist/nhsuk/components/header/macro-options.json +61 -7
  318. package/dist/nhsuk/components/header/macro-options.mjs +55 -7
  319. package/dist/nhsuk/components/header/macro-options.mjs.map +1 -1
  320. package/dist/nhsuk/components/header/macro.njk +1 -1
  321. package/dist/nhsuk/components/header/template.njk +21 -19
  322. package/dist/nhsuk/components/heading/README.md +9 -0
  323. package/dist/nhsuk/components/heading/fixtures.d.mts +206 -0
  324. package/dist/nhsuk/components/heading/fixtures.d.mts.map +1 -0
  325. package/dist/nhsuk/components/heading/fixtures.js +200 -0
  326. package/dist/nhsuk/components/heading/fixtures.js.map +1 -0
  327. package/dist/nhsuk/components/heading/fixtures.json +529 -0
  328. package/dist/nhsuk/components/heading/fixtures.mjs +197 -0
  329. package/dist/nhsuk/components/heading/fixtures.mjs.map +1 -0
  330. package/dist/nhsuk/components/heading/macro-options.d.mts +160 -0
  331. package/dist/nhsuk/components/heading/macro-options.d.mts.map +1 -0
  332. package/dist/nhsuk/components/heading/macro-options.js +118 -0
  333. package/dist/nhsuk/components/heading/macro-options.js.map +1 -0
  334. package/dist/nhsuk/components/heading/macro-options.json +108 -0
  335. package/dist/nhsuk/components/heading/macro-options.mjs +115 -0
  336. package/dist/nhsuk/components/heading/macro-options.mjs.map +1 -0
  337. package/dist/nhsuk/components/heading/macro.njk +3 -0
  338. package/dist/nhsuk/components/heading/template.njk +119 -0
  339. package/dist/nhsuk/components/hero/_index.scss +176 -115
  340. package/dist/nhsuk/components/hero/_index.scss.map +1 -1
  341. package/dist/nhsuk/components/hero/fixtures.d.mts +90 -9
  342. package/dist/nhsuk/components/hero/fixtures.d.mts.map +1 -1
  343. package/dist/nhsuk/components/hero/fixtures.js +110 -25
  344. package/dist/nhsuk/components/hero/fixtures.js.map +1 -1
  345. package/dist/nhsuk/components/hero/fixtures.json +123 -15
  346. package/dist/nhsuk/components/hero/fixtures.mjs +110 -25
  347. package/dist/nhsuk/components/hero/fixtures.mjs.map +1 -1
  348. package/dist/nhsuk/components/hero/macro-options.d.mts +456 -120
  349. package/dist/nhsuk/components/hero/macro-options.d.mts.map +1 -1
  350. package/dist/nhsuk/components/hero/macro-options.js +199 -10
  351. package/dist/nhsuk/components/hero/macro-options.js.map +1 -1
  352. package/dist/nhsuk/components/hero/macro-options.json +228 -10
  353. package/dist/nhsuk/components/hero/macro-options.mjs +199 -10
  354. package/dist/nhsuk/components/hero/macro-options.mjs.map +1 -1
  355. package/dist/nhsuk/components/hero/macro.njk +1 -1
  356. package/dist/nhsuk/components/hero/template.njk +76 -53
  357. package/dist/nhsuk/components/hint/_index.scss +4 -8
  358. package/dist/nhsuk/components/hint/_index.scss.map +1 -1
  359. package/dist/nhsuk/components/hint/fixtures.d.mts +23 -11
  360. package/dist/nhsuk/components/hint/fixtures.d.mts.map +1 -1
  361. package/dist/nhsuk/components/hint/fixtures.js +11 -3
  362. package/dist/nhsuk/components/hint/fixtures.js.map +1 -1
  363. package/dist/nhsuk/components/hint/fixtures.json +17 -0
  364. package/dist/nhsuk/components/hint/fixtures.mjs +11 -3
  365. package/dist/nhsuk/components/hint/fixtures.mjs.map +1 -1
  366. package/dist/nhsuk/components/hint/macro-options.d.mts +15 -5
  367. package/dist/nhsuk/components/hint/macro-options.d.mts.map +1 -1
  368. package/dist/nhsuk/components/hint/macro-options.js +6 -0
  369. package/dist/nhsuk/components/hint/macro-options.js.map +1 -1
  370. package/dist/nhsuk/components/hint/macro-options.json +7 -0
  371. package/dist/nhsuk/components/hint/macro-options.mjs +6 -0
  372. package/dist/nhsuk/components/hint/macro-options.mjs.map +1 -1
  373. package/dist/nhsuk/components/hint/macro.njk +1 -1
  374. package/dist/nhsuk/components/hint/template.njk +8 -2
  375. package/dist/nhsuk/components/images/_index.scss +19 -7
  376. package/dist/nhsuk/components/images/_index.scss.map +1 -1
  377. package/dist/nhsuk/components/images/fixtures.d.mts +58 -3
  378. package/dist/nhsuk/components/images/fixtures.d.mts.map +1 -1
  379. package/dist/nhsuk/components/images/fixtures.js +101 -17
  380. package/dist/nhsuk/components/images/fixtures.js.map +1 -1
  381. package/dist/nhsuk/components/images/fixtures.json +142 -10
  382. package/dist/nhsuk/components/images/fixtures.mjs +101 -17
  383. package/dist/nhsuk/components/images/fixtures.mjs.map +1 -1
  384. package/dist/nhsuk/components/images/macro-options.d.mts +114 -63
  385. package/dist/nhsuk/components/images/macro-options.d.mts.map +1 -1
  386. package/dist/nhsuk/components/images/macro-options.js +41 -11
  387. package/dist/nhsuk/components/images/macro-options.js.map +1 -1
  388. package/dist/nhsuk/components/images/macro-options.json +46 -11
  389. package/dist/nhsuk/components/images/macro-options.mjs +41 -11
  390. package/dist/nhsuk/components/images/macro-options.mjs.map +1 -1
  391. package/dist/nhsuk/components/images/macro.njk +1 -1
  392. package/dist/nhsuk/components/images/template.njk +24 -2
  393. package/dist/nhsuk/components/index.d.mts +2 -0
  394. package/dist/nhsuk/components/index.js +6 -0
  395. package/dist/nhsuk/components/index.js.map +1 -1
  396. package/dist/nhsuk/components/index.mjs +2 -0
  397. package/dist/nhsuk/components/index.mjs.map +1 -1
  398. package/dist/nhsuk/components/input/_index.scss +18 -18
  399. package/dist/nhsuk/components/input/_index.scss.map +1 -1
  400. package/dist/nhsuk/components/input/fixtures.d.mts +43 -29
  401. package/dist/nhsuk/components/input/fixtures.d.mts.map +1 -1
  402. package/dist/nhsuk/components/input/fixtures.js +208 -194
  403. package/dist/nhsuk/components/input/fixtures.js.map +1 -1
  404. package/dist/nhsuk/components/input/fixtures.json +26 -8
  405. package/dist/nhsuk/components/input/fixtures.mjs +208 -194
  406. package/dist/nhsuk/components/input/fixtures.mjs.map +1 -1
  407. package/dist/nhsuk/components/input/macro.njk +1 -1
  408. package/dist/nhsuk/components/input/template.njk +43 -25
  409. package/dist/nhsuk/components/inset-text/_index.scss +2 -3
  410. package/dist/nhsuk/components/inset-text/_index.scss.map +1 -1
  411. package/dist/nhsuk/components/inset-text/fixtures.d.mts +22 -7
  412. package/dist/nhsuk/components/inset-text/fixtures.d.mts.map +1 -1
  413. package/dist/nhsuk/components/inset-text/fixtures.js +13 -6
  414. package/dist/nhsuk/components/inset-text/fixtures.js.map +1 -1
  415. package/dist/nhsuk/components/inset-text/fixtures.json +20 -2
  416. package/dist/nhsuk/components/inset-text/fixtures.mjs +13 -6
  417. package/dist/nhsuk/components/inset-text/fixtures.mjs.map +1 -1
  418. package/dist/nhsuk/components/inset-text/macro.njk +1 -1
  419. package/dist/nhsuk/components/inset-text/template.njk +6 -4
  420. package/dist/nhsuk/components/label/fixtures.d.mts +17 -3
  421. package/dist/nhsuk/components/label/fixtures.d.mts.map +1 -1
  422. package/dist/nhsuk/components/label/fixtures.js +39 -25
  423. package/dist/nhsuk/components/label/fixtures.js.map +1 -1
  424. package/dist/nhsuk/components/label/fixtures.json +22 -0
  425. package/dist/nhsuk/components/label/fixtures.mjs +39 -25
  426. package/dist/nhsuk/components/label/fixtures.mjs.map +1 -1
  427. package/dist/nhsuk/components/label/macro.njk +1 -1
  428. package/dist/nhsuk/components/label/template.njk +22 -11
  429. package/dist/nhsuk/components/legend/fixtures.d.mts +75 -0
  430. package/dist/nhsuk/components/legend/fixtures.d.mts.map +1 -0
  431. package/dist/nhsuk/components/legend/fixtures.js +97 -0
  432. package/dist/nhsuk/components/legend/fixtures.js.map +1 -0
  433. package/dist/nhsuk/components/legend/fixtures.json +131 -1
  434. package/dist/nhsuk/components/legend/fixtures.mjs +95 -0
  435. package/dist/nhsuk/components/legend/fixtures.mjs.map +1 -0
  436. package/dist/nhsuk/components/legend/macro.njk +1 -1
  437. package/dist/nhsuk/components/legend/template.njk +13 -8
  438. package/dist/nhsuk/components/notification-banner/_index.scss +7 -13
  439. package/dist/nhsuk/components/notification-banner/_index.scss.map +1 -1
  440. package/dist/nhsuk/components/notification-banner/fixtures.d.mts +52 -12
  441. package/dist/nhsuk/components/notification-banner/fixtures.d.mts.map +1 -1
  442. package/dist/nhsuk/components/notification-banner/fixtures.js +78 -39
  443. package/dist/nhsuk/components/notification-banner/fixtures.js.map +1 -1
  444. package/dist/nhsuk/components/notification-banner/fixtures.json +70 -18
  445. package/dist/nhsuk/components/notification-banner/fixtures.mjs +78 -39
  446. package/dist/nhsuk/components/notification-banner/fixtures.mjs.map +1 -1
  447. package/dist/nhsuk/components/notification-banner/macro-options.d.mts +309 -88
  448. package/dist/nhsuk/components/notification-banner/macro-options.d.mts.map +1 -1
  449. package/dist/nhsuk/components/notification-banner/macro-options.js +156 -30
  450. package/dist/nhsuk/components/notification-banner/macro-options.js.map +1 -1
  451. package/dist/nhsuk/components/notification-banner/macro-options.json +173 -28
  452. package/dist/nhsuk/components/notification-banner/macro-options.mjs +156 -30
  453. package/dist/nhsuk/components/notification-banner/macro-options.mjs.map +1 -1
  454. package/dist/nhsuk/components/notification-banner/macro.njk +1 -1
  455. package/dist/nhsuk/components/notification-banner/template.njk +44 -18
  456. package/dist/nhsuk/components/pagination/_index.scss +7 -7
  457. package/dist/nhsuk/components/pagination/_index.scss.map +1 -1
  458. package/dist/nhsuk/components/pagination/fixtures.d.mts +15 -15
  459. package/dist/nhsuk/components/pagination/fixtures.js +87 -87
  460. package/dist/nhsuk/components/pagination/fixtures.js.map +1 -1
  461. package/dist/nhsuk/components/pagination/fixtures.json +6 -6
  462. package/dist/nhsuk/components/pagination/fixtures.mjs +87 -87
  463. package/dist/nhsuk/components/pagination/fixtures.mjs.map +1 -1
  464. package/dist/nhsuk/components/pagination/macro-options.d.mts +246 -146
  465. package/dist/nhsuk/components/pagination/macro-options.d.mts.map +1 -1
  466. package/dist/nhsuk/components/pagination/macro-options.js +66 -10
  467. package/dist/nhsuk/components/pagination/macro-options.js.map +1 -1
  468. package/dist/nhsuk/components/pagination/macro-options.json +74 -10
  469. package/dist/nhsuk/components/pagination/macro-options.mjs +66 -10
  470. package/dist/nhsuk/components/pagination/macro-options.mjs.map +1 -1
  471. package/dist/nhsuk/components/pagination/macro.njk +1 -1
  472. package/dist/nhsuk/components/pagination/template.njk +41 -14
  473. package/dist/nhsuk/components/panel/_index.scss +15 -2
  474. package/dist/nhsuk/components/panel/_index.scss.map +1 -1
  475. package/dist/nhsuk/components/panel/fixtures.d.mts +46 -16
  476. package/dist/nhsuk/components/panel/fixtures.d.mts.map +1 -1
  477. package/dist/nhsuk/components/panel/fixtures.js +78 -44
  478. package/dist/nhsuk/components/panel/fixtures.js.map +1 -1
  479. package/dist/nhsuk/components/panel/fixtures.json +57 -17
  480. package/dist/nhsuk/components/panel/fixtures.mjs +78 -44
  481. package/dist/nhsuk/components/panel/fixtures.mjs.map +1 -1
  482. package/dist/nhsuk/components/panel/macro-options.d.mts +222 -93
  483. package/dist/nhsuk/components/panel/macro-options.d.mts.map +1 -1
  484. package/dist/nhsuk/components/panel/macro-options.js +86 -11
  485. package/dist/nhsuk/components/panel/macro-options.js.map +1 -1
  486. package/dist/nhsuk/components/panel/macro-options.json +97 -11
  487. package/dist/nhsuk/components/panel/macro-options.mjs +86 -11
  488. package/dist/nhsuk/components/panel/macro-options.mjs.map +1 -1
  489. package/dist/nhsuk/components/panel/macro.njk +1 -1
  490. package/dist/nhsuk/components/panel/template.njk +32 -22
  491. package/dist/nhsuk/components/password-input/_index.scss +1 -6
  492. package/dist/nhsuk/components/password-input/_index.scss.map +1 -1
  493. package/dist/nhsuk/components/password-input/fixtures.d.mts +28 -18
  494. package/dist/nhsuk/components/password-input/fixtures.d.mts.map +1 -1
  495. package/dist/nhsuk/components/password-input/fixtures.js +98 -88
  496. package/dist/nhsuk/components/password-input/fixtures.js.map +1 -1
  497. package/dist/nhsuk/components/password-input/fixtures.json +22 -8
  498. package/dist/nhsuk/components/password-input/fixtures.mjs +98 -88
  499. package/dist/nhsuk/components/password-input/fixtures.mjs.map +1 -1
  500. package/dist/nhsuk/components/password-input/macro-options.d.mts +44 -21
  501. package/dist/nhsuk/components/password-input/macro-options.d.mts.map +1 -1
  502. package/dist/nhsuk/components/password-input/macro-options.js +16 -2
  503. package/dist/nhsuk/components/password-input/macro-options.js.map +1 -1
  504. package/dist/nhsuk/components/password-input/macro-options.json +18 -2
  505. package/dist/nhsuk/components/password-input/macro-options.mjs +16 -2
  506. package/dist/nhsuk/components/password-input/macro-options.mjs.map +1 -1
  507. package/dist/nhsuk/components/password-input/macro.njk +1 -1
  508. package/dist/nhsuk/components/password-input/template.njk +8 -8
  509. package/dist/nhsuk/components/radios/_index.scss +36 -20
  510. package/dist/nhsuk/components/radios/_index.scss.map +1 -1
  511. package/dist/nhsuk/components/radios/fixtures.d.mts +35 -34
  512. package/dist/nhsuk/components/radios/fixtures.d.mts.map +1 -1
  513. package/dist/nhsuk/components/radios/fixtures.js +257 -237
  514. package/dist/nhsuk/components/radios/fixtures.js.map +1 -1
  515. package/dist/nhsuk/components/radios/fixtures.json +43 -47
  516. package/dist/nhsuk/components/radios/fixtures.mjs +257 -237
  517. package/dist/nhsuk/components/radios/fixtures.mjs.map +1 -1
  518. package/dist/nhsuk/components/radios/macro.njk +1 -1
  519. package/dist/nhsuk/components/radios/template.njk +54 -30
  520. package/dist/nhsuk/components/scroll/README.md +9 -0
  521. package/dist/nhsuk/components/scroll/_index.scss +226 -0
  522. package/dist/nhsuk/components/scroll/_index.scss.map +1 -0
  523. package/dist/nhsuk/components/scroll/_scroll.scss +1 -0
  524. package/dist/nhsuk/components/scroll/_scroll.scss.map +1 -0
  525. package/dist/nhsuk/components/scroll/fixtures.d.mts +61 -0
  526. package/dist/nhsuk/components/scroll/fixtures.d.mts.map +1 -0
  527. package/dist/nhsuk/components/scroll/fixtures.js +82 -0
  528. package/dist/nhsuk/components/scroll/fixtures.js.map +1 -0
  529. package/dist/nhsuk/components/scroll/fixtures.json +41 -0
  530. package/dist/nhsuk/components/scroll/fixtures.mjs +79 -0
  531. package/dist/nhsuk/components/scroll/fixtures.mjs.map +1 -0
  532. package/dist/nhsuk/components/scroll/macro-options.d.mts +79 -0
  533. package/dist/nhsuk/components/scroll/macro-options.d.mts.map +1 -0
  534. package/dist/nhsuk/components/scroll/macro-options.js +69 -0
  535. package/dist/nhsuk/components/scroll/macro-options.js.map +1 -0
  536. package/dist/nhsuk/components/scroll/macro-options.json +51 -0
  537. package/dist/nhsuk/components/scroll/macro-options.mjs +66 -0
  538. package/dist/nhsuk/components/scroll/macro-options.mjs.map +1 -0
  539. package/dist/nhsuk/components/scroll/macro.njk +3 -0
  540. package/dist/nhsuk/components/scroll/scroll.d.mts +66 -0
  541. package/dist/nhsuk/components/scroll/scroll.d.mts.map +1 -0
  542. package/dist/nhsuk/components/scroll/scroll.js +143 -0
  543. package/dist/nhsuk/components/scroll/scroll.js.map +1 -0
  544. package/dist/nhsuk/components/scroll/scroll.mjs +140 -0
  545. package/dist/nhsuk/components/scroll/scroll.mjs.map +1 -0
  546. package/dist/nhsuk/components/scroll/template.njk +37 -0
  547. package/dist/nhsuk/components/search-input/_index.scss +2 -2
  548. package/dist/nhsuk/components/search-input/_index.scss.map +1 -1
  549. package/dist/nhsuk/components/search-input/fixtures.d.mts +33 -22
  550. package/dist/nhsuk/components/search-input/fixtures.d.mts.map +1 -1
  551. package/dist/nhsuk/components/search-input/fixtures.js +136 -125
  552. package/dist/nhsuk/components/search-input/fixtures.js.map +1 -1
  553. package/dist/nhsuk/components/search-input/fixtures.json +21 -6
  554. package/dist/nhsuk/components/search-input/fixtures.mjs +136 -125
  555. package/dist/nhsuk/components/search-input/fixtures.mjs.map +1 -1
  556. package/dist/nhsuk/components/search-input/macro.njk +1 -1
  557. package/dist/nhsuk/components/search-input/template.njk +2 -2
  558. package/dist/nhsuk/components/select/_index.scss +2 -2
  559. package/dist/nhsuk/components/select/_index.scss.map +1 -1
  560. package/dist/nhsuk/components/select/fixtures.d.mts +22 -9
  561. package/dist/nhsuk/components/select/fixtures.d.mts.map +1 -1
  562. package/dist/nhsuk/components/select/fixtures.js +265 -225
  563. package/dist/nhsuk/components/select/fixtures.js.map +1 -1
  564. package/dist/nhsuk/components/select/fixtures.json +61 -6
  565. package/dist/nhsuk/components/select/fixtures.mjs +265 -225
  566. package/dist/nhsuk/components/select/fixtures.mjs.map +1 -1
  567. package/dist/nhsuk/components/select/macro.njk +1 -1
  568. package/dist/nhsuk/components/select/template.njk +44 -26
  569. package/dist/nhsuk/components/skip-link/_index.scss +1 -1
  570. package/dist/nhsuk/components/skip-link/_index.scss.map +1 -1
  571. package/dist/nhsuk/components/skip-link/fixtures.d.mts +2 -2
  572. package/dist/nhsuk/components/skip-link/fixtures.js +9 -9
  573. package/dist/nhsuk/components/skip-link/fixtures.mjs +9 -9
  574. package/dist/nhsuk/components/skip-link/macro.njk +1 -1
  575. package/dist/nhsuk/components/skip-link/template.njk +4 -2
  576. package/dist/nhsuk/components/summary-list/_index.scss +48 -23
  577. package/dist/nhsuk/components/summary-list/_index.scss.map +1 -1
  578. package/dist/nhsuk/components/summary-list/fixtures.d.mts +265 -86
  579. package/dist/nhsuk/components/summary-list/fixtures.d.mts.map +1 -1
  580. package/dist/nhsuk/components/summary-list/fixtures.js +604 -259
  581. package/dist/nhsuk/components/summary-list/fixtures.js.map +1 -1
  582. package/dist/nhsuk/components/summary-list/fixtures.json +469 -63
  583. package/dist/nhsuk/components/summary-list/fixtures.mjs +604 -259
  584. package/dist/nhsuk/components/summary-list/fixtures.mjs.map +1 -1
  585. package/dist/nhsuk/components/summary-list/macro-options.d.mts +300 -148
  586. package/dist/nhsuk/components/summary-list/macro-options.d.mts.map +1 -1
  587. package/dist/nhsuk/components/summary-list/macro-options.js +89 -5
  588. package/dist/nhsuk/components/summary-list/macro-options.js.map +1 -1
  589. package/dist/nhsuk/components/summary-list/macro-options.json +103 -5
  590. package/dist/nhsuk/components/summary-list/macro-options.mjs +89 -5
  591. package/dist/nhsuk/components/summary-list/macro-options.mjs.map +1 -1
  592. package/dist/nhsuk/components/summary-list/macro.njk +1 -1
  593. package/dist/nhsuk/components/summary-list/row/macro.njk +3 -0
  594. package/dist/nhsuk/components/summary-list/row/template.njk +87 -0
  595. package/dist/nhsuk/components/summary-list/template.njk +28 -52
  596. package/dist/nhsuk/components/tables/_index.scss +362 -60
  597. package/dist/nhsuk/components/tables/_index.scss.map +1 -1
  598. package/dist/nhsuk/components/tables/fixtures.d.mts +2657 -144
  599. package/dist/nhsuk/components/tables/fixtures.d.mts.map +1 -1
  600. package/dist/nhsuk/components/tables/fixtures.js +1727 -389
  601. package/dist/nhsuk/components/tables/fixtures.js.map +1 -1
  602. package/dist/nhsuk/components/tables/fixtures.json +12179 -462
  603. package/dist/nhsuk/components/tables/fixtures.mjs +1727 -389
  604. package/dist/nhsuk/components/tables/fixtures.mjs.map +1 -1
  605. package/dist/nhsuk/components/tables/macro-options.d.mts +509 -183
  606. package/dist/nhsuk/components/tables/macro-options.d.mts.map +1 -1
  607. package/dist/nhsuk/components/tables/macro-options.js +208 -21
  608. package/dist/nhsuk/components/tables/macro-options.js.map +1 -1
  609. package/dist/nhsuk/components/tables/macro-options.json +238 -21
  610. package/dist/nhsuk/components/tables/macro-options.mjs +208 -21
  611. package/dist/nhsuk/components/tables/macro-options.mjs.map +1 -1
  612. package/dist/nhsuk/components/tables/macro.njk +1 -1
  613. package/dist/nhsuk/components/tables/table.d.mts +174 -0
  614. package/dist/nhsuk/components/tables/table.d.mts.map +1 -0
  615. package/dist/nhsuk/components/tables/table.js +406 -0
  616. package/dist/nhsuk/components/tables/table.js.map +1 -0
  617. package/dist/nhsuk/components/tables/table.mjs +403 -0
  618. package/dist/nhsuk/components/tables/table.mjs.map +1 -0
  619. package/dist/nhsuk/components/tables/template.njk +307 -91
  620. package/dist/nhsuk/components/tabs/_index.scss +11 -12
  621. package/dist/nhsuk/components/tabs/_index.scss.map +1 -1
  622. package/dist/nhsuk/components/tabs/fixtures.d.mts +16 -1
  623. package/dist/nhsuk/components/tabs/fixtures.d.mts.map +1 -1
  624. package/dist/nhsuk/components/tabs/fixtures.js +55 -22
  625. package/dist/nhsuk/components/tabs/fixtures.js.map +1 -1
  626. package/dist/nhsuk/components/tabs/fixtures.json +46 -5
  627. package/dist/nhsuk/components/tabs/fixtures.mjs +55 -22
  628. package/dist/nhsuk/components/tabs/fixtures.mjs.map +1 -1
  629. package/dist/nhsuk/components/tabs/macro-options.d.mts +43 -32
  630. package/dist/nhsuk/components/tabs/macro-options.d.mts.map +1 -1
  631. package/dist/nhsuk/components/tabs/macro-options.js +9 -2
  632. package/dist/nhsuk/components/tabs/macro-options.js.map +1 -1
  633. package/dist/nhsuk/components/tabs/macro-options.json +10 -2
  634. package/dist/nhsuk/components/tabs/macro-options.mjs +9 -2
  635. package/dist/nhsuk/components/tabs/macro-options.mjs.map +1 -1
  636. package/dist/nhsuk/components/tabs/macro.njk +2 -2
  637. package/dist/nhsuk/components/tabs/template.njk +7 -4
  638. package/dist/nhsuk/components/tag/fixtures.d.mts +21 -3
  639. package/dist/nhsuk/components/tag/fixtures.d.mts.map +1 -1
  640. package/dist/nhsuk/components/tag/fixtures.js +61 -43
  641. package/dist/nhsuk/components/tag/fixtures.js.map +1 -1
  642. package/dist/nhsuk/components/tag/fixtures.json +30 -0
  643. package/dist/nhsuk/components/tag/fixtures.mjs +61 -43
  644. package/dist/nhsuk/components/tag/fixtures.mjs.map +1 -1
  645. package/dist/nhsuk/components/tag/macro-options.d.mts +18 -8
  646. package/dist/nhsuk/components/tag/macro-options.d.mts.map +1 -1
  647. package/dist/nhsuk/components/tag/macro-options.js +6 -0
  648. package/dist/nhsuk/components/tag/macro-options.js.map +1 -1
  649. package/dist/nhsuk/components/tag/macro-options.json +7 -0
  650. package/dist/nhsuk/components/tag/macro-options.mjs +6 -0
  651. package/dist/nhsuk/components/tag/macro-options.mjs.map +1 -1
  652. package/dist/nhsuk/components/tag/macro.njk +1 -1
  653. package/dist/nhsuk/components/tag/template.njk +7 -1
  654. package/dist/nhsuk/components/task-list/_index.scss +16 -8
  655. package/dist/nhsuk/components/task-list/_index.scss.map +1 -1
  656. package/dist/nhsuk/components/task-list/fixtures.d.mts +1 -1
  657. package/dist/nhsuk/components/task-list/fixtures.js +37 -37
  658. package/dist/nhsuk/components/task-list/fixtures.json +2 -2
  659. package/dist/nhsuk/components/task-list/fixtures.mjs +37 -37
  660. package/dist/nhsuk/components/task-list/macro-options.d.mts +133 -85
  661. package/dist/nhsuk/components/task-list/macro-options.d.mts.map +1 -1
  662. package/dist/nhsuk/components/task-list/macro-options.js +39 -11
  663. package/dist/nhsuk/components/task-list/macro-options.js.map +1 -1
  664. package/dist/nhsuk/components/task-list/macro-options.json +43 -11
  665. package/dist/nhsuk/components/task-list/macro-options.mjs +39 -11
  666. package/dist/nhsuk/components/task-list/macro-options.mjs.map +1 -1
  667. package/dist/nhsuk/components/task-list/macro.njk +1 -1
  668. package/dist/nhsuk/components/task-list/template.njk +53 -17
  669. package/dist/nhsuk/components/textarea/_index.scss +1 -1
  670. package/dist/nhsuk/components/textarea/_index.scss.map +1 -1
  671. package/dist/nhsuk/components/textarea/fixtures.d.mts +16 -8
  672. package/dist/nhsuk/components/textarea/fixtures.d.mts.map +1 -1
  673. package/dist/nhsuk/components/textarea/fixtures.js +68 -60
  674. package/dist/nhsuk/components/textarea/fixtures.js.map +1 -1
  675. package/dist/nhsuk/components/textarea/fixtures.json +20 -8
  676. package/dist/nhsuk/components/textarea/fixtures.mjs +68 -60
  677. package/dist/nhsuk/components/textarea/fixtures.mjs.map +1 -1
  678. package/dist/nhsuk/components/textarea/macro.njk +1 -1
  679. package/dist/nhsuk/components/textarea/template.njk +43 -25
  680. package/dist/nhsuk/components/warning-callout/fixtures.d.mts +24 -7
  681. package/dist/nhsuk/components/warning-callout/fixtures.d.mts.map +1 -1
  682. package/dist/nhsuk/components/warning-callout/fixtures.js +29 -12
  683. package/dist/nhsuk/components/warning-callout/fixtures.js.map +1 -1
  684. package/dist/nhsuk/components/warning-callout/fixtures.json +32 -6
  685. package/dist/nhsuk/components/warning-callout/fixtures.mjs +29 -12
  686. package/dist/nhsuk/components/warning-callout/fixtures.mjs.map +1 -1
  687. package/dist/nhsuk/components/warning-callout/macro-options.d.mts +146 -66
  688. package/dist/nhsuk/components/warning-callout/macro-options.d.mts.map +1 -1
  689. package/dist/nhsuk/components/warning-callout/macro-options.js +50 -4
  690. package/dist/nhsuk/components/warning-callout/macro-options.js.map +1 -1
  691. package/dist/nhsuk/components/warning-callout/macro-options.json +57 -4
  692. package/dist/nhsuk/components/warning-callout/macro-options.mjs +50 -4
  693. package/dist/nhsuk/components/warning-callout/macro-options.mjs.map +1 -1
  694. package/dist/nhsuk/components/warning-callout/macro.njk +1 -1
  695. package/dist/nhsuk/components/warning-callout/template.njk +32 -11
  696. package/dist/nhsuk/configurable-component.d.mts +2 -2
  697. package/dist/nhsuk/configurable-component.d.mts.map +1 -1
  698. package/dist/nhsuk/configurable-component.js +4 -2
  699. package/dist/nhsuk/configurable-component.js.map +1 -1
  700. package/dist/nhsuk/configurable-component.mjs +4 -2
  701. package/dist/nhsuk/configurable-component.mjs.map +1 -1
  702. package/dist/nhsuk/core/README.md +8 -5
  703. package/dist/nhsuk/core/_nhsuk-frontend-properties.scss +1 -1
  704. package/dist/nhsuk/core/elements/_links.scss +3 -5
  705. package/dist/nhsuk/core/elements/_links.scss.map +1 -1
  706. package/dist/nhsuk/core/elements/_table.scss +18 -8
  707. package/dist/nhsuk/core/elements/_table.scss.map +1 -1
  708. package/dist/nhsuk/core/objects/_button-group.scss +1 -1
  709. package/dist/nhsuk/core/objects/_button-group.scss.map +1 -1
  710. package/dist/nhsuk/core/objects/_form-group.scss +1 -1
  711. package/dist/nhsuk/core/objects/_form-group.scss.map +1 -1
  712. package/dist/nhsuk/core/objects/_input-wrapper.scss +2 -2
  713. package/dist/nhsuk/core/objects/_input-wrapper.scss.map +1 -1
  714. package/dist/nhsuk/core/objects/_main-wrapper.scss +3 -3
  715. package/dist/nhsuk/core/objects/_main-wrapper.scss.map +1 -1
  716. package/dist/nhsuk/core/objects/_width-container.scss +3 -3
  717. package/dist/nhsuk/core/objects/_width-container.scss.map +1 -1
  718. package/dist/nhsuk/core/settings/_all.scss +1 -1
  719. package/dist/nhsuk/core/settings/_all.scss.map +1 -1
  720. package/dist/nhsuk/core/settings/_breakpoints.scss +5 -5
  721. package/dist/nhsuk/core/settings/_breakpoints.scss.map +1 -1
  722. package/dist/nhsuk/core/settings/_colours-applied.scss +33 -0
  723. package/dist/nhsuk/core/settings/_colours-applied.scss.map +1 -1
  724. package/dist/nhsuk/core/settings/_colours.scss +1 -1
  725. package/dist/nhsuk/core/settings/_colours.scss.map +1 -1
  726. package/dist/nhsuk/core/settings/_globals.scss +1 -0
  727. package/dist/nhsuk/core/settings/_globals.scss.map +1 -1
  728. package/dist/nhsuk/core/styles/_hidden.scss +15 -0
  729. package/dist/nhsuk/core/styles/_hidden.scss.map +1 -0
  730. package/dist/nhsuk/core/styles/_icons.scss +2 -2
  731. package/dist/nhsuk/core/styles/_icons.scss.map +1 -1
  732. package/dist/nhsuk/core/styles/_index.scss +1 -0
  733. package/dist/nhsuk/core/styles/_index.scss.map +1 -1
  734. package/dist/nhsuk/core/styles/_lists.scss +9 -9
  735. package/dist/nhsuk/core/styles/_lists.scss.map +1 -1
  736. package/dist/nhsuk/core/styles/_section-break.scss +3 -6
  737. package/dist/nhsuk/core/styles/_section-break.scss.map +1 -1
  738. package/dist/nhsuk/core/styles/_typography.scss +95 -20
  739. package/dist/nhsuk/core/styles/_typography.scss.map +1 -1
  740. package/dist/nhsuk/core/tools/_buttons.scss +1 -1
  741. package/dist/nhsuk/core/tools/_buttons.scss.map +1 -1
  742. package/dist/nhsuk/core/tools/_grid.scss +1 -1
  743. package/dist/nhsuk/core/tools/_grid.scss.map +1 -1
  744. package/dist/nhsuk/core/tools/_links.scss +16 -0
  745. package/dist/nhsuk/core/tools/_links.scss.map +1 -1
  746. package/dist/nhsuk/core/tools/_mixins.scss +102 -36
  747. package/dist/nhsuk/core/tools/_mixins.scss.map +1 -1
  748. package/dist/nhsuk/core/tools/_sass-mq.scss +177 -22
  749. package/dist/nhsuk/core/tools/_sass-mq.scss.map +1 -1
  750. package/dist/nhsuk/core/tools/_shape-arrow.scss +5 -5
  751. package/dist/nhsuk/core/tools/_shape-arrow.scss.map +1 -1
  752. package/dist/nhsuk/core/tools/_shape-dash.scss +1 -1
  753. package/dist/nhsuk/core/tools/_shape-dash.scss.map +1 -1
  754. package/dist/nhsuk/core/tools/_spacing.scss +110 -39
  755. package/dist/nhsuk/core/tools/_spacing.scss.map +1 -1
  756. package/dist/nhsuk/core/tools/_typography.scss +5 -5
  757. package/dist/nhsuk/core/tools/_typography.scss.map +1 -1
  758. package/dist/nhsuk/core/utilities/_display.scss +18 -1
  759. package/dist/nhsuk/core/utilities/_display.scss.map +1 -1
  760. package/dist/nhsuk/core/utilities/_grid-widths.scss +6 -7
  761. package/dist/nhsuk/core/utilities/_grid-widths.scss.map +1 -1
  762. package/dist/nhsuk/core/utilities/_index.scss +1 -0
  763. package/dist/nhsuk/core/utilities/_index.scss.map +1 -1
  764. package/dist/nhsuk/core/utilities/_link-nowrap.scss +1 -1
  765. package/dist/nhsuk/core/utilities/_link-nowrap.scss.map +1 -1
  766. package/dist/nhsuk/core/utilities/_spacing.scss +2 -2
  767. package/dist/nhsuk/core/utilities/_spacing.scss.map +1 -1
  768. package/dist/nhsuk/core/utilities/_supported.scss +21 -0
  769. package/dist/nhsuk/core/utilities/_supported.scss.map +1 -0
  770. package/dist/nhsuk/core/utilities/_widths.scss +32 -7
  771. package/dist/nhsuk/core/utilities/_widths.scss.map +1 -1
  772. package/dist/nhsuk/index.d.mts +10 -0
  773. package/dist/nhsuk/index.d.mts.map +1 -1
  774. package/dist/nhsuk/index.js +9 -1
  775. package/dist/nhsuk/index.js.map +1 -1
  776. package/dist/nhsuk/index.mjs +8 -2
  777. package/dist/nhsuk/index.mjs.map +1 -1
  778. package/dist/nhsuk/lib/nunjucks/index.js +1 -1
  779. package/dist/nhsuk/lib/nunjucks/index.js.map +1 -1
  780. package/dist/nhsuk/lib/nunjucks/index.mjs +1 -1
  781. package/dist/nhsuk/lib/nunjucks/index.mjs.map +1 -1
  782. package/dist/nhsuk/macros/icon.njk +6 -2
  783. package/dist/nhsuk/nhsuk-frontend-10.6.0.min.css +3 -0
  784. package/dist/nhsuk/nhsuk-frontend-10.6.0.min.css.map +1 -0
  785. package/dist/nhsuk/nhsuk-frontend-10.6.0.min.js +2 -0
  786. package/dist/nhsuk/nhsuk-frontend-10.6.0.min.js.map +1 -0
  787. package/dist/nhsuk/nhsuk-frontend-dynamic-type-10.6.0.min.css +3 -0
  788. package/dist/nhsuk/nhsuk-frontend-dynamic-type-10.6.0.min.css.map +1 -0
  789. package/dist/nhsuk/nhsuk-frontend-dynamic-type.css +2569 -908
  790. package/dist/nhsuk/nhsuk-frontend-dynamic-type.css.map +1 -1
  791. package/dist/nhsuk/nhsuk-frontend-dynamic-type.min.css +1 -1
  792. package/dist/nhsuk/nhsuk-frontend-dynamic-type.min.css.map +1 -1
  793. package/dist/nhsuk/nhsuk-frontend.css +2237 -576
  794. package/dist/nhsuk/nhsuk-frontend.css.map +1 -1
  795. package/dist/nhsuk/nhsuk-frontend.js +737 -66
  796. package/dist/nhsuk/nhsuk-frontend.js.map +1 -1
  797. package/dist/nhsuk/nhsuk-frontend.min.css +1 -1
  798. package/dist/nhsuk/nhsuk-frontend.min.css.map +1 -1
  799. package/dist/nhsuk/nhsuk-frontend.min.js +1 -1
  800. package/dist/nhsuk/nhsuk-frontend.min.js.map +1 -1
  801. package/dist/nhsuk/template-with-imports.njk +5 -0
  802. package/dist/nhsuk/template.njk +6 -6
  803. package/package.json +1 -1
  804. package/src/nhsuk/component.mjs +21 -5
  805. package/src/nhsuk/components/_index.scss +1 -0
  806. package/src/nhsuk/components/action-link/_index.scss +17 -5
  807. package/src/nhsuk/components/action-link/fixtures.mjs +34 -13
  808. package/src/nhsuk/components/action-link/macro-options.mjs +10 -3
  809. package/src/nhsuk/components/action-link/macro.njk +1 -1
  810. package/src/nhsuk/components/action-link/template.njk +10 -7
  811. package/src/nhsuk/components/back-link/_index.scss +4 -1
  812. package/src/nhsuk/components/back-link/fixtures.mjs +23 -17
  813. package/src/nhsuk/components/back-link/macro-options.mjs +10 -3
  814. package/src/nhsuk/components/back-link/macro.njk +1 -1
  815. package/src/nhsuk/components/back-link/template.njk +15 -9
  816. package/src/nhsuk/components/breadcrumb/_index.scss +6 -3
  817. package/src/nhsuk/components/breadcrumb/fixtures.mjs +43 -43
  818. package/src/nhsuk/components/breadcrumb/macro-options.mjs +21 -6
  819. package/src/nhsuk/components/breadcrumb/macro.njk +1 -1
  820. package/src/nhsuk/components/breadcrumb/template.njk +19 -8
  821. package/src/nhsuk/components/button/_index.scss +12 -12
  822. package/src/nhsuk/components/button/fixtures.mjs +290 -290
  823. package/src/nhsuk/components/button/macro-options.mjs +2 -1
  824. package/src/nhsuk/components/button/macro.njk +1 -1
  825. package/src/nhsuk/components/button/template.njk +10 -13
  826. package/src/nhsuk/components/caption/README.md +9 -0
  827. package/src/nhsuk/components/caption/macro-options.mjs +81 -0
  828. package/src/nhsuk/components/caption/macro.njk +3 -0
  829. package/src/nhsuk/components/caption/template.njk +42 -0
  830. package/src/nhsuk/components/card/_index.scss +28 -27
  831. package/src/nhsuk/components/card/action/macro.njk +3 -0
  832. package/src/nhsuk/components/card/action/template.njk +65 -0
  833. package/src/nhsuk/components/card/fixtures.mjs +507 -300
  834. package/src/nhsuk/components/card/macro-options.mjs +150 -44
  835. package/src/nhsuk/components/card/macro.njk +1 -1
  836. package/src/nhsuk/components/card/template.njk +110 -92
  837. package/src/nhsuk/components/character-count/_index.scss +5 -4
  838. package/src/nhsuk/components/character-count/fixtures.mjs +184 -171
  839. package/src/nhsuk/components/character-count/macro-options.mjs +1 -1
  840. package/src/nhsuk/components/character-count/macro.njk +1 -1
  841. package/src/nhsuk/components/character-count/template.njk +16 -10
  842. package/src/nhsuk/components/checkboxes/_index.scss +52 -15
  843. package/src/nhsuk/components/checkboxes/checkboxes.mjs +166 -54
  844. package/src/nhsuk/components/checkboxes/fixtures.mjs +562 -290
  845. package/src/nhsuk/components/checkboxes/macro-options.mjs +20 -6
  846. package/src/nhsuk/components/checkboxes/macro.njk +1 -1
  847. package/src/nhsuk/components/checkboxes/template.njk +64 -34
  848. package/src/nhsuk/components/code/_index.scss +4 -7
  849. package/src/nhsuk/components/code/code.mjs +17 -5
  850. package/src/nhsuk/components/code/fixtures.mjs +30 -30
  851. package/src/nhsuk/components/code/macro.njk +1 -1
  852. package/src/nhsuk/components/code/template.njk +6 -3
  853. package/src/nhsuk/components/contents-list/fixtures.mjs +57 -29
  854. package/src/nhsuk/components/contents-list/macro-options.mjs +16 -9
  855. package/src/nhsuk/components/contents-list/macro.njk +1 -1
  856. package/src/nhsuk/components/contents-list/template.njk +3 -1
  857. package/src/nhsuk/components/date-input/fixtures.mjs +238 -236
  858. package/src/nhsuk/components/date-input/macro.njk +1 -1
  859. package/src/nhsuk/components/date-input/template.njk +42 -27
  860. package/src/nhsuk/components/details/_index.scss +15 -24
  861. package/src/nhsuk/components/details/fixtures.mjs +27 -19
  862. package/src/nhsuk/components/details/macro-options.mjs +42 -6
  863. package/src/nhsuk/components/details/macro.njk +1 -1
  864. package/src/nhsuk/components/details/template.njk +19 -6
  865. package/src/nhsuk/components/do-dont-list/_index.scss +4 -1
  866. package/src/nhsuk/components/do-dont-list/fixtures.mjs +50 -50
  867. package/src/nhsuk/components/do-dont-list/macro-options.mjs +66 -13
  868. package/src/nhsuk/components/do-dont-list/macro.njk +1 -1
  869. package/src/nhsuk/components/do-dont-list/template.njk +24 -4
  870. package/src/nhsuk/components/error-message/fixtures.mjs +28 -3
  871. package/src/nhsuk/components/error-message/macro-options.mjs +7 -0
  872. package/src/nhsuk/components/error-message/macro.njk +1 -1
  873. package/src/nhsuk/components/error-message/template.njk +14 -4
  874. package/src/nhsuk/components/error-summary/_index.scss +1 -1
  875. package/src/nhsuk/components/error-summary/fixtures.mjs +122 -32
  876. package/src/nhsuk/components/error-summary/macro-options.mjs +89 -12
  877. package/src/nhsuk/components/error-summary/macro.njk +1 -1
  878. package/src/nhsuk/components/error-summary/template.njk +40 -11
  879. package/src/nhsuk/components/fieldset/_index.scss +1 -0
  880. package/src/nhsuk/components/fieldset/fixtures.mjs +29 -73
  881. package/src/nhsuk/components/fieldset/macro.njk +1 -1
  882. package/src/nhsuk/components/fieldset/template.njk +17 -5
  883. package/src/nhsuk/components/file-upload/_index.scss +2 -2
  884. package/src/nhsuk/components/file-upload/fixtures.mjs +94 -84
  885. package/src/nhsuk/components/file-upload/macro.njk +1 -1
  886. package/src/nhsuk/components/file-upload/template.njk +44 -26
  887. package/src/nhsuk/components/footer/_index.scss +7 -4
  888. package/src/nhsuk/components/footer/fixtures.mjs +239 -207
  889. package/src/nhsuk/components/footer/macro-options.mjs +74 -5
  890. package/src/nhsuk/components/footer/macro.njk +1 -1
  891. package/src/nhsuk/components/footer/template.njk +37 -20
  892. package/src/nhsuk/components/header/_index.scss +38 -37
  893. package/src/nhsuk/components/header/fixtures.mjs +291 -269
  894. package/src/nhsuk/components/header/header.mjs +2 -2
  895. package/src/nhsuk/components/header/macro-options.mjs +60 -8
  896. package/src/nhsuk/components/header/macro.njk +1 -1
  897. package/src/nhsuk/components/header/template.njk +21 -19
  898. package/src/nhsuk/components/heading/README.md +9 -0
  899. package/src/nhsuk/components/heading/fixtures.mjs +199 -0
  900. package/src/nhsuk/components/heading/macro-options.mjs +121 -0
  901. package/src/nhsuk/components/heading/macro.njk +3 -0
  902. package/src/nhsuk/components/heading/template.njk +119 -0
  903. package/src/nhsuk/components/hero/_index.scss +176 -115
  904. package/src/nhsuk/components/hero/fixtures.mjs +118 -27
  905. package/src/nhsuk/components/hero/macro-options.mjs +212 -13
  906. package/src/nhsuk/components/hero/macro.njk +1 -1
  907. package/src/nhsuk/components/hero/template.njk +76 -53
  908. package/src/nhsuk/components/hint/_index.scss +4 -8
  909. package/src/nhsuk/components/hint/fixtures.mjs +12 -3
  910. package/src/nhsuk/components/hint/macro-options.mjs +7 -0
  911. package/src/nhsuk/components/hint/macro.njk +1 -1
  912. package/src/nhsuk/components/hint/template.njk +8 -2
  913. package/src/nhsuk/components/images/_index.scss +19 -7
  914. package/src/nhsuk/components/images/fixtures.mjs +108 -17
  915. package/src/nhsuk/components/images/macro-options.mjs +48 -11
  916. package/src/nhsuk/components/images/macro.njk +1 -1
  917. package/src/nhsuk/components/images/template.njk +24 -2
  918. package/src/nhsuk/components/index.mjs +2 -0
  919. package/src/nhsuk/components/input/_index.scss +18 -18
  920. package/src/nhsuk/components/input/fixtures.mjs +212 -198
  921. package/src/nhsuk/components/input/macro.njk +1 -1
  922. package/src/nhsuk/components/input/template.njk +43 -25
  923. package/src/nhsuk/components/inset-text/_index.scss +2 -3
  924. package/src/nhsuk/components/inset-text/fixtures.mjs +14 -6
  925. package/src/nhsuk/components/inset-text/macro.njk +1 -1
  926. package/src/nhsuk/components/inset-text/template.njk +6 -4
  927. package/src/nhsuk/components/label/fixtures.mjs +39 -25
  928. package/src/nhsuk/components/label/macro.njk +1 -1
  929. package/src/nhsuk/components/label/template.njk +22 -11
  930. package/src/nhsuk/components/legend/fixtures.mjs +97 -0
  931. package/src/nhsuk/components/legend/macro.njk +1 -1
  932. package/src/nhsuk/components/legend/template.njk +13 -8
  933. package/src/nhsuk/components/notification-banner/_index.scss +7 -13
  934. package/src/nhsuk/components/notification-banner/fixtures.mjs +79 -40
  935. package/src/nhsuk/components/notification-banner/macro-options.mjs +163 -34
  936. package/src/nhsuk/components/notification-banner/macro.njk +1 -1
  937. package/src/nhsuk/components/notification-banner/template.njk +44 -18
  938. package/src/nhsuk/components/pagination/_index.scss +7 -7
  939. package/src/nhsuk/components/pagination/fixtures.mjs +87 -87
  940. package/src/nhsuk/components/pagination/macro-options.mjs +71 -13
  941. package/src/nhsuk/components/pagination/macro.njk +1 -1
  942. package/src/nhsuk/components/pagination/template.njk +41 -14
  943. package/src/nhsuk/components/panel/_index.scss +15 -2
  944. package/src/nhsuk/components/panel/fixtures.mjs +80 -46
  945. package/src/nhsuk/components/panel/macro-options.mjs +89 -14
  946. package/src/nhsuk/components/panel/macro.njk +1 -1
  947. package/src/nhsuk/components/panel/template.njk +32 -22
  948. package/src/nhsuk/components/password-input/_index.scss +1 -6
  949. package/src/nhsuk/components/password-input/fixtures.mjs +98 -88
  950. package/src/nhsuk/components/password-input/macro-options.mjs +16 -2
  951. package/src/nhsuk/components/password-input/macro.njk +1 -1
  952. package/src/nhsuk/components/password-input/template.njk +8 -8
  953. package/src/nhsuk/components/radios/_index.scss +36 -20
  954. package/src/nhsuk/components/radios/fixtures.mjs +264 -240
  955. package/src/nhsuk/components/radios/macro.njk +1 -1
  956. package/src/nhsuk/components/radios/template.njk +54 -30
  957. package/src/nhsuk/components/scroll/README.md +9 -0
  958. package/src/nhsuk/components/scroll/_index.scss +226 -0
  959. package/src/nhsuk/components/scroll/_scroll.scss +1 -0
  960. package/src/nhsuk/components/scroll/fixtures.mjs +78 -0
  961. package/src/nhsuk/components/scroll/macro-options.mjs +68 -0
  962. package/src/nhsuk/components/scroll/macro.njk +3 -0
  963. package/src/nhsuk/components/scroll/scroll.mjs +151 -0
  964. package/src/nhsuk/components/scroll/template.njk +37 -0
  965. package/src/nhsuk/components/search-input/_index.scss +2 -2
  966. package/src/nhsuk/components/search-input/fixtures.mjs +136 -125
  967. package/src/nhsuk/components/search-input/macro.njk +1 -1
  968. package/src/nhsuk/components/search-input/template.njk +2 -2
  969. package/src/nhsuk/components/select/_index.scss +2 -2
  970. package/src/nhsuk/components/select/fixtures.mjs +280 -229
  971. package/src/nhsuk/components/select/macro.njk +1 -1
  972. package/src/nhsuk/components/select/template.njk +44 -26
  973. package/src/nhsuk/components/skip-link/_index.scss +1 -1
  974. package/src/nhsuk/components/skip-link/fixtures.mjs +9 -9
  975. package/src/nhsuk/components/skip-link/macro.njk +1 -1
  976. package/src/nhsuk/components/skip-link/template.njk +4 -2
  977. package/src/nhsuk/components/summary-list/_index.scss +48 -23
  978. package/src/nhsuk/components/summary-list/fixtures.mjs +659 -261
  979. package/src/nhsuk/components/summary-list/macro-options.mjs +100 -6
  980. package/src/nhsuk/components/summary-list/macro.njk +1 -1
  981. package/src/nhsuk/components/summary-list/row/macro.njk +3 -0
  982. package/src/nhsuk/components/summary-list/row/template.njk +87 -0
  983. package/src/nhsuk/components/summary-list/template.njk +28 -52
  984. package/src/nhsuk/components/tables/_index.scss +356 -60
  985. package/src/nhsuk/components/tables/fixtures.mjs +2309 -403
  986. package/src/nhsuk/components/tables/macro-options.mjs +232 -27
  987. package/src/nhsuk/components/tables/macro.njk +1 -1
  988. package/src/nhsuk/components/tables/table.mjs +446 -0
  989. package/src/nhsuk/components/tables/template.njk +307 -91
  990. package/src/nhsuk/components/tabs/_index.scss +11 -12
  991. package/src/nhsuk/components/tabs/fixtures.mjs +79 -29
  992. package/src/nhsuk/components/tabs/macro-options.mjs +10 -2
  993. package/src/nhsuk/components/tabs/macro.njk +2 -2
  994. package/src/nhsuk/components/tabs/template.njk +7 -4
  995. package/src/nhsuk/components/tag/fixtures.mjs +61 -43
  996. package/src/nhsuk/components/tag/macro-options.mjs +7 -0
  997. package/src/nhsuk/components/tag/macro.njk +1 -1
  998. package/src/nhsuk/components/tag/template.njk +7 -1
  999. package/src/nhsuk/components/task-list/_index.scss +16 -8
  1000. package/src/nhsuk/components/task-list/fixtures.mjs +37 -37
  1001. package/src/nhsuk/components/task-list/macro-options.mjs +41 -14
  1002. package/src/nhsuk/components/task-list/macro.njk +1 -1
  1003. package/src/nhsuk/components/task-list/template.njk +53 -17
  1004. package/src/nhsuk/components/textarea/_index.scss +1 -1
  1005. package/src/nhsuk/components/textarea/fixtures.mjs +68 -60
  1006. package/src/nhsuk/components/textarea/macro.njk +1 -1
  1007. package/src/nhsuk/components/textarea/template.njk +43 -25
  1008. package/src/nhsuk/components/warning-callout/fixtures.mjs +30 -12
  1009. package/src/nhsuk/components/warning-callout/macro-options.mjs +53 -4
  1010. package/src/nhsuk/components/warning-callout/macro.njk +1 -1
  1011. package/src/nhsuk/components/warning-callout/template.njk +32 -11
  1012. package/src/nhsuk/configurable-component.mjs +5 -2
  1013. package/src/nhsuk/core/README.md +8 -5
  1014. package/src/nhsuk/core/elements/_links.scss +3 -5
  1015. package/src/nhsuk/core/elements/_table.scss +18 -8
  1016. package/src/nhsuk/core/objects/_button-group.scss +1 -1
  1017. package/src/nhsuk/core/objects/_form-group.scss +1 -1
  1018. package/src/nhsuk/core/objects/_input-wrapper.scss +2 -2
  1019. package/src/nhsuk/core/objects/_main-wrapper.scss +3 -3
  1020. package/src/nhsuk/core/objects/_width-container.scss +3 -3
  1021. package/src/nhsuk/core/settings/_all.scss +1 -1
  1022. package/src/nhsuk/core/settings/_breakpoints.scss +5 -5
  1023. package/src/nhsuk/core/settings/_colours-applied.scss +33 -0
  1024. package/src/nhsuk/core/settings/_colours.scss +1 -1
  1025. package/src/nhsuk/core/settings/_globals.scss +1 -0
  1026. package/src/nhsuk/core/styles/_hidden.scss +15 -0
  1027. package/src/nhsuk/core/styles/_icons.scss +2 -2
  1028. package/src/nhsuk/core/styles/_index.scss +1 -0
  1029. package/src/nhsuk/core/styles/_lists.scss +9 -9
  1030. package/src/nhsuk/core/styles/_section-break.scss +3 -6
  1031. package/src/nhsuk/core/styles/_typography.scss +95 -20
  1032. package/src/nhsuk/core/tools/_buttons.scss +1 -1
  1033. package/src/nhsuk/core/tools/_grid.scss +1 -1
  1034. package/src/nhsuk/core/tools/_links.scss +16 -0
  1035. package/src/nhsuk/core/tools/_mixins.scss +102 -36
  1036. package/src/nhsuk/core/tools/_sass-mq.scss +177 -22
  1037. package/src/nhsuk/core/tools/_shape-arrow.scss +5 -5
  1038. package/src/nhsuk/core/tools/_shape-dash.scss +1 -1
  1039. package/src/nhsuk/core/tools/_spacing.scss +110 -39
  1040. package/src/nhsuk/core/tools/_typography.scss +5 -5
  1041. package/src/nhsuk/core/utilities/_display.scss +18 -1
  1042. package/src/nhsuk/core/utilities/_grid-widths.scss +6 -7
  1043. package/src/nhsuk/core/utilities/_index.scss +1 -0
  1044. package/src/nhsuk/core/utilities/_link-nowrap.scss +1 -1
  1045. package/src/nhsuk/core/utilities/_spacing.scss +2 -2
  1046. package/src/nhsuk/core/utilities/_supported.scss +21 -0
  1047. package/src/nhsuk/core/utilities/_widths.scss +32 -7
  1048. package/src/nhsuk/index.mjs +6 -0
  1049. package/src/nhsuk/lib/nunjucks/index.mjs +1 -1
  1050. package/src/nhsuk/macros/icon.njk +6 -2
  1051. package/src/nhsuk/template-with-imports.njk +5 -0
  1052. package/src/nhsuk/template.njk +6 -6
  1053. package/dist/nhsuk/core/vendor/sass-mq.scss +0 -316
  1054. package/dist/nhsuk/core/vendor/sass-mq.scss.map +0 -1
  1055. package/dist/nhsuk/nhsuk-frontend-10.5.2.min.css +0 -3
  1056. package/dist/nhsuk/nhsuk-frontend-10.5.2.min.css.map +0 -1
  1057. package/dist/nhsuk/nhsuk-frontend-10.5.2.min.js +0 -2
  1058. package/dist/nhsuk/nhsuk-frontend-10.5.2.min.js.map +0 -1
  1059. package/dist/nhsuk/nhsuk-frontend-dynamic-type-10.5.2.min.css +0 -3
  1060. package/dist/nhsuk/nhsuk-frontend-dynamic-type-10.5.2.min.css.map +0 -1
  1061. package/src/nhsuk/core/vendor/sass-mq.scss +0 -316
@@ -0,0 +1,5 @@
1
+ <svg class="nhsuk-icon nhsuk-icon--arrow-up-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" focusable="false" aria-hidden="true" fill="#212b32">
2
+
3
+ <path d="M1.5 9.3l5-5c.2-.2.4-.3.7-.3.3 0 .5.1.7.3l5 5a1 1 0 0 1-1.4 1.4l-3.3-3.3L8.2 19a1 1 0 0 1-2 0L6.2 7.4l-3.3 3.3a1 1 0 1 1-1.4-1.4Z"/>
4
+ <path d="M22.5 14.7l-5 5c-.2.2-.4.3-.7.3-.3 0-.5-.1-.7-.3l-5-5a1 1 0 0 1 1.4-1.4l3.3 3.3L15.8 5a1 1 0 0 1 2 0L17.8 16.6l3.3-3.3a1 1 0 1 1 1.4 1.4Z"/>
5
+ </svg>
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * {@link https://github.com/nhsuk/nhsuk-frontend/releases}
12
12
  */
13
- const version = '10.5.2';
13
+ const version = '10.6.0';
14
14
 
15
15
  exports.version = version;
16
16
  //# sourceMappingURL=nhsuk-frontend-version.js.map
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * {@link https://github.com/nhsuk/nhsuk-frontend/releases}
10
10
  */
11
- const version = '10.5.2';
11
+ const version = '10.6.0';
12
12
 
13
13
  export { version };
14
14
  //# sourceMappingURL=nhsuk-frontend-version.mjs.map
@@ -4,19 +4,23 @@
4
4
  * Centralises the behaviours shared by our components
5
5
  *
6
6
  * @abstract
7
- * @template {Element} [RootElementType=HTMLElement]
7
+ * @template {HTMLElement} [RootElementType=HTMLElement]
8
8
  */
9
- export class Component<RootElementType extends Element = HTMLElement> {
9
+ export class Component<RootElementType extends HTMLElement = HTMLElement> {
10
10
  /**
11
11
  * @type {typeof Element}
12
12
  */
13
13
  static elementType: typeof Element;
14
14
  /**
15
- * Validates whether components are supported
15
+ * Validate whether component is supported
16
16
  *
17
- * @throws {SupportError} when the components are not supported
17
+ * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]
18
+ * @template {HTMLElement} [RootElementType=HTMLElement]
19
+ * @param {RootElementType} [_$root] - HTML element to use for component
20
+ * @param {ConfigurationType} [_config] - Config specified by configurable components only
21
+ * @throws {SupportError} when component is not supported
18
22
  */
19
- static checkSupport(): void;
23
+ static checkSupport<ConfigurationType extends Partial<Record<keyof ConfigurationType, unknown>> = ObjectNested, RootElementType_1 extends HTMLElement = HTMLElement>(_$root?: RootElementType_1, _config?: ConfigurationType): void;
20
24
  /**
21
25
  * Name for the component used when initialising using data-module attributes
22
26
  */
@@ -31,6 +35,10 @@ export class Component<RootElementType extends Element = HTMLElement> {
31
35
  * @type {RootElementType}
32
36
  */
33
37
  $root: RootElementType;
38
+ /**
39
+ * Set component as initialised
40
+ */
41
+ setInitialised(): void;
34
42
  /**
35
43
  * Validates whether component is already initialised
36
44
  *
@@ -60,7 +68,7 @@ export type InitOptions = {
60
68
  */
61
69
  scope?: Element | Document | null | undefined;
62
70
  };
63
- import type { ConfigurableComponent } from './configurable-component.mjs';
64
71
  import type { ObjectNested } from './common/configuration/index.mjs';
72
+ import type { ConfigurableComponent } from './configurable-component.mjs';
65
73
  import type { Schema } from './common/configuration/index.mjs';
66
74
  //# sourceMappingURL=component.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.mts","sourceRoot":"","sources":["../../src/nhsuk/component.mjs"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,uBAFwB,eAAe,SAAzB,OAAQ;IAGpB;;OAEG;IACH,oBAFU,OAAO,OAAO,CAEc;IAmDtC;;;;OAIG;IACH,4BAIC;IAED;;OAEG;IACH,0BAAqC;IA1DrC;;;;OAIG;IACH,mBAFW,OAAO,GAAG,IAAI,EAwBxB;IAhCD;;OAEG;IACH,OAFU,eAAe,CAEpB;IA+BL;;;;OAIG;IACH,yBAQC;CAiBF;;;;4BAK+D,aAAa,SAA/D,OAAO,SAAS,GAAG,4BAA6B,uBACjD;IACZ,KAAQ,GAAG,IAAI,EAAE,qBAAqB,CAAC,aAAa,CAAC,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;IAChF,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,YAAY,CAAC,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAA;CACnB;;;;iCAM4D,aAAa,SAA/D,OAAO,SAAS,GAAG,4BAA6B,uBACjD,eAAe,GAAG,aAAa;;;;;;;;;;2CAYF,8BAA8B;kCAD/B,kCAAkC;4BAAlC,kCAAkC"}
1
+ {"version":3,"file":"component.d.mts","sourceRoot":"","sources":["../../src/nhsuk/component.mjs"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,uBAF4B,eAAe,SAA7B,WAAY;IAGxB;;OAEG;IACH,oBAFU,OAAO,OAAO,CAEc;IA+DtC;;;;;;;;OAQG;IACH,oBANkE,iBAAiB,SAArE,OAAO,CAAC,MAAM,CAAC,MAAM,iBAAiB,EAAE,OAAO,CAAC,CAAE,2CAClD,WAAY,yBACf,iBAAe,YACf,iBAAiB,QAO3B;IAED;;OAEG;IACH,0BAAqC;IA1ErC;;;;OAIG;IACH,mBAFW,OAAO,GAAG,IAAI,EAsBxB;IA9BD;;OAEG;IACH,OAFU,eAAe,CAEpB;IA6BL;;OAEG;IACH,uBASC;IAED;;;;OAIG;IACH,yBAQC;CAqBF;;;;4BAK+D,aAAa,SAA/D,OAAO,SAAS,GAAG,4BAA6B,uBACjD;IACZ,KAAQ,GAAG,IAAI,EAAE,qBAAqB,CAAC,aAAa,CAAC,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;IAChF,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,YAAY,CAAC,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAA;CACnB;;;;iCAM4D,aAAa,SAA/D,OAAO,SAAS,GAAG,4BAA6B,uBACjD,eAAe,GAAG,aAAa;;;;;;;;;;kCAWH,kCAAkC;2CACjC,8BAA8B;4BAD/B,kCAAkC"}
@@ -13,7 +13,7 @@ const _self = typeof globalThis !== 'undefined' ? globalThis // Modern browsers,
13
13
  * Centralises the behaviours shared by our components
14
14
  *
15
15
  * @abstract
16
- * @template {Element} [RootElementType=HTMLElement]
16
+ * @template {HTMLElement} [RootElementType=HTMLElement]
17
17
  */
18
18
  class Component {
19
19
  /**
@@ -37,7 +37,18 @@ class Component {
37
37
  });
38
38
  }
39
39
  this.$root = /** @type {RootElementType} */$root;
40
- childConstructor.checkSupport();
40
+ if (!('defaults' in childConstructor)) {
41
+ childConstructor.checkSupport(this.$root);
42
+ this.setInitialised();
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Set component as initialised
48
+ */
49
+ setInitialised() {
50
+ const childConstructor = /** @type {ComponentConstructor} */
51
+ this.constructor;
41
52
  this.checkInitialised();
42
53
  const {
43
54
  moduleName
@@ -59,11 +70,15 @@ class Component {
59
70
  }
60
71
 
61
72
  /**
62
- * Validates whether components are supported
73
+ * Validate whether component is supported
63
74
  *
64
- * @throws {SupportError} when the components are not supported
75
+ * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]
76
+ * @template {HTMLElement} [RootElementType=HTMLElement]
77
+ * @param {RootElementType} [_$root] - HTML element to use for component
78
+ * @param {ConfigurationType} [_config] - Config specified by configurable components only
79
+ * @throws {SupportError} when component is not supported
65
80
  */
66
- static checkSupport() {
81
+ static checkSupport(_$root, _config) {
67
82
  if (!index$1.isSupported()) {
68
83
  throw new index.SupportError();
69
84
  }
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/nhsuk/component.mjs"],"names":["_self","globalThis","self","Component","constructor","$root","childConstructor","elementType","ElementError","element","component","identifier","expectedType","name","checkSupport","checkInitialised","moduleName","setAttribute","isInitialised","InitError","isSupported","SupportError","HTMLElement"],"mappings":";;;;;AAAA;AAIA,MAAMA,KAAK,GACT,OAAOC,UAAU,KAAK,WAAW,GAC7BA,UAAU;AAAC,EACXC,IAAI,CAAA;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,CAAC;AAWrB;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,KAAK,EAAE;AAVnB;AACF;AACA;AAFE,IAAA,IAAA,CAGAA,KAAK,GAAA,KAAA,CAAA;AAQH,IAAA,MAAMC,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAI,CAACC,KAAK,IAAI,EAAEA,KAAK,YAAYC,gBAAgB,CAACC,WAAW,CAAC,EAAE;MAC9D,MAAM,IAAIC,kBAAY,CAAC;AACrBC,QAAAA,OAAO,EAAEJ,KAAK;AACdK,QAAAA,SAAS,EAAEJ,gBAAgB;AAC3BK,QAAAA,UAAU,EAAE,wBAAwB;AACpCC,QAAAA,YAAY,EAAEN,gBAAgB,CAACC,WAAW,CAACM;AAC7C,OAAC,CAAC;AACJ,IAAA;AAEA,IAAA,IAAI,CAACR,KAAK,iCAAmCA,KAAM;IAEnDC,gBAAgB,CAACQ,YAAY,EAAE;IAE/B,IAAI,CAACC,gBAAgB,EAAE;IAEvB,MAAM;AAAEC,MAAAA;AAAW,KAAC,GAAGV,gBAAgB;IACvC,IAAI,CAACD,KAAK,CAACY,YAAY,CAAC,QAAQD,UAAU,CAAA,KAAA,CAAO,EAAE,EAAE,CAAC;AACxD,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACED,EAAAA,gBAAgBA,GAAG;AACjB,IAAA,MAAMT,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAIc,qBAAa,CAAC,IAAI,CAACb,KAAK,EAAEC,gBAAgB,CAACU,UAAU,CAAC,EAAE;AAC1D,MAAA,MAAM,IAAIG,eAAS,CAACb,gBAAgB,CAAC;AACvC,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,OAAOQ,YAAYA,GAAG;AACpB,IAAA,IAAI,CAACM,mBAAW,EAAE,EAAE;MAClB,MAAM,IAAIC,kBAAY,EAAE;AAC1B,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AApGE;AACF;AACA;AAHalB,SAAS,CAIbI,WAAW,GAAGP,KAAK,CAACsB,WAAW;AAJ3BnB,SAAS,CAqEba,UAAU,GAAG,iBAAiB;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/nhsuk/component.mjs"],"names":["_self","globalThis","self","Component","constructor","$root","childConstructor","elementType","ElementError","element","component","identifier","expectedType","name","checkSupport","setInitialised","checkInitialised","moduleName","setAttribute","isInitialised","InitError","_$root","_config","isSupported","SupportError","HTMLElement"],"mappings":";;;;;AAAA;AAIA,MAAMA,KAAK,GACT,OAAOC,UAAU,KAAK,WAAW,GAC7BA,UAAU;AAAC,EACXC,IAAI,CAAA;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,CAAC;AAWrB;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,KAAK,EAAE;AAVnB;AACF;AACA;AAFE,IAAA,IAAA,CAGAA,KAAK,GAAA,KAAA,CAAA;AAQH,IAAA,MAAMC,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAI,CAACC,KAAK,IAAI,EAAEA,KAAK,YAAYC,gBAAgB,CAACC,WAAW,CAAC,EAAE;MAC9D,MAAM,IAAIC,kBAAY,CAAC;AACrBC,QAAAA,OAAO,EAAEJ,KAAK;AACdK,QAAAA,SAAS,EAAEJ,gBAAgB;AAC3BK,QAAAA,UAAU,EAAE,wBAAwB;AACpCC,QAAAA,YAAY,EAAEN,gBAAgB,CAACC,WAAW,CAACM;AAC7C,OAAC,CAAC;AACJ,IAAA;AAEA,IAAA,IAAI,CAACR,KAAK,iCAAmCA,KAAM;AAEnD,IAAA,IAAI,EAAE,UAAU,IAAIC,gBAAgB,CAAC,EAAE;AACrCA,MAAAA,gBAAgB,CAACQ,YAAY,CAAC,IAAI,CAACT,KAAK,CAAC;MACzC,IAAI,CAACU,cAAc,EAAE;AACvB,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AACEA,EAAAA,cAAcA,GAAG;AACf,IAAA,MAAMT,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAI,CAACY,gBAAgB,EAAE;IAEvB,MAAM;AAAEC,MAAAA;AAAW,KAAC,GAAGX,gBAAgB;IACvC,IAAI,CAACD,KAAK,CAACa,YAAY,CAAC,QAAQD,UAAU,CAAA,KAAA,CAAO,EAAE,EAAE,CAAC;AACxD,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACED,EAAAA,gBAAgBA,GAAG;AACjB,IAAA,MAAMV,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAIe,qBAAa,CAAC,IAAI,CAACd,KAAK,EAAEC,gBAAgB,CAACW,UAAU,CAAC,EAAE;AAC1D,MAAA,MAAM,IAAIG,eAAS,CAACd,gBAAgB,CAAC;AACvC,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE,EAAA,OAAOQ,YAAYA,CAACO,MAAM,EAAEC,OAAO,EAAE;AACnC,IAAA,IAAI,CAACC,mBAAW,EAAE,EAAE;MAClB,MAAM,IAAIC,kBAAY,EAAE;AAC1B,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AApHE;AACF;AACA;AAHarB,SAAS,CAIbI,WAAW,GAAGP,KAAK,CAACyB,WAAW;AAJ3BtB,SAAS,CAqFbc,UAAU,GAAG,iBAAiB;;;;"}
@@ -11,7 +11,7 @@ const _self = typeof globalThis !== 'undefined' ? globalThis // Modern browsers,
11
11
  * Centralises the behaviours shared by our components
12
12
  *
13
13
  * @abstract
14
- * @template {Element} [RootElementType=HTMLElement]
14
+ * @template {HTMLElement} [RootElementType=HTMLElement]
15
15
  */
16
16
  class Component {
17
17
  /**
@@ -35,7 +35,18 @@ class Component {
35
35
  });
36
36
  }
37
37
  this.$root = /** @type {RootElementType} */$root;
38
- childConstructor.checkSupport();
38
+ if (!('defaults' in childConstructor)) {
39
+ childConstructor.checkSupport(this.$root);
40
+ this.setInitialised();
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Set component as initialised
46
+ */
47
+ setInitialised() {
48
+ const childConstructor = /** @type {ComponentConstructor} */
49
+ this.constructor;
39
50
  this.checkInitialised();
40
51
  const {
41
52
  moduleName
@@ -57,11 +68,15 @@ class Component {
57
68
  }
58
69
 
59
70
  /**
60
- * Validates whether components are supported
71
+ * Validate whether component is supported
61
72
  *
62
- * @throws {SupportError} when the components are not supported
73
+ * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]
74
+ * @template {HTMLElement} [RootElementType=HTMLElement]
75
+ * @param {RootElementType} [_$root] - HTML element to use for component
76
+ * @param {ConfigurationType} [_config] - Config specified by configurable components only
77
+ * @throws {SupportError} when component is not supported
63
78
  */
64
- static checkSupport() {
79
+ static checkSupport(_$root, _config) {
65
80
  if (!isSupported()) {
66
81
  throw new SupportError();
67
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"component.mjs","sources":["../../src/nhsuk/component.mjs"],"names":["_self","globalThis","self","Component","constructor","$root","childConstructor","elementType","ElementError","element","component","identifier","expectedType","name","checkSupport","checkInitialised","moduleName","setAttribute","isInitialised","InitError","isSupported","SupportError","HTMLElement"],"mappings":";;;AAAA;AAIA,MAAMA,KAAK,GACT,OAAOC,UAAU,KAAK,WAAW,GAC7BA,UAAU;AAAC,EACXC,IAAI,CAAA;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,CAAC;AAWrB;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,KAAK,EAAE;AAVnB;AACF;AACA;AAFE,IAAA,IAAA,CAGAA,KAAK,GAAA,KAAA,CAAA;AAQH,IAAA,MAAMC,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAI,CAACC,KAAK,IAAI,EAAEA,KAAK,YAAYC,gBAAgB,CAACC,WAAW,CAAC,EAAE;MAC9D,MAAM,IAAIC,YAAY,CAAC;AACrBC,QAAAA,OAAO,EAAEJ,KAAK;AACdK,QAAAA,SAAS,EAAEJ,gBAAgB;AAC3BK,QAAAA,UAAU,EAAE,wBAAwB;AACpCC,QAAAA,YAAY,EAAEN,gBAAgB,CAACC,WAAW,CAACM;AAC7C,OAAC,CAAC;AACJ,IAAA;AAEA,IAAA,IAAI,CAACR,KAAK,iCAAmCA,KAAM;IAEnDC,gBAAgB,CAACQ,YAAY,EAAE;IAE/B,IAAI,CAACC,gBAAgB,EAAE;IAEvB,MAAM;AAAEC,MAAAA;AAAW,KAAC,GAAGV,gBAAgB;IACvC,IAAI,CAACD,KAAK,CAACY,YAAY,CAAC,QAAQD,UAAU,CAAA,KAAA,CAAO,EAAE,EAAE,CAAC;AACxD,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACED,EAAAA,gBAAgBA,GAAG;AACjB,IAAA,MAAMT,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAIc,aAAa,CAAC,IAAI,CAACb,KAAK,EAAEC,gBAAgB,CAACU,UAAU,CAAC,EAAE;AAC1D,MAAA,MAAM,IAAIG,SAAS,CAACb,gBAAgB,CAAC;AACvC,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,OAAOQ,YAAYA,GAAG;AACpB,IAAA,IAAI,CAACM,WAAW,EAAE,EAAE;MAClB,MAAM,IAAIC,YAAY,EAAE;AAC1B,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AApGE;AACF;AACA;AAHalB,SAAS,CAIbI,WAAW,GAAGP,KAAK,CAACsB,WAAW;AAJ3BnB,SAAS,CAqEba,UAAU,GAAG,iBAAiB;;;;"}
1
+ {"version":3,"file":"component.mjs","sources":["../../src/nhsuk/component.mjs"],"names":["_self","globalThis","self","Component","constructor","$root","childConstructor","elementType","ElementError","element","component","identifier","expectedType","name","checkSupport","setInitialised","checkInitialised","moduleName","setAttribute","isInitialised","InitError","_$root","_config","isSupported","SupportError","HTMLElement"],"mappings":";;;AAAA;AAIA,MAAMA,KAAK,GACT,OAAOC,UAAU,KAAK,WAAW,GAC7BA,UAAU;AAAC,EACXC,IAAI,CAAA;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,CAAC;AAWrB;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,KAAK,EAAE;AAVnB;AACF;AACA;AAFE,IAAA,IAAA,CAGAA,KAAK,GAAA,KAAA,CAAA;AAQH,IAAA,MAAMC,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAI,CAACC,KAAK,IAAI,EAAEA,KAAK,YAAYC,gBAAgB,CAACC,WAAW,CAAC,EAAE;MAC9D,MAAM,IAAIC,YAAY,CAAC;AACrBC,QAAAA,OAAO,EAAEJ,KAAK;AACdK,QAAAA,SAAS,EAAEJ,gBAAgB;AAC3BK,QAAAA,UAAU,EAAE,wBAAwB;AACpCC,QAAAA,YAAY,EAAEN,gBAAgB,CAACC,WAAW,CAACM;AAC7C,OAAC,CAAC;AACJ,IAAA;AAEA,IAAA,IAAI,CAACR,KAAK,iCAAmCA,KAAM;AAEnD,IAAA,IAAI,EAAE,UAAU,IAAIC,gBAAgB,CAAC,EAAE;AACrCA,MAAAA,gBAAgB,CAACQ,YAAY,CAAC,IAAI,CAACT,KAAK,CAAC;MACzC,IAAI,CAACU,cAAc,EAAE;AACvB,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AACEA,EAAAA,cAAcA,GAAG;AACf,IAAA,MAAMT,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAI,CAACY,gBAAgB,EAAE;IAEvB,MAAM;AAAEC,MAAAA;AAAW,KAAC,GAAGX,gBAAgB;IACvC,IAAI,CAACD,KAAK,CAACa,YAAY,CAAC,QAAQD,UAAU,CAAA,KAAA,CAAO,EAAE,EAAE,CAAC;AACxD,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACED,EAAAA,gBAAgBA,GAAG;AACjB,IAAA,MAAMV,gBAAgB;AACpB,IAAA,IAAI,CAACF,WACN;IAED,IAAIe,aAAa,CAAC,IAAI,CAACd,KAAK,EAAEC,gBAAgB,CAACW,UAAU,CAAC,EAAE;AAC1D,MAAA,MAAM,IAAIG,SAAS,CAACd,gBAAgB,CAAC;AACvC,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE,EAAA,OAAOQ,YAAYA,CAACO,MAAM,EAAEC,OAAO,EAAE;AACnC,IAAA,IAAI,CAACC,WAAW,EAAE,EAAE;MAClB,MAAM,IAAIC,YAAY,EAAE;AAC1B,IAAA;AACF,EAAA;;AAEA;AACF;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AApHE;AACF;AACA;AAHarB,SAAS,CAIbI,WAAW,GAAGP,KAAK,CAACyB,WAAW;AAJ3BtB,SAAS,CAqFbc,UAAU,GAAG,iBAAiB;;;;"}
@@ -33,6 +33,7 @@
33
33
  @forward "inset-text";
34
34
  @forward "notification-banner";
35
35
  @forward "panel";
36
+ @forward "scroll";
36
37
  @forward "summary-list";
37
38
  @forward "tables";
38
39
  @forward "tabs";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/nhsuk/components/_index.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,aAAa;AACb,GAAG;;AAEH,eAAe;AACf,iBAAiB;AACjB,wBAAwB;AACxB,wBAAwB;AACxB,mBAAmB;AACnB,eAAe;AACf,gBAAgB;;AAEhB,iBAAiB;AACjB,qBAAqB;AACrB,gBAAgB;AAChB,iBAAiB;AACjB,iBAAiB;AACjB,mBAAmB;;AAEnB,6BAA6B;AAC7B,0BAA0B;AAC1B,qBAAqB;AACrB,sBAAsB;AACtB,yBAAyB;AACzB,uBAAuB;;AAEvB,sBAAsB;AACtB,eAAe;AACf,kBAAkB;AAClB,uBAAuB;AACvB,eAAe;AACf,iBAAiB;AACjB,qBAAqB;AACrB,8BAA8B;AAC9B,gBAAgB;AAChB,uBAAuB;AACvB,iBAAiB;AACjB,eAAe;AACf,cAAc;AACd,oBAAoB;AACpB,0BAA0B;;AAE1B,YAAY;AACZ,sBAAsB;AACtB,oBAAoB;AACpB,wBAAwB;AACxB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB;;AAEpB,wBAAwB;AACxB,qBAAqB;AACrB,eAAe;AACf,iBAAiB","file":"_index.scss","sourcesContent":["////\n/// Components\n////\n\n// Form elements\n@forward \"button\";\n@forward \"error-message\";\n@forward \"error-summary\";\n@forward \"fieldset\";\n@forward \"hint\";\n@forward \"label\";\n\n// Form components\n@forward \"checkboxes\";\n@forward \"input\";\n@forward \"radios\";\n@forward \"select\";\n@forward \"textarea\";\n\n// Form components (composite)\n@forward \"character-count\";\n@forward \"date-input\";\n@forward \"file-upload\";\n@forward \"password-input\";\n@forward \"search-input\";\n\n// Content presentation\n@forward \"code\";\n@forward \"details\";\n@forward \"do-dont-list\";\n@forward \"hero\";\n@forward \"images\";\n@forward \"inset-text\";\n@forward \"notification-banner\";\n@forward \"panel\";\n@forward \"summary-list\";\n@forward \"tables\";\n@forward \"tabs\";\n@forward \"tag\";\n@forward \"task-list\";\n@forward \"warning-callout\";\n\n// Navigation\n@forward \"action-link\";\n@forward \"back-link\";\n@forward \"contents-list\";\n@forward \"footer\";\n@forward \"pagination\";\n@forward \"skip-link\";\n\n// Navigation (composite)\n@forward \"breadcrumb\";\n@forward \"card\";\n@forward \"header\";\n"]}
1
+ {"version":3,"sources":["../../../src/nhsuk/components/_index.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,aAAa;AACb,GAAG;;AAEH,eAAe;AACf,iBAAiB;AACjB,wBAAwB;AACxB,wBAAwB;AACxB,mBAAmB;AACnB,eAAe;AACf,gBAAgB;;AAEhB,iBAAiB;AACjB,qBAAqB;AACrB,gBAAgB;AAChB,iBAAiB;AACjB,iBAAiB;AACjB,mBAAmB;;AAEnB,6BAA6B;AAC7B,0BAA0B;AAC1B,qBAAqB;AACrB,sBAAsB;AACtB,yBAAyB;AACzB,uBAAuB;;AAEvB,sBAAsB;AACtB,eAAe;AACf,kBAAkB;AAClB,uBAAuB;AACvB,eAAe;AACf,iBAAiB;AACjB,qBAAqB;AACrB,8BAA8B;AAC9B,gBAAgB;AAChB,iBAAiB;AACjB,uBAAuB;AACvB,iBAAiB;AACjB,eAAe;AACf,cAAc;AACd,oBAAoB;AACpB,0BAA0B;;AAE1B,YAAY;AACZ,sBAAsB;AACtB,oBAAoB;AACpB,wBAAwB;AACxB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB;;AAEpB,wBAAwB;AACxB,qBAAqB;AACrB,eAAe;AACf,iBAAiB","file":"_index.scss","sourcesContent":["////\n/// Components\n////\n\n// Form elements\n@forward \"button\";\n@forward \"error-message\";\n@forward \"error-summary\";\n@forward \"fieldset\";\n@forward \"hint\";\n@forward \"label\";\n\n// Form components\n@forward \"checkboxes\";\n@forward \"input\";\n@forward \"radios\";\n@forward \"select\";\n@forward \"textarea\";\n\n// Form components (composite)\n@forward \"character-count\";\n@forward \"date-input\";\n@forward \"file-upload\";\n@forward \"password-input\";\n@forward \"search-input\";\n\n// Content presentation\n@forward \"code\";\n@forward \"details\";\n@forward \"do-dont-list\";\n@forward \"hero\";\n@forward \"images\";\n@forward \"inset-text\";\n@forward \"notification-banner\";\n@forward \"panel\";\n@forward \"scroll\";\n@forward \"summary-list\";\n@forward \"tables\";\n@forward \"tabs\";\n@forward \"tag\";\n@forward \"task-list\";\n@forward \"warning-callout\";\n\n// Navigation\n@forward \"action-link\";\n@forward \"back-link\";\n@forward \"contents-list\";\n@forward \"footer\";\n@forward \"pagination\";\n@forward \"skip-link\";\n\n// Navigation (composite)\n@forward \"breadcrumb\";\n@forward \"card\";\n@forward \"header\";\n"]}
@@ -48,22 +48,29 @@
48
48
  @include nhsuk-link-style-default;
49
49
  @include nhsuk-link-style-no-underline;
50
50
 
51
- @include nhsuk-print-colour {
51
+ @include nhsuk-responsive-margin(6, "bottom");
52
+
53
+ @media print {
52
54
  @include nhsuk-link-style-text($nhsuk-print-text-colour);
53
55
  }
54
56
 
55
- @include nhsuk-responsive-margin(6, "bottom");
56
-
57
- @include nhsuk-media-query($from: tablet) {
57
+ @media #{nhsuk-from-breakpoint(tablet)} {
58
58
  padding-left: $_large-icon-size + $_large-icon-spacing; // [2]
59
59
  line-height: nhsuk-line-height($_large-icon-size, $font-size: 22px);
60
60
  }
61
61
 
62
+ &:focus .nhsuk-u-secondary-text-colour,
63
+ &:hover .nhsuk-u-secondary-text-colour,
64
+ &:active .nhsuk-u-secondary-text-colour {
65
+ // stylelint-disable-next-line declaration-no-important
66
+ color: currentcolor !important;
67
+ }
68
+
62
69
  .nhsuk-icon {
63
70
  position: absolute;
64
71
  left: -$_small-icon-spacing;
65
72
 
66
- @include nhsuk-media-query($from: tablet) {
73
+ @media #{nhsuk-from-breakpoint(tablet)} {
67
74
  left: -$_large-icon-spacing;
68
75
  width: $_large-icon-size;
69
76
  height: $_large-icon-size;
@@ -84,6 +91,11 @@
84
91
  .nhsuk-action-link--reverse {
85
92
  @include nhsuk-link-style-reverse;
86
93
 
94
+ .nhsuk-u-secondary-text-colour {
95
+ // stylelint-disable-next-line declaration-no-important
96
+ color: $nhsuk-reverse-secondary-text-colour !important;
97
+ }
98
+
87
99
  &:not(:focus) .nhsuk-icon,
88
100
  &:not(:focus):hover .nhsuk-icon,
89
101
  &:not(:focus):active .nhsuk-icon {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/nhsuk/components/action-link/_index.scss"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,+BAA+B;AAC/B,4BAA4B;AAC5B,8BAA8B;AAC9B,kCAAkC;;AAElC,GAAG;AACH,wBAAwB;AACxB,EAAE;AACF,mEAAmE;AACnE,iDAAiD;AACjD,kEAAkE;AAClE,gEAAgE;AAChE,EAAE;AACF,gCAAgC;AAChC,GAAG;;AAEH;EACE,oDAAoD;EACpD,qDAAqD;;EAErD,wCAAwC;EACxC,qDAAqD;;EAErD;IACE,sBAAsB;IACtB,qBAAqB,EAAE,KAAK;;IAE5B,kBAAkB,EAAE,KAAK;;IAEzB,sDAAsD,EAAE,KAAK;;IAE7D,SAAS;;IAET,gBAAgB;;IAEhB,gBAAgB;;IAEhB,eAAe;;IAEf;MACE;QACE,0BAA0B,EAAE,KAAK;MACnC;IACF;;IAEA,uEAAuE;IACvE,iCAAiC;IACjC,sCAAsC;;IAEtC;MACE,wDAAwD;IAC1D;;IAEA,6CAA6C;;IAE7C;MACE,sDAAsD,EAAE,KAAK;MAC7D,mEAAmE;IACrE;;IAEA;MACE,kBAAkB;MAClB,2BAA2B;;MAE3B;QACE,2BAA2B;QAC3B,wBAAwB;QACxB,yBAAyB;MAC3B;IACF;;IAEA;;;MAGE,2BAA2B;;MAE3B;QACE,gBAAgB;MAClB;IACF;EACF;;EAEA;IACE,iCAAiC;;IAEjC;;;MAGE,gCAAgC;;MAEhC;QACE,gBAAgB;MAClB;IACF;EACF;AACF","file":"_index.scss","sourcesContent":["@use \"sass:math\";\n@use \"../../core/settings\" as *;\n@use \"../../core/tools\" as *;\n@use \"../../core/helpers\" as *;\n@forward \"../../core/styles/icons\";\n\n////\n/// Action link component\n///\n/// 1. Display inline-block so top and bottom margins are respected.\n/// 2. Add sufficient space between icon and text.\n/// 3. Position is relative so the arrow icon can display absolute.\n/// 4. Text decoration none used to override default <a> styling.\n///\n/// @group components/action-link\n////\n\n@include nhsuk-exports(\"nhsuk/components/action-link\") {\n $_small-icon-size: nhsuk-px-to-rem($nhsuk-icon-size);\n $_small-icon-spacing: math.div($_small-icon-size, 10);\n\n $_large-icon-size: nhsuk-px-to-rem(36px);\n $_large-icon-spacing: math.div($_large-icon-size, 10);\n\n .nhsuk-action-link {\n box-sizing: border-box;\n display: inline-block; // [1]\n\n position: relative; // [3]\n\n padding-left: $_small-icon-size + $_small-icon-spacing; // [2]\n\n border: 0;\n\n background: none;\n\n text-align: left;\n\n cursor: pointer;\n\n &:not(:focus):hover {\n .nhsuk-action-link__text {\n text-decoration: underline; // [4]\n }\n }\n\n @include nhsuk-font(22, $weight: bold, $line-height: $_small-icon-size);\n @include nhsuk-link-style-default;\n @include nhsuk-link-style-no-underline;\n\n @include nhsuk-print-colour {\n @include nhsuk-link-style-text($nhsuk-print-text-colour);\n }\n\n @include nhsuk-responsive-margin(6, \"bottom\");\n\n @include nhsuk-media-query($from: tablet) {\n padding-left: $_large-icon-size + $_large-icon-spacing; // [2]\n line-height: nhsuk-line-height($_large-icon-size, $font-size: 22px);\n }\n\n .nhsuk-icon {\n position: absolute;\n left: -$_small-icon-spacing;\n\n @include nhsuk-media-query($from: tablet) {\n left: -$_large-icon-spacing;\n width: $_large-icon-size;\n height: $_large-icon-size;\n }\n }\n\n &:not(:focus) .nhsuk-icon,\n &:not(:focus):hover .nhsuk-icon,\n &:not(:focus):active .nhsuk-icon {\n fill: nhsuk-colour(\"green\");\n\n @media screen and (forced-colors: active), (-ms-high-contrast: active) {\n fill: ButtonText;\n }\n }\n }\n\n .nhsuk-action-link--reverse {\n @include nhsuk-link-style-reverse;\n\n &:not(:focus) .nhsuk-icon,\n &:not(:focus):hover .nhsuk-icon,\n &:not(:focus):active .nhsuk-icon {\n fill: $nhsuk-reverse-text-colour;\n\n @media screen and (forced-colors: active), (-ms-high-contrast: active) {\n fill: ButtonText;\n }\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../../src/nhsuk/components/action-link/_index.scss"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,+BAA+B;AAC/B,4BAA4B;AAC5B,8BAA8B;AAC9B,kCAAkC;;AAElC,GAAG;AACH,wBAAwB;AACxB,EAAE;AACF,mEAAmE;AACnE,iDAAiD;AACjD,kEAAkE;AAClE,gEAAgE;AAChE,EAAE;AACF,gCAAgC;AAChC,GAAG;;AAEH;EACE,oDAAoD;EACpD,qDAAqD;;EAErD,wCAAwC;EACxC,qDAAqD;;EAErD;IACE,sBAAsB;IACtB,qBAAqB,EAAE,KAAK;;IAE5B,kBAAkB,EAAE,KAAK;;IAEzB,sDAAsD,EAAE,KAAK;;IAE7D,SAAS;;IAET,gBAAgB;;IAEhB,gBAAgB;;IAEhB,eAAe;;IAEf;MACE;QACE,0BAA0B,EAAE,KAAK;MACnC;IACF;;IAEA,uEAAuE;IACvE,iCAAiC;IACjC,sCAAsC;;IAEtC,6CAA6C;;IAE7C;MACE,wDAAwD;IAC1D;;IAEA;MACE,sDAAsD,EAAE,KAAK;MAC7D,mEAAmE;IACrE;;IAEA;;;MAGE,sDAAsD;MACtD,8BAA8B;IAChC;;IAEA;MACE,kBAAkB;MAClB,2BAA2B;;MAE3B;QACE,2BAA2B;QAC3B,wBAAwB;QACxB,yBAAyB;MAC3B;IACF;;IAEA;;;MAGE,2BAA2B;;MAE3B;QACE,gBAAgB;MAClB;IACF;EACF;;EAEA;IACE,iCAAiC;;IAEjC;MACE,sDAAsD;MACtD,sDAAsD;IACxD;;IAEA;;;MAGE,gCAAgC;;MAEhC;QACE,gBAAgB;MAClB;IACF;EACF;AACF","file":"_index.scss","sourcesContent":["@use \"sass:math\";\n@use \"../../core/settings\" as *;\n@use \"../../core/tools\" as *;\n@use \"../../core/helpers\" as *;\n@forward \"../../core/styles/icons\";\n\n////\n/// Action link component\n///\n/// 1. Display inline-block so top and bottom margins are respected.\n/// 2. Add sufficient space between icon and text.\n/// 3. Position is relative so the arrow icon can display absolute.\n/// 4. Text decoration none used to override default <a> styling.\n///\n/// @group components/action-link\n////\n\n@include nhsuk-exports(\"nhsuk/components/action-link\") {\n $_small-icon-size: nhsuk-px-to-rem($nhsuk-icon-size);\n $_small-icon-spacing: math.div($_small-icon-size, 10);\n\n $_large-icon-size: nhsuk-px-to-rem(36px);\n $_large-icon-spacing: math.div($_large-icon-size, 10);\n\n .nhsuk-action-link {\n box-sizing: border-box;\n display: inline-block; // [1]\n\n position: relative; // [3]\n\n padding-left: $_small-icon-size + $_small-icon-spacing; // [2]\n\n border: 0;\n\n background: none;\n\n text-align: left;\n\n cursor: pointer;\n\n &:not(:focus):hover {\n .nhsuk-action-link__text {\n text-decoration: underline; // [4]\n }\n }\n\n @include nhsuk-font(22, $weight: bold, $line-height: $_small-icon-size);\n @include nhsuk-link-style-default;\n @include nhsuk-link-style-no-underline;\n\n @include nhsuk-responsive-margin(6, \"bottom\");\n\n @media print {\n @include nhsuk-link-style-text($nhsuk-print-text-colour);\n }\n\n @media #{nhsuk-from-breakpoint(tablet)} {\n padding-left: $_large-icon-size + $_large-icon-spacing; // [2]\n line-height: nhsuk-line-height($_large-icon-size, $font-size: 22px);\n }\n\n &:focus .nhsuk-u-secondary-text-colour,\n &:hover .nhsuk-u-secondary-text-colour,\n &:active .nhsuk-u-secondary-text-colour {\n // stylelint-disable-next-line declaration-no-important\n color: currentcolor !important;\n }\n\n .nhsuk-icon {\n position: absolute;\n left: -$_small-icon-spacing;\n\n @media #{nhsuk-from-breakpoint(tablet)} {\n left: -$_large-icon-spacing;\n width: $_large-icon-size;\n height: $_large-icon-size;\n }\n }\n\n &:not(:focus) .nhsuk-icon,\n &:not(:focus):hover .nhsuk-icon,\n &:not(:focus):active .nhsuk-icon {\n fill: nhsuk-colour(\"green\");\n\n @media screen and (forced-colors: active), (-ms-high-contrast: active) {\n fill: ButtonText;\n }\n }\n }\n\n .nhsuk-action-link--reverse {\n @include nhsuk-link-style-reverse;\n\n .nhsuk-u-secondary-text-colour {\n // stylelint-disable-next-line declaration-no-important\n color: $nhsuk-reverse-secondary-text-colour !important;\n }\n\n &:not(:focus) .nhsuk-icon,\n &:not(:focus):hover .nhsuk-icon,\n &:not(:focus):active .nhsuk-icon {\n fill: $nhsuk-reverse-text-colour;\n\n @media screen and (forced-colors: active), (-ms-high-contrast: active) {\n fill: ButtonText;\n }\n }\n }\n}\n"]}
@@ -52,10 +52,10 @@ declare const fixtures: {
52
52
  selector: string;
53
53
  };
54
54
  };
55
- 'as a button': {
55
+ "as a button": {
56
56
  context: {
57
57
  text: string;
58
- element: string;
58
+ type: string;
59
59
  };
60
60
  variants: ({
61
61
  description?: undefined;
@@ -75,6 +75,31 @@ declare const fixtures: {
75
75
  selector: string;
76
76
  };
77
77
  };
78
+ "with HTML": {
79
+ context: {
80
+ html: string;
81
+ href: string;
82
+ };
83
+ variants: ({
84
+ description?: undefined;
85
+ context?: undefined;
86
+ options?: undefined;
87
+ } | {
88
+ description: string;
89
+ context: {
90
+ variant: string;
91
+ };
92
+ options: {
93
+ layout: string;
94
+ };
95
+ })[];
96
+ };
97
+ "with HTML via call block": {
98
+ context: {
99
+ href: string;
100
+ };
101
+ callBlock: string;
102
+ };
78
103
  };
79
104
  import type { MacroExample } from '#lib';
80
105
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.mts","sourceRoot":"","sources":["../../../../src/nhsuk/components/action-link/fixtures.mjs"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;;;;;;;;;;;KAaC;AAgCD;;;;;GAKG;AACH,uBAFU,MAAM,CAAC,MAAM,OAAO,QAAQ,EAAE,YAAY,CAAC,CAErB;AApChC;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBC;kCAWgC,MAAM"}
1
+ {"version":3,"file":"fixtures.d.mts","sourceRoot":"","sources":["../../../../src/nhsuk/components/action-link/fixtures.mjs"],"names":[],"mappings":"AAEA;;;;GAIG;AACH;;;;;;;;;;;;KAaC;AAmDD;;;;;GAKG;AACH,uBAFU,MAAM,CAAC,MAAM,OAAO,QAAQ,EAAE,YAAY,CAAC,CAErB;AAvDhC;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CC;kCAWgC,MAAM"}
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var outdent = require('outdent');
4
+
3
5
  /**
4
6
  * Nunjucks macro option variants
5
7
  *
@@ -8,12 +10,12 @@
8
10
  const variants = [{
9
11
  // Regular variant
10
12
  }, {
11
- description: 'reverse',
13
+ description: "reverse",
12
14
  context: {
13
- variant: 'reverse'
15
+ variant: "reverse"
14
16
  },
15
17
  options: {
16
- layout: 'background-blue'
18
+ layout: "background-blue"
17
19
  }
18
20
  }];
19
21
 
@@ -23,27 +25,46 @@ const variants = [{
23
25
  * @satisfies {{ [example: string]: MacroExample }}
24
26
  */
25
27
  const fixtures = {
26
- 'default': {
28
+ "default": {
27
29
  context: {
28
- text: 'Find your nearest A&E',
29
- href: '#'
30
+ text: "Find your nearest A&E",
31
+ href: "#/find"
30
32
  },
31
33
  variants,
32
34
  screenshot: {
33
- states: ['focus', 'hover', 'active'],
34
- selector: '.nhsuk-action-link'
35
+ states: ["focus", "hover", "active"],
36
+ selector: ".nhsuk-action-link"
35
37
  }
36
38
  },
37
- 'as a button': {
39
+ "as a button": {
38
40
  context: {
39
- text: 'Find your nearest A&E',
40
- element: 'button'
41
+ text: "Find your nearest A&E",
42
+ type: "submit"
41
43
  },
42
44
  variants,
43
45
  screenshot: {
44
- states: ['focus', 'hover', 'active'],
45
- selector: '.nhsuk-action-link'
46
+ states: ["focus", "hover", "active"],
47
+ selector: ".nhsuk-action-link"
46
48
  }
49
+ },
50
+ "with HTML": {
51
+ context: {
52
+ html: outdent.outdent`
53
+ Start session<br>
54
+ <span class="nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19">(11 cases)</span>
55
+ `,
56
+ href: "#/start"
57
+ },
58
+ variants
59
+ },
60
+ "with HTML via call block": {
61
+ context: {
62
+ href: "#/start"
63
+ },
64
+ callBlock: outdent.outdent`
65
+ Start session<br>
66
+ <span class="nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19">(11 cases)</span>
67
+ `
47
68
  }
48
69
  };
49
70
 
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.js","sources":["../../../../src/nhsuk/components/action-link/fixtures.mjs"],"names":["variants","description","context","variant","options","layout","fixtures","text","href","screenshot","states","selector","element","examples"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAG,CACtB;AACE;AAAA,CACD,EACD;AACEC,EAAAA,WAAW,EAAE,SAAS;AACtBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,OAAO,EAAE;GACV;AACDC,EAAAA,OAAO,EAAE;AACPC,IAAAA,MAAM,EAAE;AACV;AACF,CAAC;;AAGH;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG;AACf,EAAA,SAAS,EAAE;AACTJ,IAAAA,OAAO,EAAE;AACPK,MAAAA,IAAI,EAAE,uBAAuB;AAC7BC,MAAAA,IAAI,EAAE;KACP;IACDR,QAAQ;AACRS,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;AACpCC,MAAAA,QAAQ,EAAE;AACZ;GACD;AACD,EAAA,aAAa,EAAE;AACbT,IAAAA,OAAO,EAAE;AACPK,MAAAA,IAAI,EAAE,uBAAuB;AAC7BK,MAAAA,OAAO,EAAE;KACV;IACDZ,QAAQ;AACRS,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;AACpCC,MAAAA,QAAQ,EAAE;AACZ;AACF;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,QAAQ,GAAGP;;AAExB;AACA;AACA;;;;;"}
1
+ {"version":3,"file":"fixtures.js","sources":["../../../../src/nhsuk/components/action-link/fixtures.mjs"],"names":["variants","description","context","variant","options","layout","fixtures","text","href","screenshot","states","selector","type","html","outdent","callBlock","examples"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMA,QAAQ,GAAG,CACtB;AACE;AAAA,CACD,EACD;AACEC,EAAAA,WAAW,EAAE,SAAS;AACtBC,EAAAA,OAAO,EAAE;AACPC,IAAAA,OAAO,EAAE;GACV;AACDC,EAAAA,OAAO,EAAE;AACPC,IAAAA,MAAM,EAAE;AACV;AACF,CAAC;;AAGH;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG;AACf,EAAA,SAAS,EAAE;AACTJ,IAAAA,OAAO,EAAE;AACPK,MAAAA,IAAI,EAAE,uBAAuB;AAC7BC,MAAAA,IAAI,EAAE;KACP;IACDR,QAAQ;AACRS,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;AACpCC,MAAAA,QAAQ,EAAE;AACZ;GACD;AACD,EAAA,aAAa,EAAE;AACbT,IAAAA,OAAO,EAAE;AACPK,MAAAA,IAAI,EAAE,uBAAuB;AAC7BK,MAAAA,IAAI,EAAE;KACP;IACDZ,QAAQ;AACRS,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;AACpCC,MAAAA,QAAQ,EAAE;AACZ;GACD;AACD,EAAA,WAAW,EAAE;AACXT,IAAAA,OAAO,EAAE;AACPW,MAAAA,IAAI,EAAEC,eAAO;AACnB;AACA;AACA,MAAA,CAAO;AACDN,MAAAA,IAAI,EAAE;KACP;AACDR,IAAAA;GACD;AACD,EAAA,0BAA0B,EAAE;AAC1BE,IAAAA,OAAO,EAAE;AACPM,MAAAA,IAAI,EAAE;KACP;AACDO,IAAAA,SAAS,EAAED,eAAO;AACtB;AACA;AACA,IAAA;AACE;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,QAAQ,GAAGV;;AAExB;AACA;AACA;;;;;"}
@@ -6,7 +6,7 @@
6
6
  "name": "default",
7
7
  "context": {
8
8
  "text": "Find your nearest A&E",
9
- "href": "#"
9
+ "href": "#/find"
10
10
  },
11
11
  "screenshot": {
12
12
  "states": [
@@ -17,14 +17,14 @@
17
17
  "selector": ".nhsuk-action-link"
18
18
  },
19
19
  "options": {},
20
- "html": "<a class=\"nhsuk-action-link\" href=\"#\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">Find your nearest A&amp;E</span>\n</a>"
20
+ "html": "<a class=\"nhsuk-action-link\" href=\"#/find\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">\n Find your nearest A&amp;E\n </span>\n</a>"
21
21
  },
22
22
  {
23
23
  "name": "default",
24
24
  "description": "reverse",
25
25
  "context": {
26
26
  "text": "Find your nearest A&E",
27
- "href": "#",
27
+ "href": "#/find",
28
28
  "variant": "reverse"
29
29
  },
30
30
  "screenshot": {
@@ -38,13 +38,47 @@
38
38
  "options": {
39
39
  "layout": "background-blue"
40
40
  },
41
- "html": "<a class=\"nhsuk-action-link nhsuk-action-link--reverse\" href=\"#\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">Find your nearest A&amp;E</span>\n</a>"
41
+ "html": "<a class=\"nhsuk-action-link nhsuk-action-link--reverse\" href=\"#/find\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">\n Find your nearest A&amp;E\n </span>\n</a>"
42
+ },
43
+ {
44
+ "name": "with HTML",
45
+ "context": {
46
+ "html": "Start session<br>\n<span class=\"nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19\">(11 cases)</span>",
47
+ "href": "#/start"
48
+ },
49
+ "screenshot": false,
50
+ "options": {},
51
+ "html": "<a class=\"nhsuk-action-link\" href=\"#/start\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">\n Start session<br>\n <span class=\"nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19\">(11 cases)</span>\n </span>\n</a>"
52
+ },
53
+ {
54
+ "name": "with HTML",
55
+ "description": "reverse",
56
+ "context": {
57
+ "html": "Start session<br>\n<span class=\"nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19\">(11 cases)</span>",
58
+ "href": "#/start",
59
+ "variant": "reverse"
60
+ },
61
+ "screenshot": false,
62
+ "options": {
63
+ "layout": "background-blue"
64
+ },
65
+ "html": "<a class=\"nhsuk-action-link nhsuk-action-link--reverse\" href=\"#/start\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">\n Start session<br>\n <span class=\"nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19\">(11 cases)</span>\n </span>\n</a>"
66
+ },
67
+ {
68
+ "name": "with HTML via call block",
69
+ "context": {
70
+ "href": "#/start"
71
+ },
72
+ "callBlock": "Start session<br>\n<span class=\"nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19\">(11 cases)</span>",
73
+ "screenshot": false,
74
+ "options": {},
75
+ "html": "<a class=\"nhsuk-action-link\" href=\"#/start\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">\nStart session<br>\n<span class=\"nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19\">(11 cases)</span>\n </span>\n</a>"
42
76
  },
43
77
  {
44
78
  "name": "as a button",
45
79
  "context": {
46
80
  "text": "Find your nearest A&E",
47
- "element": "button"
81
+ "type": "submit"
48
82
  },
49
83
  "screenshot": {
50
84
  "states": [
@@ -55,14 +89,14 @@
55
89
  "selector": ".nhsuk-action-link"
56
90
  },
57
91
  "options": {},
58
- "html": "<button class=\"nhsuk-action-link\" type=\"submit\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">Find your nearest A&amp;E</span>\n</button>"
92
+ "html": "<button class=\"nhsuk-action-link\" type=\"submit\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">\n Find your nearest A&amp;E\n </span>\n</button>"
59
93
  },
60
94
  {
61
95
  "name": "as a button",
62
96
  "description": "reverse",
63
97
  "context": {
64
98
  "text": "Find your nearest A&E",
65
- "element": "button",
99
+ "type": "submit",
66
100
  "variant": "reverse"
67
101
  },
68
102
  "screenshot": {
@@ -76,7 +110,7 @@
76
110
  "options": {
77
111
  "layout": "background-blue"
78
112
  },
79
- "html": "<button class=\"nhsuk-action-link nhsuk-action-link--reverse\" type=\"submit\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">Find your nearest A&amp;E</span>\n</button>"
113
+ "html": "<button class=\"nhsuk-action-link nhsuk-action-link--reverse\" type=\"submit\">\n <svg class=\"nhsuk-icon nhsuk-icon--arrow-right-circle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M12 2a10 10 0 0 0-10 9h11.7l-4-4a1 1 0 0 1 1.5-1.4l5.6 5.7a1 1 0 0 1 0 1.4l-5.6 5.7a1 1 0 0 1-1.5 0 1 1 0 0 1 0-1.4l4-4H2A10 10 0 1 0 12 2z\"/>\n </svg>\n <span class=\"nhsuk-action-link__text\">\n Find your nearest A&amp;E\n </span>\n</button>"
80
114
  }
81
115
  ]
82
116
  }
@@ -1,3 +1,5 @@
1
+ import { outdent } from 'outdent';
2
+
1
3
  /**
2
4
  * Nunjucks macro option variants
3
5
  *
@@ -6,12 +8,12 @@
6
8
  const variants = [{
7
9
  // Regular variant
8
10
  }, {
9
- description: 'reverse',
11
+ description: "reverse",
10
12
  context: {
11
- variant: 'reverse'
13
+ variant: "reverse"
12
14
  },
13
15
  options: {
14
- layout: 'background-blue'
16
+ layout: "background-blue"
15
17
  }
16
18
  }];
17
19
 
@@ -21,27 +23,46 @@ const variants = [{
21
23
  * @satisfies {{ [example: string]: MacroExample }}
22
24
  */
23
25
  const fixtures = {
24
- 'default': {
26
+ "default": {
25
27
  context: {
26
- text: 'Find your nearest A&E',
27
- href: '#'
28
+ text: "Find your nearest A&E",
29
+ href: "#/find"
28
30
  },
29
31
  variants,
30
32
  screenshot: {
31
- states: ['focus', 'hover', 'active'],
32
- selector: '.nhsuk-action-link'
33
+ states: ["focus", "hover", "active"],
34
+ selector: ".nhsuk-action-link"
33
35
  }
34
36
  },
35
- 'as a button': {
37
+ "as a button": {
36
38
  context: {
37
- text: 'Find your nearest A&E',
38
- element: 'button'
39
+ text: "Find your nearest A&E",
40
+ type: "submit"
39
41
  },
40
42
  variants,
41
43
  screenshot: {
42
- states: ['focus', 'hover', 'active'],
43
- selector: '.nhsuk-action-link'
44
+ states: ["focus", "hover", "active"],
45
+ selector: ".nhsuk-action-link"
44
46
  }
47
+ },
48
+ "with HTML": {
49
+ context: {
50
+ html: outdent`
51
+ Start session<br>
52
+ <span class="nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19">(11 cases)</span>
53
+ `,
54
+ href: "#/start"
55
+ },
56
+ variants
57
+ },
58
+ "with HTML via call block": {
59
+ context: {
60
+ href: "#/start"
61
+ },
62
+ callBlock: outdent`
63
+ Start session<br>
64
+ <span class="nhsuk-u-secondary-text-colour nhsuk-u-font-weight-normal nhsuk-u-font-size-19">(11 cases)</span>
65
+ `
45
66
  }
46
67
  };
47
68