kyd-shared-badge 0.3.120 → 0.3.121
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
|
@@ -5,7 +5,7 @@ import { normalizeLinkedInInput } from './linkedin';
|
|
|
5
5
|
import type { ConnectAccountsProps } from './types';
|
|
6
6
|
import { CheckCircle, Link2, LinkIcon, Unlink, ArrowLeft, ExternalLink, Settings, Shield, InfoIcon } from 'lucide-react';
|
|
7
7
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
8
|
-
import { Button, Input, Spinner, Card, CardHeader, CardContent, CardFooter, CardTitle
|
|
8
|
+
import { Button, Input, Spinner, Card, CardHeader, CardContent, CardFooter, CardTitle } from '../ui';
|
|
9
9
|
import Link from 'next/link';
|
|
10
10
|
import { Tooltip, TooltipTrigger, TooltipProvider, TooltipContent } from '../ui/';
|
|
11
11
|
|
|
@@ -226,17 +226,6 @@ export function ConnectAccounts(props: ConnectAccountsProps) {
|
|
|
226
226
|
|
|
227
227
|
return (
|
|
228
228
|
<>
|
|
229
|
-
{/* Mobile: relative summary above content */}
|
|
230
|
-
{providers?.length ? (
|
|
231
|
-
<div className="sm:hidden px-4 mb-3">
|
|
232
|
-
<ConnectProgress layout="inline" providers={providers} connectedIds={connectedIds} />
|
|
233
|
-
</div>
|
|
234
|
-
) : null}
|
|
235
|
-
|
|
236
|
-
{/* Desktop: fixed top-right summary */}
|
|
237
|
-
{providers?.length ? (
|
|
238
|
-
<ConnectProgress providers={providers} connectedIds={connectedIds} />
|
|
239
|
-
) : null}
|
|
240
229
|
|
|
241
230
|
<AnimatePresence initial={false} mode="wait">
|
|
242
231
|
{showDataHandling ? (
|
|
@@ -60,6 +60,12 @@ export function ConnectProgress(props: ConnectProgressProps) {
|
|
|
60
60
|
body: 'You are near complete coverage. 100% is not required, but additional platforms can further increase confidence.'
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
+
if (score === 100) {
|
|
64
|
+
return {
|
|
65
|
+
headline: 'Complete — high confidence',
|
|
66
|
+
body: 'You\'ve achieved the recommended coverage for a very strong profile! Connecting even more accounts can further strengthen your verification.'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
63
69
|
return {
|
|
64
70
|
headline: 'Keep going',
|
|
65
71
|
body: 'Connect more platforms to strengthen your profile. 70%+ is strong; 100% is optional.'
|
|
@@ -72,11 +78,11 @@ export function ConnectProgress(props: ConnectProgressProps) {
|
|
|
72
78
|
<div className="flex items-center gap-3">
|
|
73
79
|
<ProgressCircle value={progressPercent} size={64} thickness={6} />
|
|
74
80
|
<div className="min-w-0 max-w-xs">
|
|
75
|
-
<div className="text-
|
|
76
|
-
<div className="text-
|
|
81
|
+
<div className="text-base font-semibold truncate" style={{ color: 'var(--text-main)'}}>{progressCopy.headline}</div>
|
|
82
|
+
<div className="text-sm mt-0.5" style={{ color: 'var(--text-secondary)'}}>
|
|
77
83
|
{progressCopy.body}
|
|
78
84
|
</div>
|
|
79
|
-
<div className="text-
|
|
85
|
+
<div className="text-sm mt-1" style={{ color: 'var(--text-secondary)'}}>
|
|
80
86
|
Weighted score • {progressPercent}%
|
|
81
87
|
</div>
|
|
82
88
|
</div>
|
|
@@ -95,3 +101,4 @@ export function ConnectProgress(props: ConnectProgressProps) {
|
|
|
95
101
|
export default ConnectProgress
|
|
96
102
|
|
|
97
103
|
|
|
104
|
+
|
|
@@ -13,6 +13,9 @@ export type ProgressCircleProps = {
|
|
|
13
13
|
export function ProgressCircle(props: ProgressCircleProps) {
|
|
14
14
|
const { value, size = 72, thickness = 6, className, showLabel = true, label } = props
|
|
15
15
|
|
|
16
|
+
const rawId = React.useId()
|
|
17
|
+
const gradientId = React.useMemo(() => `kyd-pc-${String(rawId).replace(/:/g, '')}` , [rawId])
|
|
18
|
+
|
|
16
19
|
const clamped = Math.max(0, Math.min(100, Number.isFinite(value) ? value : 0))
|
|
17
20
|
const radius = (size - thickness) / 2
|
|
18
21
|
const circumference = 2 * Math.PI * radius
|
|
@@ -22,7 +25,7 @@ export function ProgressCircle(props: ProgressCircleProps) {
|
|
|
22
25
|
<div className={`relative inline-flex items-center justify-center ${className || ''}`} style={{ width: size, height: size }}>
|
|
23
26
|
<svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} className="block">
|
|
24
27
|
<defs>
|
|
25
|
-
<linearGradient id=
|
|
28
|
+
<linearGradient id={gradientId} x1="0%" y1="0%" x2="100%" y2="0%">
|
|
26
29
|
<stop offset="0%" stopColor="var(--icon-accent)" />
|
|
27
30
|
<stop offset="100%" stopColor="var(--icon-accent-hover)" />
|
|
28
31
|
</linearGradient>
|
|
@@ -41,7 +44,7 @@ export function ProgressCircle(props: ProgressCircleProps) {
|
|
|
41
44
|
cy={size / 2}
|
|
42
45
|
r={radius}
|
|
43
46
|
fill="none"
|
|
44
|
-
stroke=
|
|
47
|
+
stroke={`url(#${gradientId})`}
|
|
45
48
|
strokeWidth={thickness}
|
|
46
49
|
strokeLinecap="round"
|
|
47
50
|
strokeDasharray={circumference}
|
|
@@ -76,3 +79,4 @@ export function ProgressCircle(props: ProgressCircleProps) {
|
|
|
76
79
|
export default ProgressCircle
|
|
77
80
|
|
|
78
81
|
|
|
82
|
+
|