@spectrum-web-components/progress-bar 0.30.0 → 0.30.1-overlay.31
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +4 -4
- package/src/ProgressBar.d.ts +1 -0
- package/src/ProgressBar.dev.js +9 -1
- package/src/ProgressBar.dev.js.map +2 -2
- package/src/ProgressBar.js +2 -2
- package/src/ProgressBar.js.map +3 -3
- package/test/progress-bar.test.js +35 -0
- package/test/progress-bar.test.js.map +2 -2
- package/custom-elements.json +0 -159
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@spectrum-web-components/progress-bar",
|
3
|
-
"version": "0.30.
|
3
|
+
"version": "0.30.1-overlay.31+0d83bbe39",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -57,8 +57,8 @@
|
|
57
57
|
"lit-html"
|
58
58
|
],
|
59
59
|
"dependencies": {
|
60
|
-
"@spectrum-web-components/base": "^0.30.
|
61
|
-
"@spectrum-web-components/field-label": "^0.30.
|
60
|
+
"@spectrum-web-components/base": "^0.30.1-overlay.31+0d83bbe39",
|
61
|
+
"@spectrum-web-components/field-label": "^0.30.1-overlay.31+0d83bbe39"
|
62
62
|
},
|
63
63
|
"devDependencies": {
|
64
64
|
"@spectrum-css/progressbar": "^3.0.27"
|
@@ -69,5 +69,5 @@
|
|
69
69
|
"./sp-*.js",
|
70
70
|
"./**/*.dev.js"
|
71
71
|
],
|
72
|
-
"gitHead": "
|
72
|
+
"gitHead": "0d83bbe39df1adf5e475c05e71ab221b66354a60"
|
73
73
|
}
|
package/src/ProgressBar.d.ts
CHANGED
package/src/ProgressBar.dev.js
CHANGED
@@ -16,6 +16,7 @@ import {
|
|
16
16
|
SpectrumElement
|
17
17
|
} from "@spectrum-web-components/base";
|
18
18
|
import { property } from "@spectrum-web-components/base/src/decorators.js";
|
19
|
+
import { LanguageResolutionController } from "@spectrum-web-components/reactive-controllers/src/LanguageResolution.js";
|
19
20
|
import "@spectrum-web-components/field-label/sp-field-label.js";
|
20
21
|
import styles from "./progress-bar.css.js";
|
21
22
|
export class ProgressBar extends SizedMixin(SpectrumElement) {
|
@@ -23,6 +24,7 @@ export class ProgressBar extends SizedMixin(SpectrumElement) {
|
|
23
24
|
super(...arguments);
|
24
25
|
this.indeterminate = false;
|
25
26
|
this.label = "";
|
27
|
+
this.languageResolver = new LanguageResolutionController(this);
|
26
28
|
this.overBackground = false;
|
27
29
|
this.sideLabel = false;
|
28
30
|
this.progress = 0;
|
@@ -41,7 +43,13 @@ export class ProgressBar extends SizedMixin(SpectrumElement) {
|
|
41
43
|
size=${this.size}
|
42
44
|
class="percentage"
|
43
45
|
>
|
44
|
-
${
|
46
|
+
${new Intl.NumberFormat(
|
47
|
+
this.languageResolver.language,
|
48
|
+
{
|
49
|
+
style: "percent",
|
50
|
+
unitDisplay: "narrow"
|
51
|
+
}
|
52
|
+
).format(this.progress / 100)}
|
45
53
|
</sp-field-label>
|
46
54
|
`}
|
47
55
|
` : html``}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["ProgressBar.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport styles from './progress-bar.css.js';\n\n/**\n * @element sp-progress-bar\n */\nexport class ProgressBar extends SizedMixin(SpectrumElement) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n @property({ type: String })\n public label = '';\n\n @property({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n public sideLabel = false;\n\n @property({ type: Number })\n public progress = 0;\n\n @property({ type: String, reflect: true })\n public static: 'white' | undefined;\n\n protected override render(): TemplateResult {\n return html`\n ${this.label\n ? html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.label}\n </sp-field-label>\n ${this.indeterminate\n ? html``\n : html`\n <sp-field-label\n size=${this.size}\n class=\"percentage\"\n >\n ${this.progress}
|
5
|
-
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,OAAO;AACP,OAAO,YAAY;AAKZ,aAAM,oBAAoB,WAAW,eAAe,EAAE;AAAA,EAAtD;AAAA;AAMH,SAAO,gBAAgB;AAGvB,SAAO,QAAQ;
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport { LanguageResolutionController } from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport styles from './progress-bar.css.js';\n\n/**\n * @element sp-progress-bar\n */\nexport class ProgressBar extends SizedMixin(SpectrumElement) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n @property({ type: String })\n public label = '';\n\n private languageResolver = new LanguageResolutionController(this);\n\n @property({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n public sideLabel = false;\n\n @property({ type: Number })\n public progress = 0;\n\n @property({ type: String, reflect: true })\n public static: 'white' | undefined;\n\n protected override render(): TemplateResult {\n return html`\n ${this.label\n ? html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.label}\n </sp-field-label>\n ${this.indeterminate\n ? html``\n : html`\n <sp-field-label\n size=${this.size}\n class=\"percentage\"\n >\n ${new Intl.NumberFormat(\n this.languageResolver.language,\n {\n style: 'percent',\n unitDisplay: 'narrow',\n }\n ).format(this.progress / 100)}\n </sp-field-label>\n `}\n `\n : html``}\n <div class=\"track\">\n <div\n class=\"fill\"\n style=\"transform: scaleX(calc(${this.progress} / 100));\"\n ></div>\n </div>\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'progressbar');\n }\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('indeterminate')) {\n if (this.indeterminate) {\n this.removeAttribute('aria-valuemin');\n this.removeAttribute('aria-valuemax');\n } else {\n this.setAttribute('aria-valuemin', '0');\n this.setAttribute('aria-valuemax', '100');\n }\n }\n if (!this.indeterminate && changes.has('progress')) {\n this.setAttribute('aria-valuenow', '' + this.progress);\n } else if (this.hasAttribute('aria-valuenow')) {\n this.removeAttribute('aria-valuenow');\n }\n if (this.label && changes.has('label')) {\n this.setAttribute('aria-label', this.label);\n }\n\n if (window.__swc.DEBUG) {\n if (\n !this.label &&\n !this.getAttribute('aria-label') &&\n !this.getAttribute('aria-labelledby')\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-bar> elements will not be accessible to screen readers without one of the following:',\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility',\n {\n type: 'accessibility',\n issues: [\n 'value supplied to the \"label\" attribute, which will be displayed visually as part of the element, or',\n 'value supplied to the \"aria-label\" attribute, which will only be provided to screen readers, or',\n 'an element ID reference supplied to the \"aria-labelledby\" attribute, which will be provided by screen readers and will need to be managed manually by the parent application.',\n ],\n }\n );\n }\n }\n }\n}\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,SAAS,oCAAoC;AAC7C,OAAO;AACP,OAAO,YAAY;AAKZ,aAAM,oBAAoB,WAAW,eAAe,EAAE;AAAA,EAAtD;AAAA;AAMH,SAAO,gBAAgB;AAGvB,SAAO,QAAQ;AAEf,SAAQ,mBAAmB,IAAI,6BAA6B,IAAI;AAGhE,SAAO,iBAAiB;AAGxB,SAAO,YAAY;AAGnB,SAAO,WAAW;AAAA;AAAA,EAnBlB,WAA2B,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAsBmB,SAAyB;AACxC,WAAO;AAAA,cACD,KAAK,QACD;AAAA,6CAC2B,KAAK;AAAA,4BACtB,KAAK;AAAA;AAAA,wBAET,KAAK,gBACD,SACA;AAAA;AAAA,2CAEe,KAAK;AAAA;AAAA;AAAA,sCAGV,IAAI,KAAK;AAAA,MACP,KAAK,iBAAiB;AAAA,MACtB;AAAA,QACI,OAAO;AAAA,QACP,aAAa;AAAA,MACjB;AAAA,IACJ,EAAE,OAAO,KAAK,WAAW,GAAG;AAAA;AAAA;AAAA,sBAI9C;AAAA;AAAA;AAAA;AAAA,oDAIkC,KAAK;AAAA;AAAA;AAAA;AAAA,EAIrD;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,QAAI,CAAC,KAAK,aAAa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,WAAW,aAAa,CAAC;AAAA,GAhB1D,YAiBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAnBjB,YAoBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAtBhC,YAuBF;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/src/ProgressBar.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";var
|
1
|
+
"use strict";var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var i=(o,r,e,s)=>{for(var t=s>1?void 0:s?b(r,e):r,p=o.length-1,u;p>=0;p--)(u=o[p])&&(t=(s?u(r,e,t):u(t))||t);return s&&t&&n(r,e,t),t};import{html as a,SizedMixin as d,SpectrumElement as c}from"@spectrum-web-components/base";import{property as l}from"@spectrum-web-components/base/src/decorators.js";import{LanguageResolutionController as h}from"@spectrum-web-components/reactive-controllers/src/LanguageResolution.js";import"@spectrum-web-components/field-label/sp-field-label.js";import m from"./progress-bar.css.js";export class ProgressBar extends d(c){constructor(){super(...arguments);this.indeterminate=!1;this.label="";this.languageResolver=new h(this);this.overBackground=!1;this.sideLabel=!1;this.progress=0}static get styles(){return[m]}render(){return a`
|
2
2
|
${this.label?a`
|
3
3
|
<sp-field-label size=${this.size} class="label">
|
4
4
|
${this.label}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
size=${this.size}
|
9
9
|
class="percentage"
|
10
10
|
>
|
11
|
-
${this.progress}
|
11
|
+
${new Intl.NumberFormat(this.languageResolver.language,{style:"percent",unitDisplay:"narrow"}).format(this.progress/100)}
|
12
12
|
</sp-field-label>
|
13
13
|
`}
|
14
14
|
`:a``}
|
package/src/ProgressBar.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["ProgressBar.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport styles from './progress-bar.css.js';\n\n/**\n * @element sp-progress-bar\n */\nexport class ProgressBar extends SizedMixin(SpectrumElement) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n @property({ type: String })\n public label = '';\n\n @property({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n public sideLabel = false;\n\n @property({ type: Number })\n public progress = 0;\n\n @property({ type: String, reflect: true })\n public static: 'white' | undefined;\n\n protected override render(): TemplateResult {\n return html`\n ${this.label\n ? html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.label}\n </sp-field-label>\n ${this.indeterminate\n ? html``\n : html`\n <sp-field-label\n size=${this.size}\n class=\"percentage\"\n >\n ${this.progress}
|
5
|
-
"mappings": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAEzB,MAAO,yDACP,OAAOC,MAAY,wBAKZ,aAAM,
|
6
|
-
"names": ["html", "SizedMixin", "SpectrumElement", "property", "styles", "changes", "__decorateClass"]
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport { LanguageResolutionController } from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport styles from './progress-bar.css.js';\n\n/**\n * @element sp-progress-bar\n */\nexport class ProgressBar extends SizedMixin(SpectrumElement) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n @property({ type: String })\n public label = '';\n\n private languageResolver = new LanguageResolutionController(this);\n\n @property({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n public sideLabel = false;\n\n @property({ type: Number })\n public progress = 0;\n\n @property({ type: String, reflect: true })\n public static: 'white' | undefined;\n\n protected override render(): TemplateResult {\n return html`\n ${this.label\n ? html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.label}\n </sp-field-label>\n ${this.indeterminate\n ? html``\n : html`\n <sp-field-label\n size=${this.size}\n class=\"percentage\"\n >\n ${new Intl.NumberFormat(\n this.languageResolver.language,\n {\n style: 'percent',\n unitDisplay: 'narrow',\n }\n ).format(this.progress / 100)}\n </sp-field-label>\n `}\n `\n : html``}\n <div class=\"track\">\n <div\n class=\"fill\"\n style=\"transform: scaleX(calc(${this.progress} / 100));\"\n ></div>\n </div>\n `;\n }\n\n protected override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'progressbar');\n }\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('indeterminate')) {\n if (this.indeterminate) {\n this.removeAttribute('aria-valuemin');\n this.removeAttribute('aria-valuemax');\n } else {\n this.setAttribute('aria-valuemin', '0');\n this.setAttribute('aria-valuemax', '100');\n }\n }\n if (!this.indeterminate && changes.has('progress')) {\n this.setAttribute('aria-valuenow', '' + this.progress);\n } else if (this.hasAttribute('aria-valuenow')) {\n this.removeAttribute('aria-valuenow');\n }\n if (this.label && changes.has('label')) {\n this.setAttribute('aria-label', this.label);\n }\n\n if (window.__swc.DEBUG) {\n if (\n !this.label &&\n !this.getAttribute('aria-label') &&\n !this.getAttribute('aria-labelledby')\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-bar> elements will not be accessible to screen readers without one of the following:',\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility',\n {\n type: 'accessibility',\n issues: [\n 'value supplied to the \"label\" attribute, which will be displayed visually as part of the element, or',\n 'value supplied to the \"aria-label\" attribute, which will only be provided to screen readers, or',\n 'an element ID reference supplied to the \"aria-labelledby\" attribute, which will be provided by screen readers and will need to be managed manually by the parent application.',\n ],\n }\n );\n }\n }\n }\n}\n"],
|
5
|
+
"mappings": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAEzB,OAAS,gCAAAC,MAAoC,0EAC7C,MAAO,yDACP,OAAOC,MAAY,wBAKZ,aAAM,oBAAoBJ,EAAWC,CAAe,CAAE,CAAtD,kCAMH,KAAO,cAAgB,GAGvB,KAAO,MAAQ,GAEf,KAAQ,iBAAmB,IAAIE,EAA6B,IAAI,EAGhE,KAAO,eAAiB,GAGxB,KAAO,UAAY,GAGnB,KAAO,SAAW,EAnBlB,WAA2B,QAAyB,CAChD,MAAO,CAACC,CAAM,CAClB,CAsBmB,QAAyB,CACxC,OAAOL;AAAA,cACD,KAAK,MACDA;AAAA,6CAC2B,KAA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AoBF,wBAGAI,EAAA,CADNJ,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAtBhC,YAuBF",
|
6
|
+
"names": ["html", "SizedMixin", "SpectrumElement", "property", "LanguageResolutionController", "styles", "changes", "__decorateClass"]
|
7
7
|
}
|
@@ -3,6 +3,7 @@ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
|
|
3
3
|
import "@spectrum-web-components/progress-bar/sp-progress-bar.js";
|
4
4
|
import { stub } from "sinon";
|
5
5
|
import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
|
6
|
+
import { createLanguageContext } from "../../../tools/reactive-controllers/test/helpers.js";
|
6
7
|
describe("ProgressBar", () => {
|
7
8
|
testForLitDevWarnings(
|
8
9
|
async () => await fixture(
|
@@ -90,5 +91,39 @@ describe("ProgressBar", () => {
|
|
90
91
|
});
|
91
92
|
consoleWarnStub.restore();
|
92
93
|
});
|
94
|
+
it("resolves a language (en-US)", async () => {
|
95
|
+
var _a;
|
96
|
+
const [languageContext] = createLanguageContext("en-US");
|
97
|
+
const test = await fixture(html`
|
98
|
+
<div @sp-language-context=${languageContext}>
|
99
|
+
<sp-progress-bar
|
100
|
+
label="Changing Value"
|
101
|
+
progress="45"
|
102
|
+
></sp-progress-bar>
|
103
|
+
</div>
|
104
|
+
`);
|
105
|
+
const el = test.querySelector("sp-progress-bar");
|
106
|
+
const percentage = el.shadowRoot.querySelector(
|
107
|
+
".percentage"
|
108
|
+
);
|
109
|
+
expect((_a = percentage.textContent) == null ? void 0 : _a.search("%")).to.not.equal(-1);
|
110
|
+
});
|
111
|
+
it("resolves a language (ar-sa)", async () => {
|
112
|
+
var _a;
|
113
|
+
const [languageContext] = createLanguageContext("ar-sa");
|
114
|
+
const test = await fixture(html`
|
115
|
+
<div @sp-language-context=${languageContext}>
|
116
|
+
<sp-progress-bar
|
117
|
+
label="Changing Value"
|
118
|
+
progress="45"
|
119
|
+
></sp-progress-bar>
|
120
|
+
</div>
|
121
|
+
`);
|
122
|
+
const el = test.querySelector("sp-progress-bar");
|
123
|
+
const percentage = el.shadowRoot.querySelector(
|
124
|
+
".percentage"
|
125
|
+
);
|
126
|
+
expect((_a = percentage.textContent) == null ? void 0 : _a.search("\u066A")).to.not.equal(-1);
|
127
|
+
});
|
93
128
|
});
|
94
129
|
//# sourceMappingURL=progress-bar.test.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["progress-bar.test.ts"],
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '@spectrum-web-components/progress-bar/sp-progress-bar.js';\nimport { ProgressBar } from '@spectrum-web-components/progress-bar';\nimport { stub } from 'sinon';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('ProgressBar', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<ProgressBar>(\n html`\n <sp-progress-bar label=\"Loading\"></sp-progress-bar>\n `\n )\n );\n it('loads default progress-bar accessibly', async () => {\n const el = await fixture<ProgressBar>(\n html`\n <sp-progress-bar label=\"Loading\"></sp-progress-bar>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n\n it('accepts a changing progress', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar label=\"Changing value\"></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('0');\n\n el.progress = 50;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('50');\n\n el.progress = 100;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('100');\n });\n it('loads - [indeterminate]', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar indeterminate label=\"Loading\"></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n it('accepts user `role`', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar\n role=\"progressbar\"\n label=\"With user role\"\n ></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(el.getAttribute('role')).to.equal('progressbar');\n });\n it('returns to indeterminate', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar\n progress=\"50\"\n label=\"Sometimes indeterminate\"\n ></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('50');\n\n el.indeterminate = true;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.false;\n });\n it('warns in Dev Mode when accessible attributes are not leveraged', async () => {\n const consoleWarnStub = stub(console, 'warn');\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar progress=\"50\"></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(consoleWarnStub.called).to.be.true;\n const spyCall = consoleWarnStub.getCall(0);\n expect(\n spyCall.args.at(0).includes('accessible'),\n 'confirm accessibility-centric message'\n ).to.be.true;\n expect(spyCall.args.at(-1), 'confirm `data` shape').to.deep.equal({\n data: {\n localName: 'sp-progress-bar',\n type: 'accessibility',\n level: 'default',\n },\n });\n consoleWarnStub.restore();\n });\n});\n"],
|
5
|
-
"mappings": ";AAYA,SAAS,gBAAgB,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AA,SAKrC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,MAAM,CAAC,EAAE,GAAG,MAAM,aAAa;AAAA,EAC1D,CAAC;AACD,KAAG,4BAA4B,YAAY;AACvC,UAAM,KAAK,MAAM,QAAqB;AAAA;AAAA;AAAA;AAAA;AAAA,SAKrC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,GAAG;AAC/C,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,MAAM,IAAI;AAEtD,OAAG,gBAAgB;AAEnB,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,GAAG;AAAA,EACnD,CAAC;AACD,KAAG,kEAAkE,YAAY;AAC7E,UAAM,kBAAkB,KAAK,SAAS,MAAM;AAC5C,UAAM,KAAK,MAAM,QAAqB;AAAA;AAAA,SAErC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,gBAAgB,MAAM,EAAE,GAAG,GAAG;AACrC,UAAM,UAAU,gBAAgB,QAAQ,CAAC;AACzC;AAAA,MACI,QAAQ,KAAK,GAAG,CAAC,EAAE,SAAS,YAAY;AAAA,MACxC;AAAA,IACJ,EAAE,GAAG,GAAG;AACR,WAAO,QAAQ,KAAK,GAAG,EAAE,GAAG,sBAAsB,EAAE,GAAG,KAAK,MAAM;AAAA,MAC9D,MAAM;AAAA,QACF,WAAW;AAAA,QACX,MAAM;AAAA,QACN,OAAO;AAAA,MACX;AAAA,IACJ,CAAC;AACD,oBAAgB,QAAQ;AAAA,EAC5B,CAAC;AACL,CAAC;",
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '@spectrum-web-components/progress-bar/sp-progress-bar.js';\nimport { ProgressBar } from '@spectrum-web-components/progress-bar';\nimport { stub } from 'sinon';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\nimport { createLanguageContext } from '../../../tools/reactive-controllers/test/helpers.js';\n\ndescribe('ProgressBar', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<ProgressBar>(\n html`\n <sp-progress-bar label=\"Loading\"></sp-progress-bar>\n `\n )\n );\n it('loads default progress-bar accessibly', async () => {\n const el = await fixture<ProgressBar>(\n html`\n <sp-progress-bar label=\"Loading\"></sp-progress-bar>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n\n it('accepts a changing progress', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar label=\"Changing value\"></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('0');\n\n el.progress = 50;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('50');\n\n el.progress = 100;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('100');\n });\n it('loads - [indeterminate]', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar indeterminate label=\"Loading\"></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n it('accepts user `role`', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar\n role=\"progressbar\"\n label=\"With user role\"\n ></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(el.getAttribute('role')).to.equal('progressbar');\n });\n it('returns to indeterminate', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar\n progress=\"50\"\n label=\"Sometimes indeterminate\"\n ></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('50');\n\n el.indeterminate = true;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.false;\n });\n it('warns in Dev Mode when accessible attributes are not leveraged', async () => {\n const consoleWarnStub = stub(console, 'warn');\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar progress=\"50\"></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(consoleWarnStub.called).to.be.true;\n const spyCall = consoleWarnStub.getCall(0);\n expect(\n spyCall.args.at(0).includes('accessible'),\n 'confirm accessibility-centric message'\n ).to.be.true;\n expect(spyCall.args.at(-1), 'confirm `data` shape').to.deep.equal({\n data: {\n localName: 'sp-progress-bar',\n type: 'accessibility',\n level: 'default',\n },\n });\n consoleWarnStub.restore();\n });\n\n it('resolves a language (en-US)', async () => {\n const [languageContext] = createLanguageContext('en-US');\n const test = await fixture(html`\n <div @sp-language-context=${languageContext}>\n <sp-progress-bar\n label=\"Changing Value\"\n progress=\"45\"\n ></sp-progress-bar>\n </div>\n `);\n const el = test.querySelector('sp-progress-bar') as ProgressBar;\n const percentage = el.shadowRoot.querySelector(\n '.percentage'\n ) as HTMLElement;\n expect(percentage.textContent?.search('%')).to.not.equal(-1);\n });\n\n it('resolves a language (ar-sa)', async () => {\n const [languageContext] = createLanguageContext('ar-sa');\n const test = await fixture(html`\n <div @sp-language-context=${languageContext}>\n <sp-progress-bar\n label=\"Changing Value\"\n progress=\"45\"\n ></sp-progress-bar>\n </div>\n `);\n const el = test.querySelector('sp-progress-bar') as ProgressBar;\n const percentage = el.shadowRoot.querySelector(\n '.percentage'\n ) as HTML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;AAAA,wCACK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAM/B;AACD,UAAM,KAAK,KAAK,cAAc,iBAAiB;AAC/C,UAAM,aAAa,GAAG,WAAW;AAAA,MAC7B;AAAA,IACJ;AACA,YAAO,gBAAW,gBAAX,mBAAwB,OAAO,IAAI,EAAE,GAAG,IAAI,MAAM,EAAE;AAAA,EAC/D,CAAC;AAED,KAAG,+BAA+B,YAAY;AApJlD;AAqJQ,UAAM,CAAC,eAAe,IAAI,sBAAsB,OAAO;AACvD,UAAM,OAAO,MAAM,QAAQ;AAAA,wCACK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAM/B;AACD,UAAM,KAAK,KAAK,cAAc,iBAAiB;AAC/C,UAAM,aAAa,GAAG,WAAW;AAAA,MAC7B;AAAA,IACJ;AACA,YAAO,gBAAW,gBAAX,mBAAwB,OAAO,SAAI,EAAE,GAAG,IAAI,MAAM,EAAE;AAAA,EAC/D,CAAC;AACL,CAAC;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/custom-elements.json
DELETED
@@ -1,159 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"schemaVersion": "1.0.0",
|
3
|
-
"readme": "",
|
4
|
-
"modules": [
|
5
|
-
{
|
6
|
-
"kind": "javascript-module",
|
7
|
-
"path": "sp-progress-bar.js",
|
8
|
-
"declarations": [],
|
9
|
-
"exports": []
|
10
|
-
},
|
11
|
-
{
|
12
|
-
"kind": "javascript-module",
|
13
|
-
"path": "src/ProgressBar.js",
|
14
|
-
"declarations": [
|
15
|
-
{
|
16
|
-
"kind": "class",
|
17
|
-
"description": "",
|
18
|
-
"name": "ProgressBar",
|
19
|
-
"members": [
|
20
|
-
{
|
21
|
-
"kind": "field",
|
22
|
-
"name": "indeterminate",
|
23
|
-
"type": {
|
24
|
-
"text": "boolean"
|
25
|
-
},
|
26
|
-
"privacy": "public",
|
27
|
-
"default": "false",
|
28
|
-
"attribute": "indeterminate",
|
29
|
-
"reflects": true
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"kind": "field",
|
33
|
-
"name": "label",
|
34
|
-
"type": {
|
35
|
-
"text": "string"
|
36
|
-
},
|
37
|
-
"privacy": "public",
|
38
|
-
"default": "''",
|
39
|
-
"attribute": "label"
|
40
|
-
},
|
41
|
-
{
|
42
|
-
"kind": "field",
|
43
|
-
"name": "overBackground",
|
44
|
-
"type": {
|
45
|
-
"text": "boolean"
|
46
|
-
},
|
47
|
-
"privacy": "public",
|
48
|
-
"default": "false",
|
49
|
-
"attribute": "over-background",
|
50
|
-
"reflects": true
|
51
|
-
},
|
52
|
-
{
|
53
|
-
"kind": "field",
|
54
|
-
"name": "sideLabel",
|
55
|
-
"type": {
|
56
|
-
"text": "boolean"
|
57
|
-
},
|
58
|
-
"privacy": "public",
|
59
|
-
"default": "false",
|
60
|
-
"attribute": "side-label",
|
61
|
-
"reflects": true
|
62
|
-
},
|
63
|
-
{
|
64
|
-
"kind": "field",
|
65
|
-
"name": "progress",
|
66
|
-
"type": {
|
67
|
-
"text": "number"
|
68
|
-
},
|
69
|
-
"privacy": "public",
|
70
|
-
"default": "0",
|
71
|
-
"attribute": "progress"
|
72
|
-
},
|
73
|
-
{
|
74
|
-
"kind": "field",
|
75
|
-
"name": "static",
|
76
|
-
"type": {
|
77
|
-
"text": "'white' | undefined"
|
78
|
-
},
|
79
|
-
"privacy": "public",
|
80
|
-
"attribute": "static",
|
81
|
-
"reflects": true
|
82
|
-
}
|
83
|
-
],
|
84
|
-
"attributes": [
|
85
|
-
{
|
86
|
-
"name": "indeterminate",
|
87
|
-
"type": {
|
88
|
-
"text": "boolean"
|
89
|
-
},
|
90
|
-
"default": "false",
|
91
|
-
"fieldName": "indeterminate"
|
92
|
-
},
|
93
|
-
{
|
94
|
-
"name": "label",
|
95
|
-
"type": {
|
96
|
-
"text": "string"
|
97
|
-
},
|
98
|
-
"default": "''",
|
99
|
-
"fieldName": "label"
|
100
|
-
},
|
101
|
-
{
|
102
|
-
"name": "over-background",
|
103
|
-
"type": {
|
104
|
-
"text": "boolean"
|
105
|
-
},
|
106
|
-
"default": "false",
|
107
|
-
"fieldName": "overBackground"
|
108
|
-
},
|
109
|
-
{
|
110
|
-
"name": "side-label",
|
111
|
-
"type": {
|
112
|
-
"text": "boolean"
|
113
|
-
},
|
114
|
-
"default": "false",
|
115
|
-
"fieldName": "sideLabel"
|
116
|
-
},
|
117
|
-
{
|
118
|
-
"name": "progress",
|
119
|
-
"type": {
|
120
|
-
"text": "number"
|
121
|
-
},
|
122
|
-
"default": "0",
|
123
|
-
"fieldName": "progress"
|
124
|
-
},
|
125
|
-
{
|
126
|
-
"name": "static",
|
127
|
-
"type": {
|
128
|
-
"text": "'white' | undefined"
|
129
|
-
},
|
130
|
-
"fieldName": "static"
|
131
|
-
}
|
132
|
-
],
|
133
|
-
"mixins": [
|
134
|
-
{
|
135
|
-
"name": "SizedMixin",
|
136
|
-
"package": "@spectrum-web-components/base"
|
137
|
-
}
|
138
|
-
],
|
139
|
-
"superclass": {
|
140
|
-
"name": "SpectrumElement",
|
141
|
-
"package": "@spectrum-web-components/base"
|
142
|
-
},
|
143
|
-
"tagName": "sp-progress-bar",
|
144
|
-
"customElement": true
|
145
|
-
}
|
146
|
-
],
|
147
|
-
"exports": [
|
148
|
-
{
|
149
|
-
"kind": "js",
|
150
|
-
"name": "ProgressBar",
|
151
|
-
"declaration": {
|
152
|
-
"name": "ProgressBar",
|
153
|
-
"module": "src/ProgressBar.js"
|
154
|
-
}
|
155
|
-
}
|
156
|
-
]
|
157
|
-
}
|
158
|
-
]
|
159
|
-
}
|