Skip to content
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

Feature/progress #579

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions assets/components/atoms/progress/progress-height.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="py-1">
<progress value="75" max="100" style="height: 1px"></progress>
</div>
<div class="py-1">
<progress value="75" max="100" style="height: 25px"></progress>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<progress max="100" value=""></progress>
54 changes: 54 additions & 0 deletions assets/components/atoms/progress/progress.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@charset 'utf-8';

progress {
display: block;
width: 100%;
border: 0;
border-radius: 0;
background-color: $gray-100;
height: 0.5rem;
}

progress::-webkit-progress-bar {
background-color: transparent;
}

progress::-webkit-progress-value {
background-color: $red;
transition: width 0.6s ease;
}

progress::-moz-progress-bar {
background-color: $red;
transition: width 0.6s ease;
}

progress:indeterminate {
animation-duration: 1.5s;
animation-iteration-count: infinite;
animation-name: moveIndeterminate;
animation-timing-function: linear;
background-color: $gray-100;
background-image: linear-gradient(to right, $red 100%, $gray-100 100%);
background-position: top left;
background-repeat: no-repeat;
background-size: 200% 200%;
&::-webkit-progress-bar {
background-color: transparent;
}
&::-moz-progress-bar {
background-color: transparent;
}
&::-ms-fill {
animation-name: none;
}
}

@keyframes moveIndeterminate {
from {
background-position: 200% 0;
}
to {
background-position: -200% 0;
}
}
15 changes: 15 additions & 0 deletions assets/components/atoms/progress/progress.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="py-1">
<progress value="0"></progress>
</div>
<div class="py-1">
<progress value="0.25"></progress>
</div>
<div class="py-1">
<progress value="1" max="2"></progress>
</div>
<div class="py-1">
<progress value="75" max="100"></progress>
</div>
<div class="py-1">
<progress value="100" max="100"></progress>
</div>
8 changes: 8 additions & 0 deletions assets/components/atoms/progress/progress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: Progress
name: progress
variants:
- name: height
title: Height
- name: indeterminate
title: Indeterminate
notes: Omit the `value` property completely, set it to `undefined` or leave blank
1 change: 1 addition & 0 deletions assets/components/entrypoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
@import 'atoms/dropdown/dropdown';
@import 'atoms/nav-toggle/nav-toggle';
@import 'atoms/popover/popover';
@import 'atoms/progress/progress';
@import 'atoms/trapeze/trapeze';
@import 'atoms/definition-list/definition-list';
@import 'atoms/figure/figure';
Expand Down