@internetarchive/collection-browser 0.4.19 → 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 (60) hide show
  1. package/dist/src/collection-browser.d.ts +8 -1
  2. package/dist/src/collection-browser.js +319 -291
  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-facets.test.js +8 -5
  37. package/dist/test/collection-facets.test.js.map +1 -1
  38. package/dist/test/sort-filter-bar/alpha-bar.test.js +12 -12
  39. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -1
  40. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +2 -2
  41. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
  42. package/package.json +3 -3
  43. package/src/collection-browser.ts +322 -293
  44. package/src/collection-facets/facets-template.ts +2 -0
  45. package/src/collection-facets/more-facets-content.ts +63 -70
  46. package/src/collection-facets/more-facets-pagination.ts +49 -55
  47. package/src/collection-facets/toggle-switch.ts +51 -61
  48. package/src/collection-facets.ts +96 -85
  49. package/src/sort-filter-bar/alpha-bar.ts +26 -18
  50. package/src/sort-filter-bar/sort-filter-bar.ts +200 -186
  51. package/src/styles/sr-only.ts +18 -0
  52. package/src/tiles/grid/account-tile.ts +1 -1
  53. package/src/tiles/grid/collection-tile.ts +2 -2
  54. package/src/tiles/grid/item-tile.ts +2 -2
  55. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +5 -15
  56. package/src/tiles/grid/tile-stats.ts +66 -73
  57. package/src/tiles/tile-dispatcher.ts +1 -0
  58. package/test/collection-facets.test.ts +10 -2
  59. package/test/sort-filter-bar/alpha-bar.test.ts +16 -12
  60. 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=${() => {
434
+ const toggleFacetsVisible = () => {
433
435
  this.isResizeToMobile = false;
434
436
  this.mobileFacetsVisible = !this.mobileFacetsVisible;
435
- }}
436
- @keyup=${() => {
437
- this.isResizeToMobile = false;
438
- 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
@@ -1354,309 +1360,331 @@ let CollectionBrowser = class CollectionBrowser extends LitElement {
1354
1360
  this.fetchPage(this.pagesToRender);
1355
1361
  }
1356
1362
  }
1357
- };
1358
- CollectionBrowser.styles = css `
1359
- :host {
1360
- display: block;
1363
+ static get styles() {
1364
+ return [
1365
+ srOnlyStyle,
1366
+ css `
1367
+ :host {
1368
+ display: block;
1361
1369
 
1362
- --leftColumnWidth: 18rem;
1363
- --leftColumnPaddingRight: 2.5rem;
1364
- }
1370
+ --leftColumnWidth: 18rem;
1371
+ --leftColumnPaddingRight: 2.5rem;
1372
+ }
1365
1373
 
1366
- /**
1367
- * When page width resizes from desktop to mobile, use this class to
1368
- * disable expand/collapse transition when loading.
1369
- */
1370
- .preload * {
1371
- transition: none !important;
1372
- -webkit-transition: none !important;
1373
- -moz-transition: none !important;
1374
- -ms-transition: none !important;
1375
- -o-transition: none !important;
1376
- }
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
+ }
1377
1385
 
1378
- #content-container {
1379
- display: flex;
1380
- }
1386
+ #content-container {
1387
+ display: flex;
1388
+ }
1381
1389
 
1382
- .collapser {
1383
- display: inline-block;
1384
- }
1390
+ .collapser-icon {
1391
+ display: inline-block;
1392
+ }
1385
1393
 
1386
- .collapser svg {
1387
- width: 10px;
1388
- height: 10px;
1389
- transition: transform 0.2s ease-out;
1390
- }
1394
+ .collapser-icon svg {
1395
+ display: inline-block;
1396
+ width: 12px;
1397
+ height: 12px;
1398
+ transition: transform 0.2s ease-out;
1399
+ }
1391
1400
 
1392
- .collapser.open svg {
1393
- transform: rotate(90deg);
1394
- }
1401
+ #mobile-filter-collapse > summary {
1402
+ cursor: pointer;
1403
+ list-style: none;
1404
+ }
1395
1405
 
1396
- #mobile-filter-collapse h1 {
1397
- cursor: pointer;
1398
- }
1406
+ #mobile-filter-collapse[open] > summary {
1407
+ margin-bottom: 10px;
1408
+ }
1399
1409
 
