@spectrum-web-components/thumbnail 1.0.0 → 1.0.2

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.
@@ -1,30 +0,0 @@
1
- "use strict";
2
- import { html } from "@spectrum-web-components/base";
3
- import "@spectrum-web-components/thumbnail/sp-thumbnail.js";
4
- import { thumbnail as image } from "./images.js";
5
- export default {
6
- title: "Thumbnail/Sizes",
7
- component: "sp-thumbnail"
8
- };
9
- const thumbnail = ({
10
- size
11
- }) => {
12
- return html`
13
- <sp-thumbnail size=${size}>
14
- <img src=${image} alt="Woman crouching" />
15
- </sp-thumbnail>
16
- `;
17
- };
18
- export const size50 = () => thumbnail({ size: "50" });
19
- export const size75 = () => thumbnail({ size: "75" });
20
- export const size100 = () => thumbnail({ size: "100" });
21
- export const size200 = () => thumbnail({ size: "200" });
22
- export const size300 = () => thumbnail({ size: "300" });
23
- export const size400 = () => thumbnail({ size: "400" });
24
- export const size500 = () => thumbnail({ size: "500" });
25
- export const size600 = () => thumbnail({ size: "600" });
26
- export const size700 = () => thumbnail({ size: "700" });
27
- export const size800 = () => thumbnail({ size: "800" });
28
- export const size900 = () => thumbnail({ size: "900" });
29
- export const size1000 = () => thumbnail({ size: "1000" });
30
- //# sourceMappingURL=thumbnail-sizes.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["thumbnail-sizes.stories.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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/thumbnail/sp-thumbnail.js';\nimport { thumbnail as image } from './images.js';\n\nexport default {\n title: 'Thumbnail/Sizes',\n component: 'sp-thumbnail',\n};\n\nconst thumbnail = ({\n size,\n}: {\n size:\n | '50'\n | '75'\n | '100'\n | '200'\n | '300'\n | '400'\n | '500'\n | '600'\n | '700'\n | '800'\n | '900'\n | '1000';\n}): TemplateResult => {\n return html`\n <sp-thumbnail size=${size}>\n <img src=${image} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `;\n};\n\nexport const size50 = (): TemplateResult => thumbnail({ size: '50' });\n\nexport const size75 = (): TemplateResult => thumbnail({ size: '75' });\n\nexport const size100 = (): TemplateResult => thumbnail({ size: '100' });\n\nexport const size200 = (): TemplateResult => thumbnail({ size: '200' });\n\nexport const size300 = (): TemplateResult => thumbnail({ size: '300' });\n\nexport const size400 = (): TemplateResult => thumbnail({ size: '400' });\n\nexport const size500 = (): TemplateResult => thumbnail({ size: '500' });\n\nexport const size600 = (): TemplateResult => thumbnail({ size: '600' });\n\nexport const size700 = (): TemplateResult => thumbnail({ size: '700' });\n\nexport const size800 = (): TemplateResult => thumbnail({ size: '800' });\n\nexport const size900 = (): TemplateResult => thumbnail({ size: '900' });\n\nexport const size1000 = (): TemplateResult => thumbnail({ size: '1000' });\n"],
5
- "mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AACP,SAAS,aAAa,aAAa;AAEnC,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEA,MAAM,YAAY,CAAC;AAAA,EACf;AACJ,MAcsB;AAClB,SAAO;AAAA,6BACkB,IAAI;AAAA,uBACV,KAAK;AAAA;AAAA;AAG5B;AAEO,aAAM,SAAS,MAAsB,UAAU,EAAE,MAAM,KAAK,CAAC;AAE7D,aAAM,SAAS,MAAsB,UAAU,EAAE,MAAM,KAAK,CAAC;AAE7D,aAAM,UAAU,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE/D,aAAM,UAAU,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE/D,aAAM,UAAU,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE/D,aAAM,UAAU,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE/D,aAAM,UAAU,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE/D,aAAM,UAAU,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE/D,aAAM,UAAU,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE/D,aAAM,UAAU,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE/D,aAAM,UAAU,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE/D,aAAM,WAAW,MAAsB,UAAU,EAAE,MAAM,OAAO,CAAC;",
6
- "names": []
7
- }
@@ -1,89 +0,0 @@
1
- "use strict";
2
- import { html } from "@spectrum-web-components/base";
3
- import "@spectrum-web-components/thumbnail/sp-thumbnail.js";
4
- import {
5
- landscape as landscapeImage,
6
- portrait as portraitImage,
7
- thumbnail
8
- } from "./images.js";
9
- export default {
10
- title: "Thumbnail",
11
- component: "sp-thumbnail"
12
- };
13
- export const Default = () => {
14
- return html`
15
- <sp-thumbnail>
16
- <img src=${thumbnail} alt="Woman crouching" />
17
- </sp-thumbnail>
18
- `;
19
- };
20
- export const focused = () => {
21
- return html`
22
- <sp-thumbnail focused>
23
- <img src=${thumbnail} alt="Woman crouching" />
24
- </sp-thumbnail>
25
- `;
26
- };
27
- export const disabled = () => {
28
- return html`
29
- <sp-thumbnail disabled>
30
- <img src=${thumbnail} alt="Woman crouching" />
31
- </sp-thumbnail>
32
- `;
33
- };
34
- export const portrait = () => {
35
- return html`
36
- <sp-thumbnail>
37
- <img src=${portraitImage} alt="Eiffel Tower at night" />
38
- </sp-thumbnail>
39
- `;
40
- };
41
- export const landscape = () => {
42
- return html`
43
- <sp-thumbnail>
44
- <img
45
- src=${landscapeImage}
46
- alt="Landscape with mountains and lake"
47
- />
48
- </sp-thumbnail>
49
- `;
50
- };
51
- export const layerSelected = () => {
52
- return html`
53
- <sp-thumbnail layer selected>
54
- <img src=${thumbnail} alt="Woman crouching" />
55
- </sp-thumbnail>
56
- `;
57
- };
58
- export const layer = () => {
59
- return html`
60
- <sp-thumbnail layer>
61
- <img src=${thumbnail} alt="Woman crouching" />
62
- </sp-thumbnail>
63
- `;
64
- };
65
- export const portraitCover = () => {
66
- return html`
67
- <sp-thumbnail cover>
68
- <img src=${portraitImage} alt="Eiffel Tower at night" />
69
- </sp-thumbnail>
70
- `;
71
- };
72
- export const landscapeCover = () => {
73
- return html`
74
- <sp-thumbnail cover>
75
- <img
76
- src=${landscapeImage}
77
- alt="Landscape with mountains and lake"
78
- />
79
- </sp-thumbnail>
80
- `;
81
- };
82
- export const background = () => {
83
- return html`
84
- <sp-thumbnail background="orange">
85
- <img src=${thumbnail} alt="Woman crouching" />
86
- </sp-thumbnail>
87
- `;
88
- };
89
- //# sourceMappingURL=thumbnail.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["thumbnail.stories.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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '@spectrum-web-components/thumbnail/sp-thumbnail.js';\nimport {\n landscape as landscapeImage,\n portrait as portraitImage,\n thumbnail,\n} from './images.js';\n\nexport default {\n title: 'Thumbnail',\n component: 'sp-thumbnail',\n};\n\nexport const Default = (): TemplateResult => {\n return html`\n <sp-thumbnail>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `;\n};\n\nexport const focused = (): TemplateResult => {\n return html`\n <sp-thumbnail focused>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `;\n};\n\nexport const disabled = (): TemplateResult => {\n return html`\n <sp-thumbnail disabled>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `;\n};\n\nexport const portrait = (): TemplateResult => {\n return html`\n <sp-thumbnail>\n <img src=${portraitImage} alt=\"Eiffel Tower at night\" />\n </sp-thumbnail>\n `;\n};\n\nexport const landscape = (): TemplateResult => {\n return html`\n <sp-thumbnail>\n <img\n src=${landscapeImage}\n alt=\"Landscape with mountains and lake\"\n />\n </sp-thumbnail>\n `;\n};\n\nexport const layerSelected = (): TemplateResult => {\n return html`\n <sp-thumbnail layer selected>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `;\n};\n\nexport const layer = (): TemplateResult => {\n return html`\n <sp-thumbnail layer>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `;\n};\n\nexport const portraitCover = (): TemplateResult => {\n return html`\n <sp-thumbnail cover>\n <img src=${portraitImage} alt=\"Eiffel Tower at night\" />\n </sp-thumbnail>\n `;\n};\n\nexport const landscapeCover = (): TemplateResult => {\n return html`\n <sp-thumbnail cover>\n <img\n src=${landscapeImage}\n alt=\"Landscape with mountains and lake\"\n />\n </sp-thumbnail>\n `;\n};\n\nexport const background = (): TemplateResult => {\n return html`\n <sp-thumbnail background=\"orange\">\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `;\n};\n"],
5
- "mappings": ";AAYA,SAAS,YAA4B;AAErC,OAAO;AACP;AAAA,EACI,aAAa;AAAA,EACb,YAAY;AAAA,EACZ;AAAA,OACG;AAEP,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AACf;AAEO,aAAM,UAAU,MAAsB;AACzC,SAAO;AAAA;AAAA,uBAEY,SAAS;AAAA;AAAA;AAGhC;AAEO,aAAM,UAAU,MAAsB;AACzC,SAAO;AAAA;AAAA,uBAEY,SAAS;AAAA;AAAA;AAGhC;AAEO,aAAM,WAAW,MAAsB;AAC1C,SAAO;AAAA;AAAA,uBAEY,SAAS;AAAA;AAAA;AAGhC;AAEO,aAAM,WAAW,MAAsB;AAC1C,SAAO;AAAA;AAAA,uBAEY,aAAa;AAAA;AAAA;AAGpC;AAEO,aAAM,YAAY,MAAsB;AAC3C,SAAO;AAAA;AAAA;AAAA,sBAGW,cAAc;AAAA;AAAA;AAAA;AAAA;AAKpC;AAEO,aAAM,gBAAgB,MAAsB;AAC/C,SAAO;AAAA;AAAA,uBAEY,SAAS;AAAA;AAAA;AAGhC;AAEO,aAAM,QAAQ,MAAsB;AACvC,SAAO;AAAA;AAAA,uBAEY,SAAS;AAAA;AAAA;AAGhC;AAEO,aAAM,gBAAgB,MAAsB;AAC/C,SAAO;AAAA;AAAA,uBAEY,aAAa;AAAA;AAAA;AAGpC;AAEO,aAAM,iBAAiB,MAAsB;AAChD,SAAO;AAAA;AAAA;AAAA,sBAGW,cAAc;AAAA;AAAA;AAAA;AAAA;AAKpC;AAEO,aAAM,aAAa,MAAsB;AAC5C,SAAO;AAAA;AAAA,uBAEY,SAAS;AAAA;AAAA;AAGhC;",
6
- "names": []
7
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import "@spectrum-web-components/thumbnail/sp-thumbnail.js";
3
- import { html } from "lit";
4
- import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
5
- import { thumbnail } from "../../stories/images.js";
6
- measureFixtureCreation(html`
7
- <sp-thumbnail>
8
- <img src=${thumbnail} alt="Woman crouching" />
9
- </sp-thumbnail>
10
- `);
11
- //# sourceMappingURL=basic-test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["basic-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/thumbnail/sp-thumbnail.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\nimport { thumbnail } from '../../stories/images.js';\n\nmeasureFixtureCreation(html`\n <sp-thumbnail>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n`);\n"],
5
- "mappings": ";AAYA,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AACvC,SAAS,iBAAiB;AAE1B,uBAAuB;AAAA;AAAA,mBAEJ,SAAS;AAAA;AAAA,CAE3B;",
6
- "names": []
7
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- import { html } from "@open-wc/testing";
3
- import "@spectrum-web-components/thumbnail/sp-thumbnail.js";
4
- import { testForMemoryLeaks } from "../../../test/testing-helpers.js";
5
- testForMemoryLeaks(html`
6
- <sp-thumbnail></sp-thumbnail>
7
- `);
8
- //# sourceMappingURL=thumbnail-memory.test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["thumbnail-memory.test.ts"],
4
- "sourcesContent": ["/*\nCopyright 2023 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\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 } from '@open-wc/testing';\nimport '@spectrum-web-components/thumbnail/sp-thumbnail.js';\nimport { testForMemoryLeaks } from '../../../test/testing-helpers.js';\n\ntestForMemoryLeaks(html`\n <sp-thumbnail></sp-thumbnail>\n`);\n"],
5
- "mappings": ";AAWA,SAAS,YAAY;AACrB,OAAO;AACP,SAAS,0BAA0B;AAEnC,mBAAmB;AAAA;AAAA,CAElB;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import * as stories from "../stories/thumbnail-sizes.stories.js";
3
- import { regressVisuals } from "../../../test/visual/test.js";
4
- regressVisuals("ThumbnailSizesStories", stories);
5
- //# sourceMappingURL=thumbnail-sizes.test-vrt.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["thumbnail-sizes.test-vrt.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 * as stories from '../stories/thumbnail-sizes.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ThumbnailSizesStories', stories as unknown as TestsType);\n"],
5
- "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,yBAAyB,OAA+B;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- import * as stories from "../stories/thumbnail.stories.js";
3
- import { regressVisuals } from "../../../test/visual/test.js";
4
- regressVisuals("ThumbnailStories", stories);
5
- //# sourceMappingURL=thumbnail.test-vrt.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["thumbnail.test-vrt.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 * as stories from '../stories/thumbnail.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ThumbnailStories', stories as unknown as TestsType);\n"],
5
- "mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,oBAAoB,OAA+B;",
6
- "names": []
7
- }
@@ -1,73 +0,0 @@
1
- "use strict";
2
- import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
3
- import "@spectrum-web-components/thumbnail/sp-thumbnail.js";
4
- import { thumbnail } from "../stories/images.js";
5
- import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
6
- import { stub } from "sinon";
7
- describe("Thumbnail", () => {
8
- testForLitDevWarnings(
9
- async () => await fixture(html`
10
- <sp-thumbnail>
11
- <img src=${thumbnail} alt="Woman crouching" />
12
- </sp-thumbnail>
13
- `)
14
- );
15
- it("loads default thumbnail accessibly", async () => {
16
- const el = await fixture(html`
17
- <sp-thumbnail>
18
- <img src=${thumbnail} alt="Woman crouching" />
19
- </sp-thumbnail>
20
- `);
21
- await elementUpdated(el);
22
- await expect(el).to.be.accessible();
23
- });
24
- it("can be size `50`", async () => {
25
- const el = await fixture(html`
26
- <sp-thumbnail size="50">
27
- <img src=${thumbnail} alt="Woman crouching" />
28
- </sp-thumbnail>
29
- `);
30
- await elementUpdated(el);
31
- expect(el.size).to.equal("50");
32
- });
33
- it("accepts `background`", async () => {
34
- const el = await fixture(html`
35
- <sp-thumbnail background="blue">
36
- <img src=${thumbnail} alt="Woman crouching" />
37
- </sp-thumbnail>
38
- `);
39
- const background = el.shadowRoot.querySelector(".background");
40
- expect(background).to.not.be.null;
41
- });
42
- it("renders the opacity checkerboard and slot", async () => {
43
- const el = await fixture(html`
44
- <sp-thumbnail>
45
- <img src=${thumbnail} alt="Woman crouching" />
46
- </sp-thumbnail>
47
- `);
48
- await elementUpdated(el);
49
- el.setAttribute("layer", "true");
50
- await elementUpdated(el);
51
- const checkerboard = el.shadowRoot.querySelector(
52
- ".opacity-checkerboard.layer-inner"
53
- );
54
- expect(checkerboard).to.not.be.null;
55
- const slot = checkerboard == null ? void 0 : checkerboard.querySelector("slot");
56
- expect(slot).to.not.be.null;
57
- });
58
- describe("dev mode", () => {
59
- let consoleWarnStub;
60
- before(() => {
61
- window.__swc.verbose = true;
62
- consoleWarnStub = stub(console, "warn");
63
- });
64
- afterEach(() => {
65
- consoleWarnStub.resetHistory();
66
- });
67
- after(() => {
68
- window.__swc.verbose = false;
69
- consoleWarnStub.restore();
70
- });
71
- });
72
- });
73
- //# sourceMappingURL=thumbnail.test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["thumbnail.test.ts"],
4
- "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '@spectrum-web-components/thumbnail/sp-thumbnail.js';\nimport { Thumbnail } from '..';\nimport { thumbnail } from '../stories/images.js';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\nimport { stub } from 'sinon';\n\ndescribe('Thumbnail', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Thumbnail>(html`\n <sp-thumbnail>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `)\n );\n it('loads default thumbnail accessibly', async () => {\n const el = await fixture<Thumbnail>(html`\n <sp-thumbnail>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `);\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('can be size `50`', async () => {\n const el = await fixture<Thumbnail>(html`\n <sp-thumbnail size=\"50\">\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `);\n\n await elementUpdated(el);\n\n expect(el.size).to.equal('50');\n });\n it('accepts `background`', async () => {\n const el = await fixture<Thumbnail>(html`\n <sp-thumbnail background=\"blue\">\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `);\n\n const background = el.shadowRoot.querySelector('.background');\n expect(background).to.not.be.null;\n });\n it('renders the opacity checkerboard and slot', async () => {\n const el = await fixture<Thumbnail>(html`\n <sp-thumbnail>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `);\n\n await elementUpdated(el);\n el.setAttribute('layer', 'true');\n await elementUpdated(el);\n const checkerboard = el.shadowRoot.querySelector(\n '.opacity-checkerboard.layer-inner'\n );\n expect(checkerboard).to.not.be.null;\n\n const slot = checkerboard?.querySelector('slot');\n expect(slot).to.not.be.null;\n });\n describe('dev mode', () => {\n let consoleWarnStub!: ReturnType<typeof stub>;\n before(() => {\n window.__swc.verbose = true;\n consoleWarnStub = stub(console, 'warn');\n });\n afterEach(() => {\n consoleWarnStub.resetHistory();\n });\n after(() => {\n window.__swc.verbose = false;\n consoleWarnStub.restore();\n });\n });\n});\n"],
5
- "mappings": ";AAYA,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AAEtD,OAAO;AAEP,SAAS,iBAAiB;AAC1B,SAAS,6BAA6B;AACtC,SAAS,YAAY;AAErB,SAAS,aAAa,MAAM;AACxB;AAAA,IACI,YACI,MAAM,QAAmB;AAAA;AAAA,+BAEN,SAAS;AAAA;AAAA,aAE3B;AAAA,EACT;AACA,KAAG,sCAAsC,YAAY;AACjD,UAAM,KAAK,MAAM,QAAmB;AAAA;AAAA,2BAEjB,SAAS;AAAA;AAAA,SAE3B;AAED,UAAM,eAAe,EAAE;AAEvB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,oBAAoB,YAAY;AAC/B,UAAM,KAAK,MAAM,QAAmB;AAAA;AAAA,2BAEjB,SAAS;AAAA;AAAA,SAE3B;AAED,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI;AAAA,EACjC,CAAC;AACD,KAAG,wBAAwB,YAAY;AACnC,UAAM,KAAK,MAAM,QAAmB;AAAA;AAAA,2BAEjB,SAAS;AAAA;AAAA,SAE3B;AAED,UAAM,aAAa,GAAG,WAAW,cAAc,aAAa;AAC5D,WAAO,UAAU,EAAE,GAAG,IAAI,GAAG;AAAA,EACjC,CAAC;AACD,KAAG,6CAA6C,YAAY;AACxD,UAAM,KAAK,MAAM,QAAmB;AAAA;AAAA,2BAEjB,SAAS;AAAA;AAAA,SAE3B;AAED,UAAM,eAAe,EAAE;AACvB,OAAG,aAAa,SAAS,MAAM;AAC/B,UAAM,eAAe,EAAE;AACvB,UAAM,eAAe,GAAG,WAAW;AAAA,MAC/B;AAAA,IACJ;AACA,WAAO,YAAY,EAAE,GAAG,IAAI,GAAG;AAE/B,UAAM,OAAO,6CAAc,cAAc;AACzC,WAAO,IAAI,EAAE,GAAG,IAAI,GAAG;AAAA,EAC3B,CAAC;AACD,WAAS,YAAY,MAAM;AACvB,QAAI;AACJ,WAAO,MAAM;AACT,aAAO,MAAM,UAAU;AACvB,wBAAkB,KAAK,SAAS,MAAM;AAAA,IAC1C,CAAC;AACD,cAAU,MAAM;AACZ,sBAAgB,aAAa;AAAA,IACjC,CAAC;AACD,UAAM,MAAM;AACR,aAAO,MAAM,UAAU;AACvB,sBAAgB,QAAQ;AAAA,IAC5B,CAAC;AAAA,EACL,CAAC;AACL,CAAC;",
6
- "names": []
7
- }