@ibragim-dev-org/ui-forge-library 1.3.8 → 1.3.9
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.
|
@@ -800,6 +800,9 @@ const COLOR_FAMILIES = [
|
|
|
800
800
|
{ solid: '#FF86E4', gradientStart: '#FF64DD', gradientEnd: '#F599C4' }, // Pink (exact)
|
|
801
801
|
];
|
|
802
802
|
const hashValue = (value) => {
|
|
803
|
+
if (!value || typeof value !== 'string') {
|
|
804
|
+
return 0;
|
|
805
|
+
}
|
|
803
806
|
let hash = 0;
|
|
804
807
|
for (let i = 0; i < value.length; i++) {
|
|
805
808
|
hash = value.charCodeAt(i) + ((hash << 5) - hash);
|
|
@@ -1338,9 +1341,10 @@ class UiAvatarDirective {
|
|
|
1338
1341
|
.trim()
|
|
1339
1342
|
.split(/\s+/)
|
|
1340
1343
|
.slice(0, 2)
|
|
1341
|
-
.map((word) => word[0])
|
|
1344
|
+
.map((word) => word[0]?.toUpperCase() || '')
|
|
1342
1345
|
.join('');
|
|
1343
|
-
|
|
1346
|
+
const colorValue = acronym[0] || ' ';
|
|
1347
|
+
this.renderer.setStyle(this.elementRef.nativeElement, 'background', stringToColorGradient(colorValue));
|
|
1344
1348
|
this.$text.set(acronym);
|
|
1345
1349
|
});
|
|
1346
1350
|
effect(() => {
|