@internetarchive/ia-topnav 2.0.1 → 2.1.0-alpha-webdev8170.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.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/src/dropdown-menu.js +26 -26
- package/dist/src/dropdown-menu.js.map +1 -1
- package/dist/src/ia-topnav.js +66 -66
- package/dist/src/ia-topnav.js.map +1 -1
- package/dist/src/login-button.js +17 -17
- package/dist/src/login-button.js.map +1 -1
- package/dist/src/models.d.ts +9 -0
- package/dist/src/models.js +9 -1
- package/dist/src/models.js.map +1 -1
- package/dist/src/primary-nav.js +89 -89
- package/dist/src/primary-nav.js.map +1 -1
- package/dist/src/signed-out-dropdown.js.map +1 -1
- package/dist/src/styles/base.js +2 -1
- package/dist/src/styles/base.js.map +1 -1
- package/dist/src/styles/dropdown-menu.js +170 -169
- package/dist/src/styles/dropdown-menu.js.map +1 -1
- package/dist/src/styles/ia-topnav.js +2 -1
- package/dist/src/styles/ia-topnav.js.map +1 -1
- package/dist/src/styles/login-button.js +2 -1
- package/dist/src/styles/login-button.js.map +1 -1
- package/dist/src/styles/media-button.js +2 -1
- package/dist/src/styles/media-button.js.map +1 -1
- package/dist/src/styles/media-menu.js +3 -2
- package/dist/src/styles/media-menu.js.map +1 -1
- package/dist/src/styles/media-slider.js +3 -2
- package/dist/src/styles/media-slider.js.map +1 -1
- package/dist/src/styles/media-subnav.js +2 -1
- package/dist/src/styles/media-subnav.js.map +1 -1
- package/dist/src/styles/primary-nav.js +4 -3
- package/dist/src/styles/primary-nav.js.map +1 -1
- package/dist/src/styles/save-page-form.js +2 -1
- package/dist/src/styles/save-page-form.js.map +1 -1
- package/dist/src/styles/wayback-search.js +2 -1
- package/dist/src/styles/wayback-search.js.map +1 -1
- package/dist/src/styles/wayback-slider.js +2 -1
- package/dist/src/styles/wayback-slider.js.map +1 -1
- package/dist/src/user-menu.js +13 -13
- package/dist/src/user-menu.js.map +1 -1
- package/index.ts +2 -2
- package/package.json +1 -1
- package/src/dropdown-menu.ts +132 -132
- package/src/ia-topnav.ts +332 -332
- package/src/login-button.ts +89 -89
- package/src/models.ts +10 -0
- package/src/primary-nav.ts +300 -300
- package/src/signed-out-dropdown.ts +11 -11
- package/src/styles/base.ts +2 -1
- package/src/styles/dropdown-menu.ts +173 -172
- package/src/styles/ia-topnav.ts +2 -1
- package/src/styles/login-button.ts +2 -1
- package/src/styles/media-button.ts +2 -1
- package/src/styles/media-menu.ts +3 -2
- package/src/styles/media-slider.ts +3 -2
- package/src/styles/media-subnav.ts +2 -1
- package/src/styles/primary-nav.ts +4 -3
- package/src/styles/save-page-form.ts +2 -1
- package/src/styles/wayback-search.ts +2 -1
- package/src/styles/wayback-slider.ts +2 -1
- package/src/user-menu.ts +31 -31
|
@@ -1,172 +1,173 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
transition-
|
|
17
|
-
transition-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
font-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
border-
|
|
119
|
-
border-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
a:
|
|
151
|
-
a:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
3
|
+
|
|
4
|
+
export default css`
|
|
5
|
+
.nav-container {
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
nav {
|
|
10
|
+
position: absolute;
|
|
11
|
+
right: 0;
|
|
12
|
+
z-index: 4;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
font-size: 1.6rem;
|
|
15
|
+
background-color: var(--dropdownMenuBg);
|
|
16
|
+
transition-property: top;
|
|
17
|
+
transition-duration: 0.2s;
|
|
18
|
+
transition-timing-function: ease;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.initial,
|
|
22
|
+
.closed {
|
|
23
|
+
top: var(--topOffset, -1500px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.closed {
|
|
27
|
+
transition-duration: 0.5s;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.open {
|
|
31
|
+
max-width: 100vw;
|
|
32
|
+
overflow: auto;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
h3 {
|
|
36
|
+
padding: 0.6rem 2rem;
|
|
37
|
+
margin: 0;
|
|
38
|
+
font-size: inherit;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
text-overflow: ellipsis;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ul {
|
|
44
|
+
padding: 0.4rem 0 0.7rem 0;
|
|
45
|
+
margin: 0;
|
|
46
|
+
list-style: none;
|
|
47
|
+
/* viewport height - nav height + bottom nav border */
|
|
48
|
+
max-height: calc(100vh - 7.2rem + 1px);
|
|
49
|
+
overflow: auto;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.divider {
|
|
54
|
+
margin: 0.5rem 0;
|
|
55
|
+
border-bottom: 1px solid var(--dropdownMenuDivider);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
a,
|
|
59
|
+
.info-item {
|
|
60
|
+
display: block;
|
|
61
|
+
color: var(--primaryTextColor);
|
|
62
|
+
text-decoration: none;
|
|
63
|
+
padding: 1rem 2rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.info-item {
|
|
67
|
+
font-size: 0.8em;
|
|
68
|
+
color: var(--dropdownMenuInfoItem);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.callout {
|
|
72
|
+
position: absolute;
|
|
73
|
+
margin-left: 10px;
|
|
74
|
+
padding: 0 5px;
|
|
75
|
+
border-radius: 2px;
|
|
76
|
+
background: #fee257;
|
|
77
|
+
color: #2c2c2c;
|
|
78
|
+
font-size: 1.4rem;
|
|
79
|
+
font-weight: bold;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
a.mobile-upload {
|
|
83
|
+
display: flex;
|
|
84
|
+
justify-content: left;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
a.mobile-upload svg {
|
|
88
|
+
fill: var(--white);
|
|
89
|
+
margin-right: 1rem;
|
|
90
|
+
height: 1.4rem;
|
|
91
|
+
width: 1.4rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
95
|
+
nav {
|
|
96
|
+
display: flex;
|
|
97
|
+
overflow: visible;
|
|
98
|
+
top: 0;
|
|
99
|
+
left: auto;
|
|
100
|
+
right: var(--dropdownMenuRight, 0);
|
|
101
|
+
z-index: 5;
|
|
102
|
+
transition: opacity 0.2s ease-in-out;
|
|
103
|
+
font-size: 1.4rem;
|
|
104
|
+
border-radius: 2px;
|
|
105
|
+
background: var(--primaryTextColor);
|
|
106
|
+
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.15);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
nav:after {
|
|
110
|
+
position: absolute;
|
|
111
|
+
right: 7px;
|
|
112
|
+
top: -7px;
|
|
113
|
+
width: 12px;
|
|
114
|
+
height: 7px;
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
color: var(--white);
|
|
117
|
+
content: '';
|
|
118
|
+
border-bottom: 7px solid currentColor;
|
|
119
|
+
border-left: 6px solid transparent;
|
|
120
|
+
border-right: 6px solid transparent;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
h3 {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
ul {
|
|
128
|
+
/* viewport height - nav height + bottom nav border */
|
|
129
|
+
max-height: calc(100vh - 8.5rem + 1px);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.divider {
|
|
133
|
+
border-bottom-color: var(--dropdownMenuDivider);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
a {
|
|
137
|
+
padding: 0.5rem 2rem;
|
|
138
|
+
color: var(--inverseTextColor);
|
|
139
|
+
transition:
|
|
140
|
+
background 0.1s ease-out,
|
|
141
|
+
color 0.1s ease-out;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.info-item {
|
|
145
|
+
padding: 0.5rem 2rem;
|
|
146
|
+
font-size: 0.8em;
|
|
147
|
+
color: var(--inverseDropdownMenuInfoItem);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
a:hover,
|
|
151
|
+
a:active,
|
|
152
|
+
a:focus {
|
|
153
|
+
color: var(--linkHoverColor);
|
|
154
|
+
background: var(--linkColor);
|
|
155
|
+
outline: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.initial,
|
|
159
|
+
.closed {
|
|
160
|
+
opacity: 0;
|
|
161
|
+
transition-duration: 0.2s;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.open {
|
|
165
|
+
opacity: 1;
|
|
166
|
+
overflow: visible;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
a.mobile-upload {
|
|
170
|
+
display: none;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
`;
|
package/src/styles/ia-topnav.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
4
5
|
:host {
|
|
@@ -77,7 +78,7 @@ export default css`
|
|
|
77
78
|
z-index: 4;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
@media (max-width:
|
|
81
|
+
@media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
|
|
81
82
|
desktop-subnav {
|
|
82
83
|
display: none;
|
|
83
84
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
4
5
|
.logged-out-menu {
|
|
@@ -61,7 +62,7 @@ export default css`
|
|
|
61
62
|
outline-offset: inherit !important;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
@media (min-width:
|
|
65
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
65
66
|
.logged-out-toolbar {
|
|
66
67
|
padding: 1rem 0.5rem;
|
|
67
68
|
vertical-align: middle;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
4
5
|
a {
|
|
@@ -64,7 +65,7 @@ export default css`
|
|
|
64
65
|
fill: #f00;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
@media (min-width:
|
|
68
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
68
69
|
.menu-item {
|
|
69
70
|
width: auto;
|
|
70
71
|
height: 5rem;
|
package/src/styles/media-menu.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
4
5
|
:host {
|
|
@@ -22,7 +23,7 @@ export default css`
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
/* Mobile view styles */
|
|
25
|
-
@media (max-width:
|
|
26
|
+
@media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
|
|
26
27
|
.media-menu-inner {
|
|
27
28
|
position: absolute;
|
|
28
29
|
width: 100%;
|
|
@@ -50,7 +51,7 @@ export default css`
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
/* Desktop view styles */
|
|
53
|
-
@media (min-width:
|
|
54
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
54
55
|
.media-menu-inner {
|
|
55
56
|
display: block;
|
|
56
57
|
position: static;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
4
5
|
.media-slider-container {
|
|
@@ -40,7 +41,7 @@ export default css`
|
|
|
40
41
|
padding: 1rem;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
@media (max-width:
|
|
44
|
+
@media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
|
|
44
45
|
.overflow-clip.open {
|
|
45
46
|
display: block;
|
|
46
47
|
height: 35.8rem;
|
|
@@ -49,7 +50,7 @@ export default css`
|
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
@media (min-width:
|
|
53
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
53
54
|
.overflow-clip {
|
|
54
55
|
display: block;
|
|
55
56
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
import { subnavListCSS } from './base';
|
|
3
4
|
|
|
4
5
|
export default [
|
|
@@ -45,7 +46,7 @@ export default [
|
|
|
45
46
|
display: none;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
@media (min-width:
|
|
49
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
49
50
|
:host {
|
|
50
51
|
display: -ms-grid;
|
|
51
52
|
display: grid;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
4
5
|
button:focus,
|
|
@@ -211,7 +212,7 @@ export default css`
|
|
|
211
212
|
outline-offset: 1px;
|
|
212
213
|
}
|
|
213
214
|
|
|
214
|
-
@media only screen and (min-width:
|
|
215
|
+
@media only screen and (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) and (max-device-width: 905px) {
|
|
215
216
|
.branding.second-logo {
|
|
216
217
|
padding-right: 0;
|
|
217
218
|
}
|
|
@@ -223,7 +224,7 @@ export default css`
|
|
|
223
224
|
}
|
|
224
225
|
}
|
|
225
226
|
|
|
226
|
-
@media (max-width:
|
|
227
|
+
@media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
|
|
227
228
|
slot[name='opt-sec-logo'] {
|
|
228
229
|
display: none;
|
|
229
230
|
}
|
|
@@ -236,7 +237,7 @@ export default css`
|
|
|
236
237
|
}
|
|
237
238
|
}
|
|
238
239
|
|
|
239
|
-
@media (min-width:
|
|
240
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
240
241
|
:host {
|
|
241
242
|
--userIconWidth: 3.2rem;
|
|
242
243
|
--userIconHeight: 3.2rem;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
4
5
|
div {
|
|
@@ -45,7 +46,7 @@ export default css`
|
|
|
45
46
|
display: block;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
@media (min-width:
|
|
49
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
49
50
|
h3 {
|
|
50
51
|
margin-top: 0;
|
|
51
52
|
font: normal 100 1.6rem var(--themeFontFamily);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
|
|
3
4
|
export default css`
|
|
4
5
|
form {
|
|
@@ -34,7 +35,7 @@ export default css`
|
|
|
34
35
|
transform: translateY(-50%);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
@media (min-width:
|
|
38
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
38
39
|
fieldset a,
|
|
39
40
|
.search-field {
|
|
40
41
|
display: block;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
import { subnavListCSS } from './base';
|
|
3
4
|
|
|
4
5
|
export default [
|
|
5
6
|
subnavListCSS,
|
|
6
7
|
css`
|
|
7
|
-
@media (min-width:
|
|
8
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
8
9
|
:host {
|
|
9
10
|
display: block;
|
|
10
11
|
grid-column: 1 / 4;
|
package/src/user-menu.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { CSSResultGroup, html } from 'lit';
|
|
2
|
-
import DropdownMenu from './dropdown-menu';
|
|
3
|
-
import dropdownStyles from './styles/dropdown-menu';
|
|
4
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
5
|
-
|
|
6
|
-
@customElement('user-menu')
|
|
7
|
-
export default class UserMenu extends DropdownMenu {
|
|
8
|
-
@property({ type: String }) username = '';
|
|
9
|
-
@property({ type: String }) screenName = '';
|
|
10
|
-
|
|
11
|
-
static get styles(): CSSResultGroup {
|
|
12
|
-
return dropdownStyles;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
render() {
|
|
16
|
-
return html`
|
|
17
|
-
<div class="nav-container">
|
|
18
|
-
<nav
|
|
19
|
-
class="${this.menuClass}"
|
|
20
|
-
aria-hidden=${!this.open}
|
|
21
|
-
aria-expanded=${this.open}
|
|
22
|
-
>
|
|
23
|
-
<h3>${this.screenName}</h3>
|
|
24
|
-
<ul>
|
|
25
|
-
${this.dropdownItems}
|
|
26
|
-
</ul>
|
|
27
|
-
</nav>
|
|
28
|
-
</div>
|
|
29
|
-
`;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
import { CSSResultGroup, html } from 'lit';
|
|
2
|
+
import DropdownMenu from './dropdown-menu';
|
|
3
|
+
import dropdownStyles from './styles/dropdown-menu';
|
|
4
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
5
|
+
|
|
6
|
+
@customElement('user-menu')
|
|
7
|
+
export default class UserMenu extends DropdownMenu {
|
|
8
|
+
@property({ type: String }) username = '';
|
|
9
|
+
@property({ type: String }) screenName = '';
|
|
10
|
+
|
|
11
|
+
static get styles(): CSSResultGroup {
|
|
12
|
+
return dropdownStyles;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
render() {
|
|
16
|
+
return html`
|
|
17
|
+
<div class="nav-container">
|
|
18
|
+
<nav
|
|
19
|
+
class="${this.menuClass}"
|
|
20
|
+
aria-hidden=${!this.open}
|
|
21
|
+
aria-expanded=${this.open}
|
|
22
|
+
>
|
|
23
|
+
<h3>${this.screenName}</h3>
|
|
24
|
+
<ul>
|
|
25
|
+
${this.dropdownItems}
|
|
26
|
+
</ul>
|
|
27
|
+
</nav>
|
|
28
|
+
</div>
|
|
29
|
+
`;
|
|
30
|
+
}
|
|
31
|
+
}
|