@internetarchive/ia-topnav 2.1.0 → 2.1.1-webdev-8723.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 (54) hide show
  1. package/.prettierignore +1 -1
  2. package/LICENSE +661 -661
  3. package/README.md +147 -147
  4. package/demo/index.html +28 -28
  5. package/dist/index.js.map +1 -1
  6. package/dist/src/data/menus.js +1 -1
  7. package/dist/src/data/menus.js.map +1 -1
  8. package/dist/src/models.js.map +1 -1
  9. package/dist/src/styles/base.js +45 -45
  10. package/dist/src/styles/base.js.map +1 -1
  11. package/dist/src/styles/dropdown-menu.js +169 -169
  12. package/dist/src/styles/dropdown-menu.js.map +1 -1
  13. package/dist/src/styles/ia-topnav.js +82 -82
  14. package/dist/src/styles/ia-topnav.js.map +1 -1
  15. package/dist/src/styles/login-button.js +87 -87
  16. package/dist/src/styles/login-button.js.map +1 -1
  17. package/dist/src/styles/media-button.js +153 -153
  18. package/dist/src/styles/media-button.js.map +1 -1
  19. package/dist/src/styles/media-menu.js +63 -63
  20. package/dist/src/styles/media-menu.js.map +1 -1
  21. package/dist/src/styles/media-slider.js +78 -78
  22. package/dist/src/styles/media-slider.js.map +1 -1
  23. package/dist/src/styles/media-subnav.js +152 -152
  24. package/dist/src/styles/media-subnav.js.map +1 -1
  25. package/dist/src/styles/primary-nav.js +353 -353
  26. package/dist/src/styles/primary-nav.js.map +1 -1
  27. package/dist/src/styles/save-page-form.js +51 -51
  28. package/dist/src/styles/save-page-form.js.map +1 -1
  29. package/dist/src/styles/wayback-search.js +45 -45
  30. package/dist/src/styles/wayback-search.js.map +1 -1
  31. package/dist/src/styles/wayback-slider.js +26 -26
  32. package/dist/src/styles/wayback-slider.js.map +1 -1
  33. package/eslint.config.mjs +53 -53
  34. package/index.ts +3 -3
  35. package/package.json +72 -72
  36. package/prettier.config.js +9 -9
  37. package/src/data/menus.ts +1 -1
  38. package/src/models.ts +68 -68
  39. package/src/styles/base.ts +49 -49
  40. package/src/styles/dropdown-menu.ts +173 -173
  41. package/src/styles/ia-topnav.ts +86 -86
  42. package/src/styles/login-button.ts +91 -91
  43. package/src/styles/media-button.ts +157 -157
  44. package/src/styles/media-menu.ts +67 -67
  45. package/src/styles/media-slider.ts +82 -82
  46. package/src/styles/media-subnav.ts +160 -160
  47. package/src/styles/primary-nav.ts +357 -357
  48. package/src/styles/save-page-form.ts +55 -55
  49. package/src/styles/wayback-search.ts +49 -49
  50. package/src/styles/wayback-slider.ts +34 -34
  51. package/ssl/server.key +28 -28
  52. package/tsconfig.json +31 -31
  53. package/web-dev-server.config.mjs +32 -32
  54. package/web-test-runner.config.mjs +41 -41
