kyd-shared-badge 0.3.129 → 0.3.131
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
|
@@ -9,6 +9,7 @@ import { red, yellow, green, hexToRgba } from '../colors';
|
|
|
9
9
|
import RiskIcon from './icons/risk';
|
|
10
10
|
import CodeIcon from './icons/code';
|
|
11
11
|
import AiIcon from './icons/ai';
|
|
12
|
+
import { ProviderIcon } from '../utils/provider';
|
|
12
13
|
|
|
13
14
|
interface SanctionSource {
|
|
14
15
|
issuingEntity: string;
|
|
@@ -338,22 +339,6 @@ const AppendixTables: React.FC<AppendixTableProps> = ({ type, sources, searchedA
|
|
|
338
339
|
}
|
|
339
340
|
const br = source as BusinessRuleRow & { pillar?: string };
|
|
340
341
|
const anchorId = br.uid ? `rule-${br.uid}` : undefined;
|
|
341
|
-
const ProviderIcon = ({ name, pillar }: { name?: string, pillar?: string }) => {
|
|
342
|
-
const n = (name || '').toLowerCase();
|
|
343
|
-
if (n.includes('github')) return <FaGithub />;
|
|
344
|
-
if (n.includes('gitlab')) return <FaGitlab />;
|
|
345
|
-
if (n.includes('stack')) return <FaStackOverflow />;
|
|
346
|
-
if (n.includes('credly')) return <SiCredly />;
|
|
347
|
-
if (n.includes('fiverr')) return <SiFiverr />;
|
|
348
|
-
if (n.includes('kaggle')) return <FaKaggle />;
|
|
349
|
-
if (n.includes('google')) return <FaGoogle />;
|
|
350
|
-
if (n.includes('linkedin')) return <FaLinkedin />;
|
|
351
|
-
const p = (pillar || '').toLowerCase();
|
|
352
|
-
if (p === 'risk') return <RiskIcon width={28} height={28} />;
|
|
353
|
-
if (p === 'technical') return <CodeIcon width={28} height={28} />;
|
|
354
|
-
if (p === 'ai') return <AiIcon width={28} height={28} />;
|
|
355
|
-
return <span className="inline-block w-8 h-8 rounded-full" style={{ backgroundColor: 'var(--icon-button-secondary)' }} />;
|
|
356
|
-
};
|
|
357
342
|
return (
|
|
358
343
|
<tr
|
|
359
344
|
id={anchorId}
|
|
@@ -370,7 +355,7 @@ const AppendixTables: React.FC<AppendixTableProps> = ({ type, sources, searchedA
|
|
|
370
355
|
>
|
|
371
356
|
<td className={'px-4 py-4 whitespace-normal text-sm'} style={{ color: 'var(--text-secondary)' }}>
|
|
372
357
|
<span title={br.provider || ''} className={'inline-flex items-center text-4xl'} style={{ color: 'var(--text-main)' }}>
|
|
373
|
-
<ProviderIcon name={br.provider}
|
|
358
|
+
<ProviderIcon name={br.provider} className='relative w-8 h-8' />
|
|
374
359
|
</span>
|
|
375
360
|
</td>
|
|
376
361
|
<td className={'px-4 py-4 whitespace-normal text-sm'} style={{ color: 'var(--text-secondary)' }}>{br.pillar || '—'}</td>
|
|
@@ -172,7 +172,7 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
|
|
|
172
172
|
if (list.length > 10) {
|
|
173
173
|
// Aggregate years and sources for remaining datapoints beyond the top 10
|
|
174
174
|
const remaining = enriched.slice(10);
|
|
175
|
-
const aggregatedYears = remaining.reduce((sum, it) => sum + Number(it.years || 0), 0);
|
|
175
|
+
const aggregatedYears = Math.round(remaining.reduce((sum, it) => sum + Number(it.years || 0), 0) * 10) / 10;
|
|
176
176
|
const aggregatedSourcesSet = new Set<string>();
|
|
177
177
|
for (const it of remaining) {
|
|
178
178
|
if (Array.isArray(it.sources)) {
|
|
@@ -24,7 +24,7 @@ export default function TopContributingFactors({
|
|
|
24
24
|
{topRules.map((r, idx: number) => (
|
|
25
25
|
<div key={idx} className="flex items-center gap-2 text-xs" style={{ color: 'var(--text-secondary)' }}>
|
|
26
26
|
<span className={'relative inline-flex items-center group'} style={{ color: 'var(--text-secondary)' }}>
|
|
27
|
-
<ProviderIcon name={r.provider} />
|
|
27
|
+
<ProviderIcon name={r.provider} className="size-4 relative" />
|
|
28
28
|
<div className="hidden group-hover:block absolute z-30 left-1/2 -translate-x-1/2 top-full mt-2 w-80">
|
|
29
29
|
<div style={{ background: 'var(--content-card-background)', border: '1px solid var(--icon-button-secondary)', color: 'var(--text-main)', padding: 10, borderRadius: 6 }}>
|
|
30
30
|
<div style={{ fontWeight: 600 }}>{getProviderDisplayName(r.provider)}</div>
|
package/src/utils/provider.tsx
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { FaGithub, FaGitlab, FaStackOverflow, FaLinkedin, FaGoogle, FaKaggle } from 'react-icons/fa';
|
|
3
|
+
import { FaGithub, FaGitlab, FaStackOverflow, FaLinkedin, FaGoogle, FaKaggle, FaShieldAlt } from 'react-icons/fa';
|
|
4
4
|
import { SiCoursera, SiCredly, SiFiverr, SiUdemy, SiAmazon } from 'react-icons/si';
|
|
5
|
+
import RiskIcon from '../components/icons/risk';
|
|
6
|
+
import CodeIcon from '../components/icons/code';
|
|
7
|
+
import AiIcon from '../components/icons/ai';
|
|
5
8
|
|
|
6
9
|
export const ProviderIcon = ({ name, className }: { name?: string; className?: string }) => {
|
|
7
10
|
const n = (name || '').toLowerCase();
|
|
@@ -11,11 +14,15 @@ export const ProviderIcon = ({ name, className }: { name?: string; className?: s
|
|
|
11
14
|
if (n.includes('credly')) return <SiCredly className={className} />;
|
|
12
15
|
if (n.includes('fiverr')) return <SiFiverr className={className} />;
|
|
13
16
|
if (n.includes('kaggle')) return <FaKaggle className={className} />;
|
|
14
|
-
if (n.includes('google')) return <FaGoogle className={className} />;
|
|
17
|
+
if (n.includes('google') || n.includes('gscholar')) return <FaGoogle className={className} />;
|
|
15
18
|
if (n.includes('linkedin')) return <FaLinkedin className={className} />;
|
|
16
19
|
if (n.includes('coursera')) return <SiCoursera className={className} />;
|
|
17
20
|
if (n.includes('udemy')) return <SiUdemy className={className} />;
|
|
18
21
|
if (n.includes('amazon')) return <SiAmazon className={className} />;
|
|
22
|
+
if (n.includes('cyber')) return <RiskIcon className={className} />;
|
|
23
|
+
if (n.includes('risk')) return <RiskIcon className={className} />;
|
|
24
|
+
if (n.includes('technical')) return <CodeIcon className={className} />;
|
|
25
|
+
if (n.includes('ai')) return <AiIcon className={className} />;
|
|
19
26
|
return <span className={className || 'inline-block w-3 h-3 rounded-full'} style={{ backgroundColor: 'var(--icon-button-secondary)' }} />;
|
|
20
27
|
};
|
|
21
28
|
|