@spectrum-web-components/button-group 0.8.13-devmode.0 → 0.9.0
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 +3 -3
- package/sp-button-group.js +1 -2
- package/sp-button-group.js.map +1 -1
- package/src/ButtonGroup.js +2 -33
- package/src/ButtonGroup.js.map +1 -1
- package/src/button-group.css.js +2 -4
- package/src/button-group.css.js.map +1 -1
- package/src/index.js +1 -1
- package/src/index.js.map +1 -1
- package/src/spectrum-button-group.css.js +2 -4
- package/src/spectrum-button-group.css.js.map +1 -1
- package/stories/button-group.stories.js +2 -15
- package/stories/button-group.stories.js.map +1 -1
- package/test/benchmark/basic-test.js +1 -5
- package/test/benchmark/basic-test.js.map +1 -1
- package/test/button-group.test-vrt.js +1 -3
- package/test/button-group.test-vrt.js.map +1 -1
- package/test/button-group.test.js +1 -17
- package/test/button-group.test.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/button-group",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"lit-html"
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@spectrum-web-components/base": "^0.
|
|
60
|
+
"@spectrum-web-components/base": "^0.7.0",
|
|
61
61
|
"tslib": "^2.0.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"./sp-*.js",
|
|
70
70
|
"./**/*.dev.js"
|
|
71
71
|
],
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "05c81318844160db3f8156144106e643507fef97"
|
|
73
73
|
}
|
package/sp-button-group.js
CHANGED
package/sp-button-group.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["sp-button-group.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { ButtonGroup } from './src/ButtonGroup.js';\n\ncustomElements.define('sp-button-group', ButtonGroup);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-button-group': ButtonGroup;\n }\n}\n"],
|
|
5
|
-
"mappings": "AAWA
|
|
5
|
+
"mappings": "AAWA,mDAEA,eAAe,OAAO,kBAAmB,CAAW",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/ButtonGroup.js
CHANGED
|
@@ -1,35 +1,4 @@
|
|
|
1
|
-
var
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
-
if (decorator = decorators[i])
|
|
7
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
-
if (kind && result)
|
|
9
|
-
__defProp(target, key, result);
|
|
10
|
-
return result;
|
|
11
|
-
};
|
|
12
|
-
import {
|
|
13
|
-
html,
|
|
14
|
-
SpectrumElement
|
|
15
|
-
} from "@spectrum-web-components/base";
|
|
16
|
-
import { property } from "@spectrum-web-components/base/src/decorators.js";
|
|
17
|
-
import styles from "./button-group.css.js";
|
|
18
|
-
export class ButtonGroup extends SpectrumElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.vertical = false;
|
|
22
|
-
}
|
|
23
|
-
static get styles() {
|
|
24
|
-
return [styles];
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
return html`
|
|
1
|
+
var u=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var m=(l,t,o,r)=>{for(var e=r>1?void 0:r?a(t,o):t,s=l.length-1,p;s>=0;s--)(p=l[s])&&(e=(r?p(t,o,e):p(e))||e);return r&&e&&u(t,o,e),e};import{html as i,SpectrumElement as c}from"@spectrum-web-components/base";import{property as n}from"@spectrum-web-components/base/src/decorators.js";import y from"./button-group.css.js";export class ButtonGroup extends c{constructor(){super(...arguments);this.vertical=!1}static get styles(){return[y]}render(){return i`
|
|
28
2
|
<slot></slot>
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
__decorateClass([
|
|
33
|
-
property({ type: Boolean, reflect: true })
|
|
34
|
-
], ButtonGroup.prototype, "vertical", 2);
|
|
3
|
+
`}}m([n({type:Boolean,reflect:!0})],ButtonGroup.prototype,"vertical",2);
|
|
35
4
|
//# sourceMappingURL=ButtonGroup.js.map
|
package/src/ButtonGroup.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ButtonGroup.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\n\nimport styles from './button-group.css.js';\n\n/**\n * @element sp-button-group\n * @slot - the sp-button elements that make up the group\n */\nexport class ButtonGroup extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public vertical = false;\n\n protected override render(): TemplateResult {\n return html`\n <slot></slot>\n `;\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "wMAYA,0EAMA,2EAEA,qCAMO,aAAM,mBAAoB,EAAgB,CAA1C,kCAMI,cAAW,aALS,SAAyB,CAChD,MAAO,CAAC,CAAM,CAClB,CAKmB,QAAyB,CACxC,MAAO;AAAA;AAAA,SAGX,CACJ,CAPW,GADP,AAAC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GACnC,AANJ,YAMI",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/button-group.css.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
const styles = css`
|
|
1
|
+
import{css as t}from"@spectrum-web-components/base";const o=t`
|
|
3
2
|
:host{--spectrum-buttongroup-button-gap-reset:0}:host{display:flex}::slotted(*){flex-shrink:0}:host([dir=ltr]) ::slotted(:not(:first-of-type)){margin-left:var(
|
|
4
3
|
--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200)
|
|
5
4
|
)}:host([dir=rtl]) ::slotted(:not(:first-of-type)){margin-right:var(
|
|
@@ -11,6 +10,5 @@ const styles = css`
|
|
|
11
10
|
)}:host([vertical]) ::slotted(:not(:first-of-type)){margin-top:var(
|
|
12
11
|
--spectrum-buttongroup-button-gap-y,var(--spectrum-global-dimension-static-size-200)
|
|
13
12
|
)}:host([vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-flex-grow:1}:host([dir=ltr][vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-text-align:left}:host([dir=rtl][vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-text-align:right}
|
|
14
|
-
`;
|
|
15
|
-
export default styles;
|
|
13
|
+
`;export default o;
|
|
16
14
|
//# sourceMappingURL=button-group.css.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["button-group.css.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-buttongroup-button-gap-reset:0}:host{display:flex}::slotted(*){flex-shrink:0}:host([dir=ltr]) ::slotted(:not(:first-of-type)){margin-left:var(\n--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200)\n)}:host([dir=rtl]) ::slotted(:not(:first-of-type)){margin-right:var(\n--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200)\n)}:host([vertical]){display:inline-flex;flex-direction:column}:host([dir=ltr][vertical]) ::slotted(:not(:first-of-type)){margin-left:var(\n--spectrum-buttongroup-button-gap-reset\n)}:host([dir=rtl][vertical]) ::slotted(:not(:first-of-type)){margin-right:var(\n--spectrum-buttongroup-button-gap-reset\n)}:host([vertical]) ::slotted(:not(:first-of-type)){margin-top:var(\n--spectrum-buttongroup-button-gap-y,var(--spectrum-global-dimension-static-size-200)\n)}:host([vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-flex-grow:1}:host([dir=ltr][vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-text-align:left}:host([dir=rtl][vertical]) ::slotted(sp-action-button){--spectrum-actionbutton-label-text-align:right}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": "AAWA
|
|
5
|
+
"mappings": "AAWA,oDACA,KAAM,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaf,cAAe",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export*from"./ButtonGroup.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nexport * from './ButtonGroup.js';\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
const styles = css`
|
|
1
|
+
import{css as t}from"@spectrum-web-components/base";const o=t`
|
|
3
2
|
:host{--spectrum-buttongroup-button-gap-reset:0}:host{display:flex}::slotted(*){flex-shrink:0}:host([dir=ltr]) ::slotted(:not(:first-of-type)){margin-left:var(
|
|
4
3
|
--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200)
|
|
5
4
|
)}:host([dir=rtl]) ::slotted(:not(:first-of-type)){margin-right:var(
|
|
@@ -11,6 +10,5 @@ const styles = css`
|
|
|
11
10
|
)}:host([vertical]) ::slotted(:not(:first-of-type)){margin-top:var(
|
|
12
11
|
--spectrum-buttongroup-button-gap-y,var(--spectrum-global-dimension-static-size-200)
|
|
13
12
|
)}
|
|
14
|
-
`;
|
|
15
|
-
export default styles;
|
|
13
|
+
`;export default o;
|
|
16
14
|
//# sourceMappingURL=spectrum-button-group.css.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-button-group.css.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-buttongroup-button-gap-reset:0}:host{display:flex}::slotted(*){flex-shrink:0}:host([dir=ltr]) ::slotted(:not(:first-of-type)){margin-left:var(\n--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200)\n)}:host([dir=rtl]) ::slotted(:not(:first-of-type)){margin-right:var(\n--spectrum-buttongroup-button-gap-x,var(--spectrum-global-dimension-static-size-200)\n)}:host([vertical]){display:inline-flex;flex-direction:column}:host([dir=ltr][vertical]) ::slotted(:not(:first-of-type)){margin-left:var(\n--spectrum-buttongroup-button-gap-reset\n)}:host([dir=rtl][vertical]) ::slotted(:not(:first-of-type)){margin-right:var(\n--spectrum-buttongroup-button-gap-reset\n)}:host([vertical]) ::slotted(:not(:first-of-type)){margin-top:var(\n--spectrum-buttongroup-button-gap-y,var(--spectrum-global-dimension-static-size-200)\n)}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": "AAWA
|
|
5
|
+
"mappings": "AAWA,oDACA,KAAM,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaf,cAAe",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "@spectrum-web-components/button-group/sp-button-group.js";
|
|
3
|
-
import "@spectrum-web-components/button/sp-button.js";
|
|
4
|
-
import "@spectrum-web-components/icon/sp-icon.js";
|
|
5
|
-
export default {
|
|
6
|
-
title: "Button Group",
|
|
7
|
-
component: "sp-button-group"
|
|
8
|
-
};
|
|
9
|
-
export const buttons = () => {
|
|
10
|
-
return html`
|
|
1
|
+
import{html as t}from"@spectrum-web-components/base";import"@spectrum-web-components/button-group/sp-button-group.js";import"@spectrum-web-components/button/sp-button.js";import"@spectrum-web-components/icon/sp-icon.js";export default{title:"Button Group",component:"sp-button-group"};export const buttons=()=>t`
|
|
11
2
|
<sp-button-group>
|
|
12
3
|
<sp-button>Button 1</sp-button>
|
|
13
4
|
<sp-button>Longer Button 2</sp-button>
|
|
14
5
|
<sp-button>Short 3</sp-button>
|
|
15
6
|
</sp-button-group>
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
export const buttonsVertical = () => {
|
|
19
|
-
return html`
|
|
7
|
+
`,buttonsVertical=()=>t`
|
|
20
8
|
<sp-button-group vertical>
|
|
21
9
|
<sp-button>Button 1</sp-button>
|
|
22
10
|
<sp-button>Longer Button 2</sp-button>
|
|
23
11
|
<sp-button>Short 3</sp-button>
|
|
24
12
|
</sp-button-group>
|
|
25
13
|
`;
|
|
26
|
-
};
|
|
27
14
|
//# sourceMappingURL=button-group.stories.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["button-group.stories.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/button-group/sp-button-group.js';\nimport '@spectrum-web-components/button/sp-button.js';\nimport '@spectrum-web-components/icon/sp-icon.js';\n\nexport default {\n title: 'Button Group',\n component: 'sp-button-group',\n};\n\nexport const buttons = (): TemplateResult => {\n return html`\n <sp-button-group>\n <sp-button>Button 1</sp-button>\n <sp-button>Longer Button 2</sp-button>\n <sp-button>Short 3</sp-button>\n </sp-button-group>\n `;\n};\n\nexport const buttonsVertical = (): TemplateResult => {\n return html`\n <sp-button-group vertical>\n <sp-button>Button 1</sp-button>\n <sp-button>Longer Button 2</sp-button>\n <sp-button>Short 3</sp-button>\n </sp-button-group>\n `;\n};\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA,qDAEA,iEACA,qDACA,iDAEA,cAAe,CACX,MAAO,eACP,UAAW,iBACf,EAEO,YAAM,SAAU,IACZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MASE,gBAAkB,IACpB;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "@spectrum-web-components/button/sp-button.js";
|
|
3
|
-
import { html } from "lit";
|
|
4
|
-
import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
|
|
5
|
-
measureFixtureCreation(html`
|
|
1
|
+
import"@spectrum-web-components/button-group/sp-button-group.js";import"@spectrum-web-components/button/sp-button.js";import{html as t}from"lit";import{measureFixtureCreation as o}from"../../../../test/benchmark/helpers.js";o(t`
|
|
6
2
|
<sp-button-group>
|
|
7
3
|
<sp-button>Button 1</sp-button>
|
|
8
4
|
<sp-button>Longer Button 2</sp-button>
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["basic-test.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport '@spectrum-web-components/button-group/sp-button-group.js';\nimport '@spectrum-web-components/button/sp-button.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-button-group>\n <sp-button>Button 1</sp-button>\n <sp-button>Longer Button 2</sp-button>\n <sp-button>Short 3</sp-button>\n </sp-button-group>\n`);\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA,iEACA,qDACA,2BACA,+EAEA,EAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAMtB",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { regressVisuals } from "../../../test/visual/test.js";
|
|
3
|
-
regressVisuals("ButtonGroupStories", stories);
|
|
1
|
+
import*as r from"../stories/button-group.stories.js";import{regressVisuals as o}from"../../../test/visual/test.js";o("ButtonGroupStories",r);
|
|
4
2
|
//# sourceMappingURL=button-group.test-vrt.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["button-group.test-vrt.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport * as stories from '../stories/button-group.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('ButtonGroupStories', stories);\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA,qDACA,8DAEA,EAAe,qBAAsB,CAAO",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "@spectrum-web-components/button-group/sp-button-group.js";
|
|
3
|
-
import { buttons, buttonsVertical } from "../stories/button-group.stories.js";
|
|
4
|
-
import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
|
|
5
|
-
describe("Buttongroup", () => {
|
|
6
|
-
testForLitDevWarnings(async () => await fixture(buttons()));
|
|
7
|
-
it("loads default button-group accessibly with sp-button", async () => {
|
|
8
|
-
const el = await fixture(buttons());
|
|
9
|
-
await elementUpdated(el);
|
|
10
|
-
await expect(el).to.be.accessible();
|
|
11
|
-
});
|
|
12
|
-
it("loads default button-group[vertial] accessibly with sp-button", async () => {
|
|
13
|
-
const el = await fixture(buttonsVertical());
|
|
14
|
-
await elementUpdated(el);
|
|
15
|
-
await expect(el).to.be.accessible();
|
|
16
|
-
});
|
|
17
|
-
});
|
|
1
|
+
import{elementUpdated as a,expect as i,fixture as o}from"@open-wc/testing";import"@spectrum-web-components/button-group/sp-button-group.js";import{buttons as e,buttonsVertical as r}from"../stories/button-group.stories.js";import{testForLitDevWarnings as s}from"../../../test/testing-helpers.js";describe("Buttongroup",()=>{s(async()=>await o(e())),it("loads default button-group accessibly with sp-button",async()=>{const t=await o(e());await a(t),await i(t).to.be.accessible()}),it("loads default button-group[vertial] accessibly with sp-button",async()=>{const t=await o(r());await a(t),await i(t).to.be.accessible()})});
|
|
18
2
|
//# sourceMappingURL=button-group.test.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["button-group.test.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture } from '@open-wc/testing';\n\nimport '@spectrum-web-components/button-group/sp-button-group.js';\nimport { ButtonGroup } from '..';\nimport { buttons, buttonsVertical } from '../stories/button-group.stories.js';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('Buttongroup', () => {\n testForLitDevWarnings(async () => await fixture<ButtonGroup>(buttons()));\n it('loads default button-group accessibly with sp-button', async () => {\n const el = await fixture<ButtonGroup>(buttons());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads default button-group[vertial] accessibly with sp-button', async () => {\n const el = await fixture<ButtonGroup>(buttonsVertical());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n});\n"],
|
|
5
|
-
"mappings": "AAYA
|
|
5
|
+
"mappings": "AAYA,2EAEA,iEAEA,kFACA,yEAEA,SAAS,cAAe,IAAM,CAC1B,EAAsB,SAAY,KAAM,GAAqB,EAAQ,CAAC,CAAC,EACvE,GAAG,uDAAwD,SAAY,CACnE,KAAM,GAAK,KAAM,GAAqB,EAAQ,CAAC,EAE/C,KAAM,GAAe,CAAE,EAEvB,KAAM,GAAO,CAAE,EAAE,GAAG,GAAG,WAAW,CACtC,CAAC,EACD,GAAG,gEAAiE,SAAY,CAC5E,KAAM,GAAK,KAAM,GAAqB,EAAgB,CAAC,EAEvD,KAAM,GAAe,CAAE,EAEvB,KAAM,GAAO,CAAE,EAAE,GAAG,GAAG,WAAW,CACtC,CAAC,CACL,CAAC",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|