-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
195 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
ui/src/stylesheets/web-components/_webui-predictive-search.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
---------------------------------------------------------------------------- | ||
Dependencies. | ||
---------------------------------------------------------------------------- | ||
*/ | ||
@use '../base' as *; | ||
@use '../mixins' as *; | ||
|
||
webui-predictive-search { | ||
[type='submit'] { | ||
display: none; | ||
} | ||
|
||
.search__results { | ||
margin-block-start: $gutter-m; | ||
|
||
.grid { | ||
@include responsive-grid-auto-columns($max-width: 10rem); | ||
} | ||
} | ||
|
||
.search__result { | ||
&__link { | ||
@include focus; | ||
color: inherit; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,79 @@ | ||
export const SearchHtml = () => ` | ||
<div class="search"> | ||
<form class="form search__form" role="search"> | ||
<div class="form__field"> | ||
<label for="search" class="label">Search</label> | ||
<input | ||
id="search" | ||
type="search" | ||
class="input" | ||
placeholder="Search" | ||
required | ||
/> | ||
</div> | ||
<button type="submit" class="button button--text button--positive"> | ||
Submit | ||
</button> | ||
</form> | ||
</div> | ||
<div class="search"> | ||
<form class="form search__form" role="search"> | ||
<div class="form__field"> | ||
<label for="search" class="label">Search</label> | ||
<input | ||
id="search" | ||
type="search" | ||
class="input" | ||
placeholder="Search" | ||
required | ||
/> | ||
</div> | ||
<button type="submit" class="button button--text button--positive"> | ||
Submit | ||
</button> | ||
</form> | ||
</div> | ||
`; | ||
|
||
export const SearchDatalistHtml = () => ` | ||
<div class="search"> | ||
<form class="form search__form" role="search"> | ||
<div class="form__field"> | ||
<label for="search" class="label">Search</label> | ||
<input | ||
id="search" | ||
type="text" | ||
class="input" | ||
placeholder="Search" | ||
required | ||
list="search-terms" | ||
/> | ||
<datalist id="search-terms"> | ||
<option value="test1"> | ||
<option value="test2"> | ||
<option value="test3"> | ||
<option value="abc1"> | ||
<option value="abc2"> | ||
<option value="abc3"> | ||
<option value="longer text1"> | ||
<option value="longer text2"> | ||
<option value="longer text3"> | ||
</datalist> | ||
</div> | ||
<button type="submit" class="button button--text button--positive"> | ||
Submit | ||
</button> | ||
</form> | ||
</div> | ||
<div class="search"> | ||
<form class="form search__form" role="search"> | ||
<div class="form__field"> | ||
<label for="search" class="label">Search</label> | ||
<input | ||
id="search" | ||
type="text" | ||
class="input" | ||
placeholder="Search" | ||
required | ||
list="search-terms" | ||
/> | ||
<datalist id="search-terms"> | ||
<option value="test1"> | ||
<option value="test2"> | ||
<option value="test3"> | ||
<option value="abc1"> | ||
<option value="abc2"> | ||
<option value="abc3"> | ||
<option value="longer text1"> | ||
<option value="longer text2"> | ||
<option value="longer text3"> | ||
</datalist> | ||
</div> | ||
<button type="submit" class="button button--text button--positive"> | ||
Submit | ||
</button> | ||
</form> | ||
</div> | ||
`; | ||
|
||
export const SearchAjaxHtml = () => ` | ||
<div class="search" data-module="search"> | ||
<form class="form search__form" role="search"> | ||
<div class="form__field"> | ||
<label for="search" class="label">Search</label> | ||
<input | ||
id="search" | ||
type="search" | ||
class="input" | ||
placeholder="Search for a Pokemon" | ||
required | ||
data-ajax-trigger="search-results" | ||
/> | ||
</div> | ||
<button type="submit" class="button button--text button--positive"> | ||
Submit | ||
</button> | ||
</form> | ||
<div | ||
class="search__results ajax__container" | ||
data-ajax-container="search-results" | ||
role="region" | ||
aria-live="polite" | ||
> | ||
<div class="search" data-module="search"> | ||
<form class="form search__form" role="search"> | ||
<div class="form__field"> | ||
<label for="search" class="label">Search</label> | ||
<input | ||
id="search" | ||
type="search" | ||
class="input" | ||
placeholder="Search for a Pokemon" | ||
required | ||
data-ajax-trigger="search-results" | ||
/> | ||
</div> | ||
<button type="submit" class="button button--text button--positive"> | ||
Submit | ||
</button> | ||
</form> | ||
<div | ||
class="search__results ajax__container" | ||
data-ajax-container="search-results" | ||
role="region" | ||
aria-live="polite" | ||
> | ||
</div> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.