diff --git a/packages/main/src/Avatar.js b/packages/main/src/Avatar.js
index bb328732f70f..ef35fa0da4cd 100644
--- a/packages/main/src/Avatar.js
+++ b/packages/main/src/Avatar.js
@@ -16,7 +16,7 @@ import Icon from "./Icon.js";
import AvatarSize from "./types/AvatarSize.js";
import AvatarShape from "./types/AvatarShape.js";
import AvatarFitType from "./types/AvatarFitType.js";
-import AvatarBackgroundColor from "./types/AvatarBackgroundColor.js";
+import AvatarColorScheme from "./types/AvatarColorScheme.js";
/**
* @public
@@ -150,7 +150,7 @@ const metadata = {
},
/**
- * Defines the background color of the desired image.
+ * Defines the background color of the content.
*
* Available options are:
*
Accent10
Placeholder
AvatarBackgroundColor
values that correspond to the avatars in the ui5-avatar-group
.
+ * Returns an array containing the AvatarColorScheme
values that correspond to the avatars in the ui5-avatar-group
.
* @readonly
* @type { Array }
* @defaultValue []
@@ -498,9 +498,9 @@ class AvatarGroup extends UI5Element {
const colorIndex = this._getNextBackgroundColor();
avatar.interactive = !this._isGroup;
- if (!avatar.getAttribute("background-color")) {
+ if (!avatar.getAttribute("_color-scheme")) {
// AvatarGroup respects colors set to ui5-avatar
- avatar.setAttribute("_background-color", AvatarBackgroundColor[`Accent${colorIndex}`]);
+ avatar.setAttribute("_color-scheme", AvatarColorScheme[`Accent${colorIndex}`]);
}
if (!avatar.getAttribute("size")) {
diff --git a/packages/main/src/themes/Avatar.css b/packages/main/src/themes/Avatar.css
index c535595fe872..9505e8bac002 100644
--- a/packages/main/src/themes/Avatar.css
+++ b/packages/main/src/themes/Avatar.css
@@ -119,58 +119,58 @@
background-color: var(--ui5-avatar-accent6);
}
-:host([_background-color="Accent1"]),
-:host([background-color="Accent1"]) {
+:host([_color-scheme="Accent1"]),
+:host([color-scheme="Accent1"]) {
background-color: var(--ui5-avatar-accent1);
}
-:host([_background-color="Accent2"]),
-:host([background-color="Accent2"]) {
+:host([_color-scheme="Accent2"]),
+:host([color-scheme="Accent2"]) {
background-color: var(--ui5-avatar-accent2);
}
-:host([_background-color="Accent3"]),
-:host([background-color="Accent3"]) {
+:host([_color-scheme="Accent3"]),
+:host([color-scheme="Accent3"]) {
background-color: var(--ui5-avatar-accent3);
}
-:host([_background-color="Accent4"]),
-:host([background-color="Accent4"]) {
+:host([_color-scheme="Accent4"]),
+:host([color-scheme="Accent4"]) {
background-color: var(--ui5-avatar-accent4);
}
-:host([_background-color="Accent5"]),
-:host([background-color="Accent5"]) {
+:host([_color-scheme="Accent5"]),
+:host([color-scheme="Accent5"]) {
background-color: var(--ui5-avatar-accent5);
}
-:host([_background-color="Accent6"]),
-:host([background-color="Accent6"]) {
+:host([_color-scheme="Accent6"]),
+:host([color-scheme="Accent6"]) {
background-color: var(--ui5-avatar-accent6);
}
-:host([_background-color="Accent7"]),
-:host([background-color="Accent7"]) {
+:host([_color-scheme="Accent7"]),
+:host([color-scheme="Accent7"]) {
background-color: var(--ui5-avatar-accent7);
}
-:host([_background-color="Accent8"]),
-:host([background-color="Accent8"]) {
+:host([_color-scheme="Accent8"]),
+:host([color-scheme="Accent8"]) {
background-color: var(--ui5-avatar-accent8);
}
-:host([_background-color="Accent9"]),
-:host([background-color="Accent9"]) {
+:host([_color-scheme="Accent9"]),
+:host([color-scheme="Accent9"]) {
background-color: var(--ui5-avatar-accent9);
}
-:host([_background-color="Accent10"]),
-:host([background-color="Accent10"]) {
+:host([_color-scheme="Accent10"]),
+:host([color-scheme="Accent10"]) {
background-color: var(--ui5-avatar-accent10);
}
-:host([_background-color="Placeholder"]),
-:host([background-color="Placeholder"]) {
+:host([_color-scheme="Placeholder"]),
+:host([color-scheme="Placeholder"]) {
background-color: var(--ui5-avatar-placeholder);
}
diff --git a/packages/main/src/types/AvatarBackgroundColor.js b/packages/main/src/types/AvatarColorScheme.js
similarity index 67%
rename from packages/main/src/types/AvatarBackgroundColor.js
rename to packages/main/src/types/AvatarColorScheme.js
index 4a984982ee19..84052fe4c06a 100644
--- a/packages/main/src/types/AvatarBackgroundColor.js
+++ b/packages/main/src/types/AvatarColorScheme.js
@@ -1,11 +1,11 @@
import DataType from "@ui5/webcomponents-base/dist/types/DataType.js";
/**
- * Different types of AvatarBackgroundColor.
- * @lends sap.ui.webcomponents.main.types.AvatarBackgroundColor.prototype
+ * Different types of AvatarColorSchemes.
+ * @lends sap.ui.webcomponents.main.types.AvatarColorScheme.prototype
* @public
*/
-const AvatarBackGroundColors = {
+const AvatarColorSchemes = {
/**
*
* @public
@@ -86,19 +86,19 @@ const AvatarBackGroundColors = {
/**
* @class
- * Different types of AvatarBackgroundColor.
+ * Different types of AvatarColorScheme.
* @constructor
* @author SAP SE
- * @alias sap.ui.webcomponents.main.types.AvatarBackgroundColor
+ * @alias sap.ui.webcomponents.main.types.AvatarColorScheme
* @public
* @enum {string}
*/
-class AvatarBackgroundColor extends DataType {
+class AvatarColorScheme extends DataType {
static isValid(value) {
- return !!AvatarBackGroundColors[value];
+ return !!AvatarColorSchemes[value];
}
}
-AvatarBackgroundColor.generateTypeAccessors(AvatarBackGroundColors);
+AvatarColorScheme.generateTypeAccessors(AvatarColorSchemes);
-export default AvatarBackgroundColor;
+export default AvatarColorScheme;
diff --git a/packages/main/test/pages/Avatar.html b/packages/main/test/pages/Avatar.html
index e0e20e598cd9..3c644c6cc416 100644
--- a/packages/main/test/pages/Avatar.html
+++ b/packages/main/test/pages/Avatar.html
@@ -69,31 +69,31 @@ - - - - - + + + + +