@zerodev/wallet-react-ui 0.0.3 → 0.0.5

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.
Files changed (52) hide show
  1. package/README.md +0 -1
  2. package/dist/_types/auth/components/BlobAnimation/index.d.ts +1 -1
  3. package/dist/_types/auth/components/BlobAnimation/index.d.ts.map +1 -1
  4. package/dist/_types/auth/components/CodeInput/index.d.ts +1 -1
  5. package/dist/_types/auth/components/CodeInput/index.d.ts.map +1 -1
  6. package/dist/_types/auth/index.d.ts +1 -1
  7. package/dist/_types/auth/index.d.ts.map +1 -1
  8. package/dist/_types/auth/pages/EmailVerification.d.ts +1 -1
  9. package/dist/_types/auth/pages/EmailVerification.d.ts.map +1 -1
  10. package/dist/_types/auth/pages/ErrorScreen.d.ts +1 -1
  11. package/dist/_types/auth/pages/ErrorScreen.d.ts.map +1 -1
  12. package/dist/_types/auth/pages/OtpInput.d.ts +1 -1
  13. package/dist/_types/auth/pages/OtpInput.d.ts.map +1 -1
  14. package/dist/_types/auth/pages/SignUp.d.ts +1 -1
  15. package/dist/_types/auth/pages/SignUp.d.ts.map +1 -1
  16. package/dist/_types/auth/pages/Verifying.d.ts +1 -1
  17. package/dist/_types/auth/pages/Verifying.d.ts.map +1 -1
  18. package/dist/_types/auth/pages/WalletSelection.d.ts +1 -1
  19. package/dist/_types/auth/pages/WalletSelection.d.ts.map +1 -1
  20. package/dist/_types/shared/components/SignUpFooter/index.d.ts +1 -1
  21. package/dist/_types/shared/components/SignUpFooter/index.d.ts.map +1 -1
  22. package/dist/_types/shared/components/StatusScreen/index.d.ts +1 -1
  23. package/dist/_types/shared/components/StatusScreen/index.d.ts.map +1 -1
  24. package/dist/index.cjs +3 -3
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.mjs +454 -881
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/styles.css +2 -2
  29. package/package.json +11 -13
  30. package/src/auth/index.tsx +3 -4
  31. package/src/auth/pages/EmailVerification.tsx +1 -2
  32. package/src/auth/pages/ErrorScreen.tsx +1 -2
  33. package/src/auth/pages/OtpInput.tsx +1 -2
  34. package/src/auth/pages/SignUp.tsx +12 -4
  35. package/src/auth/pages/Verifying.tsx +1 -2
  36. package/src/auth/pages/WalletSelection.tsx +12 -4
  37. package/src/shared/components/SignUpFooter/index.tsx +1 -2
  38. package/dist/_types/shared/components/PoweredBy/index.d.ts +0 -6
  39. package/dist/_types/shared/components/PoweredBy/index.d.ts.map +0 -1
  40. package/dist/_types/shared/components/Screen/EllipticalRadial.d.ts +0 -23
  41. package/dist/_types/shared/components/Screen/EllipticalRadial.d.ts.map +0 -1
  42. package/dist/_types/shared/components/Screen/MultiRadialBackground.d.ts +0 -4
  43. package/dist/_types/shared/components/Screen/MultiRadialBackground.d.ts.map +0 -1
  44. package/dist/_types/shared/components/Screen/index.d.ts +0 -10
  45. package/dist/_types/shared/components/Screen/index.d.ts.map +0 -1
  46. package/dist/_types/shared/components/TopNav/index.d.ts +0 -10
  47. package/dist/_types/shared/components/TopNav/index.d.ts.map +0 -1
  48. package/src/shared/components/PoweredBy/index.tsx +0 -27
  49. package/src/shared/components/Screen/EllipticalRadial.tsx +0 -65
  50. package/src/shared/components/Screen/MultiRadialBackground.tsx +0 -323
  51. package/src/shared/components/Screen/index.tsx +0 -85
  52. package/src/shared/components/TopNav/index.tsx +0 -48
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerodev/wallet-react-ui",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "React wallet UI kit for ZeroDev (auth + signing flows)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,18 +43,18 @@
43
43
  "web3"
44
44
  ],
