@spectrum-web-components/accordion 0.7.0 → 0.7.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.
Files changed (47) hide show
  1. package/package.json +5 -5
  2. package/sp-accordion-item.dev.js +1 -0
  3. package/sp-accordion-item.dev.js.map +1 -1
  4. package/sp-accordion-item.js +1 -1
  5. package/sp-accordion-item.js.map +2 -2
  6. package/sp-accordion.dev.js +1 -0
  7. package/sp-accordion.dev.js.map +1 -1
  8. package/sp-accordion.js +1 -1
  9. package/sp-accordion.js.map +2 -2
  10. package/src/Accordion.dev.js +4 -1
  11. package/src/Accordion.dev.js.map +1 -1
  12. package/src/Accordion.js +1 -1
  13. package/src/Accordion.js.map +2 -2
  14. package/src/AccordionItem.dev.js +8 -5
  15. package/src/AccordionItem.dev.js.map +1 -1
  16. package/src/AccordionItem.js +2 -2
  17. package/src/AccordionItem.js.map +2 -2
  18. package/src/accordion-item.css.dev.js +1 -0
  19. package/src/accordion-item.css.dev.js.map +1 -1
  20. package/src/accordion-item.css.js +1 -1
  21. package/src/accordion-item.css.js.map +2 -2
  22. package/src/accordion.css.dev.js +1 -0
  23. package/src/accordion.css.dev.js.map +1 -1
  24. package/src/accordion.css.js +1 -1
  25. package/src/accordion.css.js.map +2 -2
  26. package/src/index.dev.js +1 -0
  27. package/src/index.dev.js.map +1 -1
  28. package/src/index.js +1 -1
  29. package/src/index.js.map +1 -1
  30. package/src/spectrum-accordion-item.css.dev.js +1 -0
  31. package/src/spectrum-accordion-item.css.dev.js.map +1 -1
  32. package/src/spectrum-accordion-item.css.js +1 -1
  33. package/src/spectrum-accordion-item.css.js.map +2 -2
  34. package/src/spectrum-accordion.css.dev.js +1 -0
  35. package/src/spectrum-accordion.css.dev.js.map +1 -1
  36. package/src/spectrum-accordion.css.js +1 -1
  37. package/src/spectrum-accordion.css.js.map +2 -2
  38. package/stories/accordion.stories.js +52 -5
  39. package/stories/accordion.stories.js.map +1 -1
  40. package/test/accordion-item.test.js +118 -10
  41. package/test/accordion-item.test.js.map +1 -1
  42. package/test/accordion.test-vrt.js +4 -1
  43. package/test/accordion.test-vrt.js.map +1 -1
  44. package/test/accordion.test.js +220 -5
  45. package/test/accordion.test.js.map +1 -1
  46. package/test/benchmark/basic-test.js +6 -1
  47. package/test/benchmark/basic-test.js.map +1 -1
