@internetarchive/collection-browser 4.7.1-alpha-webdev9189.0 → 4.8.1-webdev-9227.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/README.md +33 -0
  2. package/dist/src/app-root.js +0 -2
  3. package/dist/src/app-root.js.map +1 -1
  4. package/dist/src/assets/img/icons/check.d.ts +2 -0
  5. package/dist/src/assets/img/icons/check.js +5 -0
  6. package/dist/src/assets/img/icons/check.js.map +1 -0
  7. package/dist/src/collection-browser.d.ts +2 -1
  8. package/dist/src/collection-browser.js +5 -27
  9. package/dist/src/collection-browser.js.map +1 -1
  10. package/dist/src/collection-facets/facet-row-template.d.ts +38 -0
  11. package/dist/src/collection-facets/facet-row-template.js +200 -0
  12. package/dist/src/collection-facets/facet-row-template.js.map +1 -0
  13. package/dist/src/collection-facets/facet-row.js +11 -186
  14. package/dist/src/collection-facets/facet-row.js.map +1 -1
  15. package/dist/src/collection-facets/models.d.ts +7 -2
  16. package/dist/src/collection-facets/models.js +7 -2
  17. package/dist/src/collection-facets/models.js.map +1 -1
  18. package/dist/src/collection-facets/more-facets-content.d.ts +87 -21
  19. package/dist/src/collection-facets/more-facets-content.js +479 -201
  20. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  21. package/dist/src/collection-facets/more-facets-scroller.d.ts +85 -0
  22. package/dist/src/collection-facets/more-facets-scroller.js +429 -0
  23. package/dist/src/collection-facets/more-facets-scroller.js.map +1 -0
  24. package/dist/src/collection-facets/page-window.d.ts +73 -0
  25. package/dist/src/collection-facets/page-window.js +202 -0
  26. package/dist/src/collection-facets/page-window.js.map +1 -0
  27. package/dist/src/collection-facets/toggle-switch.js +1 -0
  28. package/dist/src/collection-facets/toggle-switch.js.map +1 -1
  29. package/dist/src/collection-facets.js +3 -2
  30. package/dist/src/collection-facets.js.map +1 -1
  31. package/dist/src/empty-placeholder.d.ts +7 -7
  32. package/dist/src/empty-placeholder.js +29 -15
  33. package/dist/src/empty-placeholder.js.map +1 -1
  34. package/dist/src/expanded-date-picker.js +3 -2
  35. package/dist/src/expanded-date-picker.js.map +1 -1
  36. package/dist/src/locales/es.d.ts +94 -0
  37. package/dist/src/locales/es.js +109 -0
  38. package/dist/src/locales/es.js.map +1 -0
  39. package/dist/src/manage/manage-bar.d.ts +3 -2
  40. package/dist/src/manage/manage-bar.js +6 -7
  41. package/dist/src/manage/manage-bar.js.map +1 -1
  42. package/dist/src/manage/remove-items-modal-content.js +3 -2
  43. package/dist/src/manage/remove-items-modal-content.js.map +1 -1
  44. package/dist/src/models.d.ts +4 -0
  45. package/dist/src/models.js +22 -2
  46. package/dist/src/models.js.map +1 -1
  47. package/dist/src/sort-filter-bar/sort-filter-bar.js +3 -3
  48. package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
  49. package/dist/src/tiles/grid/account-tile.js +3 -2
  50. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  51. package/dist/src/tiles/grid/collection-tile.js +3 -2
  52. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  53. package/dist/src/tiles/grid/item-tile.js +3 -2
  54. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  55. package/dist/src/tiles/grid/tile-stats.js +3 -2
  56. package/dist/src/tiles/grid/tile-stats.js.map +1 -1
  57. package/dist/src/tiles/list/tile-list-compact-header.js +3 -2
  58. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  59. package/dist/src/tiles/list/tile-list-compact.js +3 -1
  60. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  61. package/dist/src/tiles/list/tile-list.js +3 -2
  62. package/dist/src/tiles/list/tile-list.js.map +1 -1
  63. package/dist/src/tiles/overlay/text-overlay.js +3 -1
  64. package/dist/src/tiles/overlay/text-overlay.js.map +1 -1
  65. package/dist/src/tiles/review-block.js +3 -2
  66. package/dist/src/tiles/review-block.js.map +1 -1
  67. package/dist/src/tiles/tile-dispatcher.d.ts +2 -1
  68. package/dist/src/tiles/tile-dispatcher.js +5 -4
  69. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  70. package/dist/src/utils/log.d.ts +1 -4
  71. package/dist/src/utils/normalize-filter-text.d.ts +28 -0
  72. package/dist/src/utils/normalize-filter-text.js +35 -0
  73. package/dist/src/utils/normalize-filter-text.js.map +1 -0
  74. package/locales/es.d.ts +1 -0
  75. package/locales/es.js +1 -0
  76. package/package.json +15 -1
  77. package/.editorconfig +0 -29
  78. package/.github/workflows/ci.yml +0 -29
  79. package/.github/workflows/gh-pages-main.yml +0 -41
  80. package/.github/workflows/npm-publish.yml +0 -42
  81. package/.github/workflows/pr-preview.yml +0 -40
  82. package/.husky/pre-commit +0 -1
  83. package/.prettierignore +0 -1
  84. package/dist/src/collection-facets/more-facets-pagination.d.ts +0 -36
  85. package/dist/src/collection-facets/more-facets-pagination.js +0 -260
  86. package/dist/src/collection-facets/more-facets-pagination.js.map +0 -1
  87. package/dist/test/collection-browser.test.d.ts +0 -1
  88. package/dist/test/collection-browser.test.js +0 -1849
  89. package/dist/test/collection-browser.test.js.map +0 -1
  90. package/dist/test/collection-facets/facet-row.test.d.ts +0 -1
  91. package/dist/test/collection-facets/facet-row.test.js +0 -291
  92. package/dist/test/collection-facets/facet-row.test.js.map +0 -1
  93. package/dist/test/collection-facets/facets-template.test.d.ts +0 -1
  94. package/dist/test/collection-facets/facets-template.test.js +0 -95
  95. package/dist/test/collection-facets/facets-template.test.js.map +0 -1
  96. package/dist/test/collection-facets/more-facets-content.test.d.ts +0 -1
  97. package/dist/test/collection-facets/more-facets-content.test.js +0 -159
  98. package/dist/test/collection-facets/more-facets-content.test.js.map +0 -1
  99. package/dist/test/collection-facets/more-facets-pagination.test.d.ts +0 -1
  100. package/dist/test/collection-facets/more-facets-pagination.test.js +0 -126
  101. package/dist/test/collection-facets/more-facets-pagination.test.js.map +0 -1
  102. package/dist/test/collection-facets/toggle-switch.test.d.ts +0 -1
  103. package/dist/test/collection-facets/toggle-switch.test.js +0 -99
  104. package/dist/test/collection-facets/toggle-switch.test.js.map +0 -1
  105. package/dist/test/collection-facets.test.d.ts +0 -2
  106. package/dist/test/collection-facets.test.js +0 -728
  107. package/dist/test/collection-facets.test.js.map +0 -1
  108. package/dist/test/data-source/collection-browser-data-source.test.d.ts +0 -1
  109. package/dist/test/data-source/collection-browser-data-source.test.js +0 -154
  110. package/dist/test/data-source/collection-browser-data-source.test.js.map +0 -1
  111. package/dist/test/empty-placeholder.test.d.ts +0 -1
  112. package/dist/test/empty-placeholder.test.js +0 -57
  113. package/dist/test/empty-placeholder.test.js.map +0 -1
  114. package/dist/test/expanded-date-picker.test.d.ts +0 -1
  115. package/dist/test/expanded-date-picker.test.js +0 -124
  116. package/dist/test/expanded-date-picker.test.js.map +0 -1
  117. package/dist/test/icon-overlay.test.d.ts +0 -1
  118. package/dist/test/icon-overlay.test.js +0 -31
  119. package/dist/test/icon-overlay.test.js.map +0 -1
  120. package/dist/test/image-block.test.d.ts +0 -1
  121. package/dist/test/image-block.test.js +0 -208
  122. package/dist/test/image-block.test.js.map +0 -1
  123. package/dist/test/item-image.test.d.ts +0 -1
  124. package/dist/test/item-image.test.js +0 -187
  125. package/dist/test/item-image.test.js.map +0 -1
  126. package/dist/test/manage/manage-bar.test.d.ts +0 -3
  127. package/dist/test/manage/manage-bar.test.js +0 -216
  128. package/dist/test/manage/manage-bar.test.js.map +0 -1
  129. package/dist/test/manage/remove-items-modal-content.test.d.ts +0 -1
  130. package/dist/test/manage/remove-items-modal-content.test.js +0 -60
  131. package/dist/test/manage/remove-items-modal-content.test.js.map +0 -1
  132. package/dist/test/mediatype-config.test.d.ts +0 -1
  133. package/dist/test/mediatype-config.test.js +0 -11
  134. package/dist/test/mediatype-config.test.js.map +0 -1
  135. package/dist/test/mocks/mock-analytics-handler.d.ts +0 -10
  136. package/dist/test/mocks/mock-analytics-handler.js +0 -16
  137. package/dist/test/mocks/mock-analytics-handler.js.map +0 -1
  138. package/dist/test/mocks/mock-search-responses.d.ts +0 -31
  139. package/dist/test/mocks/mock-search-responses.js +0 -1241
  140. package/dist/test/mocks/mock-search-responses.js.map +0 -1
  141. package/dist/test/mocks/mock-search-service.d.ts +0 -16
  142. package/dist/test/mocks/mock-search-service.js +0 -64
  143. package/dist/test/mocks/mock-search-service.js.map +0 -1
  144. package/dist/test/restoration-state-handler.test.d.ts +0 -1
  145. package/dist/test/restoration-state-handler.test.js +0 -335
  146. package/dist/test/restoration-state-handler.test.js.map +0 -1
  147. package/dist/test/review-block.test.d.ts +0 -1
  148. package/dist/test/review-block.test.js +0 -46
  149. package/dist/test/review-block.test.js.map +0 -1
  150. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.d.ts +0 -1
  151. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js +0 -12
  152. package/dist/test/sort-filter-bar/alpha-bar-tooltip.test.js.map +0 -1
  153. package/dist/test/sort-filter-bar/alpha-bar.test.d.ts +0 -1
  154. package/dist/test/sort-filter-bar/alpha-bar.test.js +0 -68
  155. package/dist/test/sort-filter-bar/alpha-bar.test.js.map +0 -1
  156. package/dist/test/sort-filter-bar/sort-filter-bar.test.d.ts +0 -1
  157. package/dist/test/sort-filter-bar/sort-filter-bar.test.js +0 -326
  158. package/dist/test/sort-filter-bar/sort-filter-bar.test.js.map +0 -1
  159. package/dist/test/text-overlay.test.d.ts +0 -1
  160. package/dist/test/text-overlay.test.js +0 -43
  161. package/dist/test/text-overlay.test.js.map +0 -1
  162. package/dist/test/text-snippet-block.test.d.ts +0 -1
  163. package/dist/test/text-snippet-block.test.js +0 -58
  164. package/dist/test/text-snippet-block.test.js.map +0 -1
  165. package/dist/test/tile-stats.test.d.ts +0 -1
  166. package/dist/test/tile-stats.test.js +0 -167
  167. package/dist/test/tile-stats.test.js.map +0 -1
  168. package/dist/test/tiles/grid/account-tile.test.d.ts +0 -1
  169. package/dist/test/tiles/grid/account-tile.test.js +0 -96
  170. package/dist/test/tiles/grid/account-tile.test.js.map +0 -1
  171. package/dist/test/tiles/grid/collection-tile.test.d.ts +0 -1
  172. package/dist/test/tiles/grid/collection-tile.test.js +0 -90
  173. package/dist/test/tiles/grid/collection-tile.test.js.map +0 -1
  174. package/dist/test/tiles/grid/item-tile.test.d.ts +0 -1
  175. package/dist/test/tiles/grid/item-tile.test.js +0 -400
  176. package/dist/test/tiles/grid/item-tile.test.js.map +0 -1
  177. package/dist/test/tiles/grid/search-tile.test.d.ts +0 -1
  178. package/dist/test/tiles/grid/search-tile.test.js +0 -62
  179. package/dist/test/tiles/grid/search-tile.test.js.map +0 -1
  180. package/dist/test/tiles/hover/hover-pane-controller.test.d.ts +0 -1
  181. package/dist/test/tiles/hover/hover-pane-controller.test.js +0 -351
  182. package/dist/test/tiles/hover/hover-pane-controller.test.js.map +0 -1
  183. package/dist/test/tiles/hover/tile-hover-pane.test.d.ts +0 -1
  184. package/dist/test/tiles/hover/tile-hover-pane.test.js +0 -53
  185. package/dist/test/tiles/hover/tile-hover-pane.test.js.map +0 -1
  186. package/dist/test/tiles/list/tile-list-compact-header.test.d.ts +0 -1
  187. package/dist/test/tiles/list/tile-list-compact-header.test.js +0 -36
  188. package/dist/test/tiles/list/tile-list-compact-header.test.js.map +0 -1
  189. package/dist/test/tiles/list/tile-list-compact.test.d.ts +0 -1
  190. package/dist/test/tiles/list/tile-list-compact.test.js +0 -237
  191. package/dist/test/tiles/list/tile-list-compact.test.js.map +0 -1
  192. package/dist/test/tiles/list/tile-list.test.d.ts +0 -1
  193. package/dist/test/tiles/list/tile-list.test.js +0 -460
  194. package/dist/test/tiles/list/tile-list.test.js.map +0 -1
  195. package/dist/test/tiles/tile-dispatcher.test.d.ts +0 -1
  196. package/dist/test/tiles/tile-dispatcher.test.js +0 -246
  197. package/dist/test/tiles/tile-dispatcher.test.js.map +0 -1
  198. package/dist/test/tiles/tile-display-value-provider.test.d.ts +0 -1
  199. package/dist/test/tiles/tile-display-value-provider.test.js +0 -142
  200. package/dist/test/tiles/tile-display-value-provider.test.js.map +0 -1
  201. package/dist/test/tiles/tile-mediatype-icon.test.d.ts +0 -1
  202. package/dist/test/tiles/tile-mediatype-icon.test.js +0 -133
  203. package/dist/test/tiles/tile-mediatype-icon.test.js.map +0 -1
  204. package/dist/test/utils/array-equals.test.d.ts +0 -1
  205. package/dist/test/utils/array-equals.test.js +0 -27
  206. package/dist/test/utils/array-equals.test.js.map +0 -1
  207. package/dist/test/utils/format-count.test.d.ts +0 -1
  208. package/dist/test/utils/format-count.test.js +0 -24
  209. package/dist/test/utils/format-count.test.js.map +0 -1
  210. package/dist/test/utils/format-date.test.d.ts +0 -1
  211. package/dist/test/utils/format-date.test.js +0 -61
  212. package/dist/test/utils/format-date.test.js.map +0 -1
  213. package/dist/test/utils/format-unit-size.test.d.ts +0 -1
  214. package/dist/test/utils/format-unit-size.test.js +0 -18
  215. package/dist/test/utils/format-unit-size.test.js.map +0 -1
  216. package/dist/test/utils/local-date-from-utc.test.d.ts +0 -1
  217. package/dist/test/utils/local-date-from-utc.test.js +0 -27
  218. package/dist/test/utils/local-date-from-utc.test.js.map +0 -1
  219. package/eslint.config.mjs +0 -53
  220. package/index.html +0 -24
  221. package/index.ts +0 -29
  222. package/local.archive.org.cert +0 -86
  223. package/local.archive.org.key +0 -27
  224. package/pnpm-workspace.yaml +0 -30
  225. package/renovate.json +0 -6
  226. package/src/app-root.ts +0 -1284
  227. package/src/assets/img/icons/arrow-left.ts +0 -10
  228. package/src/assets/img/icons/arrow-right.ts +0 -10
  229. package/src/assets/img/icons/chevron.ts +0 -4
  230. package/src/assets/img/icons/close-circle-dark.ts +0 -5
  231. package/src/assets/img/icons/contract.ts +0 -9
  232. package/src/assets/img/icons/empty-query.ts +0 -5
  233. package/src/assets/img/icons/expand.ts +0 -9
  234. package/src/assets/img/icons/eye-closed.ts +0 -5
  235. package/src/assets/img/icons/eye.ts +0 -5
  236. package/src/assets/img/icons/favorite-filled.ts +0 -10
  237. package/src/assets/img/icons/favorite-unfilled.ts +0 -9
  238. package/src/assets/img/icons/filter.ts +0 -10
  239. package/src/assets/img/icons/login-required.ts +0 -18
  240. package/src/assets/img/icons/mediatype/account.ts +0 -14
  241. package/src/assets/img/icons/mediatype/audio.ts +0 -14
  242. package/src/assets/img/icons/mediatype/collection.ts +0 -12
  243. package/src/assets/img/icons/mediatype/data.ts +0 -15
  244. package/src/assets/img/icons/mediatype/etree.ts +0 -14
  245. package/src/assets/img/icons/mediatype/film.ts +0 -14
  246. package/src/assets/img/icons/mediatype/images.ts +0 -13
  247. package/src/assets/img/icons/mediatype/radio.ts +0 -15
  248. package/src/assets/img/icons/mediatype/search.ts +0 -14
  249. package/src/assets/img/icons/mediatype/software.ts +0 -13
  250. package/src/assets/img/icons/mediatype/texts.ts +0 -13
  251. package/src/assets/img/icons/mediatype/tv-commercial.ts +0 -12
  252. package/src/assets/img/icons/mediatype/tv-fact-check.ts +0 -12
  253. package/src/assets/img/icons/mediatype/tv-quote.ts +0 -12
  254. package/src/assets/img/icons/mediatype/tv.ts +0 -14
  255. package/src/assets/img/icons/mediatype/video.ts +0 -14
  256. package/src/assets/img/icons/mediatype/web.ts +0 -13
  257. package/src/assets/img/icons/null-result.ts +0 -5
  258. package/src/assets/img/icons/quote.ts +0 -7
  259. package/src/assets/img/icons/restricted.ts +0 -13
  260. package/src/assets/img/icons/reviews.ts +0 -11
  261. package/src/assets/img/icons/upload.ts +0 -12
  262. package/src/assets/img/icons/views.ts +0 -11
  263. package/src/circular-activity-indicator.ts +0 -64
  264. package/src/collection-browser.ts +0 -3187
  265. package/src/collection-facets/facet-row.ts +0 -309
  266. package/src/collection-facets/facet-tombstone-row.ts +0 -40
  267. package/src/collection-facets/facets-template.ts +0 -85
  268. package/src/collection-facets/models.ts +0 -10
  269. package/src/collection-facets/more-facets-content.ts +0 -644
  270. package/src/collection-facets/more-facets-pagination.ts +0 -294
  271. package/src/collection-facets/smart-facets/dedupe.ts +0 -44
  272. package/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.ts +0 -27
  273. package/src/collection-facets/smart-facets/heuristics/index.ts +0 -3
  274. package/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.ts +0 -17
  275. package/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.ts +0 -70
  276. package/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.ts +0 -79
  277. package/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.ts +0 -93
  278. package/src/collection-facets/smart-facets/models.ts +0 -36
  279. package/src/collection-facets/smart-facets/smart-facet-bar.ts +0 -437
  280. package/src/collection-facets/smart-facets/smart-facet-button.ts +0 -145
  281. package/src/collection-facets/smart-facets/smart-facet-dropdown.ts +0 -185
  282. package/src/collection-facets/smart-facets/smart-facet-equals.ts +0 -16
  283. package/src/collection-facets/smart-facets/smart-facet-heuristics.ts +0 -26
  284. package/src/collection-facets/toggle-switch.ts +0 -174
  285. package/src/collection-facets.ts +0 -1013
  286. package/src/data-source/collection-browser-data-source-interface.ts +0 -351
  287. package/src/data-source/collection-browser-data-source.ts +0 -1474
  288. package/src/data-source/collection-browser-query-state.ts +0 -60
  289. package/src/data-source/models.ts +0 -56
  290. package/src/empty-placeholder.ts +0 -192
  291. package/src/expanded-date-picker.ts +0 -191
  292. package/src/language-code-handler/language-code-handler.ts +0 -64
  293. package/src/language-code-handler/language-code-mapping.ts +0 -564
  294. package/src/manage/manage-bar.ts +0 -276
  295. package/src/manage/remove-items-modal-content.ts +0 -102
  296. package/src/mediatype/mediatype-config.ts +0 -146
  297. package/src/models.ts +0 -895
  298. package/src/restoration-state-handler.ts +0 -550
  299. package/src/sort-filter-bar/alpha-bar-tooltip.ts +0 -53
  300. package/src/sort-filter-bar/alpha-bar.ts +0 -252
  301. package/src/sort-filter-bar/img/compact.ts +0 -5
  302. package/src/sort-filter-bar/img/list.ts +0 -5
  303. package/src/sort-filter-bar/img/sort-toggle-disabled.ts +0 -15
  304. package/src/sort-filter-bar/img/sort-toggle-down.ts +0 -17
  305. package/src/sort-filter-bar/img/sort-toggle-up.ts +0 -17
  306. package/src/sort-filter-bar/img/sort-triangle.ts +0 -5
  307. package/src/sort-filter-bar/img/tile.ts +0 -5
  308. package/src/sort-filter-bar/sort-filter-bar.ts +0 -734
  309. package/src/styles/ia-button.ts +0 -139
  310. package/src/styles/item-image-styles.ts +0 -124
  311. package/src/styles/sr-only.ts +0 -18
  312. package/src/styles/tile-action-styles.ts +0 -59
  313. package/src/tiles/base-tile-component.ts +0 -124
  314. package/src/tiles/collection-browser-loading-tile.ts +0 -26
  315. package/src/tiles/grid/account-tile.ts +0 -113
  316. package/src/tiles/grid/collection-tile.ts +0 -184
  317. package/src/tiles/grid/item-tile.ts +0 -347
  318. package/src/tiles/grid/search-tile.ts +0 -90
  319. package/src/tiles/grid/styles/tile-grid-shared-styles.ts +0 -130
  320. package/src/tiles/grid/tile-stats.ts +0 -211
  321. package/src/tiles/hover/hover-pane-controller.ts +0 -638
  322. package/src/tiles/hover/tile-hover-pane.ts +0 -184
  323. package/src/tiles/image-block.ts +0 -162
  324. package/src/tiles/item-image.ts +0 -214
  325. package/src/tiles/list/tile-list-compact-header.ts +0 -112
  326. package/src/tiles/list/tile-list-compact.ts +0 -278
  327. package/src/tiles/list/tile-list.ts +0 -718
  328. package/src/tiles/models.ts +0 -21
  329. package/src/tiles/overlay/icon-overlay.ts +0 -57
  330. package/src/tiles/overlay/text-overlay.ts +0 -79
  331. package/src/tiles/review-block.ts +0 -130
  332. package/src/tiles/text-snippet-block.ts +0 -132
  333. package/src/tiles/tile-dispatcher.ts +0 -637
  334. package/src/tiles/tile-display-value-provider.ts +0 -133
  335. package/src/tiles/tile-mediatype-icon.ts +0 -133
  336. package/src/utils/analytics-events.ts +0 -29
  337. package/src/utils/array-equals.ts +0 -8
  338. package/src/utils/collapse-repeated-quotes.ts +0 -13
  339. package/src/utils/date-filter-field.ts +0 -11
  340. package/src/utils/facet-utils.ts +0 -183
  341. package/src/utils/format-count.ts +0 -95
  342. package/src/utils/format-date.ts +0 -62
  343. package/src/utils/format-unit-size.ts +0 -43
  344. package/src/utils/local-date-from-utc.ts +0 -15
  345. package/src/utils/log.ts +0 -14
  346. package/src/utils/resolve-mediatype.ts +0 -26
  347. package/src/utils/sha1.ts +0 -9
  348. package/test/collection-browser.test.ts +0 -2694
  349. package/test/collection-facets/facet-row.test.ts +0 -421
  350. package/test/collection-facets/facets-template.test.ts +0 -139
  351. package/test/collection-facets/more-facets-content.test.ts +0 -231
  352. package/test/collection-facets/more-facets-pagination.test.ts +0 -201
  353. package/test/collection-facets/toggle-switch.test.ts +0 -164
  354. package/test/collection-facets.test.ts +0 -928
  355. package/test/data-source/collection-browser-data-source.test.ts +0 -193
  356. package/test/empty-placeholder.test.ts +0 -88
  357. package/test/expanded-date-picker.test.ts +0 -201
  358. package/test/icon-overlay.test.ts +0 -38
  359. package/test/image-block.test.ts +0 -247
  360. package/test/item-image.test.ts +0 -220
  361. package/test/manage/manage-bar.test.ts +0 -347
  362. package/test/manage/remove-items-modal-content.test.ts +0 -81
  363. package/test/mediatype-config.test.ts +0 -11
  364. package/test/mocks/mock-analytics-handler.ts +0 -30
  365. package/test/mocks/mock-search-responses.ts +0 -1364
  366. package/test/mocks/mock-search-service.ts +0 -134
  367. package/test/restoration-state-handler.test.ts +0 -480
  368. package/test/review-block.test.ts +0 -62
  369. package/test/sort-filter-bar/alpha-bar-tooltip.test.ts +0 -17
  370. package/test/sort-filter-bar/alpha-bar.test.ts +0 -101
  371. package/test/sort-filter-bar/sort-filter-bar.test.ts +0 -472
  372. package/test/text-overlay.test.ts +0 -55
  373. package/test/text-snippet-block.test.ts +0 -85
  374. package/test/tile-stats.test.ts +0 -191
  375. package/test/tiles/grid/account-tile.test.ts +0 -121
  376. package/test/tiles/grid/collection-tile.test.ts +0 -114
  377. package/test/tiles/grid/item-tile.test.ts +0 -520
  378. package/test/tiles/grid/search-tile.test.ts +0 -75
  379. package/test/tiles/hover/hover-pane-controller.test.ts +0 -482
  380. package/test/tiles/hover/tile-hover-pane.test.ts +0 -80
  381. package/test/tiles/list/tile-list-compact-header.test.ts +0 -43
  382. package/test/tiles/list/tile-list-compact.test.ts +0 -282
  383. package/test/tiles/list/tile-list.test.ts +0 -576
  384. package/test/tiles/tile-dispatcher.test.ts +0 -320
  385. package/test/tiles/tile-display-value-provider.test.ts +0 -172
  386. package/test/tiles/tile-mediatype-icon.test.ts +0 -160
  387. package/test/utils/array-equals.test.ts +0 -31
  388. package/test/utils/format-count.test.ts +0 -32
  389. package/test/utils/format-date.test.ts +0 -89
  390. package/test/utils/format-unit-size.test.ts +0 -21
  391. package/test/utils/local-date-from-utc.test.ts +0 -37
  392. package/tsconfig.json +0 -25
  393. package/types/dompurify.d.ts +0 -1
  394. package/vite.config.ts +0 -29
  395. package/web-dev-server.config.mjs +0 -30
  396. package/web-test-runner.config.mjs +0 -52
