mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore: update dependencies, remove jest
- remove docs/palimpsest folders (to be replaced) - remove Layout Storybook component
This commit is contained in:
parent
1e5333dd64
commit
76df51674d
110 changed files with 2604 additions and 17979 deletions
|
@ -1,7 +1,6 @@
|
|||
<script>
|
||||
export let story = undefined;
|
||||
|
||||
import Layout from "../../internal/ui/Layout.svelte";
|
||||
import PasswordInput from "./PasswordInput.svelte";
|
||||
import TextInput from "./TextInput.svelte";
|
||||
import TextInputSkeleton from "./TextInput.Skeleton.svelte";
|
||||
|
@ -12,42 +11,40 @@
|
|||
$: console.log(ref);
|
||||
</script>
|
||||
|
||||
<Layout>
|
||||
{#if story === 'skeleton'}
|
||||
<div
|
||||
aria-label="loading text input"
|
||||
aria-live="assertive"
|
||||
role="status"
|
||||
tabindex="0">
|
||||
<TextInputSkeleton />
|
||||
<br />
|
||||
<TextInputSkeleton hideLabel />
|
||||
</div>
|
||||
{:else if story === 'password-visibility'}
|
||||
<PasswordInput {...$$props} aria-level="" />
|
||||
{:else if story === 'controlled'}
|
||||
<PasswordInput {...$$props} {type} />
|
||||
<div>
|
||||
<button
|
||||
on:click={() => {
|
||||
type = 'text';
|
||||
}}>
|
||||
Show password
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
type = 'password';
|
||||
}}>
|
||||
Hide password
|
||||
</button>
|
||||
</div>
|
||||
{:else}
|
||||
<TextInput
|
||||
bind:ref
|
||||
{...$$props}
|
||||
bind:value
|
||||
on:change={() => {
|
||||
console.log('change');
|
||||
}} />
|
||||
{/if}
|
||||
</Layout>
|
||||
{#if story === 'skeleton'}
|
||||
<div
|
||||
aria-label="loading text input"
|
||||
aria-live="assertive"
|
||||
role="status"
|
||||
tabindex="0">
|
||||
<TextInputSkeleton />
|
||||
<br />
|
||||
<TextInputSkeleton hideLabel />
|
||||
</div>
|
||||
{:else if story === 'password-visibility'}
|
||||
<PasswordInput {...$$props} aria-level="" />
|
||||
{:else if story === 'controlled'}
|
||||
<PasswordInput {...$$props} {type} />
|
||||
<div>
|
||||
<button
|
||||
on:click={() => {
|
||||
type = 'text';
|
||||
}}>
|
||||
Show password
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
type = 'password';
|
||||
}}>
|
||||
Hide password
|
||||
</button>
|
||||
</div>
|
||||
{:else}
|
||||
<TextInput
|
||||
bind:ref
|
||||
{...$$props}
|
||||
bind:value
|
||||
on:change={() => {
|
||||
console.log('change');
|
||||
}} />
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue