@spectrum-web-components/meter 0.30.0 → 0.30.1-overlay.30
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 +5 -5
- package/src/Meter.d.ts +1 -0
- package/src/Meter.dev.js +6 -1
- package/src/Meter.dev.js.map +2 -2
- package/src/Meter.js +2 -2
- package/src/Meter.js.map +3 -3
- package/test/meter.test.js +29 -0
- package/test/meter.test.js.map +2 -2
- package/custom-elements.json +0 -208
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/meter",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.1-overlay.30+1df211c75",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"lit-html"
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@spectrum-web-components/base": "^0.30.
|
|
61
|
-
"@spectrum-web-components/field-label": "^0.30.
|
|
62
|
-
"@spectrum-web-components/shared": "^0.30.
|
|
60
|
+
"@spectrum-web-components/base": "^0.30.1-overlay.30+1df211c75",
|
|
61
|
+
"@spectrum-web-components/field-label": "^0.30.1-overlay.30+1df211c75",
|
|
62
|
+
"@spectrum-web-components/shared": "^0.30.1-overlay.30+1df211c75"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@spectrum-css/progressbar": "^3.0.27"
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"./sp-*.js",
|
|
71
71
|
"./**/*.dev.js"
|
|
72
72
|
],
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "1df211c7581b6fd6ec624cf2b09bc81aeec29c26"
|
|
74
74
|
}
|
package/src/Meter.d.ts
CHANGED
package/src/Meter.dev.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "@spectrum-web-components/base";
|
|
18
18
|
import { property } from "@spectrum-web-components/base/src/decorators.js";
|
|
19
19
|
import { ObserveSlotText } from "@spectrum-web-components/shared/src/observe-slot-text.js";
|
|
20
|
+
import { LanguageResolutionController } from "@spectrum-web-components/reactive-controllers/src/LanguageResolution.js";
|
|
20
21
|
import "@spectrum-web-components/field-label/sp-field-label.js";
|
|
21
22
|
import styles from "./meter.css.js";
|
|
22
23
|
export class Meter extends SizedMixin(ObserveSlotText(SpectrumElement, "")) {
|
|
@@ -28,6 +29,7 @@ export class Meter extends SizedMixin(ObserveSlotText(SpectrumElement, "")) {
|
|
|
28
29
|
this.negative = false;
|
|
29
30
|
this.positive = false;
|
|
30
31
|
this.label = "";
|
|
32
|
+
this.languageResolver = new LanguageResolutionController(this);
|
|
31
33
|
// called sideLabel
|
|
32
34
|
this.sideLabel = false;
|
|
33
35
|
}
|
|
@@ -41,7 +43,10 @@ export class Meter extends SizedMixin(ObserveSlotText(SpectrumElement, "")) {
|
|
|
41
43
|
<slot>${this.label}</slot>
|
|
42
44
|
</sp-field-label>
|
|
43
45
|
<sp-field-label size=${this.size} class="percentage">
|
|
44
|
-
${this.
|
|
46
|
+
${new Intl.NumberFormat(this.languageResolver.language, {
|
|
47
|
+
style: "percent",
|
|
48
|
+
unitDisplay: "narrow"
|
|
49
|
+
}).format(this.progress / 100)}
|
|
45
50
|
</sp-field-label>
|
|
46
51
|
<div class="track">
|
|
47
52
|
<div
|
package/src/Meter.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Meter.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\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 override 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 @property({ type: String, reflect: true })\n public static: 'white' | undefined;\n\n protected override 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}
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,SAAS,uBAAuB;AAChC,OAAO;AACP,OAAO,YAAY;AAOZ,aAAM,cAAc,WAAW,gBAAgB,iBAAiB,EAAE,CAAC,EAAE;AAAA,EAArE;AAAA;AAMH,SAAO,WAAW;AAGlB,SAAO,iBAAiB;AAGxB,SAAO,SAAS;AAGhB,SAAO,WAAW;AAGlB,SAAO,WAAW;AAGlB,SAAO,QAAQ;
|
|
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 { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\nimport { LanguageResolutionController } from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.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 override 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 private languageResolver = new LanguageResolutionController(this);\n\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n // called sideLabel\n public sideLabel = false;\n\n @property({ type: String, reflect: true })\n public static: 'white' | undefined;\n\n protected override 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 ${new Intl.NumberFormat(this.languageResolver.language, {\n style: 'percent',\n unitDisplay: 'narrow',\n }).format(this.progress / 100)}\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 override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.setAttribute('role', 'progressbar');\n }\n\n protected override 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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EAEA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AAEzB,SAAS,uBAAuB;AAChC,SAAS,oCAAoC;AAC7C,OAAO;AACP,OAAO,YAAY;AAOZ,aAAM,cAAc,WAAW,gBAAgB,iBAAiB,EAAE,CAAC,EAAE;AAAA,EAArE;AAAA;AAMH,SAAO,WAAW;AAGlB,SAAO,iBAAiB;AAGxB,SAAO,SAAS;AAGhB,SAAO,WAAW;AAGlB,SAAO,WAAW;AAGlB,SAAO,QAAQ;AAEf,SAAQ,mBAAmB,IAAI,6BAA6B,IAAI;AAIhE;AAAA,SAAO,YAAY;AAAA;AAAA,EA1BnB,WAA2B,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EA6BmB,SAAyB;AACxC,WAAO;AAAA,mCACoB,KAAK;AAAA,kBACtB,KAAK,iBAAiB,SAAS,KAAK;AAAA,wBAC9B,KAAK;AAAA;AAAA,mCAEM,KAAK;AAAA,kBACtB,IAAI,KAAK,aAAa,KAAK,iBAAiB,UAAU;AAAA,MACpD,OAAO;AAAA,MACP,aAAa;AAAA,IACjB,CAAC,EAAE,OAAO,KAAK,WAAW,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,oDAKO,KAAK;AAAA;AAAA;A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,o=a.length-1,p;o>=0;o--)(p=a[o])&&(r=(i?p(s,e,r):p(r))||r);return i&&r&&c(s,e,r),r};import{html as u,SizedMixin as n,SpectrumElement as b}from"@spectrum-web-components/base";import{property as l}from"@spectrum-web-components/base/src/decorators.js";import{ObserveSlotText as f}from"@spectrum-web-components/shared/src/observe-slot-text.js";import{LanguageResolutionController as m}from"@spectrum-web-components/reactive-controllers/src/LanguageResolution.js";import"@spectrum-web-components/field-label/sp-field-label.js";import g from"./meter.css.js";export class Meter extends n(f(b,"")){constructor(){super(...arguments);this.progress=0;this.overBackground=!1;this.notice=!1;this.negative=!1;this.positive=!1;this.label="";this.languageResolver=new m(this);this.sideLabel=!1}static get styles(){return[g]}render(){return u`
|
|
2
2
|
<sp-field-label size=${this.size} class="label">
|
|
3
3
|
${this.slotHasContent?u``:this.label}
|
|
4
4
|
<slot>${this.label}</slot>
|
|
5
5
|
</sp-field-label>
|
|
6
6
|
<sp-field-label size=${this.size} class="percentage">
|
|
7
|
-
${this.progress}
|
|
7
|
+
${new Intl.NumberFormat(this.languageResolver.language,{style:"percent",unitDisplay:"narrow"}).format(this.progress/100)}
|
|
8
8
|
</sp-field-label>
|
|
9
9
|
<div class="track">
|
|
10
10
|
<div
|
package/src/Meter.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Meter.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\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 override 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 @property({ type: String, reflect: true })\n public static: 'white' | undefined;\n\n protected override 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}
|
|
5
|
-
"mappings": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAEzB,OAAS,mBAAAC,MAAuB,2DAChC,MAAO,yDACP,OAAOC,MAAY,iBAOZ,aAAM,
|
|
6
|
-
"names": ["html", "SizedMixin", "SpectrumElement", "property", "ObserveSlotText", "styles", "changes", "__decorateClass"]
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n SizedMixin,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport { ObserveSlotText } from '@spectrum-web-components/shared/src/observe-slot-text.js';\nimport { LanguageResolutionController } from '@spectrum-web-components/reactive-controllers/src/LanguageResolution.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 override 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 private languageResolver = new LanguageResolutionController(this);\n\n @property({ type: Boolean, reflect: true, attribute: 'side-label' })\n // called sideLabel\n public sideLabel = false;\n\n @property({ type: String, reflect: true })\n public static: 'white' | undefined;\n\n protected override 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 ${new Intl.NumberFormat(this.languageResolver.language, {\n style: 'percent',\n unitDisplay: 'narrow',\n }).format(this.progress / 100)}\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 override firstUpdated(changes: PropertyValues): void {\n super.firstUpdated(changes);\n this.setAttribute('role', 'progressbar');\n }\n\n protected override 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"],
|
|
5
|
+
"mappings": "qNAYA,OAEI,QAAAA,EAEA,cAAAC,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDAEzB,OAAS,mBAAAC,MAAuB,2DAChC,OAAS,gCAAAC,MAAoC,0EAC7C,MAAO,yDACP,OAAOC,MAAY,iBAOZ,aAAM,cAAcL,EAAWG,EAAgBF,EAAiB,EAAE,CAAC,CAAE,CAArE,kCAMH,KAAO,SAAW,EAGlB,KAAO,eAAiB,GAGxB,KAAO,OAAS,GAGhB,KAAO,SAAW,GAGlB,KAAO,SAAW,GAGlB,KAAO,MAAQ,GAEf,KAAQ,iBAAmB,IAAIG,EAA6B,IAAI,EAIhE,KAAO,UAAY,GA1BnB,WAA2B,QAAyB,CAChD,MAAO,CAACC,CAAM,CAClB,CA6BmB,QAAyB,CACxC,OAAON;AAAA,mCACoB,KAAK;AAAA,kBACtB,KAAK,eAAiBA,IAAS,KAAK;AAAA,wBAC9B,KAAK;AAAA;AAAA,mCAEM,KAAK;AAAA,kBACtB,IAAI,KAAK,aAAa,KAAK,iBAAiB,SAAU,CACpD,MAAO,UACP,YAAa,QACjB,CAAC,EAAE,OAAO,KAAK,SAAW,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,oDAKO,KAAK;AAAA;AAAA;AAAA,SAIrD,CAEmB,aAAaO,EAA+B,CAC3D,MAAM,aAAaA,CAAO,EAC1B,KAAK,aAAa,OAAQ,aAAa,CAC3C,CAEmB,QAAQA,EAA+B,CACtD,MAAM,QAAQA,CAAO,EACjBA,EAAQ,IAAI,UAAU,GACtB,KAAK,aAAa,gBAAiB,GAAK,KAAK,QAAQ,EAErD,KAAK,OAASA,EAAQ,IAAI,OAAO,GACjC,KAAK,aAAa,aAAc,KAAK,KAAK,CAElD,CACJ,CA7DWC,EAAA,CADNL,EAAS,CAAE,KAAM,MAAO,CAAC,GALjB,MAMF,wBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,iBAAkB,CAAC,GAR/D,MASF,8BAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAXjC,MAYF,sBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAdjC,MAeF,wBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAjBjC,MAkBF,wBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GApBhC,MAqBF,qBAMAK,EAAA,CAFNL,EAAS,CAAE,KAAM,QAAS,QAAS,GAAM,UAAW,YAAa,CAAC,GAzB1D,MA2BF,yBAGAK,EAAA,CADNL,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GA7BhC,MA8BF",
|
|
6
|
+
"names": ["html", "SizedMixin", "SpectrumElement", "property", "ObserveSlotText", "LanguageResolutionController", "styles", "changes", "__decorateClass"]
|
|
7
7
|
}
|
package/test/meter.test.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
|
|
3
3
|
import "@spectrum-web-components/meter/sp-meter.js";
|
|
4
4
|
import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
|
|
5
|
+
import { createLanguageContext } from "../../../tools/reactive-controllers/test/helpers.js";
|
|
5
6
|
describe("Meter", () => {
|
|
6
7
|
testForLitDevWarnings(
|
|
7
8
|
async () => await fixture(
|
|
@@ -52,5 +53,33 @@ describe("Meter", () => {
|
|
|
52
53
|
expect(el.hasAttribute("aria-valuenow")).to.be.true;
|
|
53
54
|
expect(el.getAttribute("aria-valuenow")).to.equal("100");
|
|
54
55
|
});
|
|
56
|
+
it("resolves a language (en-US)", async () => {
|
|
57
|
+
var _a;
|
|
58
|
+
const [languageContext] = createLanguageContext("en-US");
|
|
59
|
+
const test = await fixture(html`
|
|
60
|
+
<div @sp-language-context=${languageContext}>
|
|
61
|
+
<sp-meter label="Changing Value" progress="45"></sp-meter>
|
|
62
|
+
</div>
|
|
63
|
+
`);
|
|
64
|
+
const el = test.querySelector("sp-meter");
|
|
65
|
+
const percentage = el.shadowRoot.querySelector(
|
|
66
|
+
".percentage"
|
|
67
|
+
);
|
|
68
|
+
expect((_a = percentage.textContent) == null ? void 0 : _a.search("%")).to.not.equal(-1);
|
|
69
|
+
});
|
|
70
|
+
it("resolves a language (ar-sa)", async () => {
|
|
71
|
+
var _a;
|
|
72
|
+
const [languageContext] = createLanguageContext("ar-sa");
|
|
73
|
+
const test = await fixture(html`
|
|
74
|
+
<div @sp-language-context=${languageContext}>
|
|
75
|
+
<sp-meter label="Changing Value" progress="45"></sp-meter>
|
|
76
|
+
</div>
|
|
77
|
+
`);
|
|
78
|
+
const el = test.querySelector("sp-meter");
|
|
79
|
+
const percentage = el.shadowRoot.querySelector(
|
|
80
|
+
".percentage"
|
|
81
|
+
);
|
|
82
|
+
expect((_a = percentage.textContent) == null ? void 0 : _a.search("\u066A")).to.not.equal(-1);
|
|
83
|
+
});
|
|
55
84
|
});
|
|
56
85
|
//# sourceMappingURL=meter.test.js.map
|
package/test/meter.test.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["meter.test.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '@spectrum-web-components/meter/sp-meter.js';\nimport { Meter } from '@spectrum-web-components/meter';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('Meter', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Meter>(\n html`\n <sp-meter label=\"Loading\"></sp-meter>\n `\n )\n );\n it('loads default meter accessibly', async () => {\n const el = await fixture<Meter>(\n html`\n <sp-meter label=\"Loading\"></sp-meter>\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 process w/ [label]', async () => {\n const el = await fixture<Meter>(html`\n <sp-meter label=\"Changing Value\"></sp-meter>\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\n it('accepts a changing process', async () => {\n const el = await fixture<Meter>(html`\n <sp-meter>Changing Value</sp-meter>\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});\n"],
|
|
5
|
-
"mappings": ";AAYA,SAAS,gBAA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,GAAG;AAC/C,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,MAAM,IAAI;AAEtD,OAAG,WAAW;AAEd,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,GAAG;AAC/C,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,MAAM,KAAK;AAAA,EAC3D,CAAC;AACL,CAAC;",
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '@spectrum-web-components/meter/sp-meter.js';\nimport { Meter } from '@spectrum-web-components/meter';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\nimport { createLanguageContext } from '../../../tools/reactive-controllers/test/helpers.js';\n\ndescribe('Meter', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Meter>(\n html`\n <sp-meter label=\"Loading\"></sp-meter>\n `\n )\n );\n it('loads default meter accessibly', async () => {\n const el = await fixture<Meter>(\n html`\n <sp-meter label=\"Loading\"></sp-meter>\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 process w/ [label]', async () => {\n const el = await fixture<Meter>(html`\n <sp-meter label=\"Changing Value\"></sp-meter>\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\n it('accepts a changing process', async () => {\n const el = await fixture<Meter>(html`\n <sp-meter>Changing Value</sp-meter>\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\n it('resolves a language (en-US)', async () => {\n const [languageContext] = createLanguageContext('en-US');\n const test = await fixture(html`\n <div @sp-language-context=${languageContext}>\n <sp-meter label=\"Changing Value\" progress=\"45\"></sp-meter>\n </div>\n `);\n const el = test.querySelector('sp-meter') as Meter;\n const percentage = el.shadowRoot.querySelector(\n '.percentage'\n ) as HTMLElement;\n expect(percentage.textContent?.search('%')).to.not.equal(-1);\n });\n\n it('resolves a language (ar-sa)', async () => {\n const [languageContext] = createLanguageContext('ar-sa');\n const test = await fixture(html`\n <div @sp-language-context=${languageContext}>\n <sp-meter label=\"Changing Value\" progress=\"45\"></sp-meter>\n </div>\n `);\n const el = test.querySelector('sp-meter') as Meter;\n const percentage = el.shadowRoot.querySelector(\n '.percentage'\n ) as HTMLElement;\n expect(percentage.textContent?.search('\u066A')).to.not.equal(-1);\n });\n});\n"],
|
|
5
|
+
"mappings": ";AAYA,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AAEtD,OAAO;AAEP,SAAS,6BAA6B;AACtC,SAAS,6BAA6B;AAEtC,SAAS,SAAS,MAAM;AACpB;AAAA,IACI,YACI,MAAM;AAAA,MACF;AAA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,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,GAAG;AAC/C,WAAO,GAAG,aAAa,eAAe,CAAC,EAAE,GAAG,MAAM,KAAK;AAAA,EAC3D,CAAC;AAED,KAAG,+BAA+B,YAAY;AA3FlD;AA4FQ,UAAM,CAAC,eAAe,IAAI,sBAAsB,OAAO;AACvD,UAAM,OAAO,MAAM,QAAQ;AAAA,wCACK;AAAA;AAAA;AAAA,SAG/B;AACD,UAAM,KAAK,KAAK,cAAc,UAAU;AACxC,UAAM,aAAa,GAAG,WAAW;AAAA,MAC7B;AAAA,IACJ;AACA,YAAO,gBAAW,gBAAX,mBAAwB,OAAO,IAAI,EAAE,GAAG,IAAI,MAAM,EAAE;AAAA,EAC/D,CAAC;AAED,KAAG,+BAA+B,YAAY;AAzGlD;AA0GQ,UAAM,CAAC,eAAe,IAAI,sBAAsB,OAAO;AACvD,UAAM,OAAO,MAAM,QAAQ;AAAA,wCACK;AAAA;AAAA;AAAA,SAG/B;AACD,UAAM,KAAK,KAAK,cAAc,UAAU;AACxC,UAAM,aAAa,GAAG,WAAW;AAAA,MAC7B;AAAA,IACJ;AACA,YAAO,gBAAW,gBAAX,mBAAwB,OAAO,SAAI,EAAE,GAAG,IAAI,MAAM,EAAE;AAAA,EAC/D,CAAC;AACL,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/custom-elements.json
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "1.0.0",
|
|
3
|
-
"readme": "",
|
|
4
|
-
"modules": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "javascript-module",
|
|
7
|
-
"path": "sp-meter.js",
|
|
8
|
-
"declarations": [],
|
|
9
|
-
"exports": []
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"kind": "javascript-module",
|
|
13
|
-
"path": "src/Meter.js",
|
|
14
|
-
"declarations": [
|
|
15
|
-
{
|
|
16
|
-
"kind": "class",
|
|
17
|
-
"description": "",
|
|
18
|
-
"name": "Meter",
|
|
19
|
-
"slots": [
|
|
20
|
-
{
|
|
21
|
-
"description": "text labeling the Meter",
|
|
22
|
-
"name": ""
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"members": [
|
|
26
|
-
{
|
|
27
|
-
"kind": "field",
|
|
28
|
-
"name": "progress",
|
|
29
|
-
"type": {
|
|
30
|
-
"text": "number"
|
|
31
|
-
},
|
|
32
|
-
"privacy": "public",
|
|
33
|
-
"default": "0",
|
|
34
|
-
"attribute": "progress"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"kind": "field",
|
|
38
|
-
"name": "overBackground",
|
|
39
|
-
"type": {
|
|
40
|
-
"text": "boolean"
|
|
41
|
-
},
|
|
42
|
-
"privacy": "public",
|
|
43
|
-
"default": "false",
|
|
44
|
-
"attribute": "over-background",
|
|
45
|
-
"reflects": true
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"kind": "field",
|
|
49
|
-
"name": "notice",
|
|
50
|
-
"type": {
|
|
51
|
-
"text": "boolean"
|
|
52
|
-
},
|
|
53
|
-
"privacy": "public",
|
|
54
|
-
"default": "false",
|
|
55
|
-
"attribute": "notice",
|
|
56
|
-
"reflects": true
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"kind": "field",
|
|
60
|
-
"name": "negative",
|
|
61
|
-
"type": {
|
|
62
|
-
"text": "boolean"
|
|
63
|
-
},
|
|
64
|
-
"privacy": "public",
|
|
65
|
-
"default": "false",
|
|
66
|
-
"attribute": "negative",
|
|
67
|
-
"reflects": true
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"kind": "field",
|
|
71
|
-
"name": "positive",
|
|
72
|
-
"type": {
|
|
73
|
-
"text": "boolean"
|
|
74
|
-
},
|
|
75
|
-
"privacy": "public",
|
|
76
|
-
"default": "false",
|
|
77
|
-
"attribute": "positive",
|
|
78
|
-
"reflects": true
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"kind": "field",
|
|
82
|
-
"name": "label",
|
|
83
|
-
"type": {
|
|
84
|
-
"text": "string"
|
|
85
|
-
},
|
|
86
|
-
"privacy": "public",
|
|
87
|
-
"default": "''",
|
|
88
|
-
"attribute": "label",
|
|
89
|
-
"reflects": true
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"kind": "field",
|
|
93
|
-
"name": "sideLabel",
|
|
94
|
-
"type": {
|
|
95
|
-
"text": "boolean"
|
|
96
|
-
},
|
|
97
|
-
"privacy": "public",
|
|
98
|
-
"default": "false",
|
|
99
|
-
"attribute": "side-label",
|
|
100
|
-
"reflects": true
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"kind": "field",
|
|
104
|
-
"name": "static",
|
|
105
|
-
"type": {
|
|
106
|
-
"text": "'white' | undefined"
|
|
107
|
-
},
|
|
108
|
-
"privacy": "public",
|
|
109
|
-
"attribute": "static",
|
|
110
|
-
"reflects": true
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"attributes": [
|
|
114
|
-
{
|
|
115
|
-
"name": "progress",
|
|
116
|
-
"type": {
|
|
117
|
-
"text": "number"
|
|
118
|
-
},
|
|
119
|
-
"default": "0",
|
|
120
|
-
"fieldName": "progress"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"name": "over-background",
|
|
124
|
-
"type": {
|
|
125
|
-
"text": "boolean"
|
|
126
|
-
},
|
|
127
|
-
"default": "false",
|
|
128
|
-
"fieldName": "overBackground"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"name": "notice",
|
|
132
|
-
"type": {
|
|
133
|
-
"text": "boolean"
|
|
134
|
-
},
|
|
135
|
-
"default": "false",
|
|
136
|
-
"fieldName": "notice"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"name": "negative",
|
|
140
|
-
"type": {
|
|
141
|
-
"text": "boolean"
|
|
142
|
-
},
|
|
143
|
-
"default": "false",
|
|
144
|
-
"fieldName": "negative"
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"name": "positive",
|
|
148
|
-
"type": {
|
|
149
|
-
"text": "boolean"
|
|
150
|
-
},
|
|
151
|
-
"default": "false",
|
|
152
|
-
"fieldName": "positive"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"name": "label",
|
|
156
|
-
"type": {
|
|
157
|
-
"text": "string"
|
|
158
|
-
},
|
|
159
|
-
"default": "''",
|
|
160
|
-
"fieldName": "label"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"name": "side-label",
|
|
164
|
-
"type": {
|
|
165
|
-
"text": "boolean"
|
|
166
|
-
},
|
|
167
|
-
"default": "false",
|
|
168
|
-
"fieldName": "sideLabel"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"name": "static",
|
|
172
|
-
"type": {
|
|
173
|
-
"text": "'white' | undefined"
|
|
174
|
-
},
|
|
175
|
-
"fieldName": "static"
|
|
176
|
-
}
|
|
177
|
-
],
|
|
178
|
-
"mixins": [
|
|
179
|
-
{
|
|
180
|
-
"name": "SizedMixin",
|
|
181
|
-
"package": "@spectrum-web-components/base"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"name": "ObserveSlotText",
|
|
185
|
-
"package": "@spectrum-web-components/shared/src/observe-slot-text.js"
|
|
186
|
-
}
|
|
187
|
-
],
|
|
188
|
-
"superclass": {
|
|
189
|
-
"name": "SpectrumElement",
|
|
190
|
-
"package": "@spectrum-web-components/base"
|
|
191
|
-
},
|
|
192
|
-
"tagName": "sp-meter",
|
|
193
|
-
"customElement": true
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
"exports": [
|
|
197
|
-
{
|
|
198
|
-
"kind": "js",
|
|
199
|
-
"name": "Meter",
|
|
200
|
-
"declaration": {
|
|
201
|
-
"name": "Meter",
|
|
202
|
-
"module": "src/Meter.js"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
]
|
|
206
|
-
}
|
|
207
|
-
]
|
|
208
|
-
}
|