@spectrum-web-components/progress-bar 0.5.3 → 0.5.5-express.9

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/progress-bar",
3
- "version": "0.5.3",
3
+ "version": "0.5.5-express.9+abfee7409",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -44,17 +44,17 @@
44
44
  "lit-html"
45
45
  ],
46
46
  "dependencies": {
47
- "@spectrum-web-components/base": "^0.5.1",
48
- "@spectrum-web-components/field-label": "^0.7.3",
47
+ "@spectrum-web-components/base": "^0.5.2",
48
+ "@spectrum-web-components/field-label": "^0.7.5-express.9+abfee7409",
49
49
  "tslib": "^2.0.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@spectrum-css/progressbar": "^1.0.13"
52
+ "@spectrum-css/progressbar": "^1.0.17"
53
53
  },
54
54
  "types": "./src/index.d.ts",
55
55
  "customElements": "custom-elements.json",
56
56
  "sideEffects": [
57
57
  "./sp-*.js"
58
58
  ],
59
- "gitHead": "279380c6d72c0819fe224b405844af9ddcb87f8a"
59
+ "gitHead": "abfee740957976448a3e4cf90df17d6165f857d6"
60
60
  }
@@ -0,0 +1,15 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import * as stories from '../stories/progress-bar-sizes.stories.js';
13
+ import { regressVisuals } from '../../../test/visual/test.js';
14
+ regressVisuals('ProgressBarSizesStories', stories);
15
+ //# sourceMappingURL=progress-bar-sizes.test-vrt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress-bar-sizes.test-vrt.js","sourceRoot":"","sources":["progress-bar-sizes.test-vrt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,KAAK,OAAO,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,cAAc,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC","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 * as stories from '../stories/progress-bar-sizes.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ProgressBarSizesStories', stories);\n"]}
@@ -0,0 +1,15 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import * as stories from '../stories/progress-bar.stories.js';
13
+ import { regressVisuals } from '../../../test/visual/test.js';
14
+ regressVisuals('ProgressBarStories', stories);
15
+ //# sourceMappingURL=progress-bar.test-vrt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress-bar.test-vrt.js","sourceRoot":"","sources":["progress-bar.test-vrt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,KAAK,OAAO,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,cAAc,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC","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 * as stories from '../stories/progress-bar.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ProgressBarStories', stories);\n"]}
@@ -0,0 +1,69 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { elementUpdated, expect, fixture, html } from '@open-wc/testing';
13
+ import '../sp-progress-bar.js';
14
+ describe('ProgressBar', () => {
15
+ it('loads default progress-bar accessibly', async () => {
16
+ const el = await fixture(html `
17
+ <sp-progress-bar label="Loading"></sp-progress-bar>
18
+ `);
19
+ await elementUpdated(el);
20
+ expect(el).to.not.be.undefined;
21
+ await expect(el).to.be.accessible();
22
+ });
23
+ it('accepts a changing progress', async () => {
24
+ const el = await fixture(html `
25
+ <sp-progress-bar label="Changing value"></sp-progress-bar>
26
+ `);
27
+ await elementUpdated(el);
28
+ expect(el.hasAttribute('aria-valuenow')).to.be.true;
29
+ expect(el.getAttribute('aria-valuenow')).to.equal('0');
30
+ el.progress = 50;
31
+ await elementUpdated(el);
32
+ expect(el.hasAttribute('aria-valuenow')).to.be.true;
33
+ expect(el.getAttribute('aria-valuenow')).to.equal('50');
34
+ el.progress = 100;
35
+ await elementUpdated(el);
36
+ expect(el.hasAttribute('aria-valuenow')).to.be.true;
37
+ expect(el.getAttribute('aria-valuenow')).to.equal('100');
38
+ });
39
+ it('loads - [indeterminate]', async () => {
40
+ const el = await fixture(html `
41
+ <sp-progress-bar indeterminate label="Loading"></sp-progress-bar>
42
+ `);
43
+ await elementUpdated(el);
44
+ expect(el).to.not.be.undefined;
45
+ await expect(el).to.be.accessible();
46
+ });
47
+ it('accepts user `role`', async () => {
48
+ const el = await fixture(html `
49
+ <sp-progress-bar role="progressbar"></sp-progress-bar>
50
+ `);
51
+ await elementUpdated(el);
52
+ expect(el.getAttribute('role')).to.equal('progressbar');
53
+ });
54
+ it('returns to indeterminate', async () => {
55
+ const el = await fixture(html `
56
+ <sp-progress-bar
57
+ progress="50"
58
+ label="Sometimes indeterminate"
59
+ ></sp-progress-bar>
60
+ `);
61
+ await elementUpdated(el);
62
+ expect(el.hasAttribute('aria-valuenow')).to.be.true;
63
+ expect(el.getAttribute('aria-valuenow')).to.equal('50');
64
+ el.indeterminate = true;
65
+ await elementUpdated(el);
66
+ expect(el.hasAttribute('aria-valuenow')).to.be.false;
67
+ });
68
+ });
69
+ //# sourceMappingURL=progress-bar.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress-bar.test.js","sourceRoot":"","sources":["progress-bar.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,uBAAuB,CAAC;AAG/B,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,uC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C;QAEzB,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IACzD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","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 '../sp-progress-bar.js';\nimport { ProgressBar } from '..';\n\ndescribe('ProgressBar', () => {\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 role=\"progressbar\"></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});\n"]}