@govtechsg/sgds-web-component 2.0.0-rc.0 → 2.0.0-rc.2
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.
- package/components/Accordion/accordion.cjs.js +1 -1
- package/components/Accordion/accordion.js +1 -1
- package/components/Accordion/index.umd.js +1 -1
- package/components/ActionCard/index.umd.js +1938 -1836
- package/components/ActionCard/index.umd.js.map +1 -1
- package/components/ActionCard/sgds-action-card.cjs.js +2 -2
- package/components/ActionCard/sgds-action-card.cjs.js.map +1 -1
- package/components/ActionCard/sgds-action-card.d.ts +1 -1
- package/components/ActionCard/sgds-action-card.js +1 -1
- package/components/ActionCard/sgds-action-card.js.map +1 -1
- package/components/Alert/index.umd.js +200 -98
- package/components/Alert/index.umd.js.map +1 -1
- package/components/Alert/sgds-alert.cjs.js +2 -2
- package/components/Alert/sgds-alert.cjs.js.map +1 -1
- package/components/Alert/sgds-alert.d.ts +1 -1
- package/components/Alert/sgds-alert.js +1 -1
- package/components/Alert/sgds-alert.js.map +1 -1
- package/components/ComboBox/index.umd.js +229 -127
- package/components/ComboBox/index.umd.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.cjs.js +2 -2
- package/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.d.ts +1 -1
- package/components/ComboBox/sgds-combo-box.js +1 -1
- package/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/components/Datepicker/index.umd.js +7836 -7734
- package/components/Datepicker/index.umd.js.map +1 -1
- package/components/Datepicker/sgds-datepicker.cjs.js +2 -2
- package/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
- package/components/Datepicker/sgds-datepicker.d.ts +1 -1
- package/components/Datepicker/sgds-datepicker.js +1 -1
- package/components/Datepicker/sgds-datepicker.js.map +1 -1
- package/components/Drawer/index.umd.js +200 -98
- package/components/Drawer/index.umd.js.map +1 -1
- package/components/Drawer/sgds-drawer.cjs.js +2 -2
- package/components/Drawer/sgds-drawer.cjs.js.map +1 -1
- package/components/Drawer/sgds-drawer.d.ts +1 -1
- package/components/Drawer/sgds-drawer.js +1 -1
- package/components/Drawer/sgds-drawer.js.map +1 -1
- package/components/Dropdown/index.umd.js +229 -127
- package/components/Dropdown/index.umd.js.map +1 -1
- package/components/Dropdown/sgds-dropdown.cjs.js +2 -2
- package/components/Dropdown/sgds-dropdown.cjs.js.map +1 -1
- package/components/Dropdown/sgds-dropdown.d.ts +1 -1
- package/components/Dropdown/sgds-dropdown.js +1 -1
- package/components/Dropdown/sgds-dropdown.js.map +1 -1
- package/components/FileUpload/index.umd.js +229 -127
- package/components/FileUpload/index.umd.js.map +1 -1
- package/components/FileUpload/sgds-file-upload.cjs.js +2 -2
- package/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
- package/components/FileUpload/sgds-file-upload.d.ts +1 -1
- package/components/FileUpload/sgds-file-upload.js +1 -1
- package/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/components/Modal/index.umd.js +200 -98
- package/components/Modal/index.umd.js.map +1 -1
- package/components/Modal/sgds-modal.cjs.js +2 -2
- package/components/Modal/sgds-modal.cjs.js.map +1 -1
- package/components/Modal/sgds-modal.d.ts +1 -1
- package/components/Modal/sgds-modal.js +1 -1
- package/components/Modal/sgds-modal.js.map +1 -1
- package/components/Progress/index.umd.js +2 -20
- package/components/Progress/index.umd.js.map +1 -1
- package/components/Progress/progress-bar.cjs.js +1 -3
- package/components/Progress/progress-bar.cjs.js.map +1 -1
- package/components/Progress/progress-bar.js +1 -3
- package/components/Progress/progress-bar.js.map +1 -1
- package/components/Progress/sgds-progress-bar.cjs.js +1 -17
- package/components/Progress/sgds-progress-bar.cjs.js.map +1 -1
- package/components/Progress/sgds-progress-bar.d.ts +0 -8
- package/components/Progress/sgds-progress-bar.js +1 -17
- package/components/Progress/sgds-progress-bar.js.map +1 -1
- package/components/QuantityToggle/index.umd.js +200 -98
- package/components/QuantityToggle/index.umd.js.map +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.cjs.js +2 -2
- package/components/QuantityToggle/sgds-quantity-toggle.cjs.js.map +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.d.ts +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.js +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
- package/components/Textarea/index.umd.js +1 -1
- package/components/Textarea/textarea.cjs.js +1 -1
- package/components/Textarea/textarea.js +1 -1
- package/components/Toast/index.umd.js +1938 -1836
- package/components/Toast/index.umd.js.map +1 -1
- package/components/Toast/sgds-toast.cjs.js +2 -2
- package/components/Toast/sgds-toast.cjs.js.map +1 -1
- package/components/Toast/sgds-toast.d.ts +1 -1
- package/components/Toast/sgds-toast.js +1 -1
- package/components/Toast/sgds-toast.js.map +1 -1
- package/components/index.umd.js +204 -120
- package/components/index.umd.js.map +1 -1
- package/index.umd.js +204 -120
- package/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/themes/day.css +1 -9
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var lit = require('lit');
|
|
6
6
|
|
|
7
|
-
var css_248z = lit.css`:host{width:100%}:host([variant=secondary]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-secondary
|
|
8
|
-
|
|
9
|
-
/*! CSS Used keyframes */@keyframes progress-bar-stripes{0%{background-position-x:1rem}}`;
|
|
7
|
+
var css_248z = lit.css`:host{width:100%}:host([variant=secondary]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-secondary)}:host([variant=warning]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-warning)}:host([variant=danger]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-danger)}:host([variant=success]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-success)}:host([variant=info]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-info)}:host([variant=dark]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-dark)}progress{vertical-align:baseline}.progress-bar{--sgds-progress-bar-bg:var(--sgds-primary);--sgds-progress-bar-transition:width 0.6s ease;--sgds-progress-bar-color:var(--sgds-white);--sgds-progress-bar-font-size:0.75rem;background-color:var(--sgds-progress-bar-bg);color:var(--sgds-progress-bar-color);display:flex;flex-direction:column;font-size:var(--sgds-progress-bar-font-size);height:100%;justify-content:center;overflow:hidden;text-align:center;transition:var(--sgds-progress-bar-transition);white-space:nowrap}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}`;
|
|
10
8
|
|
|
11
9
|
exports["default"] = css_248z;
|
|
12
10
|
//# sourceMappingURL=progress-bar.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"progress-bar.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
|
|
3
|
-
var css_248z = css`:host{width:100%}:host([variant=secondary]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-secondary
|
|
4
|
-
|
|
5
|
-
/*! CSS Used keyframes */@keyframes progress-bar-stripes{0%{background-position-x:1rem}}`;
|
|
3
|
+
var css_248z = css`:host{width:100%}:host([variant=secondary]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-secondary)}:host([variant=warning]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-warning)}:host([variant=danger]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-danger)}:host([variant=success]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-success)}:host([variant=info]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-info)}:host([variant=dark]) .progress-bar{--sgds-progress-bar-bg:var(--sgds-dark)}progress{vertical-align:baseline}.progress-bar{--sgds-progress-bar-bg:var(--sgds-primary);--sgds-progress-bar-transition:width 0.6s ease;--sgds-progress-bar-color:var(--sgds-white);--sgds-progress-bar-font-size:0.75rem;background-color:var(--sgds-progress-bar-bg);color:var(--sgds-progress-bar-color);display:flex;flex-direction:column;font-size:var(--sgds-progress-bar-font-size);height:100%;justify-content:center;overflow:hidden;text-align:center;transition:var(--sgds-progress-bar-transition);white-space:nowrap}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}`;
|
|
6
4
|
|
|
7
5
|
export { css_248z as default };
|
|
8
6
|
//# sourceMappingURL=progress-bar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"progress-bar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -17,14 +17,6 @@ class SgdsProgressBar extends sgdsElement["default"] {
|
|
|
17
17
|
* Sets the aria label for assistive devices.
|
|
18
18
|
*/
|
|
19
19
|
this.arialabel = "";
|
|
20
|
-
/** Apply a stripe over the progress bar */
|
|
21
|
-
this.striped = false;
|
|
22
|
-
/**
|
|
23
|
-
* Animated stripes over the progress bar.
|
|
24
|
-
*
|
|
25
|
-
* Use in conjunction with striped property
|
|
26
|
-
*/
|
|
27
|
-
this.animated = false;
|
|
28
20
|
/** Add label on top of progress bar */
|
|
29
21
|
this.label = "";
|
|
30
22
|
}
|
|
@@ -32,9 +24,7 @@ class SgdsProgressBar extends sgdsElement["default"] {
|
|
|
32
24
|
return lit.html `
|
|
33
25
|
<div
|
|
34
26
|
class=${classMap_js.classMap({
|
|
35
|
-
"progress-bar": true
|
|
36
|
-
"progress-bar-striped": this.striped,
|
|
37
|
-
"progress-bar-animated": this.animated
|
|
27
|
+
"progress-bar": true
|
|
38
28
|
})}
|
|
39
29
|
role="progressbar"
|
|
40
30
|
style=${styleMap_js.styleMap({ width: `${this.value}%` })}
|
|
@@ -64,12 +54,6 @@ tslib.__decorate([
|
|
|
64
54
|
tslib.__decorate([
|
|
65
55
|
decorators_js.property({ type: String, reflect: true })
|
|
66
56
|
], SgdsProgressBar.prototype, "arialabel", void 0);
|
|
67
|
-
tslib.__decorate([
|
|
68
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
69
|
-
], SgdsProgressBar.prototype, "striped", void 0);
|
|
70
|
-
tslib.__decorate([
|
|
71
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
72
|
-
], SgdsProgressBar.prototype, "animated", void 0);
|
|
73
57
|
tslib.__decorate([
|
|
74
58
|
decorators_js.property({ type: String, reflect: true })
|
|
75
59
|
], SgdsProgressBar.prototype, "label", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-progress-bar.cjs.js","sources":["../../../src/components/Progress/sgds-progress-bar.ts"],"sourcesContent":["import { property } from \"lit/decorators.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { html } from \"lit\";\nimport progressBarStyle from \"./progress-bar.css\";\nexport type ProgressBarVariant = \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"dark\";\n\nexport class SgdsProgressBar extends SgdsElement {\n static styles = [progressBarStyle];\n\n /** The background color of the progress bar */\n @property({ type: String, reflect: true }) variant: ProgressBarVariant;\n /**\n * The current progress as a percentage, from 0 to 100.\n */\n @property({ type: Number, reflect: true }) value: number;\n\n /**\n * Sets the minimun aria range for assistive devices.\n *\n * The aria-valuemin attribute defines the minimun allowed value for a range widget.\n */\n @property({ type: Number, reflect: true }) ariamin: number;\n /**\n * Sets the maximum aria range for assistive devices.\n *\n * The aria-valuemax attribute defines the maximum allowed value for a range widget.\n */\n @property({ type: Number, reflect: true }) ariamax: number;\n /**\n * Sets the aria label for assistive devices.\n */\n @property({ type: String, reflect: true }) arialabel = \"\";\n\n /**
|
|
1
|
+
{"version":3,"file":"sgds-progress-bar.cjs.js","sources":["../../../src/components/Progress/sgds-progress-bar.ts"],"sourcesContent":["import { property } from \"lit/decorators.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { html } from \"lit\";\nimport progressBarStyle from \"./progress-bar.css\";\nexport type ProgressBarVariant = \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"dark\";\n\nexport class SgdsProgressBar extends SgdsElement {\n static styles = [progressBarStyle];\n\n /** The background color of the progress bar */\n @property({ type: String, reflect: true }) variant: ProgressBarVariant;\n /**\n * The current progress as a percentage, from 0 to 100.\n */\n @property({ type: Number, reflect: true }) value: number;\n\n /**\n * Sets the minimun aria range for assistive devices.\n *\n * The aria-valuemin attribute defines the minimun allowed value for a range widget.\n */\n @property({ type: Number, reflect: true }) ariamin: number;\n /**\n * Sets the maximum aria range for assistive devices.\n *\n * The aria-valuemax attribute defines the maximum allowed value for a range widget.\n */\n @property({ type: Number, reflect: true }) ariamax: number;\n /**\n * Sets the aria label for assistive devices.\n */\n @property({ type: String, reflect: true }) arialabel = \"\";\n\n /** Add label on top of progress bar */\n @property({ type: String, reflect: true }) label = \"\";\n\n render() {\n return html`\n <div\n class=${classMap({\n \"progress-bar\": true\n })}\n role=\"progressbar\"\n style=${styleMap({ width: `${this.value}%` })}\n aria-label=${this.arialabel}\n aria-valuenow=${this.value}\n aria-valuemin=${this.ariamin}\n aria-valuemax=${this.ariamax}\n >\n ${this.label ? html`${this.label}` : undefined}\n </div>\n `;\n }\n}\n\nexport default SgdsProgressBar;\n"],"names":["SgdsElement","html","classMap","styleMap","progressBarStyle","__decorate","property"],"mappings":";;;;;;;;;;;;AAQM,MAAO,eAAgB,SAAQA,sBAAW,CAAA;AAAhD,IAAA,WAAA,GAAA;;AAsBE;;AAEG;QACwC,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;;QAGf,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;KAmBvD;IAjBC,MAAM,GAAA;AACJ,QAAA,OAAOC,QAAI,CAAA,CAA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eAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAIhBD,gBAAA,CAAA;IAA1CC,sBAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAgB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGfD,gBAAA,CAAA;IAA1CC,sBAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAY,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA;;;;;"}
|
|
@@ -24,14 +24,6 @@ export declare class SgdsProgressBar extends SgdsElement {
|
|
|
24
24
|
* Sets the aria label for assistive devices.
|
|
25
25
|
*/
|
|
26
26
|
arialabel: string;
|
|
27
|
-
/** Apply a stripe over the progress bar */
|
|
28
|
-
striped: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Animated stripes over the progress bar.
|
|
31
|
-
*
|
|
32
|
-
* Use in conjunction with striped property
|
|
33
|
-
*/
|
|
34
|
-
animated: boolean;
|
|
35
27
|
/** Add label on top of progress bar */
|
|
36
28
|
label: string;
|
|
37
29
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -13,14 +13,6 @@ class SgdsProgressBar extends SgdsElement {
|
|
|
13
13
|
* Sets the aria label for assistive devices.
|
|
14
14
|
*/
|
|
15
15
|
this.arialabel = "";
|
|
16
|
-
/** Apply a stripe over the progress bar */
|
|
17
|
-
this.striped = false;
|
|
18
|
-
/**
|
|
19
|
-
* Animated stripes over the progress bar.
|
|
20
|
-
*
|
|
21
|
-
* Use in conjunction with striped property
|
|
22
|
-
*/
|
|
23
|
-
this.animated = false;
|
|
24
16
|
/** Add label on top of progress bar */
|
|
25
17
|
this.label = "";
|
|
26
18
|
}
|
|
@@ -28,9 +20,7 @@ class SgdsProgressBar extends SgdsElement {
|
|
|
28
20
|
return html `
|
|
29
21
|
<div
|
|
30
22
|
class=${classMap({
|
|
31
|
-
"progress-bar": true
|
|
32
|
-
"progress-bar-striped": this.striped,
|
|
33
|
-
"progress-bar-animated": this.animated
|
|
23
|
+
"progress-bar": true
|
|
34
24
|
})}
|
|
35
25
|
role="progressbar"
|
|
36
26
|
style=${styleMap({ width: `${this.value}%` })}
|
|
@@ -60,12 +50,6 @@ __decorate([
|
|
|
60
50
|
__decorate([
|
|
61
51
|
property({ type: String, reflect: true })
|
|
62
52
|
], SgdsProgressBar.prototype, "arialabel", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
property({ type: Boolean, reflect: true })
|
|
65
|
-
], SgdsProgressBar.prototype, "striped", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
property({ type: Boolean, reflect: true })
|
|
68
|
-
], SgdsProgressBar.prototype, "animated", void 0);
|
|
69
53
|
__decorate([
|
|
70
54
|
property({ type: String, reflect: true })
|
|
71
55
|
], SgdsProgressBar.prototype, "label", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-progress-bar.js","sources":["../../../src/components/Progress/sgds-progress-bar.ts"],"sourcesContent":["import { property } from \"lit/decorators.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { html } from \"lit\";\nimport progressBarStyle from \"./progress-bar.css\";\nexport type ProgressBarVariant = \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"dark\";\n\nexport class SgdsProgressBar extends SgdsElement {\n static styles = [progressBarStyle];\n\n /** The background color of the progress bar */\n @property({ type: String, reflect: true }) variant: ProgressBarVariant;\n /**\n * The current progress as a percentage, from 0 to 100.\n */\n @property({ type: Number, reflect: true }) value: number;\n\n /**\n * Sets the minimun aria range for assistive devices.\n *\n * The aria-valuemin attribute defines the minimun allowed value for a range widget.\n */\n @property({ type: Number, reflect: true }) ariamin: number;\n /**\n * Sets the maximum aria range for assistive devices.\n *\n * The aria-valuemax attribute defines the maximum allowed value for a range widget.\n */\n @property({ type: Number, reflect: true }) ariamax: number;\n /**\n * Sets the aria label for assistive devices.\n */\n @property({ type: String, reflect: true }) arialabel = \"\";\n\n /**
|
|
1
|
+
{"version":3,"file":"sgds-progress-bar.js","sources":["../../../src/components/Progress/sgds-progress-bar.ts"],"sourcesContent":["import { property } from \"lit/decorators.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport { html } from \"lit\";\nimport progressBarStyle from \"./progress-bar.css\";\nexport type ProgressBarVariant = \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"dark\";\n\nexport class SgdsProgressBar extends SgdsElement {\n static styles = [progressBarStyle];\n\n /** The background color of the progress bar */\n @property({ type: String, reflect: true }) variant: ProgressBarVariant;\n /**\n * The current progress as a percentage, from 0 to 100.\n */\n @property({ type: Number, reflect: true }) value: number;\n\n /**\n * Sets the minimun aria range for assistive devices.\n *\n * The aria-valuemin attribute defines the minimun allowed value for a range widget.\n */\n @property({ type: Number, reflect: true }) ariamin: number;\n /**\n * Sets the maximum aria range for assistive devices.\n *\n * The aria-valuemax attribute defines the maximum allowed value for a range widget.\n */\n @property({ type: Number, reflect: true }) ariamax: number;\n /**\n * Sets the aria label for assistive devices.\n */\n @property({ type: String, reflect: true }) arialabel = \"\";\n\n /** Add label on top of progress bar */\n @property({ type: String, reflect: true }) label = \"\";\n\n render() {\n return html`\n <div\n class=${classMap({\n \"progress-bar\": true\n })}\n role=\"progressbar\"\n style=${styleMap({ width: `${this.value}%` })}\n aria-label=${this.arialabel}\n aria-valuenow=${this.value}\n aria-valuemin=${this.ariamin}\n aria-valuemax=${this.ariamax}\n >\n ${this.label ? html`${this.label}` : undefined}\n </div>\n `;\n }\n}\n\nexport default SgdsProgressBar;\n"],"names":["progressBarStyle"],"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