kyd-shared-badge 0.3.137 → 0.3.140

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.137",
3
+ "version": "0.3.140",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -11,7 +11,7 @@
11
11
  "sideEffects": false,
12
12
  "scripts": {},
13
13
  "peerDependencies": {
14
- "next": "^15.3.3",
14
+ "next": "^16.0.7",
15
15
  "react": "^19.0.0",
16
16
  "react-dom": "^19.0.0"
17
17
  },
@@ -32,7 +32,7 @@
32
32
  "framer-motion": "^12.23.24",
33
33
  "i18n-iso-countries": "^7.14.0",
34
34
  "lucide-react": "^0.545.0",
35
- "next-auth": "^4.24.11",
35
+ "next-auth": "^4.24.13",
36
36
  "react-hot-toast": "^2.6.0",
37
37
  "react-icons": "^5.5.0",
38
38
  "recharts": "^2.15.4",
@@ -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">