|
2 | 2 | import { Button } from 'bits-ui'; |
3 | 3 | import { slide } from 'svelte/transition'; |
4 | 4 | import RangeSlider from './RangeSlider.svelte'; |
| 5 | + import TooltipInfo from '$lib/components/TooltipInfo.svelte'; |
5 | 6 | import * as config from '$lib/config'; |
6 | 7 |
|
7 | 8 | let { |
|
117 | 118 | > |
118 | 119 | <section class="filters-header"> |
119 | 120 | <h2>Filters</h2> |
| 121 | +
|
120 | 122 | <Button.Root class="close-button" onclick={handleClose} aria-label="Close filters" |
121 | 123 | >×</Button.Root |
122 | 124 | > |
|
187 | 189 | endLabel={selectedDateRange[1] <= 0 |
188 | 190 | ? `${-1 * selectedDateRange[1]} BCE` |
189 | 191 | : `${selectedDateRange[1]} CE`} |
| 192 | + tooltip={config.tooltips.date} |
190 | 193 | bind:selectedRange={selectedDateRange} |
191 | 194 | rangeChange={() => searchFiltersChange()} |
192 | 195 | /> |
|
197 | 200 | <section class="filters-group"> |
198 | 201 | <details> |
199 | 202 | <summary> |
200 | | - <h3>{aggregations[key].title}</h3> |
| 203 | + <hgroup> |
| 204 | + <h3>{aggregations[key].title}</h3> |
| 205 | + {#if key in config.tooltips} |
| 206 | + <TooltipInfo>{config.tooltips[key]}</TooltipInfo> |
| 207 | + {/if} |
| 208 | + </hgroup> |
201 | 209 | </summary> |
202 | 210 | <div> |
203 | 211 | <small |
|
271 | 279 | step={1} |
272 | 280 | startLabel="Minimum" |
273 | 281 | endLabel="Maximum" |
| 282 | + tooltip={config.tooltips.letterHeight} |
274 | 283 | bind:selectedRange={selectedLetterHeightRange} |
275 | 284 | rangeChange={() => searchFiltersChange()} |
276 | 285 | /> |
|
431 | 440 | padding-inline: var(--size-3); |
432 | 441 | } |
433 | 442 |
|
| 443 | + .filters-group summary hgroup { |
| 444 | + align-items: flex-start; |
| 445 | + display: flex; |
| 446 | + } |
| 447 | +
|
434 | 448 | .filters-group details[open] summary { |
435 | 449 | margin-bottom: var(--size-00); |
436 | 450 | } |
|
0 commit comments