@@ -1,67 +1,67 @@
1
- import { css } from 'lit';
2
- import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
3
-
4
- export default css`
5
- :host {
6
- outline: none;
7
- }
8
-
9
- .media-menu-inner {
10
- z-index: -1;
11
- top: -40rem;
12
- background-color: var(--mediaMenuBg);
13
- margin: 0;
14
- overflow: hidden;
15
- transition-duration: 0.2s;
16
- transition-property: top;
17
- transition-timing-function: ease;
18
- }
19
-
20
- .menu-group {
21
- position: relative;
22
- line-height: normal;
23
- }
24
-
25
- /* Mobile view styles */
26
- @media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
27
- .media-menu-inner {
28
- position: absolute;
29
- width: 100%;
30
- }
31
-
32
- .open .media-menu-inner {
33
- top: 0;
34
- }
35
-
36
- .overflow-clip {
37
- position: absolute;
38
- z-index: -1; /** needs to be under the navigation, otherwise it intercepts clicks */
39
- top: 4rem;
40
- left: 0;
41
- height: 0;
42
- width: 100%;
43
- overflow: hidden;
44
- transition-duration: 0.2s;
45
- transition-property: height;
46
- }
47
-
48
- .open .overflow-clip {
49
- height: 40rem;
50
- }
51
- }
52
-
53
- /* Desktop view styles */
54
- @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
55
- .media-menu-inner {
56
- display: block;
57
- position: static;
58
- width: auto;
59
- height: 5rem;
60
- transition-property: none;
61
- }
62
-
63
- .menu-group {
64
- font-size: 0;
65
- }
66
- }
67
- `;
1
+ import { css } from 'lit';
2
+ import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
3
+
4
+ export default css`
5
+ :host {
6
+ outline: none;
7
+ }
8
+
9
+ .media-menu-inner {
10
+ z-index: -1;
11
+ top: -40rem;
12
+ background-color: var(--mediaMenuBg);
13
+ margin: 0;
14
+ overflow: hidden;
15
+ transition-duration: 0.2s;
16
+ transition-property: top;
17
+ transition-timing-function: ease;
18
+ }
19
+
20
+ .menu-group {
21
+ position: relative;
22
+ line-height: normal;
23
+ }
24
+
25
+ /* Mobile view styles */
26
+ @media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
27
+ .media-menu-inner {
28
+ position: absolute;
29
+ width: 100%;
30
+ }
31
+
32
+ .open .media-menu-inner {
33
+ top: 0;
34
+ }
35
+
36
+ .overflow-clip {
37
+ position: absolute;
38
+ z-index: -1; /** needs to be under the navigation, otherwise it intercepts clicks */
39
+ top: 4rem;
40
+ left: 0;
41
+ height: 0;
42
+ width: 100%;
43
+ overflow: hidden;
44
+ transition-duration: 0.2s;
45
+ transition-property: height;
46
+ }
47
+
48
+ .open .overflow-clip {
49
+ height: 40rem;
50
+ }
51
+ }
52
+
53
+ /* Desktop view styles */
54
+ @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
55
+ .media-menu-inner {
56
+ display: block;
57
+ position: static;
58
+ width: auto;
59
+ height: 5rem;
60
+ transition-property: none;
61
+ }
62
+
63
+ .menu-group {
64
+ font-size: 0;
65
+ }
66
+ }
67
+ `;
@@ -1,82 +1,82 @@
1
- import { css } from 'lit';
2
- import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
3
-
4
- export default css`
5
- .media-slider-container {
6
- position: relative;
7
- }
8
-
9
- .overflow-clip {
10
- display: none;
11
- position: absolute;
12
- top: 0;
13
- right: 0;
14
- left: 0;
15
- height: 0;
16
- overflow: hidden;
17
- transition: height 0.2s ease;
18
- }
19
-
20
- .information-menu {
21
- position: absolute;
22
- top: 0;
23
- right: 0;
24
- left: 0;
25
- padding: 0;
26
- height: 31.9rem;
27
- overflow-x: hidden;
28
- font-size: 1.4rem;
29
- background: var(--mediaSliderBg);
30
- }
31
-
32
- .open {
33
- display: block;
34
- }
35
-
36
- .hidden {
37
- display: none;
38
- }
39
-
40
- .info-box {
41
- padding: 1rem;
42
- }
43
-
44
- @media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
45
- .overflow-clip.open {
46
- display: block;
47
- height: 35.8rem;
48
- left: 4rem;
49
- top: 0;
50
- }
51
- }
52
-
53
- @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
54
- .overflow-clip {
55
- display: block;
56
- }
57
-
58
- .information-menu {
59
- left: 0;
60
- z-index: 3;
61
- height: auto;
62
- min-height: 21rem;
63
- background: var(--mediaSliderDesktopBg);
64
- transform: translate(0, -100%);
65
- transition: transform 0.2s ease;
66
- }
67
-
68
- .overflow-clip.open {
69
- height: 22rem;
70
- }
71
-
72
- .information-menu.open {
73
- transform: translate(0, 0);
74
- }
75
-
76
- .info-box {
77
- max-width: 100rem;
78
- padding: 1.5rem 0;
79
- margin: 0 auto;
80
- }
81
- }
82
- `;
1
+ import { css } from 'lit';
2
+ import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
3
+
4
+ export default css`
5
+ .media-slider-container {
6
+ position: relative;
7
+ }
8
+
9
+ .overflow-clip {
10
+ display: none;
11
+ position: absolute;
12
+ top: 0;
13
+ right: 0;
14
+ left: 0;
15
+ height: 0;
16
+ overflow: hidden;
17
+ transition: height 0.2s ease;
18
+ }
19
+
20
+ .information-menu {
21
+ position: absolute;
22
+ top: 0;
23
+ right: 0;
24
+ left: 0;
25
+ padding: 0;
26
+ height: 31.9rem;
27
+ overflow-x: hidden;
28
+ font-size: 1.4rem;
29
+ background: var(--mediaSliderBg);
30
+ }
31
+
32
+ .open {
33
+ display: block;
34
+ }
35
+
36
+ .hidden {
37
+ display: none;
38
+ }
39
+
40
+ .info-box {
41
+ padding: 1rem;
42
+ }
43
+
44
+ @media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
45
+ .overflow-clip.open {
46
+ display: block;
47
+ height: 35.8rem;
48
+ left: 4rem;
49
+ top: 0;
50
+ }
51
+ }
52
+
53
+ @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
54
+ .overflow-clip {
55
+ display: block;
56
+ }
57
+
58
+ .information-menu {
59
+ left: 0;
60
+ z-index: 3;
61
+ height: auto;
62
+ min-height: 21rem;
63
+ background: var(--mediaSliderDesktopBg);
64
+ transform: translate(0, -100%);
65
+ transition: transform 0.2s ease;
66
+ }
67
+
68
+ .overflow-clip.open {
69
+ height: 22rem;
70
+ }
71
+
72
+ .information-menu.open {
73
+ transform: translate(0, 0);
74
+ }
75
+
76
+ .info-box {
77
+ max-width: 100rem;
78
+ padding: 1.5rem 0;
79
+ margin: 0 auto;
80
+ }
81
+ }
82
+ `;
@@ -1,160 +1,160 @@
1
- import { css } from 'lit';
2
- import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
3
- import { subnavListCSS } from './base';
4
-
5
- export default [
6
- subnavListCSS,
7
- css`
8
- img {
9
- display: block;
10
- width: 90px;
11
- height: 90px;
12
- margin: 0 auto 1rem auto;
13
- border-radius: 45px;
14
- }
15
-
16
- h3 {
17
- margin-top: 0;
18
- font-size: 1.8rem;
19
- }
20
-
21
- .icon-links {
22
- display: -webkit-box;
23
- display: -ms-flexbox;
24
- display: flex;
25
- -webkit-box-pack: space-evenly;
26
- -ms-flex-pack: space-evenly;
27
- justify-content: space-evenly;
28
- text-align: center;
29
- }
30
-
31
- .icon-links a {
32
- display: inline-block;
33
- width: 12rem;
34
- margin-bottom: 1.5rem;
35
- overflow: hidden;
36
- white-space: nowrap;
37
- text-align: center;
38
- text-overflow: ellipsis;
39
- }
40
-
41
- .icon-links a + a {
42
- margin-left: 2rem;
43
- }
44
-
45
- .featured h4 {
46
- display: none;
47
- }
48
-
49
- @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
50
- :host {
51
- display: -ms-grid;
52
- display: grid;
53
- -ms-grid-columns: 40% 20% 40%;
54
- grid-template-columns: 40% 20% 40%;
55
- }
56
-
57
- .wayback-search {
58
- -ms-grid-column: 1;
59
- -ms-grid-column-span: 3;
60
- grid-column: 1 / 4;
61
- }
62
-
63
- h3 {
64
- display: none;
65
- }
66
-
67
- .icon-links {
68
- -ms-grid-column: 1;
69
- }
70
-
71
- .icon-links a {
72
- padding-top: 3.5rem;
73
- max-width: 16rem;
74
- }
75
-
76
- .links {
77
- padding: 0 1.5rem;
78
- }
79
-
80
- .featured {
81
- -ms-grid-column: 2;
82
- }
83
-
84
- .featured h4 {
85
- display: block;
86
- }
87
-
88
- .top {
89
- -ms-grid-column: 3;
90
- }
91
-
92
- .top ul {
93
- display: -ms-grid;
94
- display: grid;
95
- -ms-grid-columns: 50% 3rem 50%;
96
- grid-template-columns: 50% 50%;
97
- -ms-grid-rows: (auto) [7];
98
- grid-template-rows: repeat(7, auto);
99
- grid-column-gap: 3rem;
100
- grid-auto-flow: column;
101
- }
102
- .top ul > *:nth-child(1) {
103
- -ms-grid-row: 1;
104
- -ms-grid-column: 1;
105
- }
106
- .top ul > *:nth-child(2) {
107
- -ms-grid-row: 2;
108
- -ms-grid-column: 1;
109
- }
110
- .top ul > *:nth-child(3) {
111
- -ms-grid-row: 3;
112
- -ms-grid-column: 1;
113
- }
114
- .top ul > *:nth-child(4) {
115
- -ms-grid-row: 4;
116
- -ms-grid-column: 1;
117
- }
118
- .top ul > *:nth-child(5) {
119
- -ms-grid-row: 5;
120
- -ms-grid-column: 1;
121
- }
122
- .top ul > *:nth-child(6) {
123
- -ms-grid-row: 6;
124
- -ms-grid-column: 1;
125
- }
126
- .top ul > *:nth-child(7) {
127
- -ms-grid-row: 7;
128
- -ms-grid-column: 1;
129
- }
130
- .top ul > *:nth-child(8) {
131
- -ms-grid-row: 1;
132
- -ms-grid-column: 3;
133
- }
134
- .top ul > *:nth-child(9) {
135
- -ms-grid-row: 2;
136
- -ms-grid-column: 3;
137
- }
138
- .top ul > *:nth-child(10) {
139
- -ms-grid-row: 3;
140
- -ms-grid-column: 3;
141
- }
142
- .top ul > *:nth-child(11) {
143
- -ms-grid-row: 4;
144
- -ms-grid-column: 3;
145
- }
146
- .top ul > *:nth-child(12) {
147
- -ms-grid-row: 5;
148
- -ms-grid-column: 3;
149
- }
150
- .top ul > *:nth-child(13) {
151
- -ms-grid-row: 6;
152
- -ms-grid-column: 3;
153
- }
154
- .top ul > *:nth-child(14) {
155
- -ms-grid-row: 7;
156
- -ms-grid-column: 3;
157
- }
158
- }
159
- `,
160
- ];
1
+ import { css } from 'lit';
2
+ import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
3
+ import { subnavListCSS } from './base';
4
+
5
+ export default [
6
+ subnavListCSS,
7
+ css`
8
+ img {
9
+ display: block;
10
+ width: 90px;
11
+ height: 90px;
12
+ margin: 0 auto 1rem auto;
13
+ border-radius: 45px;
14
+ }
15
+
16
+ h3 {
17
+ margin-top: 0;
18
+ font-size: 1.8rem;
19
+ }
20
+
21
+ .icon-links {
22
+ display: -webkit-box;
23
+ display: -ms-flexbox;
24
+ display: flex;
25
+ -webkit-box-pack: space-evenly;
26
+ -ms-flex-pack: space-evenly;
27
+ justify-content: space-evenly;
28
+ text-align: center;
29
+ }
30
+
31
+ .icon-links a {
32
+ display: inline-block;
33
+ width: 12rem;
34
+ margin-bottom: 1.5rem;
35
+ overflow: hidden;
36
+ white-space: nowrap;
37
+ text-align: center;
38
+ text-overflow: ellipsis;
39
+ }
40
+
41
+ .icon-links a + a {
42
+ margin-left: 2rem;
43
+ }
44
+
45
+ .featured h4 {
46
+ display: none;
47
+ }
48
+
49
+ @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
50
+ :host {
51
+ display: -ms-grid;
52
+ display: grid;
53
+ -ms-grid-columns: 40% 20% 40%;
54
+ grid-template-columns: 40% 20% 40%;
55
+ }
56
+
57
+ .wayback-search {
58
+ -ms-grid-column: 1;
59
+ -ms-grid-column-span: 3;
60
+ grid-column: 1 / 4;
61
+ }
62
+
63
+ h3 {
64
+ display: none;
65
+ }
66
+
67
+ .icon-links {
68
+ -ms-grid-column: 1;
69
+ }
70
+
71
+ .icon-links a {
72
+ padding-top: 3.5rem;
73
+ max-width: 16rem;
74
+ }
75
+
76
+ .links {
77
+ padding: 0 1.5rem;
78
+ }
79
+
80
+ .featured {
81
+ -ms-grid-column: 2;
82
+ }
83
+
84
+ .featured h4 {
85
+ display: block;
86
+ }
87
+
88
+ .top {
89
+ -ms-grid-column: 3;
90
+ }
91
+
92
+ .top ul {
93
+ display: -ms-grid;
94
+ display: grid;
95
+ -ms-grid-columns: 50% 3rem 50%;
96
+ grid-template-columns: 50% 50%;
97
+ -ms-grid-rows: (auto) [7];
98
+ grid-template-rows: repeat(7, auto);
99
+ grid-column-gap: 3rem;
100
+ grid-auto-flow: column;
101
+ }
102
+ .top ul > *:nth-child(1) {
103
+ -ms-grid-row: 1;
104
+ -ms-grid-column: 1;
105
+ }
106
+ .top ul > *:nth-child(2) {
107
+ -ms-grid-row: 2;
108
+ -ms-grid-column: 1;
109
+ }
110
+ .top ul > *:nth-child(3) {
111
+ -ms-grid-row: 3;
112
+ -ms-grid-column: 1;
113
+ }
114
+ .top ul > *:nth-child(4) {
115
+ -ms-grid-row: 4;
116
+ -ms-grid-column: 1;
117
+ }
118
+ .top ul > *:nth-child(5) {
119
+ -ms-grid-row: 5;
120
+ -ms-grid-column: 1;
121
+ }
122
+ .top ul > *:nth-child(6) {
123
+ -ms-grid-row: 6;
124
+ -ms-grid-column: 1;
125
+ }
126
+ .top ul > *:nth-child(7) {
127
+ -ms-grid-row: 7;
128
+ -ms-grid-column: 1;
129
+ }
130
+ .top ul > *:nth-child(8) {
131
+ -ms-grid-row: 1;
132
+ -ms-grid-column: 3;
133
+ }
134
+ .top ul > *:nth-child(9) {
135
+ -ms-grid-row: 2;
136
+ -ms-grid-column: 3;
137
+ }
138
+ .top ul > *:nth-child(10) {
139
+ -ms-grid-row: 3;
140
+ -ms-grid-column: 3;
141
+ }
142
+ .top ul > *:nth-child(11) {
143
+ -ms-grid-row: 4;
144
+ -ms-grid-column: 3;
145
+ }
146
+ .top ul > *:nth-child(12) {
147
+ -ms-grid-row: 5;
148
+ -ms-grid-column: 3;
149
+ }
150
+ .top ul > *:nth-child(13) {
151
+ -ms-grid-row: 6;
152
+ -ms-grid-column: 3;
153
+ }
154
+ .top ul > *:nth-child(14) {
155
+ -ms-grid-row: 7;
156
+ -ms-grid-column: 3;
157
+ }
158
+ }
159
+ `,
160
+ ];