45
45
  "dependencies": {
46
- "@zerodev/react-ui": "0.0.2"
46
+ "@zerodev/react-ui": "0.0.4"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@tanstack/react-query": "^5.0.0",
50
- "@wagmi/core": "^2.22.0",
50
+ "@wagmi/core": "^2.22.0 || ^3.0.0",
51
51
  "react": "^18.0.0 || ^19.0.0",
52
52
  "react-dom": "^18.0.0 || ^19.0.0",
53
- "viem": "^2.38.0",
54
- "wagmi": "^2.19.0",
53
+ "viem": "^2.47.18",
54
+ "wagmi": "^2.19.0 || ^3.0.0",
55
55
  "zustand": "^5.0.3",
56
56
  "@zerodev/wallet-core": "0.0.1",
57
- "@zerodev/wallet-react": "0.0.2"
57
+ "@zerodev/wallet-react": "0.0.3"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@storybook/addon-a11y": "^10.3.3",
@@ -67,13 +67,13 @@
67
67
  "@types/react": "^19",
68
68
  "@types/react-dom": "^19",
69
69
  "@vitejs/plugin-react": "^4.7.0",
70
- "postcss": "^8.5.8",
71
- "react": "19.2.0",
72
- "react-dom": "19.2.0",
70
+ "postcss": "^8.5.16",
71
+ "react": "19.2.3",
72
+ "react-dom": "19.2.3",
73
73
  "storybook": "^10.3.3",
74
74
  "tailwindcss": "^4.2.2",
75
75
  "typescript": "5.9.3",
76
- "vite": "^6.4.1",
76
+ "vite": "^6.4.3",
77
77
  "vite-plugin-node-polyfills": "^0.25.0",
78
78
  "vocs": "^1.4.1"
79
79
  },
@@ -89,8 +89,6 @@
89
89
  "storybook": "storybook dev -p 6007",
90
90
  "build-storybook": "storybook build",
91
91
  "test": "vitest run",
92
- "test:watch": "vitest",
93
- "docs:dev": "cd docs && vocs dev",
94
- "docs:preview": "cd docs && vocs preview"
92
+ "test:watch": "vitest"
95
93
  }
96
94
  }
@@ -1,8 +1,7 @@
1
+ import { Screen, TopNav } from '@zerodev/react-ui'
1
2
  import { type ReactNode, useEffect } from 'react'
2
3
  import { useStore } from 'zustand'
3
- import { Screen } from '../shared/components/Screen'
4
4
  import { StatusScreen } from '../shared/components/StatusScreen'
5
- import { TopNav } from '../shared/components/TopNav'
6
5
  import { useKitStore } from '../shared/hooks/useKitStore'
7
6
  import { useAuth } from './hooks/useAuth'
8
7
  import { EmailVerification } from './pages/EmailVerification'
