@spectrum-web-components/progress-circle 0.4.11 → 0.5.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.
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "kind": "javascript-module",
7
- "path": "sp-progress-circle.ts",
7
+ "path": "sp-progress-circle.js",
8
8
  "declarations": [],
9
9
  "exports": [
10
10
  {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "kind": "javascript-module",
22
- "path": "src/ProgressCircle.ts",
22
+ "path": "src/ProgressCircle.js",
23
23
  "declarations": [
24
24
  {
25
25
  "kind": "class",
@@ -141,7 +141,7 @@
141
141
  "name": "ProgressCircle",
142
142
  "declaration": {
143
143
  "name": "ProgressCircle",
144
- "module": "src/ProgressCircle.ts"
144
+ "module": "src/ProgressCircle.js"
145
145
  }
146
146
  }
147
147
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/progress-circle",
3
- "version": "0.4.11",
3
+ "version": "0.5.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,11 +20,24 @@
20
20
  "module": "src/index.js",
21
21
  "type": "module",
22
22
  "exports": {
23
- ".": "./src/index.js",
24
- "./src/*": "./src/*",
23
+ ".": {
24
+ "development": "./src/index.dev.js",
25
+ "default": "./src/index.js"
26
+ },
25
27
  "./package.json": "./package.json",
26
- "./sp-progress-circle": "./sp-progress-circle.js",
27
- "./sp-progress-circle.js": "./sp-progress-circle.js"
28
+ "./src/ProgressCircle.js": {
29
+ "development": "./src/ProgressCircle.dev.js",
30
+ "default": "./src/ProgressCircle.js"
31
+ },
32
+ "./src/index.js": {
33
+ "development": "./src/index.dev.js",
34
+ "default": "./src/index.js"
35
+ },
36
+ "./src/progress-circle.css.js": "./src/progress-circle.css.js",
37
+ "./sp-progress-circle.js": {
38
+ "development": "./sp-progress-circle.dev.js",
39
+ "default": "./sp-progress-circle.js"
40
+ }
28
41
  },
29
42
  "scripts": {
30
43
  "test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
@@ -44,7 +57,7 @@
44
57
  "lit-html"
45
58
  ],
46
59
  "dependencies": {
47
- "@spectrum-web-components/base": "^0.5.8",
60
+ "@spectrum-web-components/base": "^0.6.0",
48
61
  "tslib": "^2.0.0"
49
62
  },
50
63
  "devDependencies": {
@@ -55,5 +68,5 @@
55
68
  "sideEffects": [
56
69
  "./sp-*.js"
57
70
  ],
58
- "gitHead": "3be62133721efba844cd7032566a2c49ed6d9875"
71
+ "gitHead": "50cac779bbb0d6735c2061f1eceb86b9daf9b22b"
59
72
  }
@@ -0,0 +1,3 @@
1
+ import { ProgressCircle } from "./src/ProgressCircle.dev.js";
2
+ customElements.define("sp-progress-circle", ProgressCircle);
3
+ //# sourceMappingURL=sp-progress-circle.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-progress-circle.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 { ProgressCircle } from './src/ProgressCircle.dev.js'\n\ncustomElements.define('sp-progress-circle', ProgressCircle);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-progress-circle': ProgressCircle;\n }\n}\n"],
5
+ "mappings": "AAYA;AAEA,eAAe,OAAO,sBAAsB,cAAc;",
6
+ "names": []
7
+ }
@@ -1,14 +1,3 @@
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 { ProgressCircle } from './src/ProgressCircle.js';
13
- customElements.define('sp-progress-circle', ProgressCircle);
14
- //# sourceMappingURL=sp-progress-circle.js.map
1
+ import { ProgressCircle } from "./src/ProgressCircle.js";
2
+ customElements.define("sp-progress-circle", ProgressCircle);
3
+ //# sourceMappingURL=sp-progress-circle.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"sp-progress-circle.js","sourceRoot":"","sources":["sp-progress-circle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,cAAc,CAAC,MAAM,CAAC,oBAAoB,EAAE,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 { ProgressCircle } from './src/ProgressCircle.js';\n\ncustomElements.define('sp-progress-circle', ProgressCircle);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-progress-circle': ProgressCircle;\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-progress-circle.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 { ProgressCircle } from './src/ProgressCircle.js';\n\ncustomElements.define('sp-progress-circle', ProgressCircle);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-progress-circle': ProgressCircle;\n }\n}\n"],
5
+ "mappings": "AAYA;AAEA,eAAe,OAAO,sBAAsB,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,100 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html,
14
+ SizedMixin,
15
+ SpectrumElement
16
+ } from "@spectrum-web-components/base";
17
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
18
+ import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
19
+ import progressCircleStyles from "./progress-circle.css.js";
20
+ export class ProgressCircle extends SizedMixin(SpectrumElement, {
21
+ validSizes: ["s", "m", "l"]
22
+ }) {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.indeterminate = false;
26
+ this.label = "";
27
+ this.overBackground = false;
28
+ this.progress = 0;
29
+ }
30
+ static get styles() {
31
+ return [progressCircleStyles];
32
+ }
33
+ makeRotation(rotation) {
34
+ return this.indeterminate ? void 0 : `transform: rotate(${rotation}deg);`;
35
+ }
36
+ render() {
37
+ const styles = [
38
+ this.makeRotation(-180 + 180 / 50 * Math.min(this.progress, 50)),
39
+ this.makeRotation(-180 + 180 / 50 * Math.max(this.progress - 50, 0))
40
+ ];
41
+ const masks = ["Mask1", "Mask2"];
42
+ return html`
43
+ <div class="track"></div>
44
+ <div class="fills">
45
+ ${masks.map((mask, index) => html`
46
+ <div class="fill${mask}">
47
+ <div
48
+ class="fillSub${mask}"
49
+ style=${ifDefined(styles[index])}
50
+ >
51
+ <div class="fill"></div>
52
+ </div>
53
+ </div>
54
+ `)}
55
+ </div>
56
+ `;
57
+ }
58
+ firstUpdated(changes) {
59
+ super.firstUpdated(changes);
60
+ if (!this.hasAttribute("role")) {
61
+ this.setAttribute("role", "progressbar");
62
+ }
63
+ }
64
+ updated(changes) {
65
+ super.updated(changes);
66
+ if (!this.indeterminate && changes.has("progress")) {
67
+ this.setAttribute("aria-valuenow", "" + this.progress);
68
+ } else if (this.hasAttribute("aria-valuenow")) {
69
+ this.removeAttribute("aria-valuenow");
70
+ }
71
+ if (this.label && changes.has("label")) {
72
+ this.setAttribute("aria-label", this.label);
73
+ }
74
+ if (true) {
75
+ if (!this.label && !this.getAttribute("aria-label") && !this.getAttribute("aria-labelledby")) {
76
+ window.__swc.warn(this, "<sp-progress-circle> elements will not be accessible to screen readers without one of the following:", "https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#accessibility", {
77
+ type: "accessibility",
78
+ issues: [
79
+ 'value supplied to the "label" attribute, which will be displayed visually as part of the element, or',
80
+ 'value supplied to the "aria-label" attribute, which will only be provided to screen readers, or',
81
+ '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.'
82
+ ]
83
+ });
84
+ }
85
+ }
86
+ }
87
+ }
88
+ __decorateClass([
89
+ property({ type: Boolean, reflect: true })
90
+ ], ProgressCircle.prototype, "indeterminate", 2);
91
+ __decorateClass([
92
+ property({ type: String })
93
+ ], ProgressCircle.prototype, "label", 2);
94
+ __decorateClass([
95
+ property({ type: Boolean, reflect: true, attribute: "over-background" })
96
+ ], ProgressCircle.prototype, "overBackground", 2);
97
+ __decorateClass([
98
+ property({ type: Number })
99
+ ], ProgressCircle.prototype, "progress", 2);
100
+ //# sourceMappingURL=ProgressCircle.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["ProgressCircle.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';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport progressCircleStyles from './progress-circle.css.js';\n\n/**\n * @element sp-progress-circle\n */\nexport class ProgressCircle extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm', 'l'],\n}) {\n public static override get styles(): CSSResultArray {\n return [progressCircleStyles];\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: Number })\n public progress = 0;\n\n private makeRotation(rotation: number): string | undefined {\n return this.indeterminate\n ? undefined\n : `transform: rotate(${rotation}deg);`;\n }\n\n protected override render(): TemplateResult {\n const styles = [\n this.makeRotation(-180 + (180 / 50) * Math.min(this.progress, 50)),\n this.makeRotation(\n -180 + (180 / 50) * Math.max(this.progress - 50, 0)\n ),\n ];\n const masks = ['Mask1', 'Mask2'];\n return html`\n <div class=\"track\"></div>\n <div class=\"fills\">\n ${masks.map(\n (mask, index) => html`\n <div class=\"fill${mask}\">\n <div\n class=\"fillSub${mask}\"\n style=${ifDefined(styles[index])}\n >\n <div class=\"fill\"></div>\n </div>\n </div>\n `\n )}\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 (!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-circle> elements will not be accessible to screen readers without one of the following:',\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#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;AAAA;AAAA;AAAA;AAQA;AACA;AAEA;AAKO,aAAM,uBAAuB,WAAW,iBAAiB;AAAA,EAC5D,YAAY,CAAC,KAAK,KAAK,GAAG;AAC9B,CAAC,EAAE;AAAA,EAFI;AAAA;AAQI,yBAAgB;AAGhB,iBAAQ;AAGR,0BAAiB;AAGjB,oBAAW;AAAA;AAAA,aAdS,SAAyB;AAChD,WAAO,CAAC,oBAAoB;AAAA,EAChC;AAAA,EAcQ,aAAa,UAAsC;AACvD,WAAO,KAAK,gBACN,SACA,qBAAqB;AAAA,EAC/B;AAAA,EAEmB,SAAyB;AACxC,UAAM,SAAS;AAAA,MACX,KAAK,aAAa,OAAQ,MAAM,KAAM,KAAK,IAAI,KAAK,UAAU,EAAE,CAAC;AAAA,MACjE,KAAK,aACD,OAAQ,MAAM,KAAM,KAAK,IAAI,KAAK,WAAW,IAAI,CAAC,CACtD;AAAA,IACJ;AACA,UAAM,QAAQ,CAAC,SAAS,OAAO;AAC/B,WAAO;AAAA;AAAA;AAAA,kBAGG,MAAM,IACJ,CAAC,MAAM,UAAU;AAAA,0CACK;AAAA;AAAA,gDAEM;AAAA,wCACR,UAAU,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,qBAM/C;AAAA;AAAA;AAAA,EAGZ;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,QAAI,CAAC,KAAK,aAAa,MAAM,GAAG;AAC5B,WAAK,aAAa,QAAQ,aAAa;AAAA,IAC3C;AAAA,EACJ;AAAA,EAEmB,QAAQ,SAA+B;AACtD,UAAM,QAAQ,OAAO;AACrB,QAAI,CAAC,KAAK,iBAAiB,QAAQ,IAAI,UAAU,GAAG;AAChD,WAAK,aAAa,iBAAiB,KAAK,KAAK,QAAQ;AAAA,IACzD,WAAW,KAAK,aAAa,eAAe,GAAG;AAC3C,WAAK,gBAAgB,eAAe;AAAA,IACxC;AACA,QAAI,KAAK,SAAS,QAAQ,IAAI,OAAO,GAAG;AACpC,WAAK,aAAa,cAAc,KAAK,KAAK;AAAA,IAC9C;AAEA,QAAI,MAAoB;AACpB,UACI,CAAC,KAAK,SACN,CAAC,KAAK,aAAa,YAAY,KAC/B,CAAC,KAAK,aAAa,iBAAiB,GACtC;AACE,eAAO,MAAM,KACT,MACA,wGACA,kGACA;AAAA,UACI,MAAM;AAAA,UACN,QAAQ;AAAA,YACJ;AAAA,YACA;AAAA,YACA;AAAA,UACJ;AAAA,QACJ,CACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ;AApFW;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AARJ,eAQI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACnB,AAXJ,eAWI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,kBAAkB,CAAC;AAAA,GACjE,AAdJ,eAcI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACnB,AAjBJ,eAiBI;",
6
+ "names": []
7
+ }
@@ -1,50 +1,48 @@
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 { __decorate } from "tslib";
13
- import { html, SizedMixin, SpectrumElement, } from '@spectrum-web-components/base';
14
- import { property } from '@spectrum-web-components/base/src/decorators.js';
15
- import { ifDefined } from '@spectrum-web-components/base/src/directives.js';
16
- import progressCircleStyles from './progress-circle.css.js';
17
- /**
18
- * @element sp-progress-circle
19
- */
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html,
14
+ SizedMixin,
15
+ SpectrumElement
16
+ } from "@spectrum-web-components/base";
17
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
18
+ import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
19
+ import progressCircleStyles from "./progress-circle.css.js";
20
20
  export class ProgressCircle extends SizedMixin(SpectrumElement, {
21
- validSizes: ['s', 'm', 'l'],
21
+ validSizes: ["s", "m", "l"]
22
22
  }) {
23
- constructor() {
24
- super(...arguments);
25
- this.indeterminate = false;
26
- this.label = '';
27
- this.overBackground = false;
28
- this.progress = 0;
29
- }
30
- static get styles() {
31
- return [progressCircleStyles];
32
- }
33
- makeRotation(rotation) {
34
- return this.indeterminate
35
- ? undefined
36
- : `transform: rotate(${rotation}deg);`;
37
- }
38
- render() {
39
- const styles = [
40
- this.makeRotation(-180 + (180 / 50) * Math.min(this.progress, 50)),
41
- this.makeRotation(-180 + (180 / 50) * Math.max(this.progress - 50, 0)),
42
- ];
43
- const masks = ['Mask1', 'Mask2'];
44
- return html `
23
+ constructor() {
24
+ super(...arguments);
25
+ this.indeterminate = false;
26
+ this.label = "";
27
+ this.overBackground = false;
28
+ this.progress = 0;
29
+ }
30
+ static get styles() {
31
+ return [progressCircleStyles];
32
+ }
33
+ makeRotation(rotation) {
34
+ return this.indeterminate ? void 0 : `transform: rotate(${rotation}deg);`;
35
+ }
36
+ render() {
37
+ const styles = [
38
+ this.makeRotation(-180 + 180 / 50 * Math.min(this.progress, 50)),
39
+ this.makeRotation(-180 + 180 / 50 * Math.max(this.progress - 50, 0))
40
+ ];
41
+ const masks = ["Mask1", "Mask2"];
42
+ return html`
45
43
  <div class="track"></div>
46
44
  <div class="fills">
47
- ${masks.map((mask, index) => html `
45
+ ${masks.map((mask, index) => html`
48
46
  <div class="fill${mask}">
49
47
  <div
50
48
  class="fillSub${mask}"
@@ -56,36 +54,47 @@ export class ProgressCircle extends SizedMixin(SpectrumElement, {
56
54
  `)}
57
55
  </div>
58
56
  `;
57
+ }
58
+ firstUpdated(changes) {
59
+ super.firstUpdated(changes);
60
+ if (!this.hasAttribute("role")) {
61
+ this.setAttribute("role", "progressbar");
62
+ }
63
+ }
64
+ updated(changes) {
65
+ super.updated(changes);
66
+ if (!this.indeterminate && changes.has("progress")) {
67
+ this.setAttribute("aria-valuenow", "" + this.progress);
68
+ } else if (this.hasAttribute("aria-valuenow")) {
69
+ this.removeAttribute("aria-valuenow");
59
70
  }
60
- firstUpdated(changes) {
61
- super.firstUpdated(changes);
62
- if (!this.hasAttribute('role')) {
63
- this.setAttribute('role', 'progressbar');
64
- }
71
+ if (this.label && changes.has("label")) {
72
+ this.setAttribute("aria-label", this.label);
65
73
  }
66
- updated(changes) {
67
- super.updated(changes);
68
- if (!this.indeterminate && changes.has('progress')) {
69
- this.setAttribute('aria-valuenow', '' + this.progress);
70
- }
71
- else if (this.hasAttribute('aria-valuenow')) {
72
- this.removeAttribute('aria-valuenow');
73
- }
74
- if (this.label && changes.has('label')) {
75
- this.setAttribute('aria-label', this.label);
76
- }
74
+ if (false) {
75
+ if (!this.label && !this.getAttribute("aria-label") && !this.getAttribute("aria-labelledby")) {
76
+ window.__swc.warn(this, "<sp-progress-circle> elements will not be accessible to screen readers without one of the following:", "https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#accessibility", {
77
+ type: "accessibility",
78
+ issues: [
79
+ 'value supplied to the "label" attribute, which will be displayed visually as part of the element, or',
80
+ 'value supplied to the "aria-label" attribute, which will only be provided to screen readers, or',
81
+ '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.'
82
+ ]
83
+ });
84
+ }
77
85
  }
86
+ }
78
87
  }
79
- __decorate([
80
- property({ type: Boolean, reflect: true })
81
- ], ProgressCircle.prototype, "indeterminate", void 0);
82
- __decorate([
83
- property({ type: String })
84
- ], ProgressCircle.prototype, "label", void 0);
85
- __decorate([
86
- property({ type: Boolean, reflect: true, attribute: 'over-background' })
87
- ], ProgressCircle.prototype, "overBackground", void 0);
88
- __decorate([
89
- property({ type: Number })
90
- ], ProgressCircle.prototype, "progress", void 0);
91
- //# sourceMappingURL=ProgressCircle.js.map
88
+ __decorateClass([
89
+ property({ type: Boolean, reflect: true })
90
+ ], ProgressCircle.prototype, "indeterminate", 2);
91
+ __decorateClass([
92
+ property({ type: String })
93
+ ], ProgressCircle.prototype, "label", 2);
94
+ __decorateClass([
95
+ property({ type: Boolean, reflect: true, attribute: "over-background" })
96
+ ], ProgressCircle.prototype, "overBackground", 2);
97
+ __decorateClass([
98
+ property({ type: Number })
99
+ ], ProgressCircle.prototype, "progress", 2);
100
+ //# sourceMappingURL=ProgressCircle.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"ProgressCircle.js","sourceRoot":"","sources":["ProgressCircle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,EAEJ,UAAU,EACV,eAAe,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAE5E,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU,CAAC,eAAe,EAAE;IAC5D,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;CAC9B,CAAC;IAFF;;QAQW,kBAAa,GAAG,KAAK,CAAC;QAGtB,UAAK,GAAG,EAAE,CAAC;QAGX,mBAAc,GAAG,KAAK,CAAC;QAGvB,aAAQ,GAAG,CAAC,CAAC;IAqDxB,CAAC;IAnEU,MAAM,KAAc,MAAM;QAC7B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClC,CAAC;IAcO,YAAY,CAAC,QAAgB;QACjC,OAAO,IAAI,CAAC,aAAa;YACrB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,qBAAqB,QAAQ,OAAO,CAAC;IAC/C,CAAC;IAEkB,MAAM;QACrB,MAAM,MAAM,GAAG;YACX,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAClE,IAAI,CAAC,YAAY,CACb,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,GAAG,EAAE,EAAE,CAAC,CAAC,CACtD;SACJ,CAAC;QACF,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjC,OAAO,IAAI,CAAA;;;kBAGD,KAAK,CAAC,GAAG,CACP,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAA;0CACC,IAAI;;gDAEE,IAAI;wCACZ,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;;;;;qBAK3C,CACJ;;SAER,CAAC;IACN,CAAC;IAEkB,YAAY,CAAC,OAAuB;QACnD,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YAC5B,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;SAC5C;IACL,CAAC;IAEkB,OAAO,CAAC,OAAuB;QAC9C,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;YAChD,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC1D;aAAM,IAAI,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE;YAC3C,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;SACzC;QACD,IAAI,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACpC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;SAC/C;IACL,CAAC;CACJ;AA9DG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qDACd;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACT;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;sDAC3C;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDACP","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';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport progressCircleStyles from './progress-circle.css.js';\n\n/**\n * @element sp-progress-circle\n */\nexport class ProgressCircle extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm', 'l'],\n}) {\n public static override get styles(): CSSResultArray {\n return [progressCircleStyles];\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: Number })\n public progress = 0;\n\n private makeRotation(rotation: number): string | undefined {\n return this.indeterminate\n ? undefined\n : `transform: rotate(${rotation}deg);`;\n }\n\n protected override render(): TemplateResult {\n const styles = [\n this.makeRotation(-180 + (180 / 50) * Math.min(this.progress, 50)),\n this.makeRotation(\n -180 + (180 / 50) * Math.max(this.progress - 50, 0)\n ),\n ];\n const masks = ['Mask1', 'Mask2'];\n return html`\n <div class=\"track\"></div>\n <div class=\"fills\">\n ${masks.map(\n (mask, index) => html`\n <div class=\"fill${mask}\">\n <div\n class=\"fillSub${mask}\"\n style=${ifDefined(styles[index])}\n >\n <div class=\"fill\"></div>\n </div>\n </div>\n `\n )}\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 (!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}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["ProgressCircle.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';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport progressCircleStyles from './progress-circle.css.js';\n\n/**\n * @element sp-progress-circle\n */\nexport class ProgressCircle extends SizedMixin(SpectrumElement, {\n validSizes: ['s', 'm', 'l'],\n}) {\n public static override get styles(): CSSResultArray {\n return [progressCircleStyles];\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: Number })\n public progress = 0;\n\n private makeRotation(rotation: number): string | undefined {\n return this.indeterminate\n ? undefined\n : `transform: rotate(${rotation}deg);`;\n }\n\n protected override render(): TemplateResult {\n const styles = [\n this.makeRotation(-180 + (180 / 50) * Math.min(this.progress, 50)),\n this.makeRotation(\n -180 + (180 / 50) * Math.max(this.progress - 50, 0)\n ),\n ];\n const masks = ['Mask1', 'Mask2'];\n return html`\n <div class=\"track\"></div>\n <div class=\"fills\">\n ${masks.map(\n (mask, index) => html`\n <div class=\"fill${mask}\">\n <div\n class=\"fillSub${mask}\"\n style=${ifDefined(styles[index])}\n >\n <div class=\"fill\"></div>\n </div>\n </div>\n `\n )}\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 (!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-circle> elements will not be accessible to screen readers without one of the following:',\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#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;AAAA;AAAA;AAAA;AAQA;AACA;AAEA;AAKO,aAAM,uBAAuB,WAAW,iBAAiB;AAAA,EAC5D,YAAY,CAAC,KAAK,KAAK,GAAG;AAC9B,CAAC,EAAE;AAAA,EAFI;AAAA;AAQI,yBAAgB;AAGhB,iBAAQ;AAGR,0BAAiB;AAGjB,oBAAW;AAAA;AAAA,aAdS,SAAyB;AAChD,WAAO,CAAC,oBAAoB;AAAA,EAChC;AAAA,EAcQ,aAAa,UAAsC;AACvD,WAAO,KAAK,gBACN,SACA,qBAAqB;AAAA,EAC/B;AAAA,EAEmB,SAAyB;AACxC,UAAM,SAAS;AAAA,MACX,KAAK,aAAa,OAAQ,MAAM,KAAM,KAAK,IAAI,KAAK,UAAU,EAAE,CAAC;AAAA,MACjE,KAAK,aACD,OAAQ,MAAM,KAAM,KAAK,IAAI,KAAK,WAAW,IAAI,CAAC,CACtD;AAAA,IACJ;AACA,UAAM,QAAQ,CAAC,SAAS,OAAO;AAC/B,WAAO;AAAA;AAAA;AAAA,kBAGG,MAAM,IACJ,CAAC,MAAM,UAAU;AAAA,0CACK;AAAA;AAAA,gDAEM;AAAA,wCACR,UAAU,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,qBAM/C;AAAA;AAAA;AAAA,EAGZ;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,QAAI,CAAC,KAAK,aAAa,MAAM,GAAG;AAC5B,WAAK,aAAa,QAAQ,aAAa;AAAA,IAC3C;AAAA,EACJ;AAAA,EAEmB,QAAQ,SAA+B;AACtD,UAAM,QAAQ,OAAO;AACrB,QAAI,CAAC,KAAK,iBAAiB,QAAQ,IAAI,UAAU,GAAG;AAChD,WAAK,aAAa,iBAAiB,KAAK,KAAK,QAAQ;AAAA,IACzD,WAAW,KAAK,aAAa,eAAe,GAAG;AAC3C,WAAK,gBAAgB,eAAe;AAAA,IACxC;AACA,QAAI,KAAK,SAAS,QAAQ,IAAI,OAAO,GAAG;AACpC,WAAK,aAAa,cAAc,KAAK,KAAK;AAAA,IAC9C;AAEA,QAAI,OAAoB;AACpB,UACI,CAAC,KAAK,SACN,CAAC,KAAK,aAAa,YAAY,KAC/B,CAAC,KAAK,aAAa,iBAAiB,GACtC;AACE,eAAO,MAAM,KACT,MACA,wGACA,kGACA;AAAA,UACI,MAAM;AAAA,UACN,QAAQ;AAAA,YACJ;AAAA,YACA;AAAA,YACA;AAAA,UACJ;AAAA,QACJ,CACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ;AApFW;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GACnC,AARJ,eAQI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACnB,AAXJ,eAWI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,kBAAkB,CAAC;AAAA,GACjE,AAdJ,eAcI;AAGA;AAAA,EADP,AAAC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GACnB,AAjBJ,eAiBI;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./ProgressCircle.dev.js";
2
+ //# sourceMappingURL=index.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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\nexport * from './ProgressCircle.dev.js'\n"],
5
+ "mappings": "AAYA;",
6
+ "names": []
7
+ }
package/src/index.js CHANGED
@@ -1,13 +1,2 @@
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
- export * from './ProgressCircle.js';
13
- //# sourceMappingURL=index.js.map
1
+ export * from "./ProgressCircle.js";
2
+ //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,cAAc,qBAAqB,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\nexport * from './ProgressCircle.js';\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["index.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\nexport * from './ProgressCircle.js';\n"],
5
+ "mappings": "AAYA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,72 @@
1
+ import { css } from "@spectrum-web-components/base";
2
+ const styles = css`
3
+ .fill-submask-2{animation:spectrum-fill-mask-2 1s linear infinite}@keyframes spectrum-fill-mask-1{0%{transform:rotate(90deg)}1.69%{transform:rotate(72.3deg)}3.39%{transform:rotate(55.5deg)}5.08%{transform:rotate(40.3deg)}6.78%{transform:rotate(25deg)}8.47%{transform:rotate(10.6deg)}10.17%{transform:rotate(0deg)}11.86%{transform:rotate(0deg)}13.56%{transform:rotate(0deg)}15.25%{transform:rotate(0deg)}16.95%{transform:rotate(0deg)}18.64%{transform:rotate(0deg)}20.34%{transform:rotate(0deg)}22.03%{transform:rotate(0deg)}23.73%{transform:rotate(0deg)}25.42%{transform:rotate(0deg)}27.12%{transform:rotate(0deg)}28.81%{transform:rotate(0deg)}30.51%{transform:rotate(0deg)}32.2%{transform:rotate(0deg)}33.9%{transform:rotate(0deg)}35.59%{transform:rotate(0deg)}37.29%{transform:rotate(0deg)}38.98%{transform:rotate(0deg)}40.68%{transform:rotate(0deg)}42.37%{transform:rotate(5.3deg)}44.07%{transform:rotate(13.4deg)}45.76%{transform:rotate(20.6deg)}47.46%{transform:rotate(29deg)}49.15%{transform:rotate(36.5deg)}50.85%{transform:rotate(42.6deg)}52.54%{transform:rotate(48.8deg)}54.24%{transform:rotate(54.2deg)}55.93%{transform:rotate(59.4deg)}57.63%{transform:rotate(63.2deg)}59.32%{transform:rotate(67.2deg)}61.02%{transform:rotate(70.8deg)}62.71%{transform:rotate(73.8deg)}64.41%{transform:rotate(76.2deg)}66.1%{transform:rotate(78.7deg)}67.8%{transform:rotate(80.6deg)}69.49%{transform:rotate(82.6deg)}71.19%{transform:rotate(83.7deg)}72.88%{transform:rotate(85deg)}74.58%{transform:rotate(86.3deg)}76.27%{transform:rotate(87deg)}77.97%{transform:rotate(87.7deg)}79.66%{transform:rotate(88.3deg)}81.36%{transform:rotate(88.6deg)}83.05%{transform:rotate(89.2deg)}84.75%{transform:rotate(89.2deg)}86.44%{transform:rotate(89.5deg)}88.14%{transform:rotate(89.9deg)}89.83%{transform:rotate(89.7deg)}91.53%{transform:rotate(90.1deg)}93.22%{transform:rotate(90.2deg)}94.92%{transform:rotate(90.1deg)}96.61%{transform:rotate(90deg)}98.31%{transform:rotate(89.8deg)}to{transform:rotate(90deg)}}@keyframes spectrum-fill-mask-2{0%{transform:rotate(180deg)}1.69%{transform:rotate(180deg)}3.39%{transform:rotate(180deg)}5.08%{transform:rotate(180deg)}6.78%{transform:rotate(180deg)}8.47%{transform:rotate(180deg)}10.17%{transform:rotate(179.2deg)}11.86%{transform:rotate(164deg)}13.56%{transform:rotate(151.8deg)}15.25%{transform:rotate(140.8deg)}16.95%{transform:rotate(130.3deg)}18.64%{transform:rotate(120.4deg)}20.34%{transform:rotate(110.8deg)}22.03%{transform:rotate(101.6deg)}23.73%{transform:rotate(93.5deg)}25.42%{transform:rotate(85.4deg)}27.12%{transform:rotate(78.1deg)}28.81%{transform:rotate(71.2deg)}30.51%{transform:rotate(89.1deg)}32.2%{transform:rotate(105.5deg)}33.9%{transform:rotate(121.3deg)}35.59%{transform:rotate(135.5deg)}37.29%{transform:rotate(148.4deg)}38.98%{transform:rotate(161deg)}40.68%{transform:rotate(173.5deg)}42.37%{transform:rotate(180deg)}44.07%{transform:rotate(180deg)}45.76%{transform:rotate(180deg)}47.46%{transform:rotate(180deg)}49.15%{transform:rotate(180deg)}50.85%{transform:rotate(180deg)}52.54%{transform:rotate(180deg)}54.24%{transform:rotate(180deg)}55.93%{transform:rotate(180deg)}57.63%{transform:rotate(180deg)}59.32%{transform:rotate(180deg)}61.02%{transform:rotate(180deg)}62.71%{transform:rotate(180deg)}64.41%{transform:rotate(180deg)}66.1%{transform:rotate(180deg)}67.8%{transform:rotate(180deg)}69.49%{transform:rotate(180deg)}71.19%{transform:rotate(180deg)}72.88%{transform:rotate(180deg)}74.58%{transform:rotate(180deg)}76.27%{transform:rotate(180deg)}77.97%{transform:rotate(180deg)}79.66%{transform:rotate(180deg)}81.36%{transform:rotate(180deg)}83.05%{transform:rotate(180deg)}84.75%{transform:rotate(180deg)}86.44%{transform:rotate(180deg)}88.14%{transform:rotate(180deg)}89.83%{transform:rotate(180deg)}91.53%{transform:rotate(180deg)}93.22%{transform:rotate(180deg)}94.92%{transform:rotate(180deg)}96.61%{transform:rotate(180deg)}98.31%{transform:rotate(180deg)}to{transform:rotate(180deg)}}@keyframes spectrum-fills-rotate{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}:host{direction:ltr;display:inline-block;height:var(
4
+ --spectrum-progresscircle-m-height,var(--spectrum-global-dimension-size-400)
5
+ );position:relative;transform:translateZ(0);width:var(
6
+ --spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)
7
+ )}.track{border-radius:var(
8
+ --spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)
9
+ );border-style:solid;border-width:var(--spectrum-progresscircle-m-border-size);box-sizing:border-box;height:var(
10
+ --spectrum-progresscircle-m-height,var(--spectrum-global-dimension-size-400)
11
+ );width:var(
12
+ --spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)
13
+ )}:host([dir=ltr]) .fills{left:0}:host([dir=rtl]) .fills{right:0}.fills{height:100%;position:absolute;top:0;width:100%}.fill{border-radius:var(
14
+ --spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)
15
+ );border-style:solid;border-width:var(--spectrum-progresscircle-m-border-size);box-sizing:border-box;height:var(
16
+ --spectrum-progresscircle-m-height,var(--spectrum-global-dimension-size-400)
17
+ );width:var(
18
+ --spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)
19
+ )}.fillMask1,.fillMask2{height:100%;overflow:hidden;position:absolute;transform:rotate(180deg);transform-origin:100% center;width:50%}.fillSubMask1,.fillSubMask2{height:100%;overflow:hidden;transform:rotate(-180deg);transform-origin:100% center;width:100%}.fillMask2{transform:rotate(0deg)}:host([size=s]){height:var(
20
+ --spectrum-progresscircle-s-height,var(--spectrum-global-dimension-size-200)
21
+ );width:var(
22
+ --spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)
23
+ )}:host([size=s]) .track{border-radius:var(
24
+ --spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)
25
+ );border-style:solid;border-width:var(--spectrum-progresscircle-s-border-size);height:var(
26
+ --spectrum-progresscircle-s-height,var(--spectrum-global-dimension-size-200)
27
+ );width:var(
28
+ --spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)
29
+ )}:host([size=s]) .fill{border-radius:var(
30
+ --spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)
31
+ );border-style:solid;border-width:var(--spectrum-progresscircle-s-border-size);height:var(
32
+ --spectrum-progresscircle-s-height,var(--spectrum-global-dimension-size-200)
33
+ );width:var(
34
+ --spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)
35
+ )}:host([size=l]){height:var(
36
+ --spectrum-progresscircle-l-height,var(--spectrum-global-dimension-size-800)
37
+ );width:var(
38
+ --spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)
39
+ )}:host([size=l]) .track{border-radius:var(
40
+ --spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)
41
+ );border-style:solid;border-width:var(
42
+ --spectrum-progresscircle-l-border-size,var(--spectrum-global-dimension-size-50)
43
+ );height:var(
44
+ --spectrum-progresscircle-l-height,var(--spectrum-global-dimension-size-800)
45
+ );width:var(
46
+ --spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)
47
+ )}:host([size=l]) .fill{border-radius:var(
48
+ --spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)
49
+ );border-style:solid;border-width:var(
50
+ --spectrum-progresscircle-l-border-size,var(--spectrum-global-dimension-size-50)
51
+ );height:var(
52
+ --spectrum-progresscircle-l-height,var(--spectrum-global-dimension-size-800)
53
+ );width:var(
54
+ --spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)
55
+ )}:host([indeterminate]) .fills{animation:spectrum-fills-rotate 1s cubic-bezier(.25,.78,.48,.89) infinite;transform:translateZ(0);transform-origin:center;will-change:transform}:host([indeterminate]) .fillSubMask1{animation:spectrum-fill-mask-1 1s linear infinite;transform:translateZ(0);will-change:transform}:host([indeterminate]) .fillSubMask2{animation:spectrum-fill-mask-2 1s linear infinite;transform:translateZ(0);will-change:transform}.track{border-color:var(
56
+ --spectrum-progresscircle-m-track-color,var(--spectrum-alias-track-color-default)
57
+ )}.fill{border-color:var(
58
+ --spectrum-progresscircle-m-track-fill-color,var(--spectrum-semantic-informative-color-default)
59
+ )}:host([over-background]) .track{border-color:var(
60
+ --spectrum-progresscircle-m-over-background-track-color
61
+ )}:host([over-background]) .fill{border-color:var(
62
+ --spectrum-progresscircle-m-over-background-track-fill-color
63
+ )}:host([indeterminate][over-background]) .track{border-color:var(
64
+ --spectrum-progresscircle-m-over-background-track-color
65
+ )}:host([indeterminate][over-background]) .fill{border-color:var(
66
+ --spectrum-progresscircle-m-over-background-track-fill-color
67
+ )}@media (forced-colors:active){.fill{--spectrum-progresscircle-m-track-fill-color:Highlight}}:host{--spectrum-progresscircle-m-over-background-track-fill-color:var(
68
+ --spectrum-alias-track-fill-color-overbackground
69
+ )}
70
+ `;
71
+ export default styles;
72
+ //# sourceMappingURL=progress-circle.css.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["progress-circle.css.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2022 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*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n.fill-submask-2{animation:spectrum-fill-mask-2 1s linear infinite}@keyframes spectrum-fill-mask-1{0%{transform:rotate(90deg)}1.69%{transform:rotate(72.3deg)}3.39%{transform:rotate(55.5deg)}5.08%{transform:rotate(40.3deg)}6.78%{transform:rotate(25deg)}8.47%{transform:rotate(10.6deg)}10.17%{transform:rotate(0deg)}11.86%{transform:rotate(0deg)}13.56%{transform:rotate(0deg)}15.25%{transform:rotate(0deg)}16.95%{transform:rotate(0deg)}18.64%{transform:rotate(0deg)}20.34%{transform:rotate(0deg)}22.03%{transform:rotate(0deg)}23.73%{transform:rotate(0deg)}25.42%{transform:rotate(0deg)}27.12%{transform:rotate(0deg)}28.81%{transform:rotate(0deg)}30.51%{transform:rotate(0deg)}32.2%{transform:rotate(0deg)}33.9%{transform:rotate(0deg)}35.59%{transform:rotate(0deg)}37.29%{transform:rotate(0deg)}38.98%{transform:rotate(0deg)}40.68%{transform:rotate(0deg)}42.37%{transform:rotate(5.3deg)}44.07%{transform:rotate(13.4deg)}45.76%{transform:rotate(20.6deg)}47.46%{transform:rotate(29deg)}49.15%{transform:rotate(36.5deg)}50.85%{transform:rotate(42.6deg)}52.54%{transform:rotate(48.8deg)}54.24%{transform:rotate(54.2deg)}55.93%{transform:rotate(59.4deg)}57.63%{transform:rotate(63.2deg)}59.32%{transform:rotate(67.2deg)}61.02%{transform:rotate(70.8deg)}62.71%{transform:rotate(73.8deg)}64.41%{transform:rotate(76.2deg)}66.1%{transform:rotate(78.7deg)}67.8%{transform:rotate(80.6deg)}69.49%{transform:rotate(82.6deg)}71.19%{transform:rotate(83.7deg)}72.88%{transform:rotate(85deg)}74.58%{transform:rotate(86.3deg)}76.27%{transform:rotate(87deg)}77.97%{transform:rotate(87.7deg)}79.66%{transform:rotate(88.3deg)}81.36%{transform:rotate(88.6deg)}83.05%{transform:rotate(89.2deg)}84.75%{transform:rotate(89.2deg)}86.44%{transform:rotate(89.5deg)}88.14%{transform:rotate(89.9deg)}89.83%{transform:rotate(89.7deg)}91.53%{transform:rotate(90.1deg)}93.22%{transform:rotate(90.2deg)}94.92%{transform:rotate(90.1deg)}96.61%{transform:rotate(90deg)}98.31%{transform:rotate(89.8deg)}to{transform:rotate(90deg)}}@keyframes spectrum-fill-mask-2{0%{transform:rotate(180deg)}1.69%{transform:rotate(180deg)}3.39%{transform:rotate(180deg)}5.08%{transform:rotate(180deg)}6.78%{transform:rotate(180deg)}8.47%{transform:rotate(180deg)}10.17%{transform:rotate(179.2deg)}11.86%{transform:rotate(164deg)}13.56%{transform:rotate(151.8deg)}15.25%{transform:rotate(140.8deg)}16.95%{transform:rotate(130.3deg)}18.64%{transform:rotate(120.4deg)}20.34%{transform:rotate(110.8deg)}22.03%{transform:rotate(101.6deg)}23.73%{transform:rotate(93.5deg)}25.42%{transform:rotate(85.4deg)}27.12%{transform:rotate(78.1deg)}28.81%{transform:rotate(71.2deg)}30.51%{transform:rotate(89.1deg)}32.2%{transform:rotate(105.5deg)}33.9%{transform:rotate(121.3deg)}35.59%{transform:rotate(135.5deg)}37.29%{transform:rotate(148.4deg)}38.98%{transform:rotate(161deg)}40.68%{transform:rotate(173.5deg)}42.37%{transform:rotate(180deg)}44.07%{transform:rotate(180deg)}45.76%{transform:rotate(180deg)}47.46%{transform:rotate(180deg)}49.15%{transform:rotate(180deg)}50.85%{transform:rotate(180deg)}52.54%{transform:rotate(180deg)}54.24%{transform:rotate(180deg)}55.93%{transform:rotate(180deg)}57.63%{transform:rotate(180deg)}59.32%{transform:rotate(180deg)}61.02%{transform:rotate(180deg)}62.71%{transform:rotate(180deg)}64.41%{transform:rotate(180deg)}66.1%{transform:rotate(180deg)}67.8%{transform:rotate(180deg)}69.49%{transform:rotate(180deg)}71.19%{transform:rotate(180deg)}72.88%{transform:rotate(180deg)}74.58%{transform:rotate(180deg)}76.27%{transform:rotate(180deg)}77.97%{transform:rotate(180deg)}79.66%{transform:rotate(180deg)}81.36%{transform:rotate(180deg)}83.05%{transform:rotate(180deg)}84.75%{transform:rotate(180deg)}86.44%{transform:rotate(180deg)}88.14%{transform:rotate(180deg)}89.83%{transform:rotate(180deg)}91.53%{transform:rotate(180deg)}93.22%{transform:rotate(180deg)}94.92%{transform:rotate(180deg)}96.61%{transform:rotate(180deg)}98.31%{transform:rotate(180deg)}to{transform:rotate(180deg)}}@keyframes spectrum-fills-rotate{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}:host{direction:ltr;display:inline-block;height:var(\n--spectrum-progresscircle-m-height,var(--spectrum-global-dimension-size-400)\n);position:relative;transform:translateZ(0);width:var(\n--spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)\n)}.track{border-radius:var(\n--spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)\n);border-style:solid;border-width:var(--spectrum-progresscircle-m-border-size);box-sizing:border-box;height:var(\n--spectrum-progresscircle-m-height,var(--spectrum-global-dimension-size-400)\n);width:var(\n--spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)\n)}:host([dir=ltr]) .fills{left:0}:host([dir=rtl]) .fills{right:0}.fills{height:100%;position:absolute;top:0;width:100%}.fill{border-radius:var(\n--spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)\n);border-style:solid;border-width:var(--spectrum-progresscircle-m-border-size);box-sizing:border-box;height:var(\n--spectrum-progresscircle-m-height,var(--spectrum-global-dimension-size-400)\n);width:var(\n--spectrum-progresscircle-m-width,var(--spectrum-global-dimension-size-400)\n)}.fillMask1,.fillMask2{height:100%;overflow:hidden;position:absolute;transform:rotate(180deg);transform-origin:100% center;width:50%}.fillSubMask1,.fillSubMask2{height:100%;overflow:hidden;transform:rotate(-180deg);transform-origin:100% center;width:100%}.fillMask2{transform:rotate(0deg)}:host([size=s]){height:var(\n--spectrum-progresscircle-s-height,var(--spectrum-global-dimension-size-200)\n);width:var(\n--spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)\n)}:host([size=s]) .track{border-radius:var(\n--spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)\n);border-style:solid;border-width:var(--spectrum-progresscircle-s-border-size);height:var(\n--spectrum-progresscircle-s-height,var(--spectrum-global-dimension-size-200)\n);width:var(\n--spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)\n)}:host([size=s]) .fill{border-radius:var(\n--spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)\n);border-style:solid;border-width:var(--spectrum-progresscircle-s-border-size);height:var(\n--spectrum-progresscircle-s-height,var(--spectrum-global-dimension-size-200)\n);width:var(\n--spectrum-progresscircle-s-width,var(--spectrum-global-dimension-size-200)\n)}:host([size=l]){height:var(\n--spectrum-progresscircle-l-height,var(--spectrum-global-dimension-size-800)\n);width:var(\n--spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)\n)}:host([size=l]) .track{border-radius:var(\n--spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)\n);border-style:solid;border-width:var(\n--spectrum-progresscircle-l-border-size,var(--spectrum-global-dimension-size-50)\n);height:var(\n--spectrum-progresscircle-l-height,var(--spectrum-global-dimension-size-800)\n);width:var(\n--spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)\n)}:host([size=l]) .fill{border-radius:var(\n--spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)\n);border-style:solid;border-width:var(\n--spectrum-progresscircle-l-border-size,var(--spectrum-global-dimension-size-50)\n);height:var(\n--spectrum-progresscircle-l-height,var(--spectrum-global-dimension-size-800)\n);width:var(\n--spectrum-progresscircle-l-width,var(--spectrum-global-dimension-size-800)\n)}:host([indeterminate]) .fills{animation:spectrum-fills-rotate 1s cubic-bezier(.25,.78,.48,.89) infinite;transform:translateZ(0);transform-origin:center;will-change:transform}:host([indeterminate]) .fillSubMask1{animation:spectrum-fill-mask-1 1s linear infinite;transform:translateZ(0);will-change:transform}:host([indeterminate]) .fillSubMask2{animation:spectrum-fill-mask-2 1s linear infinite;transform:translateZ(0);will-change:transform}.track{border-color:var(\n--spectrum-progresscircle-m-track-color,var(--spectrum-alias-track-color-default)\n)}.fill{border-color:var(\n--spectrum-progresscircle-m-track-fill-color,var(--spectrum-semantic-informative-color-default)\n)}:host([over-background]) .track{border-color:var(\n--spectrum-progresscircle-m-over-background-track-color\n)}:host([over-background]) .fill{border-color:var(\n--spectrum-progresscircle-m-over-background-track-fill-color\n)}:host([indeterminate][over-background]) .track{border-color:var(\n--spectrum-progresscircle-m-over-background-track-color\n)}:host([indeterminate][over-background]) .fill{border-color:var(\n--spectrum-progresscircle-m-over-background-track-fill-color\n)}@media (forced-colors:active){.fill{--spectrum-progresscircle-m-track-fill-color:Highlight}}:host{--spectrum-progresscircle-m-over-background-track-fill-color:var(\n--spectrum-alias-track-fill-color-overbackground\n)}\n`;\nexport default styles;"],
5
+ "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqEf,eAAe;",
6
+ "names": []
7
+ }