From 2c2c08468b48ad610146456ed8708c37563dd5df Mon Sep 17 00:00:00 2001 From: PedroBoni Date: Thu, 25 Jun 2020 18:34:52 -0300 Subject: [PATCH] Add Component ProgressBar --- docs/index.html.ejs | 18 +++++++++--------- style.css | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/docs/index.html.ejs b/docs/index.html.ejs index 5739bf4..98e6161 100644 --- a/docs/index.html.ejs +++ b/docs/index.html.ejs @@ -972,27 +972,27 @@

Progress Indicator

- A ProgressIndicator is a control, also known as a progress bar control, you can use to show the percentage of completion of a lengthy operation. + You can use a progress indicator, also known as a progress bar control, to show the percentage of completion of a lengthy operation.
- — Microsoft Windows User Experience p. 142 + — Microsoft Windows User Experience p. 189

- The ProgressIndicator component supports two types of bars. Both are deterministic, which means that you should give it a value parameter. Indeterministic progress bars are not supported, yet. -

- -

- There are two types of progress bars: continuous and block. The continuous doesn't require any further configuration. The block bar does require a class of progress-bar-block. + There are two types of progress bars: solid and segmented. The solid version is the default. To declare a segmented bar, you should use the segmented class.

<%- example(` - +
+ +
`) %> <%- example(` - +
+ +
`) %>
diff --git a/style.css b/style.css index 12cf871..15d2c15 100644 --- a/style.css +++ b/style.css @@ -885,3 +885,35 @@ table > tbody > tr > * { padding: 0 var(--grouped-element-spacing); height: 14px; } + +.progress-indicator { + height: 32px; + position: relative; + box-shadow: var(--border-sunken-inner); + padding: 4px 4px; + border: none; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0; +} + + +.progress-indicator > .progress-indicator-bar { + height: 100%; + display: block; + background-color: var(--dialog-blue); +} + +.progress-indicator.segmented > .progress-indicator-bar { + width: 100%; + background-color: transparent; /* resets the background color which is set to blue in the non-segmented selector */ + background-image: linear-gradient( + 90deg, + var(--dialog-blue) 0 16px, + transparent 0 2px + ); + background-repeat: repeat; + background-size: 18px 100%; +}