uikit-react-public 0.40.0 → 0.40.2

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 (35) hide show
  1. package/dist/components/Header/Header.d.ts +6 -1
  2. package/dist/components/Header/Header.stories.d.ts +1 -1
  3. package/dist/components/HeaderNew/HeaderLogo.d.ts +1 -1
  4. package/dist/index.js +3622 -3573
  5. package/lib/components/AppHeader/AppHeader.stories.tsx +3 -3
  6. package/lib/components/AppHeader/AppHeader.tsx +3 -2
  7. package/lib/components/AppHeader/AppHeaderBottom.tsx +4 -2
  8. package/lib/components/AppHeader/AppHeaderTop.tsx +1 -1
  9. package/lib/components/AppHeader/__tests__/__snapshots__/AppHeader.test.tsx.snap +1 -1
  10. package/lib/components/AppMenu/AppMenuContent.tsx +3 -3
  11. package/lib/components/AppMenu/AppMenuDivider.tsx +1 -1
  12. package/lib/components/AppMenu/AppMenuItem.tsx +6 -6
  13. package/lib/components/AppMenu/__tests__/__snapshots__/AppMenu.test.tsx.snap +1 -1
  14. package/lib/components/Footer/Footer.tsx +5 -5
  15. package/lib/components/Footer/FooterNavLink.tsx +3 -3
  16. package/lib/components/Footer/SocialLink.tsx +3 -3
  17. package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +52 -52
  18. package/lib/components/Header/Header.tsx +70 -5
  19. package/lib/components/Header/__tests__/Header.test.tsx +50 -0
  20. package/lib/components/Header/__tests__/__snapshots__/Header.test.tsx.snap +2 -2
  21. package/lib/components/HeaderDraft/HeaderBottomBreadcrumbs.tsx +2 -2
  22. package/lib/components/HeaderDraft/HeaderBottomHeadingAndAvatar.tsx +7 -7
  23. package/lib/components/HeaderDraft/HeaderBreadcrumb.tsx +4 -4
  24. package/lib/components/HeaderDraft/HeaderDraft.tsx +7 -7
  25. package/lib/components/HeaderDraft/__tests__/__snapshots__/Header.test.tsx.snap +5 -5
  26. package/lib/components/HeaderNew/Header.tsx +1 -1
  27. package/lib/components/HeaderNew/HeaderBorder.tsx +1 -1
  28. package/lib/components/HeaderNew/HeaderItem.tsx +1 -1
  29. package/lib/components/HeaderNew/HeaderLogo.tsx +3 -1
  30. package/lib/components/HeaderNew/HeaderTitle.tsx +1 -1
  31. package/lib/components/Menu/MenuContent.tsx +3 -3
  32. package/lib/components/Menu/MenuItem.tsx +3 -7
  33. package/lib/components/Menu/MenuSection.tsx +1 -1
  34. package/lib/components/UclLogo/UclLogoNegativeSpace.tsx +3 -7
  35. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Footer > snapshot: footer links provided 1`] = `
4
4
  <footer
5
- class="ucl-uikit-footer css-aro7ng"
5
+ class="ucl-uikit-footer css-mq639a"
6
6
  data-testid="ucl-uikit-footer"
7
7
  >
8
8
  <div
@@ -15,7 +15,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
15
15
  class="css-1h8jsb3"
16
16
  >
17
17
  <svg
18
- class="css-lo1jj5"
18
+ class="css-2wjlk2"
19
19
  fill="currentColor"
20
20
  height="40"
21
21
  viewBox="0 0 157 40"
@@ -34,7 +34,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
34
34
  >
35
35
  <a
36
36
  aria-label="Facebook"
37
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
37
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
38
38
  data-testid="ucl-uikit-footer__social-link"
39
39
  href="https://www.facebook.com/uclofficial/"
40
40
  target="_blank"
@@ -60,7 +60,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
60
60
  </a>
61
61
  <a
62
62
  aria-label="Flickr"
63
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
63
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
64
64
  data-testid="ucl-uikit-footer__social-link"
65
65
  href="https://www.flickr.com/groups/ucl/"
66
66
  target="_blank"
@@ -86,7 +86,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
86
86
  </a>
