kyd-shared-badge 0.3.104 → 0.3.105

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.3.104",
3
+ "version": "0.3.105",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -34,7 +34,7 @@ export default function GaugeCard({
34
34
  // Technical evidence tiers from backend thresholds
35
35
  const tickLabels = useMemo(() => ({
36
36
  type: 'outer' as const,
37
- hideMinMax: false,
37
+ hideMinMax: true,
38
38
  defaultTickLineConfig: {
39
39
  length: 7,
40
40
  width: 1,
@@ -48,11 +48,9 @@ export default function GaugeCard({
48
48
  }
49
49
  },
50
50
  ticks: [
51
- { value: 0, valueConfig: { formatTextValue: () => 'Very Low' } },
52
- { value: 25, valueConfig: { formatTextValue: () => 'Low' } },
51
+ { value: 16, valueConfig: { formatTextValue: () => 'Low' } },
53
52
  { value: 50, valueConfig: { formatTextValue: () => 'Moderate' } },
54
- { value: 75, valueConfig: { formatTextValue: () => 'High' } },
55
- { value: 100, valueConfig: { formatTextValue: () => 'Very High' } },
53
+ { value: 83, valueConfig: { formatTextValue: () => 'High' } },
56
54
  ]
57
55
  }), []);
58
56
 
@@ -21,7 +21,7 @@ type HoverTooltipState = {
21
21
  visible: boolean;
22
22
  x: number;
23
23
  y: number;
24
- title: string;
24
+ title?: string;
25
25
  body?: React.ReactNode;
26
26
  } | null;
27
27
 
@@ -43,7 +43,7 @@ const TooltipBox = ({ state }: { state: HoverTooltipState }) => {
43
43
  maxWidth: 320,
44
44
  }}
45
45
  >
46
- <div className="font-medium" style={{ color: 'var(--text-main)' }}>{state.title}</div>
46
+ {state.title ? <div className="font-medium mb-1" style={{ color: 'var(--text-main)' }}>{state.title}</div> : null}
47
47
  {state.body ? (
48
48
  <div style={{ color: 'var(--text-secondary)' }}>{state.body}</div>
49
49
  ) : null}
@@ -80,7 +80,7 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
80
80
  const y = rect.bottom - hostRect.top + 6;
81
81
  return { x, y };
82
82
  };
83
- const showLegendTooltipAt = (target: EventTarget | null, title: string, body?: React.ReactNode) => {
83
+ const showLegendTooltipAt = (target: EventTarget | null, title?: string, body?: React.ReactNode) => {
84
84
  if (!(target instanceof HTMLElement)) return;
85
85
  const { x, y } = computeTooltipPosition(target);
86
86
  setLegendTooltip({ visible: true, x, y, title, body });
@@ -213,7 +213,7 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
213
213
  return 'var(--icon-button-secondary)';
214
214
  };
215
215
 
216
- const presenceLegendTooltip = (): { title: string; body: React.ReactNode } => {
216
+ const presenceLegendTooltip = (): { body: React.ReactNode } => {
217
217
  const Row = ({ color, label }: { color: string; label: string }) => (
218
218
  <div className="flex items-center gap-2">
219
219
  <span className="inline-block h-2 w-2 rounded-full" style={{ background: color }} />
@@ -221,7 +221,6 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
221
221
  </div>
222
222
  );
223
223
  return {
224
- title: 'Presence types',
225
224
  body: (
226
225
  <div className="grid gap-1">
227
226
  <Row color={presenceColor('certified')} label="Certified — Verified by credential issuers." />
@@ -255,8 +254,7 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
255
254
  <div key={idx} className="flex items-stretch justify-between gap-3 min-w-0">
256
255
  <div className="flex flex-col min-w-0 justify-center">
257
256
  <div className="flex items-center gap-2 min-w-0 text-lg text-[var(--text-main)]">
258
- <span className={'inline-block h-2 w-2 rounded-full'} style={{ backgroundColor: entry ? 'var(--icon-button-secondary)' : 'transparent', flexShrink: 0 }} />
259
- <span className="shrink-0 opacity-70 ">{idx + (isLeft ? 1 : 6)}.</span>
257
+ {entry ? <span className="shrink-0 opacity-70 ">{idx + (isLeft ? 1 : 6)}.</span> : <span className="opacity-0 whitespace-nowrap">\u00A0</span>}
260
258
  {entry && typeof entry !== 'string' ? (
261
259
  <span className="truncate" title={entry.label}>
262
260
  {entry.label}
@@ -292,12 +290,12 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
292
290
  {entry && typeof entry !== 'string' ? (
293
291
  <>
294
292
  <span
295
- className="underline decoration-dotted underline-offset-2 cursor-help"
293
+ className="cursor-help"
296
294
  onMouseEnter={(e) => showLegendTooltipAt(e.currentTarget, 'Sources', 'The source where we observed this skill.')}
297
295
  onMouseLeave={hideLegendTooltip}
298
296
  >
299
- Sources
300
- </span>:
297
+ Sources:
298
+ </span>
301
299
  {Array.isArray((entry as any).sources) && (entry as any).sources.length > 0 ? (
302
300
  (() => {
303
301
  const sourceProviders: string[] = ((entry as any).sources as string[]).map((src: string) => {
@@ -331,7 +329,7 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
331
329
  <div className="pb-1">
332
330
  {entry.years ? (
333
331
  <span
334
- className="whitespace-nowrap text-[var(--text-secondary)] underline decoration-dotted underline-offset-2 cursor-help"
332
+ className="whitespace-nowrap text-[var(--text-secondary)] cursor-help"
335
333
  onMouseEnter={(e) => {
336
334
  const copy = experienceLegendTooltip();
337
335
  showLegendTooltipAt(e.currentTarget, copy.title, copy.body);
@@ -347,12 +345,12 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
347
345
  <div
348
346
  onMouseEnter={(e) => {
349
347
  const copy = presenceLegendTooltip();
350
- showLegendTooltipAt(e.currentTarget, copy.title, copy.body);
348
+ showLegendTooltipAt(e.currentTarget, undefined, copy.body);
351
349
  }}
352
350
  onMouseLeave={hideLegendTooltip}
353
351
  className="pt-1"
354
352
  >
355
- {(() => {
353
+ {(() => {
356
354
  const types = Array.isArray(entry.presenceTypes) ? entry.presenceTypes : (entry.presence ? [String(entry.presence) as any] : []);
357
355
  const hasAny = types.length > 0;
358
356
  return hasAny ? (
@@ -366,6 +364,7 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
366
364
  </div>
367
365
  ) : <span className="opacity-0 whitespace-nowrap">.</span>;
368
366
  })()}
367
+
369
368
  </div>
370
369
  </div>
371
370
  ) : null}
@@ -448,7 +447,7 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
448
447
 
449
448
  {activeCategory ? (
450
449
  <span
451
- className="ml-1 underline decoration-dotted underline-offset-2 cursor-help"
450
+ className="ml-1 cursor-help"
452
451
  onMouseEnter={(e) =>
453
452
  showLegendTooltipAt(
454
453
  e.currentTarget,
@@ -462,13 +461,13 @@ export default function SkillsBubble({ skillsCategoryRadar, skillsByCategory, sk
462
461
  </span>
463
462
  ) : null}
464
463
  </div>
465
- <div className="grid grid-cols-2 gap-x-4 text-xs" style={{ color: 'var(--text-secondary)', minHeight: 250 }}>
466
- <div className="grid gap-2">
464
+ <div className="grid grid-cols-2 gap-x-8 text-xs" style={{ color: 'var(--text-secondary)', minHeight: 250 }}>
465
+ <div className="grid gap-3">
467
466
  {leftColumnGrid.map((entry, idx) => (
468
467
  columnComponent(entry, idx, true)
469
468
  ))}
470
469
  </div>
471
- <div className="grid gap-2">
470
+ <div className="grid gap-3">
472
471
  {rightColumnGrid.map((entry, idx) => (
473
472
  columnComponent(entry, idx, false)
474
473
  ))}