@thenamespace/ens-components 0.3.0 → 0.5.0
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/dist/index.css +121 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +48 -34
- package/dist/index.js +222 -104
- package/dist/index.js.map +1 -1
- package/dist/types/components/atoms/index.d.ts +1 -0
- package/dist/types/components/atoms/textarea/Textarea.d.ts +13 -0
- package/dist/types/constants/records/contenthashConstants.d.ts +1 -0
- package/dist/types/hooks/useWeb3Clients.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { EnsRecords as EnsRecords$1, ChainName as ChainName$1, ContenthashProtocol as ContenthashProtocol$1, EnsTextRecord as EnsTextRecord$1, EnsAddressRecord as EnsAddressRecord$1, EnsContenthashRecord as EnsContenthashRecord$1 } from '@/types';
|
|
3
|
-
import React$1
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { ReactNode } from 'react';
|
|
4
5
|
import { IconName as IconName$1 } from '@/components';
|
|
5
6
|
import * as node_modules_viem__types_actions_siwe_verifySiweMessage from 'node_modules/viem/_types/actions/siwe/verifySiweMessage';
|
|
6
7
|
import * as wagmi from 'wagmi';
|
|
@@ -74,43 +75,55 @@ interface NavbarProfileCardProps {
|
|
|
74
75
|
onLogout?: () => void;
|
|
75
76
|
className?: string;
|
|
76
77
|
}
|
|
77
|
-
declare const NavbarProfileCard:
|
|
78
|
+
declare const NavbarProfileCard: React__default.FC<NavbarProfileCardProps>;
|
|
78
79
|
|
|
79
80
|
type ButtonVariant = "solid" | "outline" | "ghost";
|
|
80
81
|
type ButtonSize = "sm" | "md" | "lg";
|
|
81
|
-
interface ButtonProps extends Omit<
|
|
82
|
+
interface ButtonProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, "prefix"> {
|
|
82
83
|
variant?: ButtonVariant;
|
|
83
84
|
size?: ButtonSize;
|
|
84
85
|
loading?: boolean;
|
|
85
86
|
prefix?: ReactNode;
|
|
86
87
|
dataTestId?: string;
|
|
87
88
|
}
|
|
88
|
-
declare const Button:
|
|
89
|
+
declare const Button: React__default.FC<ButtonProps>;
|
|
89
90
|
|
|
90
91
|
type InputType = "text" | "number";
|
|
91
92
|
type InputSize = "sm" | "md" | "lg";
|
|
92
|
-
interface InputProps extends Omit<
|
|
93
|
+
interface InputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> {
|
|
93
94
|
type?: InputType;
|
|
94
95
|
size?: InputSize;
|
|
95
|
-
prefix?:
|
|
96
|
-
suffix?:
|
|
96
|
+
prefix?: React__default.ReactNode;
|
|
97
|
+
suffix?: React__default.ReactNode;
|
|
97
98
|
disabled?: boolean;
|
|
98
99
|
error?: boolean;
|
|
99
100
|
dataTestId?: string;
|
|
100
101
|
}
|
|
101
|
-
declare const Input:
|
|
102
|
+
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
103
|
+
|
|
104
|
+
type TextareaSize = "sm" | "md" | "lg";
|
|
105
|
+
interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "prefix"> {
|
|
106
|
+
size?: TextareaSize;
|
|
107
|
+
prefix?: React.ReactNode;
|
|
108
|
+
suffix?: React.ReactNode;
|
|
109
|
+
disabled?: boolean;
|
|
110
|
+
error?: boolean;
|
|
111
|
+
dataTestId?: string;
|
|
112
|
+
rows?: number;
|
|
113
|
+
}
|
|
114
|
+
declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
102
115
|
|
|
103
116
|
type TextSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
104
117
|
type TextWeight = "light" | "regular" | "medium" | "bold";
|
|
105
118
|
type TextColor = "primary" | "white" | "grey" | "danger";
|
|
106
|
-
interface TextProps extends
|
|
107
|
-
children:
|
|
119
|
+
interface TextProps extends React__default.HTMLAttributes<HTMLSpanElement> {
|
|
120
|
+
children: React__default.ReactNode;
|
|
108
121
|
size?: TextSize;
|
|
109
122
|
weight?: TextWeight;
|
|
110
123
|
color?: TextColor;
|
|
111
124
|
dataTestId?: string;
|
|
112
125
|
}
|
|
113
|
-
declare const Text:
|
|
126
|
+
declare const Text: React__default.FC<TextProps>;
|
|
114
127
|
|
|
115
128
|
type IconName = "person" | "x" | "search" | "square-user" | "globe" | "pin" | "box" | "book" | "map-pin" | "mail" | "discord" | "github" | "telegram" | "youtube" | "image" | "circle-person" | "twitter" | "circle-alert" | "check-circle" | "alert-triangle" | "info" | "x-circle" | "rotate-circle" | "logout" | "edit" | "copy" | "clock" | "image" | "xSocial";
|
|
116
129
|
interface IconProps {
|
|
@@ -120,13 +133,13 @@ interface IconProps {
|
|
|
120
133
|
className?: string;
|
|
121
134
|
dataTestId?: string;
|
|
122
135
|
}
|
|
123
|
-
declare const Icon:
|
|
136
|
+
declare const Icon: React__default.FC<IconProps>;
|
|
124
137
|
|
|
125
|
-
interface ChainIconProps extends
|
|
138
|
+
interface ChainIconProps extends React__default.SVGProps<SVGSVGElement> {
|
|
126
139
|
chain: ChainName$1;
|
|
127
140
|
size?: number;
|
|
128
141
|
}
|
|
129
|
-
declare const ChainIcon:
|
|
142
|
+
declare const ChainIcon: React__default.FC<ChainIconProps>;
|
|
130
143
|
|
|
131
144
|
type TooltipPosition = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
|
|
132
145
|
interface TooltipProps {
|
|
@@ -141,23 +154,23 @@ interface TooltipProps {
|
|
|
141
154
|
maxWidth?: number;
|
|
142
155
|
offset?: number;
|
|
143
156
|
}
|
|
144
|
-
declare const Tooltip:
|
|
157
|
+
declare const Tooltip: React__default.FC<TooltipProps>;
|
|
145
158
|
|
|
146
|
-
interface CardProps extends
|
|
147
|
-
children:
|
|
159
|
+
interface CardProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
160
|
+
children: React__default.ReactNode;
|
|
148
161
|
}
|
|
149
162
|
declare const Card: ({ children, className, ...props }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
150
163
|
|
|
151
164
|
interface DropdownProps {
|
|
152
|
-
trigger:
|
|
153
|
-
children:
|
|
165
|
+
trigger: React__default.ReactNode;
|
|
166
|
+
children: React__default.ReactNode;
|
|
154
167
|
placement?: "top" | "bottom" | "left" | "right";
|
|
155
168
|
align?: "start" | "center" | "end";
|
|
156
169
|
disabled?: boolean;
|
|
157
170
|
dataTestId?: string;
|
|
158
171
|
closeCallback?: () => void;
|
|
159
172
|
}
|
|
160
|
-
declare const Dropdown:
|
|
173
|
+
declare const Dropdown: React__default.FC<DropdownProps>;
|
|
161
174
|
|
|
162
175
|
interface ContenthashIconProps extends React.SVGProps<SVGSVGElement> {
|
|
163
176
|
protocol: ContenthashProtocol$1;
|
|
@@ -168,22 +181,22 @@ declare const ContenthashIcon: (props: ContenthashIconProps) => react_jsx_runtim
|
|
|
168
181
|
type AlertVariant = "error" | "warning" | "info" | "success";
|
|
169
182
|
interface AlertProps {
|
|
170
183
|
variant?: AlertVariant;
|
|
171
|
-
children:
|
|
184
|
+
children: React__default.ReactNode;
|
|
172
185
|
className?: string;
|
|
173
186
|
onClose?: () => void;
|
|
174
187
|
dismissible?: boolean;
|
|
175
188
|
title?: string;
|
|
176
189
|
}
|
|
177
|
-
declare const Alert:
|
|
190
|
+
declare const Alert: React__default.FC<AlertProps>;
|
|
178
191
|
|
|
179
192
|
type ModalSize = "sm" | "md" | "lg";
|
|
180
193
|
interface ModalProps {
|
|
181
194
|
isOpen: boolean;
|
|
182
195
|
onClose: () => void;
|
|
183
|
-
title?:
|
|
184
|
-
children:
|
|
196
|
+
title?: React__default.ReactNode;
|
|
197
|
+
children: React__default.ReactNode;
|
|
185
198
|
/** Optional footer content. If not provided, a default Close button is shown. */
|
|
186
|
-
footer?:
|
|
199
|
+
footer?: React__default.ReactNode;
|
|
187
200
|
/** Width preset for the dialog */
|
|
188
201
|
size?: ModalSize;
|
|
189
202
|
/** Disable closing on overlay click and Escape */
|
|
@@ -193,9 +206,9 @@ interface ModalProps {
|
|
|
193
206
|
/** Additional className for the container */
|
|
194
207
|
className?: string;
|
|
195
208
|
/** Optional styles for the dialog container */
|
|
196
|
-
style?:
|
|
209
|
+
style?: React__default.CSSProperties;
|
|
197
210
|
}
|
|
198
|
-
declare const Modal:
|
|
211
|
+
declare const Modal: React__default.FC<ModalProps>;
|
|
199
212
|
|
|
200
213
|
interface ProfileHeaderProps {
|
|
201
214
|
bannerUrl: string;
|
|
@@ -210,7 +223,7 @@ interface ProfileHeaderProps {
|
|
|
210
223
|
onFollowClick?: () => void;
|
|
211
224
|
dataTestId?: string;
|
|
212
225
|
}
|
|
213
|
-
declare const ProfileHeader:
|
|
226
|
+
declare const ProfileHeader: React__default.FC<ProfileHeaderProps>;
|
|
214
227
|
|
|
215
228
|
interface SupportedEnsAddress {
|
|
216
229
|
validateFunc?: (value: string) => boolean;
|
|
@@ -229,6 +242,7 @@ declare const getSupportedAddressByName: (name: ChainName$1) => SupportedEnsAddr
|
|
|
229
242
|
interface SupportedContenthashRecord {
|
|
230
243
|
protocol: ContenthashProtocol$1;
|
|
231
244
|
label: string;
|
|
245
|
+
protocolPrefix: string;
|
|
232
246
|
}
|
|
233
247
|
declare const supportedContenthashRecords: SupportedContenthashRecord[];
|
|
234
248
|
declare const getSupportedChashByProtocol: (protocol: ContenthashProtocol$1) => SupportedContenthashRecord | undefined;
|
|
@@ -4749,6 +4763,7 @@ declare const useWeb3Client: ({ chainId }: {
|
|
|
4749
4763
|
[x: `bytes3[${string}]`]: undefined;
|
|
4750
4764
|
[x: `bytes32[${string}]`]: undefined;
|
|
4751
4765
|
[x: `bytes1[${string}]`]: undefined;
|
|
4766
|
+
[x: `bytes4[${string}]`]: undefined;
|
|
4752
4767
|
[x: `bytes24[${string}]`]: undefined;
|
|
4753
4768
|
[x: `bytes20[${string}]`]: undefined;
|
|
4754
4769
|
[x: `bytes8[${string}]`]: undefined;
|
|
@@ -4761,7 +4776,6 @@ declare const useWeb3Client: ({ chainId }: {
|
|
|
4761
4776
|
[x: `bytes30[${string}]`]: undefined;
|
|
4762
4777
|
[x: `bytes25[${string}]`]: undefined;
|
|
4763
4778
|
[x: `bytes14[${string}]`]: undefined;
|
|
4764
|
-
[x: `bytes4[${string}]`]: undefined;
|
|
4765
4779
|
[x: `bytes5[${string}]`]: undefined;
|
|
4766
4780
|
[x: `bytes6[${string}]`]: undefined;
|
|
4767
4781
|
[x: `bytes7[${string}]`]: undefined;
|
|
@@ -4849,6 +4863,7 @@ declare const useWeb3Client: ({ chainId }: {
|
|
|
4849
4863
|
bytes3?: undefined;
|
|
4850
4864
|
bytes32?: undefined;
|
|
4851
4865
|
bytes1?: undefined;
|
|
4866
|
+
bytes4?: undefined;
|
|
4852
4867
|
bytes24?: undefined;
|
|
4853
4868
|
bytes20?: undefined;
|
|
4854
4869
|
bytes8?: undefined;
|
|
@@ -4861,7 +4876,6 @@ declare const useWeb3Client: ({ chainId }: {
|
|
|
4861
4876
|
bytes30?: undefined;
|
|
4862
4877
|
bytes25?: undefined;
|
|
4863
4878
|
bytes14?: undefined;
|
|
4864
|
-
bytes4?: undefined;
|
|
4865
4879
|
bytes5?: undefined;
|
|
4866
4880
|
bytes6?: undefined;
|
|
4867
4881
|
bytes7?: undefined;
|
|
@@ -8704,10 +8718,10 @@ interface ThemeContextValue {
|
|
|
8704
8718
|
interface ThemeProviderProps {
|
|
8705
8719
|
initialTheme?: ThemeName;
|
|
8706
8720
|
useDocument?: boolean;
|
|
8707
|
-
children:
|
|
8721
|
+
children: React__default.ReactNode;
|
|
8708
8722
|
}
|
|
8709
|
-
declare const ThemeProvider:
|
|
8723
|
+
declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
8710
8724
|
declare const useTheme: () => ThemeContextValue;
|
|
8711
8725
|
|
|
8712
|
-
export { Alert, Button, Card, ChainIcon, ContenthashIcon, ContenthashProtocol, Dropdown, ENSNameCard, ENS_RESOLVER_ABI, Icon, Input, MULTICALL, Modal, NavbarProfileCard, PendingTransaction, ProfileCard, ProfileHeader, SET_ADDRESS_FUNC, SET_CONTENTHASH_FUNC, SET_TEXT_FUNC, SelectRecordsForm, Text, TextRecordCategory, ThemeProvider, Tooltip, TransactionState, capitalize, convertEVMChainIdToCoinType, deepCopy, equalsIgnoreCase, getEnsRecordsDiff, getSupportedAddressByCoin, getSupportedAddressByName, getSupportedAddressMap, getSupportedChashByProtocol, getSupportedText, isContenthashValid, supportedAddresses, supportedContenthashRecords, supportedTexts, useTheme, useWaitForTransaction, useWeb3Client };
|
|
8713
|
-
export type { AlertProps, AlertVariant, ButtonProps, ButtonSize, ButtonVariant, ChainName, DropdownProps, EnsAddressRecord, EnsContenthashRecord, EnsRecords, EnsRecordsDiff, EnsTextRecord, IconName, IconProps, InputProps, InputSize, InputType, ModalProps, ModalSize, ProfileHeaderProps, SupportedContenthashRecord, SupportedEnsAddress, SupportedTextRecord, TextColor, TextProps, TextSize, TextWeight, ThemeContextValue, ThemeName, ThemeProviderProps, TooltipPosition, TooltipProps };
|
|
8726
|
+
export { Alert, Button, Card, ChainIcon, ContenthashIcon, ContenthashProtocol, Dropdown, ENSNameCard, ENS_RESOLVER_ABI, Icon, Input, MULTICALL, Modal, NavbarProfileCard, PendingTransaction, ProfileCard, ProfileHeader, SET_ADDRESS_FUNC, SET_CONTENTHASH_FUNC, SET_TEXT_FUNC, SelectRecordsForm, Text, TextRecordCategory, Textarea, ThemeProvider, Tooltip, TransactionState, capitalize, convertEVMChainIdToCoinType, deepCopy, equalsIgnoreCase, getEnsRecordsDiff, getSupportedAddressByCoin, getSupportedAddressByName, getSupportedAddressMap, getSupportedChashByProtocol, getSupportedText, isContenthashValid, supportedAddresses, supportedContenthashRecords, supportedTexts, useTheme, useWaitForTransaction, useWeb3Client };
|
|
8727
|
+
export type { AlertProps, AlertVariant, ButtonProps, ButtonSize, ButtonVariant, ChainName, DropdownProps, EnsAddressRecord, EnsContenthashRecord, EnsRecords, EnsRecordsDiff, EnsTextRecord, IconName, IconProps, InputProps, InputSize, InputType, ModalProps, ModalSize, ProfileHeaderProps, SupportedContenthashRecord, SupportedEnsAddress, SupportedTextRecord, TextColor, TextProps, TextSize, TextWeight, TextareaProps, TextareaSize, ThemeContextValue, ThemeName, ThemeProviderProps, TooltipPosition, TooltipProps };
|