style filter bar with background and tweak layout
This commit is contained in:
parent
5bf8a1177f
commit
b36ebd78b4
1 changed files with 24 additions and 21 deletions
|
|
@ -295,7 +295,7 @@
|
||||||
bind:value={elementFilters}
|
bind:value={elementFilters}
|
||||||
onValueChange={handleElementChange}
|
onValueChange={handleElementChange}
|
||||||
placeholder="Element"
|
placeholder="Element"
|
||||||
contained
|
size="small"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@
|
||||||
bind:value={rarityFilters}
|
bind:value={rarityFilters}
|
||||||
onValueChange={handleRarityChange}
|
onValueChange={handleRarityChange}
|
||||||
placeholder="Rarity"
|
placeholder="Rarity"
|
||||||
contained
|
size="small"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
@ -315,7 +315,7 @@
|
||||||
bind:value={seasonFilters}
|
bind:value={seasonFilters}
|
||||||
onValueChange={handleSeasonChange}
|
onValueChange={handleSeasonChange}
|
||||||
placeholder="Season"
|
placeholder="Season"
|
||||||
contained
|
size="small"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
@ -325,7 +325,7 @@
|
||||||
bind:value={seriesFilters}
|
bind:value={seriesFilters}
|
||||||
onValueChange={handleSeriesChange}
|
onValueChange={handleSeriesChange}
|
||||||
placeholder={entityType === 'weapon' ? 'Weapon Series' : 'Series'}
|
placeholder={entityType === 'weapon' ? 'Weapon Series' : 'Series'}
|
||||||
contained
|
size="small"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
@ -335,7 +335,7 @@
|
||||||
bind:value={raceFilters}
|
bind:value={raceFilters}
|
||||||
onValueChange={handleRaceChange}
|
onValueChange={handleRaceChange}
|
||||||
placeholder="Race"
|
placeholder="Race"
|
||||||
contained
|
size="small"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
@ -345,7 +345,7 @@
|
||||||
bind:value={proficiencyFilters}
|
bind:value={proficiencyFilters}
|
||||||
onValueChange={handleProficiencyChange}
|
onValueChange={handleProficiencyChange}
|
||||||
placeholder={entityType === 'weapon' ? 'Weapon Type' : 'Proficiency'}
|
placeholder={entityType === 'weapon' ? 'Weapon Type' : 'Proficiency'}
|
||||||
contained
|
size="small"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
@ -355,20 +355,16 @@
|
||||||
bind:value={genderFilters}
|
bind:value={genderFilters}
|
||||||
onValueChange={handleGenderChange}
|
onValueChange={handleGenderChange}
|
||||||
placeholder="Gender"
|
placeholder="Gender"
|
||||||
contained
|
size="small"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if hasActiveFilters}
|
{#if hasActiveFilters}
|
||||||
<button type="button" class="clear-btn" onclick={clearAll}> Clear </button>
|
<button type="button" class="clear-btn" onclick={clearAll}>Clear</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right-controls">
|
<div class="right-controls">
|
||||||
{#if showViewToggle}
|
|
||||||
<ViewModeToggle value={viewMode} onValueChange={onViewModeChange} {element} neutral={neutralViewToggle} />
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if showSort}
|
{#if showSort}
|
||||||
<div class="sort">
|
<div class="sort">
|
||||||
<Select
|
<Select
|
||||||
|
|
@ -376,22 +372,30 @@
|
||||||
bind:value={sortBy}
|
bind:value={sortBy}
|
||||||
onValueChange={handleSortChange}
|
onValueChange={handleSortChange}
|
||||||
size="small"
|
size="small"
|
||||||
contained
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{#if showViewToggle}
|
||||||
|
<ViewModeToggle value={viewMode} onValueChange={onViewModeChange} {element} neutral={neutralViewToggle} />
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@use '$src/themes/spacing' as *;
|
@use '$src/themes/spacing' as *;
|
||||||
|
@use '$src/themes/layout' as *;
|
||||||
|
@use '$src/themes/typography' as *;
|
||||||
|
|
||||||
.filters-container {
|
.filters-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: $unit;
|
gap: $unit-2x;
|
||||||
|
padding: $unit;
|
||||||
|
background: var(--button-contained-bg);
|
||||||
|
border-radius: $card-corner;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -418,17 +422,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.clear-btn {
|
.clear-btn {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
padding: $unit-half $unit;
|
padding: $unit-half $unit;
|
||||||
border: 1px solid var(--border-color, #ddd);
|
font-size: $font-small;
|
||||||
background: transparent;
|
font-weight: $medium;
|
||||||
border-radius: 4px;
|
color: var(--accent-color);
|
||||||
font-size: 12px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--text-secondary, #666);
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--button-bg-hover, #f5f5f5);
|
text-decoration: underline;
|
||||||
color: var(--text-primary, #333);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue