feat(progress-bar): add status prop (#1560)

* ProgressBar status feature added

* ProgressBar: Removed the css variables and use carbon-css instead.
The way of assigning the ProgressBar value has change. It is now a style
variable and scale-x is calculated in the css. This way prevent the
override of carbon css.

* Removed an unessacery span.

* Removed an unnecessary span.

* Added the status for the ProgressBarUx

* Remove `style css` and update docs.

* - Fixed the `capped` variable for more readability
- Updated docs `label` and `helperText`
- Updated docs and css

* fix: finished/error states cannot be indeterminate

* Run "yarn build:css"

* Re-run "yarn build:docs"

* test(progress-bar): assert `status` prop

* chore: add aria-busy and set valuenow to 0 when not active

---------

Co-authored-by: Eric Liu <ericyl.us@gmail.com>
Co-authored-by: Enrico Sacchetti <enrico@theetrain.ca>
This commit is contained in:
Jonathan Quintin 2023-02-19 12:34:41 -05:00 committed by GitHub
commit 7ddbf17cbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 92 additions and 16 deletions

View file

@ -2819,6 +2819,7 @@ None.
| value | No | <code>let</code> | No | <code>number</code> | <code>undefined</code> | Specify the current value |
| max | No | <code>let</code> | No | <code>number</code> | <code>100</code> | Specify the maximum value |
| kind | No | <code>let</code> | No | <code>"default" &#124; "inline" &#124; "indented"</code> | <code>"default"</code> | Specify the kind of progress bar |
| status | No | <code>let</code> | No | <code>"active" &#124; "finished" &#124; "error"</code> | <code>"active"</code> | Specify the status |
| size | No | <code>let</code> | No | <code>"sm" &#124; "md"</code> | <code>"md"</code> | Specify the size |
| labelText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the label text |
| hideLabel | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to visually hide the label text |