1400
- #content-container.mobile {
1401
- display: block;
1402
- }
1410
+ #mobile-filter-collapse h2 {
1411
+ display: inline-block;
1412
+ margin: 0;
1413
+ font-size: 2rem;
1414
+ }
1403
1415
 
1404
- .column {
1405
- padding-top: 2rem;
1406
- }
1416
+ #mobile-filter-collapse[open] svg {
1417
+ transform: rotate(90deg);
1418
+ }
1407
1419
 
1408
- #right-column {
1409
- flex: 1;
1410
- position: relative;
1411
- border-left: 1px solid rgb(232, 232, 232);
1412
- border-right: 1px solid rgb(232, 232, 232);
1413
- padding-left: 1rem;
1414
- padding-right: 1rem;
1415
- background: #fff;
1416
- }
1420
+ #content-container.mobile {
1421
+ display: block;
1422
+ }
1417
1423
 
1418
- .mobile #right-column {
1419
- border-left: none;
1420
- padding: 5px 5px 0;
1421
- }
1424
+ .column {
1425
+ padding-top: 2rem;
1426
+ }
1422
1427
 
1423
- #left-column {
1424
- width: var(--leftColumnWidth, 18rem);
1425
- /* Prevents Safari from shrinking col at first draw */
1426
- min-width: var(--leftColumnWidth, 18rem);
1427
- padding-top: 0;
1428
- /* Reduced padding by 0.2rem to add the invisible border in the rule below */
1429
- padding-right: calc(var(--leftColumnPaddingRight, 2.5rem) - 0.2rem);
1430
- border-right: 0.2rem solid transparent; /* Pads to the right of the scrollbar a bit */
1431
- z-index: 1;
1432
- }
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
+ }
1433
1437
 
1434
- .desktop #left-column {
1435
- top: 0;
1436
- position: sticky;
1437
- height: calc(100vh - 2rem);
1438
- max-height: calc(100vh - 2rem);
1439
- overflow-x: hidden;
1440
- overflow-y: scroll;
1438
+ .mobile #right-column {
1439
+ border-left: none;
1440
+ padding: 5px 5px 0;
1441
+ }
1441
1442
 
1442
- /*
1443
- * Firefox doesn't support any of the -webkit-scrollbar stuff below, but
1444
- * does at least give us a tiny bit of control over width & color.
1445
- */
1446
- scrollbar-width: thin;
1447
- scrollbar-color: transparent transparent;
1448
- }
1449
- .desktop #left-column:hover {
1450
- scrollbar-color: auto;
1451
- }
1452
- .desktop #left-column::-webkit-scrollbar {
1453
- appearance: none;
1454
- width: 6px;
1455
- }
1456
- .desktop #left-column::-webkit-scrollbar-button {
1457
- height: 3px;
1458
- background: transparent;
1459
- }
1460
- .desktop #left-column::-webkit-scrollbar-corner {
1461
- background: transparent;
1462
- }
1463
- .desktop #left-column::-webkit-scrollbar-thumb {
1464
- border-radius: 4px;
1465
- }
1466
- .desktop #left-column:hover::-webkit-scrollbar-thumb {
1467
- background: rgba(0, 0, 0, 0.15);
1468
- }
1469
- .desktop #left-column:hover::-webkit-scrollbar-thumb:hover {
1470
- background: rgba(0, 0, 0, 0.2);
1471
- }
1472
- .desktop #left-column:hover::-webkit-scrollbar-thumb:active {
1473
- background: rgba(0, 0, 0, 0.3);
1474
- }
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
+ }
1475
1453
 
1476
- #facets-bottom-fade {
1477
- background: linear-gradient(
1478
- to bottom,
1479
- #f5f5f700 0%,
1480
- #f5f5f7c0 50%,
1481
- #f5f5f7 80%,
1482
- #f5f5f7 100%
1483
- );
1484
- position: fixed;
1485
- bottom: 0;
1486
- height: 50px;
1487
- /* Wide enough to cover the content, but leave the scrollbar uncovered */
1488
- width: calc(
1489
- var(--leftColumnWidth) + var(--leftColumnPaddingRight) - 10px
1490
- );
1491
- z-index: 2;
1492
- pointer-events: none;
1493
- transition: height 0.1s ease;
1494
- }
1495
- #facets-bottom-fade.hidden {
1496
- height: 0;
1497
- }
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;
1498
1461
 