@@ -95,8 +94,8 @@ export function AuthFlow({
95
94
  contentClassName={step === 'sign-up' ? 'zd:px-0' : undefined}
96
95
  topNav={
97
96
  <TopNav
98
- {...(goBack !== null && { onBack: goBack })}
99
- onClose={handleClose}
97
+ {...(goBack !== null && { onLeftButtonClick: goBack })}
98
+ onRightButtonClick={handleClose}
100
99
  {...(title && { title })}
101
100
  {...(step === 'sign-up' && {
102
101
  ...(logo && { logo }),
@@ -1,7 +1,6 @@
1
- import { Text } from '@zerodev/react-ui'
1
+ import { PoweredBy, Text } from '@zerodev/react-ui'
2
2
  import { useSendMagicLink } from '@zerodev/wallet-react'
3
3
  import { useEffect, useState } from 'react'
4
- import { PoweredBy } from '../../shared/components/PoweredBy'
5
4
  import { StatusScreen } from '../../shared/components/StatusScreen'
6
5
  import { useAuth } from '../hooks/useAuth'
7
6
 
@@ -1,5 +1,4 @@
1
- import { Button } from '@zerodev/react-ui'
2
- import { PoweredBy } from '../../shared/components/PoweredBy'
1
+ import { Button, PoweredBy } from '@zerodev/react-ui'
3
2
  import { StatusScreen } from '../../shared/components/StatusScreen'
4
3
  import { useAuth } from '../hooks/useAuth'
5
4
  import { stripMagicLinkCodeFromUrl } from '../utils/url'
@@ -1,7 +1,6 @@
1
- import { Button, Text } from '@zerodev/react-ui'
1
+ import { Button, PoweredBy, Text } from '@zerodev/react-ui'
2
2
  import { useSendOTP, useVerifyOTP } from '@zerodev/wallet-react'
3
3
  import { useEffect, useState } from 'react'
4
- import { PoweredBy } from '../../shared/components/PoweredBy'
5
4
  import { CodeInput } from '../components/CodeInput'
6
5
  import { useAuth } from '../hooks/useAuth'
7
6
 
@@ -1,4 +1,12 @@
1
- import { Button, Icon, Input, ListItem, Text } from '@zerodev/react-ui'
1
+ import {
2
+ Button,
3
+ Icon,
4
+ Input,
5
+ ListItem,
6
+ ListItemChevron,
7
+ ListItemIcon,
8
+ Text,
9
+ } from '@zerodev/react-ui'
2
10
  import {
3
11
  useAuthenticateOAuth,
4
12
  useLoginPasskey,
@@ -235,9 +243,9 @@ export function SignUp() {
235
243
  <div className="zd:px-4 zd:flex zd:flex-col zd:gap-2">
236
244
  {enabledMethods.includes('google') && (
237
245
  <ListItem
238
- iconName="google"
246
+ icon={<ListItemIcon name="google" />}
239
247
  title="Google"
240
- chevron
248
+ trailing={<ListItemChevron />}
241
249
  className="zd:rounded-3xl"
242
250
  disabled={anyPending}
243
251
  onClick={handleGoogleAuth}
@@ -257,7 +265,7 @@ export function SignUp() {
257
265
  containerClassName="zd:rounded-3xl"
258
266
  onKeyDown={(e) => {
259
267
  if (e.key === 'Enter' && emailInput && !anyPending) {
260
- void handleEmailSubmit()
268
+ handleEmailSubmit()
261
269
  }
262
270
  }}
263
271
  >
@@ -1,7 +1,6 @@
1
- import { Button } from '@zerodev/react-ui'
1
+ import { Button, PoweredBy } from '@zerodev/react-ui'
2
2
  import { useVerifyMagicLink } from '@zerodev/wallet-react'
3
3
  import { useEffect, useRef, useState } from 'react'
4
- import { PoweredBy } from '../../shared/components/PoweredBy'
5
4
  import { StatusScreen } from '../../shared/components/StatusScreen'
6
5
  import { useAuth } from '../hooks/useAuth'
7
6
  import { stripMagicLinkCodeFromUrl } from '../utils/url'
@@ -1,6 +1,5 @@
1
- import { ListItem, Text } from '@zerodev/react-ui'
1
+ import { ListItem, ListItemIcon, PoweredBy, Text } from '@zerodev/react-ui'
2
2
  import { useConnect } from 'wagmi'
3
- import { PoweredBy } from '../../shared/components/PoweredBy'
4
3
  import { useAuth } from '../hooks/useAuth'
5
4
 
6
5
  export function WalletSelection() {
@@ -36,8 +35,17 @@ export function WalletSelection() {
36
35
  <ListItem
37
36
  key={connector.uid}
38
37
  title={connector.name}
39
- iconName="walletOutline"
40
- {...(connector.icon ? { imageUri: connector.icon } : {})}
38
+ icon={
39
+ connector.icon ? (
40
+ <img
41
+ src={connector.icon}
42
+ alt=""
43
+ className="zd:w-6 zd:h-6"
44
+ />
45
+ ) : (
46
+ <ListItemIcon name="walletOutline" />
47
+ )
48
+ }
41
49
  disabled={isPending}
42
50
  onClick={() => handleSelect(connector)}
43
51
  className="zd:rounded-3xl"
@@ -1,5 +1,4 @@
1
- import { Text } from '@zerodev/react-ui'
2
- import { PoweredBy } from '../PoweredBy'
1
+ import { PoweredBy, Text } from '@zerodev/react-ui'
3
2
 
4
3
  export function SignUpFooter({
5
4
  termsAndConditionsUrl,
@@ -1,6 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- export declare function PoweredBy({ className, style, }: {
3
- className?: string;
4
- style?: CSSProperties;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/components/PoweredBy/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,KAAK,GACN,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,2CAiBA"}
@@ -1,23 +0,0 @@
1
- interface RadialStop {
2
- offset: number;
3
- color: string;
4
- opacity: number;
5
- }
6
- export interface RadialLayer {
7
- id: string;
8
- matrix: [number, number, number, number, number, number];
9
- fillOpacity: number;
10
- stops: RadialStop[];
11
- }
12
- interface RadialRect {
13
- x: number;
14
- y: number;
15
- width: number;
16
- height: number;
17
- }
18
- export declare function EllipticalRadial({ layer, rect, }: {
19
- layer: RadialLayer;
20
- rect: RadialRect;
21
- }): import("react/jsx-runtime").JSX.Element;
22
- export {};
23
- //# sourceMappingURL=EllipticalRadial.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EllipticalRadial.d.ts","sourceRoot":"","sources":["../../../../../src/shared/components/Screen/EllipticalRadial.tsx"],"names":[],"mappings":"AAAA,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IAGV,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAExD,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB;AAGD,UAAU,UAAU;IAClB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,EAAE,WAAW,CAAA;IAClB,IAAI,EAAE,UAAU,CAAA;CACjB,2CAkCA"}
@@ -1,4 +0,0 @@
1
- export declare function MultiRadialBackground(): import("react/jsx-runtime").JSX.Element;
2
- export declare function CardGlow(): import("react/jsx-runtime").JSX.Element;
3
- export declare function WrapperBorder(): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=MultiRadialBackground.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MultiRadialBackground.d.ts","sourceRoot":"","sources":["../../../../../src/shared/components/Screen/MultiRadialBackground.tsx"],"names":[],"mappings":"AAYA,wBAAgB,qBAAqB,4CAkBpC;AAYD,wBAAgB,QAAQ,4CAiJvB;AAeD,wBAAgB,aAAa,4CAwH5B"}
@@ -1,10 +0,0 @@
1
- import type { CSSProperties, ReactNode } from 'react';
2
- export declare function Screen({ children, className, contentClassName, size, style, topNav, }: {
3
- children: ReactNode;
4
- className?: string | undefined;
5
- contentClassName?: string | undefined;
6
- size?: 'sm' | 'md' | 'lg' | undefined;
7
- style?: CSSProperties | undefined;
8
- topNav?: ReactNode;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/components/Screen/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUrD,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,IAAW,EACX,KAAK,EACL,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;IACrC,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IACjC,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB,2CA2DA"}
@@ -1,10 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export declare const TOP_NAV_HEIGHT = 52;
3
- export declare function TopNav({ onBack, onClose, title, logo, className, }: {
4
- onBack?: () => void;
5
- onClose: () => void;
6
- title?: string;
7
- logo?: ReactNode;
8
- className?: string;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/components/TopNav/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,eAAO,MAAM,cAAc,KAAK,CAAA;AAEhC,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,OAAO,EACP,KAAK,EACL,IAAI,EACJ,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,2CA8BA"}
@@ -1,27 +0,0 @@
1
- import { cn, Text, ZeroDevLogo } from '@zerodev/react-ui'
2
- import type { CSSProperties } from 'react'
3
-
4
- export function PoweredBy({
5
- className,
6
- style,
7
- }: {
8
- className?: string
9
- style?: CSSProperties
10
- }) {
11
- return (
12
- <div
13
- className={cn(
14
- 'zd:gap-1.5 zd:flex zd:flex-row zd:items-center',
15
- className,
16
- )}
17
- >
18
- <Text>Powered by</Text>
19
- <ZeroDevLogo
20
- variant="lockup"
21
- tone="black"
22
- className="zd:h-4.5 zd:w-auto"
23
- style={style}
24
- />
25
- </div>
26
- )
27
- }
@@ -1,65 +0,0 @@
1
- interface RadialStop {
2
- offset: number
3
- color: string
4
- opacity: number
5
- }
6
-
7
- export interface RadialLayer {
8
- id: string
9
- // Figma-exported gradientTransform matrix: the unit circle
10
- // (center 0,0 radius 1) mapped to a rotated/scaled/translated ellipse.
11
- matrix: [number, number, number, number, number, number]
12
- // Opacity of the rect the gradient fills (Figma exports this on the <rect>).
13
- fillOpacity: number
14
- stops: RadialStop[]
15
- }
16
-
17
- // The rect each gradient fills, in the parent SVG's viewBox coordinates.
18
- interface RadialRect {
19
- x: number
20
- y: number
21
- width: number
22
- height: number
23
- }
24
-
25
- export function EllipticalRadial({
26
- layer,
27
- rect,
28
- }: {
29
- layer: RadialLayer
30
- rect: RadialRect
31
- }) {
32
- const { id, matrix, fillOpacity, stops } = layer
33
-
34
- return (
35
- <>
36
- <defs>
37
- <radialGradient
38
- id={id}
39
- cx="0"
40
- cy="0"
41
- r="1"
42
- gradientUnits="userSpaceOnUse"
43
- gradientTransform={`matrix(${matrix.join(' ')})`}
44
- >
45
- {stops.map((s, i) => (
46
- <stop
47
- key={s.color + i.toString()}
48
- offset={s.offset}
49
- stopColor={s.color}
50
- stopOpacity={s.opacity}
51
- />
52
- ))}
53
- </radialGradient>
54
- </defs>
55
- <rect
56
- x={rect.x}
57
- y={rect.y}
58
- width={rect.width}
59
- height={rect.height}
60
- fill={`url(#${id})`}
61
- fillOpacity={fillOpacity}
62
- />
63
- </>
64
- )
65
- }