chore(prettier): use svelteStrictMode

This commit is contained in:
Eric Liu 2020-09-04 16:35:49 -07:00
commit 42b8159b1c
182 changed files with 2020 additions and 1912 deletions

View file

@ -134,76 +134,76 @@
</style>
<svelte:window
on:mouseup={({ target }) => {
on:mouseup="{({ target }) => {
if (target && elTypeSearch) {
if (!elTypeSearch.contains(target)) {
searchIsActive = false;
isSearchFocus = false;
}
}
}} />
}}" />
<div
bind:this={elTypeSearch}
bind:this="{elTypeSearch}"
role="search"
class="search-wrapper"
class:search-wrapper-hidden={!searchIsActive}
class:search-focus={isSearchFocus || searchIsActive}>
class:search-wrapper-hidden="{!searchIsActive}"
class:search-focus="{isSearchFocus || searchIsActive}">
<div
id="right-panel-action-search"
class="search-wrapper-2"
role="combobox"
aria-expanded={searchIsActive}>
aria-expanded="{searchIsActive}">
<button
tabindex={searchTabIndex}
tabindex="{searchTabIndex}"
aria-label="Search"
class:bx--header__action={true}
class:btn-search={true}
class:btn-search-disabled={searchIsActive}
on:click={() => {
class:bx--header__action="{true}"
class:btn-search="{true}"
class:btn-search-disabled="{searchIsActive}"
on:click="{() => {
isSearchFocus = true;
searchIsActive = true;
dispatch('focusInputSearch');
}}
}}"
type="button"
on:keydown={({ key }) => {
on:keydown="{({ key }) => {
if (key === 'Enter') {
searchIsActive = !searchIsActive;
}
}}>
<Icon title="Search" tabindex="0" render={Search20} />
}}">
<Icon title="Search" tabindex="0" render="{Search20}" />
</button>
<input
bind:this={elInput}
bind:this="{elInput}"
id="input-search-field"
type="text"
autocomplete="off"
tabindex={closeTabIndex}
tabindex="{closeTabIndex}"
class="input-search"
class:input-hidden={!searchIsActive}
class:input-hidden="{!searchIsActive}"
placeholder="Search"
on:focus={() => dispatch('focusInputSearch')}
on:focusout={() => dispatch('focusOutInputSearch')}
on:input={dispatchInputs} />
on:focus="{() => dispatch('focusInputSearch')}"
on:focusout="{() => dispatch('focusOutInputSearch')}"
on:input="{dispatchInputs}" />
<button
id="right-panel-close-search"
tabindex={closeTabIndex}
class:bx--header__action={true}
class:btn-clear={true}
class:btn-clear-hidden={!searchIsActive}
tabindex="{closeTabIndex}"
class:bx--header__action="{true}"
class:btn-clear="{true}"
class:btn-clear-hidden="{!searchIsActive}"
type="button"
aria-label="Clear search"
on:click={() => {
on:click="{() => {
isSearchFocus = false;
searchIsActive = false;
searchStore.clear();
}}
on:keydown={({ key }) => {
}}"
on:keydown="{({ key }) => {
if (key === 'Enter') {
searchIsActive = !searchIsActive;
}
}}>
<Icon title="Close" tabindex="0" render={Close20} />
}}">
<Icon title="Close" tabindex="0" render="{Close20}" />
</button>
</div>
</div>