87
87
  <a
88
88
  aria-label="TikTok"
89
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
89
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
90
90
  data-testid="ucl-uikit-footer__social-link"
91
91
  href="https://www.tiktok.com/@uclofficial"
92
92
  target="_blank"
@@ -112,7 +112,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
112
112
  </a>
113
113
  <a
114
114
  aria-label="YouTube"
115
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
115
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
116
116
  data-testid="ucl-uikit-footer__social-link"
117
117
  href="https://www.youtube.com/ucltv"
118
118
  target="_blank"
@@ -138,7 +138,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
138
138
  </a>
139
139
  <a
140
140
  aria-label="SoundCloud"
141
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
141
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
142
142
  data-testid="ucl-uikit-footer__social-link"
143
143
  href="https://soundcloud.com/uclsound"
144
144
  target="_blank"
@@ -166,7 +166,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
166
166
  </a>
167
167
  <a
168
168
  aria-label="X social media platform"
169
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
169
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
170
170
  data-testid="ucl-uikit-footer__social-link"
171
171
  href="https://x.com/ucl"
172
172
  target="_blank"
@@ -192,7 +192,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
192
192
  </a>
193
193
  <a
194
194
  aria-label="Instagram"
195
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
195
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
196
196
  data-testid="ucl-uikit-footer__social-link"
197
197
  href="https://www.instagram.com/ucl/"
198
198
  target="_blank"
@@ -227,7 +227,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
227
227
  role="separator"
228
228
  />
229
229
  <div
230
- class="css-1qgjvo4"
230
+ class="css-1ah386p"
231
231
  >
232
232
  <span
233
233
  class="css-13yf1i2"
@@ -252,7 +252,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
252
252
  class="css-1k5afze"
253
253
  >
254
254
  <a
255
- class="css-o22h86"
255
+ class="css-16lix8i"
256
256
  href="https://dictionary.cambridge.org/dictionary/english/disclaimer"
257
257
  rel="noopener noreferrer"
258
258
  target="_blank"
@@ -260,7 +260,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
260
260
  Disclaimer
261
261
  </a>
262
262
  <a
263
- class="css-o22h86"
263
+ class="css-16lix8i"
264
264
  href="https://www.legislation.gov.uk/ukpga/2000/36/contents"
265
265
  rel="noopener noreferrer"
266
266
  target="_blank"
@@ -268,7 +268,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
268
268
  Freedom of Information
269
269
  </a>
270
270
  <a
271
- class="css-o22h86"
271
+ class="css-16lix8i"
272
272
  href="https://developer.mozilla.org/en-US/docs/Web/Accessibility"
273
273
  rel="noopener noreferrer"
274
274
  target="_blank"
@@ -276,7 +276,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
276
276
  Accessibility
277
277
  </a>
278
278
  <a
279
- class="css-o22h86"
279
+ class="css-16lix8i"
280
280
  href="https://en.wikipedia.org/wiki/HTTP_cookie"
281
281
  rel="noopener noreferrer"
282
282
  target="_blank"
@@ -284,7 +284,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
284
284
  Cookies
285
285
  </a>
286
286
  <a
287
- class="css-o22h86"
287
+ class="css-16lix8i"
288
288
  href="https://dictionary.cambridge.org/dictionary/english/privacy"
289
289
  rel="noopener noreferrer"
290
290
  target="_blank"
@@ -292,7 +292,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
292
292
  Privacy
293
293
  </a>
294
294
  <a
295
- class="css-o22h86"
295
+ class="css-16lix8i"
296
296
  href="https://modern-slavery-statement-registry.service.gov.uk/"
297
297
  rel="noopener noreferrer"
298
298
  target="_blank"
@@ -306,7 +306,7 @@ exports[`Footer > snapshot: footer links provided 1`] = `
306
306
 
307
307
  exports[`Footer > snapshot: nav links 1`] = `
308
308
  <footer
309
- class="ucl-uikit-footer css-aro7ng"
309
+ class="ucl-uikit-footer css-mq639a"
310
310
  data-testid="ucl-uikit-footer"
311
311
  >
312
312
  <div