1499
- .desktop #left-column-scroll-sentinel {
1500
- width: 1px;
1501
- height: 100vh;
1502
- background: transparent;
1503
- }
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
+ }
1504
1495
 
1505
- .desktop #facets-scroll-sentinel {
1506
- width: 1px;
1507
- height: 1px;
1508
- background: transparent;
1509
- }
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
+ }
1510
1518
 
1511
- .mobile #left-column {
1512
- width: 100%;
1513
- padding: 0;
1514
- }
1519
+ .desktop #left-column-scroll-sentinel {
1520
+ width: 1px;
1521
+ height: 100vh;
1522
+ background: transparent;
1523
+ }
1515
1524
 
1516
- #mobile-header-container {
1517
- display: flex;
1518
- justify-content: space-between;
1519
- align-items: center;
1520
- }
1525
+ .desktop #facets-scroll-sentinel {
1526
+ width: 1px;
1527
+ height: 1px;
1528
+ background: transparent;
1529
+ }
1521
1530
 
1522
- .desktop #mobile-header-container {
1523
- padding-top: 2rem;
1524
- }
1531
+ .mobile #left-column {
1532
+ width: 100%;
1533
+ padding: 0;
1534
+ }
1525
1535
 
1526
- #facets-container {
1527
- position: relative;
1528
- max-height: 0;
1529
- transition: max-height 0.2s ease-in-out;
1530
- z-index: 1;
1531
- padding-bottom: 2rem;
1532
- }
1536
+ #mobile-header-container {
1537
+ display: flex;
1538
+ justify-content: space-between;
1539
+ align-items: flex-start;
1540
+ margin: 10px 0;
1541
+ }
1533
1542
 
1534
- .mobile #facets-container {
1535
- overflow: hidden;
1536
- padding-bottom: 0;
1537
- padding-left: 10px;
1538
- padding-right: 10px;
1539
- }
1543
+ .desktop #mobile-header-container {
1544
+ padding-top: 2rem;
1545
+ }
1540
1546
 
1541
- #facets-container.expanded {
1542
- max-height: 2000px;
1543
- }
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
+ }
1544
1554
 
1545
- #results-total {
1546
- display: flex;
1547
- align-items: baseline;
1548
- margin-bottom: 5rem;
1549
- }
1555
+ .mobile #facets-container {
1556
+ overflow: hidden;
1557
+ padding-bottom: 0;
1558
+ padding-left: 10px;
1559
+ padding-right: 10px;
1560
+ }
1550
1561
 
1551
- .mobile #results-total {
1552
- margin-bottom: 0;
1553
- }
1562
+ #facets-container.expanded {
1563
+ max-height: 2000px;
1564
+ }
1554
1565
 
1555
- #big-results-count {
1556
- font-size: 2.4rem;
1557
- font-weight: 500;
1558
- margin-right: 5px;
1559
- }
1566
+ #results-total {
1567
+ display: flex;
1568
+ align-items: baseline;
1569
+ margin-bottom: 5rem;
1570
+ }
1560
1571
 
1561
- #big-results-label {
1562
- font-size: 1.4rem;
1563
- font-weight: 200;
1564
- }
1572
+ .mobile #results-total {
1573
+ margin-bottom: 0;
1574
+ margin-right: 5px;
1575
+ }
1565
1576
 
1566
- #list-header {
1567
- max-height: 4.2rem;
1568
- }
1577
+ #big-results-count {
1578
+ font-size: 2.4rem;
1579
+ font-weight: 500;
1580
+ margin-right: 5px;
1581
+ }
1569
1582
 
1570
- .loading-cover {
1571
- position: absolute;
1572
- top: 0;
1573
- left: 0;
1574
- width: 100%;
1575
- height: 100%;
1576
- display: flex;
1577
- justify-content: center;
1578
- z-index: 1;
1579
- padding-top: 50px;
1580
- }
1583
+ #big-results-label {
1584
+ font-size: 1.4rem;
1585
+ font-weight: 200;
1586
+ }
1581
1587
 
