@1024pix/pix-ui 48.4.0 → 48.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
<div
|
|
2
|
-
|
|
1
|
+
<div
|
|
2
|
+
class="progress-gauge {{this.themeMode}} {{this.colorClass}}"
|
|
3
|
+
aria-hidden={{if @isDecorative "true"}}
|
|
4
|
+
...attributes
|
|
5
|
+
>
|
|
6
|
+
{{#unless @hidePercentage}}
|
|
7
|
+
<div class="progress-gauge__text" role="presentation">{{this.percentageValue}}</div>
|
|
8
|
+
{{/unless}}
|
|
3
9
|
<label for={{this.id}} class="screen-reader-only">{{@label}}</label>
|
|
4
10
|
<progress
|
|
5
11
|
class="progress-gauge__bar"
|
|
@@ -20,7 +20,9 @@ export default class PixProgressGauge extends Component {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
get label() {
|
|
23
|
-
|
|
23
|
+
const thereIsNoLabel = !this.args.label || !this.args.label.trim();
|
|
24
|
+
|
|
25
|
+
if (thereIsNoLabel && !this.args.isDecorative) {
|
|
24
26
|
throw new Error('ERROR in PixProgressGauge component, @label param is not provided.');
|
|
25
27
|
}
|
|
26
28
|
return this.args.label;
|