@@ -325,14 +325,14 @@ exports[`Footer > snapshot: nav links 1`] = `
325
325
  Category 1
326
326
  </h3>
327
327
  <a
328
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__nav-link css-1w73vrx"
328
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__nav-link css-nsraf"
329
329
  data-testid="ucl-uikit-footer__nav-link"
330
330
  href="#"
331
331
  >
332
332
  Item 1
333
333
  </a>
334
334
  <a
335
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__nav-link css-1w73vrx"
335
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__nav-link css-nsraf"
336
336
  data-testid="ucl-uikit-footer__nav-link"
337
337
  href="#"
338
338
  >
@@ -349,14 +349,14 @@ exports[`Footer > snapshot: nav links 1`] = `
349
349
  Category 2
350
350
  </h3>
351
351
  <a
352
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__nav-link css-1w73vrx"
352
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__nav-link css-nsraf"
353
353
  data-testid="ucl-uikit-footer__nav-link"
354
354
  href="#"
355
355
  >
356
356
  Item 1
357
357
  </a>
358
358
  <a
359
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__nav-link css-1w73vrx"
359
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__nav-link css-nsraf"
360
360
  data-testid="ucl-uikit-footer__nav-link"
361
361
  href="#"
362
362
  >
@@ -368,7 +368,7 @@ exports[`Footer > snapshot: nav links 1`] = `
368
368
  class="css-1h8jsb3"
369
369
  >
370
370
  <svg
371
- class="css-lo1jj5"
371
+ class="css-2wjlk2"
372
372
  fill="currentColor"
373
373
  height="40"
374
374
  viewBox="0 0 157 40"
@@ -387,7 +387,7 @@ exports[`Footer > snapshot: nav links 1`] = `
387
387
  >
388
388
  <a
389
389
  aria-label="Facebook"
390
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
390
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
391
391
  data-testid="ucl-uikit-footer__social-link"
392
392
  href="https://www.facebook.com/uclofficial/"
393
393
  target="_blank"
@@ -413,7 +413,7 @@ exports[`Footer > snapshot: nav links 1`] = `
413
413
  </a>
414
414
  <a
415
415
  aria-label="Flickr"
416
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
416
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
417
417
  data-testid="ucl-uikit-footer__social-link"
418
418
  href="https://www.flickr.com/groups/ucl/"
419
419
  target="_blank"
@@ -439,7 +439,7 @@ exports[`Footer > snapshot: nav links 1`] = `
439
439
  </a>
440
440
  <a
441
441
  aria-label="TikTok"
442
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
442
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
443
443
  data-testid="ucl-uikit-footer__social-link"
444
444
  href="https://www.tiktok.com/@uclofficial"
445
445
  target="_blank"
@@ -465,7 +465,7 @@ exports[`Footer > snapshot: nav links 1`] = `
465
465
  </a>
466
466
  <a
467
467
  aria-label="YouTube"
468
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
468
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
469
469
  data-testid="ucl-uikit-footer__social-link"
470
470
  href="https://www.youtube.com/ucltv"
471
471
  target="_blank"
@@ -491,7 +491,7 @@ exports[`Footer > snapshot: nav links 1`] = `
491
491
  </a>
492
492
  <a
493
493
  aria-label="SoundCloud"
494
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
494
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
495
495
  data-testid="ucl-uikit-footer__social-link"
496
496
  href="https://soundcloud.com/uclsound"
497
497
  target="_blank"
@@ -519,7 +519,7 @@ exports[`Footer > snapshot: nav links 1`] = `
519
519
  </a>
520
520
  <a
521
521
  aria-label="X social media platform"
522
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
522
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
523
523
  data-testid="ucl-uikit-footer__social-link"
524
524
  href="https://x.com/ucl"
525
525
  target="_blank"
@@ -545,7 +545,7 @@ exports[`Footer > snapshot: nav links 1`] = `
545
545
  </a>
546
546
  <a
547
547
  aria-label="Instagram"
548
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
548
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
549
549
  data-testid="ucl-uikit-footer__social-link"
550
550
  href="https://www.instagram.com/ucl/"
551
551
  target="_blank"
@@ -580,7 +580,7 @@ exports[`Footer > snapshot: nav links 1`] = `
580
580
  role="separator"
581
581
  />
582
582
  <div
583
- class="css-1qgjvo4"
583
+ class="css-1ah386p"
584
584
  >
585
585
  <span
586
586
  class="css-13yf1i2"
@@ -605,7 +605,7 @@ exports[`Footer > snapshot: nav links 1`] = `
605
605
  class="css-1k5afze"
606
606
  >
607
607
  <a
608
- class="css-o22h86"
608
+ class="css-16lix8i"
609
609
  href="https://www.ucl.ac.uk/legal-services/disclaimer"
610
610
  rel="noopener noreferrer"
611
611
  target="_blank"
@@ -613,7 +613,7 @@ exports[`Footer > snapshot: nav links 1`] = `
613
613
  Disclaimer
614
614
  </a>
615
615
  <a
616
- class="css-o22h86"
616
+ class="css-16lix8i"
617
617
  href="https://www.ucl.ac.uk/foi"
618
618
  rel="noopener noreferrer"
619
619
  target="_blank"
@@ -621,7 +621,7 @@ exports[`Footer > snapshot: nav links 1`] = `
621
621
  Freedom of Information
622
622
  </a>
623
623
  <a
624
- class="css-o22h86"
624
+ class="css-16lix8i"
625
625
  href="https://www.ucl.ac.uk/accessibility"
626
626
  rel="noopener noreferrer"
627
627
  target="_blank"
@@ -629,7 +629,7 @@ exports[`Footer > snapshot: nav links 1`] = `
629
629
  Accessibility
630
630
  </a>
631
631
  <a
632
- class="css-o22h86"
632
+ class="css-16lix8i"
633
633
  href="https://www.ucl.ac.uk/legal-services/privacy/cookie-policy"
634
634
  rel="noopener noreferrer"
635
635
  target="_blank"
@@ -637,7 +637,7 @@ exports[`Footer > snapshot: nav links 1`] = `
637
637
  Cookies
638
638
  </a>
639
639
  <a
640
- class="css-o22h86"
640
+ class="css-16lix8i"
641
641
  href="https://www.ucl.ac.uk/legal-services/privacy"
642
642
  rel="noopener noreferrer"
643
643
  target="_blank"
@@ -645,7 +645,7 @@ exports[`Footer > snapshot: nav links 1`] = `
645
645
  Privacy
646
646
  </a>
647
647
  <a
648
- class="css-o22h86"
648
+ class="css-16lix8i"
649
649
  href="https://www.ucl.ac.uk/commercial-procurement/modern-day-slavery-statement"
650
650
  rel="noopener noreferrer"
651
651
  target="_blank"
@@ -659,7 +659,7 @@ exports[`Footer > snapshot: nav links 1`] = `
659
659
 
660
660
  exports[`Footer > snapshot: no nav links 1`] = `
661
661
  <footer
662
- class="ucl-uikit-footer css-aro7ng"
662
+ class="ucl-uikit-footer css-mq639a"
663
663
  data-testid="ucl-uikit-footer"
664
664
  >
665
665
  <div
@@ -672,7 +672,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
672
672
  class="css-1h8jsb3"
673
673
  >
674
674
  <svg
675
- class="css-lo1jj5"
675
+ class="css-2wjlk2"
676
676
  fill="currentColor"
677
677
  height="40"
678
678
  viewBox="0 0 157 40"
@@ -691,7 +691,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
691
691
  >
692
692
  <a
693
693
  aria-label="Facebook"
694
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
694
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
695
695
  data-testid="ucl-uikit-footer__social-link"
696
696
  href="https://www.facebook.com/uclofficial/"
697
697
  target="_blank"
@@ -717,7 +717,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
717
717
  </a>
718
718
  <a
719
719
  aria-label="Flickr"
720
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
720
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
721
721
  data-testid="ucl-uikit-footer__social-link"
722
722
  href="https://www.flickr.com/groups/ucl/"
723
723
  target="_blank"
@@ -743,7 +743,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
743
743
  </a>
744
744
  <a
745
745
  aria-label="TikTok"
746
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
746
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
747
747
  data-testid="ucl-uikit-footer__social-link"
748
748
  href="https://www.tiktok.com/@uclofficial"
749
749
  target="_blank"
@@ -769,7 +769,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
769
769
  </a>
770
770
  <a
771
771
  aria-label="YouTube"
772
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
772
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
773
773
  data-testid="ucl-uikit-footer__social-link"
774
774
  href="https://www.youtube.com/ucltv"
775
775
  target="_blank"
@@ -795,7 +795,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
795
795
  </a>
796
796
  <a
797
797
  aria-label="SoundCloud"
798
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
798
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
799
799
  data-testid="ucl-uikit-footer__social-link"
800
800
  href="https://soundcloud.com/uclsound"
801
801
  target="_blank"
@@ -823,7 +823,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
823
823
  </a>
824
824
  <a
825
825
  aria-label="X social media platform"
826
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
826
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
827
827
  data-testid="ucl-uikit-footer__social-link"
828
828
  href="https://x.com/ucl"
829
829
  target="_blank"
@@ -849,7 +849,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
849
849
  </a>
850
850
  <a
851
851
  aria-label="Instagram"
852
- class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-cwywro"
852
+ class="ucl-uikit-base-link ucl-uikit-link ucl-uikit-footer__social-link css-jzc7ug"
853
853
  data-testid="ucl-uikit-footer__social-link"
854
854
  href="https://www.instagram.com/ucl/"
855
855
  target="_blank"
@@ -884,7 +884,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
884
884
  role="separator"
885
885
  />
886
886
  <div
887
- class="css-1qgjvo4"
887
+ class="css-1ah386p"
888
888
  >
889
889
  <span
890
890
  class="css-13yf1i2"
@@ -909,7 +909,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
909
909
  class="css-1k5afze"
910
910
  >
911
911
  <a
912
- class="css-o22h86"
912
+ class="css-16lix8i"
913
913
  href="https://www.ucl.ac.uk/legal-services/disclaimer"
914
914
  rel="noopener noreferrer"
915
915
  target="_blank"
@@ -917,7 +917,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
917
917
  Disclaimer
918
918
  </a>
919
919
  <a
920
- class="css-o22h86"
920
+ class="css-16lix8i"
921
921
  href="https://www.ucl.ac.uk/foi"
922
922
  rel="noopener noreferrer"
923
923
  target="_blank"
@@ -925,7 +925,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
925
925
  Freedom of Information
926
926
  </a>
927
927
  <a
928
- class="css-o22h86"
928
+ class="css-16lix8i"
929
929
  href="https://www.ucl.ac.uk/accessibility"
930
930
  rel="noopener noreferrer"
931
931
  target="_blank"
@@ -933,7 +933,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
933
933
  Accessibility
934
934
  </a>
935
935
  <a
936
- class="css-o22h86"
936
+ class="css-16lix8i"
937
937
  href="https://www.ucl.ac.uk/legal-services/privacy/cookie-policy"
938
938
  rel="noopener noreferrer"
939
939
  target="_blank"
@@ -941,7 +941,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
941
941
  Cookies
942
942
  </a>
943
943
  <a
944
- class="css-o22h86"
944
+ class="css-16lix8i"
945
945
  href="https://www.ucl.ac.uk/legal-services/privacy"
946
946
  rel="noopener noreferrer"
947
947
  target="_blank"
@@ -949,7 +949,7 @@ exports[`Footer > snapshot: no nav links 1`] = `
949
949
  Privacy
950
950
  </a>
951
951
  <a
952
- class="css-o22h86"
952
+ class="css-16lix8i"
953
953
  href="https://www.ucl.ac.uk/commercial-procurement/modern-day-slavery-statement"
954
954
  rel="noopener noreferrer"
955
955
  target="_blank"
@@ -1,9 +1,10 @@
1
1
  import { memo, HTMLAttributes } from 'react';
2
2
  import { css, cx } from '@emotion/css';
3
- import { useTheme } from '../..';
3
+ import { themes, useTheme } from '../../theme';
4
4
  import UclLogo from '../UclLogo/UclLogo';
5
5
  import HeaderMenu from './HeaderMenu';
6
6
  import Link from '../Link';
