mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
chore(prettier): use svelteStrictMode
This commit is contained in:
parent
322b238cf0
commit
42b8159b1c
182 changed files with 2020 additions and 1912 deletions
|
@ -115,9 +115,9 @@
|
|||
</script>
|
||||
|
||||
<div
|
||||
class:bx--form-item={true}
|
||||
class:bx--text-input-wrapper={true}
|
||||
class:bx--password-input-wrapper={true}
|
||||
class:bx--form-item="{true}"
|
||||
class:bx--text-input-wrapper="{true}"
|
||||
class:bx--password-input-wrapper="{true}"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
|
@ -125,62 +125,62 @@
|
|||
on:mouseleave>
|
||||
{#if labelText}
|
||||
<label
|
||||
for={id}
|
||||
class:bx--label={true}
|
||||
class:bx--visually-hidden={hideLabel}
|
||||
class:bx--label--disabled={disabled}>
|
||||
for="{id}"
|
||||
class:bx--label="{true}"
|
||||
class:bx--visually-hidden="{hideLabel}"
|
||||
class:bx--label--disabled="{disabled}">
|
||||
{labelText}
|
||||
</label>
|
||||
{/if}
|
||||
{#if helperText}
|
||||
<div
|
||||
class:bx--form__helper-text={true}
|
||||
class:bx--form__helper-text--disabled={disabled}>
|
||||
class:bx--form__helper-text="{true}"
|
||||
class:bx--form__helper-text--disabled="{disabled}">
|
||||
{helperText}
|
||||
</div>
|
||||
{/if}
|
||||
<div
|
||||
class:bx--text-input__field-wrapper={true}
|
||||
data-invalid={invalid || undefined}>
|
||||
class:bx--text-input__field-wrapper="{true}"
|
||||
data-invalid="{invalid || undefined}">
|
||||
{#if invalid}
|
||||
<WarningFilled16 class="bx--text-input__invalid-icon" />
|
||||
{/if}
|
||||
<input
|
||||
bind:this={ref}
|
||||
data-invalid={invalid || undefined}
|
||||
aria-invalid={invalid || undefined}
|
||||
aria-describedby={invalid ? errorId : undefined}
|
||||
{id}
|
||||
{name}
|
||||
{placeholder}
|
||||
{type}
|
||||
{value}
|
||||
{disabled}
|
||||
class:bx--text-input={true}
|
||||
class:bx--password-input={true}
|
||||
class:bx--text-input--light={light}
|
||||
class:bx--text-input--invalid={invalid}
|
||||
class={size && `bx--text-input--${size}`}
|
||||
bind:this="{ref}"
|
||||
data-invalid="{invalid || undefined}"
|
||||
aria-invalid="{invalid || undefined}"
|
||||
aria-describedby="{invalid ? errorId : undefined}"
|
||||
id="{id}"
|
||||
name="{name}"
|
||||
placeholder="{placeholder}"
|
||||
type="{type}"
|
||||
value="{value}"
|
||||
disabled="{disabled}"
|
||||
class:bx--text-input="{true}"
|
||||
class:bx--password-input="{true}"
|
||||
class:bx--text-input--light="{light}"
|
||||
class:bx--text-input--invalid="{invalid}"
|
||||
class="{size && `bx--text-input--${size}`}"
|
||||
on:change
|
||||
on:input
|
||||
on:input={({ target }) => {
|
||||
on:input="{({ target }) => {
|
||||
value = target.value;
|
||||
}}
|
||||
}}"
|
||||
on:keydown
|
||||
on:focus
|
||||
on:blur />
|
||||
<button
|
||||
type="button"
|
||||
class:bx--text-input--password__visibility__toggle={true}
|
||||
class:bx--btn--icon-only={true}
|
||||
class:bx--tooltip__trigger={true}
|
||||
class:bx--tooltip--a11y={true}
|
||||
class:bx--text-input--password__visibility__toggle="{true}"
|
||||
class:bx--btn--icon-only="{true}"
|
||||
class:bx--tooltip__trigger="{true}"
|
||||
class:bx--tooltip--a11y="{true}"
|
||||
class="{tooltipPosition && `bx--tooltip--${tooltipPosition}`}
|
||||
{tooltipAlignment && `bx--tooltip--align-${tooltipAlignment}`}"
|
||||
on:click={() => {
|
||||
on:click="{() => {
|
||||
type = type === 'password' ? 'text' : 'password';
|
||||
}}>
|
||||
<span class:bx--assistive-text={true}>
|
||||
}}">
|
||||
<span class:bx--assistive-text="{true}">
|
||||
{#if type === 'text'}{hidePasswordLabel}{:else}{showPasswordLabel}{/if}
|
||||
</span>
|
||||
{#if type === 'text'}
|
||||
|
@ -191,6 +191,6 @@
|
|||
</button>
|
||||
</div>
|
||||
{#if invalid}
|
||||
<div class:bx--form-requirement={true} id={errorId}>{invalidText}</div>
|
||||
<div class:bx--form-requirement="{true}" id="{errorId}">{invalidText}</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue