mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
feat(prettier): add svelteBracketNewLine
This commit is contained in:
parent
7a28d21ceb
commit
398887a3d3
182 changed files with 974 additions and 494 deletions
|
@ -122,19 +122,22 @@
|
|||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave>
|
||||
on:mouseleave
|
||||
>
|
||||
{#if labelText}
|
||||
<label
|
||||
for="{id}"
|
||||
class:bx--label="{true}"
|
||||
class:bx--visually-hidden="{hideLabel}"
|
||||
class:bx--label--disabled="{disabled}">
|
||||
class:bx--label--disabled="{disabled}"
|
||||
>
|
||||
{labelText}
|
||||
</label>
|
||||
{/if}
|
||||
<div
|
||||
class:bx--text-input__field-wrapper="{true}"
|
||||
data-invalid="{invalid || undefined}">
|
||||
data-invalid="{invalid || undefined}"
|
||||
>
|
||||
{#if invalid}
|
||||
<WarningFilled16 class="bx--text-input__invalid-icon" />
|
||||
{/if}
|
||||
|
@ -161,7 +164,8 @@
|
|||
}}"
|
||||
on:keydown
|
||||
on:focus
|
||||
on:blur />
|
||||
on:blur
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
class:bx--text-input--password__visibility__toggle="{true}"
|
||||
|
@ -172,7 +176,8 @@
|
|||
{tooltipAlignment && `bx--tooltip--align-${tooltipAlignment}`}"
|
||||
on:click="{() => {
|
||||
type = type === 'password' ? 'text' : 'password';
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
<span class:bx--assistive-text="{true}">
|
||||
{#if type === 'text'}{hidePasswordLabel}{:else}{showPasswordLabel}{/if}
|
||||
</span>
|
||||
|
@ -186,7 +191,8 @@
|
|||
{#if !invalid && helperText}
|
||||
<div
|
||||
class:bx--form__helper-text="{true}"
|
||||
class:bx--form__helper-text--disabled="{disabled}">
|
||||
class:bx--form__helper-text--disabled="{disabled}"
|
||||
>
|
||||
{helperText}
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave>
|
||||
on:mouseleave
|
||||
>
|
||||
{#if !hideLabel}
|
||||
<span class:bx--label="{true}" class:bx--skeleton="{true}"></span>
|
||||
{/if}
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
aria-label="loading text input"
|
||||
aria-live="assertive"
|
||||
role="status"
|
||||
tabindex="0">
|
||||
tabindex="0"
|
||||
>
|
||||
<TextInputSkeleton />
|
||||
<br />
|
||||
<TextInputSkeleton hideLabel />
|
||||
|
@ -27,25 +28,29 @@
|
|||
aria-level=""
|
||||
on:keydown="{(e) => {
|
||||
console.log('on:keydown', e);
|
||||
}}" />
|
||||
}}"
|
||||
/>
|
||||
{:else if story === 'controlled'}
|
||||
<PasswordInput
|
||||
{...$$props}
|
||||
type="{type}"
|
||||
on:keydown="{(e) => {
|
||||
console.log('on:keydown', e);
|
||||
}}" />
|
||||
}}"
|
||||
/>
|
||||
<div>
|
||||
<button
|
||||
on:click="{() => {
|
||||
type = 'text';
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
Show password
|
||||
</button>
|
||||
<button
|
||||
on:click="{() => {
|
||||
type = 'password';
|
||||
}}">
|
||||
}}"
|
||||
>
|
||||
Hide password
|
||||
</button>
|
||||
</div>
|
||||
|
@ -59,5 +64,6 @@
|
|||
}}"
|
||||
on:change="{() => {
|
||||
console.log('change');
|
||||
}}" />
|
||||
}}"
|
||||
/>
|
||||
{/if}
|
||||
|
|
|
@ -23,13 +23,13 @@ export const Default = () => ({
|
|||
"Content of form validation UI (invalidText)",
|
||||
"A valid value is required"
|
||||
),
|
||||
warn: boolean('Show warning state (warn)', false),
|
||||
warn: boolean("Show warning state (warn)", false),
|
||||
warnText: text(
|
||||
'Warning state text (warnText)',
|
||||
'This will overwrite your current settings'
|
||||
"Warning state text (warnText)",
|
||||
"This will overwrite your current settings"
|
||||
),
|
||||
placeholder: text("Placeholder text (placeholder)", "Placeholder text."),
|
||||
inline: boolean('Inline variant (inline)', false),
|
||||
inline: boolean("Inline variant (inline)", false),
|
||||
id: text("TextInput id", "text-input-id"),
|
||||
name: text("TextInput name", "text-input-name"),
|
||||
},
|
||||
|
|
|
@ -122,7 +122,8 @@
|
|||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave>
|
||||
on:mouseleave
|
||||
>
|
||||
{#if inline}
|
||||
<div class="bx--text-input__label-helper-wrapper">
|
||||
{#if labelText}
|
||||
|
@ -132,7 +133,8 @@
|
|||
class:bx--visually-hidden="{hideLabel}"
|
||||
class:bx--label--disabled="{disabled}"
|
||||
class:bx--label--inline="{inline}"
|
||||
class="{inline && !!size && `bx--label--inline--${size}`}">
|
||||
class="{inline && !!size && `bx--label--inline--${size}`}"
|
||||
>
|
||||
{labelText}
|
||||
</label>
|
||||
{/if}
|
||||
|
@ -140,7 +142,8 @@
|
|||
<div
|
||||
class:bx--form__helper-text="{true}"
|
||||
class:bx--form__helper-text--disabled="{disabled}"
|
||||
class:bx--form__helper-text--inline="{inline}">
|
||||
class:bx--form__helper-text--inline="{inline}"
|
||||
>
|
||||
{helperText}
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -153,24 +156,28 @@
|
|||
class:bx--visually-hidden="{hideLabel}"
|
||||
class:bx--label--disabled="{disabled}"
|
||||
class:bx--label--inline="{inline}"
|
||||
class="{inline && !!size && `bx--label--inline--${size}`}">
|
||||
class="{inline && !!size && `bx--label--inline--${size}`}"
|
||||
>
|
||||
{labelText}
|
||||
</label>
|
||||
{/if}
|
||||
<div
|
||||
class:bx--text-input__field-outer-wrapper="{true}"
|
||||
class:bx--text-input__field-outer-wrapper--inline="{inline}">
|
||||
class:bx--text-input__field-outer-wrapper--inline="{inline}"
|
||||
>
|
||||
<div
|
||||
data-invalid="{invalid || undefined}"
|
||||
data-warn="{warn || undefined}"
|
||||
class:bx--text-input__field-wrapper="{true}">
|
||||
class:bx--text-input__field-wrapper="{true}"
|
||||
>
|
||||
{#if invalid}
|
||||
<WarningFilled16 class="bx--text-input__invalid-icon" />
|
||||
{/if}
|
||||
{#if !invalid && warn}
|
||||
<WarningAltFilled16
|
||||
class="bx--text-input__invalid-icon
|
||||
bx--text-input__invalid-icon--warning" />
|
||||
bx--text-input__invalid-icon--warning"
|
||||
/>
|
||||
{/if}
|
||||
<input
|
||||
bind:this="{ref}"
|
||||
|
@ -197,13 +204,15 @@
|
|||
}}"
|
||||
on:keydown
|
||||
on:focus
|
||||
on:blur />
|
||||
on:blur
|
||||
/>
|
||||
</div>
|
||||
{#if !invalid && !warn && !inline && helperText}
|
||||
<div
|
||||
class:bx--form__helper-text="{true}"
|
||||
class:bx--form__helper-text--disabled="{disabled}"
|
||||
class:bx--form__helper-text--inline="{inline}">
|
||||
class:bx--form__helper-text--inline="{inline}"
|
||||
>
|
||||
{helperText}
|
||||
</div>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue