@spectrum-web-components/dialog 0.10.7 → 0.10.9-devmode.7

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 (45) hide show
  1. package/package.json +36 -17
  2. package/sp-dialog-wrapper.dev.js +3 -0
  3. package/sp-dialog-wrapper.dev.js.map +7 -0
  4. package/sp-dialog-wrapper.js +3 -14
  5. package/sp-dialog-wrapper.js.map +7 -1
  6. package/sp-dialog.dev.js +3 -0
  7. package/sp-dialog.dev.js.map +7 -0
  8. package/sp-dialog.js +3 -14
  9. package/sp-dialog.js.map +7 -1
  10. package/src/Dialog.dev.js +208 -0
  11. package/src/Dialog.dev.js.map +7 -0
  12. package/src/Dialog.js +170 -182
  13. package/src/Dialog.js.map +7 -1
  14. package/src/DialogWrapper.dev.js +262 -0
  15. package/src/DialogWrapper.dev.js.map +7 -0
  16. package/src/DialogWrapper.js +205 -239
  17. package/src/DialogWrapper.js.map +7 -1
  18. package/src/dialog.css.dev.js +99 -0
  19. package/src/dialog.css.dev.js.map +7 -0
  20. package/src/dialog.css.js +3 -14
  21. package/src/dialog.css.js.map +7 -1
  22. package/src/index.dev.js +3 -0
  23. package/src/index.dev.js.map +7 -0
  24. package/src/index.js +3 -14
  25. package/src/index.js.map +7 -1
  26. package/src/spectrum-dialog.css.dev.js +97 -0
  27. package/src/spectrum-dialog.css.dev.js.map +7 -0
  28. package/src/spectrum-dialog.css.js +3 -14
  29. package/src/spectrum-dialog.css.js.map +7 -1
  30. package/stories/dialog-wrapper.stories.js +76 -87
  31. package/stories/dialog-wrapper.stories.js.map +7 -1
  32. package/stories/dialog.stories.js +20 -31
  33. package/stories/dialog.stories.js.map +7 -1
  34. package/stories/images.js +3 -14
  35. package/stories/images.js.map +7 -1
  36. package/test/benchmark/basic-test.js +5 -16
  37. package/test/benchmark/basic-test.js.map +7 -1
  38. package/test/dialog-wrapper.test-vrt.js +4 -15
  39. package/test/dialog-wrapper.test-vrt.js.map +7 -1
  40. package/test/dialog-wrapper.test.js +158 -156
  41. package/test/dialog-wrapper.test.js.map +7 -1
  42. package/test/dialog.test-vrt.js +4 -15
  43. package/test/dialog.test-vrt.js.map +7 -1
  44. package/test/dialog.test.js +46 -54
  45. package/test/dialog.test.js.map +7 -1
@@ -1,55 +1,47 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { elementUpdated, expect, fixture } from '@open-wc/testing';
13
- import '../sp-dialog.js';
14
- import { alertError, dismissable, fullscreen, small, } from '../stories/dialog.stories.js';
15
- import { spy } from 'sinon';
16
- describe('Dialog', () => {
17
- it('loads `[size=small]` dialog accessibly', async () => {
18
- const el = await fixture(small());
19
- await elementUpdated(el);
20
- await expect(el).to.be.accessible();
21
- });
22
- it('loads `[size=alert]` dialog accessibly', async () => {
23
- const el = await fixture(alertError());
24
- await elementUpdated(el);
25
- await expect(el).to.be.accessible();
26
- });
27
- it('loads `[dismissable]` dialog accessibly', async () => {
28
- const el = await fixture(dismissable());
29
- await elementUpdated(el);
30
- await expect(el).to.be.accessible();
31
- });
32
- it('loads `[mode=fullscreen]` dialog accessibly', async () => {
33
- const el = await fixture(fullscreen());
34
- await elementUpdated(el);
35
- await expect(el).to.be.accessible();
36
- });
37
- it('loads dialog without footer accessibly', async () => {
38
- const el = await fixture(small());
39
- await elementUpdated(el);
40
- await expect(el).to.be.accessible();
41
- });
42
- it('closes', async () => {
43
- const closeSpy = spy();
44
- const el = await fixture(dismissable());
45
- el.addEventListener('close', () => closeSpy());
46
- await elementUpdated(el);
47
- const closeButton = (el.shadowRoot
48
- ? el.shadowRoot.querySelector('.close-button')
49
- : el.querySelector('.close-button '));
50
- closeButton.click();
51
- await elementUpdated(el);
52
- expect(closeSpy.calledOnce).to.be.true;
53
- });
1
+ import { elementUpdated, expect, fixture } from "@open-wc/testing";
2
+ import "@spectrum-web-components/dialog/sp-dialog.js";
3
+ import {
4
+ alertError,
5
+ dismissable,
6
+ fullscreen,
7
+ small
8
+ } from "../stories/dialog.stories.js";
9
+ import { spy } from "sinon";
10
+ describe("Dialog", () => {
11
+ it("loads `[size=small]` dialog accessibly", async () => {
12
+ const el = await fixture(small());
13
+ await elementUpdated(el);
14
+ await expect(el).to.be.accessible();
15
+ });
16
+ it("loads `[size=alert]` dialog accessibly", async () => {
17
+ const el = await fixture(alertError());
18
+ await elementUpdated(el);
19
+ await expect(el).to.be.accessible();
20
+ });
21
+ it("loads `[dismissable]` dialog accessibly", async () => {
22
+ const el = await fixture(dismissable());
23
+ await elementUpdated(el);
24
+ await expect(el).to.be.accessible();
25
+ });
26
+ it("loads `[mode=fullscreen]` dialog accessibly", async () => {
27
+ const el = await fixture(fullscreen());
28
+ await elementUpdated(el);
29
+ await expect(el).to.be.accessible();
30
+ });
31
+ it("loads dialog without footer accessibly", async () => {
32
+ const el = await fixture(small());
33
+ await elementUpdated(el);
34
+ await expect(el).to.be.accessible();
35
+ });
36
+ it("closes", async () => {
37
+ const closeSpy = spy();
38
+ const el = await fixture(dismissable());
39
+ el.addEventListener("close", () => closeSpy());
40
+ await elementUpdated(el);
41
+ const closeButton = el.shadowRoot ? el.shadowRoot.querySelector(".close-button") : el.querySelector(".close-button ");
42
+ closeButton.click();
43
+ await elementUpdated(el);
44
+ expect(closeSpy.calledOnce).to.be.true;
45
+ });
54
46
  });
55
- //# sourceMappingURL=dialog.test.js.map
47
+ //# sourceMappingURL=dialog.test.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"dialog.test.js","sourceRoot":"","sources":["dialog.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EA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E,CAAC,CAAC;QAEzB,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,KAAK,EAAE,CAAC,CAAC;QAE1C,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QACpB,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC;QACvB,MAAM,EAAE,GAAG,MAAM,OAAO,CAAS,WAAW,EAAE,CAAC,CAAC;QAChD,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC/C,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAEzB,MAAM,WAAW,GAAG,CAChB,EAAE,CAAC,UAAU;YACT,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAC;YAC9C,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAC5B,CAAC;QAEjB,WAAW,CAAC,KAAK,EAAE,CAAC;QAEpB,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QACzB,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture } from '@open-wc/testing';\n\nimport '../sp-dialog.js';\nimport { Dialog } from '..';\nimport {\n alertError,\n dismissable,\n fullscreen,\n small,\n} from '../stories/dialog.stories.js';\nimport { spy } from 'sinon';\n\ndescribe('Dialog', () => {\n it('loads `[size=small]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(small());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads `[size=alert]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(alertError());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads `[dismissable]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(dismissable());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads `[mode=fullscreen]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(fullscreen());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads dialog without footer accessibly', async () => {\n const el = await fixture<Dialog>(small());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('closes', async () => {\n const closeSpy = spy();\n const el = await fixture<Dialog>(dismissable());\n el.addEventListener('close', () => closeSpy());\n await elementUpdated(el);\n\n const closeButton = (\n el.shadowRoot\n ? el.shadowRoot.querySelector('.close-button')\n : el.querySelector('.close-button ')\n ) as HTMLElement;\n\n closeButton.click();\n\n await elementUpdated(el);\n expect(closeSpy.calledOnce).to.be.true;\n });\n});\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["dialog.test.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture } from '@open-wc/testing';\n\nimport '@spectrum-web-components/dialog/sp-dialog.js';\nimport { Dialog } from '@spectrum-web-components/dialog';\nimport {\n alertError,\n dismissable,\n fullscreen,\n small,\n} from '../stories/dialog.stories.js';\nimport { spy } from 'sinon';\n\ndescribe('Dialog', () => {\n it('loads `[size=small]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(small());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads `[size=alert]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(alertError());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads `[dismissable]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(dismissable());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads `[mode=fullscreen]` dialog accessibly', async () => {\n const el = await fixture<Dialog>(fullscreen());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('loads dialog without footer accessibly', async () => {\n const el = await fixture<Dialog>(small());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('closes', async () => {\n const closeSpy = spy();\n const el = await fixture<Dialog>(dismissable());\n el.addEventListener('close', () => closeSpy());\n await elementUpdated(el);\n\n const closeButton = (\n el.shadowRoot\n ? el.shadowRoot.querySelector('.close-button')\n : el.querySelector('.close-button ')\n ) as HTMLElement;\n\n closeButton.click();\n\n await elementUpdated(el);\n expect(closeSpy.calledOnce).to.be.true;\n });\n});\n"],
5
+ "mappings": "AAYA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AAEA,SAAS,UAAU,MAAM;AACrB,KAAG,0CAA0C,YAAY;AACrD,UAAM,KAAK,MAAM,QAA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