@internetarchive/ia-topnav 1.3.1-alpha2 → 1.3.1-alpha7
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 +1 -1
- package/src/assets/img/hamburger.js +36 -0
- package/src/assets/img/icons.js +0 -2
- package/src/assets/img/user.js +38 -0
- package/src/primary-nav.js +14 -22
- package/src/styles/desktop-subnav.js +1 -1
- package/src/styles/login-button.js +7 -7
- package/src/styles/media-button.js +5 -5
- package/src/styles/media-menu.js +1 -1
- package/src/styles/nav-search.js +3 -3
- package/src/styles/primary-nav.js +61 -59
- package/src/styles/signed-out-dropdown.js +3 -3
- package/src/styles/user-menu.js +2 -2
- package/test/ia-topnav.test.js +1 -1
- package/test/primary-nav.test.js +1 -1
- package/src/assets/img/icon-hamburger.js +0 -18
package/package.json
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { html, css } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
|
+
import Icon from './icon.js';
|
|
3
|
+
import icons from './icons.js';
|
|
4
|
+
|
|
5
|
+
class HamBurger extends Icon {
|
|
6
|
+
static get styles() {
|
|
7
|
+
return css`
|
|
8
|
+
svg {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
.fill-color {
|
|
12
|
+
fill: var(--activeColor);
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static get closed() {
|
|
18
|
+
return html`
|
|
19
|
+
<svg height="40" viewBox="0 0 40 40" width="40" xmlns="http://www.w3.org/2000/svg" aria-labelledby="hamburgerTitleID hamburgerDescID">
|
|
20
|
+
<title id="hamburgerTitleID">Hamburger icon</title>
|
|
21
|
+
<desc id="hamburgerDescID">An icon used to represent a menu that can be toggled by interacting with this icon.</desc>
|
|
22
|
+
<path d="m30.5 26.5c.8284271 0 1.5.6715729 1.5 1.5s-.6715729 1.5-1.5 1.5h-21c-.82842712 0-1.5-.6715729-1.5-1.5s.67157288-1.5 1.5-1.5zm0-8c.8284271 0 1.5.6715729 1.5 1.5s-.6715729 1.5-1.5 1.5h-21c-.82842712 0-1.5-.6715729-1.5-1.5s.67157288-1.5 1.5-1.5zm0-8c.8284271 0 1.5.6715729 1.5 1.5s-.6715729 1.5-1.5 1.5h-21c-.82842712 0-1.5-.6715729-1.5-1.5s.67157288-1.5 1.5-1.5z" fill="#999" fill-rule="evenodd"/>
|
|
23
|
+
</svg>
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static get opened() {
|
|
28
|
+
return icons.close;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
render() {
|
|
32
|
+
return this.active ? HamBurger.opened : HamBurger.closed;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
customElements.define('icon-hamburger', HamBurger);
|
package/src/assets/img/icons.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import audio from './icon-audio.js';
|
|
2
2
|
import close from './icon-close.js';
|
|
3
|
-
import hamburger from './icon-hamburger.js';
|
|
4
3
|
import donate from './icon-donate.js';
|
|
5
4
|
import ellipses from './icon-ellipses.js';
|
|
6
5
|
import iaLogo from './icon-ia-logo.js';
|
|
@@ -17,7 +16,6 @@ import web from './icon-web.js';
|
|
|
17
16
|
export default {
|
|
18
17
|
audio,
|
|
19
18
|
close,
|
|
20
|
-
hamburger,
|
|
21
19
|
donate,
|
|
22
20
|
ellipses,
|
|
23
21
|
iaLogo,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { html, css } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
|
+
import Icon from './icon.js';
|
|
3
|
+
|
|
4
|
+
class User extends Icon {
|
|
5
|
+
static get styles() {
|
|
6
|
+
return css`
|
|
7
|
+
svg {
|
|
8
|
+
vertical-align: middle;
|
|
9
|
+
width: var(--userIconWidth);
|
|
10
|
+
height: var(--userIconHeight);
|
|
11
|
+
}
|
|
12
|
+
path {
|
|
13
|
+
fill: var(--baseColor);
|
|
14
|
+
}
|
|
15
|
+
.active {
|
|
16
|
+
fill: var(--activeColor);
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
render() {
|
|
22
|
+
return html`
|
|
23
|
+
<svg
|
|
24
|
+
width="40"
|
|
25
|
+
height="40"
|
|
26
|
+
viewBox="0 0 40 40"
|
|
27
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
28
|
+
aria-labelledby="userTitleID userDescID"
|
|
29
|
+
>
|
|
30
|
+
<title id="userTitleID">User icon</title>
|
|
31
|
+
<desc id="userDescID">An illustration of a person's head and chest.</desc>
|
|
32
|
+
<path class="${this.active ? 'active' : ''}" d="m20.7130435 18.0434783c-3.5658385 0-6.4565218-2.9198821-6.4565218-6.5217392 0-3.60185703 2.8906833-6.5217391 6.4565218-6.5217391s6.4565217 2.91988207 6.4565217 6.5217391c0 3.6018571-2.8906832 6.5217392-6.4565217 6.5217392zm-12.9130435 16.9565217c0-7.9240855 5.7813665-14.3478261 12.9130435-14.3478261s12.9130435 6.4237406 12.9130435 14.3478261z" fill-rule="evenodd"/>
|
|
33
|
+
</svg>
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
customElements.define('user-image', User);
|
package/src/primary-nav.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { html, nothing } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
2
|
import TrackedElement from './tracked-element.js';
|
|
3
3
|
import icons from './assets/img/icons.js';
|
|
4
|
+
import './assets/img/hamburger.js';
|
|
4
5
|
import './login-button.js';
|
|
5
6
|
import './nav-search.js';
|
|
6
7
|
import './media-menu.js';
|
|
@@ -123,7 +124,7 @@ class PrimaryNav extends TrackedElement {
|
|
|
123
124
|
|
|
124
125
|
return html`
|
|
125
126
|
<button
|
|
126
|
-
class="
|
|
127
|
+
class="search-trigger"
|
|
127
128
|
@click="${this.toggleSearchMenu}"
|
|
128
129
|
data-event-click-tracking="${this.config.eventCategory}|NavSearchOpen"
|
|
129
130
|
>
|
|
@@ -144,25 +145,14 @@ class PrimaryNav extends TrackedElement {
|
|
|
144
145
|
get mobileDonateHeart() {
|
|
145
146
|
return html`
|
|
146
147
|
<a class="mobile-donate-link" href=${formatUrl('/donate/?origin=iawww-mbhrt', this.baseHost)}>
|
|
148
|
+
<span class="icon">
|
|
147
149
|
${icons.donate}
|
|
148
|
-
|
|
150
|
+
</span>
|
|
151
|
+
<span class="label">"Donate to the archive"</span>
|
|
149
152
|
</a>
|
|
150
153
|
`;
|
|
151
154
|
}
|
|
152
155
|
|
|
153
|
-
get uploadButtonTemplate() {
|
|
154
|
-
return html`<a href="${formatUrl('/create', this.baseHost)}" class="upload">
|
|
155
|
-
${icons.upload}
|
|
156
|
-
<span>Upload</span>
|
|
157
|
-
</a>`;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
get userStateTemplate() {
|
|
161
|
-
return html`<div class="user-info">
|
|
162
|
-
${this.username ? this.userIcon : this.loginIcon}
|
|
163
|
-
</div>`;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
156
|
get secondLogoSlot() {
|
|
167
157
|
return this.allowSecondaryIcon
|
|
168
158
|
? html`
|
|
@@ -191,12 +181,14 @@ class PrimaryNav extends TrackedElement {
|
|
|
191
181
|
>
|
|
192
182
|
${this.secondLogoSlot}
|
|
193
183
|
</div>
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
${
|
|
198
|
-
|
|
199
|
-
|
|
184
|
+
${this.mobileDonateHeart}
|
|
185
|
+
${this.searchMenu}
|
|
186
|
+
<a href="${formatUrl('/create', this.baseHost)}" class="upload">
|
|
187
|
+
${icons.upload}
|
|
188
|
+
<span>Upload</span>
|
|
189
|
+
</a>
|
|
190
|
+
<div class="user-info">
|
|
191
|
+
${this.username ? this.userIcon : this.loginIcon}
|
|
200
192
|
</div>
|
|
201
193
|
<media-menu
|
|
202
194
|
.baseHost=${this.baseHost}
|
|
@@ -213,7 +205,7 @@ class PrimaryNav extends TrackedElement {
|
|
|
213
205
|
data-event-click-tracking="${this.config.eventCategory}|NavHamburger"
|
|
214
206
|
title="Open main menu"
|
|
215
207
|
>
|
|
216
|
-
|
|
208
|
+
<icon-hamburger ?active=${this.openMenu === 'media'}></icon-hamburger>
|
|
217
209
|
</button>
|
|
218
210
|
</nav>
|
|
219
211
|
`;
|
|
@@ -4,16 +4,13 @@ export default css`
|
|
|
4
4
|
.dropdown-toggle {
|
|
5
5
|
display: block;
|
|
6
6
|
height: 4rem;
|
|
7
|
+
font-size: 1.6rem;
|
|
7
8
|
text-transform: uppercase;
|
|
9
|
+
text-decoration: none;
|
|
8
10
|
color: var(--grey80);
|
|
9
11
|
cursor: pointer;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
.dropdown-toggle svg {
|
|
13
|
-
height: 4rem;
|
|
14
|
-
width: 4rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
14
|
.dropdown-toggle .fill-color {
|
|
18
15
|
fill: var(--iconFill);
|
|
19
16
|
}
|
|
@@ -23,6 +20,10 @@ export default css`
|
|
|
23
20
|
.dropdown-toggle:hover .fill-color {
|
|
24
21
|
fill: var(--linkHoverColor);
|
|
25
22
|
}
|
|
23
|
+
.dropdown-toggle svg {
|
|
24
|
+
height: 4rem;
|
|
25
|
+
width: 4rem;
|
|
26
|
+
}
|
|
26
27
|
|
|
27
28
|
.active {
|
|
28
29
|
border-radius: 1rem 1rem 0 0;
|
|
@@ -53,7 +54,7 @@ export default css`
|
|
|
53
54
|
|
|
54
55
|
@media (min-width: 890px) {
|
|
55
56
|
.logged-out-toolbar {
|
|
56
|
-
|
|
57
|
+
transform: translateY(-.5rem);
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
.active {
|
|
@@ -64,7 +65,6 @@ export default css`
|
|
|
64
65
|
display: inline-block;
|
|
65
66
|
vertical-align: middle;
|
|
66
67
|
}
|
|
67
|
-
|
|
68
68
|
span {
|
|
69
69
|
display: inline;
|
|
70
70
|
vertical-align: middle;
|
|
@@ -41,10 +41,9 @@ export default css`
|
|
|
41
41
|
-ms-flex-pack: center;
|
|
42
42
|
justify-content: center;
|
|
43
43
|
}
|
|
44
|
-
|
|
45
44
|
.menu-item > .icon > svg {
|
|
46
|
-
height: 4rem;
|
|
47
|
-
width: 4rem;
|
|
45
|
+
height: 4rem;
|
|
46
|
+
width: 4rem;
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
.menu-item.selected .icon {
|
|
@@ -64,7 +63,7 @@ export default css`
|
|
|
64
63
|
fill: #f00;
|
|
65
64
|
}
|
|
66
65
|
|
|
67
|
-
@media (min-width:
|
|
66
|
+
@media (min-width: 890px) {
|
|
68
67
|
.menu-item {
|
|
69
68
|
width: auto;
|
|
70
69
|
height: 5rem;
|
|
@@ -94,6 +93,7 @@ export default css`
|
|
|
94
93
|
color: inherit;
|
|
95
94
|
}
|
|
96
95
|
|
|
96
|
+
|
|
97
97
|
.web:after {
|
|
98
98
|
display: none;
|
|
99
99
|
content: "web";
|
|
@@ -142,7 +142,7 @@ export default css`
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
@media (min-width:
|
|
145
|
+
@media (min-width: 1300px) {
|
|
146
146
|
.label,
|
|
147
147
|
.web:after {
|
|
148
148
|
display: inline;
|
package/src/styles/media-menu.js
CHANGED
package/src/styles/nav-search.js
CHANGED
|
@@ -95,8 +95,8 @@ export default css`
|
|
|
95
95
|
@media (min-width: 890px) {
|
|
96
96
|
.search svg {
|
|
97
97
|
display: inline;
|
|
98
|
-
width:
|
|
99
|
-
height:
|
|
98
|
+
width: 28px;
|
|
99
|
+
height: 28px;
|
|
100
100
|
vertical-align: -14px;
|
|
101
101
|
}
|
|
102
102
|
.search path {
|
|
@@ -107,7 +107,7 @@ export default css`
|
|
|
107
107
|
.search-activated {
|
|
108
108
|
display: block;
|
|
109
109
|
position: static;
|
|
110
|
-
padding: 1.
|
|
110
|
+
padding: 1.2rem 0.2rem;
|
|
111
111
|
background: transparent;
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -11,10 +11,10 @@ export default css`
|
|
|
11
11
|
position: relative;
|
|
12
12
|
display: -ms-grid;
|
|
13
13
|
display: grid;
|
|
14
|
-
height:
|
|
14
|
+
height: 40px;
|
|
15
15
|
grid-template-areas: 'hamburger empty heart search user';
|
|
16
|
-
-ms-grid-columns:
|
|
17
|
-
grid-template-columns:
|
|
16
|
+
-ms-grid-columns: 40px minmax(1rem, 100%) 40px 40px 40px;
|
|
17
|
+
grid-template-columns: 40px auto 40px 40px 40px;
|
|
18
18
|
-ms-grid-rows: 100%;
|
|
19
19
|
grid-template-rows: 100%;
|
|
20
20
|
background: var(--primaryNavBg);
|
|
@@ -23,15 +23,10 @@ export default css`
|
|
|
23
23
|
|
|
24
24
|
nav.hide-search {
|
|
25
25
|
grid-template-areas: 'hamburger empty heart user';
|
|
26
|
-
-ms-grid-columns:
|
|
27
|
-
grid-template-columns:
|
|
26
|
+
-ms-grid-columns: 40px minmax(1rem, 100%) 40px 40px;
|
|
27
|
+
grid-template-columns: 40px auto 40px 40px;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.right-side-section {
|
|
31
|
-
display: flex;
|
|
32
|
-
user-select: none;
|
|
33
|
-
align-items: center;
|
|
34
|
-
}
|
|
35
30
|
button {
|
|
36
31
|
background: none;
|
|
37
32
|
color: inherit;
|
|
@@ -61,17 +56,16 @@ export default css`
|
|
|
61
56
|
grid-column-end: user-end;
|
|
62
57
|
}
|
|
63
58
|
|
|
64
|
-
.ia-logo
|
|
65
|
-
height: 3rem;
|
|
66
|
-
width: 3rem;
|
|
67
|
-
}
|
|
59
|
+
.ia-logo,
|
|
68
60
|
.ia-wordmark {
|
|
61
|
+
margin-right: 5px;
|
|
69
62
|
height: 3rem;
|
|
70
|
-
width: 9.5rem;
|
|
71
63
|
}
|
|
72
|
-
.ia-logo
|
|
64
|
+
.ia-logo {
|
|
65
|
+
width: 2.7rem;
|
|
66
|
+
}
|
|
73
67
|
.ia-wordmark {
|
|
74
|
-
|
|
68
|
+
width: 9.5rem;
|
|
75
69
|
}
|
|
76
70
|
|
|
77
71
|
.hamburger {
|
|
@@ -80,39 +74,55 @@ export default css`
|
|
|
80
74
|
grid-area: hamburger;
|
|
81
75
|
padding: 0;
|
|
82
76
|
}
|
|
83
|
-
.hamburger svg {
|
|
84
|
-
height: 4rem;
|
|
85
|
-
width: 4rem;
|
|
86
|
-
fill: var(--activeColor);
|
|
87
|
-
}
|
|
88
77
|
|
|
78
|
+
.mobile-donate-link {
|
|
79
|
+
-ms-grid-row: 1;
|
|
80
|
+
-ms-grid-column: 3;
|
|
81
|
+
grid-area: heart;
|
|
82
|
+
position: relative;
|
|
83
|
+
padding: 0;
|
|
84
|
+
z-index: 1;
|
|
85
|
+
width: 100%;
|
|
86
|
+
text-align: right;
|
|
87
|
+
-webkit-box-align: center;
|
|
88
|
+
-ms-flex-align: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
}
|
|
89
91
|
.mobile-donate-link svg {
|
|
90
|
-
height:
|
|
91
|
-
width:
|
|
92
|
+
height: 50px;
|
|
93
|
+
width: 50px;
|
|
94
|
+
margin-top: -5px;
|
|
95
|
+
margin-left: -5px;
|
|
92
96
|
}
|
|
93
97
|
.mobile-donate-link .fill-color {
|
|
94
98
|
fill: rgb(255, 0, 0);
|
|
95
99
|
}
|
|
96
|
-
|
|
97
|
-
.sr-only {
|
|
100
|
+
.mobile-donate-link .label {
|
|
98
101
|
position: absolute;
|
|
99
102
|
width: 1px;
|
|
100
103
|
height: 1px;
|
|
101
|
-
margin: -1px;
|
|
102
104
|
padding: 0;
|
|
103
|
-
|
|
105
|
+
margin: -1px;
|
|
104
106
|
overflow: hidden;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
-webkit-clip-path: inset(50%);
|
|
108
|
-
clip-path: inset(50%);
|
|
109
|
-
user-select: none;
|
|
107
|
+
clip: rect(0,0,0,0);
|
|
108
|
+
border: 0;
|
|
110
109
|
}
|
|
111
110
|
|
|
112
|
-
.
|
|
111
|
+
.search-trigger {
|
|
112
|
+
-ms-grid-row: 1;
|
|
113
|
+
-ms-grid-column: 4;
|
|
114
|
+
grid-area: search;
|
|
115
|
+
position: relative;
|
|
113
116
|
padding: 0;
|
|
117
|
+
z-index: 1;
|
|
118
|
+
width: 100%;
|
|
119
|
+
text-align: right;
|
|
120
|
+
-webkit-box-align: center;
|
|
121
|
+
-ms-flex-align: center;
|
|
122
|
+
align-items: center;
|
|
114
123
|
}
|
|
115
|
-
|
|
124
|
+
|
|
125
|
+
.search-trigger .fill-color {
|
|
116
126
|
fill: var(--iconFill);
|
|
117
127
|
}
|
|
118
128
|
|
|
@@ -129,21 +139,25 @@ export default css`
|
|
|
129
139
|
display: none;
|
|
130
140
|
}
|
|
131
141
|
|
|
132
|
-
.
|
|
133
|
-
|
|
134
|
-
|
|
142
|
+
.user-info {
|
|
143
|
+
-ms-grid-row: 1;
|
|
144
|
+
-ms-grid-column: 5;
|
|
145
|
+
grid-area: user;
|
|
146
|
+
-ms-grid-row-align: stretch;
|
|
147
|
+
align-self: stretch;
|
|
148
|
+
-ms-grid-column-align: end;
|
|
149
|
+
justify-self: end;
|
|
135
150
|
}
|
|
136
151
|
|
|
137
152
|
.screen-name {
|
|
138
153
|
display: none;
|
|
139
|
-
font-size: 1.
|
|
154
|
+
font-size: 1.4rem;
|
|
140
155
|
vertical-align: middle;
|
|
141
156
|
text-transform: uppercase;
|
|
142
157
|
}
|
|
143
158
|
|
|
144
159
|
.user-menu {
|
|
145
160
|
color: var(--lightTextColor);
|
|
146
|
-
padding: 0.5rem;
|
|
147
161
|
}
|
|
148
162
|
|
|
149
163
|
.user-menu:hover {
|
|
@@ -186,12 +200,8 @@ export default css`
|
|
|
186
200
|
|
|
187
201
|
@media (min-width: 890px) {
|
|
188
202
|
:host {
|
|
189
|
-
--userIconWidth:
|
|
190
|
-
--userIconHeight:
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.right-side-section {
|
|
194
|
-
display: contents;
|
|
203
|
+
--userIconWidth: 32px;
|
|
204
|
+
--userIconHeight: 32px;
|
|
195
205
|
}
|
|
196
206
|
|
|
197
207
|
nav {
|
|
@@ -215,23 +225,14 @@ export default css`
|
|
|
215
225
|
}
|
|
216
226
|
|
|
217
227
|
.hamburger,
|
|
218
|
-
.
|
|
228
|
+
.search-trigger,
|
|
219
229
|
.mobile-donate-link {
|
|
220
230
|
display: none;
|
|
221
231
|
}
|
|
222
232
|
|
|
223
233
|
.user-info {
|
|
224
234
|
float: right;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
.user-info .user-menu img {
|
|
228
|
-
height: 3rem;
|
|
229
|
-
width: 3rem;
|
|
230
|
-
margin-right: 0.5rem;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.user-menu {
|
|
234
|
-
padding: 1rem;
|
|
235
|
+
margin-top: 1rem;
|
|
235
236
|
}
|
|
236
237
|
|
|
237
238
|
.user-menu.active {
|
|
@@ -241,13 +242,12 @@ export default css`
|
|
|
241
242
|
.user-menu img {
|
|
242
243
|
display: inline-block;
|
|
243
244
|
vertical-align: middle;
|
|
244
|
-
margin-right: 0.5rem;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
.upload {
|
|
248
248
|
display: block;
|
|
249
|
-
padding: 1rem 0.5rem;
|
|
250
249
|
float: right;
|
|
250
|
+
margin-top: 1rem;
|
|
251
251
|
font-size: 1.4rem;
|
|
252
252
|
text-transform: uppercase;
|
|
253
253
|
text-decoration: none;
|
|
@@ -260,6 +260,8 @@ export default css`
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
.upload svg {
|
|
263
|
+
width: 3.2rem;
|
|
264
|
+
height: 3.2rem;
|
|
263
265
|
vertical-align: middle;
|
|
264
266
|
fill: var(--iconFill);
|
|
265
267
|
}
|
|
@@ -5,7 +5,7 @@ export default css`
|
|
|
5
5
|
.initial,
|
|
6
6
|
.closed,
|
|
7
7
|
.open {
|
|
8
|
-
right:
|
|
8
|
+
right: 34rem;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.search-hidden.initial,
|
|
@@ -19,13 +19,13 @@ export default css`
|
|
|
19
19
|
.initial,
|
|
20
20
|
.closed,
|
|
21
21
|
.open {
|
|
22
|
-
right:
|
|
22
|
+
right: 40rem;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.search-hidden.initial,
|
|
26
26
|
.search-hidden.closed,
|
|
27
27
|
.search-hidden.open {
|
|
28
|
-
right:
|
|
28
|
+
right: 24.5rem;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
`;
|
package/src/styles/user-menu.js
CHANGED
|
@@ -5,7 +5,7 @@ export default css`
|
|
|
5
5
|
.initial,
|
|
6
6
|
.closed,
|
|
7
7
|
.open {
|
|
8
|
-
right:
|
|
8
|
+
right: 21.3rem;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.search-hidden.initial,
|
|
@@ -19,7 +19,7 @@ export default css`
|
|
|
19
19
|
.initial,
|
|
20
20
|
.closed,
|
|
21
21
|
.open {
|
|
22
|
-
right: 27.
|
|
22
|
+
right: 27.5rem;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.search-hidden.initial,
|
package/test/ia-topnav.test.js
CHANGED
|
@@ -198,7 +198,7 @@ describe('<ia-topnav>', () => {
|
|
|
198
198
|
|
|
199
199
|
it('toggles search menu when search toggle button clicked', async () => {
|
|
200
200
|
const el = await fixture(container());
|
|
201
|
-
el.shadowRoot.querySelector('primary-nav').shadowRoot.querySelector('.
|
|
201
|
+
el.shadowRoot.querySelector('primary-nav').shadowRoot.querySelector('.search-trigger').click();
|
|
202
202
|
await el.updateComplete;
|
|
203
203
|
|
|
204
204
|
expect(el.openMenu).to.equal('search');
|
package/test/primary-nav.test.js
CHANGED
|
@@ -40,7 +40,7 @@ describe('<primary-nav>', () => {
|
|
|
40
40
|
hideSearch: true,
|
|
41
41
|
}));
|
|
42
42
|
|
|
43
|
-
expect(el.shadowRoot.querySelector('.
|
|
43
|
+
expect(el.shadowRoot.querySelector('.search-trigger')).to.equal(null);
|
|
44
44
|
expect(el.shadowRoot.querySelector('nav-search')).to.equal(null);
|
|
45
45
|
});
|
|
46
46
|
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { html } from 'https://offshoot.prod.archive.org/lit.js';
|
|
2
|
-
|
|
3
|
-
export default html`
|
|
4
|
-
<svg
|
|
5
|
-
viewBox="0 0 40 40"
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
aria-labelledby="hamburgerTitleID"
|
|
8
|
-
>
|
|
9
|
-
<title id="hamburgerTitleID">Hamburger icon</title>
|
|
10
|
-
<path
|
|
11
|
-
d="m30.5 26.5c.8284271 0 1.5.6715729 1.5 1.5s-.6715729 1.5-1.5 1.5h-21c-.82842712 0-1.5-.6715729-1.5-1.5s.67157288-1.5 1.5-1.5zm0-8c.8284271 0 1.5.6715729 1.5 1.5s-.6715729 1.5-1.5 1.5h-21c-.82842712 0-1.5-.6715729-1.5-1.5s.67157288-1.5 1.5-1.5zm0-8c.8284271 0 1.5.6715729 1.5 1.5s-.6715729 1.5-1.5 1.5h-21c-.82842712 0-1.5-.6715729-1.5-1.5s.67157288-1.5 1.5-1.5z"
|
|
12
|
-
fill="#999"
|
|
13
|
-
fill-rule="evenodd"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
|