whitehall-ui 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/README.md +4 -1
  2. package/dist/{chunk-KWAC6IEK.js → chunk-2KB4IAMZ.js} +9 -22
  3. package/dist/{chunk-5TI2WXYU.js → chunk-3UX7QPLM.js} +10 -21
  4. package/dist/{chunk-SK27BMU5.js → chunk-4GQRYMDK.js} +11 -23
  5. package/dist/{chunk-OP35ZJ4X.js → chunk-4TBXH62Z.js} +6 -7
  6. package/dist/{chunk-M6CLPMRP.js → chunk-6WLHJ5MN.js} +34 -76
  7. package/dist/chunk-7IOR7UNU.js +77 -0
  8. package/dist/chunk-7Q2C5RB7.js +167 -0
  9. package/dist/{chunk-5PIQJ22R.js → chunk-ASBIQC77.js} +13 -18
  10. package/dist/{chunk-KD4LPFIZ.js → chunk-C2YQVLZ7.js} +15 -18
  11. package/dist/chunk-CBT6WCJ7.js +52 -0
  12. package/dist/{chunk-3YIKJK6M.js → chunk-CYBPAHLZ.js} +48 -52
  13. package/dist/{chunk-VB6V3PHD.js → chunk-D2T6BUOB.js} +6 -16
  14. package/dist/chunk-DZ3743JO.js +38 -0
  15. package/dist/{chunk-AO6HPG4R.js → chunk-EDOSCND4.js} +5 -20
  16. package/dist/chunk-FJHNUBEM.js +59 -0
  17. package/dist/chunk-FVBDMMNR.js +143 -0
  18. package/dist/chunk-GKHD33N6.js +52 -0
  19. package/dist/{chunk-3INCIYDO.js → chunk-GLDCEDTR.js} +22 -77
  20. package/dist/{chunk-G6T44BDV.js → chunk-HBLVAX45.js} +7 -11
  21. package/dist/{chunk-UWQFFFTB.js → chunk-JCERRZV6.js} +13 -13
  22. package/dist/chunk-KXQGZLMK.js +120 -0
  23. package/dist/{chunk-CEPBVMFU.js → chunk-MFI5R2TJ.js} +1 -3
  24. package/dist/{chunk-5XNKIBMP.js → chunk-MYMVHSRJ.js} +3 -4
  25. package/dist/chunk-N5PY3VZH.js +192 -0
  26. package/dist/{chunk-P4GCF5FQ.js → chunk-OQILIT3B.js} +26 -15
  27. package/dist/{chunk-6VXVJERU.js → chunk-QKR7NELW.js} +4 -8
  28. package/dist/chunk-QPN5J5IU.js +177 -0
  29. package/dist/chunk-RGXB6M3G.js +87 -0
  30. package/dist/chunk-TAVSU2XB.js +90 -0
  31. package/dist/chunk-TGNN5ZP3.js +81 -0
  32. package/dist/chunk-TICBCBDN.js +18 -0
  33. package/dist/{chunk-7ZCZQN5N.js → chunk-UK7RLSTJ.js} +15 -22
  34. package/dist/chunk-UXOJELVU.js +37 -0
  35. package/dist/{chunk-QTSEOPVX.js → chunk-VCJE5UO2.js} +23 -25
  36. package/dist/{chunk-N67H5OUQ.js → chunk-VHSAXVCF.js} +7 -5
  37. package/dist/chunk-VMI2XU5D.js +74 -0
  38. package/dist/{chunk-TXGBUZB4.js → chunk-VRGDQ3SF.js} +3 -10
  39. package/dist/chunk-W4CWUYTA.js +44 -0
  40. package/dist/{chunk-LRNZYPC2.js → chunk-YF6EZ57H.js} +14 -44
  41. package/dist/chunk-ZAKQHDVD.js +40 -0
  42. package/dist/chunk-ZJB7BBTN.js +188 -0
  43. package/dist/index.d.ts +15 -13
  44. package/dist/index.js +41 -39
  45. package/dist/lib/utils.d.ts +2 -1
  46. package/dist/lib/utils.js +1 -1
  47. package/dist/ui/accordion.d.ts +8 -13
  48. package/dist/ui/accordion.js +2 -2
  49. package/dist/ui/back-link.d.ts +4 -4
  50. package/dist/ui/back-link.js +2 -2
  51. package/dist/ui/breadcrumbs.d.ts +10 -16
  52. package/dist/ui/breadcrumbs.js +2 -2
  53. package/dist/ui/button.d.ts +7 -8
  54. package/dist/ui/button.js +2 -2
  55. package/dist/ui/character-count.d.ts +11 -15
  56. package/dist/ui/character-count.js +3 -3
  57. package/dist/ui/checkboxes.d.ts +9 -17
  58. package/dist/ui/checkboxes.js +2 -2
  59. package/dist/ui/cookie-banner.d.ts +12 -21
  60. package/dist/ui/cookie-banner.js +2 -2
  61. package/dist/ui/date-input.d.ts +10 -16
  62. package/dist/ui/date-input.js +2 -2
  63. package/dist/ui/details.d.ts +8 -17
  64. package/dist/ui/details.js +2 -2
  65. package/dist/ui/error-message.d.ts +4 -4
  66. package/dist/ui/error-message.js +2 -2
  67. package/dist/ui/error-summary.d.ts +5 -4
  68. package/dist/ui/error-summary.js +2 -2
  69. package/dist/ui/exit-this-page.d.ts +4 -4
  70. package/dist/ui/exit-this-page.js +3 -3
  71. package/dist/ui/feedback.d.ts +13 -0
  72. package/dist/ui/feedback.js +2 -0
  73. package/dist/ui/fieldset.d.ts +9 -13
  74. package/dist/ui/fieldset.js +2 -2
  75. package/dist/ui/file-upload.d.ts +4 -5
  76. package/dist/ui/file-upload.js +2 -2
  77. package/dist/ui/footer.d.ts +39 -50
  78. package/dist/ui/footer.js +2 -2
  79. package/dist/ui/generic-header.d.ts +10 -15
  80. package/dist/ui/generic-header.js +2 -2
  81. package/dist/ui/header.d.ts +14 -32
  82. package/dist/ui/header.js +2 -2
  83. package/dist/ui/hint.d.ts +4 -5
  84. package/dist/ui/hint.js +2 -2
  85. package/dist/ui/inset-text.d.ts +4 -5
  86. package/dist/ui/inset-text.js +2 -2
  87. package/dist/ui/label.d.ts +7 -9
  88. package/dist/ui/label.js +2 -2
  89. package/dist/ui/language-navigation.d.ts +20 -0
  90. package/dist/ui/language-navigation.js +2 -0
  91. package/dist/ui/link.d.ts +5 -6
  92. package/dist/ui/link.js +2 -2
  93. package/dist/ui/notification-banner.d.ts +15 -24
  94. package/dist/ui/notification-banner.js +2 -2
  95. package/dist/ui/pagination.d.ts +20 -34
  96. package/dist/ui/pagination.js +2 -2
  97. package/dist/ui/panel.d.ts +11 -12
  98. package/dist/ui/panel.js +2 -2
  99. package/dist/ui/password-input.d.ts +7 -6
  100. package/dist/ui/password-input.js +4 -4
  101. package/dist/ui/phase-banner.d.ts +10 -17
  102. package/dist/ui/phase-banner.js +2 -2
  103. package/dist/ui/radios.d.ts +8 -13
  104. package/dist/ui/radios.js +2 -2
  105. package/dist/ui/select.d.ts +6 -30
  106. package/dist/ui/select.js +2 -2
  107. package/dist/ui/service-navigation.d.ts +15 -23
  108. package/dist/ui/service-navigation.js +2 -2
  109. package/dist/ui/skip-link.d.ts +4 -5
  110. package/dist/ui/skip-link.js +2 -2
  111. package/dist/ui/summary-list.d.ts +24 -41
  112. package/dist/ui/summary-list.js +2 -2
  113. package/dist/ui/table.d.ts +21 -26
  114. package/dist/ui/table.js +2 -2
  115. package/dist/ui/tabs.d.ts +7 -9
  116. package/dist/ui/tabs.js +2 -2
  117. package/dist/ui/tag.d.ts +4 -6
  118. package/dist/ui/tag.js +2 -2
  119. package/dist/ui/task-list.d.ts +14 -23
  120. package/dist/ui/task-list.js +2 -2
  121. package/dist/ui/text-input.d.ts +5 -6
  122. package/dist/ui/text-input.js +2 -2
  123. package/dist/ui/textarea.d.ts +4 -6
  124. package/dist/ui/textarea.js +2 -2
  125. package/dist/ui/warning-text.d.ts +4 -4
  126. package/dist/ui/warning-text.js +2 -2
  127. package/package.json +111 -263
  128. package/registry/default/theme/govuk-tokens.css +207 -40
  129. package/dist/chunk-2QKZ6DPC.js +0 -27
  130. package/dist/chunk-4MXR4WNS.js +0 -17
  131. package/dist/chunk-5AKGRLG2.js +0 -190
  132. package/dist/chunk-5H55YDJS.js +0 -69
  133. package/dist/chunk-72PH2FMG.js +0 -180
  134. package/dist/chunk-GUZIKVAE.js +0 -119
  135. package/dist/chunk-JESMK3XK.js +0 -105
  136. package/dist/chunk-JFZN5XP6.js +0 -88
  137. package/dist/chunk-NRXTKHI2.js +0 -169
  138. package/dist/chunk-PGZHPAT5.js +0 -183
  139. package/dist/chunk-RPV43YDC.js +0 -93
  140. package/dist/chunk-VQOCX44T.js +0 -41
  141. package/dist/chunk-WONVZ7WK.js +0 -29
  142. package/dist/chunk-WPPWPEFV.js +0 -150
  143. package/dist/chunk-XQOYWPKV.js +0 -48
  144. package/dist/chunk-YAKI4SI7.js +0 -205
  145. package/dist/chunk-YCLGXX3R.js +0 -68
