@jaw.id/ui 0.0.3 → 0.0.4

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 (66) hide show
  1. package/cjs-error.cjs +3 -0
  2. package/dist/{ccip-BYa9WTP9.js → ccip-yRQNp5zr.js} +1 -1
  3. package/dist/{index-DBYNWeek.js → index-BcDVfcdq.js} +20832 -20511
  4. package/dist/index.js +1 -1
  5. package/package.json +8 -2
  6. package/.babelrc +0 -12
  7. package/CHANGELOG.md +0 -23
  8. package/components.json +0 -22
  9. package/postcss.config.cjs +0 -6
  10. package/src/components/ConnectDialog/index.tsx +0 -270
  11. package/src/components/ConnectDialog/types.ts +0 -34
  12. package/src/components/DefaultDialog/index.tsx +0 -99
  13. package/src/components/Eip712Dialog/index.tsx +0 -525
  14. package/src/components/Eip712Dialog/types.ts +0 -27
  15. package/src/components/FeeTokenSelector/index.tsx +0 -308
  16. package/src/components/OnboardingDialog/index.tsx +0 -317
  17. package/src/components/OnboardingDialog/types.ts +0 -43
  18. package/src/components/OrSeparator/index.tsx +0 -13
  19. package/src/components/PermissionDialog/index.tsx +0 -598
  20. package/src/components/PermissionDialog/types.ts +0 -77
  21. package/src/components/SignatureDialog/index.tsx +0 -180
  22. package/src/components/SignatureDialog/types.ts +0 -27
  23. package/src/components/SiweDialog/index.tsx +0 -231
  24. package/src/components/SiweDialog/types.ts +0 -34
  25. package/src/components/TransactionDialog/DecodedCalldata.tsx +0 -79
  26. package/src/components/TransactionDialog/index.tsx +0 -663
  27. package/src/components/TransactionDialog/types.ts +0 -54
  28. package/src/components/ui/accordion.tsx +0 -66
  29. package/src/components/ui/avatar.tsx +0 -53
  30. package/src/components/ui/button.tsx +0 -59
  31. package/src/components/ui/card.tsx +0 -92
  32. package/src/components/ui/checkbox.tsx +0 -32
  33. package/src/components/ui/dialog.tsx +0 -183
  34. package/src/components/ui/dropdown-menu.tsx +0 -258
  35. package/src/components/ui/form.tsx +0 -167
  36. package/src/components/ui/input.tsx +0 -60
  37. package/src/components/ui/label.tsx +0 -24
  38. package/src/components/ui/popover.tsx +0 -48
  39. package/src/components/ui/scroll-area.tsx +0 -58
  40. package/src/components/ui/select.tsx +0 -160
  41. package/src/components/ui/separator.tsx +0 -28
  42. package/src/components/ui/sheet.tsx +0 -169
  43. package/src/components/ui/spinner.tsx +0 -18
  44. package/src/components/ui/tabs.tsx +0 -69
  45. package/src/components/ui/tooltip.tsx +0 -61
  46. package/src/hooks/index.ts +0 -5
  47. package/src/hooks/useChainIconURI.tsx +0 -117
  48. package/src/hooks/useDecodedCalldata.ts +0 -128
  49. package/src/hooks/useFeeTokenPrice.tsx +0 -36
  50. package/src/hooks/useGasEstimation.ts +0 -474
  51. package/src/hooks/useIsMobile.ts +0 -36
  52. package/src/icons/index.tsx +0 -114
  53. package/src/index.ts +0 -19
  54. package/src/lib/utils.ts +0 -6
  55. package/src/react/ReactUIHandler.tsx +0 -3004
  56. package/src/react/index.ts +0 -2
  57. package/src/styles.css +0 -210
  58. package/src/utils/formatAddress.ts +0 -24
  59. package/src/utils/index.ts +0 -4
  60. package/src/utils/justaNameInstance.ts +0 -25
  61. package/src/utils/tokenBalance.ts +0 -41
  62. package/src/utils/tokenPrice.ts +0 -58
  63. package/tailwind.config.js +0 -130
  64. package/tsconfig.json +0 -19
  65. package/tsconfig.lib.json +0 -43
  66. package/vite.config.ts +0 -45
