@internetarchive/collection-browser 0.4.18-alpha.6 → 0.4.18

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