kyd-shared-badge 0.1.18 → 0.1.21
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 +1 -1
- package/src/SharedBadgeDisplay.tsx +13 -22
- package/src/colors.ts +1 -1
package/package.json
CHANGED
|
@@ -66,13 +66,12 @@ interface ScoreCardProps {
|
|
|
66
66
|
score: number;
|
|
67
67
|
description: string;
|
|
68
68
|
descriptor?: string;
|
|
69
|
-
icon: IconType;
|
|
70
69
|
scoreType: 'number' | 'risk' | 'descriptor';
|
|
71
70
|
isRecruiter?: boolean;
|
|
72
|
-
iconImageSrc
|
|
71
|
+
iconImageSrc: string;
|
|
73
72
|
}
|
|
74
73
|
|
|
75
|
-
const ScoreCard = ({ title, score, description, descriptor,
|
|
74
|
+
const ScoreCard = ({ title, score, description, descriptor, scoreType, isRecruiter = false, iconImageSrc }: ScoreCardProps) => {
|
|
76
75
|
const isDescriptor = scoreType === 'descriptor';
|
|
77
76
|
const scoreHex = isDescriptor ? undefined : getScoreColor(score);
|
|
78
77
|
const scoreClass = isDescriptor ? 'text-neutral-400' : '';
|
|
@@ -96,12 +95,7 @@ const ScoreCard = ({ title, score, description, descriptor, icon: Icon, scoreTyp
|
|
|
96
95
|
style={isRecruiter ? { backgroundColor: 'var(--content-card-background)', borderColor: 'var(--icon-button-secondary)' } : undefined}
|
|
97
96
|
>
|
|
98
97
|
<div className={`text-3xl mb-4 ${scoreClass}`} style={scoreHex ? { color: scoreHex } : undefined}>
|
|
99
|
-
|
|
100
|
-
// eslint-disable-next-line @next/next/no-img-element
|
|
101
|
-
<Image src={iconImageSrc} alt="icon" className="h-8 w-8 object-contain" />
|
|
102
|
-
) : (
|
|
103
|
-
<Icon />
|
|
104
|
-
)}
|
|
98
|
+
<Image src={iconImageSrc} alt="icon" className="h-8 w-8 object-contain" />
|
|
105
99
|
</div>
|
|
106
100
|
<h3 className={`font-semibold text-xl ${isDescriptor ? 'text-neutral-400' : ''}`} style={isRecruiter ? { color: 'var(--text-main)' } : undefined}>{title}</h3>
|
|
107
101
|
<p className={`text-4xl font-bold ${scoreClass}`} style={scoreHex ? { color: scoreHex } : undefined}>{displayScore}</p>
|
|
@@ -158,26 +152,23 @@ const SharedBadgeDisplay = ({ badgeData, type = 'individual' }: { badgeData: Pub
|
|
|
158
152
|
title="KYD Technical™"
|
|
159
153
|
score={devTrustScore?.score || 0}
|
|
160
154
|
description={devTrustScore?.description || ''}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
iconImageSrc={getTechnicalIconSrc(devTrustScore?.score || 0)}
|
|
155
|
+
scoreType='number'
|
|
156
|
+
isRecruiter={isRecruiter}
|
|
157
|
+
iconImageSrc={getTechnicalIconSrc(devTrustScore?.score || 0)}
|
|
165
158
|
/>
|
|
166
159
|
<ScoreCard
|
|
167
160
|
title="KYD Risk™"
|
|
168
161
|
score={riskScore?.score || 0}
|
|
169
162
|
description={riskScore?.description || ''}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
iconImageSrc={getRiskIconSrc(riskScore?.score || 0)}
|
|
163
|
+
scoreType='risk'
|
|
164
|
+
isRecruiter={isRecruiter}
|
|
165
|
+
iconImageSrc={getRiskIconSrc(riskScore?.score || 0)}
|
|
174
166
|
/>
|
|
175
167
|
<ScoreCard
|
|
176
168
|
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>}
|
|
177
169
|
score={0}
|
|
178
170
|
description={aiUsageScore?.description || 'Analysis of AI tool usage and transparency.'}
|
|
179
171
|
descriptor={aiUsageScore?.descriptor}
|
|
180
|
-
icon={FiCpu}
|
|
181
172
|
scoreType='descriptor'
|
|
182
173
|
isRecruiter={isRecruiter}
|
|
183
174
|
iconImageSrc={getAiIconSrc(aiUsageScore?.descriptor)}
|
|
@@ -220,14 +211,14 @@ const SharedBadgeDisplay = ({ badgeData, type = 'individual' }: { badgeData: Pub
|
|
|
220
211
|
<div className="pt-8">
|
|
221
212
|
<h3 className={isRecruiter ? 'text-xl font-bold mb-3' : 'text-xl font-bold text-neutral-900 dark:text-white mb-3'} style={isRecruiter ? { color: 'var(--text-main)' } : undefined}>3. KYD Risk™ Signals</h3>
|
|
222
213
|
{badgeData.optOutScreening ? (
|
|
223
|
-
<div className={isRecruiter ? 'mb-4 p-4 rounded-lg border' : 'mb-4 p-4
|
|
214
|
+
<div className={isRecruiter ? 'mb-4 p-4 rounded-lg border' : 'mb-4 p-4 rounded-lg border'} style={isRecruiter ? { backgroundColor: 'var(--icon-button-secondary)', borderColor: 'var(--icon-button-secondary)' } : { backgroundColor: '#FFF7E6', borderColor: yellow }}>
|
|
224
215
|
<div className="flex items-start">
|
|
225
|
-
<span className="h-5 w-5
|
|
216
|
+
<span className="h-5 w-5 mr-3 mt-0.5 flex-shrink-0" style={{ color: yellow }}>
|
|
226
217
|
<FiAlertTriangle size={20} />
|
|
227
218
|
</span>
|
|
228
219
|
<div>
|
|
229
|
-
<h4 className={
|
|
230
|
-
<p className={
|
|
220
|
+
<h4 className={'font-bold'} style={isRecruiter ? { color: 'var(--text-main)' } : { color: yellow }}>User Opted Out of Screening</h4>
|
|
221
|
+
<p className={'text-sm mt-1'} style={isRecruiter ? { color: 'var(--text-secondary)' } : { color: yellow }}>
|
|
231
222
|
The user chose not to participate in the automated sanctions and risk screening process. The risk score reflects this decision and is for informational purposes only.
|
|
232
223
|
</p>
|
|
233
224
|
</div>
|
package/src/colors.ts
CHANGED