shift(-1)} aria-label="Previous years" >
{rangeLabel}
shift(1)} aria-label="Next years" >
{#each years as year (year)} {@const selected = value === year} {@const current = todayYear === year} {@const disabled = year < min || year > max}
select(year)} class={[ 'relative rounded-xl px-2 py-3 text-sm tabular-nums transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/30', disabled && 'cursor-not-allowed opacity-30', !disabled && selected && 'bg-brand-500 font-semibold text-white shadow-sm', !disabled && !selected && current && 'bg-brand-50 font-medium text-brand-700 dark:bg-brand-950/40 dark:text-brand-300', !disabled && !selected && !current && 'text-secondary hover:bg-surface-overlay hover:text-primary' ]} > {year} {#if current && !selected}
{/if}
{/each}
Selected
{value}
This year