@spectrum-web-components/progress-circle 1.0.0-rc.0 → 1.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,9 +51,9 @@ An `<sp-progress-circle>` is used to visually show the progression of a system o
51
51
  </div>
52
52
  ```
53
53
 
54
- ### Static
54
+ ### Static color
55
55
 
56
- If you display your `<sp-progress-cicle>` element over the top of other content, e.g. an image or an alternate background color, it may become appropariate to update the colors with which the circle and loading progress indicator are delivered. To do this, leverage the `static` attribute with the value of `white` to ensure the content of your page is being delivered accessibly.
56
+ If you display your `<sp-progress-cicle>` element over the top of other content, e.g. an image or an alternate background color, it may become appropariate to update the colors with which the circle and loading progress indicator are delivered. To do this, leverage the `static-color` attribute with the value of `white` to ensure the content of your page is being delivered accessibly.
57
57
 
58
58
  ```html
59
59
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/progress-circle",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.0-rc.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -58,8 +58,8 @@
58
58
  "lit-html"
59
59
  ],
60
60
  "dependencies": {
61
- "@spectrum-web-components/base": "^1.0.0-rc.0",
62
- "@spectrum-web-components/shared": "^1.0.0-rc.0"
61
+ "@spectrum-web-components/base": "^1.0.0-rc.2",
62
+ "@spectrum-web-components/shared": "^1.0.0-rc.2"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@spectrum-css/progresscircle": "^4.0.0-s2-foundations.15"
@@ -70,5 +70,5 @@
70
70
  "./sp-*.js",
71
71
  "./**/*.dev.js"
72
72
  ],
73
- "gitHead": "24a3e0d1d0ead33c41454223b290a258b75d3111"
73
+ "gitHead": "45ad539f37a4325a83d02253ea9135c90e1b8b3d"
74
74
  }
@@ -10,19 +10,10 @@ export declare class ProgressCircle extends ProgressCircle_base {
10
10
  static get styles(): CSSResultArray;
11
11
  indeterminate: boolean;
12
12
  label: string;
13
- /**
14
- * @deprecated Use `staticColor` instead.
15
- */
16
- overBackground: boolean;
17
- /**
18
- * @deprecated Use `staticColor` instead.
19
- */
20
- static?: 'white';
21
13
  staticColor?: 'white';
22
14
  progress: number;
23
15
  private slotEl;
24
16
  private makeRotation;
25
- protected willUpdate(changes: PropertyValues<this>): void;
26
17
  protected render(): TemplateResult;
27
18
  protected handleSlotchange(): void;
28
19
  protected firstUpdated(changes: PropertyValues): void;
@@ -28,7 +28,6 @@ export class ProgressCircle extends SizedMixin(SpectrumElement, {
28
28
  super(...arguments);
29
29
  this.indeterminate = false;
30
30
  this.label = "";
31
- this.overBackground = false;
32
31
  this.progress = 0;
33
32
  }
34
33
  static get styles() {
@@ -37,34 +36,6 @@ export class ProgressCircle extends SizedMixin(SpectrumElement, {
37
36
  makeRotation(rotation) {
38
37
  return this.indeterminate ? void 0 : `transform: rotate(${rotation}deg);`;
39
38
  }
40
- willUpdate(changes) {
41
- if (changes.has("overBackground")) {
42
- this.staticColor = this.overBackground ? "white" : this.staticColor || void 0;
43
- if (true) {
44
- if (this.overBackground) {
45
- window.__swc.warn(
46
- this,
47
- `<${this.localName}> element will stop accepting the "over-background" attribute, and its related "overBackground" property in a future release. Use the "static-color" attribute with a value of "white" instead.`,
48
- "https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#static",
49
- { level: "deprecation" }
50
- );
51
- }
52
- }
53
- }
54
- if (changes.has("static")) {
55
- this.staticColor = this.static;
56
- if (true) {
57
- if (this.static) {
58
- window.__swc.warn(
59
- this,
60
- `<${this.localName}> element will stop accepting the "static" attribute. Use the "static-color" attribute with a value of "white" instead.`,
61
- "https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#static",
62
- { level: "deprecation" }
63
- );
64
- }
65
- }
66
- }
67
- }
68
39
  render() {
69
40
  const styles = [
70
41
  this.makeRotation(-180 + 180 / 50 * Math.min(this.progress, 50)),
@@ -144,12 +115,6 @@ __decorateClass([
144
115
  __decorateClass([
145
116
  property({ type: String })
146
117
  ], ProgressCircle.prototype, "label", 2);
147
- __decorateClass([
148
- property({ type: Boolean, reflect: true, attribute: "over-background" })
149
- ], ProgressCircle.prototype, "overBackground", 2);
150
- __decorateClass([
151
- property({ reflect: true })
152
- ], ProgressCircle.prototype, "static", 2);
153
118
  __decorateClass([
154
119
  property({ reflect: true, attribute: "static-color" })
155
120
  ], ProgressCircle.prototype, "staticColor", 2);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { getLabelFromSlot } from '@spectrum-web-components/shared/src/get-label-from-slot.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 /**\n * @deprecated Use `staticColor` instead.\n */\n @property({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = false;\n\n /**\n * @deprecated Use `staticColor` instead.\n */\n @property({ reflect: true })\n public static?: 'white';\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white';\n\n @property({ type: Number })\n public progress = 0;\n\n @query('slot')\n private slotEl!: HTMLSlotElement;\n\n private makeRotation(rotation: number): string | undefined {\n return this.indeterminate\n ? undefined\n : `transform: rotate(${rotation}deg);`;\n }\n\n protected override willUpdate(changes: PropertyValues<this>): void {\n if (changes.has('overBackground')) {\n // Apply \"staticColor\" from \"overBackground\", preferring \"staticColor\",\n // until the deprecation period is over.\n this.staticColor = this.overBackground\n ? 'white'\n : this.staticColor || undefined;\n if (window.__swc.DEBUG) {\n if (this.overBackground) {\n window.__swc.warn(\n this,\n `<${this.localName}> element will stop accepting the \"over-background\" attribute, and its related \"overBackground\" property in a future release. Use the \"static-color\" attribute with a value of \"white\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#static',\n { level: 'deprecation' }\n );\n }\n }\n }\n if (changes.has('static')) {\n // Apply \"staticColor\" from \"static\", preferring \"staticColor\",\n // until the deprecation period is over.\n this.staticColor = this.static;\n if (window.__swc.DEBUG) {\n if (this.static) {\n window.__swc.warn(\n this,\n `<${this.localName}> element will stop accepting the \"static\" attribute. Use the \"static-color\" attribute with a value of \"white\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#static',\n { level: 'deprecation' }\n );\n }\n }\n }\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 <slot @slotchange=${this.handleSlotchange}></slot>\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 handleSlotchange(): void {\n const labelFromSlot = getLabelFromSlot(this.label, this.slotEl);\n if (labelFromSlot) {\n this.label = labelFromSlot;\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 (changes.has('label')) {\n if (this.label.length) {\n this.setAttribute('aria-label', this.label);\n } else if (\n changes.get('label') === this.getAttribute('aria-label')\n ) {\n this.removeAttribute('aria-label');\n }\n }\n\n if (window.__swc.DEBUG) {\n if (\n !this.label &&\n !this.getAttribute('aria-label') &&\n !this.getAttribute('aria-labelledby') &&\n !this.slotEl.assignedNodes().length\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-circle> elements need one of the following to be accessible:',\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 'text content supplied directly to the <sp-progress-circle> 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;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAE1B,OAAO,0BAA0B;AAK1B,aAAM,uBAAuB,WAAW,iBAAiB;AAAA,EAC5D,YAAY,CAAC,KAAK,KAAK,GAAG;AAC9B,CAAC,EAAE;AAAA,EAFI;AAAA;AAQH,SAAO,gBAAgB;AAGvB,SAAO,QAAQ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KAAK,CAAC;AAAA,GAPjC,eAQF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAVjB,eAWF;AAMA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,kBAAkB,CAAC;AAAA,GAhB/D,eAiBF;AAMA;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAtBlB,eAuBF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GAzB7C,eA0BF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA5BjB,eA6BF;AAGC;AAAA,EADP,MAAM,MAAM;AAAA,GA/BJ,eAgCD;",
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 {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { getLabelFromSlot } from '@spectrum-web-components/shared/src/get-label-from-slot.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({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white';\n\n @property({ type: Number })\n public progress = 0;\n\n @query('slot')\n private slotEl!: HTMLSlotElement;\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 <slot @slotchange=${this.handleSlotchange}></slot>\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 handleSlotchange(): void {\n const labelFromSlot = getLabelFromSlot(this.label, this.slotEl);\n if (labelFromSlot) {\n this.label = labelFromSlot;\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 (changes.has('label')) {\n if (this.label.length) {\n this.setAttribute('aria-label', this.label);\n } else if (\n changes.get('label') === this.getAttribute('aria-label')\n ) {\n this.removeAttribute('aria-label');\n }\n }\n\n if (window.__swc.DEBUG) {\n if (\n !this.label &&\n !this.getAttribute('aria-label') &&\n !this.getAttribute('aria-labelledby') &&\n !this.slotEl.assignedNodes().length\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-circle> elements need one of the following to be accessible:',\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 'text content supplied directly to the <sp-progress-circle> 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;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAE1B,OAAO,0BAA0B;AAK1B,aAAM,uBAAuB,WAAW,iBAAiB;AAAA,EAC5D,YAAY,CAAC,KAAK,KAAK,GAAG;AAC9B,CAAC,EAAE;AAAA,EAFI;AAAA;AAQH,SAAO,gBAAgB;AAGvB,SAAO,QAAQ;AAMf,SAAO,WAAW;AAAA;AAAA,EAdlB,WAA2B,SAAyB;AAChD,WAAO,CAAC,oBAAoB;AAAA,EAChC;AAAA,EAiBQ,aAAa,UAAsC;AACvD,WAAO,KAAK,gBACN,SACA,qBAAqB,QAAQ;AAAA,EACvC;AAAA,EAEmB,SAAyB;AACxC,UAAM,SAAS;AAAA,MACX,KAAK,aAAa,OAAQ,MAAM,KAAM,KAAK,IAAI,KAAK,UAAU,EAAE,CAAC;AAAA,MACjE,KAAK;AAAA,QACD,OAAQ,MAAM,KAAM,KAAK,IAAI,KAAK,WAAW,IAAI,CAAC;AAAA,MACtD;AAAA,IACJ;AACA,UAAM,QAAQ,CAAC,SAAS,OAAO;AAC/B,WAAO;AAAA,gCACiB,KAAK,gBAAgB;AAAA;AAAA;AAAA,kBAGnC,MAAM;AAAA,MACJ,CAAC,MAAM,UAAU;AAAA,0CACK,IAAI;AAAA;AAAA,gDAEE,IAAI;AAAA,wCACZ,UAAU,OAAO,KAAK,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMhD,CAAC;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,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAVjB,eAWF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GAb7C,eAcF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAhBjB,eAiBF;AAGC;AAAA,EADP,MAAM,MAAM;AAAA,GAnBJ,eAoBD;",
6
6
  "names": []
7
7
  }
@@ -1,17 +1,17 @@
1
- "use strict";var p=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var i=(o,a,e,s)=>{for(var t=s>1?void 0:s?d(a,e):a,l=o.length-1,n;l>=0;l--)(n=o[l])&&(t=(s?n(a,e,t):n(t))||t);return s&&t&&p(a,e,t),t};import{html as c,SizedMixin as u,SpectrumElement as h}from"@spectrum-web-components/base";import{property as r,query as b}from"@spectrum-web-components/base/src/decorators.js";import{getLabelFromSlot as m}from"@spectrum-web-components/shared/src/get-label-from-slot.js";import{ifDefined as f}from"@spectrum-web-components/base/src/directives.js";import w from"./progress-circle.css.js";export class ProgressCircle extends u(h,{validSizes:["s","m","l"]}){constructor(){super(...arguments);this.indeterminate=!1;this.label="";this.overBackground=!1;this.progress=0}static get styles(){return[w]}makeRotation(e){return this.indeterminate?void 0:`transform: rotate(${e}deg);`}willUpdate(e){e.has("overBackground")&&(this.staticColor=this.overBackground?"white":this.staticColor||void 0),e.has("static")&&(this.staticColor=this.static)}render(){const e=[this.makeRotation(-180+3.6*Math.min(this.progress,50)),this.makeRotation(-180+3.6*Math.max(this.progress-50,0))],s=["Mask1","Mask2"];return c`
1
+ "use strict";var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var l=(o,r,e,i)=>{for(var t=i>1?void 0:i?u(r,e):r,s=o.length-1,d;s>=0;s--)(d=o[s])&&(t=(i?d(r,e,t):d(t))||t);return i&&t&&n(r,e,t),t};import{html as p,SizedMixin as b,SpectrumElement as h}from"@spectrum-web-components/base";import{property as a,query as c}from"@spectrum-web-components/base/src/decorators.js";import{getLabelFromSlot as m}from"@spectrum-web-components/shared/src/get-label-from-slot.js";import{ifDefined as f}from"@spectrum-web-components/base/src/directives.js";import v from"./progress-circle.css.js";export class ProgressCircle extends b(h,{validSizes:["s","m","l"]}){constructor(){super(...arguments);this.indeterminate=!1;this.label="";this.progress=0}static get styles(){return[v]}makeRotation(e){return this.indeterminate?void 0:`transform: rotate(${e}deg);`}render(){const e=[this.makeRotation(-180+3.6*Math.min(this.progress,50)),this.makeRotation(-180+3.6*Math.max(this.progress-50,0))],i=["Mask1","Mask2"];return p`
2
2
  <slot @slotchange=${this.handleSlotchange}></slot>
3
3
  <div class="track"></div>
4
4
  <div class="fills">
5
- ${s.map((t,l)=>c`
5
+ ${i.map((t,s)=>p`
6
6
  <div class="fill${t}">
7
7
  <div
8
8
  class="fillSub${t}"
9
- style=${f(e[l])}
9
+ style=${f(e[s])}
10
10
  >
11
11
  <div class="fill"></div>
12
12
  </div>
13
13
  </div>
14
14
  `)}
15
15
  </div>
16
- `}handleSlotchange(){const e=m(this.label,this.slotEl);e&&(this.label=e)}firstUpdated(e){super.firstUpdated(e),this.hasAttribute("role")||this.setAttribute("role","progressbar")}updated(e){super.updated(e),!this.indeterminate&&e.has("progress")?this.setAttribute("aria-valuenow",""+this.progress):this.hasAttribute("aria-valuenow")&&this.removeAttribute("aria-valuenow"),e.has("label")&&(this.label.length?this.setAttribute("aria-label",this.label):e.get("label")===this.getAttribute("aria-label")&&this.removeAttribute("aria-label"))}}i([r({type:Boolean,reflect:!0})],ProgressCircle.prototype,"indeterminate",2),i([r({type:String})],ProgressCircle.prototype,"label",2),i([r({type:Boolean,reflect:!0,attribute:"over-background"})],ProgressCircle.prototype,"overBackground",2),i([r({reflect:!0})],ProgressCircle.prototype,"static",2),i([r({reflect:!0,attribute:"static-color"})],ProgressCircle.prototype,"staticColor",2),i([r({type:Number})],ProgressCircle.prototype,"progress",2),i([b("slot")],ProgressCircle.prototype,"slotEl",2);
16
+ `}handleSlotchange(){const e=m(this.label,this.slotEl);e&&(this.label=e)}firstUpdated(e){super.firstUpdated(e),this.hasAttribute("role")||this.setAttribute("role","progressbar")}updated(e){super.updated(e),!this.indeterminate&&e.has("progress")?this.setAttribute("aria-valuenow",""+this.progress):this.hasAttribute("aria-valuenow")&&this.removeAttribute("aria-valuenow"),e.has("label")&&(this.label.length?this.setAttribute("aria-label",this.label):e.get("label")===this.getAttribute("aria-label")&&this.removeAttribute("aria-label"))}}l([a({type:Boolean,reflect:!0})],ProgressCircle.prototype,"indeterminate",2),l([a({type:String})],ProgressCircle.prototype,"label",2),l([a({reflect:!0,attribute:"static-color"})],ProgressCircle.prototype,"staticColor",2),l([a({type:Number})],ProgressCircle.prototype,"progress",2),l([c("slot")],ProgressCircle.prototype,"slotEl",2);
17
17
  //# sourceMappingURL=ProgressCircle.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { getLabelFromSlot } from '@spectrum-web-components/shared/src/get-label-from-slot.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 /**\n * @deprecated Use `staticColor` instead.\n */\n @property({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = false;\n\n /**\n * @deprecated Use `staticColor` instead.\n */\n @property({ reflect: true })\n public static?: 'white';\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white';\n\n @property({ type: Number })\n public progress = 0;\n\n @query('slot')\n private slotEl!: HTMLSlotElement;\n\n private makeRotation(rotation: number): string | undefined {\n return this.indeterminate\n ? undefined\n : `transform: rotate(${rotation}deg);`;\n }\n\n protected override willUpdate(changes: PropertyValues<this>): void {\n if (changes.has('overBackground')) {\n // Apply \"staticColor\" from \"overBackground\", preferring \"staticColor\",\n // until the deprecation period is over.\n this.staticColor = this.overBackground\n ? 'white'\n : this.staticColor || undefined;\n if (window.__swc.DEBUG) {\n if (this.overBackground) {\n window.__swc.warn(\n this,\n `<${this.localName}> element will stop accepting the \"over-background\" attribute, and its related \"overBackground\" property in a future release. Use the \"static-color\" attribute with a value of \"white\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#static',\n { level: 'deprecation' }\n );\n }\n }\n }\n if (changes.has('static')) {\n // Apply \"staticColor\" from \"static\", preferring \"staticColor\",\n // until the deprecation period is over.\n this.staticColor = this.static;\n if (window.__swc.DEBUG) {\n if (this.static) {\n window.__swc.warn(\n this,\n `<${this.localName}> element will stop accepting the \"static\" attribute. Use the \"static-color\" attribute with a value of \"white\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#static',\n { level: 'deprecation' }\n );\n }\n }\n }\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 <slot @slotchange=${this.handleSlotchange}></slot>\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 handleSlotchange(): void {\n const labelFromSlot = getLabelFromSlot(this.label, this.slotEl);\n if (labelFromSlot) {\n this.label = labelFromSlot;\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 (changes.has('label')) {\n if (this.label.length) {\n this.setAttribute('aria-label', this.label);\n } else if (\n changes.get('label') === this.getAttribute('aria-label')\n ) {\n this.removeAttribute('aria-label');\n }\n }\n\n if (window.__swc.DEBUG) {\n if (\n !this.label &&\n !this.getAttribute('aria-label') &&\n !this.getAttribute('aria-labelledby') &&\n !this.slotEl.assignedNodes().length\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-circle> elements need one of the following to be accessible:',\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 'text content supplied directly to the <sp-progress-circle> 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,OACI,YAAAC,EACA,SAAAC,MAC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B,QAAQA,EAA+B,CACtD,MAAM,QAAQA,CAAO,EACjB,CAAC,KAAK,eAAiBA,EAAQ,IAAI,UAAU,EAC7C,KAAK,aAAa,gBAAiB,GAAK,KAAK,QAAQ,EAC9C,KAAK,aAAa,eAAe,GACxC,KAAK,gBAAgB,eAAe,EAEpCA,EAAQ,IAAI,OAAO,IACf,KAAK,MAAM,OACX,KAAK,aAAa,aAAc,KAAK,KAAK,EAE1CA,EAAQ,IAAI,OAAO,IAAM,KAAK,aAAa,YAAY,GAEvD,KAAK,gBAAgB,YAAY,EA2B7C,CACJ,CAtJWM,EAAA,CADNZ,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAPjC,eAQF,6BAGAY,EAAA,CADNZ,EAAS,CAAE,KAAM,MAAO,CAAC,GAVjB,eAWF,qBAMAY,EAAA,CADNZ,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,iBAAkB,CAAC,GAhB/D,eAiBF,8BAMAY,EAAA,CADNZ,EAAS,CAAE,QAAS,EAAK,CAAC,GAtBlB,eAuBF,sBAGAY,EAAA,CADNZ,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GAzB7C,eA0BF,2BAGAY,EAAA,CADNZ,EAAS,CAAE,KAAM,MAAO,CAAC,GA5BjB,eA6BF,wBAGCY,EAAA,CADPX,EAAM,MAAM,GA/BJ,eAgCD",
6
- "names": ["html", "SizedMixin", "SpectrumElement", "property", "query", "getLabelFromSlot", "ifDefined", "progressCircleStyles", "rotation", "changes", "styles", "masks", "mask", "index", "labelFromSlot", "__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 {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { getLabelFromSlot } from '@spectrum-web-components/shared/src/get-label-from-slot.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({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white';\n\n @property({ type: Number })\n public progress = 0;\n\n @query('slot')\n private slotEl!: HTMLSlotElement;\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 <slot @slotchange=${this.handleSlotchange}></slot>\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 handleSlotchange(): void {\n const labelFromSlot = getLabelFromSlot(this.label, this.slotEl);\n if (labelFromSlot) {\n this.label = labelFromSlot;\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 (changes.has('label')) {\n if (this.label.length) {\n this.setAttribute('aria-label', this.label);\n } else if (\n changes.get('label') === this.getAttribute('aria-label')\n ) {\n this.removeAttribute('aria-label');\n }\n }\n\n if (window.__swc.DEBUG) {\n if (\n !this.label &&\n !this.getAttribute('aria-label') &&\n !this.getAttribute('aria-labelledby') &&\n !this.slotEl.assignedNodes().length\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-circle> elements need one of the following to be accessible:',\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 'text content supplied directly to the <sp-progress-circle> 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,OACI,YAAAC,EACA,SAAAC,MACG,kDACP,OAAS,oBAAAC,MAAwB,6DACjC,OAAS,aAAAC,MAAiB,kDAE1B,OAAOC,MAA0B,2BAK1B,aAAM,uBAAuBN,EAAWC,EAAiB,CAC5D,WAAY,CAAC,IAAK,IAAK,GAAG,CAC9B,CAAC,CAAE,CAFI,kCAQH,KAAO,cAAgB,GAGvB,KAAO,MAAQ,GAMf,KAAO,SAAW,EAdlB,WAA2B,QAAyB,CAChD,MAAO,CAACK,CAAoB,CAChC,CAiBQ,aAAaC,EAAsC,CACvD,OAAO,KAAK,cACN,OACA,qBAAqBA,CAAQ,OACvC,CAEmB,QAAyB,CACxC,MAA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,eAcF,2BAGAY,EAAA,CADNZ,EAAS,CAAE,KAAM,MAAO,CAAC,GAhBjB,eAiBF,wBAGCY,EAAA,CADPX,EAAM,MAAM,GAnBJ,eAoBD",
6
+ "names": ["html", "SizedMixin", "SpectrumElement", "property", "query", "getLabelFromSlot", "ifDefined", "progressCircleStyles", "rotation", "styles", "masks", "mask", "index", "labelFromSlot", "changes", "__decorateClass"]
7
7
  }
@@ -41,54 +41,6 @@ describe("ProgressCircle", () => {
41
41
  }
42
42
  });
43
43
  });
44
- it("warns in Dev Mode when static attribute is supplied", async () => {
45
- const el = await fixture(html`
46
- <sp-progress-circle
47
- progress="50"
48
- static="white"
49
- ></sp-progress-circle>
50
- `);
51
- await elementUpdated(el);
52
- expect(consoleWarnStub.called).to.be.true;
53
- const spyCall = consoleWarnStub.getCall(0);
54
- expect(
55
- spyCall.args.at(0).includes(
56
- 'element will stop accepting the "static" attribute'
57
- ),
58
- "confirm attribute deprecation message"
59
- ).to.be.true;
60
- expect(spyCall.args.at(-1), "confirm `data` shape").to.deep.equal({
61
- data: {
62
- localName: "sp-progress-circle",
63
- type: "api",
64
- level: "deprecation"
65
- }
66
- });
67
- });
68
- it("warns in Dev Mode when overBackground attribute is supplied", async () => {
69
- const el = await fixture(html`
70
- <sp-progress-circle
71
- progress="50"
72
- ?over-background=${true}
73
- ></sp-progress-circle>
74
- `);
75
- await elementUpdated(el);
76
- expect(consoleWarnStub.called).to.be.true;
77
- const spyCall = consoleWarnStub.getCall(0);
78
- expect(
79
- spyCall.args.at(0).includes(
80
- 'element will stop accepting the "over-background" attribute'
81
- ),
82
- "confirm attribute deprecation message"
83
- ).to.be.true;
84
- expect(spyCall.args.at(-1), "confirm `data` shape").to.deep.equal({
85
- data: {
86
- localName: "sp-progress-circle",
87
- type: "api",
88
- level: "deprecation"
89
- }
90
- });
91
- });
92
44
  });
93
45
  it("loads", async () => {
94
46
  const el = await fixture(html`
@@ -169,20 +121,5 @@ describe("ProgressCircle", () => {
169
121
  expect(el.hasAttribute("aria-label")).to.be.true;
170
122
  expect(el.getAttribute("aria-label")).to.equal("Loading");
171
123
  });
172
- it("prefers `staticColor` over `static`", async () => {
173
- const el = await fixture(html`
174
- <sp-progress-circle
175
- progress="50"
176
- static="white"
177
- ></sp-progress-circle>
178
- `);
179
- await elementUpdated(el);
180
- expect(el.staticColor).to.equal("white");
181
- el.setAttribute("static", "white");
182
- await elementUpdated(el);
183
- expect(el.staticColor).to.equal("white");
184
- expect(el.static).to.equal("white");
185
- expect(el.getAttribute("static-color")).to.equal("white");
186
- });
187
124
  });
188
125
  //# sourceMappingURL=progress-circle.test.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["progress-circle.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-circle/sp-progress-circle.js';\nimport { ProgressCircle } from '@spectrum-web-components/progress-circle';\nimport { stub } from 'sinon';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('ProgressCircle', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<ProgressCircle>(html`\n <sp-progress-circle label=\"Loading\"></sp-progress-circle>\n `)\n );\n describe('dev mode', () => {\n let consoleWarnStub!: ReturnType<typeof stub>;\n before(() => {\n window.__swc.verbose = true;\n consoleWarnStub = stub(console, 'warn');\n });\n afterEach(() => {\n consoleWarnStub.resetHistory();\n });\n after(() => {\n window.__swc.verbose = false;\n consoleWarnStub.restore();\n });\n\n it('warns in Dev Mode when accessible attributes are not leveraged', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle progress=\"50\"></sp-progress-circle>\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) as string).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-circle',\n type: 'accessibility',\n level: 'default',\n },\n });\n });\n it('warns in Dev Mode when static attribute is supplied', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n progress=\"50\"\n static=\"white\"\n ></sp-progress-circle>\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) as string).includes(\n 'element will stop accepting the \"static\" attribute'\n ),\n 'confirm attribute deprecation message'\n ).to.be.true;\n expect(spyCall.args.at(-1), 'confirm `data` shape').to.deep.equal({\n data: {\n localName: 'sp-progress-circle',\n type: 'api',\n level: 'deprecation',\n },\n });\n });\n it('warns in Dev Mode when overBackground attribute is supplied', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n progress=\"50\"\n ?over-background=${true}\n ></sp-progress-circle>\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) as string).includes(\n 'element will stop accepting the \"over-background\" attribute'\n ),\n 'confirm attribute deprecation message'\n ).to.be.true;\n expect(spyCall.args.at(-1), 'confirm `data` shape').to.deep.equal({\n data: {\n localName: 'sp-progress-circle',\n type: 'api',\n level: 'deprecation',\n },\n });\n });\n });\n it('loads', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle label=\"Loading\"></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n it('loads - [indeterminate]', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n indeterminate\n label=\"Loading\"\n ></sp-progress-circle>\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 label from `slot`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle role=\"progressbar\">\n Label From Slot\n </sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.getAttribute('aria-label')).to.equal('Label From Slot');\n });\n it('accepts user `role`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n role=\"progressbar\"\n label=\"With user role\"\n ></sp-progress-circle>\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<ProgressCircle>(html`\n <sp-progress-circle\n progress=\"50\"\n label=\"Will be indeterminate\"\n ></sp-progress-circle>\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('accepts `aria-label`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle aria-label=\"Loading\"></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-label')).to.be.true;\n expect(el.getAttribute('aria-label')).to.equal('Loading');\n });\n it('sets `aria-label` to equal `label` if `label` is set', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle label=\"Loading\"></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-label')).to.be.true;\n expect(el.getAttribute('aria-label')).to.equal('Loading');\n });\n it('does not remove `aria-label` if set independently of `label`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n label=\"\"\n aria-label=\"Loading\"\n ></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-label')).to.be.true;\n expect(el.getAttribute('aria-label')).to.equal('Loading');\n });\n it('prefers `staticColor` over `static`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n progress=\"50\"\n static=\"white\"\n ></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.staticColor).to.equal('white');\n\n el.setAttribute('static', 'white');\n await elementUpdated(el);\n\n expect(el.staticColor).to.equal('white');\n expect(el.static).to.equal('white');\n expect(el.getAttribute('static-color')).to.equal('white');\n });\n});\n"],
5
- "mappings": ";AAYA,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AAEtD,OAAO;AAEP,SAAS,YAAY;AACrB,SAAS,6BAA6B;AAEtC,SAAS,kBAAkB,MAAM;AAC7B;AAAA,IACI,YACI,MAAM,QAAwB;AAAA;AAAA,aAE7B;AAAA,EACT;AACA,WAAS,YAAY,MAAM;AACvB,QAAI;AACJ,WAAO,MAAM;AACT,aAAO,MAAM,UAAU;AACvB,wBAAkB,KAAK,SAAS,MAAM;AAAA,IAC1C,CAAC;AACD,cAAU,MAAM;AACZ,sBAAgB,aAAa;AAAA,IACjC,CAAC;AACD,UAAM,MAAM;AACR,aAAO,MAAM,UAAU;AACvB,sBAAgB,QAAQ;AAAA,IAC5B,CAAC;AAED,OAAG,kEAAkE,YAAY;AAC7E,YAAM,KAAK,MAAM,QAAwB;AAAA;AAAA,aAExC;AAED,YAAM,eAAe,EAAE;AAEvB,aAAO,gBAAgB,MAAM,EAAE,GAAG,GAAG;AACrC,YAAM,UAAU,gBAAgB,QAAQ,CAAC;AACzC;AAAA,QACK,QAAQ,KAAK,GAAG,CAAC,EAAa,SAAS,YAAY;AAAA,QACpD;AAAA,MACJ,EAAE,GAAG,GAAG;AACR,aAAO,QAAQ,KAAK,GAAG,EAAE,GAAG,sBAAsB,EAAE,GAAG,KAAK,MAAM;AAAA,Q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,GAAG,GAAG;AAC5C,WAAO,GAAG,aAAa,YAAY,CAAC,EAAE,GAAG,MAAM,SAAS;AAAA,EAC5D,CAAC;AACD,KAAG,wDAAwD,YAAY;AACnE,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA,SAExC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,YAAY,CAAC,EAAE,GAAG,GAAG;AAC5C,WAAO,GAAG,aAAa,YAAY,CAAC,EAAE,GAAG,MAAM,SAAS;AAAA,EAC5D,CAAC;AACD,KAAG,gEAAgE,YAAY;AAC3E,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA;AAAA;AAAA;AAAA,SAKxC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,YAAY,CAAC,EAAE,GAAG,GAAG;AAC5C,WAAO,GAAG,aAAa,YAAY,CAAC,EAAE,GAAG,MAAM,SAAS;AAAA,EAC5D,CAAC;AACD,KAAG,uCAAuC,YAAY;AAClD,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA;AAAA;AAAA;AAAA,SAKxC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,WAAW,EAAE,GAAG,MAAM,OAAO;AAEvC,OAAG,aAAa,UAAU,OAAO;AACjC,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,WAAW,EAAE,GAAG,MAAM,OAAO;AACvC,WAAO,GAAG,MAAM,EAAE,GAAG,MAAM,OAAO;AAClC,WAAO,GAAG,aAAa,cAAc,CAAC,EAAE,GAAG,MAAM,OAAO;AAAA,EAC5D,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-circle/sp-progress-circle.js';\nimport { ProgressCircle } from '@spectrum-web-components/progress-circle';\nimport { stub } from 'sinon';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('ProgressCircle', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<ProgressCircle>(html`\n <sp-progress-circle label=\"Loading\"></sp-progress-circle>\n `)\n );\n describe('dev mode', () => {\n let consoleWarnStub!: ReturnType<typeof stub>;\n before(() => {\n window.__swc.verbose = true;\n consoleWarnStub = stub(console, 'warn');\n });\n afterEach(() => {\n consoleWarnStub.resetHistory();\n });\n after(() => {\n window.__swc.verbose = false;\n consoleWarnStub.restore();\n });\n\n it('warns in Dev Mode when accessible attributes are not leveraged', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle progress=\"50\"></sp-progress-circle>\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) as string).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-circle',\n type: 'accessibility',\n level: 'default',\n },\n });\n });\n });\n it('loads', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle label=\"Loading\"></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n it('loads - [indeterminate]', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n indeterminate\n label=\"Loading\"\n ></sp-progress-circle>\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 label from `slot`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle role=\"progressbar\">\n Label From Slot\n </sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.getAttribute('aria-label')).to.equal('Label From Slot');\n });\n it('accepts user `role`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n role=\"progressbar\"\n label=\"With user role\"\n ></sp-progress-circle>\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<ProgressCircle>(html`\n <sp-progress-circle\n progress=\"50\"\n label=\"Will be indeterminate\"\n ></sp-progress-circle>\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('accepts `aria-label`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle aria-label=\"Loading\"></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-label')).to.be.true;\n expect(el.getAttribute('aria-label')).to.equal('Loading');\n });\n it('sets `aria-label` to equal `label` if `label` is set', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle label=\"Loading\"></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-label')).to.be.true;\n expect(el.getAttribute('aria-label')).to.equal('Loading');\n });\n it('does not remove `aria-label` if set independently of `label`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n label=\"\"\n aria-label=\"Loading\"\n ></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-label')).to.be.true;\n expect(el.getAttribute('aria-label')).to.equal('Loading');\n });\n});\n"],
5
+ "mappings": ";AAYA,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AAEtD,OAAO;AAEP,SAAS,YAAY;AACrB,SAAS,6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