@spectrum-web-components/meter 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/meter",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -44,9 +44,9 @@
44
44
  "lit-html"
45
45
  ],
46
46
  "dependencies": {
47
- "@spectrum-web-components/base": "^0.5.3",
48
- "@spectrum-web-components/field-label": "^0.7.5",
49
- "@spectrum-web-components/shared": "^0.13.5",
47
+ "@spectrum-web-components/base": "^0.5.4",
48
+ "@spectrum-web-components/field-label": "^0.7.6",
49
+ "@spectrum-web-components/shared": "^0.13.6",
50
50
  "tslib": "^2.0.0"
51
51
  },
52
52
  "devDependencies": {
@@ -57,5 +57,5 @@
57
57
  "sideEffects": [
58
58
  "./sp-*.js"
59
59
  ],
60
- "gitHead": "57aba8030b6af96af4015a0aa830e342a17dc219"
60
+ "gitHead": "caf12727e7f91dcf961e1fadacc727eea9ece27b"
61
61
  }
package/sp-meter.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { Meter } from './src/Meter.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'sp-meter': Meter;
5
+ }
6
+ }
package/sp-meter.js ADDED
@@ -0,0 +1,14 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { Meter } from './src/Meter.js';
13
+ customElements.define('sp-meter', Meter);
14
+ //# sourceMappingURL=sp-meter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sp-meter.js","sourceRoot":"","sources":["sp-meter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { Meter } from './src/Meter.js';\n\ncustomElements.define('sp-meter', Meter);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-meter': Meter;\n }\n}\n"]}
package/src/Meter.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ import { CSSResultArray, PropertyValues, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
2
+ import '@spectrum-web-components/field-label/sp-field-label.js';
3
+ declare const Meter_base: typeof SpectrumElement & {
4
+ new (...args: any[]): import("@spectrum-web-components/shared/src/observe-slot-text.js").SlotTextObservingInterface;
5
+ prototype: import("@spectrum-web-components/shared/src/observe-slot-text.js").SlotTextObservingInterface;
6
+ } & {
7
+ new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
8
+ prototype: import("@spectrum-web-components/base").SizedElementInterface;
9
+ };
10
+ /**
11
+ * @element sp-meter
12
+ *
13
+ * @slot - text labeling the Meter
14
+ */
15
+ export declare class Meter extends Meter_base {
16
+ static get styles(): CSSResultArray;
17
+ progress: number;
18
+ overBackground: boolean;
19
+ notice: boolean;
20
+ negative: boolean;
21
+ positive: boolean;
22
+ label: string;
23
+ sideLabel: boolean;
24
+ protected render(): TemplateResult;
25
+ protected firstUpdated(changes: PropertyValues): void;
26
+ protected updated(changes: PropertyValues): void;
27
+ }
28
+ export {};
package/src/Meter.js ADDED
@@ -0,0 +1,89 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { __decorate } from "tslib";
13
+ import { html, SizedMixin, SpectrumElement, } from '@spectrum-web-components/base';
14
+ import { property } from '@spectrum-web-components/base/src/decorators.js';
15
+ import { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';
16
+ import '@spectrum-web-components/field-label/sp-field-label.js';
17
+ import styles from './meter.css.js';
18
+ /**
19
+ * @element sp-meter
20
+ *
21
+ * @slot - text labeling the Meter
22
+ */
23
+ export class Meter extends SizedMixin(ObserveSlotText(SpectrumElement, '')) {
24
+ constructor() {
25
+ super(...arguments);
26
+ this.progress = 0;
27
+ this.overBackground = false;
28
+ this.notice = false;
29
+ this.negative = false;
30
+ this.positive = false;
31
+ this.label = '';
32
+ this.sideLabel = false;
33
+ }
34
+ static get styles() {
35
+ return [styles];
36
+ }
37
+ render() {
38
+ return html `
39
+ <sp-field-label size=${this.size} class="label">
40
+ ${this.slotHasContent ? html `` : this.label}
41
+ <slot>${this.label}</slot>
42
+ </sp-field-label>
43
+ <sp-field-label size=${this.size} class="percentage">
44
+ ${this.progress}%
45
+ </sp-field-label>
46
+ <div class="track">
47
+ <div
48
+ class="fill"
49
+ style="transform: scaleX(calc(${this.progress} / 100));"
50
+ ></div>
51
+ </div>
52
+ `;
53
+ }
54
+ firstUpdated(changes) {
55
+ super.firstUpdated(changes);
56
+ this.setAttribute('role', 'progressbar');
57
+ }
58
+ updated(changes) {
59
+ super.updated(changes);
60
+ if (changes.has('progress')) {
61
+ this.setAttribute('aria-valuenow', '' + this.progress);
62
+ }
63
+ if (this.label && changes.has('label')) {
64
+ this.setAttribute('aria-label', this.label);
65
+ }
66
+ }
67
+ }
68
+ __decorate([
69
+ property({ type: Number })
70
+ ], Meter.prototype, "progress", void 0);
71
+ __decorate([
72
+ property({ type: Boolean, reflect: true, attribute: 'over-background' })
73
+ ], Meter.prototype, "overBackground", void 0);
74
+ __decorate([
75
+ property({ type: Boolean, reflect: true })
76
+ ], Meter.prototype, "notice", void 0);
77
+ __decorate([
78
+ property({ type: Boolean, reflect: true })
79
+ ], Meter.prototype, "negative", void 0);
80
+ __decorate([
81
+ property({ type: Boolean, reflect: true })
82
+ ], Meter.prototype, "positive", void 0);
83
+ __decorate([
84
+ property({ type: String, reflect: true })
85
+ ], Meter.prototype, "label", void 0);
86
+ __decorate([
87
+ property({ type: Boolean, reflect: true, attribute: 'side-label' })
88
+ ], Meter.prototype, "sideLabel", void 0);
89
+ //# sourceMappingURL=Meter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Meter.js","sourceRoot":"","sources":["Meter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;;AAEF,OAAO,EAEH,IAAI,EAEJ,UAAU,EACV,eAAe,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAC3F,OAAO,wDAAwD,CAAC;AAChE,OAAO,MAAM,MAAM,gBAAgB,CAAC;AAEpC;;;;GAIG;AACH,MAAM,OAAO,KAAM,SAAQ,UAAU,CAAC,eAAe,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IAA3E;;QAMW,aAAQ,GAAG,CAAC,CAAC;QAGb,mBAAc,GAAG,KAAK,CAAC;QAGvB,WAAM,GAAG,KAAK,CAAC;QAGf,aAAQ,GAAG,KAAK,CAAC;QAGjB,aAAQ,GAAG,KAAK,CAAC;QAGjB,UAAK,GAAG,EAAE,CAAC;QAIX,cAAS,GAAG,KAAK,CAAC;IAkC7B,CAAC;IA1DU,MAAM,KAAK,MAAM;QACpB,OAAO,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IAwBS,MAAM;QACZ,OAAO,IAAI,CAAA;mCACgB,IAAI,CAAC,IAAI;kBAC1B,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAA,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK;wBACnC,IAAI,CAAC,KAAK;;mCAEC,IAAI,CAAC,IAAI;kBAC1B,IAAI,CAAC,QAAQ;;;;;oDAKqB,IAAI,CAAC,QAAQ;;;SAGxD,CAAC;IACN,CAAC;IAES,YAAY,CAAC,OAAuB;QAC1C,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC7C,CAAC;IAES,OAAO,CAAC,OAAuB;QACrC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;YACzB,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC1D;QACD,IAAI,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACpC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;SAC/C;IACL,CAAC;CACJ;AArDG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACP;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;6CAC3C;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCACrB;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACnB;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACnB;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oCACxB;AAIlB;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;wCAE3C","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 { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport styles from './meter.css.js';\n\n/**\n * @element sp-meter\n *\n * @slot - text labeling the Meter\n */\nexport class Meter extends SizedMixin(ObserveSlotText(SpectrumElement, '')) {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Number })\n public progress = 0;\n\n @property({ type: Boolean, reflect: true, attribute: 'over-background' })\n public overBackground = false;\n\n @property({ type: Boolean, reflect: true })\n public notice = false;\n\n @property({ type: Boolean, reflect: true })\n public negative = false;\n\n @property({ type: Boolean, reflect: true })\n public positive = false;\n\n @property({ type: String, reflect: true })\n public label = '';\n\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n // called sideLabel\n public sideLabel = false;\n\n protected render(): TemplateResult {\n return html`\n <sp-field-label size=${this.size} class=\"label\">\n ${this.slotHasContent ? html`` : this.label}\n <slot>${this.label}</slot>\n </sp-field-label>\n <sp-field-label size=${this.size} class=\"percentage\">\n ${this.progress}%\n </sp-field-label>\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 firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.setAttribute('role', 'progressbar');\n }\n\n protected updated(changes: PropertyValues): void {\n super.updated(changes);\n if (changes.has('progress')) {\n this.setAttribute('aria-valuenow', '' + this.progress);\n }\n if (this.label && changes.has('label')) {\n this.setAttribute('aria-label', this.label);\n }\n }\n}\n"]}
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './Meter.js';
package/src/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ export * from './Meter.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,cAAc,YAAY,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nexport * from './Meter.js';\n"]}
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,105 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { css } from '@spectrum-web-components/base';
13
+ const styles = css `
14
+ :host([size=s]){--spectrum-progressbar-border-radius:var(
15
+ --spectrum-progressbar-s-border-radius
16
+ );--spectrum-progressbar-indeterminate-fill-width:var(
17
+ --spectrum-progressbar-s-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)
18
+ );--spectrum-progressbar-indeterminate-duration:var(
19
+ --spectrum-progressbar-s-indeterminate-duration,var(--spectrum-global-animation-duration-2000)
20
+ );--spectrum-progressbar-value-gap-y:var(
21
+ --spectrum-progressbar-s-value-gap-y,0px
22
+ );--spectrum-progressbar-height:var(
23
+ --spectrum-progressbar-s-height,var(--spectrum-global-dimension-size-50)
24
+ );--spectrum-progressbar-width:var(
25
+ --spectrum-progressbar-s-width,var(--spectrum-global-dimension-static-size-2400)
26
+ )}:host([size=m]){--spectrum-progressbar-border-radius:var(
27
+ --spectrum-progressbar-m-border-radius
28
+ );--spectrum-progressbar-indeterminate-fill-width:var(
29
+ --spectrum-progressbar-m-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)
30
+ );--spectrum-progressbar-indeterminate-duration:var(
31
+ --spectrum-progressbar-m-indeterminate-duration,var(--spectrum-global-animation-duration-2000)
32
+ );--spectrum-progressbar-value-gap-y:var(
33
+ --spectrum-progressbar-m-value-gap-y,0px
34
+ );--spectrum-progressbar-height:var(
35
+ --spectrum-progressbar-m-height,var(--spectrum-global-dimension-size-75)
36
+ );--spectrum-progressbar-width:var(
37
+ --spectrum-progressbar-m-width,var(--spectrum-global-dimension-static-size-2400)
38
+ );--spectrum-fieldlabel-side-padding-right:var(
39
+ --spectrum-fieldlabel-m-side-padding-right,var(--spectrum-global-dimension-size-150)
40
+ )}:host([size=l]){--spectrum-progressbar-indeterminate-fill-width:var(
41
+ --spectrum-progressbar-l-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)
42
+ );--spectrum-progressbar-indeterminate-duration:var(
43
+ --spectrum-progressbar-l-indeterminate-duration,var(--spectrum-global-animation-duration-2000)
44
+ );--spectrum-progressbar-value-gap-y:var(
45
+ --spectrum-progressbar-l-value-gap-y,0px
46
+ );--spectrum-progressbar-height:var(
47
+ --spectrum-progressbar-l-height,var(--spectrum-global-dimension-size-100)
48
+ );--spectrum-progressbar-border-radius:var(
49
+ --spectrum-progressbar-l-border-radius,var(--spectrum-global-dimension-size-50)
50
+ );--spectrum-progressbar-width:var(
51
+ --spectrum-progressbar-l-width,var(--spectrum-global-dimension-static-size-2500)
52
+ )}:host([size=xl]){--spectrum-progressbar-border-radius:var(
53
+ --spectrum-progressbar-xl-border-radius
54
+ );--spectrum-progressbar-indeterminate-fill-width:var(
55
+ --spectrum-progressbar-xl-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)
56
+ );--spectrum-progressbar-indeterminate-duration:var(
57
+ --spectrum-progressbar-xl-indeterminate-duration,var(--spectrum-global-animation-duration-2000)
58
+ );--spectrum-progressbar-value-gap-y:var(
59
+ --spectrum-progressbar-xl-value-gap-y,0px
60
+ );--spectrum-progressbar-height:var(
61
+ --spectrum-progressbar-xl-height,var(--spectrum-global-dimension-size-125)
62
+ );--spectrum-progressbar-width:var(
63
+ --spectrum-progressbar-xl-width,var(--spectrum-global-dimension-static-size-2800)
64
+ )}: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(
65
+ --spectrum-progressbar-value-gap-y
66
+ )}.label{flex:1 1 0%}:host([dir=ltr]) .percentage{margin-left:var(
67
+ --spectrum-fieldlabel-side-padding-right
68
+ )}:host([dir=rtl]) .percentage{margin-right:var(
69
+ --spectrum-fieldlabel-side-padding-right
70
+ )}.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(
71
+ --spectrum-progressbar-width
72
+ )}:host([dir=ltr][side-label]) .label{margin-right:var(
73
+ --spectrum-fieldlabel-side-padding-right
74
+ )}:host([dir=rtl][side-label]) .label{margin-left:var(
75
+ --spectrum-fieldlabel-side-padding-right
76
+ )}: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(
77
+ --spectrum-fieldlabel-side-padding-right
78
+ )}:host([dir=rtl][side-label]) .percentage{margin-right:var(
79
+ --spectrum-fieldlabel-side-padding-right
80
+ )}:host([side-label]) .percentage{margin-bottom:0;order:3}:host([indeterminate]) .fill{animation-timing-function:var(
81
+ --spectrum-progressbar-indeterminate-animation-ease
82
+ );position:relative;width:var(
83
+ --spectrum-progressbar-indeterminate-fill-width
84
+ );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(
85
+ --spectrum-progressbar-m-track-fill-color,var(--spectrum-semantic-informative-color-default)
86
+ )}.track{background-color:var(
87
+ --spectrum-progressbar-m-track-color,var(--spectrum-alias-track-color-default)
88
+ )}:host([over-background]) .fill{background:var(
89
+ --spectrum-progressbar-m-overbackground-track-fill-color,var(--spectrum-alias-track-fill-color-overbackground)
90
+ )}:host([over-background]) .label,:host([over-background]) .percentage{color:var(
91
+ --spectrum-progressbar-m-overbackground-track-fill-color,var(--spectrum-alias-track-fill-color-overbackground)
92
+ )}:host([over-background]) .track{background-color:var(
93
+ --spectrum-progressbar-m-overbackground-track-color,var(--spectrum-alias-track-color-overbackground)
94
+ )}:host([positive]) .fill{background:var(
95
+ --spectrum-meter-m-positive-track-fill-color,var(--spectrum-semantic-positive-status-color)
96
+ )}:host([notice]) .fill{background:var(
97
+ --spectrum-meter-m-notice-track-fill-color,var(--spectrum-semantic-notice-status-color)
98
+ )}:host([negative]) .fill{background:var(
99
+ --spectrum-meter-m-negative-track-fill-color,var(--spectrum-semantic-negative-status-color)
100
+ )}.label,.percentage{color:var(
101
+ --spectrum-fieldlabel-m-text-color,var(--spectrum-alias-label-text-color)
102
+ )}.fill{transform-origin:left}:host([dir=rtl]) .fill{transform-origin:right}
103
+ `;
104
+ export default styles;
105
+ //# sourceMappingURL=meter.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meter.css.js","sourceRoot":"","sources":["meter.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\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([notice]) .fill{background:var(\n--spectrum-meter-m-notice-track-fill-color,var(--spectrum-semantic-notice-status-color)\n)}:host([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)}.fill{transform-origin:left}:host([dir=rtl]) .fill{transform-origin:right}\n`;\nexport default styles;"]}
@@ -0,0 +1,2 @@
1
+ declare const styles: import("@spectrum-web-components/base").CSSResult;
2
+ export default styles;
@@ -0,0 +1,105 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { css } from '@spectrum-web-components/base';
13
+ const styles = css `
14
+ :host([size=s]){--spectrum-progressbar-border-radius:var(
15
+ --spectrum-progressbar-s-border-radius
16
+ );--spectrum-progressbar-indeterminate-fill-width:var(
17
+ --spectrum-progressbar-s-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)
18
+ );--spectrum-progressbar-indeterminate-duration:var(
19
+ --spectrum-progressbar-s-indeterminate-duration,var(--spectrum-global-animation-duration-2000)
20
+ );--spectrum-progressbar-value-gap-y:var(
21
+ --spectrum-progressbar-s-value-gap-y,0px
22
+ );--spectrum-progressbar-height:var(
23
+ --spectrum-progressbar-s-height,var(--spectrum-global-dimension-size-50)
24
+ );--spectrum-progressbar-width:var(
25
+ --spectrum-progressbar-s-width,var(--spectrum-global-dimension-static-size-2400)
26
+ )}:host([size=m]){--spectrum-progressbar-border-radius:var(
27
+ --spectrum-progressbar-m-border-radius
28
+ );--spectrum-progressbar-indeterminate-fill-width:var(
29
+ --spectrum-progressbar-m-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)
30
+ );--spectrum-progressbar-indeterminate-duration:var(
31
+ --spectrum-progressbar-m-indeterminate-duration,var(--spectrum-global-animation-duration-2000)
32
+ );--spectrum-progressbar-value-gap-y:var(
33
+ --spectrum-progressbar-m-value-gap-y,0px
34
+ );--spectrum-progressbar-height:var(
35
+ --spectrum-progressbar-m-height,var(--spectrum-global-dimension-size-75)
36
+ );--spectrum-progressbar-width:var(
37
+ --spectrum-progressbar-m-width,var(--spectrum-global-dimension-static-size-2400)
38
+ );--spectrum-fieldlabel-side-padding-right:var(
39
+ --spectrum-fieldlabel-m-side-padding-right,var(--spectrum-global-dimension-size-150)
40
+ )}:host([size=l]){--spectrum-progressbar-indeterminate-fill-width:var(
41
+ --spectrum-progressbar-l-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)
42
+ );--spectrum-progressbar-indeterminate-duration:var(
43
+ --spectrum-progressbar-l-indeterminate-duration,var(--spectrum-global-animation-duration-2000)
44
+ );--spectrum-progressbar-value-gap-y:var(
45
+ --spectrum-progressbar-l-value-gap-y,0px
46
+ );--spectrum-progressbar-height:var(
47
+ --spectrum-progressbar-l-height,var(--spectrum-global-dimension-size-100)
48
+ );--spectrum-progressbar-border-radius:var(
49
+ --spectrum-progressbar-l-border-radius,var(--spectrum-global-dimension-size-50)
50
+ );--spectrum-progressbar-width:var(
51
+ --spectrum-progressbar-l-width,var(--spectrum-global-dimension-static-size-2500)
52
+ )}:host([size=xl]){--spectrum-progressbar-border-radius:var(
53
+ --spectrum-progressbar-xl-border-radius
54
+ );--spectrum-progressbar-indeterminate-fill-width:var(
55
+ --spectrum-progressbar-xl-indeterminate-fill-width,var(--spectrum-global-dimension-static-percent-70)
56
+ );--spectrum-progressbar-indeterminate-duration:var(
57
+ --spectrum-progressbar-xl-indeterminate-duration,var(--spectrum-global-animation-duration-2000)
58
+ );--spectrum-progressbar-value-gap-y:var(
59
+ --spectrum-progressbar-xl-value-gap-y,0px
60
+ );--spectrum-progressbar-height:var(
61
+ --spectrum-progressbar-xl-height,var(--spectrum-global-dimension-size-125)
62
+ );--spectrum-progressbar-width:var(
63
+ --spectrum-progressbar-xl-width,var(--spectrum-global-dimension-static-size-2800)
64
+ )}: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(
65
+ --spectrum-progressbar-value-gap-y
66
+ )}.label{flex:1 1 0%}:host([dir=ltr]) .percentage{margin-left:var(
67
+ --spectrum-fieldlabel-side-padding-right
68
+ )}:host([dir=rtl]) .percentage{margin-right:var(
69
+ --spectrum-fieldlabel-side-padding-right
70
+ )}.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(
71
+ --spectrum-progressbar-width
72
+ )}:host([dir=ltr][side-label]) .label{margin-right:var(
73
+ --spectrum-fieldlabel-side-padding-right
74
+ )}:host([dir=rtl][side-label]) .label{margin-left:var(
75
+ --spectrum-fieldlabel-side-padding-right
76
+ )}: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(
77
+ --spectrum-fieldlabel-side-padding-right
78
+ )}:host([dir=rtl][side-label]) .percentage{margin-right:var(
79
+ --spectrum-fieldlabel-side-padding-right
80
+ )}:host([side-label]) .percentage{margin-bottom:0;order:3}:host([indeterminate]) .fill{animation-timing-function:var(
81
+ --spectrum-progressbar-indeterminate-animation-ease
82
+ );position:relative;width:var(
83
+ --spectrum-progressbar-indeterminate-fill-width
84
+ );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(
85
+ --spectrum-progressbar-m-track-fill-color,var(--spectrum-semantic-informative-color-default)
86
+ )}.track{background-color:var(
87
+ --spectrum-progressbar-m-track-color,var(--spectrum-alias-track-color-default)
88
+ )}:host([over-background]) .fill{background:var(
89
+ --spectrum-progressbar-m-overbackground-track-fill-color,var(--spectrum-alias-track-fill-color-overbackground)
90
+ )}:host([over-background]) .label,:host([over-background]) .percentage{color:var(
91
+ --spectrum-progressbar-m-overbackground-track-fill-color,var(--spectrum-alias-track-fill-color-overbackground)
92
+ )}:host([over-background]) .track{background-color:var(
93
+ --spectrum-progressbar-m-overbackground-track-color,var(--spectrum-alias-track-color-overbackground)
94
+ )}:host([positive]) .fill{background:var(
95
+ --spectrum-meter-m-positive-track-fill-color,var(--spectrum-semantic-positive-status-color)
96
+ )}:host([notice]) .fill{background:var(
97
+ --spectrum-meter-m-notice-track-fill-color,var(--spectrum-semantic-notice-status-color)
98
+ )}:host([negative]) .fill{background:var(
99
+ --spectrum-meter-m-negative-track-fill-color,var(--spectrum-semantic-negative-status-color)
100
+ )}.label,.percentage{color:var(
101
+ --spectrum-fieldlabel-m-text-color,var(--spectrum-alias-label-text-color)
102
+ )}
103
+ `;
104
+ export default styles;
105
+ //# sourceMappingURL=spectrum-meter.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spectrum-meter.css.js","sourceRoot":"","sources":["spectrum-meter.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\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([notice]) .fill{background:var(\n--spectrum-meter-m-notice-track-fill-color,var(--spectrum-semantic-notice-status-color)\n)}:host([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)}\n`;\nexport default styles;"]}
@@ -0,0 +1,38 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { html } from '@spectrum-web-components/base';
13
+ import '../sp-meter.js';
14
+ export default {
15
+ title: 'Meter/Sizes',
16
+ component: 'sp-meter',
17
+ };
18
+ export const s = () => {
19
+ return html `
20
+ <sp-meter size="s" progress="50">Storage Space</sp-meter>
21
+ `;
22
+ };
23
+ export const m = () => {
24
+ return html `
25
+ <sp-meter size="m" progress="50">Storage Space</sp-meter>
26
+ `;
27
+ };
28
+ export const l = () => {
29
+ return html `
30
+ <sp-meter size="l" progress="50">Storage Space</sp-meter>
31
+ `;
32
+ };
33
+ export const XL = () => {
34
+ return html `
35
+ <sp-meter size="xl" progress="50">Storage Space</sp-meter>
36
+ `;
37
+ };
38
+ //# sourceMappingURL=meter-sizes.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meter-sizes.stories.js","sourceRoot":"","sources":["meter-sizes.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AAErE,OAAO,gBAAgB,CAAC;AAExB,eAAe;IACX,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,UAAU;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,GAAG,GAAmB,EAAE;IAClC,OAAO,IAAI,CAAA;;KAEV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,GAAG,GAAmB,EAAE;IAClC,OAAO,IAAI,CAAA;;KAEV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,GAAG,GAAmB,EAAE;IAClC,OAAO,IAAI,CAAA;;KAEV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,EAAE,GAAG,GAAmB,EAAE;IACnC,OAAO,IAAI,CAAA;;KAEV,CAAC;AACN,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '../sp-meter.js';\n\nexport default {\n title: 'Meter/Sizes',\n component: 'sp-meter',\n};\n\nexport const s = (): TemplateResult => {\n return html`\n <sp-meter size=\"s\" progress=\"50\">Storage Space</sp-meter>\n `;\n};\n\nexport const m = (): TemplateResult => {\n return html`\n <sp-meter size=\"m\" progress=\"50\">Storage Space</sp-meter>\n `;\n};\n\nexport const l = (): TemplateResult => {\n return html`\n <sp-meter size=\"l\" progress=\"50\">Storage Space</sp-meter>\n `;\n};\n\nexport const XL = (): TemplateResult => {\n return html`\n <sp-meter size=\"xl\" progress=\"50\">Storage Space</sp-meter>\n `;\n};\n"]}
@@ -0,0 +1,50 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import { html } from '@spectrum-web-components/base';
13
+ import '../sp-meter.js';
14
+ export default {
15
+ title: 'Meter',
16
+ component: 'sp-meter',
17
+ };
18
+ const makeOverBackground = (story) => html `
19
+ <div
20
+ 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"
21
+ >
22
+ ${story}
23
+ </div>
24
+ `;
25
+ export const sideLabel = () => {
26
+ return html `
27
+ <sp-meter side-label progress="50">Storage Space</sp-meter>
28
+ `;
29
+ };
30
+ export const negative = () => {
31
+ return html `
32
+ <sp-meter negative progress="95">Storage Space</sp-meter>
33
+ `;
34
+ };
35
+ export const notice = () => {
36
+ return html `
37
+ <sp-meter notice progress="73">Storage Space</sp-meter>
38
+ `;
39
+ };
40
+ export const positive = () => {
41
+ return html `
42
+ <sp-meter positive progress="50">Storage Space</sp-meter>
43
+ `;
44
+ };
45
+ export const overBackground = () => {
46
+ return makeOverBackground(html `
47
+ <sp-meter over-background progress="50">Storage Space</sp-meter>
48
+ `);
49
+ };
50
+ //# sourceMappingURL=meter.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meter.stories.js","sourceRoot":"","sources":["meter.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AAErE,OAAO,gBAAgB,CAAC;AAExB,eAAe;IACX,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,UAAU;CACxB,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,KAAqB,EAAkB,EAAE,CAAC,IAAI,CAAA;;;;UAIhE,KAAK;;CAEd,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAmB,EAAE;IAC1C,OAAO,IAAI,CAAA;;KAEV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAmB,EAAE;IACzC,OAAO,IAAI,CAAA;;KAEV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,GAAmB,EAAE;IACvC,OAAO,IAAI,CAAA;;KAEV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAmB,EAAE;IACzC,OAAO,IAAI,CAAA;;KAEV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAmB,EAAE;IAC/C,OAAO,kBAAkB,CACrB,IAAI,CAAA;;SAEH,CACJ,CAAC;AACN,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '../sp-meter.js';\n\nexport default {\n title: 'Meter',\n component: 'sp-meter',\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 sideLabel = (): TemplateResult => {\n return html`\n <sp-meter side-label progress=\"50\">Storage Space</sp-meter>\n `;\n};\n\nexport const negative = (): TemplateResult => {\n return html`\n <sp-meter negative progress=\"95\">Storage Space</sp-meter>\n `;\n};\n\nexport const notice = (): TemplateResult => {\n return html`\n <sp-meter notice progress=\"73\">Storage Space</sp-meter>\n `;\n};\n\nexport const positive = (): TemplateResult => {\n return html`\n <sp-meter positive progress=\"50\">Storage Space</sp-meter>\n `;\n};\n\nexport const overBackground = (): TemplateResult => {\n return makeOverBackground(\n html`\n <sp-meter over-background progress=\"50\">Storage Space</sp-meter>\n `\n );\n};\n"]}