kyd-shared-badge 0.1.7 → 0.1.8
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
|
@@ -14,6 +14,7 @@ interface ProviderInsightsProps {
|
|
|
14
14
|
platforms: Platform[];
|
|
15
15
|
insights: { [provider: string]: ProviderInsight };
|
|
16
16
|
variant?: 'public' | 'private';
|
|
17
|
+
view?: 'recruiter' | 'individual';
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
const providerIcons: { [key: string]: IconType } = {
|
|
@@ -28,12 +29,13 @@ const providerIcons: { [key: string]: IconType } = {
|
|
|
28
29
|
'Google Scholar': FaGoogle,
|
|
29
30
|
};
|
|
30
31
|
|
|
31
|
-
export default function ProviderInsights({ platforms, insights, variant = 'private' }: ProviderInsightsProps) {
|
|
32
|
+
export default function ProviderInsights({ platforms, insights, variant = 'private', view = 'individual' }: ProviderInsightsProps) {
|
|
32
33
|
if (!platforms || platforms.length === 0) {
|
|
33
34
|
return null;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
const isPublic = variant === 'public';
|
|
38
|
+
const isRecruiter = view === 'recruiter';
|
|
37
39
|
|
|
38
40
|
return (
|
|
39
41
|
<div className="space-y-6">
|
|
@@ -47,16 +49,23 @@ export default function ProviderInsights({ platforms, insights, variant = 'priva
|
|
|
47
49
|
}) : null;
|
|
48
50
|
|
|
49
51
|
return (
|
|
50
|
-
<div
|
|
52
|
+
<div
|
|
53
|
+
key={platform.name}
|
|
54
|
+
className={isRecruiter ? 'rounded-xl shadow-sm border' : 'bg-white dark:bg-neutral-800 rounded-lg shadow-sm border border-neutral-200 dark:border-neutral-700'}
|
|
55
|
+
style={isRecruiter ? { backgroundColor: 'var(--content-card-background)', borderColor: 'var(--icon-button-secondary)' } : undefined}
|
|
56
|
+
>
|
|
51
57
|
{/* Header */}
|
|
52
|
-
<div
|
|
58
|
+
<div
|
|
59
|
+
className="p-4 border-b"
|
|
60
|
+
style={isRecruiter ? { borderColor: 'var(--icon-button-secondary)' } : undefined}
|
|
61
|
+
>
|
|
53
62
|
<div className="flex items-center justify-between">
|
|
54
63
|
<div className="flex items-center space-x-3">
|
|
55
|
-
{Icon && <Icon className=
|
|
56
|
-
<h3 className=
|
|
64
|
+
{Icon && <Icon className={isRecruiter ? 'h-6 w-6' : 'h-6 w-6 text-neutral-600 dark:text-neutral-400'} style={isRecruiter ? { color: 'var(--text-secondary)' } : undefined} />}
|
|
65
|
+
<h3 className={isRecruiter ? 'font-semibold text-lg' : 'font-semibold text-lg text-neutral-900 dark:text-white'} style={isRecruiter ? { color: 'var(--text-main)' } : undefined}>{platform.name}</h3>
|
|
57
66
|
</div>
|
|
58
67
|
{observedDate && (
|
|
59
|
-
<span className=
|
|
68
|
+
<span className={isRecruiter ? 'text-sm' : 'text-sm text-neutral-500 dark:text-neutral-400'} style={isRecruiter ? { color: 'var(--text-secondary)' } : undefined}>
|
|
60
69
|
{isPublic ? `Accessed: ${observedDate}` : `Observed: ${observedDate}`}
|
|
61
70
|
</span>
|
|
62
71
|
)}
|
|
@@ -66,7 +75,8 @@ export default function ProviderInsights({ platforms, insights, variant = 'priva
|
|
|
66
75
|
href={platform.url}
|
|
67
76
|
target="_blank"
|
|
68
77
|
rel="noopener noreferrer"
|
|
69
|
-
className=
|
|
78
|
+
className={isRecruiter ? 'mt-2 inline-block text-sm font-medium underline-offset-2 hover:underline' : 'mt-2 inline-block text-sm text-indigo-600 dark:text-indigo-400 hover:underline'}
|
|
79
|
+
style={isRecruiter ? { color: 'var(--icon-accent)' } : undefined}
|
|
70
80
|
>
|
|
71
81
|
{platform.handle || 'View Profile'}
|
|
72
82
|
</a>
|
|
@@ -77,23 +87,23 @@ export default function ProviderInsights({ platforms, insights, variant = 'priva
|
|
|
77
87
|
{providerInsight && (
|
|
78
88
|
<div className="p-4">
|
|
79
89
|
{/* Summary */}
|
|
80
|
-
<p className=
|
|
90
|
+
<p className={isRecruiter ? 'text-sm mb-4' : 'text-sm text-neutral-600 dark:text-neutral-400 mb-4'} style={isRecruiter ? { color: 'var(--text-secondary)' } : undefined}>
|
|
81
91
|
{providerInsight.summary}
|
|
82
92
|
</p>
|
|
83
93
|
|
|
84
94
|
{/* Data Points */}
|
|
85
95
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
86
96
|
{providerInsight.data_points.map((point, index) => (
|
|
87
|
-
<div key={index} className=
|
|
97
|
+
<div key={index} className={isRecruiter ? 'rounded-lg p-4' : 'bg-neutral-50 dark:bg-neutral-700/50 rounded-lg p-4'} style={isRecruiter ? { backgroundColor: 'var(--icon-button-secondary)' } : undefined}>
|
|
88
98
|
<div className="flex justify-between items-baseline mb-2">
|
|
89
|
-
<h4 className=
|
|
99
|
+
<h4 className={isRecruiter ? 'font-medium' : 'font-medium text-neutral-900 dark:text-white'} style={isRecruiter ? { color: 'var(--text-main)' } : undefined}>
|
|
90
100
|
{point.label}
|
|
91
101
|
</h4>
|
|
92
|
-
<span className=
|
|
102
|
+
<span className={isRecruiter ? 'font-bold' : 'font-bold text-neutral-700 dark:text-neutral-200'} style={isRecruiter ? { color: 'var(--text-main)' } : undefined}>
|
|
93
103
|
{point.value}
|
|
94
104
|
</span>
|
|
95
105
|
</div>
|
|
96
|
-
<p className=
|
|
106
|
+
<p className={isRecruiter ? 'text-sm' : 'text-sm text-neutral-600 dark:text-neutral-400'} style={isRecruiter ? { color: 'var(--text-secondary)' } : undefined}>
|
|
97
107
|
{point.significance}
|
|
98
108
|
</p>
|
|
99
109
|
</div>
|