ibm-dojo/deliteful — pull request #16 by seb-pereira (2014-01-17 16:07:37+00:00)
Title: ProgressBar

d-progress-bar

ProgressBar widget displays status for tasks that takes a long time.

can be used on desktop and mobile browsers.

displays the amount of completed task with a label (percentage or absolute value)

indeterminate state: an animation indicates a task is underway but the amount completed is unkown.

**Content**

d-progress-bar widget

RTL support: all themes

a11y high contrast support (RTL and LTR) : bootstrap/custom themes

**Tests**

Test file `tests/test_ProgressBar.html` available for manual testing

Unit tests: not ready yet to be pushed.

**Styling**

Styling doesn't rely on delite variables: will be refactored later.

**a11y**

dj_a11y descendent classes are defined in files `ProgressBar_a11y.less` and `ProgressBar_a11y_rtl.less` under `ProgressBar/themes/{theme}` [1]

[1] See issue https://github.com/ibm-dojo/delite/issues/87 for discussion about a11y CSS organization.

Usage

```html

```

Attribute	Description

value

Number or percentage indicating the amount of completed task.

With "%": percentage value, 0% <= progress <= 100%, or

without "%": absolute value, 0 <= progress <= maximum.

It is possible to programmatically set the numeric value 'Infinity' to force the progress bar state to indeterminate.

Default: "0"

maximum

This is the number which express the task as completed.

Default: 100

label

Allow to specify/override the label on the progress bar whether it's determinate or indeterminate.

By default, when the state is determinate the progress bar displays the percentage of completion or a number which express the amount of task completed.

when state is indeterminate it doesn't display a label.

Default: ""

places

Number of places to show on default label displayed by the progress bar.

Default: 0

indeterminate

If false: the progress bar indicates the percentage of progression, with a label.

If true: the progress bar show that a task is underway but that the amount completed is unknown, with no label.

Setting indeterminate to true do not modify the current value.

Setting indeterminate to false do not modify the current value, unless if the value was Infinity: in such case the value is reset to 0.