-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: slider component support vertical prop #356
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
831929d
feat: slider component support vertical prop
pkc918 302f3ed
chore: fix chore
pkc918 bdb47b8
Merge branch 'ikun-svelte:main' into KSlider
pkc918 b7773d2
feat: update slider snap & form snap
pkc918 9a17dd8
Merge branch 'ikun-svelte:main' into KSlider
pkc918 0eb9ba6
Merge branch 'ikun-svelte:main' into KSlider
pkc918 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
14 changes: 8 additions & 6 deletions
14
components/Slider/__test__/__snapshots__/slider.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`Test: KSlider > props: attrs 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md\\" you=\\"world\\"><div class=\\"k-slider--runway k-slider--runway--md\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 0%;\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 0%; left: 0%;\\"></div></div></div>"`; | ||
exports[`Test: KSlider > props: attrs 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md\\" you=\\"world\\"><div class=\\"k-slider--runway--md k-slider--runway\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 0%\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 0%; left: 0%\\"></div></div></div>"`; | ||
|
||
exports[`Test: KSlider > props: cls 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md 窈窕淑女,君子好逑\\"><div class=\\"k-slider--runway k-slider--runway--md\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 0%;\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 0%; left: 0%;\\"></div></div></div>"`; | ||
exports[`Test: KSlider > props: cls 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md 窈窕淑女,君子好逑\\"><div class=\\"k-slider--runway--md k-slider--runway\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 0%\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 0%; left: 0%\\"></div></div></div>"`; | ||
|
||
exports[`Test: KSlider > props: disabled 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md\\"><div class=\\"k-slider--runway k-slider--runway--md\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 0%;\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 0%; left: 0%;\\"></div></div></div>"`; | ||
exports[`Test: KSlider > props: disabled 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md\\"><div class=\\"k-slider--runway--md k-slider--runway\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 0%\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 0%; left: 0%\\"></div></div></div>"`; | ||
|
||
exports[`Test: KSlider > props: min and max 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md\\"><div class=\\"k-slider--runway k-slider--runway--md\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 100%;\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 100%; left: 0%;\\"></div></div></div>"`; | ||
exports[`Test: KSlider > props: min and max 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md\\"><div class=\\"k-slider--runway--md k-slider--runway\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 100%\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 100%; left: 0%\\"></div></div></div>"`; | ||
|
||
exports[`Test: KSlider > props: size 1`] = `"<div class=\\"k-slider k-slider--base k-slider--lg\\"><div class=\\"k-slider--runway k-slider--runway--lg\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 0%;\\"><div class=\\"k-slider--button k-slider--button--lg\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 0%; left: 0%;\\"></div></div></div>"`; | ||
exports[`Test: KSlider > props: size 1`] = `"<div class=\\"k-slider k-slider--base k-slider--lg\\"><div class=\\"k-slider--runway--lg k-slider--runway\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 0%\\"><div class=\\"k-slider--button k-slider--button--lg\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 0%; left: 0%\\"></div></div></div>"`; | ||
|
||
exports[`Test: KSlider > props: value 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md\\"><div class=\\"k-slider--runway k-slider--runway--md\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 10%;\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 10%; left: 0%;\\"></div></div></div>"`; | ||
exports[`Test: KSlider > props: value 1`] = `"<div class=\\"k-slider k-slider--base k-slider--md\\"><div class=\\"k-slider--runway--md k-slider--runway\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper\\" aria-hidden=\\"true\\" style=\\"left: 10%\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar\\" style=\\"width: 10%; left: 0%\\"></div></div></div>"`; | ||
|
||
exports[`Test: KSlider > props: vertical 1`] = `"<div class=\\"k-slider k-slider--base__vertical k-slider--md__vertical\\"><div class=\\"k-slider--runway--md__vertical k-slider--runway__vertical\\" aria-hidden=\\"true\\"><div class=\\"k-slider--button-wrapper__vertical\\" aria-hidden=\\"true\\" style=\\"bottom: 0%\\"><div class=\\"k-slider--button k-slider--button--md\\"></div></div> <div class=\\"k-slider--bar__vertical\\" style=\\"height: 0%; bottom: 0%\\"></div></div></div>"`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script> | ||
import { KSlider } from '@ikun-ui/slider'; | ||
|
||
let value1 = 0; | ||
const handleInput1 = (event) => { | ||
value1 = event.detail; | ||
}; | ||
</script> | ||
|
||
<div class="flex items-end h-50"> | ||
baiwusanyu-c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<KSlider vertical on:input={handleInput1} value={value1}></KSlider> | ||
<p class="px-2">value: {value1}</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this log is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah,I forgot to delete