@zerodev/wallet-react-ui 0.0.4 → 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 (51) hide show
  1. package/dist/_types/auth/components/BlobAnimation/index.d.ts +1 -1
  2. package/dist/_types/auth/components/BlobAnimation/index.d.ts.map +1 -1
  3. package/dist/_types/auth/components/CodeInput/index.d.ts +1 -1
  4. package/dist/_types/auth/components/CodeInput/index.d.ts.map +1 -1
  5. package/dist/_types/auth/index.d.ts +1 -1
  6. package/dist/_types/auth/index.d.ts.map +1 -1
  7. package/dist/_types/auth/pages/EmailVerification.d.ts +1 -1
  8. package/dist/_types/auth/pages/EmailVerification.d.ts.map +1 -1
  9. package/dist/_types/auth/pages/ErrorScreen.d.ts +1 -1
  10. package/dist/_types/auth/pages/ErrorScreen.d.ts.map +1 -1
  11. package/dist/_types/auth/pages/OtpInput.d.ts +1 -1
  12. package/dist/_types/auth/pages/OtpInput.d.ts.map +1 -1
  13. package/dist/_types/auth/pages/SignUp.d.ts +1 -1
  14. package/dist/_types/auth/pages/SignUp.d.ts.map +1 -1
  15. package/dist/_types/auth/pages/Verifying.d.ts +1 -1
  16. package/dist/_types/auth/pages/Verifying.d.ts.map +1 -1
  17. package/dist/_types/auth/pages/WalletSelection.d.ts +1 -1
  18. package/dist/_types/auth/pages/WalletSelection.d.ts.map +1 -1
  19. package/dist/_types/shared/components/SignUpFooter/index.d.ts +1 -1
  20. package/dist/_types/shared/components/SignUpFooter/index.d.ts.map +1 -1
  21. package/dist/_types/shared/components/StatusScreen/index.d.ts +1 -1
  22. package/dist/_types/shared/components/StatusScreen/index.d.ts.map +1 -1
  23. package/dist/index.cjs +3 -3
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.mjs +454 -881
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/styles.css +2 -2
  28. package/package.json +8 -7
  29. package/src/auth/index.tsx +3 -4
  30. package/src/auth/pages/EmailVerification.tsx +1 -2
  31. package/src/auth/pages/ErrorScreen.tsx +1 -2
  32. package/src/auth/pages/OtpInput.tsx +1 -2
  33. package/src/auth/pages/SignUp.tsx +11 -3
  34. package/src/auth/pages/Verifying.tsx +1 -2
  35. package/src/auth/pages/WalletSelection.tsx +12 -4
  36. package/src/shared/components/SignUpFooter/index.tsx +1 -2
  37. package/dist/_types/shared/components/PoweredBy/index.d.ts +0 -6
  38. package/dist/_types/shared/components/PoweredBy/index.d.ts.map +0 -1
  39. package/dist/_types/shared/components/Screen/EllipticalRadial.d.ts +0 -23
  40. package/dist/_types/shared/components/Screen/EllipticalRadial.d.ts.map +0 -1
  41. package/dist/_types/shared/components/Screen/MultiRadialBackground.d.ts +0 -4
  42. package/dist/_types/shared/components/Screen/MultiRadialBackground.d.ts.map +0 -1
  43. package/dist/_types/shared/components/Screen/index.d.ts +0 -10
  44. package/dist/_types/shared/components/Screen/index.d.ts.map +0 -1
  45. package/dist/_types/shared/components/TopNav/index.d.ts +0 -10
  46. package/dist/_types/shared/components/TopNav/index.d.ts.map +0 -1
  47. package/src/shared/components/PoweredBy/index.tsx +0 -27
  48. package/src/shared/components/Screen/EllipticalRadial.tsx +0 -65
  49. package/src/shared/components/Screen/MultiRadialBackground.tsx +0 -323
  50. package/src/shared/components/Screen/index.tsx +0 -85
  51. package/src/shared/components/TopNav/index.tsx +0 -48
