@illinois-toolkit/ilw-header-megamenu 0.0.1 → 1.0.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.
@@ -1,163 +1,243 @@
1
- #items {
2
- display: none;
3
- }
4
-
5
- #items.expanded {
6
- all: initial;
7
- box-sizing: border-box;
8
- flex-direction: column;
9
- border: var(--ilw-header-megamenu--items--border);
10
- box-shadow: var(--ilw-header-megamenu--items--box-shadow);
11
- width: var(--ilw-header-megamenu--items--width);
12
- max-width: 100vw + 39px;
13
- position: var(--ilw-header-megamenu--items--position);
14
- display: grid;
15
- left: var(--ilw-header-megamenu--items--left);
16
- top: var(--ilw-header-megamenu--items--top);
17
- z-index: 100;
18
- background: white;
19
- }
20
-
21
- .parent {
22
- height: 100%;
23
- }
24
-
25
-
26
-
27
-
28
- button, .link {
29
- all: initial;
30
- box-sizing: border-box;
31
- display: block;
32
- position: relative;
33
- padding: var(--ilw-header-megamenu-section--anchor--padding);
34
- font: var(--ilw-header-megamenu--font);
35
- background: var(--ilw-header-megamenu--link-background);
36
- color: var(--ilw-header-megamenu--link-color);
37
- fill: var(--ilw-header-megamenu--link-color);
38
- border-width: 0 0 3px 0;
39
- border-style: solid;
40
- border-color: transparent;
41
- outline: 0;
42
- cursor: pointer;
43
- height: 100%;
44
- width: 100%;
45
- border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight);
46
-
47
- svg {
48
- padding: 2px;
49
- transform: var(--ilw-header-megamenu-section--transform);
50
- }
51
-
52
- &.current {
53
- border-color: var(--il-blue);
54
- }
55
-
56
- &:hover {
57
- background: var(--ilw-header-megamenu--link-background--hover);
58
- border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--hover);
59
- color: var(--ilw-header-megamenu--link-color--hover);
60
- fill: var(--ilw-header-megamenu--link-color--hover);
61
- text-decoration: underline;
62
-
63
- svg {
64
- outline: 2px dotted var(--il-altgeld);
65
- }
66
- }
67
-
68
- &:focus {
69
- background: var(--ilw-header-megamenu--link-background--focus);
70
- border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--focus);
71
- border-left: var(--ilw-header-megamenu--link-border-left-highlight--focus);
72
- }
73
- }
74
-
75
- button[aria-expanded="true"] {
76
- text-decoration: underline;
77
- color: var(--ilw-header-megamenu--link-color--hover);
78
- background: var(--ilw-header-megamenu--link-background--hover);
79
-
80
- &:focus {
81
- background: var(--ilw-header-megamenu--link-background--hover);
82
- border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--hover);
83
- }
84
-
85
- svg {
86
- fill: var(--ilw-header-megamenu--link-color--hover);
87
- transform: var(--ilw-header-megamenu-section--transform--selected);
88
- background: var(--ilw-header-megamenu--link-background--hover);
89
-
90
- &:focus {
91
- background: var(--ilw-header-megamenu--link-background--hover);
92
- }
93
- }
94
- }
95
-
96
- .header {
97
- position: relative;
98
- display: grid;
99
- grid-template-columns: var(--ilw-header-megamenu-section--grid-template-columns--header);
100
- grid-template-areas: "label icon";
101
- grid-gap: 4px;
102
- }
103
-
104
- .header-link.current button {
105
- border-color: var(--il-blue);
106
- }
107
-
108
- .header-link {
109
- position: relative;
110
- display: grid;
111
- grid-template-columns: var(--ilw-header-megamenu--grid-template-columns);
112
- grid-template-areas: "label icon";
113
- align-items: center;
114
- height: 100%;
115
-
116
- &.highlighted {
117
- background: var(--ilw-header-megamenu--link-background--hover);
118
- }
119
-
120
- & .link {
121
- padding: 6px 0px 6px 20px;
122
- }
123
- & button {
124
- padding: 6px 20px 6px 8px;
125
- }
126
- }
127
-
128
- .label, .link {
129
- box-sizing: border-box;
130
- display: block;
131
- position: relative;
132
- grid-area: label;
133
- }
134
- .icon, .header-link button {
135
- align-self: center;
136
- align-items: center;
137
- justify-content: center;
138
- grid-area: icon;
139
- }
140
- .icon {
141
- display: flex;
142
- }
143
- .arrow {
144
- display: block;
145
- height: 14px;
146
- width: 14px;
147
- }
148
-
149
- .submenu.parent button:hover .label ::slotted(span[slot="label"]), .submenu.parent button:focus .label ::slotted(span[slot="label"]) {
150
- text-decoration: underline;
151
- }
152
-
153
- .menu.parent .header-link.highlighted button, .menu.parent .header-link.highlighted ::slotted(a[slot="link"]) {
154
- border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--focus) !important;
155
- }
156
-
157
- .submenu.parent button.arrow-only:hover, .submenu.parent button.arrow-only:focus {
158
- border-left: 4px solid transparent !important;
159
- }
160
-
161
- .menu.parent .compact button.arrow-only:hover, .menu.parent .compact button.arrow-only:focus {
162
- border-left: 4px solid transparent !important;
1
+ #items {
2
+ display: none;
3
+ }
4
+
5
+ #items.expanded {
6
+ all: initial;
7
+ box-sizing: border-box;
8
+ flex-direction: column;
9
+ border: var(--ilw-header-megamenu--items--border);
10
+ box-shadow: var(--ilw-header-megamenu--items--box-shadow);
11
+ width: var(--ilw-header-megamenu--items--width);
12
+ max-width: 100vw + 39px;
13
+ position: var(--ilw-header-megamenu--items--position);
14
+ display: grid;
15
+ left: var(--ilw-header-megamenu--items--left);
16
+ top: var(--ilw-header-megamenu--items--top);
17
+ z-index: 100;
18
+ background: white;
19
+ }
20
+
21
+ .parent {
22
+ height: 100%;
23
+ }
24
+
25
+ button,
26
+ .link {
27
+ all: initial;
28
+ box-sizing: border-box;
29
+ display: block;
30
+ position: relative;
31
+ padding: var(--ilw-header-megamenu-section--anchor--padding);
32
+ font: var(--ilw-header-megamenu--font);
33
+ background: var(--ilw-header-megamenu--link-background);
34
+ color: var(--ilw-header-megamenu--link-color);
35
+ fill: var(--ilw-header-megamenu--link-color);
36
+ border-width: 0 0 3px 0;
37
+ border-style: solid;
38
+ border-color: transparent;
39
+ outline: 0;
40
+ cursor: pointer;
41
+ height: 100%;
42
+ width: 100%;
43
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight);
44
+ border-left: var(--ilw-header-megamenu--link-border-left-highlight);
45
+
46
+
47
+ svg {
48
+ padding: 2px;
49
+ transform: var(--ilw-header-megamenu-section--transform);
50
+ }
51
+
52
+ &.current {
53
+ border-color: var(--il-blue);
54
+ }
55
+
56
+ &:hover {
57
+ background: var(--ilw-header-megamenu--link-background--hover);
58
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--hover);
59
+ color: var(--ilw-header-megamenu--link-color--hover);
60
+ fill: var(--ilw-header-megamenu--link-color--hover);
61
+ text-decoration: underline;
62
+
63
+ svg {
64
+ outline: 2px dotted var(--il-altgeld);
65
+ }
66
+ }
67
+
68
+ &:focus {
69
+ background: var(--ilw-header-megamenu--link-background--focus);
70
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--focus);
71
+ border-left: var(--ilw-header-megamenu--link-border-left-highlight--focus);
72
+ color: var(--ilw-header-megamenu--link-color--focus);
73
+ fill: var(--ilw-header-megamenu--link-color--focus);
74
+ outline: 0;
75
+ }
76
+
77
+ &:focus:hover {
78
+ svg {
79
+ outline: 2px dotted var(--il-blue);
80
+ }
81
+ }
82
+ }
83
+
84
+ button[aria-expanded="true"] {
85
+ text-decoration: underline;
86
+ color: var(--ilw-header-megamenu--link-color--hover);
87
+ background: var(--ilw-header-megamenu--link-background--hover);
88
+
89
+ &:focus {
90
+ background: var(--ilw-header-megamenu--link-background--hover);
91
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--hover);
92
+ }
93
+
94
+ svg {
95
+ fill: var(--ilw-header-megamenu--link-color--hover);
96
+ transform: var(--ilw-header-megamenu-section--transform--selected);
97
+ background: var(--ilw-header-megamenu--link-background--hover);
98
+
99
+ &:focus {
100
+ background: var(--ilw-header-megamenu--link-background--hover);
101
+ color: var(--il-blue);
102
+ }
103
+ }
104
+ }
105
+
106
+ .header {
107
+ position: relative;
108
+ display: grid;
109
+ grid-template-columns: var(--ilw-header-megamenu-section--grid-template-columns--header);
110
+ grid-template-areas: "label icon";
111
+ grid-gap: 4px;
112
+ }
113
+
114
+ .header-link.current button {
115
+ border-color: var(--il-blue);
116
+ }
117
+
118
+ .header-link {
119
+ position: relative;
120
+ display: grid;
121
+ grid-template-columns: var(--ilw-header-megamenu--grid-template-columns);
122
+ grid-template-areas: "label icon";
123
+ align-items: center;
124
+ height: 100%;
125
+
126
+ &.highlighted {
127
+ background: var(--ilw-header-megamenu--link-background--hover);
128
+ }
129
+
130
+ & .link {
131
+ padding: 6px 0px 6px 20px;
132
+ }
133
+
134
+ & button {
135
+ padding: 6px 20px 6px 6px;
136
+ }
137
+ }
138
+
139
+ .label,
140
+ .link {
141
+ box-sizing: border-box;
142
+ display: block;
143
+ position: relative;
144
+ grid-area: label;
145
+ }
146
+
147
+ .icon,
148
+ .header-link button {
149
+ align-self: center;
150
+ align-items: center;
151
+ justify-content: center;
152
+ grid-area: icon;
153
+ }
154
+
155
+ .icon {
156
+ display: flex;
157
+ }
158
+
159
+ .arrow {
160
+ display: block;
161
+ height: 14px;
162
+ width: 14px;
163
+ }
164
+
165
+ .submenu.parent button:hover .label ::slotted(span[slot="label"]),
166
+ .submenu.parent button:focus .label ::slotted(span[slot="label"]) {
167
+ text-decoration: underline;
168
+ }
169
+
170
+ .menu.parent .header-link.highlighted button,
171
+ .menu.parent .header-link.highlighted ::slotted(a[slot="link"]) {
172
+ border-bottom: var(--ilw-header-megamenu--link-border-bottom-highlight--focus) !important;
173
+ }
174
+
175
+ .submenu.parent button.arrow-only:hover,
176
+ .submenu.parent button.arrow-only:focus {
177
+ border-left: 4px solid transparent !important;
178
+ color: var(--il-blue);
179
+ }
180
+
181
+ .menu.parent .compact button.arrow-only:hover,
182
+ .menu.parent .compact button.arrow-only:focus {
183
+ border-left: 4px solid var(--il-blue) !important;
184
+ color: var(--il-blue);
185
+ }
186
+
187
+
188
+ /* make single ul list */
189
+
190
+ :host(.solo-list) ::slotted(ul) {
191
+ display: grid;
192
+ grid-template-columns: repeat(4, minmax(0, 320px));
193
+ grid-template-rows: repeat(5, 34px);
194
+ grid-auto-flow: column;
195
+ max-width: 100vw;
196
+ }
197
+
198
+
199
+ /* make distinct lists */
200
+ div.list-wrapper {
201
+ display: grid;
202
+ grid-template-columns: repeat(4, minmax(0, 320px));
203
+ max-width: 100vw;
204
+ overflow: hidden;
205
+ }
206
+
207
+ :host-context(ilw-header-megamenu[compact]) .list-wrapper {
208
+ all: unset;
209
+ }
210
+
211
+ ::slotted(ul:last-of-type) {
212
+ border: none !important;
213
+ }
214
+
215
+ ::slotted([slot="action-right"]) {
216
+ grid-column: 4;
217
+ }
218
+
219
+ ::slotted([slot="action-right"].span-2) {
220
+ grid-column: 3 / span 2;
221
+ justify-self: auto;
222
+ }
223
+
224
+ ::slotted([slot="action-right"].span-3) {
225
+ grid-column: 2 / span 3;
226
+ justify-self: auto;
227
+ }
228
+
229
+ ::slotted([slot="action-left"]) {
230
+ grid-column: 1;
231
+ }
232
+
233
+ ::slotted([slot="action-left"].span-2) {
234
+ grid-column: 1 / span 2;
235
+ }
236
+
237
+ ::slotted([slot="action-left"].span-3) {
238
+ grid-column: 1 / span 3;
239
+ }
240
+
241
+ .hidden {
242
+ display: none;
163
243
  }