@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.
- package/dist/src/collection-browser.d.ts +1 -8
- package/dist/src/collection-browser.js +291 -318
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facets-template.js +0 -2
- package/dist/src/collection-facets/facets-template.js.map +1 -1
- package/dist/src/collection-facets/more-facets-content.js +70 -63
- package/dist/src/collection-facets/more-facets-content.js.map +1 -1
- package/dist/src/collection-facets/more-facets-pagination.js +55 -49
- package/dist/src/collection-facets/more-facets-pagination.js.map +1 -1
- package/dist/src/collection-facets/toggle-switch.js +56 -46
- package/dist/src/collection-facets/toggle-switch.js.map +1 -1
- package/dist/src/collection-facets.d.ts +1 -1
- package/dist/src/collection-facets.js +84 -94
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/sort-filter-bar/alpha-bar.d.ts +1 -2
- package/dist/src/sort-filter-bar/alpha-bar.js +25 -33
- package/dist/src/sort-filter-bar/alpha-bar.js.map +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.d.ts +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.js +186 -198
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/src/tiles/grid/account-tile.js +1 -1
- package/dist/src/tiles/grid/account-tile.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +2 -2
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +2 -2
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +15 -5
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
- package/dist/src/tiles/grid/tile-stats.js +65 -58
- package/dist/src/tiles/grid/tile-stats.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.js +2 -3
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/test/collection-facets.test.js +5 -8
- package/dist/test/collection-facets.test.js.map +1 -1
- package/dist/test/sort-filter-bar/alpha-bar.test.js +12 -12
- package/dist/test/sort-filter-bar/alpha-bar.test.js.map +1 -1
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js +2 -2
- package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +1 -1
- package/package.json +5 -5
- package/src/collection-browser.ts +293 -321
- package/src/collection-facets/facets-template.ts +0 -2
- package/src/collection-facets/more-facets-content.ts +70 -63
- package/src/collection-facets/more-facets-pagination.ts +55 -49
- package/src/collection-facets/toggle-switch.ts +61 -51
- package/src/collection-facets.ts +85 -96
- package/src/sort-filter-bar/alpha-bar.ts +18 -26
- package/src/sort-filter-bar/sort-filter-bar.ts +186 -200
- package/src/tiles/grid/account-tile.ts +1 -1
- package/src/tiles/grid/collection-tile.ts +2 -2
- package/src/tiles/grid/item-tile.ts +2 -2
- package/src/tiles/grid/styles/tile-grid-shared-styles.ts +15 -5
- package/src/tiles/grid/tile-stats.ts +73 -66
- package/src/tiles/tile-dispatcher.ts +0 -1
- package/test/collection-facets.test.ts +2 -10
- package/test/sort-filter-bar/alpha-bar.test.ts +12 -16
- package/test/sort-filter-bar/sort-filter-bar.test.ts +2 -2
- package/dist/src/styles/sr-only.d.ts +0 -1
- package/dist/src/styles/sr-only.js +0 -18
- package/dist/src/styles/sr-only.js.map +0 -1
- package/src/styles/sr-only.ts +0 -18
|
@@ -11,8 +11,6 @@ export class AlphaBar extends LitElement {
|
|
|
11
11
|
|
|
12
12
|
@property({ type: Object }) letterCounts?: PrefixFilterCounts;
|
|
13
13
|
|
|
14
|
-
@property({ type: String }) ariaLandmarkLabel?: string;
|
|
15
|
-
|
|
16
14
|
@state()
|
|
17
15
|
private tooltipShown: boolean = false;
|
|
18
16
|
|
|
@@ -30,7 +28,7 @@ export class AlphaBar extends LitElement {
|
|
|
30
28
|
|
|
31
29
|
render() {
|
|
32
30
|
return html`
|
|
33
|
-
<
|
|
31
|
+
<div id="container">
|
|
34
32
|
<ul>
|
|
35
33
|
${this.alphabet.map(
|
|
36
34
|
letter =>
|
|
@@ -42,28 +40,29 @@ export class AlphaBar extends LitElement {
|
|
|
42
40
|
@mousemove=${this.handleMouseMove}
|
|
43
41
|
@mouseleave=${this.handleMouseLeave}
|
|
44
42
|
>
|
|
45
|
-
${this.
|
|
43
|
+
${this.letterCounts?.[letter]
|
|
44
|
+
? this.letterLinkTemplate(letter)
|
|
45
|
+
: html`<span>${letter}</span>`}
|
|
46
46
|
${this.tooltipTemplate(letter)}
|
|
47
47
|
</li>
|
|
48
48
|
`
|
|
49
49
|
)}
|
|
50
50
|
</ul>
|
|
51
|
-
</
|
|
51
|
+
</div>
|
|
52
52
|
`;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
private
|
|
56
|
-
const ariaLabel = `${letter}: ${this.letterCounts?.[letter] ?? 0} results`;
|
|
55
|
+
private letterLinkTemplate(letter: string) {
|
|
57
56
|
return html`
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
<a
|
|
58
|
+
href="#"
|
|
59
|
+
@click=${(e: Event) => {
|
|
60
|
+
e.preventDefault();
|
|
62
61
|
this.letterClicked(letter);
|
|
63
62
|
}}
|
|
64
63
|
>
|
|
65
64
|
${letter}
|
|
66
|
-
</
|
|
65
|
+
</a>
|
|
67
66
|
`;
|
|
68
67
|
}
|
|
69
68
|
|
|
@@ -190,31 +189,25 @@ export class AlphaBar extends LitElement {
|
|
|
190
189
|
border-radius: 4px;
|
|
191
190
|
}
|
|
192
191
|
|
|
193
|
-
li:hover:not(.selected)
|
|
192
|
+
li:hover:not(.selected) a {
|
|
194
193
|
background-color: #c0c0c0;
|
|
195
194
|
}
|
|
196
195
|
|
|
197
|
-
|
|
196
|
+
a,
|
|
197
|
+
span {
|
|
198
198
|
display: flex;
|
|
199
199
|
justify-content: center;
|
|
200
200
|
align-items: center;
|
|
201
201
|
aspect-ratio: 1 / 1;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
width: 100%;
|
|
206
|
-
height: 100%;
|
|
204
|
+
a {
|
|
207
205
|
color: #333;
|
|
208
|
-
|
|
209
|
-
background: none;
|
|
210
|
-
border: none;
|
|
206
|
+
text-decoration: none;
|
|
211
207
|
border-radius: 4px;
|
|
212
|
-
font-family: inherit;
|
|
213
|
-
font-size: inherit;
|
|
214
|
-
cursor: pointer;
|
|
215
208
|
}
|
|
216
209
|
|
|
217
|
-
|
|
210
|
+
span {
|
|
218
211
|
color: #aaa;
|
|
219
212
|
cursor: default;
|
|
220
213
|
}
|
|
@@ -223,7 +216,7 @@ export class AlphaBar extends LitElement {
|
|
|
223
216
|
background-color: #2c2c2c;
|
|
224
217
|
}
|
|
225
218
|
|
|
226
|
-
.selected
|
|
219
|
+
.selected a {
|
|
227
220
|
color: white;
|
|
228
221
|
}
|
|
229
222
|
|
|
@@ -232,7 +225,6 @@ export class AlphaBar extends LitElement {
|
|
|
232
225
|
top: 100%;
|
|
233
226
|
left: -9999px;
|
|
234
227
|
margin-top: 3px;
|
|
235
|
-
z-index: 1;
|
|
236
228
|
|
|
237
229
|
opacity: 0;
|
|
238
230
|
transition: opacity 0.2s ease;
|
|
@@ -30,7 +30,6 @@ import { sortDisabledIcon } from './img/sort-toggle-disabled';
|
|
|
30
30
|
import { tileIcon } from './img/tile';
|
|
31
31
|
import { listIcon } from './img/list';
|
|
32
32
|
import { compactIcon } from './img/compact';
|
|
33
|
-
import { srOnlyStyle } from '../styles/sr-only';
|
|
34
33
|
|
|
35
34
|
type AlphaSelector = 'creator' | 'title';
|
|
36
35
|
|
|
@@ -118,7 +117,7 @@ export class SortFilterBar
|
|
|
118
117
|
render() {
|
|
119
118
|
return html`
|
|
120
119
|
<div id="container">
|
|
121
|
-
<
|
|
120
|
+
<div id="sort-bar">
|
|
122
121
|
<div class="sort-direction-container">
|
|
123
122
|
${this.sortDirectionSelectorTemplate}
|
|
124
123
|
</div>
|
|
@@ -130,7 +129,7 @@ export class SortFilterBar
|
|
|
130
129
|
</div>
|
|
131
130
|
|
|
132
131
|
<div id="display-style-selector">${this.displayOptionTemplate}</div>
|
|
133
|
-
</
|
|
132
|
+
</div>
|
|
134
133
|
|
|
135
134
|
${this.dropdownBackdropVisible ? this.dropdownBackdrop : nothing}
|
|
136
135
|
${this.alphaBarTemplate}
|
|
@@ -258,17 +257,12 @@ export class SortFilterBar
|
|
|
258
257
|
|
|
259
258
|
/** Template to render the sort direction toggle button */
|
|
260
259
|
private get sortDirectionSelectorTemplate(): TemplateResult {
|
|
261
|
-
const oppositeSortDirectionReadable =
|
|
262
|
-
this.sortDirection === 'asc' ? 'descending' : 'ascending';
|
|
263
|
-
const srLabel = `Change to ${oppositeSortDirectionReadable} sort`;
|
|
264
|
-
|
|
265
260
|
return html`
|
|
266
261
|
<button
|
|
267
262
|
class="sort-direction-selector"
|
|
268
263
|
?disabled=${this.selectedSort === 'relevance'}
|
|
269
264
|
@click=${this.toggleSortDirection}
|
|
270
265
|
>
|
|
271
|
-
<span class="sr-only">${srLabel}</span>
|
|
272
266
|
${this.sortDirectionIcon}
|
|
273
267
|
</button>
|
|
274
268
|
`;
|
|
@@ -735,7 +729,6 @@ export class SortFilterBar
|
|
|
735
729
|
return html` <alpha-bar
|
|
736
730
|
.selectedLetter=${this.selectedTitleFilter}
|
|
737
731
|
.letterCounts=${this.prefixFilterCountMap?.title}
|
|
738
|
-
ariaLandmarkLabel="Filter by title letter"
|
|
739
732
|
@letterChanged=${this.titleLetterChanged}
|
|
740
733
|
></alpha-bar>`;
|
|
741
734
|
}
|
|
@@ -744,7 +737,6 @@ export class SortFilterBar
|
|
|
744
737
|
return html` <alpha-bar
|
|
745
738
|
.selectedLetter=${this.selectedCreatorFilter}
|
|
746
739
|
.letterCounts=${this.prefixFilterCountMap?.creator}
|
|
747
|
-
ariaLandmarkLabel="Filter by creator letter"
|
|
748
740
|
@letterChanged=${this.creatorLetterChanged}
|
|
749
741
|
></alpha-bar>`;
|
|
750
742
|
}
|
|
@@ -805,220 +797,214 @@ export class SortFilterBar
|
|
|
805
797
|
this.dispatchEvent(event);
|
|
806
798
|
}
|
|
807
799
|
|
|
808
|
-
static
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
#container {
|
|
813
|
-
position: relative;
|
|
814
|
-
}
|
|
800
|
+
static styles = css`
|
|
801
|
+
#container {
|
|
802
|
+
position: relative;
|
|
803
|
+
}
|
|
815
804
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
805
|
+
#sort-bar {
|
|
806
|
+
display: flex;
|
|
807
|
+
justify-content: space-between;
|
|
808
|
+
align-items: center;
|
|
809
|
+
border-bottom: 1px solid #2c2c2c;
|
|
810
|
+
font-size: 1.4rem;
|
|
811
|
+
}
|
|
823
812
|
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
813
|
+
ul {
|
|
814
|
+
list-style: none;
|
|
815
|
+
display: flex;
|
|
816
|
+
align-items: center;
|
|
817
|
+
margin: 0;
|
|
818
|
+
padding: 0;
|
|
819
|
+
}
|
|
831
820
|
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
821
|
+
li {
|
|
822
|
+
padding: 0;
|
|
823
|
+
}
|
|
835
824
|
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
825
|
+
.sort-by-text {
|
|
826
|
+
margin-right: 5px;
|
|
827
|
+
font-weight: bold;
|
|
828
|
+
white-space: nowrap;
|
|
829
|
+
}
|
|
841
830
|
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
831
|
+
.sort-direction-container {
|
|
832
|
+
display: flex;
|
|
833
|
+
align-self: stretch;
|
|
834
|
+
flex: 0;
|
|
835
|
+
margin: 0 5px;
|
|
836
|
+
}
|
|
848
837
|
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
838
|
+
.sort-direction-selector {
|
|
839
|
+
padding: 0;
|
|
840
|
+
border: none;
|
|
841
|
+
appearance: none;
|
|
842
|
+
background: transparent;
|
|
843
|
+
cursor: pointer;
|
|
844
|
+
}
|
|
856
845
|
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
846
|
+
.sort-direction-selector:disabled {
|
|
847
|
+
cursor: default;
|
|
848
|
+
}
|
|
860
849
|
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
850
|
+
.sort-direction-icon {
|
|
851
|
+
display: flex;
|
|
852
|
+
align-items: center;
|
|
853
|
+
background: none;
|
|
854
|
+
color: inherit;
|
|
855
|
+
border: none;
|
|
856
|
+
padding: 0;
|
|
857
|
+
outline: inherit;
|
|
858
|
+
width: 14px;
|
|
859
|
+
height: 14px;
|
|
860
|
+
}
|
|
872
861
|
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
862
|
+
.sort-direction-icon > svg {
|
|
863
|
+
flex: 1;
|
|
864
|
+
}
|
|
876
865
|
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
866
|
+
#date-sort-selector,
|
|
867
|
+
#view-sort-selector {
|
|
868
|
+
position: absolute;
|
|
869
|
+
left: 150px;
|
|
870
|
+
top: 45px;
|
|
871
|
+
|
|
872
|
+
z-index: 1;
|
|
873
|
+
padding: 1rem;
|
|
874
|
+
background-color: white;
|
|
875
|
+
border-radius: 2.5rem;
|
|
876
|
+
border: 1px solid #404142;
|
|
877
|
+
}
|
|
889
878
|
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
879
|
+
#sort-selector-container {
|
|
880
|
+
flex: 1;
|
|
881
|
+
display: flex;
|
|
882
|
+
justify-content: flex-start;
|
|
883
|
+
align-items: center;
|
|
884
|
+
}
|
|
896
885
|
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
886
|
+
#desktop-sort-container,
|
|
887
|
+
#mobile-sort-container {
|
|
888
|
+
display: flex;
|
|
889
|
+
justify-content: flex-start;
|
|
890
|
+
align-items: center;
|
|
891
|
+
}
|
|
903
892
|
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
893
|
+
/*
|
|
894
|
+
we move the desktop sort selector offscreen instead of display: none
|
|
895
|
+
because we need to observe the width of it vs its container to determine
|
|
896
|
+
if it's wide enough to display the desktop version and if you display: none,
|
|
897
|
+
the width becomes 0
|
|
898
|
+
*/
|
|
899
|
+
#desktop-sort-container.hidden {
|
|
900
|
+
position: absolute;
|
|
901
|
+
top: -9999px;
|
|
902
|
+
left: -9999px;
|
|
903
|
+
visibility: hidden;
|
|
904
|
+
}
|
|
916
905
|
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
906
|
+
#mobile-sort-container.hidden {
|
|
907
|
+
display: none;
|
|
908
|
+
}
|
|
920
909
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
910
|
+
#sort-selector-backdrop {
|
|
911
|
+
position: fixed;
|
|
912
|
+
top: 0;
|
|
913
|
+
left: 0;
|
|
914
|
+
width: 100vw;
|
|
915
|
+
height: 100vh;
|
|
916
|
+
z-index: 1;
|
|
917
|
+
background-color: transparent;
|
|
918
|
+
}
|
|
930
919
|
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
920
|
+
#desktop-sort-selector {
|
|
921
|
+
display: inline-flex;
|
|
922
|
+
}
|
|
934
923
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
924
|
+
#desktop-sort-selector li {
|
|
925
|
+
display: flex;
|
|
926
|
+
align-items: center;
|
|
927
|
+
padding-left: 5px;
|
|
928
|
+
padding-right: 5px;
|
|
929
|
+
}
|
|
941
930
|
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
931
|
+
#desktop-sort-selector li a {
|
|
932
|
+
padding: 0 5px;
|
|
933
|
+
text-decoration: none;
|
|
934
|
+
color: #333;
|
|
935
|
+
line-height: 2;
|
|
936
|
+
}
|
|
948
937
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
}
|
|
938
|
+
#desktop-sort-selector li button {
|
|
939
|
+
padding: 0px 5px;
|
|
940
|
+
border: none;
|
|
941
|
+
background: none;
|
|
942
|
+
font-size: inherit;
|
|
943
|
+
color: #333;
|
|
944
|
+
line-height: 2;
|
|
945
|
+
cursor: pointer;
|
|
946
|
+
appearance: none;
|
|
947
|
+
}
|
|
960
948
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
949
|
+
#desktop-sort-selector li button.selected {
|
|
950
|
+
font-weight: bold;
|
|
951
|
+
}
|
|
964
952
|
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
953
|
+
#display-style-selector {
|
|
954
|
+
flex: 0;
|
|
955
|
+
}
|
|
968
956
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
957
|
+
#display-style-selector button {
|
|
958
|
+
background: none;
|
|
959
|
+
color: inherit;
|
|
960
|
+
border: none;
|
|
961
|
+
appearance: none;
|
|
962
|
+
cursor: pointer;
|
|
963
|
+
-webkit-appearance: none;
|
|
964
|
+
fill: #bbbbbb;
|
|
965
|
+
}
|
|
978
966
|
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
967
|
+
#display-style-selector button.active {
|
|
968
|
+
fill: var(--ia-theme-primary-text-color, #2c2c2c);
|
|
969
|
+
}
|
|
982
970
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
971
|
+
#display-style-selector button svg {
|
|
972
|
+
width: 24px;
|
|
973
|
+
height: 24px;
|
|
974
|
+
}
|
|
987
975
|
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
976
|
+
ia-dropdown {
|
|
977
|
+
--dropdownTextColor: white;
|
|
978
|
+
--dropdownOffsetTop: 0;
|
|
979
|
+
--dropdownBorderTopWidth: 0;
|
|
980
|
+
--dropdownBorderTopLeftRadius: 0;
|
|
981
|
+
--dropdownBorderTopRightRadius: 0;
|
|
982
|
+
--dropdownWhiteSpace: nowrap;
|
|
983
|
+
--dropdownListZIndex: 2;
|
|
984
|
+
--dropdownCaretColor: var(--ia-theme-primary-text-color, #2c2c2c);
|
|
985
|
+
--dropdownSelectedTextColor: white;
|
|
986
|
+
--dropdownSelectedBgColor: rgba(255, 255, 255, 0.3);
|
|
987
|
+
--dropdownHoverBgColor: rgba(255, 255, 255, 0.3);
|
|
988
|
+
--caretHeight: 9px;
|
|
989
|
+
--caretWidth: 12px;
|
|
990
|
+
--caretPadding: 0 5px 0 0;
|
|
991
|
+
}
|
|
992
|
+
ia-dropdown.selected .dropdown-label {
|
|
993
|
+
font-weight: bold;
|
|
994
|
+
}
|
|
995
|
+
ia-dropdown.open {
|
|
996
|
+
z-index: 2;
|
|
997
|
+
}
|
|
1010
998
|
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
];
|
|
1023
|
-
}
|
|
999
|
+
.dropdown-label {
|
|
1000
|
+
display: inline-block;
|
|
1001
|
+
height: 100%;
|
|
1002
|
+
padding-left: 5px;
|
|
1003
|
+
font-size: 1.4rem;
|
|
1004
|
+
line-height: 2;
|
|
1005
|
+
color: var(--ia-theme-primary-text-color, #2c2c2c);
|
|
1006
|
+
white-space: nowrap;
|
|
1007
|
+
user-select: none;
|
|
1008
|
+
}
|
|
1009
|
+
`;
|
|
1024
1010
|
}
|
|
@@ -49,7 +49,7 @@ export class CollectionTile extends LitElement {
|
|
|
49
49
|
|
|
50
50
|
private get getTitleTemplate() {
|
|
51
51
|
return html`<div id="title">
|
|
52
|
-
<
|
|
52
|
+
<h1 class="truncated">${this.model?.title}</h1>
|
|
53
53
|
</div>`;
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -117,7 +117,7 @@ export class CollectionTile extends LitElement {
|
|
|
117
117
|
flex-grow: initial;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
h1.truncated {
|
|
121
121
|
color: ${whiteColor};
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -49,9 +49,9 @@ export class ItemTile extends LitElement {
|
|
|
49
49
|
${this.imageBlockTemplate}
|
|
50
50
|
|
|
51
51
|
<div id="title">
|
|
52
|
-
<
|
|
52
|
+
<h1 class="truncated" title=${ifDefined(itemTitle)}>
|
|
53
53
|
${itemTitle}
|
|
54
|
-
</
|
|
54
|
+
</h1>
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
57
|
${this.volumeIssueTemplate}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
import { srOnlyStyle } from '../../../styles/sr-only';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Base tile styles
|
|
@@ -9,9 +8,6 @@ const tileBackgroundColor = css`var(--tileBackgroundColor, #ffffff)`;
|
|
|
9
8
|
const tileCornerRadius = css`var(--tileCornerRadius, 4px)`;
|
|
10
9
|
|
|
11
10
|
export const baseTileStyles = css`
|
|
12
|
-
/* Include .sr-only styles for all tiles */
|
|
13
|
-
${srOnlyStyle}
|
|
14
|
-
|
|
15
11
|
.container {
|
|
16
12
|
background-color: ${tileBackgroundColor};
|
|
17
13
|
border: 1px #2c2c2c;
|
|
@@ -72,7 +68,7 @@ export const baseTileStyles = css`
|
|
|
72
68
|
-webkit-box-orient: vertical;
|
|
73
69
|
}
|
|
74
70
|
|
|
75
|
-
|
|
71
|
+
h1.truncated {
|
|
76
72
|
display: -webkit-box;
|
|
77
73
|
margin: 0px;
|
|
78
74
|
line-height: 15px;
|
|
@@ -126,4 +122,18 @@ export const baseTileStyles = css`
|
|
|
126
122
|
.hidden {
|
|
127
123
|
display: none;
|
|
128
124
|
}
|
|
125
|
+
|
|
126
|
+
.sr-only {
|
|
127
|
+
position: absolute !important;
|
|
128
|
+
width: 1px !important;
|
|
129
|
+
height: 1px !important;
|
|
130
|
+
margin: -1px !important;
|
|
131
|
+
padding: 0 !important;
|
|
132
|
+
border: 0 !important;
|
|
133
|
+
overflow: hidden !important;
|
|
134
|
+
white-space: nowrap !important;
|
|
135
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
136
|
+
-webkit-clip-path: inset(50%) !important;
|
|
137
|
+
clip-path: inset(50%) !important;
|
|
138
|
+
}
|
|
129
139
|
`;
|