@spectrum-web-components/button 0.20.0 → 0.20.1
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 +2 -2
- package/src/Button.d.ts +2 -1
- package/src/Button.dev.js +9 -1
- package/src/Button.dev.js.map +2 -2
- package/src/Button.js +1 -1
- package/src/Button.js.map +3 -3
- package/test/button.test.js +3 -1
- package/test/button.test.js.map +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/button",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"./sp-*.js",
|
|
99
99
|
"./**/*.dev.js"
|
|
100
100
|
],
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "15365e4ee7e9171108d5dc6694cf64cc11db3048"
|
|
102
102
|
}
|
package/src/Button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSResultArray } from '@spectrum-web-components/base';
|
|
1
|
+
import { CSSResultArray, PropertyValues } from '@spectrum-web-components/base';
|
|
2
2
|
import { StyledButton } from './StyledButton.js';
|
|
3
3
|
export declare type DeprecatedButtonVariants = 'cta' | 'overBackground';
|
|
4
4
|
export declare type ButtonStatics = 'white' | 'black';
|
|
@@ -33,5 +33,6 @@ export declare class Button extends Button_base {
|
|
|
33
33
|
* Style this button to be less obvious
|
|
34
34
|
*/
|
|
35
35
|
set quiet(quiet: boolean);
|
|
36
|
+
protected firstUpdated(changes: PropertyValues<this>): void;
|
|
36
37
|
}
|
|
37
38
|
export {};
|
package/src/Button.dev.js
CHANGED
|
@@ -10,7 +10,9 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
10
10
|
__defProp(target, key, result);
|
|
11
11
|
return result;
|
|
12
12
|
};
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
SizedMixin
|
|
15
|
+
} from "@spectrum-web-components/base";
|
|
14
16
|
import { property } from "@spectrum-web-components/base/src/decorators.js";
|
|
15
17
|
import { StyledButton } from "./StyledButton.dev.js";
|
|
16
18
|
import buttonStyles from "./button.css.js";
|
|
@@ -89,6 +91,12 @@ export class Button extends SizedMixin(StyledButton) {
|
|
|
89
91
|
set quiet(quiet) {
|
|
90
92
|
this.treatment = quiet ? "outline" : "fill";
|
|
91
93
|
}
|
|
94
|
+
firstUpdated(changes) {
|
|
95
|
+
super.firstUpdated(changes);
|
|
96
|
+
if (!this.hasAttribute("variant")) {
|
|
97
|
+
this.setAttribute("variant", this.variant);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
92
100
|
}
|
|
93
101
|
__decorateClass([
|
|
94
102
|
property()
|
package/src/Button.dev.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Button.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 {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAYA,
|
|
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 PropertyValues,\n SizedMixin,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.dev.js'\nimport buttonStyles from './button.css.js';\n\nexport type DeprecatedButtonVariants = 'cta' | 'overBackground';\nexport type ButtonStatics = 'white' | 'black';\nexport type ButtonVariants =\n | 'accent'\n | 'primary'\n | 'secondary'\n | 'negative'\n | ButtonStatics\n | DeprecatedButtonVariants;\nexport const VALID_VARIANTS = [\n 'accent',\n 'primary',\n 'secondary',\n 'negative',\n 'white',\n 'black',\n];\nexport const VALID_STATICS = ['white', 'black'];\n\nexport type ButtonTreatments = 'fill' | 'outline';\n\n/**\n * @element sp-button\n *\n * @slot - text label of the Button\n * @slot icon - The icon to use for Button\n */\nexport class Button extends SizedMixin(StyledButton) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles];\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property()\n public get variant(): ButtonVariants {\n return this._variant;\n }\n public set variant(variant: ButtonVariants) {\n if (variant === this.variant) return;\n\n this.requestUpdate('variant', this.variant);\n switch (variant) {\n case 'cta':\n this._variant = 'accent';\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"cta\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"variant='accent'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#variants'\n );\n }\n break;\n case 'overBackground':\n this.removeAttribute('variant');\n this.static = 'white';\n this.treatment = 'outline';\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"overBackground\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static='white'\" with \"treatment='outline'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button#static'\n );\n }\n return;\n case 'white':\n case 'black':\n this.static = variant;\n this.removeAttribute('variant');\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"black\" and \"white\" values of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static='black'\" or \"static='white'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button#static'\n );\n }\n return;\n case null:\n return;\n default:\n if (!VALID_VARIANTS.includes(variant)) {\n this._variant = 'accent';\n } else {\n this._variant = variant;\n }\n break;\n }\n this.setAttribute('variant', this.variant);\n }\n private _variant: ButtonVariants = 'accent';\n\n @property({ type: String, reflect: true })\n public static: 'black' | 'white' | undefined;\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public treatment: ButtonTreatments = 'fill';\n\n /**\n * Style this button to be less obvious\n */\n @property({ type: Boolean })\n public set quiet(quiet: boolean) {\n this.treatment = quiet ? 'outline' : 'fill';\n }\n\n protected override firstUpdated(changes: PropertyValues<this>): void {\n super.firstUpdated(changes);\n // There is no Spectrum design context for an `<sp-button>` without a variant\n // apply one manually when a consumer has not applied one themselves.\n if (!this.hasAttribute('variant')) {\n this.setAttribute('variant', this.variant);\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAYA;AAAA,EAGI;AAAA,OACG;AACP,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,OAAO,kBAAkB;AAWlB,aAAM,iBAAiB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;AACO,aAAM,gBAAgB,CAAC,SAAS,OAAO;AAUvC,aAAM,eAAe,WAAW,YAAY,EAAE;AAAA,EAA9C;AAAA;AA+DH,SAAQ,WAA2B;AASnC,SAAO,YAA8B;AAAA;AAAA,EAvErC,WAA2B,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,QAAQ,YAAY;AAAA,EACzC;AAAA,EAMA,IAAW,UAA0B;AACjC,WAAO,KAAK;AAAA,EAChB;AAAA,EACA,IAA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,EAAE,SAAS,KAAK,CAAC;AAAA,GAvElB,OAwEF;AAMI;AAAA,EADV,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GA7ElB,OA8EE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/Button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var i=(s,a,t,r)=>{for(var e=r>1?void 0:r?l(a,t):a,o=s.length-1,c;o>=0;o--)(c=s[o])&&(e=(r?c(a,t,e):c(e))||e);return r&&e&&u(a,t,e),e};import{SizedMixin as p}from"@spectrum-web-components/base";import{property as n}from"@spectrum-web-components/base/src/decorators.js";import{StyledButton as h}from"./StyledButton.js";import d from"./button.css.js";export const VALID_VARIANTS=["accent","primary","secondary","negative","white","black"],VALID_STATICS=["white","black"];export class Button extends p(h){constructor(){super(...arguments);this._variant="accent";this.treatment="fill"}static get styles(){return[...super.styles,d]}get variant(){return this._variant}set variant(t){if(t!==this.variant){switch(this.requestUpdate("variant",this.variant),t){case"cta":this._variant="accent";break;case"overBackground":this.removeAttribute("variant"),this.static="white",this.treatment="outline";return;case"white":case"black":this.static=t,this.removeAttribute("variant");return;case null:return;default:VALID_VARIANTS.includes(t)?this._variant=t:this._variant="accent";break}this.setAttribute("variant",this.variant)}}set quiet(t){this.treatment=t?"outline":"fill"}}i([n()],Button.prototype,"variant",1),i([n({type:String,reflect:!0})],Button.prototype,"static",2),i([n({reflect:!0})],Button.prototype,"treatment",2),i([n({type:Boolean})],Button.prototype,"quiet",1);
|
|
1
|
+
"use strict";var u=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var i=(s,a,t,r)=>{for(var e=r>1?void 0:r?l(a,t):a,o=s.length-1,c;o>=0;o--)(c=s[o])&&(e=(r?c(a,t,e):c(e))||e);return r&&e&&u(a,t,e),e};import{SizedMixin as p}from"@spectrum-web-components/base";import{property as n}from"@spectrum-web-components/base/src/decorators.js";import{StyledButton as h}from"./StyledButton.js";import d from"./button.css.js";export const VALID_VARIANTS=["accent","primary","secondary","negative","white","black"],VALID_STATICS=["white","black"];export class Button extends p(h){constructor(){super(...arguments);this._variant="accent";this.treatment="fill"}static get styles(){return[...super.styles,d]}get variant(){return this._variant}set variant(t){if(t!==this.variant){switch(this.requestUpdate("variant",this.variant),t){case"cta":this._variant="accent";break;case"overBackground":this.removeAttribute("variant"),this.static="white",this.treatment="outline";return;case"white":case"black":this.static=t,this.removeAttribute("variant");return;case null:return;default:VALID_VARIANTS.includes(t)?this._variant=t:this._variant="accent";break}this.setAttribute("variant",this.variant)}}set quiet(t){this.treatment=t?"outline":"fill"}firstUpdated(t){super.firstUpdated(t),this.hasAttribute("variant")||this.setAttribute("variant",this.variant)}}i([n()],Button.prototype,"variant",1),i([n({type:String,reflect:!0})],Button.prototype,"static",2),i([n({reflect:!0})],Button.prototype,"treatment",2),i([n({type:Boolean})],Button.prototype,"quiet",1);
|
|
2
2
|
//# sourceMappingURL=Button.js.map
|
package/src/Button.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["Button.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 {
|
|
5
|
-
"mappings": "qNAYA,
|
|
6
|
-
"names": ["SizedMixin", "property", "StyledButton", "buttonStyles", "variant", "quiet", "__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 PropertyValues,\n SizedMixin,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.js';\nimport buttonStyles from './button.css.js';\n\nexport type DeprecatedButtonVariants = 'cta' | 'overBackground';\nexport type ButtonStatics = 'white' | 'black';\nexport type ButtonVariants =\n | 'accent'\n | 'primary'\n | 'secondary'\n | 'negative'\n | ButtonStatics\n | DeprecatedButtonVariants;\nexport const VALID_VARIANTS = [\n 'accent',\n 'primary',\n 'secondary',\n 'negative',\n 'white',\n 'black',\n];\nexport const VALID_STATICS = ['white', 'black'];\n\nexport type ButtonTreatments = 'fill' | 'outline';\n\n/**\n * @element sp-button\n *\n * @slot - text label of the Button\n * @slot icon - The icon to use for Button\n */\nexport class Button extends SizedMixin(StyledButton) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles];\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property()\n public get variant(): ButtonVariants {\n return this._variant;\n }\n public set variant(variant: ButtonVariants) {\n if (variant === this.variant) return;\n\n this.requestUpdate('variant', this.variant);\n switch (variant) {\n case 'cta':\n this._variant = 'accent';\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"cta\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"variant='accent'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button/#variants'\n );\n }\n break;\n case 'overBackground':\n this.removeAttribute('variant');\n this.static = 'white';\n this.treatment = 'outline';\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"overBackground\" value of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static='white'\" with \"treatment='outline'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button#static'\n );\n }\n return;\n case 'white':\n case 'black':\n this.static = variant;\n this.removeAttribute('variant');\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n this,\n `The \"black\" and \"white\" values of the \"variant\" attribute on <${this.localName}> has been deprecated and will be removed in a future release. Use \"static='black'\" or \"static='white'\" instead.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/button#static'\n );\n }\n return;\n case null:\n return;\n default:\n if (!VALID_VARIANTS.includes(variant)) {\n this._variant = 'accent';\n } else {\n this._variant = variant;\n }\n break;\n }\n this.setAttribute('variant', this.variant);\n }\n private _variant: ButtonVariants = 'accent';\n\n @property({ type: String, reflect: true })\n public static: 'black' | 'white' | undefined;\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public treatment: ButtonTreatments = 'fill';\n\n /**\n * Style this button to be less obvious\n */\n @property({ type: Boolean })\n public set quiet(quiet: boolean) {\n this.treatment = quiet ? 'outline' : 'fill';\n }\n\n protected override firstUpdated(changes: PropertyValues<this>): void {\n super.firstUpdated(changes);\n // There is no Spectrum design context for an `<sp-button>` without a variant\n // apply one manually when a consumer has not applied one themselves.\n if (!this.hasAttribute('variant')) {\n this.setAttribute('variant', this.variant);\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "qNAYA,OAGI,cAAAA,MACG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,gBAAAC,MAAoB,oBAC7B,OAAOC,MAAkB,kBAWlB,aAAM,eAAiB,CAC1B,SACA,UACA,YACA,WACA,QACA,OACJ,EACa,cAAgB,CAAC,QAAS,OAAO,EAUvC,aAAM,eAAeH,EAAWE,CAAY,CAAE,CAA9C,kCA+DH,KAAQ,SAA2B,SASnC,KAAO,UAA8B,OAvErC,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,OAAQC,CAAY,CACzC,CAMA,IAAW,SAA0B,CACjC,OAAO,KAAK,QAChB,CACA,IAAW,QAAQC,EAAyB,CACxC,GAAIA,IAAY,KAAK,QAGrB,QADA,KAAK,cAAc,UAAW,KAAK,OAAO,EAClCA,EAAS,CACb,IAAK,MACD,KAAK,SAAW,SAQhB,MACJ,IAAK,iBACD,KAAK,gBAAgB,SAAS,EAC9B,KAAK,OAAS,QACd,KAAK,UAAY,UAQjB,OACJ,IAAK,QACL,IAAK,QACD,KAAK,OAASA,EACd,KAAK,gBAAgB,SAAS,EAQ9B,OACJ,KAAK,KACD,OACJ,QACS,eAAe,SAASA,CAAO,EAGhC,KAAK,SAAWA,EAFhB,KAAK,SAAW,SAIpB,KACR,CACA,KAAK,aAAa,UAAW,KAAK,OAAO,EAC7C,CAgBA,IAAW,MAAMC,EAAgB,CAC7B,KAAK,UAAYA,EAAQ,UAAY,MACzC,CAEmB,aAAaC,EAAqC,CACjE,MAAM,aAAaA,CAAO,EAGrB,KAAK,aAAa,SAAS,GAC5B,KAAK,aAAa,UAAW,KAAK,OAAO,CAEjD,CACJ,CAjFeC,EAAA,CADVN,EAAS,GARD,OASE,uBAyDJM,EAAA,CADNN,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAjEhC,OAkEF,sBAMAM,EAAA,CADNN,EAAS,CAAE,QAAS,EAAK,CAAC,GAvElB,OAwEF,yBAMIM,EAAA,CADVN,EAAS,CAAE,KAAM,OAAQ,CAAC,GA7ElB,OA8EE",
|
|
6
|
+
"names": ["SizedMixin", "property", "StyledButton", "buttonStyles", "variant", "quiet", "changes", "__decorateClass"]
|
|
7
7
|
}
|
package/test/button.test.js
CHANGED
|
@@ -30,6 +30,8 @@ describe("Button", () => {
|
|
|
30
30
|
expect(el).to.not.be.undefined;
|
|
31
31
|
expect(el.textContent).to.include("Button");
|
|
32
32
|
await expect(el).to.be.accessible();
|
|
33
|
+
expect(el.variant).to.equal("accent");
|
|
34
|
+
expect(el.getAttribute("variant")).to.equal("accent");
|
|
33
35
|
});
|
|
34
36
|
it("loads default w/ element content", async () => {
|
|
35
37
|
const el = await fixture(
|
|
@@ -441,7 +443,7 @@ describe("Button", () => {
|
|
|
441
443
|
`
|
|
442
444
|
);
|
|
443
445
|
await elementUpdated(el);
|
|
444
|
-
expect(el.hasAttribute("variant")).to.
|
|
446
|
+
expect(el.hasAttribute("variant")).to.not.equal("overBackground");
|
|
445
447
|
expect(el.treatment).to.equal("outline");
|
|
446
448
|
expect(el.static).to.equal("white");
|
|
447
449
|
});
|
package/test/button.test.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["button.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 '@spectrum-web-components/button/sp-button.js';\nimport { Button } from '@spectrum-web-components/button';\nimport {\n elementUpdated,\n expect,\n fixture,\n html,\n waitUntil,\n} from '@open-wc/testing';\nimport {\n shiftTabEvent,\n testForLitDevWarnings,\n} from '../../../test/testing-helpers.js';\nimport { spy } from 'sinon';\n\ntype TestableButtonType = {\n hasLabel: boolean;\n};\n\ndescribe('Button', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Button>(\n html`\n <sp-button tabindex=\"0\">Button</sp-button>\n `\n )\n );\n it('loads default', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button tabindex=\"0\">Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('Button');\n await expect(el).to.be.accessible();\n });\n it('loads default w/ element content', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button label=\"Button\"><svg></svg></sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n await expect(el).to.be.accessible();\n });\n it('loads default w/ an icon', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button label=\"\">\n Button\n <svg slot=\"icon\"></svg>\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('Button');\n expect(!(el as unknown as { hasIcon: boolean }).hasIcon);\n await expect(el).to.be.accessible();\n });\n it('loads default only icon', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button label=\"Button\">\n <svg slot=\"icon\"></svg>\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n await expect(el).to.be.accessible();\n });\n it('manages \"role\"', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button>Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.getAttribute('role')).to.equal('button');\n\n el.href = '#';\n\n await elementUpdated(el);\n expect(el.getAttribute('role')).to.equal('link');\n\n el.removeAttribute('href');\n\n await elementUpdated(el);\n expect(el.getAttribute('role')).to.equal('button');\n });\n it('allows label to be toggled', async () => {\n const testNode = document.createTextNode('Button');\n const el = await fixture<Button>(\n html`\n <sp-button>\n ${testNode}\n <svg slot=\"icon\"></svg>\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n\n const labelTestableEl = el as unknown as TestableButtonType;\n\n expect(labelTestableEl.hasLabel, 'starts with label').to.be.true;\n\n testNode.textContent = '';\n\n await elementUpdated(el);\n\n await waitUntil(() => !labelTestableEl.hasLabel, 'label is removed');\n\n testNode.textContent = 'Button';\n\n await elementUpdated(el);\n\n expect(labelTestableEl.hasLabel, 'label is returned').to.be.true;\n });\n it('loads with href', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\">With Href</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('With Href');\n });\n it('loads with href and target', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\" target=\"_blank\">\n With Target\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('With Target');\n });\n it('accepts shit+tab interactions', async () => {\n let focusedCount = 0;\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\" target=\"_blank\">\n With Target\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n\n const focusElement = el.focusElement as HTMLButtonElement;\n focusElement.addEventListener('focus', () => (focusedCount += 1));\n expect(focusedCount).to.equal(0);\n\n el.focus();\n await elementUpdated(el);\n\n expect(focusedCount).to.equal(1);\n\n el.dispatchEvent(shiftTabEvent());\n el.dispatchEvent(new Event('focusin'));\n await elementUpdated(el);\n\n expect(focusedCount).to.equal(1);\n });\n it('manages `disabled`', async () => {\n const clickSpy = spy();\n const el = await fixture<Button>(\n html`\n <sp-button @click=${() => clickSpy()}>Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n el.click();\n await elementUpdated(el);\n expect(clickSpy.calledOnce).to.be.true;\n\n clickSpy.resetHistory();\n el.disabled = true;\n await elementUpdated(el);\n el.click();\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n\n clickSpy.resetHistory();\n await elementUpdated(el);\n el.dispatchEvent(new Event('click', {}));\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n\n clickSpy.resetHistory();\n el.disabled = false;\n el.click();\n await elementUpdated(el);\n expect(clickSpy.calledOnce).to.be.true;\n });\n it('manages `aria-disabled`', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\" target=\"_blank\">\n With Target\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-disabled'), 'initially not').to.be.false;\n\n el.disabled = true;\n await elementUpdated(el);\n\n expect(el.getAttribute('aria-disabled')).to.equal('true');\n\n el.disabled = false;\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-disabled'), 'finally not').to.be.false;\n });\n it('manages tabIndex while disabled', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\" target=\"_blank\">\n With Target\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.tabIndex).to.equal(0);\n\n el.disabled = true;\n await elementUpdated(el);\n\n expect(el.tabIndex).to.equal(-1);\n\n el.tabIndex = 2;\n await elementUpdated(el);\n\n expect(el.tabIndex).to.equal(-1);\n\n el.disabled = false;\n await elementUpdated(el);\n\n expect(el.tabIndex).to.equal(2);\n });\n it('swallows `click` interaction when `[disabled]`', async () => {\n const clickSpy = spy();\n const el = await fixture<Button>(\n html`\n <sp-button disabled @click=${() => clickSpy()}>\n Button\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n\n el.click();\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n });\n it('translates keyboard interactions to click', async () => {\n const clickSpy = spy();\n const el = await fixture<Button>(\n html`\n <sp-button @click=${() => clickSpy()}>Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n\n el.dispatchEvent(\n new KeyboardEvent('keypress', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Enter',\n key: 'Enter',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(1);\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keypress', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'NumpadEnter',\n key: 'NumpadEnter',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(1);\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keypress', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keydown', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n el.dispatchEvent(\n new KeyboardEvent('keyup', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(1);\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keydown', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n el.dispatchEvent(\n new KeyboardEvent('keyup', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'KeyG',\n key: 'g',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n\n el.dispatchEvent(\n new KeyboardEvent('keyup', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keydown', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'KeyG',\n key: 'g',\n })\n );\n el.dispatchEvent(\n new KeyboardEvent('keyup', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n });\n it('proxies clicks by \"type\"', async () => {\n const submitSpy = spy();\n const resetSpy = spy();\n const test = await fixture<HTMLFormElement>(\n html`\n <form\n @submit=${(event: Event): void => {\n event.preventDefault();\n submitSpy();\n }}\n @reset=${(event: Event): void => {\n event.preventDefault();\n resetSpy();\n }}\n >\n <sp-button>Button</sp-button>\n </form>\n `\n );\n const el = test.querySelector('sp-button') as Button;\n\n await elementUpdated(el);\n el.type = 'submit';\n\n await elementUpdated(el);\n el.click();\n\n expect(submitSpy.callCount).to.equal(1);\n expect(resetSpy.callCount).to.equal(0);\n\n el.type = 'reset';\n\n await elementUpdated(el);\n el.click();\n\n expect(submitSpy.callCount).to.equal(1);\n expect(resetSpy.callCount).to.equal(1);\n\n el.type = 'button';\n\n await elementUpdated(el);\n el.click();\n\n expect(submitSpy.callCount).to.equal(1);\n expect(resetSpy.callCount).to.equal(1);\n });\n it('proxies click by [href]', async () => {\n const clickSpy = spy();\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\">With Href</sp-button>\n `\n );\n\n await elementUpdated(el);\n (\n el as unknown as {\n anchorElement: HTMLAnchorElement;\n }\n ).anchorElement.addEventListener('click', (event: Event): void => {\n event.preventDefault();\n event.stopPropagation();\n clickSpy();\n });\n expect(clickSpy.callCount).to.equal(0);\n\n el.click();\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(1);\n });\n it('manages \"active\" while focused', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button label=\"Button\">\n <svg slot=\"icon\"></svg>\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n el.active = true;\n await elementUpdated(el);\n\n el.dispatchEvent(new FocusEvent('focusout'));\n await elementUpdated(el);\n\n expect(el.active).to.be.false;\n });\n describe('deprecated variants and attributes', () => {\n it('manages [quiet]', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button quiet>Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.treatment).to.equal('outline');\n\n el.quiet = false;\n\n await elementUpdated(el);\n expect(el.treatment).to.equal('fill');\n });\n it('upgrades [variant=\"cta\"] to [variant=\"accent\"]', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button variant=\"cta\">Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.variant).to.equal('accent');\n });\n it('manages [variant=\"overBackground\"]', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button variant=\"overBackground\">Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.hasAttribute('variant')).to.be.false;\n expect(el.treatment).to.equal('outline');\n expect(el.static).to.equal('white');\n });\n it('forces [variant=\"accent\"]', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button variant=\"not-supported\">Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.variant).to.equal('accent');\n });\n });\n});\n"],
|
|
5
|
-
"mappings": ";AAYA,OAAO;AAEP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,WAAW;AAMpB,SAAS,UAAU,MAAM;AACrB;AAAA,IACI,YACI,MAAM;AAAA,MACF;AAAA;AAAA;AAAA,IAGJ;AAAA,EACR;AACA,KAAG,iBAAiB,YAAY;AAC5B,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,IAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AACrB,WAAO,GAAG,WAAW,EAAE,GAAG,QAAQ,QAAQ;AAC1C,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,
|
|
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/button/sp-button.js';\nimport { Button } from '@spectrum-web-components/button';\nimport {\n elementUpdated,\n expect,\n fixture,\n html,\n waitUntil,\n} from '@open-wc/testing';\nimport {\n shiftTabEvent,\n testForLitDevWarnings,\n} from '../../../test/testing-helpers.js';\nimport { spy } from 'sinon';\n\ntype TestableButtonType = {\n hasLabel: boolean;\n};\n\ndescribe('Button', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Button>(\n html`\n <sp-button tabindex=\"0\">Button</sp-button>\n `\n )\n );\n it('loads default', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button tabindex=\"0\">Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('Button');\n await expect(el).to.be.accessible();\n\n // Applies a default variant as an stylable attribute\n expect(el.variant).to.equal('accent');\n expect(el.getAttribute('variant')).to.equal('accent');\n });\n it('loads default w/ element content', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button label=\"Button\"><svg></svg></sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n await expect(el).to.be.accessible();\n });\n it('loads default w/ an icon', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button label=\"\">\n Button\n <svg slot=\"icon\"></svg>\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('Button');\n expect(!(el as unknown as { hasIcon: boolean }).hasIcon);\n await expect(el).to.be.accessible();\n });\n it('loads default only icon', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button label=\"Button\">\n <svg slot=\"icon\"></svg>\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n await expect(el).to.be.accessible();\n });\n it('manages \"role\"', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button>Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.getAttribute('role')).to.equal('button');\n\n el.href = '#';\n\n await elementUpdated(el);\n expect(el.getAttribute('role')).to.equal('link');\n\n el.removeAttribute('href');\n\n await elementUpdated(el);\n expect(el.getAttribute('role')).to.equal('button');\n });\n it('allows label to be toggled', async () => {\n const testNode = document.createTextNode('Button');\n const el = await fixture<Button>(\n html`\n <sp-button>\n ${testNode}\n <svg slot=\"icon\"></svg>\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n\n const labelTestableEl = el as unknown as TestableButtonType;\n\n expect(labelTestableEl.hasLabel, 'starts with label').to.be.true;\n\n testNode.textContent = '';\n\n await elementUpdated(el);\n\n await waitUntil(() => !labelTestableEl.hasLabel, 'label is removed');\n\n testNode.textContent = 'Button';\n\n await elementUpdated(el);\n\n expect(labelTestableEl.hasLabel, 'label is returned').to.be.true;\n });\n it('loads with href', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\">With Href</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('With Href');\n });\n it('loads with href and target', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\" target=\"_blank\">\n With Target\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n expect(el.textContent).to.include('With Target');\n });\n it('accepts shit+tab interactions', async () => {\n let focusedCount = 0;\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\" target=\"_blank\">\n With Target\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n\n const focusElement = el.focusElement as HTMLButtonElement;\n focusElement.addEventListener('focus', () => (focusedCount += 1));\n expect(focusedCount).to.equal(0);\n\n el.focus();\n await elementUpdated(el);\n\n expect(focusedCount).to.equal(1);\n\n el.dispatchEvent(shiftTabEvent());\n el.dispatchEvent(new Event('focusin'));\n await elementUpdated(el);\n\n expect(focusedCount).to.equal(1);\n });\n it('manages `disabled`', async () => {\n const clickSpy = spy();\n const el = await fixture<Button>(\n html`\n <sp-button @click=${() => clickSpy()}>Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n el.click();\n await elementUpdated(el);\n expect(clickSpy.calledOnce).to.be.true;\n\n clickSpy.resetHistory();\n el.disabled = true;\n await elementUpdated(el);\n el.click();\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n\n clickSpy.resetHistory();\n await elementUpdated(el);\n el.dispatchEvent(new Event('click', {}));\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n\n clickSpy.resetHistory();\n el.disabled = false;\n el.click();\n await elementUpdated(el);\n expect(clickSpy.calledOnce).to.be.true;\n });\n it('manages `aria-disabled`', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\" target=\"_blank\">\n With Target\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-disabled'), 'initially not').to.be.false;\n\n el.disabled = true;\n await elementUpdated(el);\n\n expect(el.getAttribute('aria-disabled')).to.equal('true');\n\n el.disabled = false;\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-disabled'), 'finally not').to.be.false;\n });\n it('manages tabIndex while disabled', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\" target=\"_blank\">\n With Target\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.tabIndex).to.equal(0);\n\n el.disabled = true;\n await elementUpdated(el);\n\n expect(el.tabIndex).to.equal(-1);\n\n el.tabIndex = 2;\n await elementUpdated(el);\n\n expect(el.tabIndex).to.equal(-1);\n\n el.disabled = false;\n await elementUpdated(el);\n\n expect(el.tabIndex).to.equal(2);\n });\n it('swallows `click` interaction when `[disabled]`', async () => {\n const clickSpy = spy();\n const el = await fixture<Button>(\n html`\n <sp-button disabled @click=${() => clickSpy()}>\n Button\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n\n el.click();\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n });\n it('translates keyboard interactions to click', async () => {\n const clickSpy = spy();\n const el = await fixture<Button>(\n html`\n <sp-button @click=${() => clickSpy()}>Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n\n el.dispatchEvent(\n new KeyboardEvent('keypress', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Enter',\n key: 'Enter',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(1);\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keypress', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'NumpadEnter',\n key: 'NumpadEnter',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(1);\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keypress', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keydown', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n el.dispatchEvent(\n new KeyboardEvent('keyup', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(1);\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keydown', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n el.dispatchEvent(\n new KeyboardEvent('keyup', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'KeyG',\n key: 'g',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n\n el.dispatchEvent(\n new KeyboardEvent('keyup', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n clickSpy.resetHistory();\n\n el.dispatchEvent(\n new KeyboardEvent('keydown', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'KeyG',\n key: 'g',\n })\n );\n el.dispatchEvent(\n new KeyboardEvent('keyup', {\n bubbles: true,\n composed: true,\n cancelable: true,\n code: 'Space',\n key: 'Space',\n })\n );\n\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(0);\n });\n it('proxies clicks by \"type\"', async () => {\n const submitSpy = spy();\n const resetSpy = spy();\n const test = await fixture<HTMLFormElement>(\n html`\n <form\n @submit=${(event: Event): void => {\n event.preventDefault();\n submitSpy();\n }}\n @reset=${(event: Event): void => {\n event.preventDefault();\n resetSpy();\n }}\n >\n <sp-button>Button</sp-button>\n </form>\n `\n );\n const el = test.querySelector('sp-button') as Button;\n\n await elementUpdated(el);\n el.type = 'submit';\n\n await elementUpdated(el);\n el.click();\n\n expect(submitSpy.callCount).to.equal(1);\n expect(resetSpy.callCount).to.equal(0);\n\n el.type = 'reset';\n\n await elementUpdated(el);\n el.click();\n\n expect(submitSpy.callCount).to.equal(1);\n expect(resetSpy.callCount).to.equal(1);\n\n el.type = 'button';\n\n await elementUpdated(el);\n el.click();\n\n expect(submitSpy.callCount).to.equal(1);\n expect(resetSpy.callCount).to.equal(1);\n });\n it('proxies click by [href]', async () => {\n const clickSpy = spy();\n const el = await fixture<Button>(\n html`\n <sp-button href=\"test_url\">With Href</sp-button>\n `\n );\n\n await elementUpdated(el);\n (\n el as unknown as {\n anchorElement: HTMLAnchorElement;\n }\n ).anchorElement.addEventListener('click', (event: Event): void => {\n event.preventDefault();\n event.stopPropagation();\n clickSpy();\n });\n expect(clickSpy.callCount).to.equal(0);\n\n el.click();\n await elementUpdated(el);\n expect(clickSpy.callCount).to.equal(1);\n });\n it('manages \"active\" while focused', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button label=\"Button\">\n <svg slot=\"icon\"></svg>\n </sp-button>\n `\n );\n\n await elementUpdated(el);\n el.active = true;\n await elementUpdated(el);\n\n el.dispatchEvent(new FocusEvent('focusout'));\n await elementUpdated(el);\n\n expect(el.active).to.be.false;\n });\n describe('deprecated variants and attributes', () => {\n it('manages [quiet]', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button quiet>Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.treatment).to.equal('outline');\n\n el.quiet = false;\n\n await elementUpdated(el);\n expect(el.treatment).to.equal('fill');\n });\n it('upgrades [variant=\"cta\"] to [variant=\"accent\"]', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button variant=\"cta\">Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.variant).to.equal('accent');\n });\n it('manages [variant=\"overBackground\"]', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button variant=\"overBackground\">Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.hasAttribute('variant')).to.not.equal('overBackground');\n expect(el.treatment).to.equal('outline');\n expect(el.static).to.equal('white');\n });\n it('forces [variant=\"accent\"]', async () => {\n const el = await fixture<Button>(\n html`\n <sp-button variant=\"not-supported\">Button</sp-button>\n `\n );\n\n await elementUpdated(el);\n expect(el.variant).to.equal('accent');\n });\n });\n});\n"],
|
|
5
|
+
"mappings": ";AAYA,OAAO;AAEP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,WAAW;AAMpB,SAAS,UAAU,MAAM;AACrB;AAAA,IACI,YACI,MAAM;AAAA,MACF;AAAA;AAAA;AAAA,IAGJ;AAAA,EACR;AACA,KAAG,iBAAiB,YAAY;AAC5B,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,IAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AACrB,WAAO,GAAG,WAAW,EAAE,GAAG,QAAQ,QAAQ;AAC1C,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAGlC,WAAO,GAAG,OAAO,EAAE,GAAG,MAAM,QAAQ;AACpC,WAAO,GAAG,aAAa,SAAS,CAAC,EAAE,GAAG,MAAM,QAAQ;AAAA,EACxD,CAAC;AACD,KAAG,oCAAoC,YAAY;AAC/C,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA,IAGJ;AAEA,UAAM,eAAe,EAAE;AACvB,WAAO,EAAE,EAAE,GAAG,IAAI,GAAG;AACrB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,4BAA4B,YAAY;AACvC,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMJ;AAEA,UAAM,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