kyd-shared-badge 0.2.7 → 0.2.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.
package/package.json
CHANGED
|
@@ -68,8 +68,7 @@ interface ScoreCardProps {
|
|
|
68
68
|
|
|
69
69
|
const ScoreCard = ({ title, score, description, descriptor, scoreType, iconImageSrc }: ScoreCardProps) => {
|
|
70
70
|
const isDescriptor = scoreType === 'descriptor';
|
|
71
|
-
const scoreHex =
|
|
72
|
-
const scoreClass = isDescriptor ? 'text-neutral-400' : '';
|
|
71
|
+
const scoreHex = getScoreColor(score);
|
|
73
72
|
const overlay = scoreHex ? hexToRgba(scoreHex, 0.08) : 'transparent';
|
|
74
73
|
let displayScore;
|
|
75
74
|
|
|
@@ -88,11 +87,11 @@ const ScoreCard = ({ title, score, description, descriptor, scoreType, iconImage
|
|
|
88
87
|
}
|
|
89
88
|
style={{ backgroundColor: 'var(--content-card-background)', borderColor: 'var(--icon-button-secondary)', backgroundImage: `linear-gradient(${overlay}, ${overlay})` }}
|
|
90
89
|
>
|
|
91
|
-
<div className={`text-3xl mb-4
|
|
90
|
+
<div className={`text-3xl mb-4`} style={scoreHex ? { color: scoreHex } : undefined}>
|
|
92
91
|
<Image src={iconImageSrc} alt="icon" width={32} height={32} className="h-8 w-8 object-contain" />
|
|
93
92
|
</div>
|
|
94
93
|
<h3 className={`font-semibold text-xl ${isDescriptor ? 'text-neutral-400' : ''}`} style={{ color: 'var(--text-main)' }}>{title}</h3>
|
|
95
|
-
<p className={`text-4xl font-bold
|
|
94
|
+
<p className={`text-4xl font-bold`} style={scoreHex ? { color: scoreHex } : undefined}>{displayScore}</p>
|
|
96
95
|
<p className={'text-sm text-neutral-600 dark:text-neutral-400 mt-4'} style={{ color: 'var(--text-secondary)' }}>{description}</p>
|
|
97
96
|
</div>
|
|
98
97
|
);
|
|
@@ -148,8 +147,8 @@ const SharedBadgeDisplay = ({ badgeData }: { badgeData: PublicBadgeData }) => {
|
|
|
148
147
|
/>
|
|
149
148
|
<ScoreCard
|
|
150
149
|
title={<span>KYD AI™ <span className="text-xs font-semibold bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 px-2 py-1 rounded-full align-middle">Beta</span></span>}
|
|
151
|
-
score={0}
|
|
152
|
-
description={aiUsageScore?.description || '
|
|
150
|
+
score={aiUsageScore?.score || 0}
|
|
151
|
+
description={aiUsageScore?.description || ''}
|
|
153
152
|
descriptor={aiUsageScore?.descriptor}
|
|
154
153
|
scoreType='descriptor'
|
|
155
154
|
iconImageSrc={getAiIconSrc(aiUsageScore?.descriptor)}
|
|
@@ -49,8 +49,8 @@ const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, isPublic,
|
|
|
49
49
|
>
|
|
50
50
|
{/* Left Section */}
|
|
51
51
|
<div className="flex items-center text-left md:text-center">
|
|
52
|
-
<Image src={finalBadgeImageUrl} alt="KYD Badge" width={100} height={100} unoptimized />
|
|
53
|
-
<div className='flex flex-col
|
|
52
|
+
<Image src={finalBadgeImageUrl} alt="KYD Badge" width={100} height={100} unoptimized className='p-3'/>
|
|
53
|
+
<div className='flex flex-col'>
|
|
54
54
|
<h1 className={'font-bold text-lg'} style={{ color: 'var(--text-main)' }}>
|
|
55
55
|
KYD Self-Check™
|
|
56
56
|
</h1>
|