@@ -1,85 +0,0 @@
1
- import { cn } from '@zerodev/react-ui'
2
- import type { CSSProperties, ReactNode } from 'react'
3
- import { TOP_NAV_HEIGHT } from '../TopNav'
4
- import {
5
- CardGlow,
6
- MultiRadialBackground,
7
- WrapperBorder,
8
- } from './MultiRadialBackground'
9
-
10
- const CONTENT_PADDING_TOP = TOP_NAV_HEIGHT + 16
11
-
12
- export function Screen({
13
- children,
14
- className,
15
- contentClassName,
16
- size = 'lg',
17
- style,
18
- topNav,
19
- }: {
20
- children: ReactNode
21
- className?: string | undefined
22
- contentClassName?: string | undefined
23
- size?: 'sm' | 'md' | 'lg' | undefined
24
- style?: CSSProperties | undefined
25
- topNav?: ReactNode
26
- }) {
27
- return (
28
- <div
29
- data-zd-size={size}
30
- className={cn(
31
- // 400×810 by default, but never taller/wider than the parent — a
32
- // consumer wrapper with its own size caps the Screen (max-w/h-full =
33
- // 100% of the parent). overflow-hidden clips the frame to its rounded
34
- // border ring; content scrolls in the inner div below.
35
- 'zd:relative zd:flex zd:flex-col zd:text-left',
36
- // w-100 = 400px, h-202.5 = 810px at density 1; both compile to
37
- // calc(var(--zd-spacing) * N), so they scale with the size variants.
38
- // rounded-[38px] = inner card radius (32px) + the 6px border-ring gap,
39
- // so the ring has a uniform width — equal inner/outer radii would make
40
- // the corners read thicker than the sides.
41
- 'zd:w-100 zd:h-202.5 zd:max-w-full zd:max-h-full zd:overflow-hidden zd:rounded-[38px]',
42
- className,
43
- )}
44
- style={style}
45
- >
46
- {/* Gradient border layer — fills the frame; the card on top has a 6px
47
- margin so this shows as the border ring. */}
48
- <WrapperBorder />
49
- {/* Inner card sits on top with a 6px margin, exposing the border ring.
50
- Its own gradient (base + CardGlow) fills the card so the colour stays
51
- vivid and distinct from the border. */}
52
- <div
53
- className={cn(
54
- // m-1.5 = calc(var(--zd-spacing) * 1.5) = 6px at density 1, so the
55
- // gradient border ring thins with the size variants. (Corner radii
56
- // stay fixed, so at smaller sizes the ring is marginally non-uniform
57
- // at the corners — a minor cosmetic trade-off.)
58
- 'zd:flex zd:flex-1 zd:flex-col zd:m-1.5 zd:px-4 zd:overflow-hidden zd:rounded-4xl zd:relative',
59
- contentClassName,
60
- )}
61
- // clip-path clips backdrop-filter to the rounded corners; plain
62
- // overflow-hidden does not (WebKit/Chromium leaves scrolled blurred
63
- // children bleeding past the radius). Must match rounded-4xl (32px).
64
- style={{ clipPath: 'inset(0 round 32px)' }}
65
- >
66
- <MultiRadialBackground />
67
- <CardGlow />
68
- <div className="zd:relative zd:z-10 zd:flex zd:flex-1 zd:flex-col zd:min-h-0">
69
- {topNav}
70
- <div
71
- className="zd:flex zd:flex-1 zd:flex-col zd:min-h-0 zd:overflow-y-auto zd:overflow-x-hidden"
72
- // Scale via --zd-spacing (matches TopNav's scaled height) so the
73
- // top padding shrinks with the frame — otherwise the fixed 68px
74
- // eats a disproportionate share at smaller sizes and overflows.
75
- style={{
76
- paddingTop: `calc(${CONTENT_PADDING_TOP / 4} * var(--zd-spacing))`,
77
- }}
78
- >
79
- {children}
80
- </div>
81
- </div>
82
- </div>
83
- </div>
84
- )
85
- }
@@ -1,48 +0,0 @@
1
- import { cn, IconButton, Text } from '@zerodev/react-ui'
2
- import type { ReactNode } from 'react'
3
-
4
- export const TOP_NAV_HEIGHT = 52
5
-
6
- export function TopNav({
7
- onBack,
8
- onClose,
9
- title,
10
- logo,
11
- className,
12
- }: {
13
- onBack?: () => void
14
- onClose: () => void
15
- title?: string
16
- logo?: ReactNode
17
- className?: string
18
- }) {
19
- return (
20
- <div
21
- className={cn(
22
- 'zd:absolute zd:top-4 zd:left-0 zd:right-0 zd:flex zd:flex-row zd:items-center zd:justify-between',
23
- className,
24
- )}
25
- // Scale via --zd-spacing (the 4px base) like every spacing utility, so
26
- // the nav height tracks the density variants and doesn't eat a
27
- // disproportionate share of the shrunken frame at smaller sizes.
28
- style={{ height: `calc(${TOP_NAV_HEIGHT / 4} * var(--zd-spacing))` }}
29
- >
30
- {onBack ? (
31
- <IconButton iconName="chevronLeft" onClick={onBack} />
32
- ) : (
33
- <div className="zd:h-13 zd:w-13" />
34
- )}
35
- {logo && (
36
- <div className="zd:absolute zd:left-0 zd:right-0 zd:flex zd:items-center zd:justify-center zd:pointer-events-none">
37
- {logo}
38
- </div>
39
- )}
40
- {title && (
41
- <div className="zd:absolute zd:left-0 zd:right-0 zd:flex zd:items-center zd:justify-center zd:pointer-events-none">
42
- <Text className="zd:text-body1">{title}</Text>
43
- </div>
44
- )}
45
- <IconButton iconName="x" onClick={onClose} />
46
- </div>
47
- )
48
- }