@@ -1,36 +1,144 @@
1
- import{elementUpdated as o,expect as a,fixture as c,html as s}from"@open-wc/testing";import{spy as r}from"sinon";import"@spectrum-web-components/accordion/sp-accordion-item.js";import{sendKeys as i}from"@web/test-runner-commands";describe("Accordion Item",()=>{it("can exist with no parent accessibly",async()=>{const t=await c(s`
1
+ "use strict";
2
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
3
+ import { spy } from "sinon";
4
+ import "@spectrum-web-components/accordion/sp-accordion-item.js";
5
+ import { sendKeys } from "@web/test-runner-commands";
6
+ describe("Accordion Item", () => {
7
+ it("can exist with no parent accessibly", async () => {
8
+ const el = await fixture(
9
+ html`
2
10
  <sp-accordion-item label="item">
3
11
  <div>Item 1</div>
4
12
  </sp-accordion-item>
5
- `);await o(t),await a(t).to.be.accessible()}),it("can be `[disabled]`",async()=>{const t=r(),e=await c(s`
13
+ `
14
+ );
15
+ await elementUpdated(el);
16
+ await expect(el).to.be.accessible();
17
+ });
18
+ it("can be `[disabled]`", async () => {
19
+ const toggleSpy = spy();
20
+ const handleToggle = () => toggleSpy();
21
+ const el = await fixture(
22
+ html`
6
23
  <sp-accordion-item
7
24
  disabled
8
- @sp-accordion-item-toggle=${()=>t()}
25
+ @sp-accordion-item-toggle=${handleToggle}
9
26
  >
10
27
  <div>Item 1</div>
11
28
  </sp-accordion-item>
12
- `),l=e.shadowRoot.querySelector("#header");await o(e),a(t.callCount).to.equal(0),l.click(),await o(e),a(t.callCount).to.equal(0),e.disabled=!1,await o(e),l.click(),await o(e),a(t.callCount).to.equal(1)}),it("dispatches toggle event on enter key",async()=>{let t=!1;const e=await c(s`
29
+ `
30
+ );
31
+ const root = el.shadowRoot;
32
+ const button = root.querySelector("#header");
33
+ await elementUpdated(el);
34
+ expect(toggleSpy.callCount).to.equal(0);
35
+ button.click();
36
+ await elementUpdated(el);
37
+ expect(toggleSpy.callCount).to.equal(0);
38
+ el.disabled = false;
39
+ await elementUpdated(el);
40
+ button.click();
41
+ await elementUpdated(el);
42
+ expect(toggleSpy.callCount).to.equal(1);
43
+ });
44
+ it("dispatches toggle event on enter key", async () => {
45
+ let open = false;
46
+ const onAccordionToggle = () => {
47
+ open = true;
48
+ };
49
+ const el = await fixture(
50
+ html`
13
51
  <sp-accordion-item
14
52
  disabled
15
- @sp-accordion-item-toggle=${()=>{t=!0}}
53
+ @sp-accordion-item-toggle=${onAccordionToggle}
16
54
  >
17
55
  <div>Item 1</div>
18
56
  </sp-accordion-item>
19
- `);await o(e),a(t).to.be.false,e.focus(),await i({press:"Enter"}),await o(e),a(t).to.be.false,e.disabled=!1,await o(e),e.focus(),await i({press:"Enter"}),await o(e),a(t).to.be.true}),it("dispatches toggle event on space key",async()=>{let t=!1;const e=await c(s`
57
+ `
58
+ );
59
+ await elementUpdated(el);
60
+ expect(open).to.be.false;
61
+ el.focus();
62
+ await sendKeys({
63
+ press: "Enter"
64
+ });
65
+ await elementUpdated(el);
66
+ expect(open).to.be.false;
67
+ el.disabled = false;
68
+ await elementUpdated(el);
69
+ el.focus();
70
+ await sendKeys({
71
+ press: "Enter"
72
+ });
73
+ await elementUpdated(el);
74
+ expect(open).to.be.true;
75
+ });
76
+ it("dispatches toggle event on space key", async () => {
77
+ let open = false;
78
+ const onAccordionToggle = () => {
79
+ open = true;
80
+ };
81
+ const el = await fixture(
82
+ html`
20
83
  <sp-accordion-item
21
84
  disabled
22
- @sp-accordion-item-toggle=${()=>{t=!0}}
85
+ @sp-accordion-item-toggle=${onAccordionToggle}
23
86
  >
24
87
  <div>Item 1</div>
25
88
  </sp-accordion-item>
26
- `);await o(e),a(t).to.be.false,e.focus(),await i({press:"Space"}),await o(e),a(t).to.be.false,e.disabled=!1,await o(e),e.focus(),await i({press:"Space"}),await o(e),a(t).to.be.true}),it("does not dispatch toggle events on key events in Item content",async()=>{let t=!1;const e=await c(s`
89
+ `
90
+ );
91
+ await elementUpdated(el);
92
+ expect(open).to.be.false;
93
+ el.focus();
94
+ await sendKeys({
95
+ press: "Space"
96
+ });
97
+ await elementUpdated(el);
98
+ expect(open).to.be.false;
99
+ el.disabled = false;
100
+ await elementUpdated(el);
101
+ el.focus();
102
+ await sendKeys({
103
+ press: "Space"
104
+ });
105
+ await elementUpdated(el);
106
+ expect(open).to.be.true;
107
+ });
108
+ it("does not dispatch toggle events on key events in Item content", async () => {
109
+ let closed = false;
110
+ const onAccordionToggle = () => {
111
+ closed = true;
112
+ };
113
+ const el = await fixture(
114
+ html`
27
115
  <sp-accordion-item
28
116
  open
29
- @sp-accordion-item-toggle=${()=>{t=!0}}
117
+ @sp-accordion-item-toggle=${onAccordionToggle}
30
118
  >
31
119
  <div>
32
120
  <button>Test Button</button>
33
121
  </div>
34
122
  </sp-accordion-item>
35
- `),d=e.querySelector("button");await o(e),a(e.open).to.be.true,a(t).to.be.false,d.focus(),await i({press:"Space"}),await o(e),a(t).to.be.false,await o(e),await i({press:"Enter"}),await o(e),a(t).to.be.false,a(e.open).to.be.true})});
123
+ `
124
+ );
125
+ const button = el.querySelector("button");
126
+ await elementUpdated(el);
127
+ expect(el.open).to.be.true;
128
+ expect(closed).to.be.false;
129
+ button.focus();
130
+ await sendKeys({
131
+ press: "Space"
132
+ });
133
+ await elementUpdated(el);
134
+ expect(closed).to.be.false;
135
+ await elementUpdated(el);
136
+ await sendKeys({
137
+ press: "Enter"
138
+ });
139
+ await elementUpdated(el);
140
+ expect(closed).to.be.false;
141
+ expect(el.open).to.be.true;
142
+ });
143
+ });
36
144
  //# sourceMappingURL=accordion-item.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["accordion-item.test.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\nimport { spy } from 'sinon';\n\nimport '@spectrum-web-components/accordion/sp-accordion-item.js';\nimport { AccordionItem } from '@spectrum-web-components/accordion/src/AccordionItem.js';\nimport { sendKeys } from '@web/test-runner-commands';\n\ndescribe('Accordion Item', () => {\n it('can exist with no parent accessibly', async () => {\n const el = await fixture<AccordionItem>(\n html`\n <sp-accordion-item label=\"item\">\n <div>Item 1</div>\n </sp-accordion-item>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('can be `[disabled]`', async () => {\n const toggleSpy = spy();\n const handleToggle = (): void => toggleSpy();\n const el = await fixture<AccordionItem>(\n html`\n <sp-accordion-item\n disabled\n @sp-accordion-item-toggle=${handleToggle}\n >\n <div>Item 1</div>\n </sp-accordion-item>\n `\n );\n\n const root = el.shadowRoot as ShadowRoot;\n const button = root.querySelector('#header') as HTMLElement;\n\n await elementUpdated(el);\n\n expect(toggleSpy.callCount).to.equal(0);\n\n button.click();\n\n await elementUpdated(el);\n\n expect(toggleSpy.callCount).to.equal(0);\n\n el.disabled = false;\n await elementUpdated(el);\n\n button.click();\n\n await elementUpdated(el);\n\n expect(toggleSpy.callCount).to.equal(1);\n });\n\n it('dispatches toggle event on enter key', async () => {\n let open = false;\n const onAccordionToggle = (): void => {\n open = true;\n };\n const el = await fixture<AccordionItem>(\n html`\n <sp-accordion-item\n disabled\n @sp-accordion-item-toggle=${onAccordionToggle}\n >\n <div>Item 1</div>\n </sp-accordion-item>\n `\n );\n\n await elementUpdated(el);\n\n expect(open).to.be.false;\n\n el.focus();\n await sendKeys({\n press: 'Enter',\n });\n\n await elementUpdated(el);\n\n expect(open).to.be.false;\n\n el.disabled = false;\n await elementUpdated(el);\n\n el.focus();\n await sendKeys({\n press: 'Enter',\n });\n\n await elementUpdated(el);\n\n expect(open).to.be.true;\n });\n\n it('dispatches toggle event on space key', async () => {\n let open = false;\n const onAccordionToggle = (): void => {\n open = true;\n };\n const el = await fixture<AccordionItem>(\n html`\n <sp-accordion-item\n disabled\n @sp-accordion-item-toggle=${onAccordionToggle}\n >\n <div>Item 1</div>\n </sp-accordion-item>\n `\n );\n\n await elementUpdated(el);\n\n expect(open).to.be.false;\n\n el.focus();\n await sendKeys({\n press: 'Space',\n });\n\n await elementUpdated(el);\n\n expect(open).to.be.false;\n\n el.disabled = false;\n await elementUpdated(el);\n\n el.focus();\n await sendKeys({\n press: 'Space',\n });\n\n await elementUpdated(el);\n\n expect(open).to.be.true;\n });\n\n it('does not dispatch toggle events on key events in Item content', async () => {\n let closed = false;\n const onAccordionToggle = (): void => {\n closed = true;\n };\n const el = await fixture<AccordionItem>(\n html`\n <sp-accordion-item\n open\n @sp-accordion-item-toggle=${onAccordionToggle}\n >\n <div>\n <button>Test Button</button>\n </div>\n </sp-accordion-item>\n `\n );\n\n const button = el.querySelector('button') as HTMLButtonElement;\n await elementUpdated(el);\n\n expect(el.open).to.be.true;\n expect(closed).to.be.false;\n\n button.focus();\n await sendKeys({\n press: 'Space',\n });\n\n await elementUpdated(el);\n\n expect(closed).to.be.false;\n\n await elementUpdated(el);\n\n await sendKeys({\n press: 'Enter',\n });\n\n await elementUpdated(el);\n\n expect(closed).to.be.false;\n expect(el.open).to.be.true;\n });\n});\n"],
5
- "mappings": "AAYA,qFACA,4BAEA,gEAEA,qDAEA,SAAS,iBAAkB,IAAM,CAC7B,GAAG,sCAAuC,SAAY,CAClD,KAAM,GAAK,KAAM,GACb;AAAA;AAAA;AAAA;AAAA,aAKJ,EAEA,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2 +1,5 @@
1
- import*as r from"../stories/accordion.stories.js";import{regressVisuals as o}from"../../../test/visual/test.js";o("AccordionStories",r);
1
+ "use strict";
2
+ import * as stories from "../stories/accordion.stories.js";
3
+ import { regressVisuals } from "../../../test/visual/test.js";
4
+ regressVisuals("AccordionStories", stories);
2
5
  //# sourceMappingURL=accordion.test-vrt.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["accordion.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/accordion.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('AccordionStories', stories);\n"],
5
- "mappings": "AAYA,kDACA,8DAEA,EAAe,mBAAoB,CAAO",
5
+ "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAE/B,eAAe,oBAAoB,OAAO;",
6
6
  "names": []
7
7
  }
@@ -1,12 +1,57 @@
1
- import{elementUpdated as c,expect as t,fixture as s,html as m}from"@open-wc/testing";import"@spectrum-web-components/accordion/sp-accordion.js";import{Default as d}from"../stories/accordion.stories.js";import{Accordion as f,AccordionItem as w}from"@spectrum-web-components/accordion";import{sendKeys as l}from"@web/test-runner-commands";import{spy as b}from"sinon";import{testForLitDevWarnings as y}from"../../../test/testing-helpers.js";describe("Accordion",()=>{y(async()=>await s(d())),it("renders with items accessibly",async()=>{const e=await s(d());await c(e),await t(e).to.be.accessible()}),it("does not accept focus when empty",async()=>{const e=await s(m`
1
+ "use strict";
2
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
3
+ import "@spectrum-web-components/accordion/sp-accordion.js";
4
+ import { Default } from "../stories/accordion.stories.js";
5
+ import { Accordion, AccordionItem } from "@spectrum-web-components/accordion";
6
+ import { sendKeys } from "@web/test-runner-commands";
7
+ import { spy } from "sinon";
8
+ import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
9
+ describe("Accordion", () => {
10
+ testForLitDevWarnings(async () => await fixture(Default()));
11
+ it("renders with items accessibly", async () => {
12
+ const el = await fixture(Default());
13
+ await elementUpdated(el);
14
+ await expect(el).to.be.accessible();
15
+ });
16
+ it("does not accept focus when empty", async () => {
17
+ const el = await fixture(
18
+ html`
2
19
  <sp-accordion></sp-accordion>
3
- `);await c(e),t(document.activeElement===e).to.be.false,e.focus(),await c(e),t(document.activeElement===e).to.be.false}),it("does not accept keyboard events when items are not present",async()=>{const e=b(),o=await s(m`
20
+ `
21
+ );
22
+ await elementUpdated(el);
23
+ expect(document.activeElement === el).to.be.false;
24
+ el.focus();
25
+ await elementUpdated(el);
26
+ expect(document.activeElement === el).to.be.false;
27
+ });
28
+ it("does not accept keyboard events when items are not present", async () => {
29
+ const errorSpy = spy();
30
+ const el = await fixture(
31
+ html`
4
32
  <sp-accordion>
5
33
  <sp-accordion-item disabled label="Heading 2">
6
34
  <div>Item 2</div>
7
35
  </sp-accordion-item>
8
36
  </sp-accordion>
9
- `);await c(o);const n=o.querySelector("sp-accordion-item");window.addEventListener("error",()=>e()),o.focus(),n.remove(),await c(o),o.dispatchEvent(new KeyboardEvent("keydown",{code:"ArrowDown"})),t(e.callCount).to.equal(0)}),it("does not accept focus when all children [disabled]",async()=>{const e=await s(m`
37
+ `
38
+ );
39
+ await elementUpdated(el);
40
+ const item = el.querySelector("sp-accordion-item");
41
+ window.addEventListener("error", () => errorSpy());
42
+ el.focus();
43
+ item.remove();
44
+ await elementUpdated(el);
45
+ el.dispatchEvent(
46
+ new KeyboardEvent("keydown", {
47
+ code: "ArrowDown"
48
+ })
49
+ );
50
+ expect(errorSpy.callCount).to.equal(0);
51
+ });
52
+ it("does not accept focus when all children [disabled]", async () => {
53
+ const el = await fixture(
54
+ html`
10
55
  <sp-accordion>
11
56
  <sp-accordion-item disabled label="Heading 1">
12
57
  <div>Item 1</div>
@@ -15,7 +60,131 @@ import{elementUpdated as c,expect as t,fixture as s,html as m}from"@open-wc/test
15
60
  <div>Item 2</div>
16
61
  </sp-accordion-item>
17
62
  </sp-accordion>
18
- `);await c(e),t(document.activeElement===e).to.be.false,e.focus(),await c(e),t(document.activeElement===e).to.be.false}),it("only allows one open item by default",async()=>{const e=await s(d());await c(e);const o=e.querySelector("sp-accordion-item:nth-of-type(1)"),n=e.querySelector("sp-accordion-item:nth-of-type(2)"),a=o.focusElement,i=n.focusElement;a.click(),await c(e);let r=e.querySelectorAll("sp-accordion-item[open]");t(r.length).to.equal(1),i.click(),await c(e),r=e.querySelectorAll("sp-accordion-item[open]"),t(r.length).to.equal(1)}),it("can have `toggle` events canceled",async()=>{const e=await s(d());await c(e);const o=e.querySelector("sp-accordion-item:nth-of-type(1)"),n=e.querySelector("sp-accordion-item:nth-of-type(2)"),a=o.focusElement,i=n.focusElement;a.click(),await c(e),t(o.open).to.be.true,t(n.open).to.be.false,e.addEventListener("sp-accordion-item-toggle",r=>r.preventDefault()),i.click(),await c(e),t(o.open).to.be.true,t(n.open).to.be.false}),it("allows more than one open item when `[allow-multiple]`",async()=>{const e=await s(d());e.allowMultiple=!0,await c(e);const o=e.querySelector("sp-accordion-item:nth-of-type(1)"),n=e.querySelector("sp-accordion-item:nth-of-type(2)"),a=o.focusElement,i=n.focusElement;a.click(),await c(e),t(o.open).to.be.true,t(n.open).to.be.false,i.click(),await c(e),t(o.open).to.be.true,t(n.open).to.be.true}),it("ensures that the correct item is open and that items can be closed",async()=>{const e=await s(d());await c(e);const o=e.querySelector("sp-accordion-item:nth-of-type(1)"),n=e.querySelector("sp-accordion-item:nth-of-type(2)"),a=o.focusElement,i=n.focusElement;a.click(),await c(e),t(o.open).to.be.true,t(n.open).to.be.false,i.click(),await c(e),t(o.open).to.be.false,t(n.open).to.be.true,i.click(),await c(e),t(o.open).to.be.false,t(n.open).to.be.false}),it("ensures that the correct item is open and that items can be closed when [allow-multiple]",async()=>{const e=await s(d());e.allowMultiple=!0,await c(e);const o=e.querySelector("sp-accordion-item:nth-of-type(1)"),n=e.querySelector("sp-accordion-item:nth-of-type(2)"),a=o.focusElement,i=n.focusElement;a.click(),await c(e),t(o.open).to.be.true,t(n.open).to.be.false,i.click(),await c(e),t(o.open).to.be.true,t(n.open).to.be.true,i.click(),await c(e),t(o.open).to.be.true,t(n.open).to.be.false}),it("handles focus and keyboard input and ignores disabled items",async()=>{const e=await s(m`
63
+ `
64
+ );
65
+ await elementUpdated(el);
66
+ expect(document.activeElement === el).to.be.false;
67
+ el.focus();
68
+ await elementUpdated(el);
69
+ expect(document.activeElement === el).to.be.false;
70
+ });
71
+ it("only allows one open item by default", async () => {
72
+ const el = await fixture(Default());
73
+ await elementUpdated(el);
74
+ const firstItem = el.querySelector(
75
+ "sp-accordion-item:nth-of-type(1)"
76
+ );
77
+ const secondItem = el.querySelector(
78
+ "sp-accordion-item:nth-of-type(2)"
79
+ );
80
+ const firstButton = firstItem.focusElement;
81
+ const secondButton = secondItem.focusElement;
82
+ firstButton.click();
83
+ await elementUpdated(el);
84
+ let openItems = el.querySelectorAll("sp-accordion-item[open]");
85
+ expect(openItems.length).to.equal(1);
86
+ secondButton.click();
87
+ await elementUpdated(el);
88
+ openItems = el.querySelectorAll("sp-accordion-item[open]");
89
+ expect(openItems.length).to.equal(1);
90
+ });
91
+ it("can have `toggle` events canceled", async () => {
92
+ const el = await fixture(Default());
93
+ await elementUpdated(el);
94
+ const firstItem = el.querySelector(
95
+ "sp-accordion-item:nth-of-type(1)"
96
+ );
97
+ const secondItem = el.querySelector(
98
+ "sp-accordion-item:nth-of-type(2)"
99
+ );
100
+ const firstButton = firstItem.focusElement;
101
+ const secondButton = secondItem.focusElement;
102
+ firstButton.click();
103
+ await elementUpdated(el);
104
+ expect(firstItem.open).to.be.true;
105
+ expect(secondItem.open).to.be.false;
106
+ el.addEventListener(
107
+ "sp-accordion-item-toggle",
108
+ (event) => event.preventDefault()
109
+ );
110
+ secondButton.click();
111
+ await elementUpdated(el);
112
+ expect(firstItem.open).to.be.true;
113
+ expect(secondItem.open).to.be.false;
114
+ });
115
+ it("allows more than one open item when `[allow-multiple]`", async () => {
116
+ const el = await fixture(Default());
117
+ el.allowMultiple = true;
118
+ await elementUpdated(el);
119
+ const firstItem = el.querySelector(
120
+ "sp-accordion-item:nth-of-type(1)"
121
+ );
122
+ const secondItem = el.querySelector(
123
+ "sp-accordion-item:nth-of-type(2)"
124
+ );
125
+ const firstButton = firstItem.focusElement;
126
+ const secondButton = secondItem.focusElement;
127
+ firstButton.click();
128
+ await elementUpdated(el);
129
+ expect(firstItem.open).to.be.true;
130
+ expect(secondItem.open).to.be.false;
131
+ secondButton.click();
132
+ await elementUpdated(el);
133
+ expect(firstItem.open).to.be.true;
134
+ expect(secondItem.open).to.be.true;
135
+ });
136
+ it("ensures that the correct item is open and that items can be closed", async () => {
137
+ const el = await fixture(Default());
138
+ await elementUpdated(el);
139
+ const firstItem = el.querySelector(
140
+ "sp-accordion-item:nth-of-type(1)"
141
+ );
142
+ const secondItem = el.querySelector(
143
+ "sp-accordion-item:nth-of-type(2)"
144
+ );
145
+ const firstButton = firstItem.focusElement;
146
+ const secondButton = secondItem.focusElement;
147
+ firstButton.click();
148
+ await elementUpdated(el);
149
+ expect(firstItem.open).to.be.true;
150
+ expect(secondItem.open).to.be.false;
151
+ secondButton.click();
152
+ await elementUpdated(el);
153
+ expect(firstItem.open).to.be.false;
154
+ expect(secondItem.open).to.be.true;
155
+ secondButton.click();
156
+ await elementUpdated(el);
157
+ expect(firstItem.open).to.be.false;
158
+ expect(secondItem.open).to.be.false;
159
+ });
160
+ it("ensures that the correct item is open and that items can be closed when [allow-multiple]", async () => {
161
+ const el = await fixture(Default());
162
+ el.allowMultiple = true;
163
+ await elementUpdated(el);
164
+ const firstItem = el.querySelector(
165
+ "sp-accordion-item:nth-of-type(1)"
166
+ );
167
+ const secondItem = el.querySelector(
168
+ "sp-accordion-item:nth-of-type(2)"
169
+ );
170
+ const firstButton = firstItem.focusElement;
171
+ const secondButton = secondItem.focusElement;
172
+ firstButton.click();
173
+ await elementUpdated(el);
174
+ expect(firstItem.open).to.be.true;
175
+ expect(secondItem.open).to.be.false;
176
+ secondButton.click();
177
+ await elementUpdated(el);
178
+ expect(firstItem.open).to.be.true;
179
+ expect(secondItem.open).to.be.true;
180
+ secondButton.click();
181
+ await elementUpdated(el);
182
+ expect(firstItem.open).to.be.true;
183
+ expect(secondItem.open).to.be.false;
184
+ });
185
+ it("handles focus and keyboard input and ignores disabled items", async () => {
186
+ const el = await fixture(
187
+ html`
19
188
  <sp-accordion allow-multiple>
20
189
  <sp-accordion-item disabled label="Heading 1">
21
190
  <div>Item 1</div>
@@ -36,5 +205,51 @@ import{elementUpdated as c,expect as t,fixture as s,html as m}from"@open-wc/test
36
205
  <div>Item 6</div>
37
206
  </sp-accordion-item>
38
207
  </sp-accordion>
39
- `);await c(e);const o=e.querySelector("sp-accordion-item:nth-of-type(2)"),n=e.querySelector("sp-accordion-item:nth-of-type(3)"),a=e.querySelector("sp-accordion-item:nth-of-type(4)"),i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=i?"Alt+Tab":"Tab",p=i?"Alt+Shift+Tab":"Shift+Tab";e.focus(),await c(e),t(document.activeElement===o).to.be.true,await l({press:r}),t(document.activeElement===n).to.be.true,await l({press:r}),t(document.activeElement===a).to.be.true,await l({press:p}),await l({press:p}),t(document.activeElement===o).to.be.true,document.body.focus(),e.focus(),t(document.activeElement===o).to.be.true,await l({press:p}),await c(e);const u=document.activeElement;t(typeof u).not.to.equal(w),t(typeof u).not.to.equal(f)})});
208
+ `
209
+ );
210
+ await elementUpdated(el);
211
+ const secondItem = el.querySelector(
212
+ "sp-accordion-item:nth-of-type(2)"
213
+ );
214
+ const thirdItem = el.querySelector(
215
+ "sp-accordion-item:nth-of-type(3)"
216
+ );
217
+ const fourthItem = el.querySelector(
218
+ "sp-accordion-item:nth-of-type(4)"
219
+ );
220
+ const isSafari = /^((?!chrome|android).)*safari/i.test(
221
+ navigator.userAgent
222
+ );
223
+ const tab = isSafari ? "Alt+Tab" : "Tab";
224
+ const shiftTab = isSafari ? "Alt+Shift+Tab" : "Shift+Tab";
225
+ el.focus();
226
+ await elementUpdated(el);
227
+ expect(document.activeElement === secondItem).to.be.true;
228
+ await sendKeys({
229
+ press: tab
230
+ });
231
+ expect(document.activeElement === thirdItem).to.be.true;
232
+ await sendKeys({
233
+ press: tab
234
+ });
235
+ expect(document.activeElement === fourthItem).to.be.true;
236
+ await sendKeys({
237
+ press: shiftTab
238
+ });
239
+ await sendKeys({
240
+ press: shiftTab
241
+ });
242
+ expect(document.activeElement === secondItem).to.be.true;
243
+ document.body.focus();
244
+ el.focus();
245
+ expect(document.activeElement === secondItem).to.be.true;
246
+ await sendKeys({
247
+ press: shiftTab
248
+ });
249
+ await elementUpdated(el);
250
+ const outsideFocused = document.activeElement;
251
+ expect(typeof outsideFocused).not.to.equal(AccordionItem);
252
+ expect(typeof outsideFocused).not.to.equal(Accordion);
253
+ });
254
+ });
40
255
  //# sourceMappingURL=accordion.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["accordion.test.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '@spectrum-web-components/accordion/sp-accordion.js';\nimport { Default } from '../stories/accordion.stories.js';\nimport { Accordion, AccordionItem } from '@spectrum-web-components/accordion';\nimport { sendKeys } from '@web/test-runner-commands';\nimport { spy } from 'sinon';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('Accordion', () => {\n testForLitDevWarnings(async () => await fixture<Accordion>(Default()));\n it('renders with items accessibly', async () => {\n const el = await fixture<Accordion>(Default());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('does not accept focus when empty', async () => {\n const el = await fixture<Accordion>(\n html`\n <sp-accordion></sp-accordion>\n `\n );\n\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n\n el.focus();\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n });\n it('does not accept keyboard events when items are not present', async () => {\n const errorSpy = spy();\n const el = await fixture<Accordion>(\n html`\n <sp-accordion>\n <sp-accordion-item disabled label=\"Heading 2\">\n <div>Item 2</div>\n </sp-accordion-item>\n </sp-accordion>\n `\n );\n\n await elementUpdated(el);\n const item = el.querySelector('sp-accordion-item') as AccordionItem;\n window.addEventListener('error', () => errorSpy());\n\n el.focus();\n item.remove();\n await elementUpdated(el);\n el.dispatchEvent(\n new KeyboardEvent('keydown', {\n code: 'ArrowDown',\n })\n );\n\n expect(errorSpy.callCount).to.equal(0);\n });\n it('does not accept focus when all children [disabled]', async () => {\n const el = await fixture<Accordion>(\n html`\n <sp-accordion>\n <sp-accordion-item disabled label=\"Heading 1\">\n <div>Item 1</div>\n </sp-accordion-item>\n <sp-accordion-item disabled label=\"Heading 2\">\n <div>Item 2</div>\n </sp-accordion-item>\n </sp-accordion>\n `\n );\n\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n\n el.focus();\n await elementUpdated(el);\n\n expect(document.activeElement === el).to.be.false;\n });\n it('only allows one open item by default', async () => {\n const el = await fixture<Accordion>(Default());\n await elementUpdated(el);\n const firstItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(1)'\n ) as AccordionItem;\n const secondItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(2)'\n ) as AccordionItem;\n\n const firstButton = firstItem.focusElement;\n const secondButton = secondItem.focusElement;\n\n firstButton.click();\n await elementUpdated(el);\n let openItems = el.querySelectorAll('sp-accordion-item[open]');\n expect(openItems.length).to.equal(1);\n\n secondButton.click();\n await elementUpdated(el);\n openItems = el.querySelectorAll('sp-accordion-item[open]');\n expect(openItems.length).to.equal(1);\n });\n it('can have `toggle` events canceled', async () => {\n const el = await fixture<Accordion>(Default());\n await elementUpdated(el);\n const firstItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(1)'\n ) as AccordionItem;\n const secondItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(2)'\n ) as AccordionItem;\n\n const firstButton = firstItem.focusElement;\n const secondButton = secondItem.focusElement;\n\n firstButton.click();\n await elementUpdated(el);\n expect(firstItem.open).to.be.true;\n expect(secondItem.open).to.be.false;\n\n el.addEventListener('sp-accordion-item-toggle', (event: Event) =>\n event.preventDefault()\n );\n\n secondButton.click();\n await elementUpdated(el);\n expect(firstItem.open).to.be.true;\n expect(secondItem.open).to.be.false;\n });\n it('allows more than one open item when `[allow-multiple]`', async () => {\n const el = await fixture<Accordion>(Default());\n el.allowMultiple = true;\n await elementUpdated(el);\n\n const firstItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(1)'\n ) as AccordionItem;\n const secondItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(2)'\n ) as AccordionItem;\n\n const firstButton = firstItem.focusElement;\n const secondButton = secondItem.focusElement;\n\n firstButton.click();\n await elementUpdated(el);\n\n expect(firstItem.open).to.be.true;\n expect(secondItem.open).to.be.false;\n\n secondButton.click();\n await elementUpdated(el);\n\n expect(firstItem.open).to.be.true;\n expect(secondItem.open).to.be.true;\n });\n it('ensures that the correct item is open and that items can be closed', async () => {\n const el = await fixture<Accordion>(Default());\n\n await elementUpdated(el);\n const firstItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(1)'\n ) as AccordionItem;\n const secondItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(2)'\n ) as AccordionItem;\n\n const firstButton = firstItem.focusElement;\n const secondButton = secondItem.focusElement;\n\n firstButton.click();\n await elementUpdated(el);\n expect(firstItem.open).to.be.true;\n expect(secondItem.open).to.be.false;\n\n secondButton.click();\n await elementUpdated(el);\n expect(firstItem.open).to.be.false;\n expect(secondItem.open).to.be.true;\n\n secondButton.click();\n await elementUpdated(el);\n expect(firstItem.open).to.be.false;\n expect(secondItem.open).to.be.false;\n });\n\n it('ensures that the correct item is open and that items can be closed when [allow-multiple]', async () => {\n const el = await fixture<Accordion>(Default());\n el.allowMultiple = true;\n await elementUpdated(el);\n\n const firstItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(1)'\n ) as AccordionItem;\n const secondItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(2)'\n ) as AccordionItem;\n\n const firstButton = firstItem.focusElement;\n const secondButton = secondItem.focusElement;\n\n firstButton.click();\n await elementUpdated(el);\n\n expect(firstItem.open).to.be.true;\n expect(secondItem.open).to.be.false;\n\n secondButton.click();\n await elementUpdated(el);\n\n expect(firstItem.open).to.be.true;\n expect(secondItem.open).to.be.true;\n\n secondButton.click();\n await elementUpdated(el);\n\n expect(firstItem.open).to.be.true;\n expect(secondItem.open).to.be.false;\n });\n it('handles focus and keyboard input and ignores disabled items', async () => {\n const el = await fixture<Accordion>(\n html`\n <sp-accordion allow-multiple>\n <sp-accordion-item disabled label=\"Heading 1\">\n <div>Item 1</div>\n </sp-accordion-item>\n <sp-accordion-item label=\"Heading 2\">\n <div>Item 2</div>\n </sp-accordion-item>\n <sp-accordion-item label=\"Heading 3\">\n <div>Item 3</div>\n </sp-accordion-item>\n <sp-accordion-item label=\"Heading 4\">\n <div>Item 4</div>\n </sp-accordion-item>\n <sp-accordion-item label=\"Heading 5\">\n <div>Item 5</div>\n </sp-accordion-item>\n <sp-accordion-item disabled label=\"Heading 6\">\n <div>Item 6</div>\n </sp-accordion-item>\n </sp-accordion>\n `\n );\n\n await elementUpdated(el);\n\n const secondItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(2)'\n ) as AccordionItem;\n const thirdItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(3)'\n ) as AccordionItem;\n const fourthItem = el.querySelector(\n 'sp-accordion-item:nth-of-type(4)'\n ) as AccordionItem;\n const isSafari = /^((?!chrome|android).)*safari/i.test(\n navigator.userAgent\n );\n const tab = isSafari ? 'Alt+Tab' : 'Tab';\n const shiftTab = isSafari ? 'Alt+Shift+Tab' : 'Shift+Tab';\n\n el.focus();\n\n await elementUpdated(el);\n expect(document.activeElement === secondItem).to.be.true;\n\n await sendKeys({\n press: tab,\n });\n\n expect(document.activeElement === thirdItem).to.be.true;\n\n await sendKeys({\n press: tab,\n });\n\n expect(document.activeElement === fourthItem).to.be.true;\n\n await sendKeys({\n press: shiftTab,\n });\n await sendKeys({\n press: shiftTab,\n });\n\n expect(document.activeElement === secondItem).to.be.true;\n\n document.body.focus();\n\n el.focus();\n expect(document.activeElement === secondItem).to.be.true;\n\n await sendKeys({\n press: shiftTab,\n });\n await elementUpdated(el);\n\n const outsideFocused = document.activeElement as HTMLElement;\n\n expect(typeof outsideFocused).not.to.equal(AccordionItem);\n expect(typeof outsideFocused).not.to.equal(Accordion);\n });\n});\n"],
5
- "mappings": "AAYA,qFAEA,2DACA,0DACA,kFACA,qDACA,4BACA,yEAEA,SAAS,YAAa,IAAM,CACxB,EAAsB,SAAY,KAAM,GAAmB,EAAQ,CAAC,CAAC,EACrE,GAAG,gCAAiC,SAAY,CAC5C,KAAM,GAAK,KAAM,GAAmB,EAAQ,CAAC,EAE7C,KAAM,GAAe,CAAE,EAEvB,KAAM,GAAO,CAAE,EAAE,GAAG,GAAG,WAAW,CACtC,CAAC,EACD,GAAG,mCAAoC,SAAY,CAC/C,KAAM,GAAK,KAAM,GACb;AAAA;AAAA,aAGJ,EAE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AA,IACX,CAAC;AAED,WAAO,SAAS,kBAAkB,UAAU,EAAE,GAAG,GAAG;AAEpD,UAAM,SAAS;AAAA,MACX,OAAO;AAAA,IACX,CAAC;AACD,UAAM,SAAS;AAAA,MACX,OAAO;AAAA,IACX,CAAC;AAED,WAAO,SAAS,kBAAkB,UAAU,EAAE,GAAG,GAAG;AAEpD,aAAS,KAAK,MAAM;AAEpB,OAAG,MAAM;AACT,WAAO,SAAS,kBAAkB,UAAU,EAAE,GAAG,GAAG;AAEpD,UAAM,SAAS;AAAA,MACX,OAAO;AAAA,IACX,CAAC;AACD,UAAM,eAAe,EAAE;AAEvB,UAAM,iBAAiB,SAAS;AAEhC,WAAO,OAAO,cAAc,EAAE,IAAI,GAAG,MAAM,aAAa;AACxD,WAAO,OAAO,cAAc,EAAE,IAAI,GAAG,MAAM,SAAS;AAAA,EACxD,CAAC;AACL,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,9 @@
1
- import"@spectrum-web-components/accordion/sp-accordion.js";import"@spectrum-web-components/accordion/sp-accordion-item.js";import{html as i}from"lit";import{measureFixtureCreation as o}from"../../../../test/benchmark/helpers.js";o(i`
1
+ "use strict";
2
+ import "@spectrum-web-components/accordion/sp-accordion.js";
3
+ import "@spectrum-web-components/accordion/sp-accordion-item.js";
4
+ import { html } from "lit";
5
+ import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
6
+ measureFixtureCreation(html`
2
7
  <sp-accordion>
3
8
  <sp-accordion-item label="Heading 1">
4
9
  <div>Item 1</div>
@@ -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/accordion/sp-accordion.js';\nimport '@spectrum-web-components/accordion/sp-accordion-item.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-accordion>\n <sp-accordion-item label=\"Heading 1\">\n <div>Item 1</div>\n </sp-accordion-item>\n <sp-accordion-item label=\"Heading 2\">\n <div>Item 2</div>\n </sp-accordion-item>\n <sp-accordion-item label=\"Heading 3\">\n <div>Item 3</div>\n </sp-accordion-item>\n <sp-accordion-item label=\"Heading 4\">\n <div>Item 4</div>\n </sp-accordion-item>\n <sp-accordion-item label=\"Heading 5\">\n <div>Item 5</div>\n </sp-accordion-item>\n <sp-accordion-item label=\"Heading 6\">\n <div>Item 6</div>\n </sp-accordion-item>\n </sp-accordion>\n`);\n"],
5
- "mappings": "AAYA,2DACA,gEACA,2BACA,+EAEA,EAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAqBtB",
5
+ "mappings": ";AAYA,OAAO;AACP,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AAEvC,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAqBtB;",
6
6
  "names": []
7
7
  }