@internetarchive/collection-browser 0.4.18 → 0.4.20

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 (63) hide show
  1. package/dist/src/collection-browser.d.ts +17 -2
  2. package/dist/src/collection-browser.js +359 -301
  3. package/dist/src/collection-browser.js.map +1 -1
  4. package/dist/src/collection-facets/facets-template.js +2 -0
  5. package/dist/src/collection-facets/facets-template.js.map +1 -1
  6. package/dist/src/collection-facets/more-facets-content.js +63 -70
  7. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  8. package/dist/src/collection-facets/more-facets-pagination.js +49 -55
  9. package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
  10. package/dist/src/collection-facets/toggle-switch.js +46 -56
  11. package/dist/src/collection-facets/toggle-switch.js.map +1 -1
  12. package/dist/src/collection-facets.d.ts +1 -1
  13. package/dist/src/collection-facets.js +94 -84
  14. package/dist/src/collection-facets.js.map +1 -1
  15. package/dist/src/sort-filter-bar/alpha-bar.d.ts +2 -1
  16. package/dist/src/sort-filter-bar/alpha-bar.js +33 -25
  17. package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
  18. package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +1 -1
  19. package/dist/src/sort-filter-bar/sort-filter-bar.js +198 -186
  20. package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
  21. package/dist/src/styles/sr-only.d.ts +1 -0
  22. package/dist/src/styles/sr-only.js +18 -0
  23. package/dist/src/styles/sr-only.js.map +1 -0
  24. package/dist/src/tiles/grid/account-tile.js +1 -1
  25. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  26. package/dist/src/tiles/grid/collection-tile.js +2 -2
  27. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  28. package/dist/src/tiles/grid/item-tile.js +2 -2
  29. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  30. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +5 -15
  31. package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
  32. package/dist/src/tiles/grid/tile-stats.js +58 -65
  33. package/dist/src/tiles/grid/tile-stats.js.map +1 -1
  34. package/dist/src/tiles/tile-dispatcher.js +3 -2
  35. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  36. package/dist/test/collection-browser.test.js +2 -2
  37. package/dist/test/collection-browser.test.js.map +1 -1
  38. package/dist/test/collection-facets.test.js +8 -5
  39. package/dist/test/collection-facets.test.js.map +1 -1
  40. package/dist/test/sort-filter-bar/alpha-bar.test.js +12 -12
  41. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -1
  42. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +2 -2
  43. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
  44. package/package.json +3 -3
  45. package/src/collection-browser.ts +368 -302
  46. package/src/collection-facets/facets-template.ts +2 -0
  47. package/src/collection-facets/more-facets-content.ts +63 -70
  48. package/src/collection-facets/more-facets-pagination.ts +49 -55
  49. package/src/collection-facets/toggle-switch.ts +51 -61
  50. package/src/collection-facets.ts +96 -85
  51. package/src/sort-filter-bar/alpha-bar.ts +26 -18
  52. package/src/sort-filter-bar/sort-filter-bar.ts +200 -186
  53. package/src/styles/sr-only.ts +18 -0
  54. package/src/tiles/grid/account-tile.ts +1 -1
  55. package/src/tiles/grid/collection-tile.ts +2 -2
  56. package/src/tiles/grid/item-tile.ts +2 -2
  57. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +5 -15
  58. package/src/tiles/grid/tile-stats.ts +66 -73
  59. package/src/tiles/tile-dispatcher.ts +1 -0
  60. package/test/collection-browser.test.ts +2 -2
  61. package/test/collection-facets.test.ts +10 -2
  62. package/test/sort-filter-bar/alpha-bar.test.ts +16 -12
  63. package/test/sort-filter-bar/sort-filter-bar.test.ts +2 -2
@@ -16,6 +16,7 @@ import { RestorationStateHandler, } from './restoration-state-handler';
16
16
  import chevronIcon from './assets/img/icons/chevron';
17
17
  import './empty-placeholder';
18
18
  import { analyticsActions, analyticsCategories, } from './utils/analytics-events';
19
+ import { srOnlyStyle } from './styles/sr-only';
19
20
  let CollectionBrowser = class CollectionBrowser extends LitElement {
20
21
  constructor() {
21
22
  super(...arguments);
@@ -249,7 +250,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
249
250
  class="column${this.isResizeToMobile ? ' preload' : ''}"
250
251
  >
251
252
  <div id="mobile-header-container">
252
- ${this.mobileView ? this.mobileFacetsTemplate : nothing}
253
+ ${this.mobileView
254
+ ? this.mobileFacetsTemplate
255
+ : html `<h2 id="facets-header" class="sr-only">Filters</h2>`}
253
256
  <div id="results-total">
254
257
  <span id="big-results-count">
255
258
  ${shouldShowSearching ? html `Searching&hellip;` : resultsCount}
@@ -259,15 +262,12 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
259
262
  </span>
260
263
  </div>
261
264
  </div>
262
- <div
263
- id="facets-container"
264
- class=${!this.mobileView || this.mobileFacetsVisible
265
- ? 'expanded'
266
- : ''}
267
- >
268
- ${this.facetsTemplate}
269
- <div id="facets-scroll-sentinel"></div>
270
- </div>
265
+ ${this.mobileView
266
+ ? nothing
267
+ : html `<div id="facets-container" aria-labelledby="facets-header">
268
+ ${this.facetsTemplate}
269
+ <div id="facets-scroll-sentinel"></div>
270
+ </div>`}
271
271
  ${this.mobileView ? nothing : html `<div id="facets-bottom-fade"></div>`}
272
272
  </div>
273
273
  <div id="right-column" class="column">
@@ -282,6 +282,7 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
282
282
  return html `<infinite-scroller
283
283
  class=${this.infiniteScrollerClasses}
284
284
  itemCount=${this.placeholderType ? 0 : nothing}
285
+ ariaLandmarkLabel="Search results"
285
286
  .cellProvider=${this}
286
287
  .placeholderCellTemplate=${this.placeholderCellTemplate}
287
288
  @scrollThresholdReached=${this.scrollThresholdReached}
@@ -425,27 +426,32 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
425
426
  this.selectedTitleFilter = null;
426
427
  this.selectedCreatorFilter = e.detail.selectedLetter;
427
428
  }
429
+ /**
430
+ * The full template for how the facets should be structured in mobile view,
431
+ * including the collapsible container (with header) and the facets themselves.
432
+ */
428
433
  get mobileFacetsTemplate() {
429
- return html `
430
- <div id="mobile-filter-collapse">
431
- <h1
432
- @click=${() => {
433
- this.isResizeToMobile = false;
434
- this.mobileFacetsVisible = !this.mobileFacetsVisible;
435
- }}
436
- @keyup=${() => {
434
+ const toggleFacetsVisible = () => {
437
435
  this.isResizeToMobile = false;
438
436
  this.mobileFacetsVisible = !this.mobileFacetsVisible;
439
- }}
440
- >
441
- <span class="collapser ${this.mobileFacetsVisible ? 'open' : ''}">
442
- ${chevronIcon}
443
- </span>
444
- Filters
445
- </h1>
446
- </div>
437
+ };
438
+ return html `
439
+ <details
440
+ id="mobile-filter-collapse"
441
+ @click=${toggleFacetsVisible}
442
+ @keyup=${toggleFacetsVisible}
443
+ >
444
+ <summary>
445
+ <span class="collapser-icon">${chevronIcon}</span>
446
+ <h2>Filters</h2>
447
+ </summary>
448
+ ${this.facetsTemplate}
449
+ </details>
447
450
  `;
448
451
  }
452
+ /**
453
+ * The template for the facets component alone, without any surrounding wrappers.
454
+ */
449
455
  get facetsTemplate() {
450
456
  return html `
451
457
  <collection-facets
@@ -711,7 +717,6 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
711
717
  this.dispatchEvent(event);
712
718
  }
713
719
  async handleQueryChange() {
714
- var _a;
715
720
  // only reset if the query has actually changed
716
721
  if (!this.searchService || this.pageFetchQueryKey === this.previousQueryKey)
717
722
  return;
@@ -722,11 +727,17 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
722
727
  this.fullYearsHistogramAggregation = undefined;
723
728
  this.pageFetchesInProgress = {};
724
729
  this.endOfDataReached = false;
725
- this.pagesToRender = this.initialPageNumber;
730
+ this.pagesToRender =
731
+ this.initialPageNumber === 1
732
+ ? 2 // First two pages are batched into one request when starting from page 1
733
+ : this.initialPageNumber;
726
734
  this.queryErrorMessage = undefined;
727
735
  // Reset the infinite scroller's item count, so that it
728
736
  // shows tile placeholders until the new query's results load in
729
- (_a = this.infiniteScroller) === null || _a === void 0 ? void 0 : _a.reload();
737
+ if (this.infiniteScroller) {
738
+ this.infiniteScroller.itemCount = this.estimatedTileCount;
739
+ this.infiniteScroller.reload();
740
+ }
730
741
  if (!this.initialQueryChangeHappened && this.initialPageNumber > 1) {
731
742
  this.scrollToPage(this.initialPageNumber);
732
743
  }
@@ -791,7 +802,8 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
791
802
  }
792
803
  async doInitialPageFetch() {
793
804
  this.searchResultsLoading = true;
794
- await this.fetchPage(this.initialPageNumber);
805
+ // Try to batch 2 initial page requests when possible
806
+ await this.fetchPage(this.initialPageNumber, 2);
795
807
  this.searchResultsLoading = false;
796
808
  }
797
809
  emitSearchResultsLoadingChanged() {
@@ -1048,7 +1060,15 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1048
1060
  get facetFetchQueryKey() {
1049
1061
  return `${this.fullQuery}-${this.searchType}`;
1050
1062
  }
1051
- async fetchPage(pageNumber) {
1063
+ /**
1064
+ * Fetches one or more pages of results and updates the data source.
1065
+ *
1066
+ * @param pageNumber The page number to fetch
1067
+ * @param numInitialPages If this is an initial page fetch (`pageNumber = 1`),
1068
+ * specifies how many pages to batch together in one request. Ignored
1069
+ * if `pageNumber != 1`, defaulting to a single page.
1070
+ */
1071
+ async fetchPage(pageNumber, numInitialPages = 1) {
1052
1072
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1053
1073
  const trimmedQuery = (_a = this.baseQuery) === null || _a === void 0 ? void 0 : _a.trim();
1054
1074
  if (!trimmedQuery)
@@ -1060,18 +1080,24 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1060
1080
  return;
1061
1081
  if (this.endOfDataReached)
1062
1082
  return;
1083
+ // Batch multiple initial page requests together if needed (e.g., can request
1084
+ // pages 1 and 2 together in a single request).
1085
+ const numPages = pageNumber === 1 ? numInitialPages : 1;
1086
+ const numRows = this.pageSize * numPages;
1063
1087
  // if a fetch is already in progress for this query and page, don't fetch again
1064
1088
  const { pageFetchQueryKey } = this;
1065
1089
  const pageFetches = (_b = this.pageFetchesInProgress[pageFetchQueryKey]) !== null && _b !== void 0 ? _b : new Set();
1066
1090
  if (pageFetches.has(pageNumber))
1067
1091
  return;
1068
- pageFetches.add(pageNumber);
1092
+ for (let i = 0; i < numPages; i += 1) {
1093
+ pageFetches.add(pageNumber + i);
1094
+ }
1069
1095
  this.pageFetchesInProgress[pageFetchQueryKey] = pageFetches;
1070
1096
  const sortParams = this.sortParam ? [this.sortParam] : [];
1071
1097
  const params = {
1072
1098
  query: trimmedQuery,
1073
1099
  page: pageNumber,
1074
- rows: this.pageSize,
1100
+ rows: numRows,
1075
1101
  sort: sortParams,
1076
1102
  filters: this.filterMap,
1077
1103
  aggregations: { omit: true },
@@ -1094,20 +1120,28 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1094
1120
  // @ts-ignore: Property 'Sentry' does not exist on type 'Window & typeof globalThis'
1095
1121
  (_g = (_f = window === null || window === void 0 ? void 0 : window.Sentry) === null || _f === void 0 ? void 0 : _f.captureMessage) === null || _g === void 0 ? void 0 : _g.call(_f, this.queryErrorMessage, 'error');
1096
1122
  }
1097
- (_h = this.pageFetchesInProgress[pageFetchQueryKey]) === null || _h === void 0 ? void 0 : _h.delete(pageNumber);
1123
+ for (let i = 0; i < numPages; i += 1) {
1124
+ (_h = this.pageFetchesInProgress[pageFetchQueryKey]) === null || _h === void 0 ? void 0 : _h.delete(pageNumber + i);
1125
+ }
1098
1126
  this.searchResultsLoading = false;
1099
1127
  return;
1100
1128
  }
1101
1129
  this.totalResults = success.response.totalResults;
1102
1130
  const { results, collectionTitles } = success.response;
1103
1131
  if (results && results.length > 0) {
1132
+ // Load any collection titles present on the response into the cache,
1133
+ // or queue up preload fetches for them if none were present.
1104
1134
  if (collectionTitles) {
1105
1135
  (_j = this.collectionNameCache) === null || _j === void 0 ? void 0 : _j.addKnownTitles(collectionTitles);
1106
1136
  }
1107
1137
  else {
1108
1138
  this.preloadCollectionNames(results);
1109
1139
  }
1110
- this.updateDataSource(pageNumber, results);
1140
+ // Update the data source for each returned page
1141
+ for (let i = 0; i < numPages; i += 1) {
1142
+ const pageStartIndex = this.pageSize * i;
1143
+ this.updateDataSource(pageNumber + i, results.slice(pageStartIndex, pageStartIndex + this.pageSize));
1144
+ }
1111
1145
  }
1112
1146
  // When we reach the end of the data, we can set the infinite scroller's
1113
1147
  // item count to the real total number of results (rather than the
@@ -1118,7 +1152,9 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1118
1152
  this.infiniteScroller.itemCount = this.totalResults;
1119
1153
  }
1120
1154
  }
1121
- (_k = this.pageFetchesInProgress[pageFetchQueryKey]) === null || _k === void 0 ? void 0 : _k.delete(pageNumber);
1155
+ for (let i = 0; i < numPages; i += 1) {
1156
+ (_k = this.pageFetchesInProgress[pageFetchQueryKey]) === null || _k === void 0 ? void 0 : _k.delete(pageNumber + i);
1157
+ }
1122
1158
  }
1123
1159
  preloadCollectionNames(results) {
1124
1160
  var _a;
@@ -1324,309 +1360,331 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1324
1360
  this.fetchPage(this.pagesToRender);
1325
1361
  }
1326
1362
  }
1327
- };
1328
- CollectionBrowser.styles = css `
1329
- :host {
1330
- display: block;
1363
+ static get styles() {
1364
+ return [
1365
+ srOnlyStyle,
1366
+ css `
1367
+ :host {
1368
+ display: block;
1369
+
1370
+ --leftColumnWidth: 18rem;
1371
+ --leftColumnPaddingRight: 2.5rem;
1372
+ }
1331
1373
 
1332
- --leftColumnWidth: 18rem;
1333
- --leftColumnPaddingRight: 2.5rem;
1334
- }
1374
+ /**
1375
+ * When page width resizes from desktop to mobile, use this class to
1376
+ * disable expand/collapse transition when loading.
1377
+ */
1378
+ .preload * {
1379
+ transition: none !important;
1380
+ -webkit-transition: none !important;
1381
+ -moz-transition: none !important;
1382
+ -ms-transition: none !important;
1383
+ -o-transition: none !important;
1384
+ }
1335
1385
 
1336
- /**
1337
- * When page width resizes from desktop to mobile, use this class to
1338
- * disable expand/collapse transition when loading.
1339
- */
1340
- .preload * {
1341
- transition: none !important;
1342
- -webkit-transition: none !important;
1343
- -moz-transition: none !important;
1344
- -ms-transition: none !important;
1345
- -o-transition: none !important;
1346
- }
1386
+ #content-container {
1387
+ display: flex;
1388
+ }
1347
1389
 
1348
- #content-container {
1349
- display: flex;
1350
- }
1390
+ .collapser-icon {
1391
+ display: inline-block;
1392
+ }
1351
1393
 
1352
- .collapser {
1353
- display: inline-block;
1354
- }
1394
+ .collapser-icon svg {
1395
+ display: inline-block;
1396
+ width: 12px;
1397
+ height: 12px;
1398
+ transition: transform 0.2s ease-out;
1399
+ }
1355
1400
 
1356
- .collapser svg {
1357
- width: 10px;
1358
- height: 10px;
1359
- transition: transform 0.2s ease-out;
1360
- }
1401
+ #mobile-filter-collapse > summary {
1402
+ cursor: pointer;
1403
+ list-style: none;
1404
+ }
1361
1405
 
1362
- .collapser.open svg {
1363
- transform: rotate(90deg);
1364
- }
1406
+ #mobile-filter-collapse[open] > summary {
1407
+ margin-bottom: 10px;
1408
+ }
1365
1409
 
1366
- #mobile-filter-collapse h1 {
1367
- cursor: pointer;
1368
- }
1410
+ #mobile-filter-collapse h2 {
1411
+ display: inline-block;
1412
+ margin: 0;
1413
+ font-size: 2rem;
1414
+ }
1369
1415
 
1370
- #content-container.mobile {
1371
- display: block;
1372
- }
1416
+ #mobile-filter-collapse[open] svg {
1417
+ transform: rotate(90deg);
1418
+ }
1373
1419
 
1374
- .column {
1375
- padding-top: 2rem;
1376
- }
1420
+ #content-container.mobile {
1421
+ display: block;
1422
+ }
1377
1423
 
1378
- #right-column {
1379
- flex: 1;
1380
- position: relative;
1381
- border-left: 1px solid rgb(232, 232, 232);
1382
- border-right: 1px solid rgb(232, 232, 232);
1383
- padding-left: 1rem;
1384
- padding-right: 1rem;
1385
- background: #fff;
1386
- }
1424
+ .column {
1425
+ padding-top: 2rem;
1426
+ }
1387
1427
 
1388
- .mobile #right-column {
1389
- border-left: none;
1390
- padding: 5px 5px 0;
1391
- }
1428
+ #right-column {
1429
+ flex: 1;
1430
+ position: relative;
1431
+ border-left: 1px solid rgb(232, 232, 232);
1432
+ border-right: 1px solid rgb(232, 232, 232);
1433
+ padding-left: 1rem;
1434
+ padding-right: 1rem;
1435
+ background: #fff;
1436
+ }
1392
1437
 
1393
- #left-column {
1394
- width: var(--leftColumnWidth, 18rem);
1395
- /* Prevents Safari from shrinking col at first draw */
1396
- min-width: var(--leftColumnWidth, 18rem);
1397
- padding-top: 0;
1398
- /* Reduced padding by 0.2rem to add the invisible border in the rule below */
1399
- padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
1400
- border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
1401
- z-index: 1;
1402
- }
1438
+ .mobile #right-column {
1439
+ border-left: none;
1440
+ padding: 5px 5px 0;
1441
+ }
1403
1442
 
1404
- .desktop #left-column {
1405
- top: 0;
1406
- position: sticky;
1407
- height: calc(100vh - 2rem);
1408
- max-height: calc(100vh - 2rem);
1409
- overflow-x: hidden;
1410
- overflow-y: scroll;
1443
+ #left-column {
1444
+ width: var(--leftColumnWidth, 18rem);
1445
+ /* Prevents Safari from shrinking col at first draw */
1446
+ min-width: var(--leftColumnWidth, 18rem);
1447
+ padding-top: 0;
1448
+ /* Reduced padding by 0.2rem to add the invisible border in the rule below */
1449
+ padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
1450
+ border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
1451
+ z-index: 1;
1452
+ }
1411
1453
 
1412
- /*
1413
- * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
1414
- * does at least give us a tiny bit of control over width & color.
1415
- */
1416
- scrollbar-width: thin;
1417
- scrollbar-color: transparent transparent;
1418
- }
1419
- .desktop #left-column:hover {
1420
- scrollbar-color: auto;
1421
- }
1422
- .desktop #left-column::-webkit-scrollbar {
1423
- appearance: none;
1424
- width: 6px;
1425
- }
1426
- .desktop #left-column::-webkit-scrollbar-button {
1427
- height: 3px;
1428
- background: transparent;
1429
- }
1430
- .desktop #left-column::-webkit-scrollbar-corner {
1431
- background: transparent;
1432
- }
1433
- .desktop #left-column::-webkit-scrollbar-thumb {
1434
- border-radius: 4px;
1435
- }
1436
- .desktop #left-column:hover::-webkit-scrollbar-thumb {
1437
- background: rgba(0, 0, 0, 0.15);
1438
- }
1439
- .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
1440
- background: rgba(0, 0, 0, 0.2);
1441
- }
1442
- .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
1443
- background: rgba(0, 0, 0, 0.3);
1444
- }
1454
+ .desktop #left-column {
1455
+ top: 0;
1456
+ position: sticky;
1457
+ height: calc(100vh - 2rem);
1458
+ max-height: calc(100vh - 2rem);
1459
+ overflow-x: hidden;
1460
+ overflow-y: scroll;
1445
1461
 
1446
- #facets-bottom-fade {
1447
- background: linear-gradient(
1448
- to bottom,
1449
- #f5f5f700 0%,
1450
- #f5f5f7c0 50%,
1451
- #f5f5f7 80%,
1452
- #f5f5f7 100%
1453
- );
1454
- position: fixed;
1455
- bottom: 0;
1456
- height: 50px;
1457
- /* Wide enough to cover the content, but leave the scrollbar uncovered */
1458
- width: calc(
1459
- var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
1460
- );
1461
- z-index: 2;
1462
- pointer-events: none;
1463
- transition: height 0.1s ease;
1464
- }
1465
- #facets-bottom-fade.hidden {
1466
- height: 0;
1467
- }
1462
+ /*
1463
+ * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
1464
+ * does at least give us a tiny bit of control over width & color.
1465
+ */
1466
+ scrollbar-width: thin;
1467
+ scrollbar-color: transparent transparent;
1468
+ }
1469
+ .desktop #left-column:hover {
1470
+ scrollbar-color: auto;
1471
+ }
1472
+ .desktop #left-column::-webkit-scrollbar {
1473
+ appearance: none;
1474
+ width: 6px;
1475
+ }
1476
+ .desktop #left-column::-webkit-scrollbar-button {
1477
+ height: 3px;
1478
+ background: transparent;
1479
+ }
1480
+ .desktop #left-column::-webkit-scrollbar-corner {
1481
+ background: transparent;
1482
+ }
1483
+ .desktop #left-column::-webkit-scrollbar-thumb {
1484
+ border-radius: 4px;
1485
+ }
1486
+ .desktop #left-column:hover::-webkit-scrollbar-thumb {
1487
+ background: rgba(0, 0, 0, 0.15);
1488
+ }
1489
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
1490
+ background: rgba(0, 0, 0, 0.2);
1491
+ }
1492
+ .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
1493
+ background: rgba(0, 0, 0, 0.3);
1494
+ }
1468
1495
 
1469
- .desktop #left-column-scroll-sentinel {
1470
- width: 1px;
1471
- height: 100vh;
1472
- background: transparent;
1473
- }
1496
+ #facets-bottom-fade {
1497
+ background: linear-gradient(
1498
+ to bottom,
1499
+ #f5f5f700 0%,
1500
+ #f5f5f7c0 50%,
1501
+ #f5f5f7 80%,
1502
+ #f5f5f7 100%
1503
+ );
1504
+ position: fixed;
1505
+ bottom: 0;
1506
+ height: 50px;
1507
+ /* Wide enough to cover the content, but leave the scrollbar uncovered */
1508
+ width: calc(
1509
+ var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
1510
+ );
1511
+ z-index: 2;
1512
+ pointer-events: none;
1513
+ transition: height 0.1s ease;
1514
+ }
1515
+ #facets-bottom-fade.hidden {
1516
+ height: 0;
1517
+ }
1474
1518
 
1475
- .desktop #facets-scroll-sentinel {
1476
- width: 1px;
1477
- height: 1px;
1478
- background: transparent;
1479
- }
1519
+ .desktop #left-column-scroll-sentinel {
1520
+ width: 1px;
1521
+ height: 100vh;
1522
+ background: transparent;
1523
+ }
1480
1524
 
1481
- .mobile #left-column {
1482
- width: 100%;
1483
- padding: 0;
1484
- }
1525
+ .desktop #facets-scroll-sentinel {
1526
+ width: 1px;
1527
+ height: 1px;
1528
+ background: transparent;
1529
+ }
1485
1530
 
1486
- #mobile-header-container {
1487
- display: flex;
1488
- justify-content: space-between;
1489
- align-items: center;
1490
- }
1531
+ .mobile #left-column {
1532
+ width: 100%;
1533
+ padding: 0;
1534
+ }
1491
1535
 
1492
- .desktop #mobile-header-container {
1493
- padding-top: 2rem;
1494
- }
1536
+ #mobile-header-container {
1537
+ display: flex;
1538
+ justify-content: space-between;
1539
+ align-items: flex-start;
1540
+ margin: 10px 0;
1541
+ }
1495
1542
 
1496
- #facets-container {
1497
- position: relative;
1498
- max-height: 0;
1499
- transition: max-height 0.2s ease-in-out;
1500
- z-index: 1;
1501
- padding-bottom: 2rem;
1502
- }
1543
+ .desktop #mobile-header-container {
1544
+ padding-top: 2rem;
1545
+ }
1503
1546
 
1504
- .mobile #facets-container {
1505
- overflow: hidden;
1506
- padding-bottom: 0;
1507
- padding-left: 10px;
1508
- padding-right: 10px;
1509
- }
1547
+ #facets-container {
1548
+ position: relative;
1549
+ max-height: 0;
1550
+ transition: max-height 0.2s ease-in-out;
1551
+ z-index: 1;
1552
+ padding-bottom: 2rem;
1553
+ }
1510
1554
 
1511
- #facets-container.expanded {
1512
- max-height: 2000px;
1513
- }
1555
+ .mobile #facets-container {
1556
+ overflow: hidden;
1557
+ padding-bottom: 0;
1558
+ padding-left: 10px;
1559
+ padding-right: 10px;
1560
+ }
1514
1561
 
1515
- #results-total {
1516
- display: flex;
1517
- align-items: baseline;
1518
- margin-bottom: 5rem;
1519
- }
1562
+ #facets-container.expanded {
1563
+ max-height: 2000px;
1564
+ }
1520
1565
 
1521
- .mobile #results-total {
1522
- margin-bottom: 0;
1523
- }
1566
+ #results-total {
1567
+ display: flex;
1568
+ align-items: baseline;
1569
+ margin-bottom: 5rem;
1570
+ }
1524
1571
 
1525
- #big-results-count {
1526
- font-size: 2.4rem;
1527
- font-weight: 500;
1528
- margin-right: 5px;
1529
- }
1572
+ .mobile #results-total {
1573
+ margin-bottom: 0;
1574
+ margin-right: 5px;
1575
+ }
1530
1576
 
1531
- #big-results-label {
1532
- font-size: 1.4rem;
1533
- font-weight: 200;
1534
- }
1577
+ #big-results-count {
1578
+ font-size: 2.4rem;
1579
+ font-weight: 500;
1580
+ margin-right: 5px;
1581
+ }
1535
1582
 
1536
- #list-header {
1537
- max-height: 4.2rem;
1538
- }
1583
+ #big-results-label {
1584
+ font-size: 1.4rem;
1585
+ font-weight: 200;
1586
+ }
1539
1587
 
1540
- .loading-cover {
1541
- position: absolute;
1542
- top: 0;
1543
- left: 0;
1544
- width: 100%;
1545
- height: 100%;
1546
- display: flex;
1547
- justify-content: center;
1548
- z-index: 1;
1549
- padding-top: 50px;
1550
- }
1588
+ #list-header {
1589
+ max-height: 4.2rem;
1590
+ }
1551
1591
 
1552
- circular-activity-indicator {
1553
- width: 30px;
1554
- height: 30px;
1555
- }
1592
+ .loading-cover {
1593
+ position: absolute;
1594
+ top: 0;
1595
+ left: 0;
1596
+ width: 100%;
1597
+ height: 100%;
1598
+ display: flex;
1599
+ justify-content: center;
1600
+ z-index: 1;
1601
+ padding-top: 50px;
1602
+ }
1556
1603
 
1557
- sort-filter-bar {
1558
- display: block;
1559
- margin-bottom: 4rem;
1560
- }
1604
+ circular-activity-indicator {
1605
+ width: 30px;
1606
+ height: 30px;
1607
+ }
1561
1608
 
1562
- infinite-scroller {
1563
- display: block;
1564
- --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
1565
- --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
1566
- }
1609
+ sort-filter-bar {
1610
+ display: block;
1611
+ margin-bottom: 4rem;
1612
+ }
1567
1613
 
1568
- infinite-scroller.list-compact {
1569
- --infiniteScrollerCellMinWidth: var(
1570
- --collectionBrowserCellMinWidth,
1571
- 100%
1572
- );
1573
- --infiniteScrollerCellMinHeight: 34px; /* override infinite scroller component */
1574
- --infiniteScrollerCellMaxHeight: 56px;
1575
- --infiniteScrollerRowGap: 0px;
1576
- }
1614
+ infinite-scroller {
1615
+ display: block;
1616
+ --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
1617
+ --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
1618
+ }
1577
1619
 
1578
- infinite-scroller.list-detail {
1579
- --infiniteScrollerCellMinWidth: var(
1580
- --collectionBrowserCellMinWidth,
1581
- 100%
1582
- );
1583
- --infiniteScrollerCellMinHeight: var(
1584
- --collectionBrowserCellMinHeight,
1585
- 5rem
1586
- );
1587
- /*
1588
- 30px in spec, compensating for a -4px margin
1589
- to align title with top of item image
1590
- src/tiles/list/tile-list.ts
1591
- */
1592
- --infiniteScrollerRowGap: 34px;
1593
- }
1620
+ infinite-scroller.list-compact {
1621
+ --infiniteScrollerCellMinWidth: var(
1622
+ --collectionBrowserCellMinWidth,
1623
+ 100%
1624
+ );
1625
+ --infiniteScrollerCellMinHeight: 34px; /* override infinite scroller component */
1626
+ --infiniteScrollerCellMaxHeight: 56px;
1627
+ --infiniteScrollerRowGap: 0px;
1628
+ }
1594
1629
 
1595
- .mobile infinite-scroller.list-detail {
1596
- --infiniteScrollerRowGap: 24px;
1597
- }
1630
+ infinite-scroller.list-detail {
1631
+ --infiniteScrollerCellMinWidth: var(
1632
+ --collectionBrowserCellMinWidth,
1633
+ 100%
1634
+ );
1635
+ --infiniteScrollerCellMinHeight: var(
1636
+ --collectionBrowserCellMinHeight,
1637
+ 5rem
1638
+ );
1639
+ /*
1640
+ 30px in spec, compensating for a -4px margin
1641
+ to align title with top of item image
1642
+ src/tiles/list/tile-list.ts
1643
+ */
1644
+ --infiniteScrollerRowGap: 34px;
1645
+ }
1598
1646
 
1599
- infinite-scroller.grid {
1600
- --infiniteScrollerCellMinWidth: var(
1601
- --collectionBrowserCellMinWidth,
1602
- 17rem
1603
- );
1604
- --infiniteScrollerCellMaxWidth: var(--collectionBrowserCellMaxWidth, 1fr);
1605
- }
1647
+ .mobile infinite-scroller.list-detail {
1648
+ --infiniteScrollerRowGap: 24px;
1649
+ }
1606
1650
 
1607
- /* Allow tiles to shrink a bit further at smaller viewport widths */
1608
- @media screen and (max-width: 880px) {
1609
- infinite-scroller.grid {
1610
- --infiniteScrollerCellMinWidth: var(
1611
- --collectionBrowserCellMinWidth,
1612
- 15rem
1613
- );
1614
- }
1615
- }
1616
- /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
1617
- @media screen and (max-width: 360px) {
1618
- infinite-scroller.grid {
1619
- --infiniteScrollerCellMinWidth: var(
1620
- --collectionBrowserCellMinWidth,
1621
- 12rem
1622
- );
1623
- }
1624
- }
1651
+ infinite-scroller.grid {
1652
+ --infiniteScrollerCellMinWidth: var(
1653
+ --collectionBrowserCellMinWidth,
1654
+ 17rem
1655
+ );
1656
+ --infiniteScrollerCellMaxWidth: var(
1657
+ --collectionBrowserCellMaxWidth,
1658
+ 1fr
1659
+ );
1660
+ }
1625
1661
 
1626
- infinite-scroller.hidden {
1627
- display: none;
1628
- }
1629
- `;
1662
+ /* Allow tiles to shrink a bit further at smaller viewport widths */
1663
+ @media screen and (max-width: 880px) {
1664
+ infinite-scroller.grid {
1665
+ --infiniteScrollerCellMinWidth: var(
1666
+ --collectionBrowserCellMinWidth,
1667
+ 15rem
1668
+ );
1669
+ }
1670
+ }
1671
+ /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
1672
+ @media screen and (max-width: 360px) {
1673
+ infinite-scroller.grid {
1674
+ --infiniteScrollerCellMinWidth: var(
1675
+ --collectionBrowserCellMinWidth,
1676
+ 12rem
1677
+ );
1678
+ }
1679
+ }
1680
+
1681
+ infinite-scroller.hidden {
1682
+ display: none;
1683
+ }
1684
+ `,
1685
+ ];
1686
+ }
1687
+ };
1630
1688
  __decorate([
1631
1689
  property({ type: String })
1632
1690
  ], CollectionBrowser.prototype, "baseNavigationUrl", void 0);