@internetarchive/collection-browser 4.1.0 → 4.2.0-alpha-webdev8164.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.
- package/.editorconfig +29 -29
- package/.github/workflows/ci.yml +27 -27
- package/.github/workflows/gh-pages-main.yml +39 -39
- package/.github/workflows/npm-publish.yml +39 -39
- package/.github/workflows/pr-preview.yml +38 -38
- package/.husky/pre-commit +1 -1
- package/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/src/collection-browser.js +761 -761
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facets-template.js +5 -0
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.d.ts +95 -8
- package/dist/src/collection-facets/more-facets-content.js +576 -102
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.d.ts +12 -3
- package/dist/src/collection-facets/more-facets-pagination.js +71 -9
- package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
- package/dist/src/collection-facets/toggle-switch.js +1 -0
- package/dist/src/collection-facets/toggle-switch.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.js +280 -280
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/test/collection-browser.test.js +189 -189
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-content.test.js +162 -3
- package/dist/test/collection-facets/more-facets-content.test.js.map +1 -1
- package/dist/test/collection-facets/more-facets-pagination.test.js +63 -3
- package/dist/test/collection-facets/more-facets-pagination.test.js.map +1 -1
- package/dist/test/mocks/mock-search-responses.d.ts +5 -0
- package/dist/test/mocks/mock-search-responses.js +44 -0
- package/dist/test/mocks/mock-search-responses.js.map +1 -1
- package/dist/test/mocks/mock-search-service.js +2 -1
- package/dist/test/mocks/mock-search-service.js.map +1 -1
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js +22 -22
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +121 -120
- package/renovate.json +6 -6
- package/src/collection-browser.ts +3070 -3070
- package/src/collection-facets/facets-template.ts +5 -0
- package/src/collection-facets/more-facets-content.ts +625 -113
- package/src/collection-facets/more-facets-pagination.ts +84 -10
- package/src/collection-facets/toggle-switch.ts +1 -0
- package/src/data-source/collection-browser-data-source.ts +1444 -1444
- package/src/data-source/collection-browser-query-state.ts +60 -60
- package/src/sort-filter-bar/sort-filter-bar.ts +733 -733
- package/test/collection-browser.test.ts +2402 -2402
- package/test/collection-facets/more-facets-content.test.ts +251 -4
- package/test/collection-facets/more-facets-pagination.test.ts +87 -3
- package/test/mocks/mock-search-responses.ts +48 -0
- package/test/mocks/mock-search-service.ts +2 -0
- package/test/sort-filter-bar/sort-filter-bar.test.ts +443 -443
- package/tsconfig.json +25 -25
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +52 -52
- package/.claude/settings.local.json +0 -8
|
@@ -62,35 +62,35 @@ let SortFilterBar = class SortFilterBar extends LitElement {
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
|
-
return html `
|
|
66
|
-
<div id="container">
|
|
67
|
-
<section id="sort-bar" aria-label="Sorting options">
|
|
68
|
-
<slot name="sort-options-left"></slot>
|
|
69
|
-
<div id="sort-options">
|
|
65
|
+
return html `
|
|
66
|
+
<div id="container">
|
|
67
|
+
<section id="sort-bar" aria-label="Sorting options">
|
|
68
|
+
<slot name="sort-options-left"></slot>
|
|
69
|
+
<div id="sort-options">
|
|
70
70
|
${!this.enableSortOptionsSlot
|
|
71
|
-
? html `
|
|
72
|
-
<div class="sort-direction-container">
|
|
73
|
-
${this.sortDirectionSelectorTemplate}
|
|
74
|
-
</div>
|
|
75
|
-
<span class="sort-by-text">${msg('Sort by:')}</span>
|
|
76
|
-
<div id="sort-selector-container">
|
|
77
|
-
${this.sortSelectorTemplate}
|
|
78
|
-
</div>
|
|
71
|
+
? html `
|
|
72
|
+
<div class="sort-direction-container">
|
|
73
|
+
${this.sortDirectionSelectorTemplate}
|
|
74
|
+
</div>
|
|
75
|
+
<span class="sort-by-text">${msg('Sort by:')}</span>
|
|
76
|
+
<div id="sort-selector-container">
|
|
77
|
+
${this.sortSelectorTemplate}
|
|
78
|
+
</div>
|
|
79
79
|
`
|
|
80
|
-
: html `<slot name="sort-options"></slot>`}
|
|
81
|
-
</div>
|
|
82
|
-
<slot name="sort-options-right"></slot>
|
|
83
|
-
|
|
80
|
+
: html `<slot name="sort-options"></slot>`}
|
|
81
|
+
</div>
|
|
82
|
+
<slot name="sort-options-right"></slot>
|
|
83
|
+
|
|
84
84
|
${this.suppressDisplayModes
|
|
85
85
|
? nothing
|
|
86
|
-
: html `<div id="display-style-selector">
|
|
87
|
-
${this.displayOptionTemplate}
|
|
88
|
-
</div>`}
|
|
89
|
-
</section>
|
|
90
|
-
|
|
91
|
-
${this.dropdownBackdropVisible ? this.dropdownBackdrop : nothing}
|
|
92
|
-
${this.alphaBarTemplate}
|
|
93
|
-
</div>
|
|
86
|
+
: html `<div id="display-style-selector">
|
|
87
|
+
${this.displayOptionTemplate}
|
|
88
|
+
</div>`}
|
|
89
|
+
</section>
|
|
90
|
+
|
|
91
|
+
${this.dropdownBackdropVisible ? this.dropdownBackdrop : nothing}
|
|
92
|
+
${this.alphaBarTemplate}
|
|
93
|
+
</div>
|
|
94
94
|
`;
|
|
95
95
|
}
|
|
96
96
|
willUpdate(changed) {
|
|
@@ -153,16 +153,16 @@ let SortFilterBar = class SortFilterBar extends LitElement {
|
|
|
153
153
|
const buttonLabel = this.canChangeSortDirection
|
|
154
154
|
? msg(str `Change to ${oppositeSortDirectionReadable} sort`)
|
|
155
155
|
: msg('Directions are not available for the current sort option');
|
|
156
|
-
return html `
|
|
157
|
-
<button
|
|
158
|
-
class="sort-direction-selector"
|
|
159
|
-
title=${buttonLabel}
|
|
160
|
-
?disabled=${!this.canChangeSortDirection}
|
|
161
|
-
@click=${this.handleSortDirectionClicked}
|
|
162
|
-
>
|
|
163
|
-
<span class="sr-only">${buttonLabel}</span>
|
|
164
|
-
${this.sortDirectionIcon}
|
|
165
|
-
</button>
|
|
156
|
+
return html `
|
|
157
|
+
<button
|
|
158
|
+
class="sort-direction-selector"
|
|
159
|
+
title=${buttonLabel}
|
|
160
|
+
?disabled=${!this.canChangeSortDirection}
|
|
161
|
+
@click=${this.handleSortDirectionClicked}
|
|
162
|
+
>
|
|
163
|
+
<span class="sr-only">${buttonLabel}</span>
|
|
164
|
+
${this.sortDirectionIcon}
|
|
165
|
+
</button>
|
|
166
166
|
`;
|
|
167
167
|
}
|
|
168
168
|
/** Template to render the sort direction button's icon in the correct current state */
|
|
@@ -172,17 +172,17 @@ let SortFilterBar = class SortFilterBar extends LitElement {
|
|
|
172
172
|
return html `<div class="sort-direction-icon">${sortDisabledIcon}</div>`;
|
|
173
173
|
}
|
|
174
174
|
// For all other sorts, show the ascending/descending direction
|
|
175
|
-
return html `
|
|
176
|
-
<div class="sort-direction-icon">
|
|
177
|
-
${this.finalizedSortDirection === 'asc' ? sortUpIcon : sortDownIcon}
|
|
178
|
-
</div>
|
|
175
|
+
return html `
|
|
176
|
+
<div class="sort-direction-icon">
|
|
177
|
+
${this.finalizedSortDirection === 'asc' ? sortUpIcon : sortDownIcon}
|
|
178
|
+
</div>
|
|
179
179
|
`;
|
|
180
180
|
}
|
|
181
181
|
/** The template to render all the sort options in a single dropdown */
|
|
182
182
|
get sortSelectorTemplate() {
|
|
183
183
|
const displayedOptions = Object.values(SORT_OPTIONS).filter(opt => opt.shownInSortBar && this.sortFieldAvailability[opt.field]);
|
|
184
|
-
return html `
|
|
185
|
-
<div id="sort-dropdown-container">
|
|
184
|
+
return html `
|
|
185
|
+
<div id="sort-dropdown-container">
|
|
186
186
|
${this.getSortDropdown({
|
|
187
187
|
displayName: SORT_OPTIONS[this.finalizedSortField].displayName,
|
|
188
188
|
id: 'sort-dropdown',
|
|
@@ -194,8 +194,8 @@ let SortFilterBar = class SortFilterBar extends LitElement {
|
|
|
194
194
|
this.dropdownBackdropVisible = this.sortOptionsDropdown.open;
|
|
195
195
|
this.sortOptionsDropdown.classList.toggle('open', this.sortOptionsDropdown.open);
|
|
196
196
|
},
|
|
197
|
-
})}
|
|
198
|
-
</div>
|
|
197
|
+
})}
|
|
198
|
+
</div>
|
|
199
199
|
`;
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
@@ -211,37 +211,37 @@ let SortFilterBar = class SortFilterBar extends LitElement {
|
|
|
211
211
|
* @param options.onDropdownClick A handler for click events on the dropdown
|
|
212
212
|
*/
|
|
213
213
|
getSortDropdown(options) {
|
|
214
|
-
return html `
|
|
215
|
-
<ia-dropdown
|
|
216
|
-
id=${options.id}
|
|
217
|
-
class=${options.selected ? 'selected' : ''}
|
|
218
|
-
displayCaret
|
|
219
|
-
closeOnSelect
|
|
220
|
-
includeSelectedOption
|
|
221
|
-
.openViaButton=${options.selected}
|
|
222
|
-
.options=${options.dropdownOptions}
|
|
223
|
-
.selectedOption=${options.selectedOption ?? ''}
|
|
224
|
-
@optionSelected=${options.onOptionSelected ?? nothing}
|
|
225
|
-
@click=${options.onDropdownClick ?? nothing}
|
|
226
|
-
>
|
|
227
|
-
<span
|
|
228
|
-
class="dropdown-label"
|
|
229
|
-
slot="dropdown-label"
|
|
230
|
-
data-title=${options.displayName}
|
|
231
|
-
>
|
|
232
|
-
${options.displayName}
|
|
233
|
-
</span>
|
|
234
|
-
</ia-dropdown>
|
|
214
|
+
return html `
|
|
215
|
+
<ia-dropdown
|
|
216
|
+
id=${options.id}
|
|
217
|
+
class=${options.selected ? 'selected' : ''}
|
|
218
|
+
displayCaret
|
|
219
|
+
closeOnSelect
|
|
220
|
+
includeSelectedOption
|
|
221
|
+
.openViaButton=${options.selected}
|
|
222
|
+
.options=${options.dropdownOptions}
|
|
223
|
+
.selectedOption=${options.selectedOption ?? ''}
|
|
224
|
+
@optionSelected=${options.onOptionSelected ?? nothing}
|
|
225
|
+
@click=${options.onDropdownClick ?? nothing}
|
|
226
|
+
>
|
|
227
|
+
<span
|
|
228
|
+
class="dropdown-label"
|
|
229
|
+
slot="dropdown-label"
|
|
230
|
+
data-title=${options.displayName}
|
|
231
|
+
>
|
|
232
|
+
${options.displayName}
|
|
233
|
+
</span>
|
|
234
|
+
</ia-dropdown>
|
|
235
235
|
`;
|
|
236
236
|
}
|
|
237
237
|
/** Generates a single dropdown option object for the given sort field */
|
|
238
238
|
getDropdownOption(sortField) {
|
|
239
239
|
return {
|
|
240
240
|
id: sortField,
|
|
241
|
-
label: html `
|
|
242
|
-
<span class="dropdown-option-label">
|
|
243
|
-
${SORT_OPTIONS[sortField].displayName}
|
|
244
|
-
</span>
|
|
241
|
+
label: html `
|
|
242
|
+
<span class="dropdown-option-label">
|
|
243
|
+
${SORT_OPTIONS[sortField].displayName}
|
|
244
|
+
</span>
|
|
245
245
|
`,
|
|
246
246
|
};
|
|
247
247
|
}
|
|
@@ -263,48 +263,48 @@ let SortFilterBar = class SortFilterBar extends LitElement {
|
|
|
263
263
|
/** Template for rendering the three display mode options */
|
|
264
264
|
/** Added data-testid for Playwright testing * */
|
|
265
265
|
get displayOptionTemplate() {
|
|
266
|
-
return html `
|
|
267
|
-
<ul>
|
|
268
|
-
<li>
|
|
269
|
-
<button
|
|
270
|
-
id="grid-button"
|
|
266
|
+
return html `
|
|
267
|
+
<ul>
|
|
268
|
+
<li>
|
|
269
|
+
<button
|
|
270
|
+
id="grid-button"
|
|
271
271
|
@click=${() => {
|
|
272
272
|
this.displayMode = 'grid';
|
|
273
|
-
}}
|
|
274
|
-
class=${this.displayMode === 'grid' ? 'active' : ''}
|
|
275
|
-
title="Tile view"
|
|
276
|
-
data-testid="grid-button"
|
|
277
|
-
>
|
|
278
|
-
${tileIcon}
|
|
279
|
-
</button>
|
|
280
|
-
</li>
|
|
281
|
-
<li>
|
|
282
|
-
<button
|
|
283
|
-
id="list-detail-button"
|
|
273
|
+
}}
|
|
274
|
+
class=${this.displayMode === 'grid' ? 'active' : ''}
|
|
275
|
+
title="Tile view"
|
|
276
|
+
data-testid="grid-button"
|
|
277
|
+
>
|
|
278
|
+
${tileIcon}
|
|
279
|
+
</button>
|
|
280
|
+
</li>
|
|
281
|
+
<li>
|
|
282
|
+
<button
|
|
283
|
+
id="list-detail-button"
|
|
284
284
|
@click=${() => {
|
|
285
285
|
this.displayMode = 'list-detail';
|
|
286
|
-
}}
|
|
287
|
-
class=${this.displayMode === 'list-detail' ? 'active' : ''}
|
|
288
|
-
title="List view"
|
|
289
|
-
data-testid="list-detail-button"
|
|
290
|
-
>
|
|
291
|
-
${listIcon}
|
|
292
|
-
</button>
|
|
293
|
-
</li>
|
|
294
|
-
<li>
|
|
295
|
-
<button
|
|
296
|
-
id="list-compact-button"
|
|
286
|
+
}}
|
|
287
|
+
class=${this.displayMode === 'list-detail' ? 'active' : ''}
|
|
288
|
+
title="List view"
|
|
289
|
+
data-testid="list-detail-button"
|
|
290
|
+
>
|
|
291
|
+
${listIcon}
|
|
292
|
+
</button>
|
|
293
|
+
</li>
|
|
294
|
+
<li>
|
|
295
|
+
<button
|
|
296
|
+
id="list-compact-button"
|
|
297
297
|
@click=${() => {
|
|
298
298
|
this.displayMode = 'list-compact';
|
|
299
|
-
}}
|
|
300
|
-
class=${this.displayMode === 'list-compact' ? 'active' : ''}
|
|
301
|
-
title="Compact list view"
|
|
302
|
-
data-testid="list-compact-button"
|
|
303
|
-
>
|
|
304
|
-
${compactIcon}
|
|
305
|
-
</button>
|
|
306
|
-
</li>
|
|
307
|
-
</ul>
|
|
299
|
+
}}
|
|
300
|
+
class=${this.displayMode === 'list-compact' ? 'active' : ''}
|
|
301
|
+
title="Compact list view"
|
|
302
|
+
data-testid="list-compact-button"
|
|
303
|
+
>
|
|
304
|
+
${compactIcon}
|
|
305
|
+
</button>
|
|
306
|
+
</li>
|
|
307
|
+
</ul>
|
|
308
308
|
`;
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
@@ -312,12 +312,12 @@ let SortFilterBar = class SortFilterBar extends LitElement {
|
|
|
312
312
|
* dropdown menu while it is open.
|
|
313
313
|
*/
|
|
314
314
|
get dropdownBackdrop() {
|
|
315
|
-
return html `
|
|
316
|
-
<div
|
|
317
|
-
id="sort-selector-backdrop"
|
|
318
|
-
@keyup=${this.closeDropdown}
|
|
319
|
-
@click=${this.closeDropdown}
|
|
320
|
-
></div>
|
|
315
|
+
return html `
|
|
316
|
+
<div
|
|
317
|
+
id="sort-selector-backdrop"
|
|
318
|
+
@keyup=${this.closeDropdown}
|
|
319
|
+
@click=${this.closeDropdown}
|
|
320
|
+
></div>
|
|
321
321
|
`;
|
|
322
322
|
}
|
|
323
323
|
/** Closes the sorting dropdown component's menus */
|
|
@@ -381,19 +381,19 @@ let SortFilterBar = class SortFilterBar extends LitElement {
|
|
|
381
381
|
return SORT_OPTIONS[this.finalizedSortField].canSetDirection;
|
|
382
382
|
}
|
|
383
383
|
get titleSelectorBar() {
|
|
384
|
-
return html ` <alpha-bar
|
|
385
|
-
.selectedLetter=${this.selectedTitleFilter}
|
|
386
|
-
.letterCounts=${this.prefixFilterCountMap?.title}
|
|
387
|
-
ariaLandmarkLabel="Filter by title letter"
|
|
388
|
-
@letterChanged=${this.titleLetterChanged}
|
|
384
|
+
return html ` <alpha-bar
|
|
385
|
+
.selectedLetter=${this.selectedTitleFilter}
|
|
386
|
+
.letterCounts=${this.prefixFilterCountMap?.title}
|
|
387
|
+
ariaLandmarkLabel="Filter by title letter"
|
|
388
|
+
@letterChanged=${this.titleLetterChanged}
|
|
389
389
|
></alpha-bar>`;
|
|
390
390
|
}
|
|
391
391
|
get creatorSelectorBar() {
|
|
392
|
-
return html ` <alpha-bar
|
|
393
|
-
.selectedLetter=${this.selectedCreatorFilter}
|
|
394
|
-
.letterCounts=${this.prefixFilterCountMap?.creator}
|
|
395
|
-
ariaLandmarkLabel="Filter by creator letter"
|
|
396
|
-
@letterChanged=${this.creatorLetterChanged}
|
|
392
|
+
return html ` <alpha-bar
|
|
393
|
+
.selectedLetter=${this.selectedCreatorFilter}
|
|
394
|
+
.letterCounts=${this.prefixFilterCountMap?.creator}
|
|
395
|
+
ariaLandmarkLabel="Filter by creator letter"
|
|
396
|
+
@letterChanged=${this.creatorLetterChanged}
|
|
397
397
|
></alpha-bar>`;
|
|
398
398
|
}
|
|
399
399
|
titleLetterChanged(e) {
|
|
@@ -435,166 +435,166 @@ let SortFilterBar = class SortFilterBar extends LitElement {
|
|
|
435
435
|
const disabledIconColor = css `#bbbbbb`;
|
|
436
436
|
return [
|
|
437
437
|
srOnlyStyle,
|
|
438
|
-
css `
|
|
439
|
-
#container {
|
|
440
|
-
position: relative;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
#sort-bar {
|
|
444
|
-
display: flex;
|
|
445
|
-
justify-content: flex-start;
|
|
446
|
-
align-items: center;
|
|
447
|
-
padding-bottom: 1px;
|
|
448
|
-
border-bottom: 1px solid #2c2c2c;
|
|
449
|
-
font-size: 1.4rem;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
#sort-options {
|
|
453
|
-
display: flex;
|
|
454
|
-
align-items: center;
|
|
455
|
-
flex-grow: 1;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
ul {
|
|
459
|
-
list-style: none;
|
|
460
|
-
display: flex;
|
|
461
|
-
align-items: center;
|
|
462
|
-
margin: 0;
|
|
463
|
-
padding: 0;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
li {
|
|
467
|
-
padding: 0;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
.sort-by-text {
|
|
471
|
-
margin-right: 5px;
|
|
472
|
-
font-weight: bold;
|
|
473
|
-
white-space: nowrap;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.sort-direction-container {
|
|
477
|
-
display: flex;
|
|
478
|
-
align-self: stretch;
|
|
479
|
-
flex: 0;
|
|
480
|
-
margin: 0 3px;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.sort-direction-selector {
|
|
484
|
-
display: flex;
|
|
485
|
-
justify-content: center;
|
|
486
|
-
width: 30px;
|
|
487
|
-
margin: 0 5px 0 0;
|
|
488
|
-
padding: 7px 8px;
|
|
489
|
-
max-height: fit-content;
|
|
490
|
-
border-radius: 5px;
|
|
491
|
-
background: white;
|
|
492
|
-
border: 1px solid rgb(25, 72, 128);
|
|
493
|
-
appearance: none;
|
|
494
|
-
cursor: pointer;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
.sort-direction-selector:disabled {
|
|
498
|
-
cursor: not-allowed;
|
|
499
|
-
border-color: ${disabledIconColor};
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.sort-direction-icon {
|
|
503
|
-
display: flex;
|
|
504
|
-
align-items: center;
|
|
505
|
-
background: none;
|
|
506
|
-
color: inherit;
|
|
507
|
-
border: none;
|
|
508
|
-
padding: 0;
|
|
509
|
-
outline: inherit;
|
|
510
|
-
width: 12px;
|
|
511
|
-
height: 12px;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.sort-direction-icon > svg {
|
|
515
|
-
flex: 1;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
#sort-selector-container {
|
|
519
|
-
flex: 1;
|
|
520
|
-
display: flex;
|
|
521
|
-
justify-content: flex-start;
|
|
522
|
-
align-items: center;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
#sort-dropdown-container {
|
|
526
|
-
display: flex;
|
|
527
|
-
justify-content: flex-start;
|
|
528
|
-
align-items: center;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
#sort-selector-backdrop {
|
|
532
|
-
position: fixed;
|
|
533
|
-
top: 0;
|
|
534
|
-
left: 0;
|
|
535
|
-
width: 100vw;
|
|
536
|
-
height: 100vh;
|
|
537
|
-
z-index: 1;
|
|
538
|
-
background-color: transparent;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
#display-style-selector {
|
|
542
|
-
flex: 0;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
#display-style-selector button {
|
|
546
|
-
background: none;
|
|
547
|
-
color: inherit;
|
|
548
|
-
border: none;
|
|
549
|
-
appearance: none;
|
|
550
|
-
cursor: pointer;
|
|
551
|
-
-webkit-appearance: none;
|
|
552
|
-
fill: ${disabledIconColor};
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
#display-style-selector button.active {
|
|
556
|
-
fill: var(--ia-theme-primary-text-color, #2c2c2c);
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
#display-style-selector button svg {
|
|
560
|
-
width: 24px;
|
|
561
|
-
height: 24px;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
ia-dropdown {
|
|
565
|
-
--dropdownTextColor: white;
|
|
566
|
-
--dropdownOffsetTop: 0;
|
|
567
|
-
--dropdownBorderTopWidth: 0;
|
|
568
|
-
--dropdownBorderTopLeftRadius: 0;
|
|
569
|
-
--dropdownBorderTopRightRadius: 0;
|
|
570
|
-
--dropdownWhiteSpace: nowrap;
|
|
571
|
-
--dropdownListZIndex: 2;
|
|
572
|
-
--dropdownCaretColor: var(--ia-theme-primary-text-color, #2c2c2c);
|
|
573
|
-
--dropdownSelectedTextColor: white;
|
|
574
|
-
--dropdownSelectedBgColor: rgba(255, 255, 255, 0.3);
|
|
575
|
-
--dropdownHoverBgColor: rgba(255, 255, 255, 0.3);
|
|
576
|
-
--caretHeight: 9px;
|
|
577
|
-
--caretWidth: 12px;
|
|
578
|
-
--caretPadding: 0 5px 0 0;
|
|
579
|
-
}
|
|
580
|
-
ia-dropdown.selected .dropdown-label {
|
|
581
|
-
font-weight: bold;
|
|
582
|
-
}
|
|
583
|
-
ia-dropdown.open {
|
|
584
|
-
z-index: 2;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
.dropdown-label {
|
|
588
|
-
display: inline-block;
|
|
589
|
-
height: 100%;
|
|
590
|
-
padding-left: 5px;
|
|
591
|
-
font-size: 1.4rem;
|
|
592
|
-
font-family: var(--ia-theme-base-font-family);
|
|
593
|
-
line-height: 2;
|
|
594
|
-
color: var(--ia-theme-primary-text-color, #2c2c2c);
|
|
595
|
-
white-space: nowrap;
|
|
596
|
-
user-select: none;
|
|
597
|
-
}
|
|
438
|
+
css `
|
|
439
|
+
#container {
|
|
440
|
+
position: relative;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
#sort-bar {
|
|
444
|
+
display: flex;
|
|
445
|
+
justify-content: flex-start;
|
|
446
|
+
align-items: center;
|
|
447
|
+
padding-bottom: 1px;
|
|
448
|
+
border-bottom: 1px solid #2c2c2c;
|
|
449
|
+
font-size: 1.4rem;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
#sort-options {
|
|
453
|
+
display: flex;
|
|
454
|
+
align-items: center;
|
|
455
|
+
flex-grow: 1;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
ul {
|
|
459
|
+
list-style: none;
|
|
460
|
+
display: flex;
|
|
461
|
+
align-items: center;
|
|
462
|
+
margin: 0;
|
|
463
|
+
padding: 0;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
li {
|
|
467
|
+
padding: 0;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.sort-by-text {
|
|
471
|
+
margin-right: 5px;
|
|
472
|
+
font-weight: bold;
|
|
473
|
+
white-space: nowrap;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.sort-direction-container {
|
|
477
|
+
display: flex;
|
|
478
|
+
align-self: stretch;
|
|
479
|
+
flex: 0;
|
|
480
|
+
margin: 0 3px;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.sort-direction-selector {
|
|
484
|
+
display: flex;
|
|
485
|
+
justify-content: center;
|
|
486
|
+
width: 30px;
|
|
487
|
+
margin: 0 5px 0 0;
|
|
488
|
+
padding: 7px 8px;
|
|
489
|
+
max-height: fit-content;
|
|
490
|
+
border-radius: 5px;
|
|
491
|
+
background: white;
|
|
492
|
+
border: 1px solid rgb(25, 72, 128);
|
|
493
|
+
appearance: none;
|
|
494
|
+
cursor: pointer;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.sort-direction-selector:disabled {
|
|
498
|
+
cursor: not-allowed;
|
|
499
|
+
border-color: ${disabledIconColor};
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.sort-direction-icon {
|
|
503
|
+
display: flex;
|
|
504
|
+
align-items: center;
|
|
505
|
+
background: none;
|
|
506
|
+
color: inherit;
|
|
507
|
+
border: none;
|
|
508
|
+
padding: 0;
|
|
509
|
+
outline: inherit;
|
|
510
|
+
width: 12px;
|
|
511
|
+
height: 12px;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.sort-direction-icon > svg {
|
|
515
|
+
flex: 1;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
#sort-selector-container {
|
|
519
|
+
flex: 1;
|
|
520
|
+
display: flex;
|
|
521
|
+
justify-content: flex-start;
|
|
522
|
+
align-items: center;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
#sort-dropdown-container {
|
|
526
|
+
display: flex;
|
|
527
|
+
justify-content: flex-start;
|
|
528
|
+
align-items: center;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
#sort-selector-backdrop {
|
|
532
|
+
position: fixed;
|
|
533
|
+
top: 0;
|
|
534
|
+
left: 0;
|
|
535
|
+
width: 100vw;
|
|
536
|
+
height: 100vh;
|
|
537
|
+
z-index: 1;
|
|
538
|
+
background-color: transparent;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
#display-style-selector {
|
|
542
|
+
flex: 0;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
#display-style-selector button {
|
|
546
|
+
background: none;
|
|
547
|
+
color: inherit;
|
|
548
|
+
border: none;
|
|
549
|
+
appearance: none;
|
|
550
|
+
cursor: pointer;
|
|
551
|
+
-webkit-appearance: none;
|
|
552
|
+
fill: ${disabledIconColor};
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
#display-style-selector button.active {
|
|
556
|
+
fill: var(--ia-theme-primary-text-color, #2c2c2c);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
#display-style-selector button svg {
|
|
560
|
+
width: 24px;
|
|
561
|
+
height: 24px;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
ia-dropdown {
|
|
565
|
+
--dropdownTextColor: white;
|
|
566
|
+
--dropdownOffsetTop: 0;
|
|
567
|
+
--dropdownBorderTopWidth: 0;
|
|
568
|
+
--dropdownBorderTopLeftRadius: 0;
|
|
569
|
+
--dropdownBorderTopRightRadius: 0;
|
|
570
|
+
--dropdownWhiteSpace: nowrap;
|
|
571
|
+
--dropdownListZIndex: 2;
|
|
572
|
+
--dropdownCaretColor: var(--ia-theme-primary-text-color, #2c2c2c);
|
|
573
|
+
--dropdownSelectedTextColor: white;
|
|
574
|
+
--dropdownSelectedBgColor: rgba(255, 255, 255, 0.3);
|
|
575
|
+
--dropdownHoverBgColor: rgba(255, 255, 255, 0.3);
|
|
576
|
+
--caretHeight: 9px;
|
|
577
|
+
--caretWidth: 12px;
|
|
578
|
+
--caretPadding: 0 5px 0 0;
|
|
579
|
+
}
|
|
580
|
+
ia-dropdown.selected .dropdown-label {
|
|
581
|
+
font-weight: bold;
|
|
582
|
+
}
|
|
583
|
+
ia-dropdown.open {
|
|
584
|
+
z-index: 2;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.dropdown-label {
|
|
588
|
+
display: inline-block;
|
|
589
|
+
height: 100%;
|
|
590
|
+
padding-left: 5px;
|
|
591
|
+
font-size: 1.4rem;
|
|
592
|
+
font-family: var(--ia-theme-base-font-family);
|
|
593
|
+
line-height: 2;
|
|
594
|
+
color: var(--ia-theme-primary-text-color, #2c2c2c);
|
|
595
|
+
white-space: nowrap;
|
|
596
|
+
user-select: none;
|
|
597
|
+
}
|
|
598
598
|
`,
|
|
599
599
|
];
|
|
600
600
|
}
|