@spectrum-web-components/progress-bar 1.12.2 → 1.12.3-snapshot-test.20260717104105

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.
@@ -45,6 +45,7 @@
45
45
  },
46
46
  "privacy": "public",
47
47
  "default": "''",
48
+ "deprecated": "The `label` string attribute will be replaced by a `label`\nnamed slot in a future release.",
48
49
  "attribute": "label",
49
50
  "reflects": true
50
51
  },
@@ -81,6 +82,7 @@
81
82
  },
82
83
  "privacy": "public",
83
84
  "default": "false",
85
+ "deprecated": "The `side-label` attribute will be replaced by\n`label-position=\"side\"` in a future release.",
84
86
  "attribute": "side-label",
85
87
  "reflects": true
86
88
  },
@@ -92,6 +94,7 @@
92
94
  },
93
95
  "privacy": "public",
94
96
  "default": "0",
97
+ "deprecated": "The `progress` property will be replaced by `value` in a\nfuture release.",
95
98
  "attribute": "progress"
96
99
  },
97
100
  {
@@ -148,6 +151,7 @@
148
151
  "text": "string"
149
152
  },
150
153
  "default": "''",
154
+ "deprecated": "The `label` string attribute will be replaced by a `label`\nnamed slot in a future release.",
151
155
  "fieldName": "label"
152
156
  },
153
157
  {
@@ -164,6 +168,7 @@
164
168
  "text": "boolean"
165
169
  },
166
170
  "default": "false",
171
+ "deprecated": "The `side-label` attribute will be replaced by\n`label-position=\"side\"` in a future release.",
167
172
  "fieldName": "sideLabel"
168
173
  },
169
174
  {
@@ -172,6 +177,7 @@
172
177
  "text": "number"
173
178
  },
174
179
  "default": "0",
180
+ "deprecated": "The `progress` property will be replaced by `value` in a\nfuture release.",
175
181
  "fieldName": "progress"
176
182
  },
177
183
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/progress-bar",
3
- "version": "1.12.2",
3
+ "version": "1.12.3-snapshot-test.20260717104105",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Adobe",
@@ -54,10 +54,10 @@
54
54
  ],
55
55
  "types": "./src/index.d.ts",
56
56
  "dependencies": {
57
- "@spectrum-web-components/base": "1.12.2",
58
- "@spectrum-web-components/field-label": "1.12.2",
59
- "@spectrum-web-components/reactive-controllers": "1.12.2",
60
- "@spectrum-web-components/shared": "1.12.2"
57
+ "@spectrum-web-components/base": "1.12.3-snapshot-test.20260717104105",
58
+ "@spectrum-web-components/field-label": "1.12.3-snapshot-test.20260717104105",
59
+ "@spectrum-web-components/reactive-controllers": "1.12.3-snapshot-test.20260717104105",
60
+ "@spectrum-web-components/shared": "1.12.3-snapshot-test.20260717104105"
61
61
  },
62
62
  "keywords": [
63
63
  "design-system",
@@ -21,6 +21,10 @@ declare const ProgressBar_base: typeof SpectrumElement & {
21
21
  export declare class ProgressBar extends ProgressBar_base {
22
22
  static get styles(): CSSResultArray;
23
23
  indeterminate: boolean;
24
+ /**
25
+ * @deprecated The `label` string attribute will be replaced by a `label`
26
+ * named slot in a future release.
27
+ */
24
28
  label: string;
25
29
  private languageResolver;
26
30
  /**
@@ -29,7 +33,15 @@ export declare class ProgressBar extends ProgressBar_base {
29
33
  get overBackground(): boolean;
30
34
  set overBackground(overBackground: boolean);
31
35
  private _overBackground;
36
+ /**
37
+ * @deprecated The `side-label` attribute will be replaced by
38
+ * `label-position="side"` in a future release.
39
+ */
32
40
  sideLabel: boolean;
41
+ /**
42
+ * @deprecated The `progress` property will be replaced by `value` in a
43
+ * future release.
44
+ */
33
45
  progress: number;
34
46
  staticColor?: 'white';
35
47
  private slotEl;
@@ -134,6 +134,32 @@ export class ProgressBar extends SizedMixin(
134
134
  this.removeAttribute("aria-label");
135
135
  }
136
136
  }
137
+ if (true) {
138
+ if (changes.has("label") && this.label.length > 0) {
139
+ window.__swc.warn(
140
+ this,
141
+ `The "label" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use a "label" named slot, or set "aria-label" or "aria-labelledby" on the element instead.`,
142
+ "https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility",
143
+ { level: "deprecation" }
144
+ );
145
+ }
146
+ if (changes.has("sideLabel") && this.sideLabel) {
147
+ window.__swc.warn(
148
+ this,
149
+ `The "side-label" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use label-position="side" instead.`,
150
+ "https://opensource.adobe.com/spectrum-web-components/components/progress-bar/",
151
+ { level: "deprecation" }
152
+ );
153
+ }
154
+ if (changes.has("progress") && this.progress !== 0) {
155
+ window.__swc.warn(
156
+ this,
157
+ `The "progress" property on <${this.localName}> has been deprecated and will be removed in a future release. Use the "value" attribute instead.`,
158
+ "https://opensource.adobe.com/spectrum-web-components/components/progress-bar/",
159
+ { level: "deprecation" }
160
+ );
161
+ }
162
+ }
137
163
  if (true) {
138
164
  if (!this.label && !this.getAttribute("aria-label") && !this.getAttribute("aria-labelledby") && !this.slotHasContent) {
139
165
  window.__swc.warn(
@@ -144,7 +170,7 @@ export class ProgressBar extends SizedMixin(
144
170
  type: "accessibility",
145
171
  issues: [
146
172
  'value supplied to the "label" attribute, which will be displayed visually as part of the element, or',
147
- "text content supplied directly to the <sp-progress-circle> element, or",
173
+ "text content supplied directly to the <sp-progress-bar> element, or",
148
174
  'value supplied to the "aria-label" attribute, which will only be provided to screen readers, or',
149
175
  '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.'
150
176
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["ProgressBar.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n nothing,\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 {\n LanguageResolutionController,\n languageResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.js';\nimport { getLabelFromSlot } from '@spectrum-web-components/shared/src/get-label-from-slot.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\n\nimport '@spectrum-web-components/field-label/sp-field-label.js';\n\nimport styles from './progress-bar.css.js';\n\n/**\n * @element sp-progress-bar\n */\nexport class ProgressBar extends SizedMixin(\n ObserveSlotText(SpectrumElement, ''),\n {\n noDefaultSize: true,\n }\n) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n @property({ type: String, reflect: true })\n public label = '';\n\n private languageResolver = new LanguageResolutionController(this);\n\n /**\n * @deprecated Use \"static-color='white'\" instead.\n */\n @property({ type: Boolean, attribute: 'over-background' })\n public get overBackground(): boolean {\n return this._overBackground ? true : false;\n }\n\n public set overBackground(overBackground: boolean) {\n if (overBackground === true) {\n this.removeAttribute('over-background');\n this.staticColor = 'white';\n\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"over-background\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static-color='white'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#variants',\n {\n level: 'deprecation',\n }\n );\n }\n }\n }\n private _overBackground: boolean = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n public sideLabel = false;\n\n @property({ type: Number })\n public progress = 0;\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white';\n\n @query('slot')\n private slotEl!: HTMLSlotElement;\n\n protected override render(): TemplateResult {\n return html`\n ${this.slotHasContent || this.label\n ? html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.slotHasContent ? nothing : this.label}\n <slot @slotchange=${this.handleSlotchange}></slot>\n </sp-field-label>\n `\n : nothing}\n ${this.label\n ? html`\n ${this.indeterminate\n ? nothing\n : html`\n <sp-field-label size=${this.size} class=\"percentage\">\n ${this.formatProgress()}\n </sp-field-label>\n `}\n `\n : nothing}\n <div class=\"track\">\n <div\n class=\"fill\"\n style=\"transform: scaleX(calc(${this.progress} / 100));\"\n ></div>\n </div>\n `;\n }\n\n protected 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 private formatProgress(): string {\n return new Intl.NumberFormat(this.languageResolver.language, {\n style: 'percent',\n unitDisplay: 'narrow',\n }).format(this.progress / 100);\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('indeterminate')) {\n if (this.indeterminate) {\n this.removeAttribute('aria-valuemin');\n this.removeAttribute('aria-valuemax');\n this.removeAttribute('aria-valuenow');\n this.removeAttribute('aria-valuetext');\n } else {\n this.setAttribute('aria-valuemin', '0');\n this.setAttribute('aria-valuemax', '100');\n this.setAttribute('aria-valuenow', '' + this.progress);\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n }\n if (!this.indeterminate && changes.has('progress')) {\n this.setAttribute('aria-valuenow', '' + this.progress);\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n if (!this.indeterminate && changes.has(languageResolverUpdatedSymbol)) {\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n if (changes.has('label')) {\n if (this.label.length) {\n this.setAttribute('aria-label', this.label);\n } else if (changes.get('label') === this.getAttribute('aria-label')) {\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.slotHasContent\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-bar> elements need one of the following to be accessible:',\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility',\n {\n type: 'accessibility',\n issues: [\n 'value supplied to the \"label\" attribute, which will be displayed visually as part of the element, or',\n '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,EAEE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAEhC,OAAO;AAEP,OAAO,YAAY;AAKZ,aAAM,oBAAoB;AAAA,EAC/B,gBAAgB,iBAAiB,EAAE;AAAA,EACnC;AAAA,IACE,eAAe;AAAA,EACjB;AACF,EAAE;AAAA,EALK;AAAA;AAWL,SAAO,gBAAgB;AAGvB,SAAO,QAAQ;AAEf,SAAQ,mBAAmB,IAAI,6BAA6B,IAAI;AA2BhE,SAAQ,kBAA2B;AAGnC,SAAO,YAAY;AAGnB,SAAO,WAAW;AAAA;AAAA,EA3ClB,WAA2B,SAAyB;AAClD,WAAO,CAAC,MAAM;AAAA,EAChB;AAAA,EAcA,IAAW,iBAA0B;AACnC,WAAO,KAAK,kBAAkB,OAAO;AAAA,EACvC;AAAA,EAEA,IAAW,eAAe,gBAAyB;AACjD,QAAI,mBAAmB,MAAM;AAC3B,WAAK,gBAAgB,iBAAiB;AACtC,WAAK,cAAc;AAEnB,UAAI,MAAqB;AACvB,eAAO,MAAM;AAAA,UACX;AAAA,UACA,uCAAuC,KAAK,SAAS;AAAA,UACrD;AAAA,UACA;AAAA,YACE,OAAO;AAAA,UACT;AAAA,QACF;AAAA,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AAC;AAAA,GA7CxD,YA8CJ;AAGA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAhDf,YAiDJ;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GAnD3C,YAoDJ;AAGC;AAAA,EADP,MAAM,MAAM;AAAA,GAtDF,YAuDH;",
4
+ "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n nothing,\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 {\n LanguageResolutionController,\n languageResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.js';\nimport { getLabelFromSlot } from '@spectrum-web-components/shared/src/get-label-from-slot.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\n\nimport '@spectrum-web-components/field-label/sp-field-label.js';\n\nimport styles from './progress-bar.css.js';\n\n/**\n * @element sp-progress-bar\n */\nexport class ProgressBar extends SizedMixin(\n ObserveSlotText(SpectrumElement, ''),\n {\n noDefaultSize: true,\n }\n) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n /**\n * @deprecated The `label` string attribute will be replaced by a `label`\n * named slot in a future release.\n */\n @property({ type: String, reflect: true })\n public label = '';\n\n private languageResolver = new LanguageResolutionController(this);\n\n /**\n * @deprecated Use \"static-color='white'\" instead.\n */\n @property({ type: Boolean, attribute: 'over-background' })\n public get overBackground(): boolean {\n return this._overBackground ? true : false;\n }\n\n public set overBackground(overBackground: boolean) {\n if (overBackground === true) {\n this.removeAttribute('over-background');\n this.staticColor = 'white';\n\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"over-background\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static-color='white'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#variants',\n {\n level: 'deprecation',\n }\n );\n }\n }\n }\n private _overBackground: boolean = false;\n\n /**\n * @deprecated The `side-label` attribute will be replaced by\n * `label-position=\"side\"` in a future release.\n */\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n public sideLabel = false;\n\n /**\n * @deprecated The `progress` property will be replaced by `value` in a\n * future release.\n */\n @property({ type: Number })\n public progress = 0;\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white';\n\n @query('slot')\n private slotEl!: HTMLSlotElement;\n\n protected override render(): TemplateResult {\n return html`\n ${this.slotHasContent || this.label\n ? html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.slotHasContent ? nothing : this.label}\n <slot @slotchange=${this.handleSlotchange}></slot>\n </sp-field-label>\n `\n : nothing}\n ${this.label\n ? html`\n ${this.indeterminate\n ? nothing\n : html`\n <sp-field-label size=${this.size} class=\"percentage\">\n ${this.formatProgress()}\n </sp-field-label>\n `}\n `\n : nothing}\n <div class=\"track\">\n <div\n class=\"fill\"\n style=\"transform: scaleX(calc(${this.progress} / 100));\"\n ></div>\n </div>\n `;\n }\n\n protected 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 private formatProgress(): string {\n return new Intl.NumberFormat(this.languageResolver.language, {\n style: 'percent',\n unitDisplay: 'narrow',\n }).format(this.progress / 100);\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('indeterminate')) {\n if (this.indeterminate) {\n this.removeAttribute('aria-valuemin');\n this.removeAttribute('aria-valuemax');\n this.removeAttribute('aria-valuenow');\n this.removeAttribute('aria-valuetext');\n } else {\n this.setAttribute('aria-valuemin', '0');\n this.setAttribute('aria-valuemax', '100');\n this.setAttribute('aria-valuenow', '' + this.progress);\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n }\n if (!this.indeterminate && changes.has('progress')) {\n this.setAttribute('aria-valuenow', '' + this.progress);\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n if (!this.indeterminate && changes.has(languageResolverUpdatedSymbol)) {\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n if (changes.has('label')) {\n if (this.label.length) {\n this.setAttribute('aria-label', this.label);\n } else if (changes.get('label') === this.getAttribute('aria-label')) {\n this.removeAttribute('aria-label');\n }\n }\n\n if (window.__swc?.DEBUG) {\n if (changes.has('label') && this.label.length > 0) {\n window.__swc.warn(\n this,\n `The \"label\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use a \"label\" named slot, or set \"aria-label\" or \"aria-labelledby\" on the element instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility',\n { level: 'deprecation' }\n );\n }\n if (changes.has('sideLabel') && this.sideLabel) {\n window.__swc.warn(\n this,\n `The \"side-label\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use label-position=\"side\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/',\n { level: 'deprecation' }\n );\n }\n if (changes.has('progress') && this.progress !== 0) {\n window.__swc.warn(\n this,\n `The \"progress\" property on <${this.localName}> has been deprecated and will be removed in a future release. Use the \"value\" attribute instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/',\n { level: 'deprecation' }\n );\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.slotHasContent\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-bar> elements need one of the following to be accessible:',\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility',\n {\n type: 'accessibility',\n issues: [\n 'value supplied to the \"label\" attribute, which will be displayed visually as part of the element, or',\n 'text content supplied directly to the <sp-progress-bar> 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,EAEE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAEhC,OAAO;AAEP,OAAO,YAAY;AAKZ,aAAM,oBAAoB;AAAA,EAC/B,gBAAgB,iBAAiB,EAAE;AAAA,EACnC;AAAA,IACE,eAAe;AAAA,EACjB;AACF,EAAE;AAAA,EALK;AAAA;AAWL,SAAO,gBAAgB;AAOvB,SAAO,QAAQ;AAEf,SAAQ,mBAAmB,IAAI,6BAA6B,IAAI;AA2BhE,SAAQ,kBAA2B;AAOnC,SAAO,YAAY;AAOnB,SAAO,WAAW;AAAA;AAAA,EAvDlB,WAA2B,SAAyB;AAClD,WAAO,CAAC,MAAM;AAAA,EAChB;AAAA,EAkBA,IAAW,iBAA0B;AACnC,WAAO,KAAK,kBAAkB,OAAO;AAAA,EACvC;AAAA,EAEA,IAAW,eAAe,gBAAyB;AACjD,QAAI,mBAAmB,MAAM;AAC3B,WAAK,gBAAgB,iBAAiB;AACtC,WAAK,cAAc;AAEnB,UAAI,MAAqB;AACvB,eAAO,MAAM;AAAA,UAC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B;AAAA,MACF;AAAA,IACF;AAEA,QAAI,MAAqB;AACvB,UACE,CAAC,KAAK,SACN,CAAC,KAAK,aAAa,YAAY,KAC/B,CAAC,KAAK,aAAa,iBAAiB,KACpC,CAAC,KAAK,gBACN;AACA,eAAO,MAAM;AAAA,UACX;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,YACE,MAAM;AAAA,YACN,QAAQ;AAAA,cACN;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AA9LS;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAV/B,YAWJ;AAOA;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAjB9B,YAkBJ;AAQI;AAAA,EADV,SAAS,EAAE,MAAM,SAAS,WAAW,kBAAkB,CAAC;AAAA,GAzB9C,YA0BA;AA4BJ;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,aAAa,CAAC;AAAA,GArDxD,YAsDJ;AAOA;AAAA,EADN,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA5Df,YA6DJ;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GA/D3C,YAgEJ;AAGC;AAAA,EADP,MAAM,MAAM;AAAA,GAlEF,YAmEH;",
6
6
  "names": []
7
7
  }
@@ -1,12 +1,12 @@
1
- "use strict";var p=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var t=(n,a,e,l)=>{for(var i=l>1?void 0:l?h(a,e):a,u=n.length-1,b;u>=0;u--)(b=n[u])&&(i=(l?b(a,e,i):b(i))||i);return l&&i&&p(a,e,i),i};import{html as s,nothing as o,SizedMixin as d,SpectrumElement as c}from"@spectrum-web-components/base";import{property as r,query as m}from"@spectrum-web-components/base/src/decorators.js";import{LanguageResolutionController as v,languageResolverUpdatedSymbol as f}from"@spectrum-web-components/reactive-controllers/src/LanguageResolution.js";import{getLabelFromSlot as g}from"@spectrum-web-components/shared/src/get-label-from-slot.js";import{ObserveSlotText as w}from"@spectrum-web-components/shared/src/observe-slot-text.js";import"@spectrum-web-components/field-label/sp-field-label.js";import y from"./progress-bar.css.js";export class ProgressBar extends d(w(c,""),{noDefaultSize:!0}){constructor(){super(...arguments);this.indeterminate=!1;this.label="";this.languageResolver=new v(this);this._overBackground=!1;this.sideLabel=!1;this.progress=0}static get styles(){return[y]}get overBackground(){return!!this._overBackground}set overBackground(e){e===!0&&(this.removeAttribute("over-background"),this.staticColor="white")}render(){return s`
2
- ${this.slotHasContent||this.label?s`
1
+ "use strict";var u=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var t=(n,a,e,s)=>{for(var r=s>1?void 0:s?d(a,e):a,b=n.length-1,p;b>=0;b--)(p=n[b])&&(r=(s?p(a,e,r):p(r))||r);return s&&r&&u(a,e,r),r};import{html as l,nothing as o,SizedMixin as h,SpectrumElement as c}from"@spectrum-web-components/base";import{property as i,query as m}from"@spectrum-web-components/base/src/decorators.js";import{LanguageResolutionController as v,languageResolverUpdatedSymbol as w}from"@spectrum-web-components/reactive-controllers/src/LanguageResolution.js";import{getLabelFromSlot as f}from"@spectrum-web-components/shared/src/get-label-from-slot.js";import{ObserveSlotText as g}from"@spectrum-web-components/shared/src/observe-slot-text.js";import"@spectrum-web-components/field-label/sp-field-label.js";import y from"./progress-bar.css.js";export class ProgressBar extends h(g(c,""),{noDefaultSize:!0}){constructor(){super(...arguments);this.indeterminate=!1;this.label="";this.languageResolver=new v(this);this._overBackground=!1;this.sideLabel=!1;this.progress=0}static get styles(){return[y]}get overBackground(){return!!this._overBackground}set overBackground(e){e===!0&&(this.removeAttribute("over-background"),this.staticColor="white")}render(){return l`
2
+ ${this.slotHasContent||this.label?l`
3
3
  <sp-field-label size=${this.size} class="label">
4
4
  ${this.slotHasContent?o:this.label}
5
5
  <slot @slotchange=${this.handleSlotchange}></slot>
6
6
  </sp-field-label>
7
7
  `:o}
8
- ${this.label?s`
9
- ${this.indeterminate?o:s`
8
+ ${this.label?l`
9
+ ${this.indeterminate?o:l`
10
10
  <sp-field-label size=${this.size} class="percentage">
11
11
  ${this.formatProgress()}
12
12
  </sp-field-label>
@@ -18,5 +18,5 @@
18
18
  style="transform: scaleX(calc(${this.progress} / 100));"
19
19
  ></div>
20
20
  </div>
21
- `}handleSlotchange(){const e=g(this.label,this.slotEl);e&&(this.label=e)}firstUpdated(e){super.firstUpdated(e),this.hasAttribute("role")||this.setAttribute("role","progressbar")}formatProgress(){return new Intl.NumberFormat(this.languageResolver.language,{style:"percent",unitDisplay:"narrow"}).format(this.progress/100)}updated(e){super.updated(e),e.has("indeterminate")&&(this.indeterminate?(this.removeAttribute("aria-valuemin"),this.removeAttribute("aria-valuemax"),this.removeAttribute("aria-valuenow"),this.removeAttribute("aria-valuetext")):(this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax","100"),this.setAttribute("aria-valuenow",""+this.progress),this.setAttribute("aria-valuetext",this.formatProgress()))),!this.indeterminate&&e.has("progress")&&(this.setAttribute("aria-valuenow",""+this.progress),this.setAttribute("aria-valuetext",this.formatProgress())),!this.indeterminate&&e.has(f)&&this.setAttribute("aria-valuetext",this.formatProgress()),e.has("label")&&(this.label.length?this.setAttribute("aria-label",this.label):e.get("label")===this.getAttribute("aria-label")&&this.removeAttribute("aria-label"))}}t([r({type:Boolean,reflect:!0})],ProgressBar.prototype,"indeterminate",2),t([r({type:String,reflect:!0})],ProgressBar.prototype,"label",2),t([r({type:Boolean,attribute:"over-background"})],ProgressBar.prototype,"overBackground",1),t([r({type:Boolean,reflect:!0,attribute:"side-label"})],ProgressBar.prototype,"sideLabel",2),t([r({type:Number})],ProgressBar.prototype,"progress",2),t([r({reflect:!0,attribute:"static-color"})],ProgressBar.prototype,"staticColor",2),t([m("slot")],ProgressBar.prototype,"slotEl",2);
21
+ `}handleSlotchange(){const e=f(this.label,this.slotEl);e&&(this.label=e)}firstUpdated(e){super.firstUpdated(e),this.hasAttribute("role")||this.setAttribute("role","progressbar")}formatProgress(){return new Intl.NumberFormat(this.languageResolver.language,{style:"percent",unitDisplay:"narrow"}).format(this.progress/100)}updated(e){super.updated(e),e.has("indeterminate")&&(this.indeterminate?(this.removeAttribute("aria-valuemin"),this.removeAttribute("aria-valuemax"),this.removeAttribute("aria-valuenow"),this.removeAttribute("aria-valuetext")):(this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax","100"),this.setAttribute("aria-valuenow",""+this.progress),this.setAttribute("aria-valuetext",this.formatProgress()))),!this.indeterminate&&e.has("progress")&&(this.setAttribute("aria-valuenow",""+this.progress),this.setAttribute("aria-valuetext",this.formatProgress())),!this.indeterminate&&e.has(w)&&this.setAttribute("aria-valuetext",this.formatProgress()),e.has("label")&&(this.label.length?this.setAttribute("aria-label",this.label):e.get("label")===this.getAttribute("aria-label")&&this.removeAttribute("aria-label"))}}t([i({type:Boolean,reflect:!0})],ProgressBar.prototype,"indeterminate",2),t([i({type:String,reflect:!0})],ProgressBar.prototype,"label",2),t([i({type:Boolean,attribute:"over-background"})],ProgressBar.prototype,"overBackground",1),t([i({type:Boolean,reflect:!0,attribute:"side-label"})],ProgressBar.prototype,"sideLabel",2),t([i({type:Number})],ProgressBar.prototype,"progress",2),t([i({reflect:!0,attribute:"static-color"})],ProgressBar.prototype,"staticColor",2),t([m("slot")],ProgressBar.prototype,"slotEl",2);
22
22
  //# sourceMappingURL=ProgressBar.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["ProgressBar.ts"],
4
- "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n nothing,\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 {\n LanguageResolutionController,\n languageResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.js';\nimport { getLabelFromSlot } from '@spectrum-web-components/shared/src/get-label-from-slot.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\n\nimport '@spectrum-web-components/field-label/sp-field-label.js';\n\nimport styles from './progress-bar.css.js';\n\n/**\n * @element sp-progress-bar\n */\nexport class ProgressBar extends SizedMixin(\n ObserveSlotText(SpectrumElement, ''),\n {\n noDefaultSize: true,\n }\n) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n @property({ type: String, reflect: true })\n public label = '';\n\n private languageResolver = new LanguageResolutionController(this);\n\n /**\n * @deprecated Use \"static-color='white'\" instead.\n */\n @property({ type: Boolean, attribute: 'over-background' })\n public get overBackground(): boolean {\n return this._overBackground ? true : false;\n }\n\n public set overBackground(overBackground: boolean) {\n if (overBackground === true) {\n this.removeAttribute('over-background');\n this.staticColor = 'white';\n\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"over-background\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static-color='white'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#variants',\n {\n level: 'deprecation',\n }\n );\n }\n }\n }\n private _overBackground: boolean = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n public sideLabel = false;\n\n @property({ type: Number })\n public progress = 0;\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white';\n\n @query('slot')\n private slotEl!: HTMLSlotElement;\n\n protected override render(): TemplateResult {\n return html`\n ${this.slotHasContent || this.label\n ? html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.slotHasContent ? nothing : this.label}\n <slot @slotchange=${this.handleSlotchange}></slot>\n </sp-field-label>\n `\n : nothing}\n ${this.label\n ? html`\n ${this.indeterminate\n ? nothing\n : html`\n <sp-field-label size=${this.size} class=\"percentage\">\n ${this.formatProgress()}\n </sp-field-label>\n `}\n `\n : nothing}\n <div class=\"track\">\n <div\n class=\"fill\"\n style=\"transform: scaleX(calc(${this.progress} / 100));\"\n ></div>\n </div>\n `;\n }\n\n protected 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 private formatProgress(): string {\n return new Intl.NumberFormat(this.languageResolver.language, {\n style: 'percent',\n unitDisplay: 'narrow',\n }).format(this.progress / 100);\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('indeterminate')) {\n if (this.indeterminate) {\n this.removeAttribute('aria-valuemin');\n this.removeAttribute('aria-valuemax');\n this.removeAttribute('aria-valuenow');\n this.removeAttribute('aria-valuetext');\n } else {\n this.setAttribute('aria-valuemin', '0');\n this.setAttribute('aria-valuemax', '100');\n this.setAttribute('aria-valuenow', '' + this.progress);\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n }\n if (!this.indeterminate && changes.has('progress')) {\n this.setAttribute('aria-valuenow', '' + this.progress);\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n if (!this.indeterminate && changes.has(languageResolverUpdatedSymbol)) {\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n if (changes.has('label')) {\n if (this.label.length) {\n this.setAttribute('aria-label', this.label);\n } else if (changes.get('label') === this.getAttribute('aria-label')) {\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.slotHasContent\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-bar> elements need one of the following to be accessible:',\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility',\n {\n type: 'accessibility',\n issues: [\n 'value supplied to the \"label\" attribute, which will be displayed visually as part of the element, or',\n '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,OAEE,QAAAA,EACA,WAAAC,EAEA,cAAAC,EACA,mBAAAC,MAEK,gCACP,OACE,YAAAC,EACA,SAAAC,MACK,kDACP,OACE,gCAAAC,EACA,iCAAAC,MACK,0EACP,OAAS,oBAAAC,MAAwB,6DACjC,OAAS,mBAAAC,MAAuB,2DAEhC,MAAO,yDAEP,OAAOC,MAAY,wBAKZ,aAAM,oBAAoBR,EAC/BO,EAAgBN,EAAiB,EAAE,EACnC,CACE,cAAe,EACjB,CACF,CAAE,CALK,kCAWL,KAAO,cAAgB,GAGvB,KAAO,MAAQ,GAEf,KAAQ,iBAAmB,IAAIG,EAA6B,IAAI,EA2BhE,KAAQ,gBAA2B,GAGnC,KAAO,UAAY,GAGnB,KAAO,SAAW,EA3ClB,WAA2B,QAAyB,CAClD,MAAO,CAACI,CAAM,CAChB,CAcA,IAAW,gBAA0B,CACnC,MAAO,OAAK,eACd,CAEA,IAAW,eAAeC,EAAyB,CAC7CA,IAAmB,KACrB,KAAK,gBAAgB,iBAAiB,EACtC,KAAK,YAAc,QAavB,CAemB,QAAyB,CAC1C,OAAOX;AAAA,QACH,KAAK,gBAAkB,KAAK,MAC1BA;AAAA,mCACyB,KAAK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Aa,iBAAkB,KAAK,eAAe,CAAC,EAEvDM,EAAQ,IAAI,OAAO,IACjB,KAAK,MAAM,OACb,KAAK,aAAa,aAAc,KAAK,KAAK,EACjCA,EAAQ,IAAI,OAAO,IAAM,KAAK,aAAa,YAAY,GAChE,KAAK,gBAAgB,YAAY,EA2BvC,CACF,CAvJSC,EAAA,CADNV,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAV/B,YAWJ,6BAGAU,EAAA,CADNV,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAb9B,YAcJ,qBAQIU,EAAA,CADVV,EAAS,CAAE,KAAM,QAAS,UAAW,iBAAkB,CAAC,GArB9C,YAsBA,8BAwBJU,EAAA,CADNV,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,YAAa,CAAC,GA7CxD,YA8CJ,yBAGAU,EAAA,CADNV,EAAS,CAAE,KAAM,MAAO,CAAC,GAhDf,YAiDJ,wBAGAU,EAAA,CADNV,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GAnD3C,YAoDJ,2BAGCU,EAAA,CADPT,EAAM,MAAM,GAtDF,YAuDH",
4
+ "sourcesContent": ["/**\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CSSResultArray,\n html,\n nothing,\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 {\n LanguageResolutionController,\n languageResolverUpdatedSymbol,\n} from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.js';\nimport { getLabelFromSlot } from '@spectrum-web-components/shared/src/get-label-from-slot.js';\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\n\nimport '@spectrum-web-components/field-label/sp-field-label.js';\n\nimport styles from './progress-bar.css.js';\n\n/**\n * @element sp-progress-bar\n */\nexport class ProgressBar extends SizedMixin(\n ObserveSlotText(SpectrumElement, ''),\n {\n noDefaultSize: true,\n }\n) {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n /**\n * @deprecated The `label` string attribute will be replaced by a `label`\n * named slot in a future release.\n */\n @property({ type: String, reflect: true })\n public label = '';\n\n private languageResolver = new LanguageResolutionController(this);\n\n /**\n * @deprecated Use \"static-color='white'\" instead.\n */\n @property({ type: Boolean, attribute: 'over-background' })\n public get overBackground(): boolean {\n return this._overBackground ? true : false;\n }\n\n public set overBackground(overBackground: boolean) {\n if (overBackground === true) {\n this.removeAttribute('over-background');\n this.staticColor = 'white';\n\n if (window.__swc?.DEBUG) {\n window.__swc.warn(\n this,\n `The \"over-background\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static-color='white'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#variants',\n {\n level: 'deprecation',\n }\n );\n }\n }\n }\n private _overBackground: boolean = false;\n\n /**\n * @deprecated The `side-label` attribute will be replaced by\n * `label-position=\"side\"` in a future release.\n */\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n public sideLabel = false;\n\n /**\n * @deprecated The `progress` property will be replaced by `value` in a\n * future release.\n */\n @property({ type: Number })\n public progress = 0;\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white';\n\n @query('slot')\n private slotEl!: HTMLSlotElement;\n\n protected override render(): TemplateResult {\n return html`\n ${this.slotHasContent || this.label\n ? html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.slotHasContent ? nothing : this.label}\n <slot @slotchange=${this.handleSlotchange}></slot>\n </sp-field-label>\n `\n : nothing}\n ${this.label\n ? html`\n ${this.indeterminate\n ? nothing\n : html`\n <sp-field-label size=${this.size} class=\"percentage\">\n ${this.formatProgress()}\n </sp-field-label>\n `}\n `\n : nothing}\n <div class=\"track\">\n <div\n class=\"fill\"\n style=\"transform: scaleX(calc(${this.progress} / 100));\"\n ></div>\n </div>\n `;\n }\n\n protected 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 private formatProgress(): string {\n return new Intl.NumberFormat(this.languageResolver.language, {\n style: 'percent',\n unitDisplay: 'narrow',\n }).format(this.progress / 100);\n }\n\n protected override updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('indeterminate')) {\n if (this.indeterminate) {\n this.removeAttribute('aria-valuemin');\n this.removeAttribute('aria-valuemax');\n this.removeAttribute('aria-valuenow');\n this.removeAttribute('aria-valuetext');\n } else {\n this.setAttribute('aria-valuemin', '0');\n this.setAttribute('aria-valuemax', '100');\n this.setAttribute('aria-valuenow', '' + this.progress);\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n }\n if (!this.indeterminate && changes.has('progress')) {\n this.setAttribute('aria-valuenow', '' + this.progress);\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n if (!this.indeterminate && changes.has(languageResolverUpdatedSymbol)) {\n this.setAttribute('aria-valuetext', this.formatProgress());\n }\n if (changes.has('label')) {\n if (this.label.length) {\n this.setAttribute('aria-label', this.label);\n } else if (changes.get('label') === this.getAttribute('aria-label')) {\n this.removeAttribute('aria-label');\n }\n }\n\n if (window.__swc?.DEBUG) {\n if (changes.has('label') && this.label.length > 0) {\n window.__swc.warn(\n this,\n `The \"label\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use a \"label\" named slot, or set \"aria-label\" or \"aria-labelledby\" on the element instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility',\n { level: 'deprecation' }\n );\n }\n if (changes.has('sideLabel') && this.sideLabel) {\n window.__swc.warn(\n this,\n `The \"side-label\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use label-position=\"side\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/',\n { level: 'deprecation' }\n );\n }\n if (changes.has('progress') && this.progress !== 0) {\n window.__swc.warn(\n this,\n `The \"progress\" property on <${this.localName}> has been deprecated and will be removed in a future release. Use the \"value\" attribute instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/',\n { level: 'deprecation' }\n );\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.slotHasContent\n ) {\n window.__swc.warn(\n this,\n '<sp-progress-bar> elements need one of the following to be accessible:',\n 'https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility',\n {\n type: 'accessibility',\n issues: [\n 'value supplied to the \"label\" attribute, which will be displayed visually as part of the element, or',\n 'text content supplied directly to the <sp-progress-bar> 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,OAEE,QAAAA,EACA,WAAAC,EAEA,cAAAC,EACA,mBAAAC,MAEK,gCACP,OACE,YAAAC,EACA,SAAAC,MACK,kDACP,OACE,gCAAAC,EACA,iCAAAC,MACK,0EACP,OAAS,oBAAAC,MAAwB,6DACjC,OAAS,mBAAAC,MAAuB,2DAEhC,MAAO,yDAEP,OAAOC,MAAY,wBAKZ,aAAM,oBAAoBR,EAC/BO,EAAgBN,EAAiB,EAAE,EACnC,CACE,cAAe,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", "languageResolverUpdatedSymbol", "getLabelFromSlot", "ObserveSlotText", "styles", "overBackground", "labelFromSlot", "changes", "__decorateClass"]
7
7
  }