@spectrum-web-components/thumbnail 0.6.0 → 0.6.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.
@@ -1,6 +1,23 @@
1
- import{html as i}from"@spectrum-web-components/base";import"@spectrum-web-components/thumbnail/sp-thumbnail.js";import{thumbnail as o}from"./images.js";export default{title:"Thumbnail/Sizes",component:"sp-thumbnail"};const t=({size:e})=>i`
2
- <sp-thumbnail size=${e}>
3
- <img src=${o} alt="Woman crouching" />
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" />
4
15
  </sp-thumbnail>
5
- `;export const XXS=()=>t({size:"xxs"}),XS=()=>t({size:"xs"}),s=()=>t({size:"s"}),m=()=>t({size:"m"}),l=()=>t({size:"l"});
16
+ `;
17
+ };
18
+ export const XXS = () => thumbnail({ size: "xxs" });
19
+ export const XS = () => thumbnail({ size: "xs" });
20
+ export const s = () => thumbnail({ size: "s" });
21
+ export const m = () => thumbnail({ size: "m" });
22
+ export const l = () => thumbnail({ size: "l" });
6
23
  //# sourceMappingURL=thumbnail-sizes.stories.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["thumbnail-sizes.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/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: 'xxs' | 'xs' | 's' | 'm' | 'l';\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 XXS = (): TemplateResult => thumbnail({ size: 'xxs' });\n\nexport const XS = (): TemplateResult => thumbnail({ size: 'xs' });\n\nexport const s = (): TemplateResult => thumbnail({ size: 's' });\n\nexport const m = (): TemplateResult => thumbnail({ size: 'm' });\n\nexport const l = (): TemplateResult => thumbnail({ size: 'l' });\n"],
5
- "mappings": "AAYA,qDAEA,2DACA,wCAEA,cAAe,CACX,MAAO,kBACP,UAAW,cACf,EAEA,KAAM,GAAY,CAAC,CACf,UAIO;AAAA,6BACkB;AAAA,uBACN;AAAA;AAAA,MAKhB,YAAM,KAAM,IAAsB,EAAU,CAAE,KAAM,KAAM,CAAC,EAErD,GAAK,IAAsB,EAAU,CAAE,KAAM,IAAK,CAAC,EAEnD,EAAI,IAAsB,EAAU,CAAE,KAAM,GAAI,CAAC,EAEjD,EAAI,IAAsB,EAAU,CAAE,KAAM,GAAI,CAAC,EAEjD,EAAI,IAAsB,EAAU,CAAE,KAAM,GAAI,CAAC",
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,MAEsB;AAClB,SAAO;AAAA,6BACkB;AAAA,uBACN;AAAA;AAAA;AAGvB;AAEO,aAAM,MAAM,MAAsB,UAAU,EAAE,MAAM,MAAM,CAAC;AAE3D,aAAM,KAAK,MAAsB,UAAU,EAAE,MAAM,KAAK,CAAC;AAEzD,aAAM,IAAI,MAAsB,UAAU,EAAE,MAAM,IAAI,CAAC;AAEvD,aAAM,IAAI,MAAsB,UAAU,EAAE,MAAM,IAAI,CAAC;AAEvD,aAAM,IAAI,MAAsB,UAAU,EAAE,MAAM,IAAI,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,40 +1,75 @@
1
- import{html as t}from"@spectrum-web-components/base";import"@spectrum-web-components/thumbnail/sp-thumbnail.js";import{landscape as a,portrait as n,thumbnail as e}from"./images.js";export default{title:"Thumbnail",component:"sp-thumbnail"};export const Default=()=>t`
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`
2
15
  <sp-thumbnail>
3
- <img src=${e} alt="Woman crouching" />
16
+ <img src=${thumbnail} alt="Woman crouching" />
4
17
  </sp-thumbnail>
5
- `,selected=()=>t`
18
+ `;
19
+ };
20
+ export const selected = () => {
21
+ return html`
6
22
  <sp-thumbnail selected>
7
- <img src=${e} alt="Woman crouching" />
23
+ <img src=${thumbnail} alt="Woman crouching" />
8
24
  </sp-thumbnail>
9
- `,focused=()=>t`
25
+ `;
26
+ };
27
+ export const focused = () => {
28
+ return html`
10
29
  <sp-thumbnail focused>
11
- <img src=${e} alt="Woman crouching" />
30
+ <img src=${thumbnail} alt="Woman crouching" />
12
31
  </sp-thumbnail>
13
- `,portrait=()=>t`
32
+ `;
33
+ };
34
+ export const portrait = () => {
35
+ return html`
14
36
  <sp-thumbnail>
15
- <img src=${n} alt="Eiffel Tower at night" />
37
+ <img src=${portraitImage} alt="Eiffel Tower at night" />
16
38
  </sp-thumbnail>
17
- `,landscape=()=>t`
39
+ `;
40
+ };
41
+ export const landscape = () => {
42
+ return html`
18
43
  <sp-thumbnail>
19
44
  <img
20
- src=${a}
45
+ src=${landscapeImage}
21
46
  alt="Landscape with mountains and lake"
22
47
  />
23
48
  </sp-thumbnail>
24
- `,portraitCover=()=>t`
49
+ `;
50
+ };
51
+ export const portraitCover = () => {
52
+ return html`
25
53
  <sp-thumbnail cover>
26
- <img src=${n} alt="Eiffel Tower at night" />
54
+ <img src=${portraitImage} alt="Eiffel Tower at night" />
27
55
  </sp-thumbnail>
28
- `,landscapeCover=()=>t`
56
+ `;
57
+ };
58
+ export const landscapeCover = () => {
59
+ return html`
29
60
  <sp-thumbnail cover>
30
61
  <img
31
- src=${a}
62
+ src=${landscapeImage}
32
63
  alt="Landscape with mountains and lake"
33
64
  />
34
65
  </sp-thumbnail>
35
- `,background=()=>t`
66
+ `;
67
+ };
68
+ export const background = () => {
69
+ return html`
36
70
  <sp-thumbnail background="orange">
37
- <img src=${e} alt="Woman crouching" />
71
+ <img src=${thumbnail} alt="Woman crouching" />
38
72
  </sp-thumbnail>
39
73
  `;
74
+ };
40
75
  //# sourceMappingURL=thumbnail.stories.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["thumbnail.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/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 selected = (): TemplateResult => {\n return html`\n <sp-thumbnail selected>\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 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 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,qDAEA,2DACA,qEAMA,cAAe,CACX,MAAO,YACP,UAAW,cACf,EAEO,YAAM,SAAU,IACZ;AAAA;AAAA,uBAEY;AAAA;AAAA,MAKV,SAAW,IACb;AAAA;AAAA,uBAEY;AAAA;AAAA,MAKV,QAAU,IACZ;AAAA;AAAA,uBAEY;AAAA;AAAA,MAKV,SAAW,IACb;AAAA;AAAA,uBAEY;AAAA;AAAA,MAKV,UAAY,IACd;AAAA;AAAA;AAAA,sBAGW;AAAA;AAAA;AAAA;AAAA,MAOT,cAAgB,IAClB;AAAA;AAAA,uBAEY;AAAA;AAAA,MAKV,eAAiB,IACnB;AAAA;AAAA;AAAA,sBAGW;AAAA;AAAA;AAAA;AAAA,MAOT,WAAa,IACf;AAAA;AAAA,uBAEY;AAAA;",
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;AAAA;AAAA;AAGvB;AAEO,aAAM,WAAW,MAAsB;AAC1C,SAAO;AAAA;AAAA,uBAEY;AAAA;AAAA;AAGvB;AAEO,aAAM,UAAU,MAAsB;AACzC,SAAO;AAAA;AAAA,uBAEY;AAAA;AAAA;AAGvB;AAEO,aAAM,WAAW,MAAsB;AAC1C,SAAO;AAAA;AAAA,uBAEY;AAAA;AAAA;AAGvB;AAEO,aAAM,YAAY,MAAsB;AAC3C,SAAO;AAAA;AAAA;AAAA,sBAGW;AAAA;AAAA;AAAA;AAAA;AAKtB;AAEO,aAAM,gBAAgB,MAAsB;AAC/C,SAAO;AAAA;AAAA,uBAEY;AAAA;AAAA;AAGvB;AAEO,aAAM,iBAAiB,MAAsB;AAChD,SAAO;AAAA;AAAA;AAAA,sBAGW;AAAA;AAAA;AAAA;AAAA;AAKtB;AAEO,aAAM,aAAa,MAAsB;AAC5C,SAAO;AAAA;AAAA,uBAEY;AAAA;AAAA;AAGvB;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,11 @@
1
- import"@spectrum-web-components/thumbnail/sp-thumbnail.js";import{html as m}from"lit";import{measureFixtureCreation as r}from"../../../../test/benchmark/helpers.js";import{thumbnail as i}from"../../stories/images.js";r(m`
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`
2
7
  <sp-thumbnail>
3
- <img src=${i} alt="Woman crouching" />
8
+ <img src=${thumbnail} alt="Woman crouching" />
4
9
  </sp-thumbnail>
5
10
  `);
6
11
  //# sourceMappingURL=basic-test.js.map
@@ -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/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,2DACA,2BACA,+EACA,oDAEA,EAAuB;AAAA;AAAA,mBAEJ;AAAA;AAAA,CAElB",
5
+ "mappings": ";AAYA,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AACvC,SAAS,iBAAiB;AAE1B,uBAAuB;AAAA;AAAA,mBAEJ;AAAA;AAAA,CAElB;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,5 @@
1
- import*as s from"../stories/thumbnail-sizes.stories.js";import{regressVisuals as r}from"../../../test/visual/test.js";r("ThumbnailSizesStories",s);
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);
2
5
  //# sourceMappingURL=thumbnail-sizes.test-vrt.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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';\n\nregressVisuals('ThumbnailSizesStories', stories);\n"],
5
- "mappings": "AAYA,wDACA,8DAEA,EAAe,wBAAyB,CAAO",
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
6
  "names": []
7
7
  }
@@ -1,2 +1,5 @@
1
- import*as r from"../stories/thumbnail.stories.js";import{regressVisuals as s}from"../../../test/visual/test.js";s("ThumbnailStories",r);
1
+ "use strict";
2
+ import * as stories from "../stories/thumbnail.stories.js";
3
+ import { regressVisuals } from "../../../test/visual/test.js";
4
+ regressVisuals("ThumbnailStories", stories);
2
5
  //# sourceMappingURL=thumbnail.test-vrt.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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';\n\nregressVisuals('ThumbnailStories', stories);\n"],
5
- "mappings": "AAYA,kDACA,8DAEA,EAAe,mBAAoB,CAAO",
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
6
  "names": []
7
7
  }
@@ -1,18 +1,50 @@
1
- import{elementUpdated as l,expect as s,fixture as t,html as i}from"@open-wc/testing";import"../sp-thumbnail.js";import{thumbnail as n}from"../stories/images.js";import{testForLitDevWarnings as o}from"../../../test/testing-helpers.js";describe("Thumbnail",()=>{o(async()=>await t(i`
1
+ "use strict";
2
+ import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
3
+ import "../sp-thumbnail.js";
4
+ import { thumbnail } from "../stories/images.js";
5
+ import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
6
+ describe("Thumbnail", () => {
7
+ testForLitDevWarnings(
8
+ async () => await fixture(
9
+ html`
2
10
  <sp-thumbnail>
3
- <img src=${n} alt="Woman crouching" />
11
+ <img src=${thumbnail} alt="Woman crouching" />
4
12
  </sp-thumbnail>
5
- `)),it("loads default thumbnail accessibly",async()=>{const a=await t(i`
13
+ `
14
+ )
15
+ );
16
+ it("loads default thumbnail accessibly", async () => {
17
+ const el = await fixture(
18
+ html`
6
19
  <sp-thumbnail>
7
- <img src=${n} alt="Woman crouching" />
20
+ <img src=${thumbnail} alt="Woman crouching" />
8
21
  </sp-thumbnail>
9
- `);await l(a),await s(a).to.be.accessible()}),it("can be size `xxs`",async()=>{const a=await t(i`
22
+ `
23
+ );
24
+ await elementUpdated(el);
25
+ await expect(el).to.be.accessible();
26
+ });
27
+ it("can be size `xxs`", async () => {
28
+ const el = await fixture(
29
+ html`
10
30
  <sp-thumbnail size="xxs">
11
- <img src=${n} alt="Woman crouching" />
31
+ <img src=${thumbnail} alt="Woman crouching" />
12
32
  </sp-thumbnail>
13
- `);await l(a),s(a.size).to.equal("xxs")}),it("accepts `background`",async()=>{const m=(await t(i`
33
+ `
34
+ );
35
+ await elementUpdated(el);
36
+ expect(el.size).to.equal("xxs");
37
+ });
38
+ it("accepts `background`", async () => {
39
+ const el = await fixture(
40
+ html`
14
41
  <sp-thumbnail background="blue">
15
- <img src=${n} alt="Woman crouching" />
42
+ <img src=${thumbnail} alt="Woman crouching" />
16
43
  </sp-thumbnail>
17
- `)).shadowRoot.querySelector(".background");s(m).to.not.be.null})});
44
+ `
45
+ );
46
+ const background = el.shadowRoot.querySelector(".background");
47
+ expect(background).to.not.be.null;
48
+ });
49
+ });
18
50
  //# sourceMappingURL=thumbnail.test.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["thumbnail.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 '../sp-thumbnail.js';\nimport { Thumbnail } from '..';\nimport { thumbnail } from '../stories/images.js';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('Thumbnail', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Thumbnail>(\n html`\n <sp-thumbnail>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `\n )\n );\n it('loads default thumbnail accessibly', async () => {\n const el = await fixture<Thumbnail>(\n html`\n <sp-thumbnail>\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('can be size `xxs`', async () => {\n const el = await fixture<Thumbnail>(\n html`\n <sp-thumbnail size=\"xxs\">\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.size).to.equal('xxs');\n });\n it('accepts `background`', async () => {\n const el = await fixture<Thumbnail>(\n html`\n <sp-thumbnail background=\"blue\">\n <img src=${thumbnail} alt=\"Woman crouching\" />\n </sp-thumbnail>\n `\n );\n\n const background = el.shadowRoot.querySelector('.background');\n expect(background).to.not.be.null;\n });\n});\n"],
5
- "mappings": "AAYA,qFAEA,2BAEA,iDACA,yEAEA,SAAS,YAAa,IAAM,CACxB,EACI,SACI,KAAM,GACF;AAAA;AAAA,mCAEmB;AAAA;AAAA,iBAGvB,CACR,EACA,GAAG,qCAAsC,SAAY,CACjD,KAAM,GAAK,KAAM,GACb;AAAA;AAAA,+BAEmB;AAAA;AAAA,aAGvB,EAEA,KAAM,GAAe,CAAE,EAEvB,KAAM,GAAO,CAAE,EAAE,GAAG,GAAG,WAAW,CACtC,CAAC,EACD,GAAG,oBAAqB,SAAY,CAChC,KAAM,GAAK,KAAM,GACb;AAAA;AAAA,+BAEmB;AAAA;AAAA,aAGvB,EAEA,KAAM,GAAe,CAAE,EAEvB,EAAO,EAAG,IAAI,EAAE,GAAG,MAAM,KAAK,CAClC,CAAC,EACD,GAAG,uBAAwB,SAAY,CASnC,KAAM,GAAa,AARR,MAAM,GACb;AAAA;AAAA,+BAEmB;AAAA;AAAA,aAGvB,GAEsB,WAAW,cAAc,aAAa,EAC5D,EAAO,CAAU,EAAE,GAAG,IAAI,GAAG,IACjC,CAAC,CACL,CAAC",
5
+ "mappings": ";AAYA,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AAEtD,OAAO;AAEP,SAAS,iBAAiB;AAC1B,SAAS,6BAA6B;AAEtC,SAAS,aAAa,MAAM;AACxB;AAAA,IACI,YACI,MAAM;AAAA,MACF;AAAA;AAAA,mCAEmB;AAAA;AAAA;AAAA,IAGvB;AAAA,EACR;AACA,KAAG,sCAAsC,YAAY;AACjD,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA,+BAEmB;AAAA;AAAA;AAAA,IAGvB;AAEA,UAAM,eAAe,EAAE;AAEvB,UAAM,OAAO,EAAE,EAAE,GAAG,GAAG,WAAW;AAAA,EACtC,CAAC;AACD,KAAG,qBAAqB,YAAY;AAChC,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA,+BAEmB;AAAA;AAAA;AAAA,IAGvB;AAEA,UAAM,eAAe,EAAE;AAEvB,WAAO,GAAG,IAAI,EAAE,GAAG,MAAM,KAAK;AAAA,EAClC,CAAC;AACD,KAAG,wBAAwB,YAAY;AACnC,UAAM,KAAK,MAAM;AAAA,MACb;AAAA;AAAA,+BAEmB;AAAA;AAAA;AAAA,IAGvB;AAEA,UAAM,aAAa,GAAG,WAAW,cAAc,aAAa;AAC5D,WAAO,UAAU,EAAE,GAAG,IAAI,GAAG;AAAA,EACjC,CAAC;AACL,CAAC;",
6
6
  "names": []
7
7
  }