@internetarchive/collection-browser 0.4.19 → 1.0.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/src/collection-browser.d.ts +22 -1
- package/dist/src/collection-browser.js +405 -291
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facets-template.js +2 -0
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.js +63 -70
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.js +49 -55
- package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
- package/dist/src/collection-facets/toggle-switch.js +46 -56
- package/dist/src/collection-facets/toggle-switch.js.map +1 -1
- package/dist/src/collection-facets.d.ts +1 -1
- package/dist/src/collection-facets.js +98 -84
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/sort-filter-bar/alpha-bar.d.ts +2 -1
- package/dist/src/sort-filter-bar/alpha-bar.js +33 -25
- package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.js +198 -186
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/src/styles/sr-only.d.ts +1 -0
- package/dist/src/styles/sr-only.js +18 -0
- package/dist/src/styles/sr-only.js.map +1 -0
- package/dist/src/tiles/grid/account-tile.js +1 -1
- package/dist/src/tiles/grid/account-tile.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +2 -2
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +2 -2
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +5 -15
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
- package/dist/src/tiles/grid/tile-stats.js +58 -65
- package/dist/src/tiles/grid/tile-stats.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.js +3 -2
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/test/collection-facets.test.js +8 -5
- package/dist/test/collection-facets.test.js.map +1 -1
- package/dist/test/sort-filter-bar/alpha-bar.test.js +12 -12
- package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -1
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js +2 -2
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
- package/package.json +3 -3
- package/src/collection-browser.ts +416 -293
- package/src/collection-facets/facets-template.ts +2 -0
- package/src/collection-facets/more-facets-content.ts +63 -70
- package/src/collection-facets/more-facets-pagination.ts +49 -55
- package/src/collection-facets/toggle-switch.ts +51 -61
- package/src/collection-facets.ts +99 -85
- package/src/sort-filter-bar/alpha-bar.ts +26 -18
- package/src/sort-filter-bar/sort-filter-bar.ts +200 -186
- package/src/styles/sr-only.ts +18 -0
- package/src/tiles/grid/account-tile.ts +1 -1
- package/src/tiles/grid/collection-tile.ts +2 -2
- package/src/tiles/grid/item-tile.ts +2 -2
- package/src/tiles/grid/styles/tile-grid-shared-styles.ts +5 -15
- package/src/tiles/grid/tile-stats.ts +66 -73
- package/src/tiles/tile-dispatcher.ts +1 -0
- package/test/collection-facets.test.ts +10 -2
- package/test/sort-filter-bar/alpha-bar.test.ts +16 -12
- package/test/sort-filter-bar/sort-filter-bar.test.ts +2 -2
|
@@ -164,6 +164,7 @@ export class FacetsTemplate extends LitElement {
|
|
|
164
164
|
const hideText = `Hide ${titleText}`;
|
|
165
165
|
const unhideText = `Unhide ${titleText}`;
|
|
166
166
|
const showHideText = facetHidden ? unhideText : hideText;
|
|
167
|
+
const ariaLabel = `${titleText}, ${bucket.count} results`;
|
|
167
168
|
return html`
|
|
168
169
|
<div class="facet-row">
|
|
169
170
|
<div class="facet-checkbox">
|
|
@@ -203,6 +204,7 @@ export class FacetsTemplate extends LitElement {
|
|
|
203
204
|
for=${showOnlyCheckboxId}
|
|
204
205
|
class="facet-info-display"
|
|
205
206
|
title=${onlyShowText}
|
|
207
|
+
aria-label=${ariaLabel}
|
|
206
208
|
>
|
|
207
209
|
<div class="facet-title">${bucketTextDisplay}</div>
|
|
208
210
|
<div class="facet-count">
|
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
analyticsCategories,
|
|
41
41
|
} from '../utils/analytics-events';
|
|
42
42
|
import './toggle-switch';
|
|
43
|
+
import { srOnlyStyle } from '../styles/sr-only';
|
|
43
44
|
|
|
44
45
|
@customElement('more-facets-content')
|
|
45
46
|
export class MoreFacetsContent extends LitElement {
|
|
@@ -456,81 +457,73 @@ export class MoreFacetsContent extends LitElement {
|
|
|
456
457
|
static get styles(): CSSResultGroup {
|
|
457
458
|
const modalSubmitButton = css`var(--primaryButtonBGColor, #194880)`;
|
|
458
459
|
|
|
459
|
-
return
|
|
460
|
-
|
|
460
|
+
return [
|
|
461
|
+
srOnlyStyle,
|
|
462
|
+
css`
|
|
463
|
+
@media (max-width: 560px) {
|
|
464
|
+
section#more-facets {
|
|
465
|
+
max-height: 450px;
|
|
466
|
+
}
|
|
467
|
+
.facets-content {
|
|
468
|
+
overflow-y: auto;
|
|
469
|
+
height: 300px;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
461
472
|
section#more-facets {
|
|
462
|
-
|
|
473
|
+
overflow: auto;
|
|
474
|
+
padding: 10px; /* leaves room for scroll bar to appear without overlaying on content */
|
|
463
475
|
}
|
|
464
|
-
.
|
|
465
|
-
|
|
466
|
-
|
|
476
|
+
.header-content .title {
|
|
477
|
+
display: block;
|
|
478
|
+
text-align: left;
|
|
479
|
+
font-size: 1.8rem;
|
|
480
|
+
padding: 0 10px;
|
|
481
|
+
font-weight: bold;
|
|
467
482
|
}
|
|
468
|
-
}
|
|
469
|
-
section#more-facets {
|
|
470
|
-
overflow: auto;
|
|
471
|
-
padding: 10px; /* leaves room for scroll bar to appear without overlaying on content */
|
|
472
|
-
}
|
|
473
|
-
.header-content .title {
|
|
474
|
-
display: block;
|
|
475
|
-
text-align: left;
|
|
476
|
-
font-size: 1.8rem;
|
|
477
|
-
padding: 0 10px;
|
|
478
|
-
font-weight: bold;
|
|
479
|
-
}
|
|
480
483
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
.sort-toggle {
|
|
487
|
-
font-weight: normal;
|
|
488
|
-
}
|
|
484
|
+
.sort-label {
|
|
485
|
+
margin-left: 20px;
|
|
486
|
+
font-size: 1.3rem;
|
|
487
|
+
}
|
|
489
488
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
overflow: auto;
|
|
494
|
-
padding: 10px;
|
|
495
|
-
}
|
|
496
|
-
.facets-loader {
|
|
497
|
-
margin-bottom: 20px;
|
|
498
|
-
width: 70px;
|
|
499
|
-
display: block;
|
|
500
|
-
margin-left: auto;
|
|
501
|
-
margin-right: auto;
|
|
502
|
-
}
|
|
503
|
-
.btn {
|
|
504
|
-
border: none;
|
|
505
|
-
padding: 10px;
|
|
506
|
-
margin-bottom: 10px;
|
|
507
|
-
width: auto;
|
|
508
|
-
border-radius: 4px;
|
|
509
|
-
cursor: pointer;
|
|
510
|
-
}
|
|
511
|
-
.btn-cancel {
|
|
512
|
-
background-color: #2c2c2c;
|
|
513
|
-
color: white;
|
|
514
|
-
}
|
|
515
|
-
.btn-submit {
|
|
516
|
-
background-color: ${modalSubmitButton};
|
|
517
|
-
color: white;
|
|
518
|
-
}
|
|
519
|
-
.footer {
|
|
520
|
-
text-align: center;
|
|
521
|
-
margin-top: 10px;
|
|
522
|
-
}
|
|
489
|
+
.sort-toggle {
|
|
490
|
+
font-weight: normal;
|
|
491
|
+
}
|
|
523
492
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
493
|
+
.facets-content {
|
|
494
|
+
font-size: 1.2rem;
|
|
495
|
+
max-height: 300px;
|
|
496
|
+
overflow: auto;
|
|
497
|
+
padding: 10px;
|
|
498
|
+
}
|
|
499
|
+
.facets-loader {
|
|
500
|
+
margin-bottom: 20px;
|
|
501
|
+
width: 70px;
|
|
502
|
+
display: block;
|
|
503
|
+
margin-left: auto;
|
|
504
|
+
margin-right: auto;
|
|
505
|
+
}
|
|
506
|
+
.btn {
|
|
507
|
+
border: none;
|
|
508
|
+
padding: 10px;
|
|
509
|
+
margin-bottom: 10px;
|
|
510
|
+
width: auto;
|
|
511
|
+
border-radius: 4px;
|
|
512
|
+
cursor: pointer;
|
|
513
|
+
}
|
|
514
|
+
.btn-cancel {
|
|
515
|
+
background-color: #2c2c2c;
|
|
516
|
+
color: white;
|
|
517
|
+
}
|
|
518
|
+
.btn-submit {
|
|
519
|
+
background-color: ${modalSubmitButton};
|
|
520
|
+
color: white;
|
|
521
|
+
}
|
|
522
|
+
.footer {
|
|
523
|
+
text-align: center;
|
|
524
|
+
margin-top: 10px;
|
|
525
|
+
}
|
|
526
|
+
`,
|
|
527
|
+
];
|
|
535
528
|
}
|
|
536
529
|
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
10
10
|
import arrowLeftIcon from '../assets/img/icons/arrow-left';
|
|
11
11
|
import arrowRightIcon from '../assets/img/icons/arrow-right';
|
|
12
|
+
import { srOnlyStyle } from '../styles/sr-only';
|
|
12
13
|
|
|
13
14
|
@customElement('more-facets-pagination')
|
|
14
15
|
export class MoreFacetsPagination extends LitElement {
|
|
@@ -240,60 +241,53 @@ export class MoreFacetsPagination extends LitElement {
|
|
|
240
241
|
}
|
|
241
242
|
|
|
242
243
|
static get styles(): CSSResultGroup {
|
|
243
|
-
return
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
padding: 0;
|
|
292
|
-
margin: -1px;
|
|
293
|
-
overflow: hidden;
|
|
294
|
-
clip: rect(0, 0, 0, 0);
|
|
295
|
-
border: 0;
|
|
296
|
-
}
|
|
297
|
-
`;
|
|
244
|
+
return [
|
|
245
|
+
srOnlyStyle,
|
|
246
|
+
css`
|
|
247
|
+
.facets-pagination {
|
|
248
|
+
user-select: none;
|
|
249
|
+
margin-top: 10px;
|
|
250
|
+
background-color: #eee;
|
|
251
|
+
text-align: center;
|
|
252
|
+
}
|
|
253
|
+
.facets-pagination button {
|
|
254
|
+
border: none;
|
|
255
|
+
background: none;
|
|
256
|
+
}
|
|
257
|
+
.facets-pagination .arrow-icon {
|
|
258
|
+
width: 2.5rem;
|
|
259
|
+
vertical-align: middle;
|
|
260
|
+
}
|
|
261
|
+
.facets-pagination .arrow-icon svg {
|
|
262
|
+
height: 14px;
|
|
263
|
+
fill: #2c2c2c;
|
|
264
|
+
}
|
|
265
|
+
.facets-pagination button,
|
|
266
|
+
.facets-pagination i {
|
|
267
|
+
background: none;
|
|
268
|
+
border: 0;
|
|
269
|
+
cursor: pointer;
|
|
270
|
+
border-radius: 4px;
|
|
271
|
+
margin: 10px 5px;
|
|
272
|
+
padding: 5px;
|
|
273
|
+
font-size: 1.4rem;
|
|
274
|
+
color: inherit;
|
|
275
|
+
vertical-align: baseline;
|
|
276
|
+
display: inline-block;
|
|
277
|
+
min-width: 2.5rem;
|
|
278
|
+
}
|
|
279
|
+
.facets-pagination i {
|
|
280
|
+
cursor: auto;
|
|
281
|
+
display: inline;
|
|
282
|
+
}
|
|
283
|
+
.facets-pagination button.current {
|
|
284
|
+
background: #2c2c2c;
|
|
285
|
+
color: white;
|
|
286
|
+
}
|
|
287
|
+
.page-numbers {
|
|
288
|
+
display: inline-block;
|
|
289
|
+
}
|
|
290
|
+
`,
|
|
291
|
+
];
|
|
298
292
|
}
|
|
299
293
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { css, html, LitElement, CSSResultGroup } from 'lit';
|
|
2
2
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
3
|
+
import { srOnlyStyle } from '../styles/sr-only';
|
|
3
4
|
|
|
4
5
|
export type Side = 'left' | 'right';
|
|
5
6
|
|
|
@@ -117,68 +118,57 @@ export class ToggleSwitch extends LitElement {
|
|
|
117
118
|
const knobTransitionDuration = css`var(--knobTransitionDuration, 0.25s)`;
|
|
118
119
|
const knobTransitionFn = css`var(--knobTransitionFn, ease)`;
|
|
119
120
|
|
|
120
|
-
return
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
width: ${switchHeight};
|
|
157
|
-
height: ${switchHeight};
|
|
158
|
-
border-radius: 50%;
|
|
159
|
-
background: ${knobColor};
|
|
160
|
-
transition: transform ${knobTransitionDuration} ${knobTransitionFn};
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.sr-only {
|
|
164
|
-
position: absolute !important;
|
|
165
|
-
width: 1px !important;
|
|
166
|
-
height: 1px !important;
|
|
167
|
-
margin: -1px !important;
|
|
168
|
-
padding: 0 !important;
|
|
169
|
-
border: 0 !important;
|
|
170
|
-
overflow: hidden !important;
|
|
171
|
-
white-space: nowrap !important;
|
|
172
|
-
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
173
|
-
-webkit-clip-path: inset(50%) !important;
|
|
174
|
-
clip-path: inset(50%) !important;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
@media (prefers-reduced-motion: reduce) {
|
|
121
|
+
return [
|
|
122
|
+
srOnlyStyle,
|
|
123
|
+
css`
|
|
124
|
+
#container {
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
flex-wrap: nowrap;
|
|
128
|
+
font-size: ${labelFontSize};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
#switch-button {
|
|
132
|
+
width: ${switchWidth};
|
|
133
|
+
height: ${switchHeight};
|
|
134
|
+
margin: 0 ${switchMarginRight} 0 ${switchMarginLeft};
|
|
135
|
+
padding: 0;
|
|
136
|
+
border: ${switchBorderWidth} solid ${switchBorderColor};
|
|
137
|
+
border-radius: ${switchHeight};
|
|
138
|
+
box-sizing: content-box;
|
|
139
|
+
background: ${switchBgColor};
|
|
140
|
+
appearance: none;
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
#switch-button.left #knob {
|
|
145
|
+
transform: translateX(0);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
#switch-button.right #knob {
|
|
149
|
+
transform: translateX(calc(${switchWidth} - ${switchHeight}));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
#switch-button:focus-visible {
|
|
153
|
+
outline: 2px solid black;
|
|
154
|
+
outline-offset: 2px;
|
|
155
|
+
}
|
|
156
|
+
|
|
178
157
|
#knob {
|
|
179
|
-
|
|
158
|
+
display: block;
|
|
159
|
+
width: ${switchHeight};
|
|
160
|
+
height: ${switchHeight};
|
|
161
|
+
border-radius: 50%;
|
|
162
|
+
background: ${knobColor};
|
|
163
|
+
transition: transform ${knobTransitionDuration} ${knobTransitionFn};
|
|
180
164
|
}
|
|
181
|
-
|
|
182
|
-
|
|
165
|
+
|
|
166
|
+
@media (prefers-reduced-motion: reduce) {
|
|
167
|
+
#knob {
|
|
168
|
+
transition-duration: 0.001s !important; /* Imperceptibly fast */
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
`,
|
|
172
|
+
];
|
|
183
173
|
}
|
|
184
174
|
}
|
package/src/collection-facets.ts
CHANGED
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
analyticsActions,
|
|
51
51
|
analyticsCategories,
|
|
52
52
|
} from './utils/analytics-events';
|
|
53
|
+
import { srOnlyStyle } from './styles/sr-only';
|
|
53
54
|
|
|
54
55
|
@customElement('collection-facets')
|
|
55
56
|
export class CollectionFacets extends LitElement {
|
|
@@ -115,15 +116,18 @@ export class CollectionFacets extends LitElement {
|
|
|
115
116
|
private allowedFacetCount = 6;
|
|
116
117
|
|
|
117
118
|
render() {
|
|
119
|
+
const datePickerLabelId = 'date-picker-label';
|
|
118
120
|
return html`
|
|
119
121
|
<div id="container" class="${this.facetsLoading ? 'loading' : ''}">
|
|
120
122
|
${this.showHistogramDatePicker &&
|
|
121
123
|
(this.fullYearsHistogramAggregation || this.fullYearAggregationLoading)
|
|
122
124
|
? html`
|
|
123
|
-
<
|
|
124
|
-
<
|
|
125
|
+
<section class="facet-group" aria-labelledby=${datePickerLabelId}>
|
|
126
|
+
<h3 id=${datePickerLabelId}>
|
|
127
|
+
Year Published <span class="sr-only">range filter</span>
|
|
128
|
+
</h3>
|
|
125
129
|
${this.histogramTemplate}
|
|
126
|
-
</
|
|
130
|
+
</section>
|
|
127
131
|
`
|
|
128
132
|
: nothing}
|
|
129
133
|
${this.mergedFacets.map(facetGroup =>
|
|
@@ -367,23 +371,27 @@ export class CollectionFacets extends LitElement {
|
|
|
367
371
|
<span class="collapser ${isOpen ? 'open' : ''}"> ${chevronIcon} </span>
|
|
368
372
|
`;
|
|
369
373
|
|
|
374
|
+
const toggleCollapsed = () => {
|
|
375
|
+
const newOpenFacets = { ...this.openFacets };
|
|
376
|
+
newOpenFacets[key] = !isOpen;
|
|
377
|
+
this.openFacets = newOpenFacets;
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
const headerId = `facet-group-header-label-${facetGroup.key}`;
|
|
370
381
|
return html`
|
|
371
|
-
<
|
|
382
|
+
<section
|
|
383
|
+
class="facet-group ${this.collapsableFacets ? 'mobile' : ''}"
|
|
384
|
+
aria-labelledby=${headerId}
|
|
385
|
+
>
|
|
372
386
|
<div class="facet-group-header">
|
|
373
|
-
<
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
this.openFacets = newOpenFacets;
|
|
378
|
-
}}
|
|
379
|
-
@keyup=${() => {
|
|
380
|
-
const newOpenFacets = { ...this.openFacets };
|
|
381
|
-
newOpenFacets[key] = !isOpen;
|
|
382
|
-
this.openFacets = newOpenFacets;
|
|
383
|
-
}}
|
|
387
|
+
<h3
|
|
388
|
+
id=${headerId}
|
|
389
|
+
@click=${toggleCollapsed}
|
|
390
|
+
@keyup=${toggleCollapsed}
|
|
384
391
|
>
|
|
385
392
|
${this.collapsableFacets ? collapser : nothing} ${facetGroup.title}
|
|
386
|
-
|
|
393
|
+
<span class="sr-only">filters</span>
|
|
394
|
+
</h3>
|
|
387
395
|
</div>
|
|
388
396
|
<div class="facet-group-content ${isOpen ? 'open' : ''}">
|
|
389
397
|
${this.facetsLoading
|
|
@@ -393,7 +401,7 @@ export class CollectionFacets extends LitElement {
|
|
|
393
401
|
${this.searchMoreFacetsLink(facetGroup)}
|
|
394
402
|
`}
|
|
395
403
|
</div>
|
|
396
|
-
</
|
|
404
|
+
</section>
|
|
397
405
|
`;
|
|
398
406
|
}
|
|
399
407
|
|
|
@@ -493,6 +501,9 @@ export class CollectionFacets extends LitElement {
|
|
|
493
501
|
this.modalManager?.showModal({
|
|
494
502
|
config,
|
|
495
503
|
customModalContent,
|
|
504
|
+
userClosedModalCallback: () => {
|
|
505
|
+
this.modalManager?.classList.remove('more-search-facets');
|
|
506
|
+
},
|
|
496
507
|
});
|
|
497
508
|
}
|
|
498
509
|
|
|
@@ -519,87 +530,90 @@ export class CollectionFacets extends LitElement {
|
|
|
519
530
|
}
|
|
520
531
|
|
|
521
532
|
static get styles() {
|
|
522
|
-
return
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
533
|
+
return [
|
|
534
|
+
srOnlyStyle,
|
|
535
|
+
css`
|
|
536
|
+
#container.loading {
|
|
537
|
+
opacity: 0.5;
|
|
538
|
+
}
|
|
526
539
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
540
|
+
.histogram-loading-indicator {
|
|
541
|
+
width: 100%;
|
|
542
|
+
height: 2.25rem;
|
|
543
|
+
margin-top: 1.75rem;
|
|
544
|
+
font-size: 1.4rem;
|
|
545
|
+
text-align: center;
|
|
546
|
+
}
|
|
534
547
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
548
|
+
.collapser {
|
|
549
|
+
display: inline-block;
|
|
550
|
+
cursor: pointer;
|
|
551
|
+
width: 10px;
|
|
552
|
+
height: 10px;
|
|
553
|
+
}
|
|
541
554
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
555
|
+
.collapser svg {
|
|
556
|
+
transition: transform 0.2s ease-in-out;
|
|
557
|
+
}
|
|
545
558
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
559
|
+
.collapser.open svg {
|
|
560
|
+
transform: rotate(90deg);
|
|
561
|
+
}
|
|
549
562
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
563
|
+
.facet-group:not(:last-child) {
|
|
564
|
+
margin-bottom: 2rem;
|
|
565
|
+
}
|
|
553
566
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
567
|
+
.facet-group h3 {
|
|
568
|
+
margin-bottom: 0.7rem;
|
|
569
|
+
}
|
|
557
570
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
571
|
+
.facet-group.mobile h3 {
|
|
572
|
+
cursor: pointer;
|
|
573
|
+
}
|
|
561
574
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
575
|
+
.facet-group-header {
|
|
576
|
+
display: flex;
|
|
577
|
+
margin-bottom: 0.7rem;
|
|
578
|
+
justify-content: space-between;
|
|
579
|
+
border-bottom: 1px solid rgb(232, 232, 232);
|
|
580
|
+
}
|
|
568
581
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
582
|
+
.facet-group-content {
|
|
583
|
+
transition: max-height 0.2s ease-in-out;
|
|
584
|
+
}
|
|
572
585
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
586
|
+
.facet-group.mobile .facet-group-content {
|
|
587
|
+
max-height: 0;
|
|
588
|
+
overflow: hidden;
|
|
589
|
+
}
|
|
577
590
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
591
|
+
.facet-group.mobile .facet-group-content.open {
|
|
592
|
+
max-height: 2000px;
|
|
593
|
+
}
|
|
581
594
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
595
|
+
h3 {
|
|
596
|
+
font-size: 1.4rem;
|
|
597
|
+
font-weight: 200
|
|
598
|
+
padding-bottom: 3px;
|
|
599
|
+
margin: 0;
|
|
600
|
+
}
|
|
588
601
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
602
|
+
.more-link {
|
|
603
|
+
font-size: 1.2rem;
|
|
604
|
+
text-decoration: none;
|
|
605
|
+
padding: 0;
|
|
606
|
+
background: inherit;
|
|
607
|
+
border: 0;
|
|
608
|
+
color: var(--ia-theme-link-color, #4b64ff);
|
|
609
|
+
cursor: pointer;
|
|
610
|
+
}
|
|
598
611
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
612
|
+
.sorting-icon {
|
|
613
|
+
height: 15px;
|
|
614
|
+
cursor: pointer;
|
|
615
|
+
}
|
|
616
|
+
`,
|
|
617
|
+
];
|
|
604
618
|
}
|
|
605
619
|
}
|