-
Notifications
You must be signed in to change notification settings - Fork 67
Feature/#31 Show pause indicator #37
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
06a9302
#31 : Add ProgressManager
vadimkorr 9d00b1b
#31 : Add ProgressManager to carousel component
vadimkorr 53a6a94
#31 : Add Progress component
vadimkorr 9d4c624
#31 : Add Progress to carousel
vadimkorr 892550f
#31 : Add todo comments
vadimkorr 3f9f6c1
#31 : Update progress manager
vadimkorr ecca0c3
#31 : Fix swipe
vadimkorr 903f665
#31 : Add progress indicator prop
vadimkorr 8bc04bc
#31 : Fix story, convert value to number
vadimkorr deafbfb
#31 : Move setIntervalImmediate to utils
vadimkorr 5f2a4c2
#31 : Wait animation finish
vadimkorr 6dee586
#31 : Update progress position
vadimkorr 158a748
#31 : Reset progress on destroy
vadimkorr e49556a
#31 : Code cleanup
vadimkorr a9515ed
#31 : Fix non infinite case
vadimkorr 17e2e60
#31 : Update colors, set reversed progress indicator
vadimkorr a6a73d5
#31 : Fix storybook autoplayDirection
vadimkorr 7ace64b
#31 : Fix autoplay progress for non infinite case
vadimkorr 76766e9
#31 : Fix progress value prop
vadimkorr 68f9f5d
#31 : Add progress storybook
vadimkorr 1cca216
#31 : Move shared css vars to parent component
vadimkorr 04d1558
#31 : Rename onValueChange -> onProgressValueChange
vadimkorr 930ec9f
#31 : Add new demos
vadimkorr ac21022
#31 : Fix spelling 'auto play' -> autoplay
vadimkorr 293798c
#31 : Extend docs
vadimkorr 4ada913
#31 : Add unit tests
vadimkorr a9e8784
Merge branch 'main' into feature/#31_Show-pause-indicator
vadimkorr b70c1d6
#31 : Use step ms instead of steps count
vadimkorr 922244b
Merge branch 'main' into feature/#31_Show-pause-indicator
vadimkorr 8c03229
#31 : Code cleanup
vadimkorr aa52abb
#31 : Rename applyAutoplay -> applyAutoplayIfNeeded
vadimkorr 3a68ec1
#31 : Rename delaysMs -> delayMs
vadimkorr 3093984
#31 : Add comments
vadimkorr 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
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,27 @@ | ||
<script> | ||
import { tweened } from 'svelte/motion'; | ||
import { cubicInOut } from 'svelte/easing'; | ||
|
||
const MAX_PERCENT = 100; | ||
|
||
/** | ||
* Progress value, [0, 1] | ||
*/ | ||
export let value = 0 | ||
|
||
$: width = Math.min(Math.max(value * MAX_PERCENT, 0), MAX_PERCENT) | ||
</script> | ||
|
||
<div | ||
class="sc-carousel-progress__indicator" | ||
style=" | ||
width: {width}%; | ||
" | ||
></div> | ||
|
||
<style> | ||
.sc-carousel-progress__indicator { | ||
height: 100%; | ||
background-color: var(--sc-color-hex-dark-50p); | ||
} | ||
</style> |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.