@@ -18,27 +18,28 @@
18
18
  --font-govuk: Arial, Helvetica, sans-serif;
19
19
 
20
20
  --color-govuk-brand: #1d70b8;
21
- --color-govuk-brand-hover: #003078;
22
- --color-govuk-visited: #4c2c92;
21
+ --color-govuk-brand-hover: #0f385c;
22
+ --color-govuk-link: #1a65a6;
23
+ --color-govuk-visited: #54319f;
24
+ --color-govuk-surface: #f4f8fb;
25
+ --color-govuk-surface-border: #8eb8dc;
23
26
  --color-govuk-green: #0f7a52;
24
27
  --color-govuk-green-hover: #0b5c3e;
25
- --color-govuk-green-shadow: #083d29;
28
+ --color-govuk-success-hover: #083d29;
26
29
  --color-govuk-black: #0b0c0c;
27
30
  --color-govuk-light-grey: #f3f3f3;
28
- --color-govuk-light-grey-shadow: #858686;
29
31
  --color-govuk-grey: #cecece;
30
- --color-govuk-mid-grey: #b1b4b6;
31
- --color-govuk-dark-grey: #505a5f;
32
+ --color-govuk-mid-grey: #cecece;
33
+ --color-govuk-dark-grey: #484949;
32
34
  --color-govuk-red: #ca3535;
33
35
  --color-govuk-red-hover: #982828;
34
- --color-govuk-red-shadow: #651b1b;
35
36
  --color-govuk-inverse-hover: #f4f8fb;
36
- --color-govuk-inverse-shadow: #0f385c;
37
37
  --color-govuk-yellow: #ffdd00;
38
+ --color-govuk-teal-accent: #00ffe0;
38
39
 
39
40
  /* Error */
40
- --color-govuk-error: #d4351c;
41
- --color-govuk-error-hover: #6a1b0e;
41
+ --color-govuk-error: #ca3535;
42
+ --color-govuk-error-hover: #651b1b;
42
43
 
43
44
  /* Tag colours */
44
45
  --color-govuk-tag-blue: #0f385c;
@@ -65,6 +66,8 @@
65
66
  --text-govuk-header-link--line-height: 1;
66
67
  --text-govuk-body: 19px;
67
68
  --text-govuk-body--line-height: 25px;
69
+ --text-govuk-body-small: 16px;
70
+ --text-govuk-body-small--line-height: 20px;
68
71
  --text-govuk-tag: 19px;
69
72
  --text-govuk-tag--line-height: 25px;
70
73
  --text-govuk-start: 24px;
@@ -74,7 +77,7 @@
74
77
  --text-govuk-heading-l: 36px;
75
78
  --text-govuk-heading-l--line-height: 40px;
76
79
  --text-govuk-heading-m: 24px;
77
- --text-govuk-heading-m--line-height: 25px;
80
+ --text-govuk-heading-m--line-height: 30px;
78
81
  --text-govuk-warning-icon: 30px;
79
82
  --text-govuk-warning-icon--line-height: 29px;
80
83
  --text-govuk-phase-banner: 16px;
@@ -92,10 +95,11 @@
92
95
  --spacing-govuk-6: 30px;
93
96
  --spacing-govuk-7: 40px;
94
97
  --spacing-govuk-8: 50px;
98
+ --spacing-govuk-r6: 30px;
95
99
  --spacing-govuk-button-x: 10px;
96
100
  --spacing-govuk-button-pt: 8px;
97
101
  --spacing-govuk-button-pb: 7px;
98
- --spacing-govuk-button-bottom: 18px;
102
+ --spacing-govuk-button-bottom: 32px;
99
103
  --spacing-govuk-button-press: 2px;
100
104
 
101
105
  /* File upload (improved / JS-enhanced) */
@@ -103,7 +107,7 @@
103
107
  --spacing-govuk-file-upload-lg: 23px;
104
108
  --spacing-govuk-file-upload-pseudo-mb: 3px;
105
109
  --spacing-govuk-file-upload-instruction-mt: 7px;
106
- --color-govuk-file-upload-hover-border: #6f777b;
110
+ --color-govuk-file-upload-hover-border: #858686;
107
111
 
108
112
  /* Exit this page */
109
113
  --z-index-govuk-exit-page: 1000;
@@ -122,14 +126,12 @@
122
126
  --spacing-govuk-warning-icon-size: 35px;
123
127
  --spacing-govuk-warning-text-pl: 45px;
124
128
  --spacing-govuk-warning-icon-mt: -7px;
125
- --spacing-govuk-warning-icon-border: 3px;
129
+ --border-width-govuk-warning-icon-border: 3px;
126
130
 
127
131
  /* Radios & Checkboxes */
128
132
  --spacing-govuk-radio-size: 40px;
129
133
  --spacing-govuk-radio-touch-target: 44px;
130
- --spacing-govuk-radio-small-size: 24px;
131
134
  --spacing-govuk-radio-dot: 10px;
132
- --spacing-govuk-radio-small-dot: 5px;
133
135
  --spacing-govuk-radio-label-padding-x: 15px;
134
136
  --spacing-govuk-radio-focus-width: 4px;
135
137
  --spacing-govuk-radio-gutter: 4px;
@@ -151,8 +153,8 @@
151
153
  --spacing-govuk-checkbox-small-check-width: 12px;
152
154
  --spacing-govuk-checkbox-small-check-height: 6.5px;
153
155
  --spacing-govuk-checkbox-small-check-stroke: 3px;
154
- --spacing-govuk-checkbox-conditional-ml: 21px;
155
- --spacing-govuk-checkbox-conditional-pl: 36px;
156
+ --spacing-govuk-checkbox-conditional-ml: 20px;
157
+ --spacing-govuk-checkbox-conditional-pl: 35px;
156
158
  --spacing-govuk-hover-width: 10px;
157
159
 
158
160
  /* Tag padding */
@@ -172,17 +174,21 @@
172
174
  --spacing-govuk-input-width-3: 3.75em;
173
175
  --spacing-govuk-input-width-2: 2.75em;
174
176
 
175
- --spacing-govuk-select-item-px: 7px;
176
-
177
177
  /* Pagination */
178
178
  --spacing-govuk-pagination-touch: 45px;
179
179
 
180
- /* Header */
181
- --spacing-govuk-header-link-underline: 3px;
180
+ /* Header, panel, notification banner */
181
+ --spacing-govuk-header-pt: 16px;
182
+ --spacing-govuk-header-pb: 12px;
183
+ --spacing-govuk-panel: 35px;
184
+ --spacing-govuk-notification-content: 605px;
182
185
 
183
186
  /* Letter spacing – extra spacing for codes and reference numbers */
184
187
  --tracking-govuk-code: 0.05em;
185
188
 
189
+ /* Line heights */
190
+ --leading-govuk-service-nav: 29px;
191
+
186
192
  /* Shadows – bottom edge shadows used across buttons, tags, etc. */
187
193
  --shadow-govuk-green: 0 2px 0 #083d29;
188
194
  --shadow-govuk-light-grey: 0 2px 0 #858686;
@@ -192,6 +198,35 @@
192
198
  --shadow-govuk-clear: 0 0 #0000;
193
199
  }
194
200
 
201
+ /* ---------------------------------------------------------------------------
202
+ * Responsive type scale
203
+ *
204
+ * GOV.UK reduces heading sizes below the tablet breakpoint. Tailwind 4 compiles
205
+ * font-size utilities to `var()` references rather than inlining the value, so
206
+ * redefining the token here rescales every existing `text-govuk-*` usage with
207
+ * no change to component classes.
208
+ *
209
+ * `@theme` cannot contain media queries, so this is a plain unlayered `:root`
210
+ * block – unlayered normal declarations win over Tailwind's `@layer theme`.
211
+ *
212
+ * Body (19px) and the 16px sizes are intentionally not scaled: the current
213
+ * GOV.UK type scale keeps them identical on small screens.
214
+ * https://design-system.service.gov.uk/styles/type-scale/
215
+ * ------------------------------------------------------------------------- */
216
+ @media (width < 40rem) {
217
+ :root {
218
+ --text-govuk-heading-xl: 32px;
219
+ --text-govuk-heading-xl--line-height: 35px;
220
+ --text-govuk-heading-l: 27px;
221
+ --text-govuk-heading-l--line-height: 30px;
222
+ --text-govuk-heading-m: 21px;
223
+ --text-govuk-heading-m--line-height: 25px;
224
+ --text-govuk-start: 21px;
225
+ --spacing-govuk-r6: 20px;
226
+ --spacing-govuk-button-bottom: 22px;
227
+ }
228
+ }
229
+
195
230
  /* Custom utilities – for styles that can’t be expressed via @theme namespaces */
196
231
  @utility border-l-govuk-inset {
197
232
  border-left: var(--border-width-govuk-wide) solid var(--color-govuk-grey);
@@ -235,14 +270,6 @@
235
270
  background: transparent;
236
271
  }
237
272
 
238
- @utility min-w-anchor {
239
- min-width: var(--anchor-width);
240
- }
241
-
242
- @utility w-anchor {
243
- width: var(--anchor-width);
244
- }
245
-
246
273
  @utility govuk-link-focus {
247
274
  outline: 3px solid transparent;
248
275
  color: var(--color-govuk-black);
@@ -280,12 +307,13 @@
280
307
  position: absolute;
281
308
  width: 1px;
282
309
  height: 1px;
283
- margin: -1px;
310
+ margin: 0;
284
311
  overflow: hidden;
285
312
  clip: rect(0, 0, 0, 0);
286
313
  clip-path: inset(50%);
287
314
  white-space: nowrap;
288
315
  border: 0;
316
+ user-select: none;
289
317
 
290
318
  &:focus {
291
319
  position: static;
@@ -296,6 +324,7 @@
296
324
  clip: auto;
297
325
  clip-path: none;
298
326
  white-space: normal;
327
+ user-select: text;
299
328
  z-index: 50;
300
329
  outline: 3px solid var(--color-govuk-yellow);
301
330
  outline-offset: 0;
@@ -327,10 +356,6 @@
327
356
  border-top: 1px solid var(--color-govuk-mid-grey);
328
357
  }
329
358
 
330
- @utility govuk-accordion-chevron {
331
- vertical-align: middle;
332
- }
333
-
334
359
  @utility govuk-table-cell {
335
360
  padding: var(--spacing-govuk-2) var(--spacing-govuk-4) var(--spacing-govuk-2)
336
361
  0;
@@ -345,16 +370,16 @@
345
370
 
346
371
  @utility govuk-pagination-nav-item {
347
372
  &:hover {
348
- background-color: #f3f2f1;
373
+ background-color: var(--color-govuk-light-grey);
349
374
  }
350
375
  }
351
376
 
352
377
  @utility govuk-pagination-item-current {
353
378
  outline: 1px solid transparent;
354
- background-color: var(--color-govuk-brand);
379
+ background-color: var(--color-govuk-link);
355
380
 
356
381
  &:hover {
357
- background-color: var(--color-govuk-brand);
382
+ background-color: var(--color-govuk-link);
358
383
  }
359
384
 
360
385
  & a,
@@ -364,6 +389,10 @@
364
389
  & a:active {
365
390
  color: white;
366
391
  }
392
+
393
+ & a:focus {
394
+ color: var(--color-govuk-black);
395
+ }
367
396
  }
368
397
 
369
398
  @utility govuk-pagination-link {
@@ -383,6 +412,10 @@
383
412
  width: 0.9375rem;
384
413
  height: 0.8125rem;
385
414
  color: var(--color-govuk-dark-grey);
415
+
416
+ a:focus & {
417
+ color: var(--color-govuk-black);
418
+ }
386
419
  }
387
420
 
388
421
  @utility govuk-pagination-nav-link {
@@ -429,6 +462,140 @@
429
462
  }
430
463
  }
431
464
 
432
- @utility govuk-date-input-field {
433
- margin-bottom: 0;
465
+ /* 960px page container with 15px/30px gutters, centred once there's room */
466
+ @utility govuk-width-container {
467
+ max-width: 960px;
468
+ margin-right: max(15px, calc(15px + env(safe-area-inset-right)));
469
+ margin-left: max(15px, calc(15px + env(safe-area-inset-left)));
470
+
471
+ @media (width >= 40rem) {
472
+ margin-right: max(30px, calc(15px + env(safe-area-inset-right)));
473
+ margin-left: max(30px, calc(15px + env(safe-area-inset-left)));
474
+ }
475
+
476
+ @media (width >= 1020px) {
477
+ margin-right: auto;
478
+ margin-left: auto;
479
+ }
480
+ }
481
+
482
+ /* Row of buttons and links (cookie banner, interruption panel, forms) */
483
+ @utility govuk-button-group {
484
+ display: flex;
485
+ flex-direction: column;
486
+ align-items: center;
487
+ margin-bottom: calc(var(--spacing-govuk-r6) - var(--spacing-govuk-3));
488
+
489
+ & > button,
490
+ & > a[role='button'] {
491
+ margin-bottom: var(--spacing-govuk-3);
492
+ }
493
+
494
+ & > a:not([role='button']) {
495
+ display: inline-block;
496
+ max-width: 100%;
497
+ margin-top: var(--spacing-govuk-1);
498
+ margin-bottom: calc(var(--spacing-govuk-1) + var(--spacing-govuk-3));
499
+ font-size: var(--text-govuk-body);
500
+ line-height: 19px;
501
+ text-align: center;
502
+ }
503
+
504
+ @media (width >= 40rem) {
505
+ flex-direction: row;
506
+ flex-wrap: wrap;
507
+ align-items: baseline;
508
+ margin-right: calc(var(--spacing-govuk-3) * -1);
509
+
510
+ & > * {
511
+ margin-right: var(--spacing-govuk-3);
512
+ }
513
+
514
+ & > a:not([role='button']) {
515
+ text-align: left;
516
+ }
517
+ }
518
+ }
519
+
520
+ @utility govuk-logo {
521
+ display: inline-block;
522
+ position: relative;
523
+ top: -3px;
524
+ margin-right: 0.4375rem;
525
+ margin-bottom: 2px;
526
+ vertical-align: top;
527
+
528
+ &:last-child {
529
+ margin-right: 0;
530
+ }
531
+
532
+ & .govuk-logo-dot {
533
+ fill: var(--color-govuk-teal-accent);
534
+ }
535
+
536
+ a:focus & .govuk-logo-dot,
537
+ &:where(:is(a:focus *)) .govuk-logo-dot {
538
+ fill: currentcolor;
539
+ }
540
+
541
+ @media (forced-colors: active) {
542
+ forced-color-adjust: none;
543
+ color: LinkText;
544
+
545
+ & .govuk-logo-dot {
546
+ fill: currentcolor;
547
+ }
548
+ }
549
+
550
+ @media print {
551
+ & .govuk-logo-dot {
552
+ fill: currentcolor;
553
+ }
554
+ }
555
+ }
556
+
557
+ /* Header links show a 3px bar (not an underline) so it also works under the SVG logo */
558
+ @utility govuk-header-link {
559
+ color: white;
560
+ text-decoration: none;
561
+
562
+ &:hover,
563
+ &:active {
564
+ margin-bottom: -3px;
565
+ border-bottom: 3px solid currentcolor;
566
+ }
567
+
568
+ &:focus {
569
+ margin-bottom: 0;
570
+ border-bottom: 0;
571
+ }
572
+ }
573
+
574
+ @utility govuk-header-product-name {
575
+ display: inline-table;
576
+ margin-bottom: -1px;
577
+ font-size: 1.9375rem;
578
+ line-height: 1;
579
+ letter-spacing: -0.015em;
580
+ vertical-align: top;
581
+
582
+ @media (forced-colors: active) {
583
+ forced-color-adjust: none;
584
+ color: LinkText;
585
+ }
586
+ }
587
+
588
+ /* Exit this page: hide everything except the overlay once activated */
589
+ .govuk-exit-this-page-hide-content {
590
+ & * {
591
+ display: none !important;
592
+ }
593
+
594
+ & [data-exit-overlay] {
595
+ display: block !important;
596
+ }
597
+ }
598
+
599
+ html:has([data-exit-this-page]) {
600
+ scroll-padding-top: 60px;
434
601
  }
@@ -1,27 +0,0 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- var SkipLink = ({
5
- className,
6
- ref,
7
- children = "Skip to main content",
8
- href = "#main-content",
9
- ...props
10
- }) => /* @__PURE__ */ jsx(
11
- "a",
12
- {
13
- ref,
14
- href,
15
- className: cn(
16
- "govuk-skip-link",
17
- "font-govuk text-govuk-header leading-tight",
18
- "block py-govuk-2 px-govuk-3",
19
- "text-govuk-black no-underline",
20
- className
21
- ),
22
- ...props,
23
- children
24
- }
25
- );
26
-
27
- export { SkipLink };
@@ -1,17 +0,0 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- var Hint = ({ className, ref, ...props }) => /* @__PURE__ */ jsx(
5
- "div",
6
- {
7
- ref,
8
- className: cn(
9
- "font-govuk text-govuk-body text-govuk-dark-grey",
10
- "mb-govuk-3",
11
- className
12
- ),
13
- ...props
14
- }
15
- );
16
-
17
- export { Hint };
@@ -1,190 +0,0 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
2
- import { useState } from 'react';
3
- import { jsx, jsxs } from 'react/jsx-runtime';
4
-
5
- var headerLinkStyles = [
6
- "no-underline text-white",
7
- "visited:text-white active:text-white",
8
- "hover:underline hover:govuk-link-underline hover:govuk-link-underline-hover",
9
- "focus:govuk-link-focus",
10
- "focus:not-focus:bg-govuk-brand"
11
- ];
12
- var Header = ({
13
- className,
14
- children,
15
- fullWidth,
16
- ref,
17
- ...props
18
- }) => /* @__PURE__ */ jsx(
19
- "header",
20
- {
21
- ref,
22
- className: cn(
23
- "font-govuk text-govuk-header",
24
- "border-b border-b-transparent",
25
- "text-white bg-govuk-brand",
26
- className
27
- ),
28
- ...props,
29
- children: children ?? /* @__PURE__ */ jsx(HeaderContainer, { fullWidth, children: /* @__PURE__ */ jsx(HeaderLogo, {}) })
30
- }
31
- );
32
- var HeaderContainer = ({
33
- className,
34
- fullWidth,
35
- ref,
36
- children,
37
- ...props
38
- }) => /* @__PURE__ */ jsx(
39
- "div",
40
- {
41
- ref,
42
- className: cn(
43
- "flex items-center flex-wrap",
44
- fullWidth ? "px-govuk-3" : "max-w-240 mx-auto px-govuk-3",
45
- className
46
- ),
47
- ...props,
48
- children
49
- }
50
- );
51
- var HeaderLogo = ({
52
- className,
53
- ref,
54
- children,
55
- ...props
56
- }) => /* @__PURE__ */ jsx(
57
- "div",
58
- {
59
- ref,
60
- className: cn("box-border py-govuk-2 mr-govuk-2", className),
61
- ...props,
62
- children
63
- }
64
- );
65
- var HeaderLink = ({
66
- className,
67
- ref,
68
- children,
69
- ...props
70
- }) => /* @__PURE__ */ jsx(
71
- "a",
72
- {
73
- ref,
74
- className: cn(
75
- "inline-flex items-center text-govuk-header-link",
76
- headerLinkStyles,
77
- className
78
- ),
79
- ...props,
80
- children
81
- }
82
- );
83
- var HeaderServiceName = ({
84
- className,
85
- ref,
86
- children,
87
- ...props
88
- }) => /* @__PURE__ */ jsx(
89
- "a",
90
- {
91
- ref,
92
- className: cn(
93
- "inline-flex items-center text-govuk-body font-bold",
94
- "py-govuk-2 mr-govuk-2",
95
- headerLinkStyles,
96
- className
97
- ),
98
- ...props,
99
- children
100
- }
101
- );
102
- var HeaderNav = ({ className, ref, children, ...props }) => {
103
- const [menuOpen, setMenuOpen] = useState(false);
104
- return /* @__PURE__ */ jsxs(
105
- "nav",
106
- {
107
- ref,
108
- className: cn("ml-auto max-sm:w-full", className),
109
- ...props,
110
- children: [
111
- /* @__PURE__ */ jsxs(
112
- "button",
113
- {
114
- type: "button",
115
- className: cn(
116
- "sm:hidden flex items-center gap-govuk-1 ml-auto py-govuk-2",
117
- "font-govuk text-govuk-body font-bold",
118
- "bg-transparent border-0 text-white cursor-pointer",
119
- "hover:underline focus:govuk-link-focus"
120
- ),
121
- onClick: () => setMenuOpen((prev) => !prev),
122
- "aria-expanded": menuOpen,
123
- "aria-label": "Show or hide navigation menu",
124
- children: [
125
- "Menu",
126
- /* @__PURE__ */ jsx(
127
- "svg",
128
- {
129
- viewBox: "0 0 10 6",
130
- width: "10",
131
- height: "6",
132
- fill: "currentColor",
133
- "aria-hidden": "true",
134
- className: cn("transition-transform", menuOpen && "rotate-180"),
135
- children: /* @__PURE__ */ jsx("path", { d: "M0 0l5 6 5-6z" })
136
- }
137
- )
138
- ]
139
- }
140
- ),
141
- /* @__PURE__ */ jsx(
142
- "ul",
143
- {
144
- className: cn(
145
- "list-none m-0 p-0",
146
- "sm:flex sm:flex-wrap sm:items-center sm:gap-x-govuk-4 sm:gap-y-0",
147
- menuOpen ? "max-sm:block" : "max-sm:hidden"
148
- ),
149
- children
150
- }
151
- )
152
- ]
153
- }
154
- );
155
- };
156
- var HeaderNavItem = ({
157
- className,
158
- active,
159
- ref,
160
- children,
161
- ...props
162
- }) => /* @__PURE__ */ jsx(
163
- "li",
164
- {
165
- ref,
166
- className: cn(
167
- "py-govuk-2",
168
- active && "border-b-govuk-standard border-b-white -mb-px",
169
- className
170
- ),
171
- ...props,
172
- children
173
- }
174
- );
175
- var HeaderNavLink = ({
176
- className,
177
- ref,
178
- children,
179
- ...props
180
- }) => /* @__PURE__ */ jsx(
181
- "a",
182
- {
183
- ref,
184
- className: cn("text-govuk-body font-bold", headerLinkStyles, className),
185
- ...props,
186
- children
187
- }
188
- );
189
-
190
- export { Header, HeaderContainer, HeaderLink, HeaderLogo, HeaderNav, HeaderNavItem, HeaderNavLink, HeaderServiceName };
@@ -1,69 +0,0 @@
1
- import { cn } from './chunk-WONVZ7WK.js';
2
- import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
3
- import { jsx } from 'react/jsx-runtime';
4
-
5
- var Tabs = ({ className, ref, children, ...props }) => /* @__PURE__ */ jsx(
6
- Tabs$1.Root,
7
- {
8
- ref,
9
- className: cn(
10
- "mt-govuk-1 mb-govuk-6 font-govuk text-govuk-body text-govuk-black",
11
- className
12
- ),
13
- ...props,
14
- children
15
- }
16
- );
17
- var TabsList = ({ className, ref, children, ...props }) => /* @__PURE__ */ jsx(
18
- Tabs$1.List,
19
- {
20
- ref,
21
- activateOnFocus: true,
22
- className: cn("flex m-0 p-0 border-b border-govuk-mid-grey", className),
23
- ...props,
24
- children
25
- }
26
- );
27
- var TabsTab = ({ className, ref, children, ...props }) => /* @__PURE__ */ jsx(
28
- Tabs$1.Tab,
29
- {
30
- ref,
31
- className: cn(
32
- "group relative cursor-pointer border-0 outline-none",
33
- "mr-govuk-1 py-govuk-2 px-govuk-4",
34
- "bg-govuk-light-grey text-center",
35
- "govuk-tab",
36
- className
37
- ),
38
- ...props,
39
- children: /* @__PURE__ */ jsx(
40
- "span",
41
- {
42
- className: cn(
43
- "text-govuk-black underline govuk-link-underline",
44
- "group-hover:govuk-link-underline-hover",
45
- "group-focus-visible:govuk-link-focus group-focus-visible:no-underline",
46
- "group-data-active:no-underline"
47
- ),
48
- children
49
- }
50
- )
51
- }
52
- );
53
- var TabsPanel = ({ className, ref, children, ...props }) => /* @__PURE__ */ jsx(
54
- Tabs$1.Panel,
55
- {
56
- ref,
57
- tabIndex: -1,
58
- className: cn(
59
- "py-govuk-6 px-govuk-4",
60
- "govuk-tab-panel-border",
61
- "*:last:mb-0",
62
- className
63
- ),
64
- ...props,
65
- children
66
- }
67
- );
68
-
69
- export { Tabs, TabsList, TabsPanel, TabsTab };