@@ -1,734 +0,0 @@
1
- import {
2
- LitElement,
3
- html,
4
- css,
5
- nothing,
6
- PropertyValues,
7
- TemplateResult,
8
- } from 'lit';
9
- import { customElement, property, query, state } from 'lit/decorators.js';
10
- import { msg, str } from '@lit/localize';
11
- import type { IaDropdown, optionInterface } from '@internetarchive/ia-dropdown';
12
- import type { SortDirection } from '@internetarchive/search-service';
13
- import {
14
- CollectionDisplayMode,
15
- defaultSortAvailability,
16
- PrefixFilterCounts,
17
- PrefixFilterType,
18
- SORT_OPTIONS,
19
- SortField,
20
- SortOption,
21
- } from '../models';
22
-
23
- import { sortUpIcon } from './img/sort-toggle-up';
24
- import { sortDownIcon } from './img/sort-toggle-down';
25
- import { sortDisabledIcon } from './img/sort-toggle-disabled';
26
- import { tileIcon } from './img/tile';
27
- import { listIcon } from './img/list';
28
- import { compactIcon } from './img/compact';
29
- import { srOnlyStyle } from '../styles/sr-only';
30
-
31
- import '@internetarchive/ia-dropdown';
32
- import './alpha-bar';
33
-
34
- type AlphaSelector = 'creator' | 'title';
35
-
36
- @customElement('sort-filter-bar')
37
- export class SortFilterBar extends LitElement {
38
- /** Which display mode the tiles are being rendered with (grid/list-detail/list-compact) */
39
- @property({ type: String }) displayMode?: CollectionDisplayMode;
40
-
41
- /** The default sort direction to use if none is set */
42
- @property({ type: String }) defaultSortDirection: SortDirection | null = null;
43
-
44
- /** The default sort field to use if none is set */
45
- @property({ type: String }) defaultSortField: Exclude<
46
- SortField,
47
- SortField.default
48
- > = SortField.relevance;
49
-
50
- /** The current sort direction (asc/desc), or null if none is set */
51
- @property({ type: String }) sortDirection: SortDirection | null = null;
52
-
53
- /** The field currently being sorted on (e.g., 'title'). Defaults to relevance. */
54
- @property({ type: String }) selectedSort: SortField = SortField.default;
55
-
56
- /** The currently selected title letter filter, or null if none is set */
57
- @property({ type: String }) selectedTitleFilter: string | null = null;
58
-
59
- /** The currently selected creator letter filter, or null if none is set */
60
- @property({ type: String }) selectedCreatorFilter: string | null = null;
61
-
62
- /**
63
- * Map defining which sortable fields should be included on the sort bar.
64
- *
65
- * E.g.,
66
- * ```
67
- * {
68
- * [SortField.relevance]: true,
69
- * [SortField.date]: false,
70
- * [SortField.title]: true,
71
- * ...
72
- * }
73
- * ```
74
- */
75
- @property({ type: Object }) sortFieldAvailability = defaultSortAvailability;
76
-
77
- /** Whether to replace the default sort options with a slot for customization (default `false`) */
78
- @property({ type: Boolean, reflect: true }) enableSortOptionsSlot: boolean =
79
- false;
80
-
81
- /** Whether to suppress showing the three display mode options on the right of the bar (default `false`) */
82
- @property({ type: Boolean, reflect: true })
83
- suppressDisplayModes: boolean = false;
84
-
85
- /** Maps of result counts for letters on the alphabet bar, for each letter filter type */
86
- @property({ type: Object }) prefixFilterCountMap?: Record<
87
- PrefixFilterType,
88
- PrefixFilterCounts
89
- >;
90
-
91
- /**
92
- * Which of the alphabet bars (title/creator) should be shown, or null if one
93
- * should not currently be rendered.
94
- */
95
- @state() alphaSelectorVisible: AlphaSelector | null = null;
96
-
97
- /**
98
- * Whether the transparent backdrop to catch clicks outside the dropdown menu
99
- * should be rendered.
100
- */
101
- @state() dropdownBackdropVisible = false;
102
-
103
- /** The single, consolidated dropdown component containing all available options */
104
- @query('#sort-dropdown')
105
- private sortOptionsDropdown!: IaDropdown;
106
-
107
- render() {
108
- return html`
109
- <div id="container">
110
- <section id="sort-bar" aria-label="Sorting options">
111
- <slot name="sort-options-left"></slot>
112
- <div id="sort-options">
113
- ${!this.enableSortOptionsSlot
114
- ? html`
115
- <div class="sort-direction-container">
116
- ${this.sortDirectionSelectorTemplate}
117
- </div>
118
- <span class="sort-by-text">${msg('Sort by:')}</span>
119
- <div id="sort-selector-container">
120
- ${this.sortSelectorTemplate}
121
- </div>
122
- `
123
- : html`<slot name="sort-options"></slot>`}
124
- </div>
125
- <slot name="sort-options-right"></slot>
126
-
127
- ${this.suppressDisplayModes
128
- ? nothing
129
- : html`<div id="display-style-selector">
130
- ${this.displayOptionTemplate}
131
- </div>`}
132
- <slot name="sort-bar-end"></slot>
133
- </section>
134
-
135
- ${this.dropdownBackdropVisible ? this.dropdownBackdrop : nothing}
136
- ${this.alphaBarTemplate}
137
- </div>
138
- `;
139
- }
140
-
141
- willUpdate(changed: PropertyValues) {
142
- if (changed.has('selectedSort') || changed.has('defaultSortField')) {
143
- // If the sort is changed from its default without a direction set,
144
- // we adopt the default sort direction for that sort type.
145
- if (
146
- this.selectedSort &&
147
- this.selectedSort !== SortField.default &&
148
- this.sortDirection === null
149
- ) {
150
- const sortOption = SORT_OPTIONS[this.finalizedSortField];
151
- this.sortDirection = sortOption.defaultSortDirection;
152
- }
153
- }
154
- }
155
-
156
- updated(changed: PropertyValues) {
157
- if (changed.has('displayMode')) {
158
- this.displayModeChanged();
159
- }
160
-
161
- if (changed.has('selectedTitleFilter') && this.selectedTitleFilter) {
162
- this.alphaSelectorVisible = 'title';
163
- }
164
-
165
- if (changed.has('selectedCreatorFilter') && this.selectedCreatorFilter) {
166
- this.alphaSelectorVisible = 'creator';
167
- }
168
-
169
- if (changed.has('dropdownBackdropVisible')) {
170
- this.setupEscapeListeners();
171
- }
172
- }
173
-
174
- private setupEscapeListeners() {
175
- if (this.dropdownBackdropVisible) {
176
- document.addEventListener(
177
- 'keydown',
178
- this.boundSortBarSelectorEscapeListener,
179
- );
180
- } else {
181
- document.removeEventListener(
182
- 'keydown',
183
- this.boundSortBarSelectorEscapeListener,
184
- );
185
- }
186
- }
187
-
188
- private boundSortBarSelectorEscapeListener = (e: KeyboardEvent) => {
189
- if (e.key === 'Escape') {
190
- this.closeDropdown();
191
- }
192
- };
193
-
194
- /**
195
- * Template to render the alphabet bar, or `nothing` if it should not be rendered
196
- * for the current sort
197
- */
198
- private get alphaBarTemplate(): TemplateResult | typeof nothing {
199
- if (!['title', 'creator'].includes(this.selectedSort)) return nothing;
200
-
201
- if (this.alphaSelectorVisible === null) {
202
- if (this.selectedSort === 'creator') return this.creatorSelectorBar;
203
- if (this.selectedSort === 'title') return this.titleSelectorBar;
204
- } else {
205
- return this.alphaSelectorVisible === 'creator'
206
- ? this.creatorSelectorBar
207
- : this.titleSelectorBar;
208
- }
209
-
210
- return nothing;
211
- }
212
-
213
- /** Template to render the sort direction toggle button */
214
- private get sortDirectionSelectorTemplate(): TemplateResult {
215
- const oppositeSortDirectionReadable =
216
- this.sortDirection === 'asc' ? msg('descending') : msg('ascending');
217
- const buttonLabel = this.canChangeSortDirection
218
- ? msg(str`Change to ${oppositeSortDirectionReadable} sort`)
219
- : msg('Directions are not available for the current sort option');
220
-
221
- return html`
222
- <button
223
- class="sort-direction-selector"
224
- title=${buttonLabel}
225
- ?disabled=${!this.canChangeSortDirection}
226
- @click=${this.handleSortDirectionClicked}
227
- >
228
- <span class="sr-only">${buttonLabel}</span>
229
- ${this.sortDirectionIcon}
230
- </button>
231
- `;
232
- }
233
-
234
- /** Template to render the sort direction button's icon in the correct current state */
235
- private get sortDirectionIcon(): TemplateResult {
236
- // Show a fully disabled icon for sort options without direction support
237
- if (!this.canChangeSortDirection) {
238
- return html`<div class="sort-direction-icon">${sortDisabledIcon}</div>`;
239
- }
240
-
241
- // For all other sorts, show the ascending/descending direction
242
- return html`
243
- <div class="sort-direction-icon">
244
- ${this.finalizedSortDirection === 'asc' ? sortUpIcon : sortDownIcon}
245
- </div>
246
- `;
247
- }
248
-
249
- /** The template to render all the sort options in a single dropdown */
250
- private get sortSelectorTemplate() {
251
- const displayedOptions = Object.values(SORT_OPTIONS).filter(
252
- opt => opt.shownInSortBar && this.sortFieldAvailability[opt.field],
253
- );
254
-
255
- return html`
256
- <div id="sort-dropdown-container">
257
- ${this.getSortDropdown({
258
- displayName: SORT_OPTIONS[this.finalizedSortField].displayName,
259
- id: 'sort-dropdown',
260
- selected: true,
261
- dropdownOptions: displayedOptions.map(opt =>
262
- this.getDropdownOption(opt.field),
263
- ),
264
- selectedOption: this.finalizedSortField,
265
- onOptionSelected: this.sortOptionSelected,
266
- onDropdownClick: () => {
267
- this.dropdownBackdropVisible = this.sortOptionsDropdown.open;
268
- this.sortOptionsDropdown.classList.toggle(
269
- 'open',
270
- this.sortOptionsDropdown.open,
271
- );
272
- },
273
- })}
274
- </div>
275
- `;
276
- }
277
-
278
- /**
279
- * Generates a dropdown component containing multiple grouped sort options.
280
- *
281
- * @param options.displayName The name to use for the dropdown's visible label
282
- * @param options.id The id to apply to the dropdown element
283
- * @param options.dropdownOptions An array of option objects used to populate the dropdown
284
- * @param options.selectedOption The id of the option that should be initially selected
285
- * @param options.selected A boolean indicating whether this dropdown should use its
286
- * selected appearance
287
- * @param options.onOptionSelected A handler for optionSelected events coming from the dropdown
288
- * @param options.onDropdownClick A handler for click events on the dropdown
289
- */
290
- private getSortDropdown(options: {
291
- displayName: string;
292
- id: string;
293
- dropdownOptions: optionInterface[];
294
- selectedOption?: string;
295
- selected: boolean;
296
- onOptionSelected?: (e: CustomEvent<{ option: optionInterface }>) => void;
297
- onDropdownClick?: (e: PointerEvent) => void;
298
- }): TemplateResult {
299
- return html`
300
- <ia-dropdown
301
- id=${options.id}
302
- class=${options.selected ? 'selected' : ''}
303
- displayCaret
304
- closeOnSelect
305
- includeSelectedOption
306
- .openViaButton=${options.selected}
307
- .options=${options.dropdownOptions}
308
- .selectedOption=${options.selectedOption ?? ''}
309
- @optionSelected=${options.onOptionSelected ?? nothing}
310
- @click=${options.onDropdownClick ?? nothing}
311
- >
312
- <span
313
- class="dropdown-label"
314
- slot="dropdown-label"
315
- data-title=${options.displayName}
316
- >
317
- ${options.displayName}
318
- </span>
319
- </ia-dropdown>
320
- `;
321
- }
322
-
323
- /** Generates a single dropdown option object for the given sort field */
324
- private getDropdownOption(sortField: SortField): optionInterface {
325
- return {
326
- id: sortField,
327
- label: html`
328
- <span class="dropdown-option-label">
329
- ${SORT_OPTIONS[sortField].displayName}
330
- </span>
331
- `,
332
- };
333
- }
334
-
335
- /** Handler for when a new sort dropdown option is selected */
336
- private sortOptionSelected(e: CustomEvent<{ option: optionInterface }>) {
337
- this.dropdownBackdropVisible = false;
338
-
339
- const sortField = e.detail.option.id as SortField;
340
- this.setSelectedSort(sortField);
341
-
342
- this.alphaSelectorVisible = null;
343
- if (sortField !== 'title' && this.selectedTitleFilter) {
344
- this.selectedTitleFilter = null;
345
- this.emitTitleLetterChangedEvent();
346
- }
347
- if (sortField !== 'creator' && this.selectedCreatorFilter) {
348
- this.selectedCreatorFilter = null;
349
- this.emitCreatorLetterChangedEvent();
350
- }
351
- }
352
-
353
- /** Template for rendering the three display mode options */
354
- /** Added data-testid for Playwright testing * */
355
- private get displayOptionTemplate() {
356
- return html`
357
- <ul>
358
- <li>
359
- <button
360
- id="grid-button"
361
- @click=${() => {
362
- this.displayMode = 'grid';
363
- }}
364
- class=${this.displayMode === 'grid' ? 'active' : ''}
365
- title="Tile view"
366
- data-testid="grid-button"
367
- >
368
- ${tileIcon}
369
- </button>
370
- </li>
371
- <li>
372
- <button
373
- id="list-detail-button"
374
- @click=${() => {
375
- this.displayMode = 'list-detail';
376
- }}
377
- class=${this.displayMode === 'list-detail' ? 'active' : ''}
378
- title="List view"
379
- data-testid="list-detail-button"
380
- >
381
- ${listIcon}
382
- </button>
383
- </li>
384
- <li>
385
- <button
386
- id="list-compact-button"
387
- @click=${() => {
388
- this.displayMode = 'list-compact';
389
- }}
390
- class=${this.displayMode === 'list-compact' ? 'active' : ''}
391
- title="Compact list view"
392
- data-testid="list-compact-button"
393
- >
394
- ${compactIcon}
395
- </button>
396
- </li>
397
- </ul>
398
- `;
399
- }
400
-
401
- /**
402
- * Template for rendering the transparent backdrop to capture clicks outside the
403
- * dropdown menu while it is open.
404
- */
405
- private get dropdownBackdrop() {
406
- return html`
407
- <div
408
- id="sort-selector-backdrop"
409
- @keyup=${this.closeDropdown}
410
- @click=${this.closeDropdown}
411
- ></div>
412
- `;
413
- }
414
-
415
- /** Closes the sorting dropdown component's menus */
416
- private closeDropdown() {
417
- this.dropdownBackdropVisible = false;
418
-
419
- if (!this.sortOptionsDropdown) return;
420
- this.sortOptionsDropdown.open = false;
421
- this.sortOptionsDropdown.classList.remove('open');
422
- }
423
-
424
- setSortDirection(sortDirection: SortDirection) {
425
- this.sortDirection = sortDirection;
426
- this.emitSortChangedEvent();
427
- }
428
-
429
- /** Toggles the current sort direction between 'asc' and 'desc' */
430
- private toggleSortDirection() {
431
- this.setSortDirection(
432
- this.finalizedSortDirection === 'desc' ? 'asc' : 'desc',
433
- );
434
- }
435
-
436
- private handleSortDirectionClicked(): void {
437
- if (
438
- !this.sortDirection &&
439
- this.defaultSortField &&
440
- this.defaultSortDirection
441
- ) {
442
- // When the sort direction is merely defaulted (not set by the user), clicking
443
- // the toggled button should "promote" the default sort to an explicitly-set one
444
- // and then toggle it as usual.
445
- this.selectedSort = this.defaultSortField;
446
- this.sortDirection = this.defaultSortDirection;
447
- }
448
-
449
- this.toggleSortDirection();
450
- }
451
-
452
- setSelectedSort(sort: SortField) {
453
- this.selectedSort = sort;
454
- // Apply this field's default sort direction
455
- const sortOption = SORT_OPTIONS[sort];
456
- this.sortDirection = sortOption.defaultSortDirection;
457
- this.emitSortChangedEvent();
458
- }
459
-
460
- /** The current sort field, or the default one if no explicit sort is set */
461
- private get finalizedSortField(): SortField {
462
- const resolvedField =
463
- this.selectedSort === SortField.default
464
- ? this.defaultSortField
465
- : this.selectedSort;
466
- if (this.sortFieldAvailability[resolvedField]) return resolvedField;
467
-
468
- // Fall back to the first available sort option shown in the sort bar, if
469
- // the requested one isn't available
470
- return this.firstAvailableOption?.field ?? resolvedField;
471
- }
472
-
473
- /** The current sort direction, or the default one if no explicit direction is set */
474
- private get finalizedSortDirection(): SortDirection | null {
475
- return this.sortDirection === null
476
- ? this.defaultSortDirection
477
- : this.sortDirection;
478
- }
479
-
480
- /** The first option shown in the sort dropdown, or undefined if none are available */
481
- private get firstAvailableOption(): SortOption | undefined {
482
- return Object.values(SORT_OPTIONS).find(
483
- opt => opt.shownInSortBar && this.sortFieldAvailability[opt.field],
484
- );
485
- }
486
-
487
- /** Whether the sort direction button should be enabled for the current sort */
488
- private get canChangeSortDirection(): boolean {
489
- return SORT_OPTIONS[this.finalizedSortField].canSetDirection;
490
- }
491
-
492
- private get titleSelectorBar() {
493
- return html` <alpha-bar
494
- .selectedLetter=${this.selectedTitleFilter}
495
- .letterCounts=${this.prefixFilterCountMap?.title}
496
- ariaLandmarkLabel="Filter by title letter"
497
- @letterChanged=${this.titleLetterChanged}
498
- ></alpha-bar>`;
499
- }
500
-
501
- private get creatorSelectorBar() {
502
- return html` <alpha-bar
503
- .selectedLetter=${this.selectedCreatorFilter}
504
- .letterCounts=${this.prefixFilterCountMap?.creator}
505
- ariaLandmarkLabel="Filter by creator letter"
506
- @letterChanged=${this.creatorLetterChanged}
507
- ></alpha-bar>`;
508
- }
509
-
510
- private titleLetterChanged(
511
- e: CustomEvent<{ selectedLetter: string | undefined }>,
512
- ) {
513
- this.selectedTitleFilter = e.detail.selectedLetter ?? null;
514
- this.emitTitleLetterChangedEvent();
515
- }
516
-
517
- private creatorLetterChanged(
518
- e: CustomEvent<{ selectedLetter: string | undefined }>,
519
- ) {
520
- this.selectedCreatorFilter = e.detail.selectedLetter ?? null;
521
- this.emitCreatorLetterChangedEvent();
522
- }
523
-
524
- private emitTitleLetterChangedEvent() {
525
- const event = new CustomEvent<{ selectedLetter: string | null }>(
526
- 'titleLetterChanged',
527
- {
528
- detail: { selectedLetter: this.selectedTitleFilter },
529
- },
530
- );
531
- this.dispatchEvent(event);
532
- }
533
-
534
- private emitCreatorLetterChangedEvent() {
535
- const event = new CustomEvent<{ selectedLetter: string | null }>(
536
- 'creatorLetterChanged',
537
- {
538
- detail: { selectedLetter: this.selectedCreatorFilter },
539
- },
540
- );
541
- this.dispatchEvent(event);
542
- }
543
-
544
- private displayModeChanged() {
545
- const event = new CustomEvent<{
546
- displayMode?: CollectionDisplayMode;
547
- }>('displayModeChanged', {
548
- detail: { displayMode: this.displayMode },
549
- });
550
- this.dispatchEvent(event);
551
- }
552
-
553
- private emitSortChangedEvent() {
554
- const event = new CustomEvent<{
555
- selectedSort: SortField;
556
- sortDirection: SortDirection | null;
557
- }>('sortChanged', {
558
- detail: {
559
- selectedSort: this.selectedSort,
560
- sortDirection: this.sortDirection,
561
- },
562
- });
563
- this.dispatchEvent(event);
564
- }
565
-
566
- static get styles() {
567
- const disabledIconColor = css`#bbbbbb`;
568
-
569
- return [
570
- srOnlyStyle,
571
- css`
572
- #container {
573
- position: relative;
574
- }
575
-
576
- #sort-bar {
577
- display: flex;
578
- justify-content: flex-start;
579
- align-items: center;
580
- padding-bottom: 1px;
581
- border-bottom: 1px solid #2c2c2c;
582
- font-size: 1.4rem;
583
- }
584
-
585
- #sort-options {
586
- display: flex;
587
- align-items: center;
588
- flex-grow: 1;
589
- }
590
-
591
- ul {
592
- list-style: none;
593
- display: flex;
594
- align-items: center;
595
- margin: 0;
596
- padding: 0;
597
- }
598
-
599
- li {
600
- padding: 0;
601
- }
602
-
603
- .sort-by-text {
604
- margin-right: 5px;
605
- font-weight: bold;
606
- white-space: nowrap;
607
- }
608
-
609
- .sort-direction-container {
610
- display: flex;
611
- align-self: stretch;
612
- flex: 0;
613
- margin: 0 3px;
614
- }
615
-
616
- .sort-direction-selector {
617
- display: flex;
618
- justify-content: center;
619
- width: 30px;
620
- margin: 0 5px 0 0;
621
- padding: 7px 8px;
622
- max-height: fit-content;
623
- border-radius: 5px;
624
- background: white;
625
- border: 1px solid rgb(25, 72, 128);
626
- appearance: none;
627
- cursor: pointer;
628
- }
629
-
630
- .sort-direction-selector:disabled {
631
- cursor: not-allowed;
632
- border-color: ${disabledIconColor};
633
- }
634
-
635
- .sort-direction-icon {
636
- display: flex;
637
- align-items: center;
638
- background: none;
639
- color: inherit;
640
- border: none;
641
- padding: 0;
642
- outline: inherit;
643
- width: 12px;
644
- height: 12px;
645
- }
646
-
647
- .sort-direction-icon > svg {
648
- flex: 1;
649
- }
650
-
651
- #sort-selector-container {
652
- flex: 1;
653
- display: flex;
654
- justify-content: flex-start;
655
- align-items: center;
656
- }
657
-
658
- #sort-dropdown-container {
659
- display: flex;
660
- justify-content: flex-start;
661
- align-items: center;
662
- }
663
-
664
- #sort-selector-backdrop {
665
- position: fixed;
666
- top: 0;
667
- left: 0;
668
- width: 100vw;
669
- height: 100vh;
670
- z-index: 1;
671
- background-color: transparent;
672
- }
673
-
674
- #display-style-selector {
675
- flex: 0;
676
- }
677
-
678
- #display-style-selector button {
679
- background: none;
680
- color: inherit;
681
- border: none;
682
- appearance: none;
683
- cursor: pointer;
684
- -webkit-appearance: none;
685
- fill: ${disabledIconColor};
686
- }
687
-
688
- #display-style-selector button.active {
689
- fill: var(--ia-theme-primary-text-color, #2c2c2c);
690
- }
691
-
692
- #display-style-selector button svg {
693
- width: 24px;
694
- height: 24px;
695
- }
696
-
697
- ia-dropdown {
698
- --dropdownTextColor: white;
699
- --dropdownOffsetTop: 0;
700
- --dropdownBorderTopWidth: 0;
701
- --dropdownBorderTopLeftRadius: 0;
702
- --dropdownBorderTopRightRadius: 0;
703
- --dropdownWhiteSpace: nowrap;
704
- --dropdownListZIndex: 2;
705
- --dropdownCaretColor: var(--ia-theme-primary-text-color, #2c2c2c);
706
- --dropdownSelectedTextColor: white;
707
- --dropdownSelectedBgColor: rgba(255, 255, 255, 0.3);
708
- --dropdownHoverBgColor: rgba(255, 255, 255, 0.3);
709
- --caretHeight: 9px;
710
- --caretWidth: 12px;
711
- --caretPadding: 0 5px 0 0;
712
- }
713
- ia-dropdown.selected .dropdown-label {
714
- font-weight: bold;
715
- }
716
- ia-dropdown.open {
717
- z-index: 2;
718
- }
719
-
720
- .dropdown-label {
721
- display: inline-block;
722
- height: 100%;
723
- padding-left: 5px;
724
- font-size: 1.4rem;
725
- font-family: var(--ia-theme-base-font-family);
726
- line-height: 2;
727
- color: var(--ia-theme-primary-text-color, #2c2c2c);
728
- white-space: nowrap;
729
- user-select: none;
730
- }
731
- `,
732
- ];
733
- }
734
- }