mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
test: assert paste event
This commit is contained in:
parent
360840edec
commit
1c2014059a
9 changed files with 18 additions and 35 deletions
|
@ -9,7 +9,7 @@
|
||||||
flatpickrProps="{{ static: true }}"
|
flatpickrProps="{{ static: true }}"
|
||||||
on:change
|
on:change
|
||||||
>
|
>
|
||||||
<DatePickerInput labelText="Meeting date" placeholder="mm/dd/yyyy" />
|
<DatePickerInput labelText="Meeting date" placeholder="mm/dd/yyyy" on:paste />
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
|
|
||||||
<DatePicker
|
<DatePicker
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
on:select="{(e) => {
|
on:select="{(e) => {
|
||||||
console.log('on:select', e.detail);
|
console.log('on:select', e.detail);
|
||||||
}}"
|
}}"
|
||||||
|
on:paste
|
||||||
let:result
|
let:result
|
||||||
let:index
|
let:index
|
||||||
>
|
>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
on:blur="{(e) => {
|
on:blur="{(e) => {
|
||||||
e.detail; // number | FocusEvent
|
e.detail; // number | FocusEvent
|
||||||
}}"
|
}}"
|
||||||
|
on:paste
|
||||||
translateWithId="{(id) => {
|
translateWithId="{(id) => {
|
||||||
console.log(id); // "open" | "close"
|
console.log(id); // "open" | "close"
|
||||||
return id;
|
return id;
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
on:change="{(e) => {
|
on:change="{(e) => {
|
||||||
console.log(e.detail); // null | number
|
console.log(e.detail); // null | number
|
||||||
}}"
|
}}"
|
||||||
|
on:paste
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<NumberInputSkeleton hideLabel />
|
<NumberInputSkeleton hideLabel />
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Enter password..."
|
placeholder="Enter password..."
|
||||||
value="as_lta0890sdfpo__!9901"
|
value="as_lta0890sdfpo__!9901"
|
||||||
|
on:paste
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<PasswordInput hideLabel labelText="Password" placeholder="Enter password..." />
|
<PasswordInput hideLabel labelText="Password" placeholder="Enter password..." />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { Search } from "../types";
|
import { Search } from "../types";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Search />
|
<Search on:paste />
|
||||||
|
|
||||||
<Search placeholder="Search catalog..." value="Cloud functions" />
|
<Search placeholder="Search catalog..." value="Cloud functions" />
|
||||||
|
|
||||||
|
|
|
@ -2,45 +2,18 @@
|
||||||
import { TextArea, TextAreaSkeleton } from "../types";
|
import { TextArea, TextAreaSkeleton } from "../types";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TextArea labelText="App description" placeholder="Enter a description..." />
|
|
||||||
|
|
||||||
<TextArea
|
<TextArea
|
||||||
|
value=""
|
||||||
|
hideLabel
|
||||||
|
light
|
||||||
|
rows="{10}"
|
||||||
labelText="App description"
|
labelText="App description"
|
||||||
helperText="A rich description helps us better recommend related products and services"
|
helperText="A rich description helps us better recommend related products and services"
|
||||||
placeholder="Enter a description..."
|
placeholder="Enter a description..."
|
||||||
/>
|
|
||||||
|
|
||||||
<TextArea
|
|
||||||
hideLabel
|
|
||||||
labelText="App description"
|
|
||||||
placeholder="Enter a description..."
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextArea
|
|
||||||
light
|
|
||||||
labelText="App description"
|
|
||||||
placeholder="Enter a description..."
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextArea
|
|
||||||
rows="{10}"
|
|
||||||
labelText="App description"
|
|
||||||
placeholder="Enter a description..."
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextArea
|
|
||||||
invalid
|
invalid
|
||||||
invalidText="Only plain text characters are allowed"
|
invalidText="Only plain text characters are allowed"
|
||||||
labelText="App description"
|
|
||||||
placeholder="Enter a description..."
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextArea
|
|
||||||
disabled
|
disabled
|
||||||
labelText="App description"
|
on:paste
|
||||||
placeholder="Enter a description..."
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextAreaSkeleton />
|
|
||||||
|
|
||||||
<TextAreaSkeleton hideLabel />
|
<TextAreaSkeleton hideLabel />
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
bind:value
|
bind:value
|
||||||
on:input="{(e) => console.log(e.detail)}"
|
on:input="{(e) => console.log(e.detail)}"
|
||||||
on:change="{(e) => (value = e.detail)}"
|
on:change="{(e) => (value = e.detail)}"
|
||||||
|
on:paste="{(e) => console.log(e)}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextInput
|
<TextInput
|
||||||
|
|
|
@ -2,7 +2,12 @@
|
||||||
import { TimePicker, TimePickerSelect, SelectItem } from "../types";
|
import { TimePicker, TimePickerSelect, SelectItem } from "../types";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TimePicker spellcheck="{false}" labelText="Cron job" placeholder="hh:mm">
|
<TimePicker
|
||||||
|
spellcheck="{false}"
|
||||||
|
labelText="Cron job"
|
||||||
|
placeholder="hh:mm"
|
||||||
|
on:paste
|
||||||
|
>
|
||||||
<TimePickerSelect value="PM">
|
<TimePickerSelect value="PM">
|
||||||
<SelectItem value="am" text="AM" />
|
<SelectItem value="am" text="AM" />
|
||||||
<SelectItem value="pm" text="PM" />
|
<SelectItem value="pm" text="PM" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue