@spectrum-web-components/progress-circle 0.34.0 → 0.35.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.
@@ -78,6 +78,14 @@
78
78
  "default": "0",
79
79
  "attribute": "progress"
80
80
  },
81
+ {
82
+ "kind": "field",
83
+ "name": "slotEl",
84
+ "type": {
85
+ "text": "HTMLSlotElement"
86
+ },
87
+ "privacy": "private"
88
+ },
81
89
  {
82
90
  "kind": "method",
83
91
  "name": "makeRotation",
@@ -95,6 +103,16 @@
95
103
  }
96
104
  }
97
105
  ]
106
+ },
107
+ {
108
+ "kind": "method",
109
+ "name": "handleSlotchange",
110
+ "privacy": "protected",
111
+ "return": {
112
+ "type": {
113
+ "text": "void"
114
+ }
115
+ }
98
116
  }
99
117
  ],
100
118
  "attributes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/progress-circle",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -57,10 +57,10 @@
57
57
  "lit-html"
58
58
  ],
59
59
  "dependencies": {
60
- "@spectrum-web-components/base": "^0.34.0"
60
+ "@spectrum-web-components/base": "^0.35.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@spectrum-css/progresscircle": "^2.0.48"
63
+ "@spectrum-css/progresscircle": "^2.0.53"
64
64
  },
65
65
  "types": "./src/index.d.ts",
66
66
  "customElements": "custom-elements.json",
@@ -68,5 +68,5 @@
68
68
  "./sp-*.js",
69
69
  "./**/*.dev.js"
70
70
  ],
71
- "gitHead": "f9b3294d67cdd52b2c36897cdc1c20ceaeb019cf"
71
+ "gitHead": "1ee5a6c92838cdf48321276d97f61c20f8476ac1"
72
72
  }
@@ -13,9 +13,11 @@ export declare class ProgressCircle extends ProgressCircle_base {
13
13
  overBackground: boolean;
14
14
  static?: 'white';
15
15
  progress: number;
16
+ private slotEl;
16
17
  private makeRotation;
17
18
  protected willUpdate(changes: PropertyValues<this>): void;
18
19
  protected render(): TemplateResult;
20
+ protected handleSlotchange(): void;
19
21
  protected firstUpdated(changes: PropertyValues): void;
20
22
  protected updated(changes: PropertyValues): void;
21
23
  }
@@ -15,7 +15,11 @@ import {
15
15
  SizedMixin,
16
16
  SpectrumElement
17
17
  } from "@spectrum-web-components/base";
18
- import { property } from "@spectrum-web-components/base/src/decorators.js";
18
+ import {
19
+ property,
20
+ query
21
+ } from "@spectrum-web-components/base/src/decorators.js";
22
+ import { getLabelFromSlot } from "@spectrum-web-components/shared/src/get-label-from-slot.js";
19
23
  import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
20
24
  import progressCircleStyles from "./progress-circle.css.js";
21
25
  export class ProgressCircle extends SizedMixin(SpectrumElement, {
@@ -58,6 +62,7 @@ export class ProgressCircle extends SizedMixin(SpectrumElement, {
58
62
  ];
59
63
  const masks = ["Mask1", "Mask2"];
60
64
  return html`
65
+ <slot @slotchange=${this.handleSlotchange}></slot>
61
66
  <div class="track"></div>
62
67
  <div class="fills">
63
68
  ${masks.map(
@@ -75,6 +80,12 @@ export class ProgressCircle extends SizedMixin(SpectrumElement, {
75
80
  </div>
76
81
  `;
77
82
  }
83
+ handleSlotchange() {
84
+ const labelFromSlot = getLabelFromSlot(this.label, this.slotEl);
85
+ if (labelFromSlot) {
86
+ this.label = labelFromSlot;
87
+ }
88
+ }
78
89
  firstUpdated(changes) {
79
90
  super.firstUpdated(changes);
80
91
  if (!this.hasAttribute("role")) {
@@ -88,19 +99,24 @@ export class ProgressCircle extends SizedMixin(SpectrumElement, {
88
99
  } else if (this.hasAttribute("aria-valuenow")) {
89
100
  this.removeAttribute("aria-valuenow");
90
101
  }
91
- if (this.label && changes.has("label")) {
92
- this.setAttribute("aria-label", this.label);
102
+ if (changes.has("label")) {
103
+ if (this.label.length) {
104
+ this.setAttribute("aria-label", this.label);
105
+ } else {
106
+ this.removeAttribute("aria-label");
107
+ }
93
108
  }
94
109
  if (true) {
95
- if (!this.label && !this.getAttribute("aria-label") && !this.getAttribute("aria-labelledby")) {
110
+ if (!this.label && !this.getAttribute("aria-label") && !this.getAttribute("aria-labelledby") && !this.slotEl.assignedNodes().length) {
96
111
  window.__swc.warn(
97
112
  this,
98
- "<sp-progress-circle> elements will not be accessible to screen readers without one of the following:",
113
+ "<sp-progress-circle> elements need one of the following to be accessible:",
99
114
  "https://opensource.adobe.com/spectrum-web-components/components/progress-circle/#accessibility",
100
115
  {
101
116
  type: "accessibility",
102
117
  issues: [
103
118
  'value supplied to the "label" attribute, which will be displayed visually as part of the element, or',
119
+ "text content supplied directly to the <sp-progress-circle> element, or",
104
120
  'value supplied to the "aria-label" attribute, which will only be provided to screen readers, or',
105
121
  '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.'
106
122
  ]
@@ -125,4 +141,7 @@ __decorateClass([
125
141
  __decorateClass([
126
142
  property({ type: Number })
127
143
  ], ProgressCircle.prototype, "progress", 2);
144
+ __decorateClass([
145
+ query("slot")
146
+ ], ProgressCircle.prototype, "slotEl", 2);
128
147
  //# sourceMappingURL=ProgressCircle.dev.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 { 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({ reflect: true })\n public static?: 'white';\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 willUpdate(changes: PropertyValues<this>): void {\n if (changes.has('overBackground')) {\n // Apply \"static\" from \"overBackground\", preferring \"static\",\n // until the deprecation period is over.\n this.static = this.overBackground\n ? 'white'\n : this.static || 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\" attribute/property 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 <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,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,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;AAGf,SAAO,iBAAiB;AAMxB,SAAO,WAAW;AAAA;AAAA,EAjBlB,WAA2B,SAAyB;AAChD,WAAO,CAAC,oBAAoB;AAAA,EAChC;AAAA,EAiBQ,aAAa,UAAsC;AACvD,WAAO,KAAK,gBACN,SACA,qBAAqB;AAAA,EAC/B;AAAA,EAEmB,WAAW,SAAqC;AAC/D,QAAI,QAAQ,IAAI,gBAAgB,GAAG;AAG/B,WAAK,SAAS,KAAK,iBACb,UACA,KAAK,UAAU;AACrB,UAAI,MAAoB;AACpB,YAAI,KAAK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C;AACE,eAAO,MAAM;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,YACI,MAAM;AAAA,YACN,QAAQ;AAAA,cACJ;AAAA,cACA;AAAA,cACA;AAAA,YACJ;AAAA,UACJ;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ;AA3GW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAPjC,eAQF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAVjB,eAWF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,kBAAkB,CAAC;AAAA,GAb/D,eAcF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAhBlB,eAiBF;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAnBjB,eAoBF;",
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({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = false;\n\n @property({ reflect: true })\n public static?: '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 \"static\" from \"overBackground\", preferring \"static\",\n // until the deprecation period is over.\n this.static = this.overBackground\n ? 'white'\n : this.static || 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\" attribute/property 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 {\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;AAGf,SAAO,iBAAiB;AAMxB,SAAO,WAAW;AAAA;AAAA,EAjBlB,WAA2B,SAAyB;AAChD,WAAO,CAAC,oBAAoB;AAAA,EAChC;AAAA,EAoBQ,aAAa,UAAsC;AACvD,WAAO,KAAK,gBACN,SACA,qBAAqB;AAAA,EAC/B;A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&(t=(s?d(r,e,t):d(t))||t);return s&&t&&p(r,e,t),t};import{html as n,SizedMixin as c,SpectrumElement as b}from"@spectrum-web-components/base";import{property as l}from"@spectrum-web-components/base/src/decorators.js";import{ifDefined as h}from"@spectrum-web-components/base/src/directives.js";import m from"./progress-circle.css.js";export class ProgressCircle extends c(b,{validSizes:["s","m","l"]}){constructor(){super(...arguments);this.indeterminate=!1;this.label="";this.overBackground=!1;this.progress=0}static get styles(){return[m]}makeRotation(e){return this.indeterminate?void 0:`transform: rotate(${e}deg);`}willUpdate(e){e.has("overBackground")&&(this.static=this.overBackground?"white":this.static||void 0)}render(){const e=[this.makeRotation(-180+3.6*Math.min(this.progress,50)),this.makeRotation(-180+3.6*Math.max(this.progress-50,0))];return n`
1
+ "use strict";var p=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var i=(o,s,e,r)=>{for(var t=r>1?void 0:r?c(s,e):s,l=o.length-1,n;l>=0;l--)(n=o[l])&&(t=(r?n(s,e,t):n(t))||t);return r&&t&&p(s,e,t),t};import{html as d,SizedMixin as u,SpectrumElement as h}from"@spectrum-web-components/base";import{property as a,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 v}from"@spectrum-web-components/base/src/directives.js";import f 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[f]}makeRotation(e){return this.indeterminate?void 0:`transform: rotate(${e}deg);`}willUpdate(e){e.has("overBackground")&&(this.static=this.overBackground?"white":this.static||void 0)}render(){const e=[this.makeRotation(-180+3.6*Math.min(this.progress,50)),this.makeRotation(-180+3.6*Math.max(this.progress-50,0))],r=["Mask1","Mask2"];return d`
2
+ <slot @slotchange=${this.handleSlotchange}></slot>
2
3
  <div class="track"></div>
3
4
  <div class="fills">
4
- ${["Mask1","Mask2"].map((t,a)=>n`
5
+ ${r.map((t,l)=>d`
5
6
  <div class="fill${t}">
6
7
  <div
7
8
  class="fillSub${t}"
8
- style=${h(e[a])}
9
+ style=${v(e[l])}
9
10
  >
10
11
  <div class="fill"></div>
11
12
  </div>
12
13
  </div>
13
14
  `)}
14
15
  </div>
15
- `}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"),this.label&&e.has("label")&&this.setAttribute("aria-label",this.label)}}i([l({type:Boolean,reflect:!0})],ProgressCircle.prototype,"indeterminate",2),i([l({type:String})],ProgressCircle.prototype,"label",2),i([l({type:Boolean,reflect:!0,attribute:"over-background"})],ProgressCircle.prototype,"overBackground",2),i([l({reflect:!0})],ProgressCircle.prototype,"static",2),i([l({type:Number})],ProgressCircle.prototype,"progress",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):this.removeAttribute("aria-label"))}}i([a({type:Boolean,reflect:!0})],ProgressCircle.prototype,"indeterminate",2),i([a({type:String})],ProgressCircle.prototype,"label",2),i([a({type:Boolean,reflect:!0,attribute:"over-background"})],ProgressCircle.prototype,"overBackground",2),i([a({reflect:!0})],ProgressCircle.prototype,"static",2),i([a({type:Number})],ProgressCircle.prototype,"progress",2),i([b("slot")],ProgressCircle.prototype,"slotEl",2);
16
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 { 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({ reflect: true })\n public static?: 'white';\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 willUpdate(changes: PropertyValues<this>): void {\n if (changes.has('overBackground')) {\n // Apply \"static\" from \"overBackground\", preferring \"static\",\n // until the deprecation period is over.\n this.static = this.overBackground\n ? 'white'\n : this.static || 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\" attribute/property 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 <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": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,aAAAC,MAAiB,kDAE1B,OAAOC,MAA0B,2BAK1B,aAAM,uBAAuBJ,EAAWC,EAAiB,CAC5D,WAAY,CAAC,IAAK,IAAK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AAE,KAAM,MAAO,CAAC,GAVjB,eAWF,qBAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,iBAAkB,CAAC,GAb/D,eAcF,8BAGAQ,EAAA,CADNR,EAAS,CAAE,QAAS,EAAK,CAAC,GAhBlB,eAiBF,sBAGAQ,EAAA,CADNR,EAAS,CAAE,KAAM,MAAO,CAAC,GAnBjB,eAoBF",
6
- "names": ["html", "SizedMixin", "SpectrumElement", "property", "ifDefined", "progressCircleStyles", "rotation", "changes", "styles", "mask", "index", "__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({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = false;\n\n @property({ reflect: true })\n public static?: '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 \"static\" from \"overBackground\", preferring \"static\",\n // until the deprecation period is over.\n this.static = this.overBackground\n ? 'white'\n : this.static || 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\" attribute/property 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 {\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,GAGf,KAAO,eAAiB,GAMxB,KAAO,SAAW,EAjBlB,WAA2B,QAAyB,CAChD,MAAO,CAACK,CAAoB,CAChC,CAoBQ,aAAaC,EAAsC,CACvD,OAAO,KAAK,cACN,OACA,qBAAqBA,QAC/B,CAEmB,WAAWC,EAAqC,CAC3DA,EAAQ,IAAI,gBAAgB,IAG5B,KAAK,OAAS,KAAK,eACb,QACA,KAAK,QAAU,OAY7B,CAEmB,QAAyB,CACxC,MAAMC,EAAS,CACX,KAAK,aAAa,KAAQ,IAAY,KAAK,IAAI,KAAK,SAAU,EAAE,CAAC,EACjE,KAAK,aACD,KAAQ,IAAY,KAAK,IAAI,KAAK,SAAW,GAAI,CAAC,CACtD,C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umElement", "property", "query", "getLabelFromSlot", "ifDefined", "progressCircleStyles", "rotation", "changes", "styles", "masks", "mask", "index", "labelFromSlot", "__decorateClass"]
7
7
  }
@@ -57,7 +57,7 @@ const styles = css`
57
57
  )
58
58
  )}.fillMask1,.fillMask2{block-size:100%;inline-size:50%;overflow:hidden;position:absolute;transform:rotate(180deg);transform-origin:100%}.fillSubMask1,.fillSubMask2{block-size:100%;inline-size:100%;overflow:hidden;transform:rotate(-180deg);transform-origin:100%}.fillMask2{transform:rotate(0)}: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}:host{--spectrum-progresscircle-m-over-background-track-fill-color:var(
59
59
  --spectrum-alias-track-fill-color-overbackground
60
- )}
60
+ )}slot{display:none}
61
61
  `;
62
62
  export default styles;
63
63
  //# sourceMappingURL=progress-circle.css.dev.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["progress-circle.css.ts"],
4
- "sourcesContent": ["/*\nCopyright 2023 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(0)}11.86%{transform:rotate(0)}13.56%{transform:rotate(0)}15.25%{transform:rotate(0)}16.95%{transform:rotate(0)}18.64%{transform:rotate(0)}20.34%{transform:rotate(0)}22.03%{transform:rotate(0)}23.73%{transform:rotate(0)}25.42%{transform:rotate(0)}27.12%{transform:rotate(0)}28.81%{transform:rotate(0)}30.51%{transform:rotate(0)}32.2%{transform:rotate(0)}33.9%{transform:rotate(0)}35.59%{transform:rotate(0)}37.29%{transform:rotate(0)}38.98%{transform:rotate(0)}40.68%{transform:rotate(0)}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{--spectrum-progress-circle-track-border-color:var(--spectrum-gray-300);--spectrum-progress-circle-fill-border-color:var(\n--spectrum-accent-content-color-default\n);--spectrum-progress-circle-track-border-color-over-background:var(\n--spectrum-transparent-white-300\n);--spectrum-progress-circle-fill-border-color-over-background:var(\n--spectrum-transparent-white-900\n);--spectrum-progress-circle-size:var(\n--spectrum-progress-circle-size-medium\n);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-medium\n);--spectrum-progress-circle-track-border-style:solid}:host([size=s]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-small);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-small\n)}.spectrum-ProgressCircle--medium{--spectrum-progress-circle-size:var(\n--spectrum-progress-circle-size-medium\n);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-medium\n)}:host([size=l]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-large);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-large\n)}@media (forced-colors:active){:host{--highcontrast-progress-circle-fill-border-color:Highlight;--highcontrast-progress-circle-fill-border-color-over-background:Highlight}.track{--spectrum-progress-circle-track-border-style:double}}:host{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);direction:ltr;display:inline-block;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);position:relative;transform:translateZ(0)}.track{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-color:var(\n--mod-progress-circle-track-border-color,var(--spectrum-progress-circle-track-border-color)\n);border-radius:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-style:var(\n--highcontrast-progress-circle-track-border-style,var(\n--mod-progress-circle-track-border-style,var(--spectrum-progress-circle-track-border-style)\n)\n);border-width:var(\n--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness)\n);box-sizing:border-box;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n)}.fills{block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0;position:absolute}.fill{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-color:var(\n--highcontrast-progress-circle-fill-border-color,var(\n--mod-progress-circle-fill-border-color,var(--spectrum-progress-circle-fill-border-color)\n)\n);border-radius:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-style:solid;border-width:var(\n--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness)\n);box-sizing:border-box;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n)}:host([static=white]) .track{border-color:var(\n--mod-progress-circle-track-border-color-over-background,var(--spectrum-progress-circle-track-border-color-over-background)\n)}:host([static=white]) .fill{border-color:var(\n--highcontrast-progress-circle-fill-border-color-over-background,var(\n--mod-progress-circle-fill-border-color-over-background,var(--spectrum-progress-circle-fill-border-color-over-background)\n)\n)}.fillMask1,.fillMask2{block-size:100%;inline-size:50%;overflow:hidden;position:absolute;transform:rotate(180deg);transform-origin:100%}.fillSubMask1,.fillSubMask2{block-size:100%;inline-size:100%;overflow:hidden;transform:rotate(-180deg);transform-origin:100%}.fillMask2{transform:rotate(0)}: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}:host{--spectrum-progresscircle-m-over-background-track-fill-color:var(\n--spectrum-alias-track-fill-color-overbackground\n)}\n`;\nexport default styles;"],
4
+ "sourcesContent": ["/*\nCopyright 2023 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(0)}11.86%{transform:rotate(0)}13.56%{transform:rotate(0)}15.25%{transform:rotate(0)}16.95%{transform:rotate(0)}18.64%{transform:rotate(0)}20.34%{transform:rotate(0)}22.03%{transform:rotate(0)}23.73%{transform:rotate(0)}25.42%{transform:rotate(0)}27.12%{transform:rotate(0)}28.81%{transform:rotate(0)}30.51%{transform:rotate(0)}32.2%{transform:rotate(0)}33.9%{transform:rotate(0)}35.59%{transform:rotate(0)}37.29%{transform:rotate(0)}38.98%{transform:rotate(0)}40.68%{transform:rotate(0)}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{--spectrum-progress-circle-track-border-color:var(--spectrum-gray-300);--spectrum-progress-circle-fill-border-color:var(\n--spectrum-accent-content-color-default\n);--spectrum-progress-circle-track-border-color-over-background:var(\n--spectrum-transparent-white-300\n);--spectrum-progress-circle-fill-border-color-over-background:var(\n--spectrum-transparent-white-900\n);--spectrum-progress-circle-size:var(\n--spectrum-progress-circle-size-medium\n);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-medium\n);--spectrum-progress-circle-track-border-style:solid}:host([size=s]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-small);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-small\n)}.spectrum-ProgressCircle--medium{--spectrum-progress-circle-size:var(\n--spectrum-progress-circle-size-medium\n);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-medium\n)}:host([size=l]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-large);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-large\n)}@media (forced-colors:active){:host{--highcontrast-progress-circle-fill-border-color:Highlight;--highcontrast-progress-circle-fill-border-color-over-background:Highlight}.track{--spectrum-progress-circle-track-border-style:double}}:host{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);direction:ltr;display:inline-block;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);position:relative;transform:translateZ(0)}.track{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-color:var(\n--mod-progress-circle-track-border-color,var(--spectrum-progress-circle-track-border-color)\n);border-radius:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-style:var(\n--highcontrast-progress-circle-track-border-style,var(\n--mod-progress-circle-track-border-style,var(--spectrum-progress-circle-track-border-style)\n)\n);border-width:var(\n--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness)\n);box-sizing:border-box;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n)}.fills{block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0;position:absolute}.fill{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-color:var(\n--highcontrast-progress-circle-fill-border-color,var(\n--mod-progress-circle-fill-border-color,var(--spectrum-progress-circle-fill-border-color)\n)\n);border-radius:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-style:solid;border-width:var(\n--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness)\n);box-sizing:border-box;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n)}:host([static=white]) .track{border-color:var(\n--mod-progress-circle-track-border-color-over-background,var(--spectrum-progress-circle-track-border-color-over-background)\n)}:host([static=white]) .fill{border-color:var(\n--highcontrast-progress-circle-fill-border-color-over-background,var(\n--mod-progress-circle-fill-border-color-over-background,var(--spectrum-progress-circle-fill-border-color-over-background)\n)\n)}.fillMask1,.fillMask2{block-size:100%;inline-size:50%;overflow:hidden;position:absolute;transform:rotate(180deg);transform-origin:100%}.fillSubMask1,.fillSubMask2{block-size:100%;inline-size:100%;overflow:hidden;transform:rotate(-180deg);transform-origin:100%}.fillMask2{transform:rotate(0)}: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}:host{--spectrum-progresscircle-m-over-background-track-fill-color:var(\n--spectrum-alias-track-fill-color-overbackground\n)}slot{display:none}\n`;\nexport default styles;"],
5
5
  "mappings": ";AAWA,SAAS,WAAW;AACpB,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;AA2Df,eAAe;",
6
6
  "names": []
7
7
  }
@@ -55,6 +55,6 @@
55
55
  )
56
56
  )}.fillMask1,.fillMask2{block-size:100%;inline-size:50%;overflow:hidden;position:absolute;transform:rotate(180deg);transform-origin:100%}.fillSubMask1,.fillSubMask2{block-size:100%;inline-size:100%;overflow:hidden;transform:rotate(-180deg);transform-origin:100%}.fillMask2{transform:rotate(0)}: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}:host{--spectrum-progresscircle-m-over-background-track-fill-color:var(
57
57
  --spectrum-alias-track-fill-color-overbackground
58
- )}
58
+ )}slot{display:none}
59
59
  `;export default e;
60
60
  //# sourceMappingURL=progress-circle.css.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["progress-circle.css.ts"],
4
- "sourcesContent": ["/*\nCopyright 2023 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(0)}11.86%{transform:rotate(0)}13.56%{transform:rotate(0)}15.25%{transform:rotate(0)}16.95%{transform:rotate(0)}18.64%{transform:rotate(0)}20.34%{transform:rotate(0)}22.03%{transform:rotate(0)}23.73%{transform:rotate(0)}25.42%{transform:rotate(0)}27.12%{transform:rotate(0)}28.81%{transform:rotate(0)}30.51%{transform:rotate(0)}32.2%{transform:rotate(0)}33.9%{transform:rotate(0)}35.59%{transform:rotate(0)}37.29%{transform:rotate(0)}38.98%{transform:rotate(0)}40.68%{transform:rotate(0)}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{--spectrum-progress-circle-track-border-color:var(--spectrum-gray-300);--spectrum-progress-circle-fill-border-color:var(\n--spectrum-accent-content-color-default\n);--spectrum-progress-circle-track-border-color-over-background:var(\n--spectrum-transparent-white-300\n);--spectrum-progress-circle-fill-border-color-over-background:var(\n--spectrum-transparent-white-900\n);--spectrum-progress-circle-size:var(\n--spectrum-progress-circle-size-medium\n);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-medium\n);--spectrum-progress-circle-track-border-style:solid}:host([size=s]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-small);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-small\n)}.spectrum-ProgressCircle--medium{--spectrum-progress-circle-size:var(\n--spectrum-progress-circle-size-medium\n);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-medium\n)}:host([size=l]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-large);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-large\n)}@media (forced-colors:active){:host{--highcontrast-progress-circle-fill-border-color:Highlight;--highcontrast-progress-circle-fill-border-color-over-background:Highlight}.track{--spectrum-progress-circle-track-border-style:double}}:host{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);direction:ltr;display:inline-block;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);position:relative;transform:translateZ(0)}.track{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-color:var(\n--mod-progress-circle-track-border-color,var(--spectrum-progress-circle-track-border-color)\n);border-radius:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-style:var(\n--highcontrast-progress-circle-track-border-style,var(\n--mod-progress-circle-track-border-style,var(--spectrum-progress-circle-track-border-style)\n)\n);border-width:var(\n--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness)\n);box-sizing:border-box;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n)}.fills{block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0;position:absolute}.fill{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-color:var(\n--highcontrast-progress-circle-fill-border-color,var(\n--mod-progress-circle-fill-border-color,var(--spectrum-progress-circle-fill-border-color)\n)\n);border-radius:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-style:solid;border-width:var(\n--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness)\n);box-sizing:border-box;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n)}:host([static=white]) .track{border-color:var(\n--mod-progress-circle-track-border-color-over-background,var(--spectrum-progress-circle-track-border-color-over-background)\n)}:host([static=white]) .fill{border-color:var(\n--highcontrast-progress-circle-fill-border-color-over-background,var(\n--mod-progress-circle-fill-border-color-over-background,var(--spectrum-progress-circle-fill-border-color-over-background)\n)\n)}.fillMask1,.fillMask2{block-size:100%;inline-size:50%;overflow:hidden;position:absolute;transform:rotate(180deg);transform-origin:100%}.fillSubMask1,.fillSubMask2{block-size:100%;inline-size:100%;overflow:hidden;transform:rotate(-180deg);transform-origin:100%}.fillMask2{transform:rotate(0)}: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}:host{--spectrum-progresscircle-m-over-background-track-fill-color:var(\n--spectrum-alias-track-fill-color-overbackground\n)}\n`;\nexport default styles;"],
4
+ "sourcesContent": ["/*\nCopyright 2023 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(0)}11.86%{transform:rotate(0)}13.56%{transform:rotate(0)}15.25%{transform:rotate(0)}16.95%{transform:rotate(0)}18.64%{transform:rotate(0)}20.34%{transform:rotate(0)}22.03%{transform:rotate(0)}23.73%{transform:rotate(0)}25.42%{transform:rotate(0)}27.12%{transform:rotate(0)}28.81%{transform:rotate(0)}30.51%{transform:rotate(0)}32.2%{transform:rotate(0)}33.9%{transform:rotate(0)}35.59%{transform:rotate(0)}37.29%{transform:rotate(0)}38.98%{transform:rotate(0)}40.68%{transform:rotate(0)}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{--spectrum-progress-circle-track-border-color:var(--spectrum-gray-300);--spectrum-progress-circle-fill-border-color:var(\n--spectrum-accent-content-color-default\n);--spectrum-progress-circle-track-border-color-over-background:var(\n--spectrum-transparent-white-300\n);--spectrum-progress-circle-fill-border-color-over-background:var(\n--spectrum-transparent-white-900\n);--spectrum-progress-circle-size:var(\n--spectrum-progress-circle-size-medium\n);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-medium\n);--spectrum-progress-circle-track-border-style:solid}:host([size=s]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-small);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-small\n)}.spectrum-ProgressCircle--medium{--spectrum-progress-circle-size:var(\n--spectrum-progress-circle-size-medium\n);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-medium\n)}:host([size=l]){--spectrum-progress-circle-size:var(--spectrum-progress-circle-size-large);--spectrum-progress-circle-thickness:var(\n--spectrum-progress-circle-thickness-large\n)}@media (forced-colors:active){:host{--highcontrast-progress-circle-fill-border-color:Highlight;--highcontrast-progress-circle-fill-border-color-over-background:Highlight}.track{--spectrum-progress-circle-track-border-style:double}}:host{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);direction:ltr;display:inline-block;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);position:relative;transform:translateZ(0)}.track{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-color:var(\n--mod-progress-circle-track-border-color,var(--spectrum-progress-circle-track-border-color)\n);border-radius:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-style:var(\n--highcontrast-progress-circle-track-border-style,var(\n--mod-progress-circle-track-border-style,var(--spectrum-progress-circle-track-border-style)\n)\n);border-width:var(\n--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness)\n);box-sizing:border-box;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n)}.fills{block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0;position:absolute}.fill{block-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-color:var(\n--highcontrast-progress-circle-fill-border-color,var(\n--mod-progress-circle-fill-border-color,var(--spectrum-progress-circle-fill-border-color)\n)\n);border-radius:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n);border-style:solid;border-width:var(\n--mod-progress-circle-thickness,var(--spectrum-progress-circle-thickness)\n);box-sizing:border-box;inline-size:var(\n--mod-progress-circle-size,var(--spectrum-progress-circle-size)\n)}:host([static=white]) .track{border-color:var(\n--mod-progress-circle-track-border-color-over-background,var(--spectrum-progress-circle-track-border-color-over-background)\n)}:host([static=white]) .fill{border-color:var(\n--highcontrast-progress-circle-fill-border-color-over-background,var(\n--mod-progress-circle-fill-border-color-over-background,var(--spectrum-progress-circle-fill-border-color-over-background)\n)\n)}.fillMask1,.fillMask2{block-size:100%;inline-size:50%;overflow:hidden;position:absolute;transform:rotate(180deg);transform-origin:100%}.fillSubMask1,.fillSubMask2{block-size:100%;inline-size:100%;overflow:hidden;transform:rotate(-180deg);transform-origin:100%}.fillMask2{transform:rotate(0)}: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}:host{--spectrum-progresscircle-m-over-background-track-fill-color:var(\n--spectrum-alias-track-fill-color-overbackground\n)}slot{display:none}\n`;\nexport default styles;"],
5
5
  "mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;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,EA2Df,eAAeC",
6
6
  "names": ["css", "styles"]
7
7
  }
@@ -29,18 +29,18 @@ export const Default = ({ indeterminate } = {}) => {
29
29
  progress="27"
30
30
  size="s"
31
31
  ?indeterminate=${indeterminate}
32
- label="Loading progess demo"
32
+ label="Loading progress demo"
33
33
  ></sp-progress-circle>
34
34
  <sp-progress-circle
35
35
  progress="27"
36
36
  ?indeterminate=${indeterminate}
37
- label="Loading progess demo"
37
+ label="Loading progress demo"
38
38
  ></sp-progress-circle>
39
39
  <sp-progress-circle
40
40
  progress="27"
41
41
  size="l"
42
42
  ?indeterminate=${indeterminate}
43
- label="Loading progess demo"
43
+ label="Loading progress demo"
44
44
  ></sp-progress-circle>
45
45
  </div>
46
46
  `;
@@ -60,20 +60,20 @@ export const staticWhite = ({
60
60
  static="white"
61
61
  size="s"
62
62
  ?indeterminate=${indeterminate}
63
- label="Loading progess demo"
63
+ label="Loading progress demo"
64
64
  ></sp-progress-circle>
65
65
  <sp-progress-circle
66
66
  progress="53"
67
67
  static="white"
68
68
  ?indeterminate=${indeterminate}
69
- label="Loading progess demo"
69
+ label="Loading progress demo"
70
70
  ></sp-progress-circle>
71
71
  <sp-progress-circle
72
72
  progress="53"
73
73
  static="white"
74
74
  size="l"
75
75
  ?indeterminate=${indeterminate}
76
- label="Loading progess demo"
76
+ label="Loading progress demo"
77
77
  ></sp-progress-circle>
78
78
  </div>
79
79
  `;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["progress-circle.stories.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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/progress-circle/sp-progress-circle.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\nexport default {\n title: 'Progress Circle',\n component: 'sp-progress-circle',\n argTypes: {\n indeterminate: {\n name: 'indeterminate',\n type: { name: 'boolean', required: false },\n description: 'Whether the progress is indeterminate.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n },\n};\n\ninterface StoryArgs {\n indeterminate?: boolean;\n}\n\nexport const Default = ({ indeterminate }: StoryArgs = {}): TemplateResult => {\n return html`\n <div\n style=\"width: 250px; height: 150px; display: flex; align-items: center; justify-content: space-around;\"\n >\n <sp-progress-circle\n progress=\"27\"\n size=\"s\"\n ?indeterminate=${indeterminate}\n label=\"Loading progess demo\"\n ></sp-progress-circle>\n <sp-progress-circle\n progress=\"27\"\n ?indeterminate=${indeterminate}\n label=\"Loading progess demo\"\n ></sp-progress-circle>\n <sp-progress-circle\n progress=\"27\"\n size=\"l\"\n ?indeterminate=${indeterminate}\n label=\"Loading progess demo\"\n ></sp-progress-circle>\n </div>\n `;\n};\nDefault.args = {\n indeterminate: false,\n};\n\nexport const staticWhite = ({\n indeterminate,\n}: StoryArgs = {}): TemplateResult => {\n return html`\n <div\n style=\"width: 250px; height: 150px; background-color: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: space-around;\"\n >\n <sp-progress-circle\n progress=\"53\"\n static=\"white\"\n size=\"s\"\n ?indeterminate=${indeterminate}\n label=\"Loading progess demo\"\n ></sp-progress-circle>\n <sp-progress-circle\n progress=\"53\"\n static=\"white\"\n ?indeterminate=${indeterminate}\n label=\"Loading progess demo\"\n ></sp-progress-circle>\n <sp-progress-circle\n progress=\"53\"\n static=\"white\"\n size=\"l\"\n ?indeterminate=${indeterminate}\n label=\"Loading progess demo\"\n ></sp-progress-circle>\n </div>\n `;\n};\nstaticWhite.args = {\n indeterminate: false,\n};\n\nexport const inButton = ({\n indeterminate,\n}: StoryArgs = {}): TemplateResult => html`\n <sp-button variant=\"black\" style=\"color: white\">\n <sp-progress-circle\n progress=\"53\"\n static=\"white\"\n size=\"s\"\n ?indeterminate=${indeterminate}\n slot=\"icon\"\n label=\"Processing\"\n ></sp-progress-circle>\n Processing...\n </sp-button>\n`;\n"],
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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/progress-circle/sp-progress-circle.js';\nimport '@spectrum-web-components/button/sp-button.js';\n\nexport default {\n title: 'Progress Circle',\n component: 'sp-progress-circle',\n argTypes: {\n indeterminate: {\n name: 'indeterminate',\n type: { name: 'boolean', required: false },\n description: 'Whether the progress is indeterminate.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n },\n};\n\ninterface StoryArgs {\n indeterminate?: boolean;\n}\n\nexport const Default = ({ indeterminate }: StoryArgs = {}): TemplateResult => {\n return html`\n <div\n style=\"width: 250px; height: 150px; display: flex; align-items: center; justify-content: space-around;\"\n >\n <sp-progress-circle\n progress=\"27\"\n size=\"s\"\n ?indeterminate=${indeterminate}\n label=\"Loading progress demo\"\n ></sp-progress-circle>\n <sp-progress-circle\n progress=\"27\"\n ?indeterminate=${indeterminate}\n label=\"Loading progress demo\"\n ></sp-progress-circle>\n <sp-progress-circle\n progress=\"27\"\n size=\"l\"\n ?indeterminate=${indeterminate}\n label=\"Loading progress demo\"\n ></sp-progress-circle>\n </div>\n `;\n};\nDefault.args = {\n indeterminate: false,\n};\n\nexport const staticWhite = ({\n indeterminate,\n}: StoryArgs = {}): TemplateResult => {\n return html`\n <div\n style=\"width: 250px; height: 150px; background-color: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: space-around;\"\n >\n <sp-progress-circle\n progress=\"53\"\n static=\"white\"\n size=\"s\"\n ?indeterminate=${indeterminate}\n label=\"Loading progress demo\"\n ></sp-progress-circle>\n <sp-progress-circle\n progress=\"53\"\n static=\"white\"\n ?indeterminate=${indeterminate}\n label=\"Loading progress demo\"\n ></sp-progress-circle>\n <sp-progress-circle\n progress=\"53\"\n static=\"white\"\n size=\"l\"\n ?indeterminate=${indeterminate}\n label=\"Loading progress demo\"\n ></sp-progress-circle>\n </div>\n `;\n};\nstaticWhite.args = {\n indeterminate: false,\n};\n\nexport const inButton = ({\n indeterminate,\n}: StoryArgs = {}): TemplateResult => html`\n <sp-button variant=\"black\" style=\"color: white\">\n <sp-progress-circle\n progress=\"53\"\n static=\"white\"\n size=\"s\"\n ?indeterminate=${indeterminate}\n slot=\"icon\"\n label=\"Processing\"\n ></sp-progress-circle>\n Processing...\n </sp-button>\n`;\n"],
5
5
  "mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AACP,OAAO;AAEP,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,IACN,eAAe;AAAA,MACX,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAAA,MACzC,aAAa;AAAA,MACb,OAAO;AAAA,QACH,MAAM,EAAE,SAAS,UAAU;AAAA,QAC3B,cAAc,EAAE,SAAS,MAAM;AAAA,MACnC;AAAA,MACA,SAAS;AAAA,QACL,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,EACJ;AACJ;AAMO,aAAM,UAAU,CAAC,EAAE,cAAc,IAAe,CAAC,MAAsB;AAC1E,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAOsB;AAAA;AAAA;AAAA;AAAA;AAAA,iCAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAMA;AAAA;AAAA;AAAA;AAAA;AAKjC;AACA,QAAQ,OAAO;AAAA,EACX,eAAe;AACnB;AAEO,aAAM,cAAc,CAAC;AAAA,EACxB;AACJ,IAAe,CAAC,MAAsB;AAClC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAQsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAOA;AAAA;AAAA;AAAA;AAAA;AAKjC;AACA,YAAY,OAAO;AAAA,EACf,eAAe;AACnB;AAEO,aAAM,WAAW,CAAC;AAAA,EACrB;AACJ,IAAe,CAAC,MAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAMT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -28,6 +28,15 @@ describe("ProgressCircle", () => {
28
28
  expect(el).to.not.be.undefined;
29
29
  await expect(el).to.be.accessible();
30
30
  });
31
+ it("accepts label from `slot`", async () => {
32
+ const el = await fixture(html`
33
+ <sp-progress-circle role="progressbar">
34
+ Label From Slot
35
+ </sp-progress-circle>
36
+ `);
37
+ await elementUpdated(el);
38
+ expect(el.getAttribute("aria-label")).to.equal("Label From Slot");
39
+ });
31
40
  it("accepts user `role`", async () => {
32
41
  const el = await fixture(html`
33
42
  <sp-progress-circle
@@ -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 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 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('warns in Dev Mode when accessible attributes are not leveraged', async () => {\n const consoleWarnStub = stub(console, 'warn');\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).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 consoleWarnStub.restore();\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,KAAG,SAAS,YAAY;AACpB,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA,SAExC;AAED,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AAErB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,2BAA2B,YAAY;AACtC,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA;AAAA;AAAA;AAAA,SAKxC;AAED,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AAErB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,uBAAuB,YAAY;AAClC,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA;AAAA;AAAA;AAAA,SAKxC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,MAAM,CAAC,EAAE,GAAG,MAAM,aAAa;AAAA,EAC1D,CAAC;AACD,KAAG,4BAA4B,YAAY;AACvC,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA;AAAA;AAAA;AAAA,SAKxC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,GAAG;AAC/C,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,MAAM,IAAI;AAEtD,OAAG,gBAAgB;AAEnB,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,GAAG;AAAA,EACnD,CAAC;AACD,KAAG,kEAAkE,YAAY;AAC7E,UAAM,kBAAkB,KAAK,SAAS,MAAM;AAC5C,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA,SAExC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,gBAAgB,MAAM,EAAE,GAAG,GAAG;AACrC,UAAM,UAAU,gBAAgB,QAAQ,CAAC;AACzC;AAAA,MACI,QAAQ,KAAK,GAAG,CAAC,EAAE,SAAS,YAAY;AAAA,MACxC;AAAA,IACJ,EAAE,GAAG,GAAG;AACR,WAAO,QAAQ,KAAK,GAAG,EAAE,GAAG,sBAAsB,EAAE,GAAG,KAAK,MAAM;AAAA,MAC9D,MAAM;AAAA,QACF,WAAW;AAAA,QACX,MAAM;AAAA,QACN,OAAO;AAAA,MACX;AAAA,IACJ,CAAC;AACD,oBAAgB,QAAQ;AAAA,EAC5B,CAAC;AACL,CAAC;",
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '@spectrum-web-components/progress-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 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('warns in Dev Mode when accessible attributes are not leveraged', async () => {\n const consoleWarnStub = stub(console, 'warn');\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).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 consoleWarnStub.restore();\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,KAAG,SAAS,YAAY;AACpB,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA,SAExC;AAED,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AAErB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,2BAA2B,YAAY;AACtC,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA;AAAA;AAAA;AAAA,SAKxC;AAED,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AAErB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,6BAA6B,YAAY;AACxC,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA;AAAA;AAAA,SAIxC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,YAAY,CAAC,EAAE,GAAG,MAAM,iBAAiB;AAAA,EACpE,CAAC;AACD,KAAG,uBAAuB,YAAY;AAClC,UAAM,KAAK,MAAM,QAAwB;AAAA;AAAA;AAAA;AAAA;AAAA,SAKxC;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,MAAM,CAAC,EAAE,GAAG,MAAM,aAAa;AAAA,EAC1D,C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