diff --git a/shared/styles/doc.scss b/shared/styles/doc.scss index 74c611471d..cdf0698956 100644 --- a/shared/styles/doc.scss +++ b/shared/styles/doc.scss @@ -13,6 +13,7 @@ .docs-codeblock-example { overflow: auto; + transform: translate3d(0, 0, 0); } .docs-codeblock-source { diff --git a/ui/components/_index.scss b/ui/components/_index.scss index 82c256d8d3..66b22480ab 100644 --- a/ui/components/_index.scss +++ b/ui/components/_index.scss @@ -173,6 +173,7 @@ // Progress Indicator 'progress-bar/base/index', 'progress-indicator/base/index', + 'progress-indicator/vertical/index', 'progress-ring/base/index', // Rich Text Editor diff --git a/ui/components/progress-bar/base/_index.scss b/ui/components/progress-bar/base/_index.scss index 8849f0c0ab..c6123af3b5 100644 --- a/ui/components/progress-bar/base/_index.scss +++ b/ui/components/progress-bar/base/_index.scss @@ -109,3 +109,31 @@ .slds-progress-bar__value_success { background: $progress-bar-color-background-fill-success; } + +/** + * @summary Create a vertical progress bar + * + * @selector .slds-progress-bar_vertical + * @restrict .slds-progress-bar + * @modifier + */ +.slds-progress-bar_vertical { + height: 100%; + width: ($progress-bar-height * 4); + + &.slds-progress-bar_x-small { + width: $progress-bar-height; + } + + &.slds-progress-bar_small { + width: ($progress-bar-height * 2); + } + + &.slds-progress-bar_medium { + width: ($progress-bar-height * 4); + } + + &.slds-progress-bar_large { + width: ($progress-bar-height * 6); + } +} diff --git a/ui/components/progress-bar/base/example.jsx b/ui/components/progress-bar/base/example.jsx index 3d25069dab..95bd29defa 100644 --- a/ui/components/progress-bar/base/example.jsx +++ b/ui/components/progress-bar/base/example.jsx @@ -9,23 +9,31 @@ import _ from '../../../shared/helpers'; // Partial(s) /// /////////////////////////////////////////// -export const ProgressBar = props => ( -
+ The+ +.slds-progress-bar
accepts a range from 0% to 100%, and this percentage should be applied with inline styling to thediv
with classslds-progress-bar__value
using Javascript. If implementing a horizontal progress indicator, set the width, otherwise set the height for vertical progress indicators. +
+ As the percentage of completion changes, be sure to update thearia-valuenow
property on the `` with `class="slds-progress-bar"`, as well as the `slds-assistive-text` ``. + + ++ + +## Horizontal + +### Active Step +When a step becomes active, the `+ + Progress: 50% + ++` with class `.slds-progress__item` should also get the class `.slds-is-active`. + ++ When a step is active, be sure to append "- Active" to the hidden button text in the `` with class `slds-assistive-text`, such as `Step 1 - Active`. ++ ++ + +### Completed Step +When the step is completed, the `.slds-is-active` class should be replaced with the class `.slds-is-completed` on `.slds-progress__item`. At that point, the `.slds-progress__item` element will receive a "success" icon, providing feedback that the step has been completed. + ++ ++ +Step 1 +Step 2 +Step 3 +Step 4 +Step 5 ++ When a step is completed, be sure to append "- Completed" to the hidden button text in the `` with class `slds-assistive-text`, such as `Step 2 - Completed`. ++ ++ + +### Error in a Step +When an error has occurred on a step, the `+ ++ +Step 1 +Step 2 +Step 3 +Step 4 +Step 5 +` with class `.slds-progress__item` should also get the class `.slds-has-error`. + ++ When a step has an error, be sure to append "- Error" to the hidden button text in the `` with class `slds-assistive-text`, such as `Step 3 - Error`. ++ ++ + +### Step Title Tooltip + ++ ++ +Step 1 +Step 2 +Step 3 +Step 4 +Step 5 ++ When a step's tooltip is visible, the step's button needs the+ +aria-describedby
attribute, whose value should be theid
of the associated tooltip. ++ + +### In a Modal + ++ ++++ +Step 1 +Step 2 +Step 3 +Step 4 +Step 5 ++ Verify Email + ++ + +### On a Gray Background + ++ ++++ + ++ ++ Modal Header +
++ + + ++ + +Step 1 +Step 2 +Step 3 +Step 4 +Step 5 ++ + +## Vertical +To display a vertical progress indicator, the `+ ++ +Step 1 +Step 2 +Step 3 +Step 4 +Step 5 +` with class `.slds-progress` should also get the class `.slds-progress_vertical`. The vertical progress indicator will take up 100% of the height of its container. The step titles in the vertical variant appear next to the step, instead of in a tooltip. + ++ The key markup difference between the horizontal and vertical variants is the progress markers. Horizontal progress indicators use `