@vaadin/avatar 25.0.0-beta4 → 25.0.0-beta5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/avatar",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-beta5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/tooltip": "25.0.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.0.0-beta5",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-beta5",
|
|
40
|
+
"@vaadin/tooltip": "25.0.0-beta5",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-beta5",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
46
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
45
|
+
"@vaadin/chai-plugins": "25.0.0-beta5",
|
|
46
|
+
"@vaadin/test-runner-commands": "25.0.0-beta5",
|
|
47
47
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-beta5",
|
|
49
49
|
"sinon": "^21.0.0"
|
|
50
50
|
},
|
|
51
51
|
"web-types": [
|
|
52
52
|
"web-types.json",
|
|
53
53
|
"web-types.lit.json"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "ba59e1404cc4bef2dd685476247f758eb28c9922"
|
|
56
56
|
}
|
|
@@ -35,9 +35,10 @@ export const avatarStyles = css`
|
|
|
35
35
|
:host::before {
|
|
36
36
|
position: absolute;
|
|
37
37
|
content: '';
|
|
38
|
-
inset:
|
|
38
|
+
inset: calc(var(--vaadin-focus-ring-width) * -1);
|
|
39
39
|
border-radius: inherit;
|
|
40
|
-
|
|
40
|
+
outline: var(--vaadin-avatar-border-width, 1px) solid var(--vaadin-avatar-border-color, transparent);
|
|
41
|
+
outline-offset: calc((var(--vaadin-focus-ring-width) + var(--vaadin-avatar-border-width, 1px)) * -1);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
:host([role='button']) {
|
|
@@ -71,9 +72,6 @@ export const avatarStyles = css`
|
|
|
71
72
|
color: oklch(
|
|
72
73
|
from var(--vaadin-avatar-user-color) clamp(0, (0.62 - l) * 1000, 1) 0 0 / clamp(0.8, (0.62 - l) * 1000, 1)
|
|
73
74
|
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host([has-color-index])::before {
|
|
77
75
|
--vaadin-avatar-border-width: 2px;
|
|
78
76
|
--vaadin-avatar-border-color: var(--vaadin-avatar-user-color);
|
|
79
77
|
}
|
package/src/vaadin-avatar.d.ts
CHANGED
|
@@ -18,13 +18,25 @@ export { AvatarI18n } from './vaadin-avatar-mixin.js';
|
|
|
18
18
|
*
|
|
19
19
|
* ### Styling
|
|
20
20
|
*
|
|
21
|
-
* The following shadow DOM parts are
|
|
21
|
+
* The following shadow DOM parts are available for styling:
|
|
22
22
|
*
|
|
23
23
|
* Part name | Description
|
|
24
24
|
* --------- | ---------------
|
|
25
25
|
* `abbr` | The abbreviation element
|
|
26
26
|
* `icon` | The icon element
|
|
27
27
|
*
|
|
28
|
+
* The following custom CSS properties are available for styling:
|
|
29
|
+
*
|
|
30
|
+
* Custom CSS property | Description
|
|
31
|
+
* -------------------------------|-------------
|
|
32
|
+
* `--vaadin-avatar-background` | Background color of the avatar
|
|
33
|
+
* `--vaadin-avatar-border-color` | Border color of the avatar
|
|
34
|
+
* `--vaadin-avatar-border-width` | Border width of the avatar
|
|
35
|
+
* `--vaadin-avatar-font-size` | Font size of the avatar
|
|
36
|
+
* `--vaadin-avatar-font-weight` | Font weight of the avatar
|
|
37
|
+
* `--vaadin-avatar-size` | Size of the avatar
|
|
38
|
+
* `--vaadin-avatar-text-color` | Text color of the avatar
|
|
39
|
+
*
|
|
28
40
|
* The following state attributes are available for styling:
|
|
29
41
|
*
|
|
30
42
|
* Attribute | Description
|
package/src/vaadin-avatar.js
CHANGED
|
@@ -24,13 +24,25 @@ import { AvatarMixin } from './vaadin-avatar-mixin.js';
|
|
|
24
24
|
*
|
|
25
25
|
* ### Styling
|
|
26
26
|
*
|
|
27
|
-
* The following shadow DOM parts are
|
|
27
|
+
* The following shadow DOM parts are available for styling:
|
|
28
28
|
*
|
|
29
29
|
* Part name | Description
|
|
30
30
|
* --------- | ---------------
|
|
31
31
|
* `abbr` | The abbreviation element
|
|
32
32
|
* `icon` | The icon element
|
|
33
33
|
*
|
|
34
|
+
* The following custom CSS properties are available for styling:
|
|
35
|
+
*
|
|
36
|
+
* Custom CSS property | Description
|
|
37
|
+
* -------------------------------|-------------
|
|
38
|
+
* `--vaadin-avatar-background` | Background color of the avatar
|
|
39
|
+
* `--vaadin-avatar-border-color` | Border color of the avatar
|
|
40
|
+
* `--vaadin-avatar-border-width` | Border width of the avatar
|
|
41
|
+
* `--vaadin-avatar-font-size` | Font size of the avatar
|
|
42
|
+
* `--vaadin-avatar-font-weight` | Font weight of the avatar
|
|
43
|
+
* `--vaadin-avatar-size` | Size of the avatar
|
|
44
|
+
* `--vaadin-avatar-text-color` | Text color of the avatar
|
|
45
|
+
*
|
|
34
46
|
* The following state attributes are available for styling:
|
|
35
47
|
*
|
|
36
48
|
* Attribute | Description
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/avatar",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-beta5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-avatar",
|
|
11
|
-
"description": "`<vaadin-avatar>` is a Web Component providing avatar displaying functionality.\n\n```html\n<vaadin-avatar img=\"avatars/avatar-1.jpg\"></vaadin-avatar>\n```\n\n### Styling\n\nThe following shadow DOM parts are
|
|
11
|
+
"description": "`<vaadin-avatar>` is a Web Component providing avatar displaying functionality.\n\n```html\n<vaadin-avatar img=\"avatars/avatar-1.jpg\"></vaadin-avatar>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n--------- | ---------------\n`abbr` | The abbreviation element\n`icon` | The icon element\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property | Description\n-------------------------------|-------------\n`--vaadin-avatar-background` | Background color of the avatar\n`--vaadin-avatar-border-color` | Border color of the avatar\n`--vaadin-avatar-border-width` | Border width of the avatar\n`--vaadin-avatar-font-size` | Font size of the avatar\n`--vaadin-avatar-font-weight` | Font weight of the avatar\n`--vaadin-avatar-size` | Size of the avatar\n`--vaadin-avatar-text-color` | Text color of the avatar\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n------------------|-------------\n`focus-ring` | Set when the avatar is focused using the keyboard.\n`focused` | Set when the avatar is focused.\n`has-color-index` | Set when the avatar has `colorIndex` and the corresponding custom CSS property exists.\n`has-tooltip` | Set when the element has a slotted tooltip.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "img",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/avatar",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-beta5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-avatar",
|
|
19
|
-
"description": "`<vaadin-avatar>` is a Web Component providing avatar displaying functionality.\n\n```html\n<vaadin-avatar img=\"avatars/avatar-1.jpg\"></vaadin-avatar>\n```\n\n### Styling\n\nThe following shadow DOM parts are
|
|
19
|
+
"description": "`<vaadin-avatar>` is a Web Component providing avatar displaying functionality.\n\n```html\n<vaadin-avatar img=\"avatars/avatar-1.jpg\"></vaadin-avatar>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n--------- | ---------------\n`abbr` | The abbreviation element\n`icon` | The icon element\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property | Description\n-------------------------------|-------------\n`--vaadin-avatar-background` | Background color of the avatar\n`--vaadin-avatar-border-color` | Border color of the avatar\n`--vaadin-avatar-border-width` | Border width of the avatar\n`--vaadin-avatar-font-size` | Font size of the avatar\n`--vaadin-avatar-font-weight` | Font weight of the avatar\n`--vaadin-avatar-size` | Size of the avatar\n`--vaadin-avatar-text-color` | Text color of the avatar\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n------------------|-------------\n`focus-ring` | Set when the avatar is focused using the keyboard.\n`focused` | Set when the avatar is focused.\n`has-color-index` | Set when the avatar has `colorIndex` and the corresponding custom CSS property exists.\n`has-tooltip` | Set when the element has a slotted tooltip.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|