-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from Dataport/feature/custom-loading-indicator
Add loader styles
- Loading branch information
Showing
23 changed files
with
650 additions
and
31 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-1.09 KB
packages/plugins/LoadingIndicator/readme_loadingIndicator_example.png
Binary file not shown.
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
125 changes: 125 additions & 0 deletions
125
packages/plugins/LoadingIndicator/src/components/loaderStyles/Basic.vue
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,125 @@ | ||
<template> | ||
<div class="lds-default"> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue' | ||
/** | ||
* This loader is the lds-default loader from https://loading.io/css/. | ||
* It was renamed to BasicLoader to avoid confusion with the default loader. | ||
*/ | ||
export default Vue.extend({ | ||
name: 'BasicLoader', | ||
}) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.lds-default { | ||
/* change color here */ | ||
color: var(--polar-primary); | ||
} | ||
.lds-default, | ||
.lds-default div { | ||
box-sizing: border-box; | ||
} | ||
.lds-default { | ||
display: inline-block; | ||
position: relative; | ||
width: 80px; | ||
height: 80px; | ||
} | ||
.lds-default div { | ||
position: absolute; | ||
width: 6.4px; | ||
height: 6.4px; | ||
background: currentColor; | ||
border-radius: 50%; | ||
animation: lds-default 1.2s linear infinite; | ||
} | ||
.lds-default div:nth-child(1) { | ||
animation-delay: 0s; | ||
top: 36.8px; | ||
left: 66.24px; | ||
} | ||
.lds-default div:nth-child(2) { | ||
animation-delay: -0.1s; | ||
top: 22.08px; | ||
left: 62.29579px; | ||
} | ||
.lds-default div:nth-child(3) { | ||
animation-delay: -0.2s; | ||
top: 11.30421px; | ||
left: 51.52px; | ||
} | ||
.lds-default div:nth-child(4) { | ||
animation-delay: -0.3s; | ||
top: 7.36px; | ||
left: 36.8px; | ||
} | ||
.lds-default div:nth-child(5) { | ||
animation-delay: -0.4s; | ||
top: 11.30421px; | ||
left: 22.08px; | ||
} | ||
.lds-default div:nth-child(6) { | ||
animation-delay: -0.5s; | ||
top: 22.08px; | ||
left: 11.30421px; | ||
} | ||
.lds-default div:nth-child(7) { | ||
animation-delay: -0.6s; | ||
top: 36.8px; | ||
left: 7.36px; | ||
} | ||
.lds-default div:nth-child(8) { | ||
animation-delay: -0.7s; | ||
top: 51.52px; | ||
left: 11.30421px; | ||
} | ||
.lds-default div:nth-child(9) { | ||
animation-delay: -0.8s; | ||
top: 62.29579px; | ||
left: 22.08px; | ||
} | ||
.lds-default div:nth-child(10) { | ||
animation-delay: -0.9s; | ||
top: 66.24px; | ||
left: 36.8px; | ||
} | ||
.lds-default div:nth-child(11) { | ||
animation-delay: -1s; | ||
top: 62.29579px; | ||
left: 51.52px; | ||
} | ||
.lds-default div:nth-child(12) { | ||
animation-delay: -1.1s; | ||
top: 51.52px; | ||
left: 62.29579px; | ||
} | ||
@keyframes lds-default { | ||
0%, | ||
20%, | ||
80%, | ||
100% { | ||
transform: scale(1); | ||
} | ||
50% { | ||
transform: scale(1.5); | ||
} | ||
} | ||
</style> |
50 changes: 50 additions & 0 deletions
50
packages/plugins/LoadingIndicator/src/components/loaderStyles/Circle.vue
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,50 @@ | ||
<template> | ||
<div class="lds-circle"><div></div></div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue' | ||
export default Vue.extend({ | ||
name: 'CircleLoader', | ||
}) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.lds-circle { | ||
color: var(--polar-primary); | ||
} | ||
.lds-circle, | ||
.lds-circle div { | ||
box-sizing: border-box; | ||
} | ||
.lds-circle { | ||
display: inline-block; | ||
transform: translateZ(1px); | ||
} | ||
.lds-circle > div { | ||
display: inline-block; | ||
width: 64px; | ||
height: 64px; | ||
margin: 8px; | ||
background: currentColor; | ||
border-radius: 50%; | ||
animation: lds-circle 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite; | ||
} | ||
@keyframes lds-circle { | ||
0%, | ||
100% { | ||
animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5); | ||
} | ||
0% { | ||
transform: rotateY(0deg); | ||
} | ||
50% { | ||
transform: rotateY(1800deg); | ||
animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1); | ||
} | ||
100% { | ||
transform: rotateY(3600deg); | ||
} | ||
} | ||
</style> |
62 changes: 62 additions & 0 deletions
62
packages/plugins/LoadingIndicator/src/components/loaderStyles/Ring.vue
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,62 @@ | ||
<template> | ||
<div class="lds-ring"> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue' | ||
export default Vue.extend({ | ||
name: 'RingLoader', | ||
}) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.lds-ring { | ||
/* change color here */ | ||
color: var(--polar-primary); | ||
} | ||
.lds-ring, | ||
.lds-ring div { | ||
box-sizing: border-box; | ||
} | ||
.lds-ring { | ||
display: inline-block; | ||
position: relative; | ||
width: 80px; | ||
height: 80px; | ||
} | ||
.lds-ring div { | ||
box-sizing: border-box; | ||
display: block; | ||
position: absolute; | ||
width: 64px; | ||
height: 64px; | ||
margin: 8px; | ||
border: 8px solid currentColor; | ||
border-radius: 50%; | ||
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; | ||
border-color: currentColor transparent transparent transparent; | ||
} | ||
.lds-ring div:nth-child(1) { | ||
animation-delay: -0.45s; | ||
} | ||
.lds-ring div:nth-child(2) { | ||
animation-delay: -0.3s; | ||
} | ||
.lds-ring div:nth-child(3) { | ||
animation-delay: -0.15s; | ||
} | ||
@keyframes lds-ring { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
</style> |
Oops, something went wrong.