7
+ import HeaderNew from '../HeaderNew';
7
8
 
8
9
  export const NAME = 'ucl-uikit-header';
9
10
  export const HEADER_DESKTOP_HEIGHT_PX = 72;
@@ -12,17 +13,19 @@ export const DEFAULT_Z_INDEX = 3;
12
13
 
13
14
  export interface HeaderProps extends HTMLAttributes<HTMLElement> {
14
15
  title?: string;
16
+ /** @deprecated Only used by the default-theme legacy Header. */
15
17
  fixed?: boolean;
16
18
  titleAs?: React.ElementType<React.HTMLAttributes<HTMLElement>>;
17
19
  titleClassName?: string;
18
20
  titleProps?: Record<string, unknown>;
19
21
  homeLinkHref?: string;
20
22
  homeLinkProps?: Record<string, unknown>;
23
+ /** @deprecated Use `homeLinkProps={{ 'aria-label': '...' }}` instead. */
21
24
  homeLinkAriaLabel?: string;
22
25
  testId?: string;
23
26
  }
24
27
 
25
- const Header = ({
28
+ const LegacyHeader = ({
26
29
  title,
27
30
  fixed = false,
28
31
  titleAs = 'div',
@@ -40,14 +43,14 @@ const Header = ({
40
43
  const headerTitle = theme.typography.heading.lg.md;
41
44
 
42
45
  const baseStyle = css`
43
- background-color: ${theme.colour.surface.default};
46
+ background-color: ${theme.color.neutral.white};
44
47
  font-synthesis: none;
45
48
  text-rendering: optimizeLegibility;
46
49
  -webkit-font-smoothing: antialiased;
47
50
  -moz-osx-font-smoothing: grayscale;
48
51
  position: relative;
49
- background-color: ${theme.colour.surface.inverseBrandPrimary};
50
- color: ${theme.colour.text.brandInverse};
52
+ background-color: ${theme.color.neutral.grey90};
53
+ color: ${theme.color.text.inverted};
51
54
  display: flex;
52
55
  justify-content: center;
53
56
  align-items: center;
@@ -159,15 +162,77 @@ const Header = ({
159
162
  );
160
163
  };
161
164
 
165
+ const Header = ({
166
+ title,
167
+ titleAs = 'div',
168
+ titleClassName,
169
+ titleProps,
170
+ homeLinkHref,
171
+ homeLinkProps,
172
+ homeLinkAriaLabel,
173
+ testId = NAME,
174
+ className,
175
+ children,
176
+ fixed,
177
+ ...props
178
+ }: HeaderProps) => {
179
+ const [theme] = useTheme();
180
+
181
+ if (theme === themes.default) {
182
+ return (
183
+ <LegacyHeader
184
+ title={title}
185
+ fixed={fixed}
186
+ titleAs={titleAs}
187
+ titleClassName={titleClassName}
188
+ titleProps={titleProps}
189
+ homeLinkHref={homeLinkHref}
190
+ homeLinkProps={homeLinkProps}
191
+ homeLinkAriaLabel={homeLinkAriaLabel}
192
+ testId={testId}
193
+ className={className}
194
+ {...props}
195
+ >
196
+ {children}
197
+ </LegacyHeader>
198
+ );
199
+ }
200
+
201
+ const resolvedHomeLinkProps =
202
+ homeLinkAriaLabel && !homeLinkProps?.['aria-label']
203
+ ? { ...homeLinkProps, 'aria-label': homeLinkAriaLabel }
204
+ : homeLinkProps;
205
+
206
+ return (
207
+ <HeaderNew
208
+ title={title ?? ''}
209
+ titleAs={titleAs}
210
+ titleClassName={titleClassName}
211
+ titleProps={titleProps}
212
+ homeLinkHref={homeLinkHref}
213
+ homeLinkProps={resolvedHomeLinkProps}
214
+ testId={testId}
215
+ className={className}
216
+ {...props}
217
+ >
218
+ {children}
219
+ </HeaderNew>
220
+ );
221
+ };
222
+
162
223
  const MemoAppHeader = memo(Header);
163
224
 
164
225
  export interface IHeaderSubComponents {
165
226
  Menu: typeof HeaderMenu;
227
+ MenuContainer: (typeof HeaderNew)['MenuContainer'];
228
+ Item: (typeof HeaderNew)['Item'];
166
229
  }
167
230
 
168
231
  const HeaderWithSubComponents = MemoAppHeader as typeof MemoAppHeader &
169
232
  IHeaderSubComponents;
170
233
 
171
234
  HeaderWithSubComponents.Menu = HeaderMenu;
235
+ HeaderWithSubComponents.MenuContainer = HeaderNew.MenuContainer;
236
+ HeaderWithSubComponents.Item = HeaderNew.Item;
172
237
 
173
238
  export default HeaderWithSubComponents;
@@ -39,4 +39,54 @@ describe('Header', () => {
39
39
  expect(link).toBeInTheDocument();
40
40
  expect(link.getAttribute('href')).toBe('/');
41
41
  });
42
+
43
+ test('uses the legacy header for the default theme', () => {
44
+ const renderResult = render(
45
+ <ThemeContextProvider>
46
+ <Header title='LIDS'>
47
+ <Header.Menu testId='legacy-header-menu'>Menu</Header.Menu>
48
+ </Header>
49
+ </ThemeContextProvider>
50
+ );
51
+
52
+ expect(screen.getByTestId('legacy-header-menu')).toBeInTheDocument();
53
+ expect(
54
+ renderResult.container.querySelector('.ucl-uikit-header__border')
55
+ ).not.toBeInTheDocument();
56
+ });
57
+
58
+ test('uses the new header for light and dark themes', () => {
59
+ const renderResult = render(
60
+ <ThemeContextProvider theme='light'>
61
+ <Header title='LIDS'>
62
+ <Header.MenuContainer>
63
+ <Header.Item testId='new-header-item'>Item</Header.Item>
64
+ </Header.MenuContainer>
65
+ </Header>
66
+ </ThemeContextProvider>
67
+ );
68
+
69
+ expect(screen.getByTestId('new-header-item')).toHaveClass(
70
+ 'ucl-uikit-header__item'
71
+ );
72
+ expect(
73
+ renderResult.container.querySelector('.ucl-uikit-header__border')
74
+ ).toBeInTheDocument();
75
+ });
76
+
77
+ test('maps the deprecated homeLinkAriaLabel prop to the new header link props', () => {
78
+ render(
79
+ <ThemeContextProvider theme='dark'>
80
+ <Header
81
+ title='LIDS'
82
+ homeLinkHref='/'
83
+ homeLinkAriaLabel='Go home'
84
+ />
85
+ </ThemeContextProvider>
86
+ );
87
+
88
+ const link = screen.getByLabelText('Go home');
89
+ expect(link).toBeInTheDocument();
90
+ expect(link.getAttribute('href')).toBe('/');
91
+ });
42
92
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`Header > snapshot: variant=avatar 1`] = `
4
4
  <header
5
- class="ucl-uikit-header css-ijdzc5"
5
+ class="ucl-uikit-header css-ig7wqy"
6
6
  data-testid="ucl-uikit-header"
7
7
  >
8
8
  <svg
@@ -30,7 +30,7 @@ exports[`Header > snapshot: variant=avatar 1`] = `
30
30
 
31
31
  exports[`Header > snapshot: variant=breadcrumbs 1`] = `
32
32
  <header
33
- class="ucl-uikit-header css-ijdzc5"
33
+ class="ucl-uikit-header css-ig7wqy"
34
34
  data-testid="ucl-uikit-header"
35
35
  >
36
36
  <svg
@@ -17,10 +17,10 @@ const HeaderBottomBreadcrumbs = ({
17
17
  const [theme] = useTheme();
18
18
 
19
19
  const baseStyle = css`
20
- color: ${theme.colour.text.default};
20
+ color: ${theme.color.text.primary};
21
21
  padding: ${theme.padding.p16} 60px;
22
22
  box-sizing: border-box;
23
- border-bottom: 1px solid ${theme.colour.border.subtle};
23
+ border-bottom: 1px solid ${theme.color.neutral.grey15};
24
24
  font-size: ${theme.font.size.f14};
25
25
  `;
26
26