Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 1165 advanced search form #81

Merged
merged 6 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/js/components/AdvancedSearchForm/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -494,20 +494,20 @@
{#each lookFors as value, idx}
{#if idx > 0}
<fieldset class="mb-3">
<legend class="visually-hidden">Boolean operator for field {idx - 1} and field {idx}</legend>
<legend class="visually-hidden">Boolean operator for field {idx} and field {idx + 1}</legend>
<div class="d-flex gap-3 align-items-center justify-content-start">
{#each booleanOptions as option, bidx}
<div class="form-check">
<input
name="boolean-{idx}"
id="boolean-{bidx}"
id="boolean-{idx}_{bidx}"
type="radio"
class="form-check-input"
value={option.value}
checked={option.value == bools[idx]}
bind:group={bools[idx]}
/>
<label class="form-check-label text-uppercase" for="boolean-{bidx}">{option.value}</label>
<label class="form-check-label text-uppercase" for="boolean-{idx}_{bidx}">{option.value}</label>
</div>
{/each}
</div>
Expand Down Expand Up @@ -649,7 +649,7 @@
<fieldset class="mb-4">
<legend class="fs-4 fw-bold">Language</legend>

<div>
<div class="advanced-search-list">
<FilterableSelection
--filterable-list-height="15rem"
items={languageData.map((item) => ({
Expand All @@ -670,7 +670,7 @@

<p>Select one or more options to narrow your results to items that match all of your format selections.</p>

<div>
<div class="advanced-search-list">
<FilterableSelection
--filterable-list-height="15rem"
items={formatData.map((item) => ({
Expand Down
13 changes: 1 addition & 12 deletions src/js/components/FeedbackFormCatalog/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@
<input
class="form-check-input"
type="checkbox"
role="checkbox"
name="problems"
value="Book doesn't match description"
id="c1"
Expand All @@ -205,7 +204,6 @@
<input
class="form-check-input"
type="checkbox"
role="checkbox"
name="problems"
value="Typo in metadata"
id="c2"
Expand All @@ -214,22 +212,13 @@
<label class="form-check-label" for="c2"> There is a typo in the metadata </label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
role="checkbox"
name="problems"
value="Other"
id="c3"
bind:group={problems}
/>
<input class="form-check-input" type="checkbox" name="problems" value="Other" id="c3" bind:group={problems} />
<label class="form-check-label" for="c3"> Other (describe in description box) </label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
role="checkbox"
name="problems"
value="None"
id="c4"
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/FilterableSelection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
}

input:checked + label {
background: var(--color-primary-500, '#000') !important;
background: var(--color-primary-600, '#000') !important;
color: white !important;
}

Expand Down
6 changes: 6 additions & 0 deletions src/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ textarea.form-control {
.was-validated .form-check-input:valid:focus, .form-check-input.is-valid:focus {
box-shadow: var(--ht-focus-box-shadow);
}
.advanced-search-list li.form-check:focus-within {
border: 2px solid var(--color-primary-600);
}
.advanced-search-list li.form-check:has(input:checked):focus-within {
border: 2px solid var(--color-neutral-800);
}

a:not(.btn,.list-group-item):has(i[aria-hidden]) {
display: inline-flex;
Expand Down
Loading