@spectrum-web-components/avatar 0.37.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,8 +33,8 @@ import { Avatar } from '@spectrum-web-components/avatar';
33
33
  ```html demo
34
34
  <sp-avatar
35
35
  size="50"
36
- label="Dog the User"
37
- src="https://place.dog/500/500"
36
+ label="Demo User"
37
+ src="https://picsum.photos/500/500"
38
38
  ></sp-avatar>
39
39
  ```
40
40
 
@@ -45,8 +45,8 @@ import { Avatar } from '@spectrum-web-components/avatar';
45
45
  ```html demo
46
46
  <sp-avatar
47
47
  size="75"
48
- label="Dog the User"
49
- src="https://place.dog/500/500"
48
+ label="Demo User"
49
+ src="https://picsum.photos/500/500"
50
50
  ></sp-avatar>
51
51
  ```
52
52
 
@@ -57,8 +57,8 @@ import { Avatar } from '@spectrum-web-components/avatar';
57
57
  ```html demo
58
58
  <sp-avatar
59
59
  size="100"
60
- label="Dog the User"
61
- src="https://place.dog/500/500"
60
+ label="Demo User"
61
+ src="https://picsum.photos/500/500"
62
62
  ></sp-avatar>
63
63
  ```
64
64
 
@@ -69,8 +69,8 @@ import { Avatar } from '@spectrum-web-components/avatar';
69
69
  ```html demo
70
70
  <sp-avatar
71
71
  size="200"
72
- label="Dog the User"
73
- src="https://place.dog/500/500"
72
+ label="Demo User"
73
+ src="https://picsum.photos/500/500"
74
74
  ></sp-avatar>
75
75
  ```
76
76
 
@@ -81,8 +81,8 @@ import { Avatar } from '@spectrum-web-components/avatar';
81
81
  ```html demo
82
82
  <sp-avatar
83
83
  size="300"
84
- label="Dog the User"
85
- src="https://place.dog/500/500"
84
+ label="Demo User"
85
+ src="https://picsum.photos/500/500"
86
86
  ></sp-avatar>
87
87
  ```
88
88
 
@@ -93,8 +93,8 @@ import { Avatar } from '@spectrum-web-components/avatar';
93
93
  ```html demo
94
94
  <sp-avatar
95
95
  size="400"
96
- label="Dog the User"
97
- src="https://place.dog/500/500"
96
+ label="Demo User"
97
+ src="https://picsum.photos/500/500"
98
98
  ></sp-avatar>
99
99
  ```
100
100
 
@@ -105,8 +105,8 @@ import { Avatar } from '@spectrum-web-components/avatar';
105
105
  ```html demo
106
106
  <sp-avatar
107
107
  size="500"
108
- label="Dog the User"
109
- src="https://place.dog/500/500"
108
+ label="Demo User"
109
+ src="https://picsum.photos/500/500"
110
110
  ></sp-avatar>
111
111
  ```
112
112
 
@@ -117,8 +117,8 @@ import { Avatar } from '@spectrum-web-components/avatar';
117
117
  ```html demo
118
118
  <sp-avatar
119
119
  size="600"
120
- label="Dog the User"
121
- src="https://place.dog/500/500"
120
+ label="Demo User"
121
+ src="https://picsum.photos/500/500"
122
122
  ></sp-avatar>
123
123
  ```
124
124
 
@@ -129,8 +129,8 @@ import { Avatar } from '@spectrum-web-components/avatar';
129
129
  ```html demo
130
130
  <sp-avatar
131
131
  size="700"
132
- label="Dog the User"
133
- src="https://place.dog/500/500"
132
+ label="Demo User"
133
+ src="https://picsum.photos/500/500"
134
134
  ></sp-avatar>
135
135
  ```
136
136
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/avatar",
3
- "version": "0.37.0",
3
+ "version": "0.39.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -57,11 +57,11 @@
57
57
  "lit-html"
58
58
  ],
59
59
  "dependencies": {
60
- "@spectrum-web-components/base": "^0.37.0",
61
- "@spectrum-web-components/shared": "^0.37.0"
60
+ "@spectrum-web-components/base": "^0.39.0",
61
+ "@spectrum-web-components/shared": "^0.39.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@spectrum-css/avatar": "^6.0.44"
64
+ "@spectrum-css/avatar": "^6.0.52"
65
65
  },
66
66
  "types": "./src/index.d.ts",
67
67
  "customElements": "custom-elements.json",
@@ -69,5 +69,5 @@
69
69
  "./sp-*.js",
70
70
  "./**/*.dev.js"
71
71
  ],
72
- "gitHead": "d771f62f0d8063070af43283bb0fd5e3400bad06"
72
+ "gitHead": "2acc8390ef0ac6cc940958d4da705c9859155c0d"
73
73
  }