1582
- circular-activity-indicator {
1583
- width: 30px;
1584
- height: 30px;
1585
- }
1588
+ #list-header {
1589
+ max-height: 4.2rem;
1590
+ }
1586
1591
 
1587
- sort-filter-bar {
1588
- display: block;
1589
- margin-bottom: 4rem;
1590
- }
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
+ }
1591
1603
 
1592
- infinite-scroller {
1593
- display: block;
1594
- --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
1595
- --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
1596
- }
1604
+ circular-activity-indicator {
1605
+ width: 30px;
1606
+ height: 30px;
1607
+ }
1597
1608
 
1598
- infinite-scroller.list-compact {
1599
- --infiniteScrollerCellMinWidth: var(
1600
- --collectionBrowserCellMinWidth,
1601
- 100%
1602
- );
1603
- --infiniteScrollerCellMinHeight: 34px; /* override infinite scroller component */
1604
- --infiniteScrollerCellMaxHeight: 56px;
1605
- --infiniteScrollerRowGap: 0px;
1606
- }
1609
+ sort-filter-bar {
1610
+ display: block;
1611
+ margin-bottom: 4rem;
1612
+ }
1607
1613
 
1608
- infinite-scroller.list-detail {
1609
- --infiniteScrollerCellMinWidth: var(
1610
- --collectionBrowserCellMinWidth,
1611
- 100%
1612
- );
1613
- --infiniteScrollerCellMinHeight: var(
1614
- --collectionBrowserCellMinHeight,
1615
- 5rem
1616
- );
1617
- /*
1618
- 30px in spec, compensating for a -4px margin
1619
- to align title with top of item image
1620
- src/tiles/list/tile-list.ts
1621
- */
1622
- --infiniteScrollerRowGap: 34px;
1623
- }
1614
+ infinite-scroller {
1615
+ display: block;
1616
+ --infiniteScrollerRowGap: var(--collectionBrowserRowGap, 1.7rem);
1617
+ --infiniteScrollerColGap: var(--collectionBrowserColGap, 1.7rem);
1618
+ }
1624
1619
 
1625
- .mobile infinite-scroller.list-detail {
1626
- --infiniteScrollerRowGap: 24px;
1627
- }
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
+ }
1628
1629
 
1629
- infinite-scroller.grid {
1630
- --infiniteScrollerCellMinWidth: var(
1631
- --collectionBrowserCellMinWidth,
1632
- 17rem
1633
- );
1634
- --infiniteScrollerCellMaxWidth: var(--collectionBrowserCellMaxWidth, 1fr);
1635
- }
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
+ }
1636
1646
 
1637
- /* Allow tiles to shrink a bit further at smaller viewport widths */
1638
- @media screen and (max-width: 880px) {
1639
- infinite-scroller.grid {
1640
- --infiniteScrollerCellMinWidth: var(
1641
- --collectionBrowserCellMinWidth,
1642
- 15rem
1643
- );
1644
- }
1645
- }
1646
- /* At very small widths, maintain a 2-tile layout as far as it can reasonably go */
1647
- @media screen and (max-width: 360px) {
1648
- infinite-scroller.grid {
1649
- --infiniteScrollerCellMinWidth: var(
1650
- --collectionBrowserCellMinWidth,
1651
- 12rem
1652
- );
1653
- }
1654
- }
1647
+ .mobile infinite-scroller.list-detail {
1648
+ --infiniteScrollerRowGap: 24px;
1649
+ }
1655
1650
 
1656
- infinite-scroller.hidden {
1657
- display: none;
1658
- }
1659
- `;
1651
+ infinite-scroller.grid {
1652
+ --infiniteScrollerCellMinWidth: var(
1653
+ --collectionBrowserCellMinWidth,
1654
+ 17rem
1655
+ );
1656
+ --infiniteScrollerCellMaxWidth: var(
1657
+ --collectionBrowserCellMaxWidth,
1658
+ 1fr
1659
+ );
1660
+ }
1661
+
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
+ };
1660
1688
  __decorate([
1661
1689
  property({ type: String })
1662
1690
  ], CollectionBrowser.prototype, "baseNavigationUrl", void 0);