@vaadin/avatar 25.1.2 → 25.2.0-alpha10
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 +10 -10
- package/src/styles/vaadin-avatar-base-styles.js +0 -1
- package/src/vaadin-avatar-mixin.js +1 -1
- package/web-types.json +12 -32
- package/web-types.lit.json +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/avatar",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.2.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
39
|
-
"@vaadin/a11y-base": "
|
|
40
|
-
"@vaadin/component-base": "
|
|
41
|
-
"@vaadin/tooltip": "
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
39
|
+
"@vaadin/a11y-base": "25.2.0-alpha10",
|
|
40
|
+
"@vaadin/component-base": "25.2.0-alpha10",
|
|
41
|
+
"@vaadin/tooltip": "25.2.0-alpha10",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-alpha10",
|
|
43
43
|
"lit": "^3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@vaadin/aura": "
|
|
47
|
-
"@vaadin/chai-plugins": "
|
|
48
|
-
"@vaadin/test-runner-commands": "
|
|
46
|
+
"@vaadin/aura": "25.2.0-alpha10",
|
|
47
|
+
"@vaadin/chai-plugins": "25.2.0-alpha10",
|
|
48
|
+
"@vaadin/test-runner-commands": "25.2.0-alpha10",
|
|
49
49
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-alpha10",
|
|
51
51
|
"sinon": "^21.0.2"
|
|
52
52
|
},
|
|
53
53
|
"customElements": "custom-elements.json",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "1303b6a3eeecb44a9d26f2b53cb56d9e906febdf"
|
|
59
59
|
}
|
|
@@ -12,7 +12,6 @@ export const avatarStyles = css`
|
|
|
12
12
|
display: inline-block;
|
|
13
13
|
flex: none;
|
|
14
14
|
border-radius: 50%;
|
|
15
|
-
cursor: default;
|
|
16
15
|
color: var(--vaadin-avatar-text-color, var(--vaadin-text-color-secondary));
|
|
17
16
|
overflow: hidden;
|
|
18
17
|
--_size: var(--vaadin-avatar-size, calc(1lh + var(--vaadin-padding-block-container) * 2));
|
|
@@ -203,7 +203,7 @@ export const AvatarMixin = (superClass) =>
|
|
|
203
203
|
|
|
204
204
|
/** @private */
|
|
205
205
|
__i18nChanged(effectiveI18n) {
|
|
206
|
-
if (effectiveI18n
|
|
206
|
+
if (effectiveI18n?.anonymous) {
|
|
207
207
|
if (this.__oldAnonymous && this.__tooltipNode && this.__tooltipNode.text === this.__oldAnonymous) {
|
|
208
208
|
this.__setTooltip();
|
|
209
209
|
}
|
package/web-types.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.
|
|
4
|
+
"version": "25.2.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
"description": "A shortened form of name that is displayed\nin the avatar when `img` is not provided.",
|
|
16
16
|
"value": {
|
|
17
17
|
"type": [
|
|
18
|
-
"string"
|
|
19
|
-
"null",
|
|
20
|
-
"undefined"
|
|
18
|
+
"string"
|
|
21
19
|
]
|
|
22
20
|
}
|
|
23
21
|
},
|
|
@@ -26,9 +24,7 @@
|
|
|
26
24
|
"description": "Color index used for avatar background.",
|
|
27
25
|
"value": {
|
|
28
26
|
"type": [
|
|
29
|
-
"number"
|
|
30
|
-
"null",
|
|
31
|
-
"undefined"
|
|
27
|
+
"number"
|
|
32
28
|
]
|
|
33
29
|
}
|
|
34
30
|
},
|
|
@@ -37,9 +33,7 @@
|
|
|
37
33
|
"description": "The path to the image",
|
|
38
34
|
"value": {
|
|
39
35
|
"type": [
|
|
40
|
-
"string"
|
|
41
|
-
"null",
|
|
42
|
-
"undefined"
|
|
36
|
+
"string"
|
|
43
37
|
]
|
|
44
38
|
}
|
|
45
39
|
},
|
|
@@ -48,9 +42,7 @@
|
|
|
48
42
|
"description": "Full name of the user\nused for the tooltip of the avatar.",
|
|
49
43
|
"value": {
|
|
50
44
|
"type": [
|
|
51
|
-
"string"
|
|
52
|
-
"null",
|
|
53
|
-
"undefined"
|
|
45
|
+
"string"
|
|
54
46
|
]
|
|
55
47
|
}
|
|
56
48
|
},
|
|
@@ -70,9 +62,7 @@
|
|
|
70
62
|
"description": "When true, the avatar has tooltip shown on hover and focus.\nThe tooltip text is based on the `name` and `abbr` properties.\nWhen neither is provided, `i18n.anonymous` is used instead.",
|
|
71
63
|
"value": {
|
|
72
64
|
"type": [
|
|
73
|
-
"boolean"
|
|
74
|
-
"null",
|
|
75
|
-
"undefined"
|
|
65
|
+
"boolean"
|
|
76
66
|
]
|
|
77
67
|
}
|
|
78
68
|
}
|
|
@@ -84,9 +74,7 @@
|
|
|
84
74
|
"description": "A shortened form of name that is displayed\nin the avatar when `img` is not provided.",
|
|
85
75
|
"value": {
|
|
86
76
|
"type": [
|
|
87
|
-
"string"
|
|
88
|
-
"null",
|
|
89
|
-
"undefined"
|
|
77
|
+
"string"
|
|
90
78
|
]
|
|
91
79
|
}
|
|
92
80
|
},
|
|
@@ -95,9 +83,7 @@
|
|
|
95
83
|
"description": "Color index used for avatar background.",
|
|
96
84
|
"value": {
|
|
97
85
|
"type": [
|
|
98
|
-
"number"
|
|
99
|
-
"null",
|
|
100
|
-
"undefined"
|
|
86
|
+
"number"
|
|
101
87
|
]
|
|
102
88
|
}
|
|
103
89
|
},
|
|
@@ -106,7 +92,7 @@
|
|
|
106
92
|
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```js\n{\n // Translation of the anonymous user avatar tooltip.\n anonymous: 'anonymous'\n}\n```",
|
|
107
93
|
"value": {
|
|
108
94
|
"type": [
|
|
109
|
-
"
|
|
95
|
+
"Object"
|
|
110
96
|
]
|
|
111
97
|
}
|
|
112
98
|
},
|
|
@@ -115,9 +101,7 @@
|
|
|
115
101
|
"description": "The path to the image",
|
|
116
102
|
"value": {
|
|
117
103
|
"type": [
|
|
118
|
-
"string"
|
|
119
|
-
"null",
|
|
120
|
-
"undefined"
|
|
104
|
+
"string"
|
|
121
105
|
]
|
|
122
106
|
}
|
|
123
107
|
},
|
|
@@ -126,9 +110,7 @@
|
|
|
126
110
|
"description": "Full name of the user\nused for the tooltip of the avatar.",
|
|
127
111
|
"value": {
|
|
128
112
|
"type": [
|
|
129
|
-
"string"
|
|
130
|
-
"null",
|
|
131
|
-
"undefined"
|
|
113
|
+
"string"
|
|
132
114
|
]
|
|
133
115
|
}
|
|
134
116
|
},
|
|
@@ -137,9 +119,7 @@
|
|
|
137
119
|
"description": "When true, the avatar has tooltip shown on hover and focus.\nThe tooltip text is based on the `name` and `abbr` properties.\nWhen neither is provided, `i18n.anonymous` is used instead.",
|
|
138
120
|
"value": {
|
|
139
121
|
"type": [
|
|
140
|
-
"boolean"
|
|
141
|
-
"null",
|
|
142
|
-
"undefined"
|
|
122
|
+
"boolean"
|
|
143
123
|
]
|
|
144
124
|
}
|
|
145
125
|
}
|
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.
|
|
4
|
+
"version": "25.2.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -19,13 +19,6 @@
|
|
|
19
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
|
-
{
|
|
23
|
-
"name": "?withTooltip",
|
|
24
|
-
"description": "When true, the avatar has tooltip shown on hover and focus.\nThe tooltip text is based on the `name` and `abbr` properties.\nWhen neither is provided, `i18n.anonymous` is used instead.",
|
|
25
|
-
"value": {
|
|
26
|
-
"kind": "expression"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
22
|
{
|
|
30
23
|
"name": ".abbr",
|
|
31
24
|
"description": "A shortened form of name that is displayed\nin the avatar when `img` is not provided.",
|
|
@@ -60,6 +53,13 @@
|
|
|
60
53
|
"value": {
|
|
61
54
|
"kind": "expression"
|
|
62
55
|
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "?withTooltip",
|
|
59
|
+
"description": "When true, the avatar has tooltip shown on hover and focus.\nThe tooltip text is based on the `name` and `abbr` properties.\nWhen neither is provided, `i18n.anonymous` is used instead.",
|
|
60
|
+
"value": {
|
|
61
|
+
"kind": "expression"
|
|
62
|
+
}
|
|
63
63
|
}
|
|
64
64
|
]
|
|
65
65
|
}
|