@newjersey/njwds 2.6.0 → 2.6.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newjersey/njwds",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "NJ Web Design Standards",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -2,4 +2,17 @@ label: Banner
2
2
 
3
3
  context:
4
4
  banner:
5
- text: "Official Site of the State of New Jersey"
5
+ # IMPORTANT: when updating banner text, please also update the min-width of
6
+ # the media query for the '.nj-banner__header li' selector in the custom
7
+ # styles SCSS.
8
+ #
9
+ # This media query controls the breakpoint for hiding the gov and lt. gov's
10
+ # names. The intended behavior here is to hide the names before the
11
+ # stateOfNjText wraps to 3 lines.
12
+ #
13
+ # Since the media query's min-width is set based on text length, it has to
14
+ # be updated when the banner text changes in order to keep the same
15
+ # wrapping behavior.
16
+ stateOfNjText: "Official Site of the State of New Jersey"
17
+ governorName: "Governor Phil Murphy"
18
+ ltGovernorName: "Lt. Governor Tahesha Way"
@@ -1,24 +1,34 @@
1
1
  <section class="nj-banner" aria-label="Official government website">
2
- <header class="nj-banner__header">
2
+ <div class="nj-banner__header">
3
3
  <div class="grid-container">
4
4
  <div class="nj-banner__inner">
5
5
  <div class="grid-col-auto">
6
- <img class="nj-banner__header-seal" src="{{ uswds.path }}/img/nj_state_seal.png" alt="NJ flag">
6
+ <img class="nj-banner__header-seal" src="{{ uswds.path }}/img/nj_state_seal.png" alt="NJ flag" />
7
7
  </div>
8
- <div class="grid-col-fill"><a href="https://nj.gov">{{ banner.text }}</a></div>
9
- <div class="grid-col-auto">
10
- <div class="text-white">
11
- <ul>
12
- <li>Governor Phil Murphy &bull; Lt. Governor Tahesha Way</li><li><a
13
- href="https://nj.gov/subscribe/" target="_blank"><svg
14
- class="usa-icon bottom-neg-2px margin-right-05"
15
- aria-hidden="true" focusable="false" role="img">
16
- <use xlink:href="{{ uswds.path }}/img/sprite.svg#mail"></use>
17
- </svg>Get Updates</a></li>
18
- </ul>
19
- </div>
8
+ <div class="grid-col-fill">
9
+ <a href="https://nj.gov">{{ banner.stateOfNjText }}</a>
20
10
  </div>
11
+ <ul class="grid-col-auto display-flex flex-align-center">
12
+ <li>{{ banner.governorName }} &bull; {{ banner.ltGovernorName }}</li>
13
+ <li class="grid-col-auto">
14
+ <a
15
+ class="display-flex flex-align-center"
16
+ href="https://nj.gov/subscribe/"
17
+ target="_blank"
18
+ >
19
+ <svg
20
+ class="usa-icon usa-icon--size-3 nj-banner__mail-icon margin-right-05"
21
+ role="img"
22
+ aria-hidden="true"
23
+ focusable="false"
24
+ >
25
+ <use xlink:href="{{ uswds.path }}/img/sprite.svg#mail" />
26
+ </svg>
27
+ Get Updates
28
+ </a>
29
+ </li>
30
+ </ul>
21
31
  </div>
22
32
  </div>
23
- </header>
33
+ </div>
24
34
  </section>
@@ -43,7 +43,10 @@ i.e.
43
43
  }
44
44
  .nj-banner__header li {
45
45
  display: none;
46
- @include at-media("tablet") {
46
+
47
+ // Set min-width so the names are hidden before the stateOfNjText wraps to
48
+ // 3 lines
49
+ @media (min-width: 43rem) {
47
50
  display: inline;
48
51
  }
49
52
  @include u-margin-right(1);