@spectrum-web-components/progress-bar 0.7.0-devmode.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/progress-bar",
3
- "version": "0.7.0-devmode.0+7b0ea531e",
3
+ "version": "0.7.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -57,8 +57,8 @@
57
57
  "lit-html"
58
58
  ],
59
59
  "dependencies": {
60
- "@spectrum-web-components/base": "^0.6.0",
61
- "@spectrum-web-components/field-label": "^0.8.0-devmode.0+7b0ea531e",
60
+ "@spectrum-web-components/base": "^0.7.0",
61
+ "@spectrum-web-components/field-label": "^0.8.0",
62
62
  "tslib": "^2.0.0"
63
63
  },
64
64
  "devDependencies": {
@@ -70,5 +70,5 @@
70
70
  "./sp-*.js",
71
71
  "./**/*.dev.js"
72
72
  ],
73
- "gitHead": "7b0ea531e9c7225c8964c5429bc5fd005618b80e"
73
+ "gitHead": "05c81318844160db3f8156144106e643507fef97"
74
74
  }
@@ -1,3 +1,2 @@
1
- import { ProgressBar } from "./src/ProgressBar.js";
2
- customElements.define("sp-progress-bar", ProgressBar);
1
+ import{ProgressBar as r}from"./src/ProgressBar.js";customElements.define("sp-progress-bar",r);
3
2
  //# sourceMappingURL=sp-progress-bar.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["sp-progress-bar.ts"],
4
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 { ProgressBar } from './src/ProgressBar.js';\n\ncustomElements.define('sp-progress-bar', ProgressBar);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-progress-bar': ProgressBar;\n }\n}\n"],
5
- "mappings": "AAYA;AAEA,eAAe,OAAO,mBAAmB,WAAW;",
5
+ "mappings": "AAYA,mDAEA,eAAe,OAAO,kBAAmB,CAAW",
6
6
  "names": []
7
7
  }
@@ -1,41 +1,9 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __decorateClass = (decorators, target, key, kind) => {
4
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
- if (decorator = decorators[i])
7
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
- if (kind && result)
9
- __defProp(target, key, result);
10
- return result;
11
- };
12
- import {
13
- html,
14
- SizedMixin,
15
- SpectrumElement
16
- } from "@spectrum-web-components/base";
17
- import { property } from "@spectrum-web-components/base/src/decorators.js";
18
- import "@spectrum-web-components/field-label/sp-field-label.js";
19
- import styles from "./progress-bar.css.js";
20
- export class ProgressBar extends SizedMixin(SpectrumElement) {
21
- constructor() {
22
- super(...arguments);
23
- this.indeterminate = false;
24
- this.label = "";
25
- this.overBackground = false;
26
- this.sideLabel = false;
27
- this.progress = 0;
28
- }
29
- static get styles() {
30
- return [styles];
31
- }
32
- render() {
33
- return html`
34
- ${this.label ? html`
1
+ var u=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var i=(s,e,o,a)=>{for(var t=a>1?void 0:a?d(e,o):e,p=s.length-1,b;p>=0;p--)(b=s[p])&&(t=(a?b(e,o,t):b(t))||t);return a&&t&&u(e,o,t),t};import{html as l,SizedMixin as n,SpectrumElement as c}from"@spectrum-web-components/base";import{property as r}from"@spectrum-web-components/base/src/decorators.js";import"@spectrum-web-components/field-label/sp-field-label.js";import h from"./progress-bar.css.js";export class ProgressBar extends n(c){constructor(){super(...arguments);this.indeterminate=!1;this.label="";this.overBackground=!1;this.sideLabel=!1;this.progress=0}static get styles(){return[h]}render(){return l`
2
+ ${this.label?l`
35
3
  <sp-field-label size=${this.size} class="label">
36
4
  ${this.label}
37
5
  </sp-field-label>
38
- ${this.indeterminate ? html`` : html`
6
+ ${this.indeterminate?l``:l`
39
7
  <sp-field-label
40
8
  size=${this.size}
41
9
  class="percentage"
@@ -43,67 +11,12 @@ export class ProgressBar extends SizedMixin(SpectrumElement) {
43
11
  ${this.progress}%
44
12
  </sp-field-label>
45
13
  `}
46
- ` : html``}
14
+ `:l``}
47
15
  <div class="track">
48
16
  <div
49
17
  class="fill"
50
18
  style="transform: scaleX(calc(${this.progress} / 100));"
51
19
  ></div>
52
20
  </div>
53
- `;
54
- }
55
- firstUpdated(changes) {
56
- super.firstUpdated(changes);
57
- if (!this.hasAttribute("role")) {
58
- this.setAttribute("role", "progressbar");
59
- }
60
- }
61
- updated(changes) {
62
- super.updated(changes);
63
- if (changes.has("indeterminate")) {
64
- if (this.indeterminate) {
65
- this.removeAttribute("aria-valuemin");
66
- this.removeAttribute("aria-valuemax");
67
- } else {
68
- this.setAttribute("aria-valuemin", "0");
69
- this.setAttribute("aria-valuemax", "100");
70
- }
71
- }
72
- if (!this.indeterminate && changes.has("progress")) {
73
- this.setAttribute("aria-valuenow", "" + this.progress);
74
- } else if (this.hasAttribute("aria-valuenow")) {
75
- this.removeAttribute("aria-valuenow");
76
- }
77
- if (this.label && changes.has("label")) {
78
- this.setAttribute("aria-label", this.label);
79
- }
80
- if (false) {
81
- if (!this.label && !this.getAttribute("aria-label") && !this.getAttribute("aria-labelledby")) {
82
- window.__swc.warn(this, "<sp-progress-bar> elements will not be accessible to screen readers without one of the following:", "https://opensource.adobe.com/spectrum-web-components/components/progress-bar/#accessibility", {
83
- type: "accessibility",
84
- issues: [
85
- 'value supplied to the "label" attribute, which will be displayed visually as part of the element, or',
86
- 'value supplied to the "aria-label" attribute, which will only be provided to screen readers, or',
87
- '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.'
88
- ]
89
- });
90
- }
91
- }
92
- }
93
- }
94
- __decorateClass([
95
- property({ type: Boolean, reflect: true })
96
- ], ProgressBar.prototype, "indeterminate", 2);
97
- __decorateClass([
98
- property({ type: String })
99
- ], ProgressBar.prototype, "label", 2);
100
- __decorateClass([
101
- property({ type: Boolean, reflect: true, attribute: "over-background" })
102
- ], ProgressBar.prototype, "overBackground", 2);
103
- __decorateClass([
104
- property({ type: Boolean, reflect: true, attribute: "side-label" })
105
- ], ProgressBar.prototype, "sideLabel", 2);
106
- __decorateClass([
107
- property({ type: Number })
108
- ], ProgressBar.prototype, "progress", 2);
21
+ `}firstUpdated(e){super.firstUpdated(e),this.hasAttribute("role")||this.setAttribute("role","progressbar")}updated(e){super.updated(e),e.has("indeterminate")&&(this.indeterminate?(this.removeAttribute("aria-valuemin"),this.removeAttribute("aria-valuemax")):(this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax","100"))),!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([r({type:Boolean,reflect:!0})],ProgressBar.prototype,"indeterminate",2),i([r({type:String})],ProgressBar.prototype,"label",2),i([r({type:Boolean,reflect:!0,attribute:"over-background"})],ProgressBar.prototype,"overBackground",2),i([r({type:Boolean,reflect:!0,attribute:"side-label"})],ProgressBar.prototype,"sideLabel",2),i([r({type:Number})],ProgressBar.prototype,"progress",2);
109
22
  //# sourceMappingURL=ProgressBar.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["ProgressBar.ts"],
4
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';\n\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport styles from './progress-bar.css.js';\n\n/**\n * @element sp-progress-bar\n */\nexport class ProgressBar extends SizedMixin(SpectrumElement) {\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 })\n public label = '';\n\n @property({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = 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 protected override render(): TemplateResult {\n return html`\n ${this.label\n ? html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.label}\n </sp-field-label>\n ${this.indeterminate\n ? html``\n : html`\n <sp-field-label\n size=${this.size}\n class=\"percentage\"\n >\n ${this.progress}%\n </sp-field-label>\n `}\n `\n : html``}\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 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 (changes.has('indeterminate')) {\n if (this.indeterminate) {\n this.removeAttribute('aria-valuemin');\n this.removeAttribute('aria-valuemax');\n } else {\n this.setAttribute('aria-valuemin', '0');\n this.setAttribute('aria-valuemax', '100');\n }\n }\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-bar> elements will not be accessible to screen readers without one of the following:',\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 'value supplied to the \"aria-label\" attribute, which will only be provided to screen readers, or',\n 'an element ID reference supplied to the \"aria-labelledby\" attribute, which will be provided by screen readers and will need to be managed manually by the parent application.',\n ]\n },\n );\n }\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAAA;AAAA;AAQA;AAEA;AACA;AAKO,aAAM,oBAAoB,WAAW,eAAe,EAAE;AAAA,EAAtD;AAAA;AAMI,yBAAgB;AAGhB,iBAAQ;AAGR,0BAAiB;AAGjB,qBAAY;AAGZ,oBAAW;AAAA;AAAA,aAjBS,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAiBmB,SAAyB;AACxC,WAAO;AAAA,cACD,KAAK,QACD;AAAA,6CAC2B,KAAK;AAAA,4BACtB,KAAK;AAAA;AAAA,wBAET,KAAK,gBACD,SACA;AAAA;AAAA,2CAEe,KAAK;AAAA;AAAA;AAAA,sCAGV,KAAK;AAAA;AAAA;AAAA,sBAIzB;AAAA;AAAA;AAAA;AAAA,oDAIkC,KAAK;AAAA;AAAA;AAAA;AAAA,EAIrD;AAAA,EAEmB,aAAa,SAA+B;AAC3D,UAAM,aAAa,OAAO;AAC1B,QAAI,CAAC,KAAK,aAAa,MAAM,GAAG;AAC5B,WAAK,aAAa,QAAQ,aAAa;AAAA,IAC3C;AAAA,EACJ;AAAA,EAEmB,QAAQ,SAA+B;AACtD,UAA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AAE,KAAM,QAAS,QAAS,GAAM,UAAW,iBAAkB,CAAC,GACjE,AAZJ,YAYI,8BAGA,GADP,AAAC,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,YAAa,CAAC,GAC5D,AAfJ,YAeI,yBAGA,GADP,AAAC,EAAS,CAAE,KAAM,MAAO,CAAC,GACnB,AAlBJ,YAkBI",
6
6
  "names": []
7
7
  }
package/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./ProgressBar.js";
1
+ export*from"./ProgressBar.js";
2
2
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["index.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nexport * from './ProgressBar.js';\n"],
5
- "mappings": "AAYA;",
5
+ "mappings": "AAYA",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,4 @@
1
- import { css } from "@spectrum-web-components/base";
2
- const styles = css`
1
+ import{css as r}from"@spectrum-web-components/base";const e=r`
3
2
  :host([size=s]){--spectrum-progressbar-border-radius:var(
4
3
  --spectrum-progressbar-s-border-radius
5
4
  );--spectrum-progressbar-indeterminate-fill-width:var(
@@ -89,6 +88,5 @@ const styles = css`
89
88
  )}.label,.percentage{color:var(
90
89
  --spectrum-fieldlabel-m-text-color,var(--spectrum-alias-label-text-color)
91
90
  )}@media (forced-colors:active){.track{--spectrum-progressbar-m-track-fill-color:ButtonText;--spectrum-progressbar-m-track-color:ButtonFace;border:1px solid ButtonText;forced-color-adjust:none}}.fill{transform-origin:left;width:100%}:host([dir=rtl]) .fill{transform-origin:right}
92
- `;
93
- export default styles;
91
+ `;export default e;
94
92
  //# sourceMappingURL=progress-bar.css.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["progress-bar.css.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host([size=s]){--spectrum-progressbar-border-radius:var(\n--spectrum-progressbar-s-border-radius\n);--spectrum-progressbar-indeterminate-fill-width:var(\n--spectrum-progressbar-s-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)\n);--spectrum-progressbar-indeterminate-duration:var(\n--spectrum-progressbar-s-indeterminate-duration,var(--spectrum-global-animation-duration-2000)\n);--spectrum-progressbar-value-gap-y:var(\n--spectrum-progressbar-s-value-gap-y,0px\n);--spectrum-progressbar-height:var(\n--spectrum-progressbar-s-height,var(--spectrum-global-dimension-size-50)\n);--spectrum-progressbar-width:var(\n--spectrum-progressbar-s-width,var(--spectrum-global-dimension-static-size-2400)\n)}:host([size=m]){--spectrum-progressbar-border-radius:var(\n--spectrum-progressbar-m-border-radius\n);--spectrum-progressbar-indeterminate-fill-width:var(\n--spectrum-progressbar-m-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)\n);--spectrum-progressbar-indeterminate-duration:var(\n--spectrum-progressbar-m-indeterminate-duration,var(--spectrum-global-animation-duration-2000)\n);--spectrum-progressbar-value-gap-y:var(\n--spectrum-progressbar-m-value-gap-y,0px\n);--spectrum-progressbar-height:var(\n--spectrum-progressbar-m-height,var(--spectrum-global-dimension-size-75)\n);--spectrum-progressbar-width:var(\n--spectrum-progressbar-m-width,var(--spectrum-global-dimension-static-size-2400)\n);--spectrum-fieldlabel-side-padding-right:var(\n--spectrum-fieldlabel-m-side-padding-right,var(--spectrum-global-dimension-size-150)\n)}:host([size=l]){--spectrum-progressbar-indeterminate-fill-width:var(\n--spectrum-progressbar-l-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)\n);--spectrum-progressbar-indeterminate-duration:var(\n--spectrum-progressbar-l-indeterminate-duration,var(--spectrum-global-animation-duration-2000)\n);--spectrum-progressbar-value-gap-y:var(\n--spectrum-progressbar-l-value-gap-y,0px\n);--spectrum-progressbar-height:var(\n--spectrum-progressbar-l-height,var(--spectrum-global-dimension-size-100)\n);--spectrum-progressbar-border-radius:var(\n--spectrum-progressbar-l-border-radius,var(--spectrum-global-dimension-size-50)\n);--spectrum-progressbar-width:var(\n--spectrum-progressbar-l-width,var(--spectrum-global-dimension-static-size-2500)\n)}:host([size=xl]){--spectrum-progressbar-border-radius:var(\n--spectrum-progressbar-xl-border-radius\n);--spectrum-progressbar-indeterminate-fill-width:var(\n--spectrum-progressbar-xl-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)\n);--spectrum-progressbar-indeterminate-duration:var(\n--spectrum-progressbar-xl-indeterminate-duration,var(--spectrum-global-animation-duration-2000)\n);--spectrum-progressbar-value-gap-y:var(\n--spectrum-progressbar-xl-value-gap-y,0px\n);--spectrum-progressbar-height:var(\n--spectrum-progressbar-xl-height,var(--spectrum-global-dimension-size-125)\n);--spectrum-progressbar-width:var(\n--spectrum-progressbar-xl-width,var(--spectrum-global-dimension-static-size-2800)\n)}:host{align-items:center;display:inline-flex;flex-flow:row wrap;justify-content:space-between;position:relative;vertical-align:top;width:var(--spectrum-progressbar-width)}.track{border-radius:var(--spectrum-progressbar-border-radius);overflow:hidden;width:100%;z-index:1}.fill,.track{height:var(--spectrum-progressbar-height)}.fill{border:none;transition:width 1s}:host([dir=ltr]) .label,:host([dir=ltr]) .percentage{text-align:left}:host([dir=rtl]) .label,:host([dir=rtl]) .percentage{text-align:right}.label,.percentage{margin-bottom:var(\n--spectrum-progressbar-value-gap-y\n)}.label{flex:1 1 0%}:host([dir=ltr]) .percentage{margin-left:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([dir=rtl]) .percentage{margin-right:var(\n--spectrum-fieldlabel-side-padding-right\n)}.percentage{align-self:flex-start}:host([side-label]){display:inline-flex;flex-flow:row;justify-content:space-between;width:auto}:host([side-label]) .track{flex:1 1 var(--spectrum-progressbar-width);min-width:var(\n--spectrum-progressbar-width\n)}:host([dir=ltr][side-label]) .label{margin-right:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([dir=rtl][side-label]) .label{margin-left:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([side-label]) .label{flex-grow:0;margin-bottom:0}:host([dir=ltr][side-label]) .percentage{text-align:right}:host([dir=rtl][side-label]) .percentage{text-align:left}:host([dir=ltr][side-label]) .percentage{margin-left:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([dir=rtl][side-label]) .percentage{margin-right:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([side-label]) .percentage{margin-bottom:0;order:3}:host([indeterminate]) .fill{animation-timing-function:var(\n--spectrum-progressbar-indeterminate-animation-ease\n);position:relative;width:var(\n--spectrum-progressbar-indeterminate-fill-width\n);will-change:transform}:host([dir=ltr][indeterminate]) .fill{animation:indeterminate-loop-ltr var(--spectrum-progressbar-indeterminate-duration) infinite}:host([dir=rtl][indeterminate]) .fill{animation:indeterminate-loop-rtl var(--spectrum-progressbar-indeterminate-duration) infinite}@keyframes indeterminate-loop-ltr{0%{transform:translate(calc(var(--spectrum-progressbar-indeterminate-fill-width)*-1))}to{transform:translate(var(--spectrum-progressbar-width))}}@keyframes indeterminate-loop-rtl{0%{transform:translate(var(--spectrum-progressbar-width))}to{transform:translate(calc(var(--spectrum-progressbar-width)*-1))}}.fill{background:var(\n--spectrum-progressbar-m-track-fill-color,var(--spectrum-semantic-informative-color-default)\n)}.track{background-color:var(\n--spectrum-progressbar-m-track-color,var(--spectrum-alias-track-color-default)\n)}:host([over-background]) .fill{background:var(\n--spectrum-progressbar-m-overbackground-track-fill-color,var(--spectrum-alias-track-fill-color-overbackground)\n)}:host([over-background]) .label,:host([over-background]) .percentage{color:var(\n--spectrum-progressbar-m-overbackground-track-fill-color,var(--spectrum-alias-track-fill-color-overbackground)\n)}:host([over-background]) .track{background-color:var(\n--spectrum-progressbar-m-overbackground-track-color,var(--spectrum-alias-track-color-overbackground)\n)}:host([positive]) .fill{background:var(\n--spectrum-meter-m-positive-track-fill-color,var(--spectrum-semantic-positive-status-color)\n)}:host(.is-notice) .fill{background:var(\n--spectrum-meter-m-notice-track-fill-color,var(--spectrum-semantic-notice-status-color)\n)}:host(.is-negative) .fill{background:var(\n--spectrum-meter-m-negative-track-fill-color,var(--spectrum-semantic-negative-status-color)\n)}.label,.percentage{color:var(\n--spectrum-fieldlabel-m-text-color,var(--spectrum-alias-label-text-color)\n)}@media (forced-colors:active){.track{--spectrum-progressbar-m-track-fill-color:ButtonText;--spectrum-progressbar-m-track-color:ButtonFace;border:1px solid ButtonText;forced-color-adjust:none}}.fill{transform-origin:left;width:100%}:host([dir=rtl]) .fill{transform-origin:right}\n`;\nexport default styles;"],
5
- "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2Ff,eAAe;",
5
+ "mappings": "AAWA,oDACA,KAAM,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2Ff,cAAe",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,4 @@
1
- import { css } from "@spectrum-web-components/base";
2
- const styles = css`
1
+ import{css as r}from"@spectrum-web-components/base";const e=r`
3
2
  :host([size=s]){--spectrum-progressbar-border-radius:var(
4
3
  --spectrum-progressbar-s-border-radius
5
4
  );--spectrum-progressbar-indeterminate-fill-width:var(
@@ -89,6 +88,5 @@ const styles = css`
89
88
  )}.label,.percentage{color:var(
90
89
  --spectrum-fieldlabel-m-text-color,var(--spectrum-alias-label-text-color)
91
90
  )}@media (forced-colors:active){.track{--spectrum-progressbar-m-track-fill-color:ButtonText;--spectrum-progressbar-m-track-color:ButtonFace;border:1px solid ButtonText;forced-color-adjust:none}}
92
- `;
93
- export default styles;
91
+ `;export default e;
94
92
  //# sourceMappingURL=spectrum-progress-bar.css.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["spectrum-progress-bar.css.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host([size=s]){--spectrum-progressbar-border-radius:var(\n--spectrum-progressbar-s-border-radius\n);--spectrum-progressbar-indeterminate-fill-width:var(\n--spectrum-progressbar-s-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)\n);--spectrum-progressbar-indeterminate-duration:var(\n--spectrum-progressbar-s-indeterminate-duration,var(--spectrum-global-animation-duration-2000)\n);--spectrum-progressbar-value-gap-y:var(\n--spectrum-progressbar-s-value-gap-y,0px\n);--spectrum-progressbar-height:var(\n--spectrum-progressbar-s-height,var(--spectrum-global-dimension-size-50)\n);--spectrum-progressbar-width:var(\n--spectrum-progressbar-s-width,var(--spectrum-global-dimension-static-size-2400)\n)}:host([size=m]){--spectrum-progressbar-border-radius:var(\n--spectrum-progressbar-m-border-radius\n);--spectrum-progressbar-indeterminate-fill-width:var(\n--spectrum-progressbar-m-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)\n);--spectrum-progressbar-indeterminate-duration:var(\n--spectrum-progressbar-m-indeterminate-duration,var(--spectrum-global-animation-duration-2000)\n);--spectrum-progressbar-value-gap-y:var(\n--spectrum-progressbar-m-value-gap-y,0px\n);--spectrum-progressbar-height:var(\n--spectrum-progressbar-m-height,var(--spectrum-global-dimension-size-75)\n);--spectrum-progressbar-width:var(\n--spectrum-progressbar-m-width,var(--spectrum-global-dimension-static-size-2400)\n);--spectrum-fieldlabel-side-padding-right:var(\n--spectrum-fieldlabel-m-side-padding-right,var(--spectrum-global-dimension-size-150)\n)}:host([size=l]){--spectrum-progressbar-indeterminate-fill-width:var(\n--spectrum-progressbar-l-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)\n);--spectrum-progressbar-indeterminate-duration:var(\n--spectrum-progressbar-l-indeterminate-duration,var(--spectrum-global-animation-duration-2000)\n);--spectrum-progressbar-value-gap-y:var(\n--spectrum-progressbar-l-value-gap-y,0px\n);--spectrum-progressbar-height:var(\n--spectrum-progressbar-l-height,var(--spectrum-global-dimension-size-100)\n);--spectrum-progressbar-border-radius:var(\n--spectrum-progressbar-l-border-radius,var(--spectrum-global-dimension-size-50)\n);--spectrum-progressbar-width:var(\n--spectrum-progressbar-l-width,var(--spectrum-global-dimension-static-size-2500)\n)}:host([size=xl]){--spectrum-progressbar-border-radius:var(\n--spectrum-progressbar-xl-border-radius\n);--spectrum-progressbar-indeterminate-fill-width:var(\n--spectrum-progressbar-xl-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)\n);--spectrum-progressbar-indeterminate-duration:var(\n--spectrum-progressbar-xl-indeterminate-duration,var(--spectrum-global-animation-duration-2000)\n);--spectrum-progressbar-value-gap-y:var(\n--spectrum-progressbar-xl-value-gap-y,0px\n);--spectrum-progressbar-height:var(\n--spectrum-progressbar-xl-height,var(--spectrum-global-dimension-size-125)\n);--spectrum-progressbar-width:var(\n--spectrum-progressbar-xl-width,var(--spectrum-global-dimension-static-size-2800)\n)}:host{align-items:center;display:inline-flex;flex-flow:row wrap;justify-content:space-between;position:relative;vertical-align:top;width:var(--spectrum-progressbar-width)}.track{border-radius:var(--spectrum-progressbar-border-radius);overflow:hidden;width:100%;z-index:1}.fill,.track{height:var(--spectrum-progressbar-height)}.fill{border:none;transition:width 1s}:host([dir=ltr]) .label,:host([dir=ltr]) .percentage{text-align:left}:host([dir=rtl]) .label,:host([dir=rtl]) .percentage{text-align:right}.label,.percentage{margin-bottom:var(\n--spectrum-progressbar-value-gap-y\n)}.label{flex:1 1 0%}:host([dir=ltr]) .percentage{margin-left:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([dir=rtl]) .percentage{margin-right:var(\n--spectrum-fieldlabel-side-padding-right\n)}.percentage{align-self:flex-start}:host([side-label]){display:inline-flex;flex-flow:row;justify-content:space-between;width:auto}:host([side-label]) .track{flex:1 1 var(--spectrum-progressbar-width);min-width:var(\n--spectrum-progressbar-width\n)}:host([dir=ltr][side-label]) .label{margin-right:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([dir=rtl][side-label]) .label{margin-left:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([side-label]) .label{flex-grow:0;margin-bottom:0}:host([dir=ltr][side-label]) .percentage{text-align:right}:host([dir=rtl][side-label]) .percentage{text-align:left}:host([dir=ltr][side-label]) .percentage{margin-left:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([dir=rtl][side-label]) .percentage{margin-right:var(\n--spectrum-fieldlabel-side-padding-right\n)}:host([side-label]) .percentage{margin-bottom:0;order:3}:host([indeterminate]) .fill{animation-timing-function:var(\n--spectrum-progressbar-indeterminate-animation-ease\n);position:relative;width:var(\n--spectrum-progressbar-indeterminate-fill-width\n);will-change:transform}:host([dir=ltr][indeterminate]) .fill{animation:indeterminate-loop-ltr var(--spectrum-progressbar-indeterminate-duration) infinite}:host([dir=rtl][indeterminate]) .fill{animation:indeterminate-loop-rtl var(--spectrum-progressbar-indeterminate-duration) infinite}@keyframes indeterminate-loop-ltr{0%{transform:translate(calc(var(--spectrum-progressbar-indeterminate-fill-width)*-1))}to{transform:translate(var(--spectrum-progressbar-width))}}@keyframes indeterminate-loop-rtl{0%{transform:translate(var(--spectrum-progressbar-width))}to{transform:translate(calc(var(--spectrum-progressbar-width)*-1))}}.fill{background:var(\n--spectrum-progressbar-m-track-fill-color,var(--spectrum-semantic-informative-color-default)\n)}.track{background-color:var(\n--spectrum-progressbar-m-track-color,var(--spectrum-alias-track-color-default)\n)}:host([over-background]) .fill{background:var(\n--spectrum-progressbar-m-overbackground-track-fill-color,var(--spectrum-alias-track-fill-color-overbackground)\n)}:host([over-background]) .label,:host([over-background]) .percentage{color:var(\n--spectrum-progressbar-m-overbackground-track-fill-color,var(--spectrum-alias-track-fill-color-overbackground)\n)}:host([over-background]) .track{background-color:var(\n--spectrum-progressbar-m-overbackground-track-color,var(--spectrum-alias-track-color-overbackground)\n)}:host([positive]) .fill{background:var(\n--spectrum-meter-m-positive-track-fill-color,var(--spectrum-semantic-positive-status-color)\n)}:host(.is-notice) .fill{background:var(\n--spectrum-meter-m-notice-track-fill-color,var(--spectrum-semantic-notice-status-color)\n)}:host(.is-negative) .fill{background:var(\n--spectrum-meter-m-negative-track-fill-color,var(--spectrum-semantic-negative-status-color)\n)}.label,.percentage{color:var(\n--spectrum-fieldlabel-m-text-color,var(--spectrum-alias-label-text-color)\n)}@media (forced-colors:active){.track{--spectrum-progressbar-m-track-fill-color:ButtonText;--spectrum-progressbar-m-track-color:ButtonFace;border:1px solid ButtonText;forced-color-adjust:none}}\n`;\nexport default styles;"],
5
- "mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2Ff,eAAe;",
5
+ "mappings": "AAWA,oDACA,KAAM,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2Ff,cAAe",
6
6
  "names": []
7
7
  }
@@ -1,43 +1,26 @@
1
- import { html } from "@spectrum-web-components/base";
2
- import "@spectrum-web-components/progress-bar/sp-progress-bar.js";
3
- export default {
4
- title: "Progress Bar/Sizes",
5
- component: "sp-progress-bar"
6
- };
7
- export const s = () => {
8
- return html`
1
+ import{html as r}from"@spectrum-web-components/base";import"@spectrum-web-components/progress-bar/sp-progress-bar.js";export default{title:"Progress Bar/Sizes",component:"sp-progress-bar"};export const s=()=>r`
9
2
  <sp-progress-bar
10
3
  label="Loading"
11
4
  progress="50"
12
5
  size="s"
13
6
  ></sp-progress-bar>
14
- `;
15
- };
16
- export const m = () => {
17
- return html`
7
+ `,m=()=>r`
18
8
  <sp-progress-bar
19
9
  label="Loading"
20
10
  progress="50"
21
11
  size="m"
22
12
  ></sp-progress-bar>
23
- `;
24
- };
25
- export const l = () => {
26
- return html`
13
+ `,l=()=>r`
27
14
  <sp-progress-bar
28
15
  label="Loading"
29
16
  progress="50"
30
17
  size="l"
31
18
  ></sp-progress-bar>
32
- `;
33
- };
34
- export const XL = () => {
35
- return html`
19
+ `,XL=()=>r`
36
20
  <sp-progress-bar
37
21
  label="Loading"
38
22
  progress="50"
39
23
  size="xl"
40
24
  ></sp-progress-bar>
41
25
  `;
42
- };
43
26
  //# sourceMappingURL=progress-bar-sizes.stories.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["progress-bar-sizes.stories.ts"],
4
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-bar/sp-progress-bar.js';\n\nexport default {\n title: 'Progress Bar/Sizes',\n component: 'sp-progress-bar',\n};\n\nexport const s = (): TemplateResult => {\n return html`\n <sp-progress-bar\n label=\"Loading\"\n progress=\"50\"\n size=\"s\"\n ></sp-progress-bar>\n `;\n};\n\nexport const m = (): TemplateResult => {\n return html`\n <sp-progress-bar\n label=\"Loading\"\n progress=\"50\"\n size=\"m\"\n ></sp-progress-bar>\n `;\n};\n\nexport const l = (): TemplateResult => {\n return html`\n <sp-progress-bar\n label=\"Loading\"\n progress=\"50\"\n size=\"l\"\n ></sp-progress-bar>\n `;\n};\n\nexport const XL = (): TemplateResult => {\n return html`\n <sp-progress-bar\n label=\"Loading\"\n progress=\"50\"\n size=\"xl\"\n ></sp-progress-bar>\n `;\n};\n"],
5
- "mappings": "AAYA;AAEA;AAEA,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,IAAI,MAAsB;AACnC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;AAEO,aAAM,IAAI,MAAsB;AACnC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;AAEO,aAAM,IAAI,MAAsB;AACnC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;AAEO,aAAM,KAAK,MAAsB;AACpC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;",
5
+ "mappings": "AAYA,qDAEA,iEAEA,cAAe,CACX,MAAO,qBACP,UAAW,iBACf,EAEO,YAAM,GAAI,IACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MASE,EAAI,IACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MASE,EAAI,IACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MASE,GAAK,IACP;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,79 +1,47 @@
1
- import { html } from "@spectrum-web-components/base";
2
- import "@spectrum-web-components/progress-bar/sp-progress-bar.js";
3
- export default {
4
- title: "Progress Bar",
5
- component: "sp-progress-bar"
6
- };
7
- export const label = () => {
8
- return html`
1
+ import{html as e}from"@spectrum-web-components/base";import"@spectrum-web-components/progress-bar/sp-progress-bar.js";export default{title:"Progress Bar",component:"sp-progress-bar"};export const label=()=>e`
9
2
  <sp-progress-bar label="Loading" progress="50"></sp-progress-bar>
10
- `;
11
- };
12
- export const indeterminate = () => {
13
- return html`
3
+ `,indeterminate=()=>e`
14
4
  <sp-progress-bar label="Loading" indeterminate></sp-progress-bar>
15
- `;
16
- };
17
- export const sideLabel = () => {
18
- return html`
5
+ `,sideLabel=()=>e`
19
6
  <sp-progress-bar
20
7
  side-label
21
8
  label="Loading"
22
9
  progress="50"
23
10
  ></sp-progress-bar>
24
- `;
25
- };
26
- export const sideIndeterminate = () => {
27
- return html`
11
+ `,sideIndeterminate=()=>e`
28
12
  <sp-progress-bar
29
13
  side-label
30
14
  label="Loading"
31
15
  indeterminate
32
16
  ></sp-progress-bar>
33
- `;
34
- };
35
- const makeOverBackground = (story) => html`
17
+ `;const r=s=>e`
36
18
  <div
37
19
  style="background-color: var(--spectrum-global-color-seafoam-600); color: var(--spectrum-global-color-seafoam-600); padding: var(--spectrum-global-dimension-size-175) var(--spectrum-global-dimension-size-250); display: inline-block"
38
20
  >
39
- ${story}
21
+ ${s}
40
22
  </div>
41
- `;
42
- export const overBackground = () => {
43
- return makeOverBackground(html`
23
+ `;export const overBackground=()=>r(e`
44
24
  <sp-progress-bar progress="50" over-background></sp-progress-bar>
45
- `);
46
- };
47
- export const overBackgroundLabel = () => {
48
- return makeOverBackground(html`
25
+ `),overBackgroundLabel=()=>r(e`
49
26
  <sp-progress-bar
50
27
  label="Loading"
51
28
  progress="50"
52
29
  over-background
53
30
  ></sp-progress-bar>
54
- `);
55
- };
56
- export const overBackgroundIndeterminate = () => {
57
- return makeOverBackground(html`
31
+ `),overBackgroundIndeterminate=()=>r(e`
58
32
  <sp-progress-bar
59
33
  label="Loading"
60
34
  indeterminate
61
35
  over-background
62
36
  ></sp-progress-bar>
63
- `);
64
- };
65
- export const overBackgroundSideLabel = () => {
66
- return makeOverBackground(html`
37
+ `),overBackgroundSideLabel=()=>r(e`
67
38
  <sp-progress-bar
68
39
  label="Loading"
69
40
  progress="50"
70
41
  over-background
71
42
  side-label
72
43
  ></sp-progress-bar>
73
- `);
74
- };
75
- export const overBackgroundSideLabelIndeterminate = () => {
76
- return makeOverBackground(html`
44
+ `),overBackgroundSideLabelIndeterminate=()=>r(e`
77
45
  <sp-progress-bar
78
46
  label="Loading"
79
47
  indeterminate
@@ -81,5 +49,4 @@ export const overBackgroundSideLabelIndeterminate = () => {
81
49
  side-label
82
50
  ></sp-progress-bar>
83
51
  `);
84
- };
85
52
  //# sourceMappingURL=progress-bar.stories.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["progress-bar.stories.ts"],
4
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-bar/sp-progress-bar.js';\n\nexport default {\n title: 'Progress Bar',\n component: 'sp-progress-bar',\n};\n\nexport const label = (): TemplateResult => {\n return html`\n <sp-progress-bar label=\"Loading\" progress=\"50\"></sp-progress-bar>\n `;\n};\n\nexport const indeterminate = (): TemplateResult => {\n return html`\n <sp-progress-bar label=\"Loading\" indeterminate></sp-progress-bar>\n `;\n};\n\nexport const sideLabel = (): TemplateResult => {\n return html`\n <sp-progress-bar\n side-label\n label=\"Loading\"\n progress=\"50\"\n ></sp-progress-bar>\n `;\n};\n\nexport const sideIndeterminate = (): TemplateResult => {\n return html`\n <sp-progress-bar\n side-label\n label=\"Loading\"\n indeterminate\n ></sp-progress-bar>\n `;\n};\n\nconst makeOverBackground = (story: TemplateResult): TemplateResult => html`\n <div\n style=\"background-color: var(--spectrum-global-color-seafoam-600); color: var(--spectrum-global-color-seafoam-600); padding: var(--spectrum-global-dimension-size-175) var(--spectrum-global-dimension-size-250); display: inline-block\"\n >\n ${story}\n </div>\n`;\n\nexport const overBackground = (): TemplateResult => {\n return makeOverBackground(html`\n <sp-progress-bar progress=\"50\" over-background></sp-progress-bar>\n `);\n};\n\nexport const overBackgroundLabel = (): TemplateResult => {\n return makeOverBackground(html`\n <sp-progress-bar\n label=\"Loading\"\n progress=\"50\"\n over-background\n ></sp-progress-bar>\n `);\n};\n\nexport const overBackgroundIndeterminate = (): TemplateResult => {\n return makeOverBackground(html`\n <sp-progress-bar\n label=\"Loading\"\n indeterminate\n over-background\n ></sp-progress-bar>\n `);\n};\n\nexport const overBackgroundSideLabel = (): TemplateResult => {\n return makeOverBackground(html`\n <sp-progress-bar\n label=\"Loading\"\n progress=\"50\"\n over-background\n side-label\n ></sp-progress-bar>\n `);\n};\n\nexport const overBackgroundSideLabelIndeterminate = (): TemplateResult => {\n return makeOverBackground(html`\n <sp-progress-bar\n label=\"Loading\"\n indeterminate\n over-background\n side-label\n ></sp-progress-bar>\n `);\n};\n"],
5
- "mappings": "AAYA;AAEA;AAEA,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,gBAAgB,MAAsB;AAC/C,SAAO;AAAA;AAAA;AAGX;AAEO,aAAM,YAAY,MAAsB;AAC3C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;AAEO,aAAM,oBAAoB,MAAsB;AACnD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOX;AAEA,MAAM,qBAAqB,CAAC,UAA0C;AAAA;AAAA;AAAA;AAAA,UAI5D;AAAA;AAAA;AAIH,aAAM,iBAAiB,MAAsB;AAChD,SAAO,mBAAmB;AAAA;AAAA,KAEzB;AACL;AAEO,aAAM,sBAAsB,MAAsB;AACrD,SAAO,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMzB;AACL;AAEO,aAAM,8BAA8B,MAAsB;AAC7D,SAAO,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMzB;AACL;AAEO,aAAM,0BAA0B,MAAsB;AACzD,SAAO,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOzB;AACL;AAEO,aAAM,uCAAuC,MAAsB;AACtE,SAAO,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOzB;AACL;",
5
+ "mappings": "AAYA,qDAEA,iEAEA,cAAe,CACX,MAAO,eACP,UAAW,iBACf,EAEO,YAAM,OAAQ,IACV;AAAA;AAAA,MAKE,cAAgB,IAClB;AAAA;AAAA,MAKE,UAAY,IACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MASE,kBAAoB,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MASX,KAAM,GAAqB,AAAC,GAA0C;AAAA;AAAA;AAAA;AAAA,UAI5D;AAAA;AAAA,EAIH,YAAM,gBAAiB,IACnB,EAAmB;AAAA;AAAA,KAEzB,EAGQ,oBAAsB,IACxB,EAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMzB,EAGQ,4BAA8B,IAChC,EAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAMzB,EAGQ,wBAA0B,IAC5B,EAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOzB,EAGQ,qCAAuC,IACzC,EAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOzB",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,4 @@
1
- import "@spectrum-web-components/progress-bar/sp-progress-bar.js";
2
- import { html } from "lit";
3
- import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
4
- measureFixtureCreation(html`
1
+ import"@spectrum-web-components/progress-bar/sp-progress-bar.js";import{html as r}from"lit";import{measureFixtureCreation as e}from"../../../../test/benchmark/helpers.js";e(r`
5
2
  <sp-progress-bar label="Loading" indeterminate></sp-progress-bar>
6
3
  `);
7
4
  //# sourceMappingURL=basic-test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["basic-test.ts"],
4
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 '@spectrum-web-components/progress-bar/sp-progress-bar.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-progress-bar label=\"Loading\" indeterminate></sp-progress-bar>\n`);\n"],
5
- "mappings": "AAYA;AACA;AACA;AAEA,uBAAuB;AAAA;AAAA,CAEtB;",
5
+ "mappings": "AAYA,iEACA,2BACA,+EAEA,EAAuB;AAAA;AAAA,CAEtB",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,2 @@
1
- import * as stories from "../stories/progress-bar-sizes.stories.js";
2
- import { regressVisuals } from "../../../test/visual/test.js";
3
- regressVisuals("ProgressBarSizesStories", stories);
1
+ import*as r from"../stories/progress-bar-sizes.stories.js";import{regressVisuals as s}from"../../../test/visual/test.js";s("ProgressBarSizesStories",r);
4
2
  //# sourceMappingURL=progress-bar-sizes.test-vrt.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["progress-bar-sizes.test-vrt.ts"],
4
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 * as stories from '../stories/progress-bar-sizes.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ProgressBarSizesStories', stories);\n"],
5
- "mappings": "AAYA;AACA;AAEA,eAAe,2BAA2B,OAAO;",
5
+ "mappings": "AAYA,2DACA,8DAEA,EAAe,0BAA2B,CAAO",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,2 @@
1
- import * as stories from "../stories/progress-bar.stories.js";
2
- import { regressVisuals } from "../../../test/visual/test.js";
3
- regressVisuals("ProgressBarStories", stories);
1
+ import*as r from"../stories/progress-bar.stories.js";import{regressVisuals as s}from"../../../test/visual/test.js";s("ProgressBarStories",r);
4
2
  //# sourceMappingURL=progress-bar.test-vrt.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["progress-bar.test-vrt.ts"],
4
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 * as stories from '../stories/progress-bar.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ProgressBarStories', stories);\n"],
5
- "mappings": "AAYA;AACA;AAEA,eAAe,sBAAsB,OAAO;",
5
+ "mappings": "AAYA,qDACA,8DAEA,EAAe,qBAAsB,CAAO",
6
6
  "names": []
7
7
  }
@@ -1,84 +1,22 @@
1
- import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
2
- import "@spectrum-web-components/progress-bar/sp-progress-bar.js";
3
- import { stub } from "sinon";
4
- import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
5
- describe("ProgressBar", () => {
6
- testForLitDevWarnings(async () => await fixture(html`
1
+ import{elementUpdated as r,expect as a,fixture as t,html as s}from"@open-wc/testing";import"@spectrum-web-components/progress-bar/sp-progress-bar.js";import{stub as l}from"sinon";import{testForLitDevWarnings as n}from"../../../test/testing-helpers.js";describe("ProgressBar",()=>{n(async()=>await t(s`
7
2
  <sp-progress-bar label="Loading"></sp-progress-bar>
8
- `));
9
- it("loads default progress-bar accessibly", async () => {
10
- const el = await fixture(html`
3
+ `)),it("loads default progress-bar accessibly",async()=>{const e=await t(s`
11
4
  <sp-progress-bar label="Loading"></sp-progress-bar>
12
- `);
13
- await elementUpdated(el);
14
- expect(el).to.not.be.undefined;
15
- await expect(el).to.be.accessible();
16
- });
17
- it("accepts a changing progress", async () => {
18
- const el = await fixture(html`
5
+ `);await r(e),a(e).to.not.be.undefined,await a(e).to.be.accessible()}),it("accepts a changing progress",async()=>{const e=await t(s`
19
6
  <sp-progress-bar label="Changing value"></sp-progress-bar>
20
- `);
21
- await elementUpdated(el);
22
- expect(el.hasAttribute("aria-valuenow")).to.be.true;
23
- expect(el.getAttribute("aria-valuenow")).to.equal("0");
24
- el.progress = 50;
25
- await elementUpdated(el);
26
- expect(el.hasAttribute("aria-valuenow")).to.be.true;
27
- expect(el.getAttribute("aria-valuenow")).to.equal("50");
28
- el.progress = 100;
29
- await elementUpdated(el);
30
- expect(el.hasAttribute("aria-valuenow")).to.be.true;
31
- expect(el.getAttribute("aria-valuenow")).to.equal("100");
32
- });
33
- it("loads - [indeterminate]", async () => {
34
- const el = await fixture(html`
7
+ `);await r(e),a(e.hasAttribute("aria-valuenow")).to.be.true,a(e.getAttribute("aria-valuenow")).to.equal("0"),e.progress=50,await r(e),a(e.hasAttribute("aria-valuenow")).to.be.true,a(e.getAttribute("aria-valuenow")).to.equal("50"),e.progress=100,await r(e),a(e.hasAttribute("aria-valuenow")).to.be.true,a(e.getAttribute("aria-valuenow")).to.equal("100")}),it("loads - [indeterminate]",async()=>{const e=await t(s`
35
8
  <sp-progress-bar indeterminate label="Loading"></sp-progress-bar>
36
- `);
37
- await elementUpdated(el);
38
- expect(el).to.not.be.undefined;
39
- await expect(el).to.be.accessible();
40
- });
41
- it("accepts user `role`", async () => {
42
- const el = await fixture(html`
9
+ `);await r(e),a(e).to.not.be.undefined,await a(e).to.be.accessible()}),it("accepts user `role`",async()=>{const e=await t(s`
43
10
  <sp-progress-bar
44
11
  role="progressbar"
45
12
  label="With user role"
46
13
  ></sp-progress-bar>
47
- `);
48
- await elementUpdated(el);
49
- expect(el.getAttribute("role")).to.equal("progressbar");
50
- });
51
- it("returns to indeterminate", async () => {
52
- const el = await fixture(html`
14
+ `);await r(e),a(e.getAttribute("role")).to.equal("progressbar")}),it("returns to indeterminate",async()=>{const e=await t(s`
53
15
  <sp-progress-bar
54
16
  progress="50"
55
17
  label="Sometimes indeterminate"
56
18
  ></sp-progress-bar>
57
- `);
58
- await elementUpdated(el);
59
- expect(el.hasAttribute("aria-valuenow")).to.be.true;
60
- expect(el.getAttribute("aria-valuenow")).to.equal("50");
61
- el.indeterminate = true;
62
- await elementUpdated(el);
63
- expect(el.hasAttribute("aria-valuenow")).to.be.false;
64
- });
65
- it("warns in Dev Mode when accessible attributes are not leveraged", async () => {
66
- const consoleWarnStub = stub(console, "warn");
67
- const el = await fixture(html`
19
+ `);await r(e),a(e.hasAttribute("aria-valuenow")).to.be.true,a(e.getAttribute("aria-valuenow")).to.equal("50"),e.indeterminate=!0,await r(e),a(e.hasAttribute("aria-valuenow")).to.be.false}),it("warns in Dev Mode when accessible attributes are not leveraged",async()=>{const e=l(console,"warn"),i=await t(s`
68
20
  <sp-progress-bar progress="50"></sp-progress-bar>
69
- `);
70
- await elementUpdated(el);
71
- expect(consoleWarnStub.called).to.be.true;
72
- const spyCall = consoleWarnStub.getCall(0);
73
- expect(spyCall.args.at(0).includes("accessible"), "confirm accessibility-centric message").to.be.true;
74
- expect(spyCall.args.at(-1), "confirm `data` shape").to.deep.equal({
75
- data: {
76
- localName: "sp-progress-bar",
77
- type: "accessibility",
78
- level: "default"
79
- }
80
- });
81
- consoleWarnStub.restore();
82
- });
83
- });
21
+ `);await r(i),a(e.called).to.be.true;const o=e.getCall(0);a(o.args.at(0).includes("accessible"),"confirm accessibility-centric message").to.be.true,a(o.args.at(-1),"confirm `data` shape").to.deep.equal({data:{localName:"sp-progress-bar",type:"accessibility",level:"default"}}),e.restore()})});
84
22
  //# sourceMappingURL=progress-bar.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["progress-bar.test.ts"],
4
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-bar/sp-progress-bar.js';\nimport { ProgressBar } from '@spectrum-web-components/progress-bar';\nimport { stub } from 'sinon';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('ProgressBar', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<ProgressBar>(\n html`\n <sp-progress-bar label=\"Loading\"></sp-progress-bar>\n `\n )\n );\n it('loads default progress-bar accessibly', async () => {\n const el = await fixture<ProgressBar>(\n html`\n <sp-progress-bar label=\"Loading\"></sp-progress-bar>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n\n it('accepts a changing progress', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar label=\"Changing value\"></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('0');\n\n el.progress = 50;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('50');\n\n el.progress = 100;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('100');\n });\n it('loads - [indeterminate]', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar indeterminate label=\"Loading\"></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n it('accepts user `role`', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar\n role=\"progressbar\"\n label=\"With user role\"\n ></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(el.getAttribute('role')).to.equal('progressbar');\n });\n it('returns to indeterminate', async () => {\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar\n progress=\"50\"\n label=\"Sometimes indeterminate\"\n ></sp-progress-bar>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('50');\n\n el.indeterminate = true;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.false;\n });\n it('warns in Dev Mode when accessible attributes are not leveraged', async () => {\n const consoleWarnStub = stub(console, 'warn');\n const el = await fixture<ProgressBar>(html`\n <sp-progress-bar progress=\"50\"></sp-progress-bar>\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-bar',\n type: 'accessibility',\n level: 'default',\n },\n });\n consoleWarnStub.restore();\n });\n});\n"],
5
- "mappings": "AAYA;AAEA;AAEA;AACA;AAEA,SAAS,eAAe,MAAM;AAC1B,wBACI,YACI,MAAM,QACF;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