kyd-shared-badge 0.3.139 → 0.3.141

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.139",
3
+ "version": "0.3.141",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -121,7 +121,7 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless, selfCheck = false,
121
121
  { key: 'risk', label: 'KYD Risk' },
122
122
  // { key: 'ai', label: 'KYD AI' },
123
123
  { key: 'role', label: showRoleFit ? 'Role Fit & Coaching' : 'Coaching' },
124
- { key: 'resume', label: 'Resume' },
124
+ { key: 'resume', label: 'KYD Resume' },
125
125
  { key: 'appendix', label: 'Appendix' }
126
126
  ];
127
127
  return arr;
@@ -19,7 +19,14 @@ const formatProviderName = (name?: string) => {
19
19
  return n.charAt(0).toUpperCase() + n.slice(1);
20
20
  };
21
21
 
22
- const ConnectedPlatforms = ({ accounts, authenticity }: { accounts?: ConnectedAccount[]; authenticity?: { label?: string; description?: string; oauth_connected?: string[]; mismatches?: Array<{ provider?: string; detail?: string }> } }) => {
22
+ type ConnectedPlatformsProps = {
23
+ accounts?: ConnectedAccount[]
24
+ authenticity?: { label?: string; description?: string; oauth_connected?: string[]; mismatches?: Array<{ provider?: string; detail?: string }> }
25
+ className?: string
26
+ layoutVariant?: 'grid' | 'column'
27
+ }
28
+
29
+ const ConnectedPlatforms = ({ accounts, authenticity, className, layoutVariant = 'grid' }: ConnectedPlatformsProps) => {
23
30
  const list = Array.isArray(accounts) ? accounts : [];
24
31
  useEffect(() => {
25
32
  const flash = () => {
@@ -42,8 +49,13 @@ const ConnectedPlatforms = ({ accounts, authenticity }: { accounts?: ConnectedAc
42
49
  return () => window.removeEventListener('hashchange', flash);
43
50
  }, []);
44
51
  if (list.length === 0) return null;
52
+ const listClass =
53
+ layoutVariant === 'column'
54
+ ? 'flex flex-col gap-3'
55
+ : 'grid grid-cols-1 sm:grid-cols-2 gap-3'
56
+
45
57
  return (
46
- <div className="pt-8">
58
+ <div className={`pt-8 ${className || ''}`}>
47
59
  {(() => {
48
60
  const label = (authenticity?.label || '').toLowerCase();
49
61
  const isCritical = label === 'likely inauthentic';
@@ -90,7 +102,7 @@ const ConnectedPlatforms = ({ accounts, authenticity }: { accounts?: ConnectedAc
90
102
  );
91
103
  })()}
92
104
  <h4 className={'text-lg font-semibold mb-3'} style={{ color: 'var(--text-main)' }}>Sources (Connected or Linked)</h4>
93
- <div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
105
+ <div className={listClass}>
94
106
  {list.map((acct, idx) => (
95
107
  <div key={idx} className={'rounded-md p-3 border'} style={{ backgroundColor: 'var(--content-card-background)', borderColor: 'var(--icon-button-secondary)' }}>
96
108
  <div className="flex items-center justify-between gap-3">