kyd-shared-badge 0.3.109 → 0.3.110
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
|
@@ -139,6 +139,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless }: { badgeData: Pub
|
|
|
139
139
|
countries={(assessmentResult?.screening_sources?.ip_risk_analysis?.raw_data?.countries) || []}
|
|
140
140
|
accountAuthenticity={assessmentResult?.account_authenticity}
|
|
141
141
|
companyName={badgeData.companyName}
|
|
142
|
+
rightBadgeLayout={!assessmentResult?.enterprise_match}
|
|
142
143
|
/>
|
|
143
144
|
</Reveal>
|
|
144
145
|
{/* Coaching / Evidence under header when present */}
|
|
@@ -226,6 +226,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false
|
|
|
226
226
|
companyName={badgeData.companyName}
|
|
227
227
|
sourcesProviders={(badgeData?.connectedAccounts || []).map(a => (a?.name || '').toLowerCase())}
|
|
228
228
|
selfCheck={selfCheck}
|
|
229
|
+
rightBadgeLayout={!hasEnterpriseMatch}
|
|
229
230
|
/>
|
|
230
231
|
</div>
|
|
231
232
|
{/* Top-right: Role match section */}
|
|
@@ -74,10 +74,8 @@ export default function GaugeCard({
|
|
|
74
74
|
>
|
|
75
75
|
<div className="mb-3 flex items-start justify-between gap-2 pt-5 px-5">
|
|
76
76
|
<div>
|
|
77
|
-
<div className={'font-semibold'} style={{ color: 'var(--text-main)' }}>{title}</div>
|
|
78
|
-
{
|
|
79
|
-
<div className={'text-xs mt-1'} style={{ color: 'var(--text-secondary)' }}>{description}</div>
|
|
80
|
-
) : null}
|
|
77
|
+
<div className={'font-semibold text-xl'} style={{ color: 'var(--text-main)' }}>{title}</div>
|
|
78
|
+
<div className={'text-sm mt-1'} style={{ color: 'var(--text-secondary)' }}>{description}</div>
|
|
81
79
|
</div>
|
|
82
80
|
{(tooltipText || description) && (
|
|
83
81
|
<span className={'relative inline-flex items-center group cursor-help'} style={{ color: 'var(--text-secondary)' }}>
|
|
@@ -52,9 +52,10 @@ interface ReportHeaderProps {
|
|
|
52
52
|
companyName?: string;
|
|
53
53
|
sourcesProviders?: string[];
|
|
54
54
|
selfCheck?: boolean;
|
|
55
|
+
rightBadgeLayout?: boolean;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImageUrl, summary, enterpriseMatch, countries = [], accountAuthenticity, companyName, sourcesProviders = [], selfCheck }: ReportHeaderProps) => {
|
|
58
|
+
const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImageUrl, summary, enterpriseMatch, countries = [], accountAuthenticity, companyName, sourcesProviders = [], selfCheck, rightBadgeLayout }: ReportHeaderProps) => {
|
|
58
59
|
// Use the dynamic image if available, otherwise fall back to the score-based one.
|
|
59
60
|
const finalBadgeImageUrl = badgeImageUrl || getBadgeImageUrl(score || 0);
|
|
60
61
|
const tint = hexToRgba(pickTint(score || 0, selfCheck), 0.06);
|
|
@@ -98,9 +99,9 @@ const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImage
|
|
|
98
99
|
</div>
|
|
99
100
|
);
|
|
100
101
|
})()}
|
|
101
|
-
<div className=
|
|
102
|
+
<div className={`flex gap-3 ${rightBadgeLayout ? 'flex-col md:flex-row items-center justify-between' : 'flex-col'}`}>
|
|
102
103
|
{/* Info section: Title, Candidate, Details and Summary */}
|
|
103
|
-
<div className=
|
|
104
|
+
<div className={`w-full ${rightBadgeLayout ? 'md:flex-1' : ''}`}>
|
|
104
105
|
<div className='space-y-2'>
|
|
105
106
|
<span className='flex gap-2 w-full items-end text-start justify-start'>
|
|
106
107
|
<h2 className={'text-xl font-light'} style={{ color: 'var(--text-main)' }}>KYD Candidate:</h2>
|
|
@@ -188,11 +189,18 @@ const ReportHeader = ({ badgeId, developerName, updatedAt, score = 0, badgeImage
|
|
|
188
189
|
</div>
|
|
189
190
|
|
|
190
191
|
{/* Badge Image with robust centered overlay */}
|
|
191
|
-
<div className=
|
|
192
|
-
<div className=
|
|
193
|
-
<Image
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
<div className={`flex items-center ${rightBadgeLayout ? 'md:justify-end h-20' : 'justify-center w-full mt-4'} `}>
|
|
193
|
+
<div className={`relative w-full ${rightBadgeLayout ? 'max-w-[85px]' : 'px-20'} select-none`}>
|
|
194
|
+
<Image
|
|
195
|
+
src={finalBadgeImageUrl}
|
|
196
|
+
alt="KYD Badge"
|
|
197
|
+
width={rightBadgeLayout ? 25 : 100}
|
|
198
|
+
height={rightBadgeLayout ? 25 : 100}
|
|
199
|
+
priority
|
|
200
|
+
className='w-full h-auto pointer-events-none'
|
|
201
|
+
/>
|
|
202
|
+
<div className={`pointer-events-none absolute left-1/2 -translate-x-1/2 -translate-y-1/2 ${rightBadgeLayout ? 'top-[72%]' : 'top-[69%]'}`}>
|
|
203
|
+
<div className={`font-extrabold text-black ${rightBadgeLayout ? 'text-xs' : 'text-3xl'}`}>
|
|
196
204
|
{Math.round(score || 0)}%
|
|
197
205
|
</div>
|
|
198
206
|
</div>
|
|
@@ -58,9 +58,9 @@ export default function RiskCard({
|
|
|
58
58
|
>
|
|
59
59
|
<div className="mb-3 flex items-start justify-between gap-2">
|
|
60
60
|
<div>
|
|
61
|
-
<div className={'font-semibold'} style={{ color: 'var(--text-main)' }}>{title}</div>
|
|
61
|
+
<div className={'font-semibold text-xl'} style={{ color: 'var(--text-main)' }}>{title}</div>
|
|
62
62
|
{description ? (
|
|
63
|
-
<div className={'text-
|
|
63
|
+
<div className={'text-sm mt-1'} style={{ color: 'var(--text-secondary)' }}>{description}</div>
|
|
64
64
|
) : null}
|
|
65
65
|
</div>
|
|
66
66
|
{(tooltipText || description) && (
|
|
@@ -31,7 +31,7 @@ export default function RoleOverviewCard({
|
|
|
31
31
|
|
|
32
32
|
const tickLabels = useMemo(() => ({
|
|
33
33
|
type: 'outer' as const,
|
|
34
|
-
hideMinMax:
|
|
34
|
+
hideMinMax: true,
|
|
35
35
|
defaultTickLineConfig: {
|
|
36
36
|
length: 7,
|
|
37
37
|
width: 1,
|
|
@@ -45,11 +45,9 @@ export default function RoleOverviewCard({
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
ticks: [
|
|
48
|
-
{ value:
|
|
49
|
-
{ value: 25, valueConfig: { formatTextValue: () => 'Weak' } },
|
|
48
|
+
{ value: 16, valueConfig: { formatTextValue: () => 'Weak' } },
|
|
50
49
|
{ value: 50, valueConfig: { formatTextValue: () => 'Partial' } },
|
|
51
|
-
{ value:
|
|
52
|
-
{ value: 100, valueConfig: { formatTextValue: () => 'Optimal' } },
|
|
50
|
+
{ value: 83, valueConfig: { formatTextValue: () => 'Strong' } },
|
|
53
51
|
]
|
|
54
52
|
}), []);
|
|
55
53
|
|