mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
chore(prettier): use svelteStrictMode
This commit is contained in:
parent
322b238cf0
commit
42b8159b1c
182 changed files with 2020 additions and 1912 deletions
|
@ -7,14 +7,14 @@
|
|||
</script>
|
||||
|
||||
<div
|
||||
class:bx--skeleton={true}
|
||||
class:bx--search--xl={!small}
|
||||
class:bx--search--sm={small}
|
||||
class:bx--skeleton="{true}"
|
||||
class:bx--search--xl="{!small}"
|
||||
class:bx--search--sm="{small}"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave>
|
||||
<span class:bx--label={true} />
|
||||
<div class:bx--search-input={true} />
|
||||
<span class:bx--label="{true}"></span>
|
||||
<div class:bx--search-input="{true}"></div>
|
||||
</div>
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
{#if skeleton}
|
||||
<SearchSkeleton
|
||||
{small}
|
||||
small="{small}"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
|
@ -93,39 +93,39 @@
|
|||
on:mouseleave />
|
||||
{:else}
|
||||
<div
|
||||
class:bx--search={true}
|
||||
class:bx--search--light={light}
|
||||
class:bx--search="{true}"
|
||||
class:bx--search--light="{light}"
|
||||
{...$$restProps}
|
||||
class="bx--search--{size} {$$restProps.class}">
|
||||
<Search16 class="bx--search-magnifier" />
|
||||
<label for={id} class:bx--label={true}>{labelText}</label>
|
||||
<label for="{id}" class:bx--label="{true}">{labelText}</label>
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<input
|
||||
bind:this={ref}
|
||||
bind:this="{ref}"
|
||||
role="searchbox"
|
||||
class:bx--search-input={true}
|
||||
{autofocus}
|
||||
{autocomplete}
|
||||
{id}
|
||||
{placeholder}
|
||||
{type}
|
||||
{value}
|
||||
class:bx--search-input="{true}"
|
||||
autofocus="{autofocus}"
|
||||
autocomplete="{autocomplete}"
|
||||
id="{id}"
|
||||
placeholder="{placeholder}"
|
||||
type="{type}"
|
||||
value="{value}"
|
||||
on:change
|
||||
on:input
|
||||
on:input={({ target }) => {
|
||||
on:input="{({ target }) => {
|
||||
value = target.value;
|
||||
}} />
|
||||
}}" />
|
||||
<button
|
||||
type="button"
|
||||
aria-label={closeButtonLabelText}
|
||||
class:bx--search-close={true}
|
||||
class:bx--search-close--hidden={value === ''}
|
||||
aria-label="{closeButtonLabelText}"
|
||||
class:bx--search-close="{true}"
|
||||
class:bx--search-close--hidden="{value === ''}"
|
||||
on:click
|
||||
on:click={() => {
|
||||
on:click="{() => {
|
||||
value = '';
|
||||
ref.focus();
|
||||
}}>
|
||||
<svelte:component this={size === 'xl' ? Close20 : Close16} />
|
||||
}}">
|
||||
<svelte:component this="{size === 'xl' ? Close20 : Close16}" />
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue