Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
15 changed files
with
251 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ | |
- title: Alert | ||
meta: alert | ||
|
||
- title: Busy Indicator | ||
meta: busy-indicator | ||
|
||
- title: Button | ||
meta: button | ||
|
||
|
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,49 @@ | ||
--- | ||
title: Busy Indicator | ||
id: busy-indicator | ||
keywords: busy indicator, busy, spinner, loader | ||
sidebar: left-navigation-sidebar | ||
toc: false | ||
permalink: components/busy-indicator.html | ||
folder: components | ||
summary: | ||
--- | ||
|
||
A busy indicator informs the user of an ongoing operation. Only one busy indicator should be shown at a time. | ||
{: .docs-intro} | ||
Busy indicators are not visible all the time, only when needed. | ||
|
||
<br> | ||
## Busy indicator usage and size options | ||
{% capture busy-indicator %} | ||
<div style="display:flex;justify-content:center;flex-direction:column;align-items:center"> | ||
<div class="fd-busy-indicator--l" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div><br /><br /> | ||
<div class="fd-busy-indicator--m" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div><br /><br /> | ||
<div class="fd-busy-indicator" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div> | ||
</div> | ||
{% endcapture %} | ||
{% include display-component.html component=busy-indicator %} | ||
|
||
## Busy indicator usage in contrast mode | ||
{% capture contrast-busy-indicator %} | ||
<div style="display:flex;justify-content:center;flex-direction:column;align-items:center;background-color:cadetblue;height:250px"> | ||
<div class="fd-busy-indicator--l contrast" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div> | ||
</div> | ||
{% endcapture %} | ||
{% include display-component.html component=contrast-busy-indicator %} |
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,105 @@ | ||
|
||
@import "./settings"; | ||
@import "./mixins"; | ||
@import "./functions"; | ||
|
||
$block: #{$fd-namespace}-busy-indicator; | ||
$fd-dots-color: var(--sapContent_IconColor); | ||
$fd-dots-color-contrast: var(--sapContent_ContrastIconColor); | ||
// default sizes | ||
$fd-dots-size: 0.125rem; | ||
$fd-dots-margin: 0 0.2rem; | ||
|
||
// medium sizes | ||
$fd-dots-size-m: 0.5rem; | ||
$fd-dots-margin-m: 0 0.4rem; | ||
|
||
// large sizes | ||
$fd-dots-size-l: 1rem; | ||
$fd-dots-margin-l: 0 0.75rem; | ||
|
||
.#{$block}, | ||
.#{$block}--m, | ||
.#{$block}--l { | ||
@include fd-reset(); | ||
|
||
position: relative; | ||
display: block; | ||
font-size: 0; | ||
color: $fd-dots-color; | ||
} | ||
|
||
.#{$block}.contrast, | ||
.#{$block}--m.contrast, | ||
.#{$block}--l.contrast { | ||
color: $fd-dots-color-contrast; | ||
|
||
.#{$block}--circle-0, | ||
.#{$block}--circle-1, | ||
.#{$block}--circle-2 { | ||
color: $fd-dots-color-contrast; | ||
} | ||
} | ||
|
||
.#{$block}--circle-0, | ||
.#{$block}--circle-1, | ||
.#{$block}--circle-2 { | ||
@include fd-reset(); | ||
|
||
color: $fd-dots-color; | ||
position: relative; | ||
width: $fd-dots-size; | ||
height: $fd-dots-size; | ||
margin: $fd-dots-margin; | ||
display: inline-block; | ||
border-radius: 50%; | ||
background-color: currentColor; | ||
} | ||
|
||
.#{$block}--circle-0 { | ||
animation: grow 1.6s infinite cubic-bezier(0.32, 0.06, 0.85, 1.11); | ||
} | ||
|
||
.#{$block}--circle-1 { | ||
animation: grow 1.6s infinite cubic-bezier(0.32, 0.06, 0.85, 1.11); | ||
animation-delay: 200ms; | ||
} | ||
|
||
.#{$block}--circle-2 { | ||
animation: grow 1.6s infinite cubic-bezier(0.32, 0.06, 0.85, 1.11); | ||
animation-delay: 400ms; | ||
} | ||
|
||
.#{$block}--m .#{$block}--circle-0, | ||
.#{$block}--m .#{$block}--circle-1, | ||
.#{$block}--m .#{$block}--circle-2 { | ||
width: $fd-dots-size-m; | ||
height: $fd-dots-size-m; | ||
margin: $fd-dots-margin-m; | ||
} | ||
|
||
.#{$block}--l .#{$block}--circle-0, | ||
.#{$block}--l .#{$block}--circle-1, | ||
.#{$block}--l .#{$block}--circle-2 { | ||
width: $fd-dots-size-l; | ||
height: $fd-dots-size-l; | ||
margin: $fd-dots-margin-l; | ||
} | ||
|
||
@keyframes grow { | ||
0%, | ||
50%, | ||
100% { | ||
-webkit-transform: scale(1); | ||
-moz-transform: scale(1); | ||
-ms-transform: scale(1); | ||
transform: scale(1); | ||
} | ||
|
||
25% { | ||
-webkit-transform: scale(2.5); | ||
-moz-transform: scale(2.5); | ||
-ms-transform: scale(2.5); | ||
transform: scale(2.5); | ||
} | ||
} |
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,3 @@ | ||
.fd-busy-indicator--circle-0, .fd-busy-indicator--circle-1, .fd-busy-indicator--circle-2 { | ||
animation: none; | ||
} |
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,56 @@ | ||
|
||
{% extends "layout.njk" %} | ||
{% from "./../format.njk" import format %} | ||
|
||
{% block content %} | ||
<div style="background: #f3f4f5; margin:-20px; padding:20px;"> | ||
|
||
<!-- output the component example and the code snippet --> | ||
{% set example %} | ||
|
||
<div class="fd-busy-indicator" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div> | ||
<br /> | ||
<div class="fd-busy-indicator--m" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div> | ||
<br /> | ||
<div class="fd-busy-indicator--l" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div> | ||
{% endset %} | ||
{{ format(example) }} | ||
|
||
<!-- output the component example and the code snippet --> | ||
{% set example1 %} | ||
<div style="background: cadetblue; padding: 20px 0 20px 20px"> | ||
<div class="fd-busy-indicator contrast" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div> | ||
<br /> | ||
<div class="fd-busy-indicator--m contrast" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div> | ||
<br /> | ||
<div class="fd-busy-indicator--l contrast" aria-hidden="false" aria-label="Loading"> | ||
<div class="fd-busy-indicator--circle-0"></div> | ||
<div class="fd-busy-indicator--circle-1"></div> | ||
<div class="fd-busy-indicator--circle-2"></div> | ||
</div> | ||
</div> | ||
{% endset %} | ||
{{ format(example1) }} | ||
|
||
</div> | ||
{% endblock %} |
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
Binary file added
BIN
+1.65 KB
test/visual-regression-tests/reference_images/FS_busy-indicator_0_backstop_0_.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.11 KB
...isual-regression-tests/reference_images/FS_busy-indicator_1_backstop__n1_0_.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.