@@ -1,114 +0,0 @@
1
- export const CloseIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
2
- return (
3
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" {...props}>
4
- <g opacity="0.7">
5
- <path d="M12 4L4 12M4 4L12 12" stroke="#18181B" strokeWidth="1.33" strokeLinecap="round" strokeLinejoin="round" />
6
- </g>
7
- </svg>
8
- )
9
- }
10
-
11
- export const WalletIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
12
- return (
13
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="25" viewBox="0 0 24 25" fill="none" {...props}>
14
- <path d="M19 7.5V4.5C19 4.23478 18.8946 3.98043 18.7071 3.79289C18.5196 3.60536 18.2652 3.5 18 3.5H5C4.46957 3.5 3.96086 3.71071 3.58579 4.08579C3.21071 4.46086 3 4.96957 3 5.5M3 5.5C3 6.03043 3.21071 6.53914 3.58579 6.91421C3.96086 7.28929 4.46957 7.5 5 7.5H20C20.2652 7.5 20.5196 7.60536 20.7071 7.79289C20.8946 7.98043 21 8.23478 21 8.5V12.5M3 5.5V19.5C3 20.0304 3.21071 20.5391 3.58579 20.9142C3.96086 21.2893 4.46957 21.5 5 21.5H20C20.2652 21.5 20.5196 21.3946 20.7071 21.2071C20.8946 21.0196 21 20.7652 21 20.5V16.5M21 12.5H18C17.4696 12.5 16.9609 12.7107 16.5858 13.0858C16.2107 13.4609 16 13.9696 16 14.5C16 15.0304 16.2107 15.5391 16.5858 15.9142C16.9609 16.2893 17.4696 16.5 18 16.5H21M21 12.5C21.2652 12.5 21.5196 12.6054 21.7071 12.7929C21.8946 12.9804 22 13.2348 22 13.5V15.5C22 15.7652 21.8946 16.0196 21.7071 16.2071C21.5196 16.3946 21.2652 16.5 21 16.5" stroke={props.stroke ?? '#71717A'} strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
15
- </svg>
16
- )
17
- }
18
-
19
- export const CopyIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
20
- return (
21
- <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10" fill="none" {...props}>
22
- <g clipPath="url(#clip0_87_12416)">
23
- <path d="M1.66665 6.66659C1.20831 6.66659 0.833313 6.29159 0.833313 5.83325V1.66659C0.833313 1.20825 1.20831 0.833252 1.66665 0.833252H5.83331C6.29165 0.833252 6.66665 1.20825 6.66665 1.66659M4.16665 3.33325H8.33331C8.79355 3.33325 9.16665 3.70635 9.16665 4.16659V8.33325C9.16665 8.79349 8.79355 9.16659 8.33331 9.16659H4.16665C3.70641 9.16659 3.33331 8.79349 3.33331 8.33325V4.16659C3.33331 3.70635 3.70641 3.33325 4.16665 3.33325Z" stroke="#71717A" strokeLinecap="round" strokeLinejoin="round" />
24
- </g>
25
- <defs>
26
- <clipPath id="clip0_87_12416">
27
- <rect width="10" height="10" fill="white" />
28
- </clipPath>
29
- </defs>
30
- </svg>
31
- )
32
- }
33
-
34
- export const CopiedIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
35
- return (
36
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
37
- <path
38
- fill={props.fill || '#71717A'}
39
- d="m11.602 13.76 1.412 1.412 8.466-8.466 1.414 1.415-9.88 9.88-6.364-6.365 1.414-1.414 2.125 2.125zm.002-2.828 4.952-4.953 1.41 1.41-4.952 4.953zm-2.827 5.655L7.364 18 1 11.636l1.414-1.414 1.413 1.413-.001.001z"
40
- />
41
- </svg>
42
- )
43
- }
44
-
45
- export const EyeIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
46
- return (
47
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" {...props}>
48
- <path d="M1.33337 8.00004C1.33337 8.00004 3.33337 3.33337 8.00004 3.33337C12.6667 3.33337 14.6667 8.00004 14.6667 8.00004C14.6667 8.00004 12.6667 12.6667 8.00004 12.6667C3.33337 12.6667 1.33337 8.00004 1.33337 8.00004Z" stroke="#18181B" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
49
- <path d="M8.00004 10C9.10461 10 10 9.10461 10 8.00004C10 6.89547 9.10461 6.00004 8.00004 6.00004C6.89547 6.00004 6.00004 6.89547 6.00004 8.00004C6.00004 9.10461 6.89547 10 8.00004 10Z" stroke="#18181B" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
50
- </svg>
51
- )
52
- }
53
-
54
- export const BadgeDollarIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
55
- return (
56
- <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15" fill="none" {...props}>
57
- <path d="M10.0907 4.74674H6.09066C5.73704 4.74674 5.3979 4.88722 5.14785 5.13727C4.8978 5.38732 4.75732 5.72646 4.75732 6.08008C4.75732 6.4337 4.8978 6.77284 5.14785 7.02289C5.3979 7.27294 5.73704 7.41341 6.09066 7.41341H8.75732C9.11095 7.41341 9.45008 7.55389 9.70013 7.80394C9.95018 8.05398 10.0907 8.39312 10.0907 8.74674C10.0907 9.10037 9.95018 9.4395 9.70013 9.68955C9.45008 9.9396 9.11095 10.0801 8.75732 10.0801H4.75732M7.42399 11.4134V3.41341M1.99062 5.16014C1.89332 4.72183 1.90826 4.26604 2.03406 3.83504C2.15986 3.40403 2.39246 3.01177 2.71027 2.69462C3.02808 2.37747 3.42083 2.14571 3.85209 2.02081C4.28336 1.89591 4.73918 1.88192 5.17729 1.98014C5.41843 1.60301 5.75063 1.29265 6.14326 1.07767C6.53589 0.862685 6.97632 0.75 7.42396 0.75C7.87159 0.75 8.31202 0.862685 8.70466 1.07767C9.09729 1.29265 9.42948 1.60301 9.67062 1.98014C10.1094 1.88149 10.566 1.89542 10.998 2.02062C11.4299 2.14582 11.8232 2.37824 12.1412 2.69625C12.4592 3.01425 12.6916 3.40752 12.8168 3.83948C12.942 4.27143 12.9559 4.72803 12.8573 5.16681C13.2344 5.40795 13.5448 5.74014 13.7598 6.13278C13.9747 6.52541 14.0874 6.96584 14.0874 7.41348C14.0874 7.86111 13.9747 8.30154 13.7598 8.69418C13.5448 9.08681 13.2344 9.419 12.8573 9.66014C12.9555 10.0983 12.9415 10.5541 12.8166 10.9853C12.6917 11.4166 12.46 11.8093 12.1428 12.1272C11.8257 12.445 11.4334 12.6776 11.0024 12.8034C10.5714 12.9292 10.1156 12.9441 9.67729 12.8468C9.43646 13.2254 9.10401 13.5371 8.71071 13.753C8.31741 13.969 7.87597 14.0822 7.42729 14.0822C6.97861 14.0822 6.53717 13.969 6.14387 13.753C5.75057 13.5371 5.41812 13.2254 5.17729 12.8468C4.73918 12.945 4.28336 12.931 3.85209 12.8061C3.42083 12.6812 3.02808 12.4495 2.71027 12.1323C2.39246 11.8152 2.15986 11.4229 2.03406 10.9919C1.90826 10.5609 1.89332 10.1051 1.99062 9.66681C1.61059 9.4263 1.29757 9.09359 1.08066 8.69962C0.863745 8.30565 0.75 7.86321 0.75 7.41348C0.75 6.96374 0.863745 6.52131 1.08066 6.12733C1.29757 5.73336 1.61059 5.40065 1.99062 5.16014Z" stroke="#18181B" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
58
- </svg>
59
- )
60
- }
61
-
62
- export const LockIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
63
- return (
64
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" {...props}>
65
- <path d="M4.66667 6.66671V4.66671C4.66667 3.78265 5.01786 2.93481 5.64298 2.30968C6.2681 1.68456 7.11595 1.33337 8 1.33337C8.88406 1.33337 9.7319 1.68456 10.357 2.30968C10.9821 2.93481 11.3333 3.78265 11.3333 4.66671V6.66671M8.66667 10.6667C8.66667 11.0349 8.36819 11.3334 8 11.3334C7.63181 11.3334 7.33333 11.0349 7.33333 10.6667C7.33333 10.2985 7.63181 10 8 10C8.36819 10 8.66667 10.2985 8.66667 10.6667ZM3.33333 6.66671H12.6667C13.403 6.66671 14 7.26366 14 8.00004V13.3334C14 14.0698 13.403 14.6667 12.6667 14.6667H3.33333C2.59695 14.6667 2 14.0698 2 13.3334V8.00004C2 7.26366 2.59695 6.66671 3.33333 6.66671Z" stroke="#18181B" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
66
- </svg>
67
- )
68
- }
69
-
70
- // Token Icons
71
- export const EthIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
72
- return (
73
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
74
- <circle cx="12" cy="12" r="12" fill="#627EEA"/>
75
- <path d="M12.0001 3V9.6525L17.4976 12.165L12.0001 3Z" fill="white" fillOpacity="0.602"/>
76
- <path d="M12 3L6.5 12.165L12 9.6525V3Z" fill="white"/>
77
- <path d="M12.0001 16.4759V20.9971L17.5001 13.2109L12.0001 16.4759Z" fill="white" fillOpacity="0.602"/>
78
- <path d="M12 20.9971V16.4751L6.5 13.2109L12 20.9971Z" fill="white"/>
79
- <path d="M12.0001 15.4298L17.4976 12.1648L12.0001 9.6543V15.4298Z" fill="white" fillOpacity="0.2"/>
80
- <path d="M6.5 12.1648L12 15.4298V9.6543L6.5 12.1648Z" fill="white" fillOpacity="0.602"/>
81
- </svg>
82
- )
83
- }
84
-
85
- export const UsdcIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
86
- return (
87
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
88
- <circle cx="12" cy="12" r="12" fill="#2775CA"/>
89
- <path d="M15.2 13.9C15.2 12.3 14.2 11.7 12.2 11.5C10.7 11.3 10.4 10.9 10.4 10.2C10.4 9.5 10.9 9.1 11.9 9.1C12.8 9.1 13.3 9.4 13.5 10.1C13.5 10.2 13.6 10.2 13.7 10.2H14.5C14.6 10.2 14.7 10.1 14.7 10V10C14.5 9 13.7 8.2 12.5 8.1V7.1C12.5 7 12.4 6.9 12.3 6.9H11.6C11.5 6.9 11.4 7 11.4 7.1V8.1C10 8.3 9.1 9.2 9.1 10.4C9.1 11.9 10 12.5 12 12.7C13.4 12.9 13.9 13.2 13.9 14C13.9 14.8 13.2 15.3 12.2 15.3C10.9 15.3 10.5 14.8 10.3 14.1C10.3 14 10.2 13.9 10.1 13.9H9.2C9.1 13.9 9 14 9 14.1C9.2 15.3 9.9 16.1 11.5 16.3V17.3C11.5 17.4 11.6 17.5 11.7 17.5H12.4C12.5 17.5 12.6 17.4 12.6 17.3V16.3C14 16 15.2 15.1 15.2 13.9Z" fill="white"/>
90
- <path d="M9.7 18.2C6.4 17 4.7 13.4 5.9 10.1C6.5 8.5 7.7 7.2 9.3 6.6C9.4 6.5 9.4 6.5 9.4 6.4V5.7C9.4 5.6 9.4 5.5 9.3 5.5C9.3 5.5 9.2 5.5 9.2 5.5C5.3 6.8 3.2 11 4.5 14.9C5.3 17.2 7.1 18.9 9.3 19.7C9.4 19.7 9.4 19.7 9.5 19.7C9.5 19.6 9.5 19.6 9.5 19.5V18.8C9.4 18.5 9.4 18.4 9.7 18.2Z" fill="white"/>
91
- <path d="M14.7 5.5C14.6 5.5 14.6 5.5 14.5 5.5C14.5 5.6 14.5 5.6 14.5 5.7V6.4C14.5 6.5 14.6 6.6 14.7 6.6C18 7.8 19.7 11.4 18.5 14.7C17.9 16.3 16.7 17.6 15.1 18.2C15 18.3 15 18.3 15 18.4V19.1C15 19.2 15 19.3 15.1 19.3C15.1 19.3 15.2 19.3 15.2 19.3C19.1 18 21.2 13.8 19.9 9.9C19 7.6 17.2 5.9 14.7 5.5Z" fill="white"/>
92
- </svg>
93
- )
94
- }
95
-
96
- export const UsdtIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
97
- return (
98
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
99
- <circle cx="12" cy="12" r="12" fill="#26A17B"/>
100
- <path d="M13.4 12.6V12.6C13.3 12.6 12.7 12.7 12 12.7C11.4 12.7 10.7 12.6 10.6 12.6C8.4 12.5 6.8 12 6.8 11.4C6.8 10.8 8.4 10.3 10.6 10.2V12.1C10.7 12.1 11.4 12.2 12 12.2C12.7 12.2 13.3 12.1 13.4 12.1V10.2C15.6 10.3 17.2 10.8 17.2 11.4C17.2 12 15.6 12.5 13.4 12.6ZM13.4 10V8.3H16.8V6H7.2V8.3H10.6V10C8 10.1 6 10.8 6 11.6C6 12.4 8 13.1 10.6 13.2V18H13.4V13.2C16 13.1 18 12.4 18 11.6C18 10.8 16 10.1 13.4 10Z" fill="white"/>
101
- </svg>
102
- )
103
- }
104
-
105
- // Generic token icon for unknown tokens
106
- export const GenericTokenIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
107
- return (
108
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
109
- <circle cx="12" cy="12" r="12" fill="#9CA3AF"/>
110
- <circle cx="12" cy="12" r="6" stroke="white" strokeWidth="1.5" fill="none"/>
111
- <circle cx="12" cy="12" r="2" fill="white"/>
112
- </svg>
113
- )
114
- }
package/src/index.ts DELETED
@@ -1,19 +0,0 @@
1
- import './styles.css';
2
-
3
- export * from './components/DefaultDialog';
4
- export * from './components/OrSeparator';
5
- export * from './components/OnboardingDialog';
6
- export * from './components/TransactionDialog';
7
- export * from './components/SignatureDialog';
8
- export * from './components/SiweDialog';
9
- export * from './components/ConnectDialog';
10
- export * from './components/Eip712Dialog';
11
- export * from './components/PermissionDialog';
12
- export * from './components/FeeTokenSelector';
13
- export * from './lib/utils';
14
- export * from './icons';
15
- export * from './hooks';
16
- export * from './utils';
17
-
18
- // React integration
19
- export * from './react';
package/src/lib/utils.ts DELETED
@@ -1,6 +0,0 @@
1
- import { clsx, type ClassValue } from "clsx"
2
- import { twMerge } from "tailwind-merge"
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs))
6
- }