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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kyd-shared-badge",
3
- "version": "0.1.18",
3
+ "version": "0.1.21",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -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?: string; // optional image-based icon
71
+ iconImageSrc: string;
73
72
  }
74
73
 
75
- const ScoreCard = ({ title, score, description, descriptor, icon: Icon, scoreType, isRecruiter = false, iconImageSrc }: ScoreCardProps) => {
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
- {iconImageSrc ? (
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
- icon={FiThumbsUp}
162
- scoreType='number'
163
- isRecruiter={isRecruiter}
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
- icon={FiShield}
171
- scoreType='risk'
172
- isRecruiter={isRecruiter}
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 bg-yellow-100 dark:bg-yellow-900/30 border border-yellow-300 dark:border-yellow-700 rounded-lg'} style={isRecruiter ? { backgroundColor: 'var(--icon-button-secondary)', borderColor: 'var(--icon-button-secondary)' } : undefined}>
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 text-yellow-500 dark:text-yellow-400 mr-3 mt-0.5 flex-shrink-0">
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={isRecruiter ? 'font-bold' : 'font-bold text-yellow-800 dark:text-yellow-200'} style={isRecruiter ? { color: 'var(--text-main)' } : undefined}>User Opted Out of Screening</h4>
230
- <p className={isRecruiter ? 'text-sm mt-1' : 'text-sm text-yellow-700 dark:text-yellow-300 mt-1'} style={isRecruiter ? { color: 'var(--text-secondary)' } : undefined}>
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
@@ -1,5 +1,5 @@
1
1
  const red = '#EC6662'
2
2
  const yellow = '#ffbb54'
3
- const green = '#49a08a'
3
+ const green = '#02a389'
4
4
 
5
5
  export { red, yellow, green }