@@ -8,7 +8,7 @@ describe("Avatar", () => {
8
8
  html`
9
9
  <sp-avatar
10
10
  label="Shantanu Narayen"
11
- src="https://place.dog/500/500"
11
+ src="https://picsum.photos/500/500"
12
12
  ></sp-avatar>
13
13
  `
14
14
  )
@@ -18,7 +18,7 @@ describe("Avatar", () => {
18
18
  html`
19
19
  <sp-avatar
20
20
  label="Shantanu Narayen"
21
- src="https://place.dog/500/500"
21
+ src="https://picsum.photos/500/500"
22
22
  ></sp-avatar>
23
23
  `
24
24
  );
@@ -30,7 +30,7 @@ describe("Avatar", () => {
30
30
  html`
31
31
  <sp-avatar
32
32
  label="Shantanu Narayen"
33
- src="https://place.dog/500/500"
33
+ src="https://picsum.photos/500/500"
34
34
  ></sp-avatar>
35
35
  `
36
36
  );
@@ -45,7 +45,7 @@ describe("Avatar", () => {
45
45
  html`
46
46
  <sp-avatar
47
47
  label="Shantanu Narayen"
48
- src="https://place.dog/500/500"
48
+ src="https://picsum.photos/500/500"
49
49
  ></sp-avatar>
50
50
  `
51
51
  );
@@ -58,7 +58,7 @@ describe("Avatar", () => {
58
58
  it("loads with no label", async () => {
59
59
  const el = await fixture(
60
60
  html`
61
- <sp-avatar src="https://place.dog/500/500"></sp-avatar>
61
+ <sp-avatar src="https://picsum.photos/500/500"></sp-avatar>
62
62
  `
63
63
  );
64
64
  await elementUpdated(el);
@@ -72,7 +72,7 @@ describe("Avatar", () => {
72
72
  html`
73
73
  <sp-avatar
74
74
  label="Shantanu Narayen"
75
- src="https://place.dog/500/500"
75
+ src="https://picsum.photos/500/500"
76
76
  tabindex="0"
77
77
  ></sp-avatar>
78
78
  `
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["avatar.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\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport '@spectrum-web-components/avatar/sp-avatar.js';\nimport { Avatar } from '@spectrum-web-components/avatar';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers';\n\ndescribe('Avatar', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://place.dog/500/500\"\n ></sp-avatar>\n `\n )\n );\n it('loads accessibly', async () => {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://place.dog/500/500\"\n ></sp-avatar>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('validates `size`', async () => {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://place.dog/500/500\"\n ></sp-avatar>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.size).to.equal(100);\n\n el.setAttribute('size', '55');\n\n await elementUpdated(el);\n\n expect(el.size).to.equal(100);\n });\n it('loads with everything set', async () => {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://place.dog/500/500\"\n ></sp-avatar>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n const imageEl = el.shadowRoot\n ? (el.shadowRoot.querySelector('img') as HTMLImageElement)\n : (el.querySelector('img') as HTMLImageElement);\n expect(imageEl.hasAttribute('alt')).to.be.true;\n expect(imageEl.getAttribute('alt')).to.equal('Shantanu Narayen');\n });\n it('loads with no label', async () => {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar src=\"https://place.dog/500/500\"></sp-avatar>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n const imageEl = el.shadowRoot\n ? (el.shadowRoot.querySelector('img') as HTMLImageElement)\n : (el.querySelector('img') as HTMLImageElement);\n expect(imageEl.hasAttribute('alt')).to.be.false;\n });\n it('can receive a `tabindex` without an `href`', async () => {\n try {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://place.dog/500/500\"\n tabindex=\"0\"\n ></sp-avatar>\n `\n );\n await elementUpdated(el);\n const focusEl = el.focusElement;\n expect(focusEl).to.exist;\n } catch (error) {\n expect(() => {\n throw error;\n }).to.throw('There should be no error.');\n }\n });\n});\n"],
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\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport '@spectrum-web-components/avatar/sp-avatar.js';\nimport { Avatar } from '@spectrum-web-components/avatar';\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers';\n\ndescribe('Avatar', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://picsum.photos/500/500\"\n ></sp-avatar>\n `\n )\n );\n it('loads accessibly', async () => {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://picsum.photos/500/500\"\n ></sp-avatar>\n `\n );\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n });\n it('validates `size`', async () => {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://picsum.photos/500/500\"\n ></sp-avatar>\n `\n );\n\n await elementUpdated(el);\n\n expect(el.size).to.equal(100);\n\n el.setAttribute('size', '55');\n\n await elementUpdated(el);\n\n expect(el.size).to.equal(100);\n });\n it('loads with everything set', async () => {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://picsum.photos/500/500\"\n ></sp-avatar>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n const imageEl = el.shadowRoot\n ? (el.shadowRoot.querySelector('img') as HTMLImageElement)\n : (el.querySelector('img') as HTMLImageElement);\n expect(imageEl.hasAttribute('alt')).to.be.true;\n expect(imageEl.getAttribute('alt')).to.equal('Shantanu Narayen');\n });\n it('loads with no label', async () => {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar src=\"https://picsum.photos/500/500\"></sp-avatar>\n `\n );\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n const imageEl = el.shadowRoot\n ? (el.shadowRoot.querySelector('img') as HTMLImageElement)\n : (el.querySelector('img') as HTMLImageElement);\n expect(imageEl.hasAttribute('alt')).to.be.false;\n });\n it('can receive a `tabindex` without an `href`', async () => {\n try {\n const el = await fixture<Avatar>(\n html`\n <sp-avatar\n label=\"Shantanu Narayen\"\n src=\"https://picsum.photos/500/500\"\n tabindex=\"0\"\n ></sp-avatar>\n `\n );\n await elementUpdated(el);\n const focusEl = el.focusElement;\n expect(focusEl).to.exist;\n } catch (error) {\n expect(() => {\n throw error;\n }).to.throw('There should be no error.');\n }\n });\n});\n"],
5
5
  "mappings": ";AAUA,OAAO;AAEP,SAAS,gBAAgB,QAAQ,SAAS,YAAY;AACtD,SAAS,6BAA6B;AAEtC,SAAS,UAAU,MAAM;AACrB;AAAA,IACI,YACI,MAAM;AAAA,MACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMJ;AAAA,EACR;AACA,KAAG,oBAAoB,Y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