@tuwaio/nova-connect 1.0.0-fix-test-alpha.57.ba01e3f → 1.0.0-fix-test-alpha.59.8fde9e1
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.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1785 -466
- package/dist/index.d.ts +1785 -466
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.js +2 -2
- package/dist/providers/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { TransactionPool, Transaction, TxAdapter } from '@tuwaio/pulsar-core';
|
|
|
8
8
|
import { ISatelliteConnectStore, BaseWallet } from '@tuwaio/satellite-core';
|
|
9
9
|
import { StoreApi } from 'zustand/index';
|
|
10
10
|
import { Dialog, DialogContent, StarsBackground } from '@tuwaio/nova-core';
|
|
11
|
-
import { Connector as Connector$1 } from '@tuwaio/satellite-react';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* @file Highly customizable chain list renderer with comprehensive styling and behavior control.
|
|
@@ -1470,7 +1469,7 @@ type StatusIconCustomization = {
|
|
|
1470
1469
|
reduceMotion?: boolean;
|
|
1471
1470
|
};
|
|
1472
1471
|
};
|
|
1473
|
-
interface StatusIconProps extends Omit<HTMLMotionProps<'div'>, 'children' | 'initial' | 'animate' | 'exit' | 'variants' | 'transition'> {
|
|
1472
|
+
interface StatusIconProps$1 extends Omit<HTMLMotionProps<'div'>, 'children' | 'initial' | 'animate' | 'exit' | 'variants' | 'transition'> {
|
|
1474
1473
|
/** Transaction status type */
|
|
1475
1474
|
txStatus: 'succeed' | 'failed' | 'replaced';
|
|
1476
1475
|
/** Color variable name (without --tuwa- prefix) */
|
|
@@ -1538,7 +1537,7 @@ interface StatusIconProps extends Omit<HTMLMotionProps<'div'>, 'children' | 'ini
|
|
|
1538
1537
|
* </StatusIcon>
|
|
1539
1538
|
* ```
|
|
1540
1539
|
*/
|
|
1541
|
-
declare const StatusIcon: React$1.ForwardRefExoticComponent<Omit<StatusIconProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1540
|
+
declare const StatusIcon: React$1.ForwardRefExoticComponent<Omit<StatusIconProps$1, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1542
1541
|
|
|
1543
1542
|
/**
|
|
1544
1543
|
* @file ConnectedContent component displays wallet connection status with transaction monitoring and comprehensive customization options.
|
|
@@ -3596,7 +3595,7 @@ type BackButtonProps = {
|
|
|
3596
3595
|
className?: string;
|
|
3597
3596
|
style?: React__default.CSSProperties;
|
|
3598
3597
|
};
|
|
3599
|
-
type TitleProps$
|
|
3598
|
+
type TitleProps$5 = {
|
|
3600
3599
|
title: string;
|
|
3601
3600
|
className?: string;
|
|
3602
3601
|
style?: React__default.CSSProperties;
|
|
@@ -3653,7 +3652,7 @@ type ConnectedModalCustomization = {
|
|
|
3653
3652
|
/** Custom back button component */
|
|
3654
3653
|
BackButton?: ComponentType<BackButtonProps>;
|
|
3655
3654
|
/** Custom title component */
|
|
3656
|
-
Title?: ComponentType<TitleProps$
|
|
3655
|
+
Title?: ComponentType<TitleProps$5>;
|
|
3657
3656
|
/** Custom close button component */
|
|
3658
3657
|
CloseButton?: ComponentType<CloseButtonProps>;
|
|
3659
3658
|
/** Custom main content component */
|
|
@@ -4145,18 +4144,343 @@ interface AboutWalletsProps {
|
|
|
4145
4144
|
declare const AboutWallets: React__default.ForwardRefExoticComponent<AboutWalletsProps & React__default.RefAttributes<HTMLElement>>;
|
|
4146
4145
|
|
|
4147
4146
|
/**
|
|
4148
|
-
*
|
|
4147
|
+
* @file ConnectCard component with comprehensive customization options for wallet connection cards.
|
|
4149
4148
|
*/
|
|
4150
|
-
|
|
4151
|
-
|
|
4149
|
+
|
|
4150
|
+
/**
|
|
4151
|
+
* Network data for display
|
|
4152
|
+
*/
|
|
4153
|
+
interface NetworkData$1 {
|
|
4154
|
+
/** Network adapter */
|
|
4155
|
+
adapter: OrbitAdapter;
|
|
4156
|
+
/** Chain ID for icon display */
|
|
4157
|
+
chainId?: number | string;
|
|
4158
|
+
/** Network display name */
|
|
4159
|
+
name?: string;
|
|
4160
|
+
/** Network index in list */
|
|
4161
|
+
index: number;
|
|
4162
|
+
}
|
|
4163
|
+
/**
|
|
4164
|
+
* Connect card data
|
|
4165
|
+
*/
|
|
4166
|
+
interface ConnectCardData {
|
|
4167
|
+
/** Primary title/name */
|
|
4168
|
+
title: string;
|
|
4169
|
+
/** Optional subtitle */
|
|
4170
|
+
subtitle?: string;
|
|
4171
|
+
/** Whether card is recent */
|
|
4172
|
+
isRecent: boolean;
|
|
4173
|
+
/** Whether touch device */
|
|
4174
|
+
isTouch: boolean;
|
|
4175
|
+
/** Info link URL */
|
|
4176
|
+
infoLink?: string;
|
|
4177
|
+
/** Network adapters */
|
|
4152
4178
|
adapters?: OrbitAdapter[];
|
|
4153
|
-
/** Whether only one network
|
|
4179
|
+
/** Whether only one network */
|
|
4154
4180
|
isOnlyOneNetwork?: boolean;
|
|
4181
|
+
/** Network count for overflow */
|
|
4182
|
+
networkCount: number;
|
|
4183
|
+
/** Visible networks */
|
|
4184
|
+
visibleNetworks: NetworkData$1[];
|
|
4185
|
+
/** Overflow count */
|
|
4186
|
+
overflowCount: number;
|
|
4155
4187
|
}
|
|
4188
|
+
type NetworkIconsContainerProps = {
|
|
4189
|
+
className?: string;
|
|
4190
|
+
style?: React__default.CSSProperties;
|
|
4191
|
+
children: React__default.ReactNode;
|
|
4192
|
+
role?: string;
|
|
4193
|
+
'aria-label'?: string;
|
|
4194
|
+
cardData: ConnectCardData;
|
|
4195
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4196
|
+
type NetworkIconProps$1 = {
|
|
4197
|
+
className?: string;
|
|
4198
|
+
style?: React__default.CSSProperties;
|
|
4199
|
+
children: React__default.ReactNode;
|
|
4200
|
+
role?: string;
|
|
4201
|
+
'aria-label'?: string;
|
|
4202
|
+
networkData: NetworkData$1;
|
|
4203
|
+
cardData: ConnectCardData;
|
|
4204
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4205
|
+
type NetworkOverflowProps = {
|
|
4206
|
+
className?: string;
|
|
4207
|
+
style?: React__default.CSSProperties;
|
|
4208
|
+
children: React__default.ReactNode;
|
|
4209
|
+
role?: string;
|
|
4210
|
+
'aria-label'?: string;
|
|
4211
|
+
overflowCount: number;
|
|
4212
|
+
cardData: ConnectCardData;
|
|
4213
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4214
|
+
/**
|
|
4215
|
+
* NetworkIcons customization options
|
|
4216
|
+
*/
|
|
4217
|
+
type NetworkIconsCustomization = {
|
|
4218
|
+
/** Custom components */
|
|
4219
|
+
components?: {
|
|
4220
|
+
/** Custom container wrapper */
|
|
4221
|
+
Container?: ComponentType<NetworkIconsContainerProps>;
|
|
4222
|
+
/** Custom network icon */
|
|
4223
|
+
NetworkIcon?: ComponentType<NetworkIconProps$1>;
|
|
4224
|
+
/** Custom overflow indicator */
|
|
4225
|
+
OverflowIndicator?: ComponentType<NetworkOverflowProps>;
|
|
4226
|
+
};
|
|
4227
|
+
/** Custom class name generators */
|
|
4228
|
+
classNames?: {
|
|
4229
|
+
/** Function to generate container classes */
|
|
4230
|
+
container?: (params: {
|
|
4231
|
+
cardData: ConnectCardData;
|
|
4232
|
+
}) => string;
|
|
4233
|
+
/** Function to generate network icon classes */
|
|
4234
|
+
networkIcon?: (params: {
|
|
4235
|
+
networkData: NetworkData$1;
|
|
4236
|
+
cardData: ConnectCardData;
|
|
4237
|
+
}) => string;
|
|
4238
|
+
/** Function to generate overflow indicator classes */
|
|
4239
|
+
overflowIndicator?: (params: {
|
|
4240
|
+
overflowCount: number;
|
|
4241
|
+
cardData: ConnectCardData;
|
|
4242
|
+
}) => string;
|
|
4243
|
+
};
|
|
4244
|
+
/** Custom style generators */
|
|
4245
|
+
styles?: {
|
|
4246
|
+
/** Function to generate container styles */
|
|
4247
|
+
container?: (params: {
|
|
4248
|
+
cardData: ConnectCardData;
|
|
4249
|
+
}) => React__default.CSSProperties;
|
|
4250
|
+
/** Function to generate network icon styles */
|
|
4251
|
+
networkIcon?: (params: {
|
|
4252
|
+
networkData: NetworkData$1;
|
|
4253
|
+
cardData: ConnectCardData;
|
|
4254
|
+
}) => React__default.CSSProperties;
|
|
4255
|
+
/** Function to generate overflow indicator styles */
|
|
4256
|
+
overflowIndicator?: (params: {
|
|
4257
|
+
overflowCount: number;
|
|
4258
|
+
cardData: ConnectCardData;
|
|
4259
|
+
}) => React__default.CSSProperties;
|
|
4260
|
+
};
|
|
4261
|
+
};
|
|
4262
|
+
type CardContainerProps = {
|
|
4263
|
+
className?: string;
|
|
4264
|
+
style?: React__default.CSSProperties;
|
|
4265
|
+
children: React__default.ReactNode;
|
|
4266
|
+
type?: 'button';
|
|
4267
|
+
onClick?: () => void;
|
|
4268
|
+
'aria-label'?: string;
|
|
4269
|
+
'aria-describedby'?: string;
|
|
4270
|
+
cardData: ConnectCardData;
|
|
4271
|
+
} & React__default.RefAttributes<HTMLButtonElement>;
|
|
4272
|
+
type CardContentProps = {
|
|
4273
|
+
className?: string;
|
|
4274
|
+
style?: React__default.CSSProperties;
|
|
4275
|
+
children: React__default.ReactNode;
|
|
4276
|
+
cardData: ConnectCardData;
|
|
4277
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4278
|
+
type IconContainerProps$1 = {
|
|
4279
|
+
className?: string;
|
|
4280
|
+
style?: React__default.CSSProperties;
|
|
4281
|
+
children: React__default.ReactNode;
|
|
4282
|
+
role?: string;
|
|
4283
|
+
'aria-label'?: string;
|
|
4284
|
+
cardData: ConnectCardData;
|
|
4285
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4286
|
+
type IconWrapperProps = {
|
|
4287
|
+
className?: string;
|
|
4288
|
+
style?: React__default.CSSProperties;
|
|
4289
|
+
children: React__default.ReactNode;
|
|
4290
|
+
cardData: ConnectCardData;
|
|
4291
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4292
|
+
type TextContainerProps = {
|
|
4293
|
+
className?: string;
|
|
4294
|
+
style?: React__default.CSSProperties;
|
|
4295
|
+
children: React__default.ReactNode;
|
|
4296
|
+
cardData: ConnectCardData;
|
|
4297
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4298
|
+
type TitleProps$4 = {
|
|
4299
|
+
className?: string;
|
|
4300
|
+
style?: React__default.CSSProperties;
|
|
4301
|
+
children: React__default.ReactNode;
|
|
4302
|
+
role?: string;
|
|
4303
|
+
'aria-level'?: number;
|
|
4304
|
+
cardData: ConnectCardData;
|
|
4305
|
+
} & React__default.RefAttributes<HTMLSpanElement>;
|
|
4306
|
+
type SubtitleProps = {
|
|
4307
|
+
className?: string;
|
|
4308
|
+
style?: React__default.CSSProperties;
|
|
4309
|
+
children: React__default.ReactNode;
|
|
4310
|
+
id?: string;
|
|
4311
|
+
role?: string;
|
|
4312
|
+
cardData: ConnectCardData;
|
|
4313
|
+
} & React__default.RefAttributes<HTMLSpanElement>;
|
|
4314
|
+
type InfoLinkProps = {
|
|
4315
|
+
className?: string;
|
|
4316
|
+
style?: React__default.CSSProperties;
|
|
4317
|
+
children: React__default.ReactNode;
|
|
4318
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
4319
|
+
href?: string;
|
|
4320
|
+
target?: string;
|
|
4321
|
+
rel?: string;
|
|
4322
|
+
'aria-label'?: string;
|
|
4323
|
+
cardData: ConnectCardData;
|
|
4324
|
+
} & React__default.RefAttributes<HTMLAnchorElement>;
|
|
4325
|
+
type RecentBadgeWrapperProps = {
|
|
4326
|
+
className?: string;
|
|
4327
|
+
style?: React__default.CSSProperties;
|
|
4328
|
+
children: React__default.ReactNode;
|
|
4329
|
+
'aria-label'?: string;
|
|
4330
|
+
cardData: ConnectCardData;
|
|
4331
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4332
|
+
type ChevronProps = {
|
|
4333
|
+
className?: string;
|
|
4334
|
+
style?: React__default.CSSProperties;
|
|
4335
|
+
children: React__default.ReactNode;
|
|
4336
|
+
'aria-hidden'?: boolean;
|
|
4337
|
+
cardData: ConnectCardData;
|
|
4338
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4339
|
+
/**
|
|
4340
|
+
* ConnectCard customization options
|
|
4341
|
+
*/
|
|
4342
|
+
type ConnectCardCustomization = {
|
|
4343
|
+
/** Custom components */
|
|
4344
|
+
components?: {
|
|
4345
|
+
/** Custom card container */
|
|
4346
|
+
Container?: ComponentType<CardContainerProps>;
|
|
4347
|
+
/** Custom card content */
|
|
4348
|
+
Content?: ComponentType<CardContentProps>;
|
|
4349
|
+
/** Custom icon container */
|
|
4350
|
+
IconContainer?: ComponentType<IconContainerProps$1>;
|
|
4351
|
+
/** Custom icon wrapper */
|
|
4352
|
+
IconWrapper?: ComponentType<IconWrapperProps>;
|
|
4353
|
+
/** Custom text container */
|
|
4354
|
+
TextContainer?: ComponentType<TextContainerProps>;
|
|
4355
|
+
/** Custom title */
|
|
4356
|
+
Title?: ComponentType<TitleProps$4>;
|
|
4357
|
+
/** Custom subtitle */
|
|
4358
|
+
Subtitle?: ComponentType<SubtitleProps>;
|
|
4359
|
+
/** Custom info link */
|
|
4360
|
+
InfoLink?: ComponentType<InfoLinkProps>;
|
|
4361
|
+
/** Custom recent badge wrapper */
|
|
4362
|
+
RecentBadgeWrapper?: ComponentType<RecentBadgeWrapperProps>;
|
|
4363
|
+
/** Custom chevron */
|
|
4364
|
+
Chevron?: ComponentType<ChevronProps>;
|
|
4365
|
+
};
|
|
4366
|
+
/** Custom class name generators */
|
|
4367
|
+
classNames?: {
|
|
4368
|
+
/** Function to generate container classes */
|
|
4369
|
+
container?: (params: {
|
|
4370
|
+
cardData: ConnectCardData;
|
|
4371
|
+
}) => string;
|
|
4372
|
+
/** Function to generate content classes */
|
|
4373
|
+
content?: (params: {
|
|
4374
|
+
cardData: ConnectCardData;
|
|
4375
|
+
}) => string;
|
|
4376
|
+
/** Function to generate icon container classes */
|
|
4377
|
+
iconContainer?: (params: {
|
|
4378
|
+
cardData: ConnectCardData;
|
|
4379
|
+
}) => string;
|
|
4380
|
+
/** Function to generate icon wrapper classes */
|
|
4381
|
+
iconWrapper?: (params: {
|
|
4382
|
+
cardData: ConnectCardData;
|
|
4383
|
+
}) => string;
|
|
4384
|
+
/** Function to generate text container classes */
|
|
4385
|
+
textContainer?: (params: {
|
|
4386
|
+
cardData: ConnectCardData;
|
|
4387
|
+
}) => string;
|
|
4388
|
+
/** Function to generate title classes */
|
|
4389
|
+
title?: (params: {
|
|
4390
|
+
cardData: ConnectCardData;
|
|
4391
|
+
}) => string;
|
|
4392
|
+
/** Function to generate subtitle classes */
|
|
4393
|
+
subtitle?: (params: {
|
|
4394
|
+
cardData: ConnectCardData;
|
|
4395
|
+
}) => string;
|
|
4396
|
+
/** Function to generate info link classes */
|
|
4397
|
+
infoLink?: (params: {
|
|
4398
|
+
cardData: ConnectCardData;
|
|
4399
|
+
}) => string;
|
|
4400
|
+
/** Function to generate recent badge wrapper classes */
|
|
4401
|
+
recentBadgeWrapper?: (params: {
|
|
4402
|
+
cardData: ConnectCardData;
|
|
4403
|
+
}) => string;
|
|
4404
|
+
/** Function to generate chevron classes */
|
|
4405
|
+
chevron?: (params: {
|
|
4406
|
+
cardData: ConnectCardData;
|
|
4407
|
+
}) => string;
|
|
4408
|
+
};
|
|
4409
|
+
/** Custom style generators */
|
|
4410
|
+
styles?: {
|
|
4411
|
+
/** Function to generate container styles */
|
|
4412
|
+
container?: (params: {
|
|
4413
|
+
cardData: ConnectCardData;
|
|
4414
|
+
}) => React__default.CSSProperties;
|
|
4415
|
+
/** Function to generate content styles */
|
|
4416
|
+
content?: (params: {
|
|
4417
|
+
cardData: ConnectCardData;
|
|
4418
|
+
}) => React__default.CSSProperties;
|
|
4419
|
+
/** Function to generate icon container styles */
|
|
4420
|
+
iconContainer?: (params: {
|
|
4421
|
+
cardData: ConnectCardData;
|
|
4422
|
+
}) => React__default.CSSProperties;
|
|
4423
|
+
/** Function to generate icon wrapper styles */
|
|
4424
|
+
iconWrapper?: (params: {
|
|
4425
|
+
cardData: ConnectCardData;
|
|
4426
|
+
}) => React__default.CSSProperties;
|
|
4427
|
+
/** Function to generate text container styles */
|
|
4428
|
+
textContainer?: (params: {
|
|
4429
|
+
cardData: ConnectCardData;
|
|
4430
|
+
}) => React__default.CSSProperties;
|
|
4431
|
+
/** Function to generate title styles */
|
|
4432
|
+
title?: (params: {
|
|
4433
|
+
cardData: ConnectCardData;
|
|
4434
|
+
}) => React__default.CSSProperties;
|
|
4435
|
+
/** Function to generate subtitle styles */
|
|
4436
|
+
subtitle?: (params: {
|
|
4437
|
+
cardData: ConnectCardData;
|
|
4438
|
+
}) => React__default.CSSProperties;
|
|
4439
|
+
/** Function to generate info link styles */
|
|
4440
|
+
infoLink?: (params: {
|
|
4441
|
+
cardData: ConnectCardData;
|
|
4442
|
+
}) => React__default.CSSProperties;
|
|
4443
|
+
/** Function to generate recent badge wrapper styles */
|
|
4444
|
+
recentBadgeWrapper?: (params: {
|
|
4445
|
+
cardData: ConnectCardData;
|
|
4446
|
+
}) => React__default.CSSProperties;
|
|
4447
|
+
/** Function to generate chevron styles */
|
|
4448
|
+
chevron?: (params: {
|
|
4449
|
+
cardData: ConnectCardData;
|
|
4450
|
+
}) => React__default.CSSProperties;
|
|
4451
|
+
};
|
|
4452
|
+
/** Custom event handlers */
|
|
4453
|
+
handlers?: {
|
|
4454
|
+
/** Custom click handler */
|
|
4455
|
+
onClick?: (cardData: ConnectCardData, originalHandler: () => void) => void;
|
|
4456
|
+
/** Custom info link click handler */
|
|
4457
|
+
onInfoClick?: (cardData: ConnectCardData, event: React__default.MouseEvent) => void;
|
|
4458
|
+
/** Custom hover handler */
|
|
4459
|
+
onHover?: (cardData: ConnectCardData, isHovering: boolean) => void;
|
|
4460
|
+
};
|
|
4461
|
+
/** Configuration options */
|
|
4462
|
+
config?: {
|
|
4463
|
+
/** Custom ARIA labels */
|
|
4464
|
+
ariaLabels?: {
|
|
4465
|
+
card?: (cardData: ConnectCardData) => string;
|
|
4466
|
+
icon?: (cardData: ConnectCardData) => string;
|
|
4467
|
+
infoLink?: (cardData: ConnectCardData) => string;
|
|
4468
|
+
recentBadge?: (cardData: ConnectCardData) => string;
|
|
4469
|
+
};
|
|
4470
|
+
/** Custom animation settings */
|
|
4471
|
+
animation?: {
|
|
4472
|
+
hoverScale?: string;
|
|
4473
|
+
transitionDuration?: string;
|
|
4474
|
+
chevronTransform?: string;
|
|
4475
|
+
};
|
|
4476
|
+
};
|
|
4477
|
+
/** NetworkIcons customization */
|
|
4478
|
+
networkIcons?: NetworkIconsCustomization;
|
|
4479
|
+
};
|
|
4156
4480
|
/**
|
|
4157
4481
|
* Props for the ConnectCard component
|
|
4158
4482
|
*/
|
|
4159
|
-
interface ConnectCardProps
|
|
4483
|
+
interface ConnectCardProps {
|
|
4160
4484
|
/** Click handler for the connect card */
|
|
4161
4485
|
onClick: () => void;
|
|
4162
4486
|
/** Icon element to display for the wallet/connector */
|
|
@@ -4169,9 +4493,17 @@ interface ConnectCardProps extends NetworkIconsProps {
|
|
|
4169
4493
|
infoLink?: string;
|
|
4170
4494
|
/** Whether this connector was recently used */
|
|
4171
4495
|
isRecent?: boolean;
|
|
4496
|
+
/** Array of network adapters to display as icons */
|
|
4497
|
+
adapters?: OrbitAdapter[];
|
|
4498
|
+
/** Whether only one network is available */
|
|
4499
|
+
isOnlyOneNetwork?: boolean;
|
|
4500
|
+
/** Custom CSS classes for styling the container */
|
|
4501
|
+
className?: string;
|
|
4502
|
+
/** Customization options */
|
|
4503
|
+
customization?: ConnectCardCustomization;
|
|
4172
4504
|
}
|
|
4173
4505
|
/**
|
|
4174
|
-
* ConnectCard component - Interactive card for wallet connection options
|
|
4506
|
+
* ConnectCard component - Interactive card for wallet connection options with comprehensive customization
|
|
4175
4507
|
*
|
|
4176
4508
|
* This component provides a clickable card interface for wallet connectors with:
|
|
4177
4509
|
* - Responsive design adapting to touch/mouse interfaces
|
|
@@ -4181,32 +4513,9 @@ interface ConnectCardProps extends NetworkIconsProps {
|
|
|
4181
4513
|
* - Hover animations and visual feedback
|
|
4182
4514
|
* - Full accessibility support with ARIA labels
|
|
4183
4515
|
* - Keyboard navigation support
|
|
4516
|
+
* - Complete customization of all child components and styling
|
|
4184
4517
|
*
|
|
4185
|
-
*
|
|
4186
|
-
* - Touch devices: Square card layout optimized for mobile interaction
|
|
4187
|
-
* - Mouse devices: Horizontal card layout with hover animations
|
|
4188
|
-
* - Dynamic network icons display up to 3 supported networks
|
|
4189
|
-
* - Smooth hover transitions with scale and color changes
|
|
4190
|
-
* - Recent badge with fade-out on hover
|
|
4191
|
-
*
|
|
4192
|
-
* Accessibility features:
|
|
4193
|
-
* - Proper ARIA labels for screen readers
|
|
4194
|
-
* - Role attributes for semantic structure
|
|
4195
|
-
* - Keyboard navigation support
|
|
4196
|
-
* - Focus management with visual indicators
|
|
4197
|
-
* - Screen reader announcements for state changes
|
|
4198
|
-
*
|
|
4199
|
-
* @param onClick - Handler function called when card is clicked
|
|
4200
|
-
* @param title - Primary display name for the wallet/connector
|
|
4201
|
-
* @param icon - React element containing the wallet icon
|
|
4202
|
-
* @param adapters - Array of supported network adapters
|
|
4203
|
-
* @param infoLink - Optional URL for additional information
|
|
4204
|
-
* @param subtitle - Optional secondary description text
|
|
4205
|
-
* @param isRecent - Whether to show recent usage badge
|
|
4206
|
-
* @param isOnlyOneNetwork - Whether only one network is available
|
|
4207
|
-
* @returns JSX element representing the interactive connect card
|
|
4208
|
-
*
|
|
4209
|
-
* @example
|
|
4518
|
+
* @example Basic usage
|
|
4210
4519
|
* ```tsx
|
|
4211
4520
|
* <ConnectCard
|
|
4212
4521
|
* onClick={() => connect('metamask')}
|
|
@@ -4219,225 +4528,265 @@ interface ConnectCardProps extends NetworkIconsProps {
|
|
|
4219
4528
|
* />
|
|
4220
4529
|
* ```
|
|
4221
4530
|
*
|
|
4222
|
-
* @example
|
|
4531
|
+
* @example With full customization
|
|
4223
4532
|
* ```tsx
|
|
4224
|
-
* // Touch device optimized card
|
|
4225
4533
|
* <ConnectCard
|
|
4226
4534
|
* onClick={() => connect('walletconnect')}
|
|
4227
4535
|
* title="WalletConnect"
|
|
4228
4536
|
* icon={<WalletConnectIcon />}
|
|
4229
4537
|
* adapters={[ethereum, polygon]}
|
|
4230
|
-
*
|
|
4538
|
+
* customization={{
|
|
4539
|
+
* components: {
|
|
4540
|
+
* Container: CustomCardContainer,
|
|
4541
|
+
* Title: CustomTitle
|
|
4542
|
+
* },
|
|
4543
|
+
* classNames: {
|
|
4544
|
+
* container: ({ cardData }) => cardData.isTouch ? 'touch-card' : 'desktop-card'
|
|
4545
|
+
* },
|
|
4546
|
+
* handlers: {
|
|
4547
|
+
* onClick: (cardData, originalHandler) => {
|
|
4548
|
+
* analytics.track('card_clicked', { title: cardData.title });
|
|
4549
|
+
* originalHandler();
|
|
4550
|
+
* }
|
|
4551
|
+
* }
|
|
4552
|
+
* }}
|
|
4231
4553
|
* />
|
|
4232
4554
|
* ```
|
|
4555
|
+
*/
|
|
4556
|
+
declare const ConnectCard: React__default.NamedExoticComponent<ConnectCardProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
4557
|
+
|
|
4558
|
+
/**
|
|
4559
|
+
* A custom hook to easily access the i18n labels from any component
|
|
4560
|
+
* within the `NovaConnectLabelsProvider` tree.
|
|
4233
4561
|
*
|
|
4234
|
-
*
|
|
4562
|
+
* This hook provides type-safe access to all UI labels and automatically
|
|
4563
|
+
* falls back to default English labels if no provider is found.
|
|
4564
|
+
*
|
|
4565
|
+
* @returns {NovaConnectLabels} The complete object of UI labels for the current locale.
|
|
4566
|
+
*
|
|
4567
|
+
* @example
|
|
4568
|
+
* ```typescript
|
|
4569
|
+
* import { useNovaConnectLabels } from './hooks/useNovaConnectLabels';
|
|
4570
|
+
*
|
|
4571
|
+
* function MyComponent() {
|
|
4572
|
+
* const labels = useNovaConnectLabels();
|
|
4573
|
+
*
|
|
4574
|
+
* return (
|
|
4575
|
+
* <div>
|
|
4576
|
+
* <h1>{labels.connectWallet}</h1>
|
|
4577
|
+
* <button>{labels.connect}</button>
|
|
4578
|
+
* <p aria-label={labels.walletBalance}>{formattedBalance}</p>
|
|
4579
|
+
* </div>
|
|
4580
|
+
* );
|
|
4581
|
+
* }
|
|
4582
|
+
* ```
|
|
4583
|
+
*
|
|
4584
|
+
* @example
|
|
4585
|
+
* ```typescript
|
|
4586
|
+
* // Destructuring specific labels for better performance
|
|
4587
|
+
* function ConnectButton() {
|
|
4588
|
+
* const { connectWallet, connecting, connected } = useNovaConnectLabels();
|
|
4589
|
+
*
|
|
4590
|
+
* return (
|
|
4591
|
+
* <button>
|
|
4592
|
+
* {isConnecting ? connecting : isConnected ? connected : connectWallet}
|
|
4593
|
+
* </button>
|
|
4594
|
+
* );
|
|
4595
|
+
* }
|
|
4596
|
+
* ```
|
|
4235
4597
|
*/
|
|
4236
|
-
declare
|
|
4598
|
+
declare const useNovaConnectLabels: () => NovaConnectLabels;
|
|
4237
4599
|
|
|
4238
4600
|
/**
|
|
4239
|
-
*
|
|
4601
|
+
* @file ConnectorsBlock component with comprehensive customization options and connector group display.
|
|
4240
4602
|
*/
|
|
4241
|
-
interface GroupedConnector$1 {
|
|
4242
|
-
/** Name of the wallet connector */
|
|
4243
|
-
name: string;
|
|
4244
|
-
/** Optional icon for the wallet */
|
|
4245
|
-
icon?: string;
|
|
4246
|
-
/** Array of supported network adapters */
|
|
4247
|
-
adapters: OrbitAdapter[];
|
|
4248
|
-
/** Array of connectors with their associated adapters */
|
|
4249
|
-
connectors: (Connector$1 & {
|
|
4250
|
-
adapter: OrbitAdapter;
|
|
4251
|
-
})[];
|
|
4252
|
-
}
|
|
4253
4603
|
|
|
4254
4604
|
/**
|
|
4255
|
-
*
|
|
4256
|
-
* Defines the required data for displaying wallet connection progress
|
|
4605
|
+
* Connector block data for customization context
|
|
4257
4606
|
*/
|
|
4258
|
-
interface
|
|
4259
|
-
/** Currently
|
|
4260
|
-
activeConnector: string | undefined;
|
|
4261
|
-
/** Selected orbit adapter for the connection */
|
|
4607
|
+
interface ConnectorsBlockData {
|
|
4608
|
+
/** Currently selected network adapter */
|
|
4262
4609
|
selectedAdapter: OrbitAdapter | undefined;
|
|
4263
|
-
/** Array of
|
|
4264
|
-
connectors: GroupedConnector
|
|
4265
|
-
/**
|
|
4266
|
-
|
|
4267
|
-
/**
|
|
4268
|
-
|
|
4269
|
-
/** Whether
|
|
4270
|
-
|
|
4610
|
+
/** Array of grouped wallet connectors to display */
|
|
4611
|
+
connectors: GroupedConnector[];
|
|
4612
|
+
/** Title text for the connector group */
|
|
4613
|
+
title: string;
|
|
4614
|
+
/** Whether to render the title in bold accent color */
|
|
4615
|
+
isTitleBold: boolean;
|
|
4616
|
+
/** Whether only one network is available */
|
|
4617
|
+
isOnlyOneNetwork: boolean;
|
|
4618
|
+
/** Whether device is touch-enabled */
|
|
4619
|
+
isTouch: boolean;
|
|
4620
|
+
/** Whether there are connectors to display */
|
|
4621
|
+
hasConnectors: boolean;
|
|
4622
|
+
/** Recent wallets data */
|
|
4623
|
+
recentWallets: Record<string, Record<string, boolean>> | null;
|
|
4624
|
+
/** Section ID for accessibility */
|
|
4625
|
+
sectionId: string;
|
|
4271
4626
|
}
|
|
4272
4627
|
/**
|
|
4273
|
-
*
|
|
4274
|
-
*
|
|
4275
|
-
* This component provides comprehensive visual feedback during wallet connection:
|
|
4276
|
-
* - Animated loading spinner for connection in progress
|
|
4277
|
-
* - Success state with checkmark icon for completed connections
|
|
4278
|
-
* - Error state with warning icon and detailed error messages
|
|
4279
|
-
* - Fully internationalized text content with translation support
|
|
4280
|
-
* - WCAG compliant accessibility with proper ARIA labels and live regions
|
|
4281
|
-
* - Responsive design that adapts to different screen sizes
|
|
4282
|
-
* - Visual status indicators with semantic colors and icons
|
|
4283
|
-
* - Screen reader announcements for state changes
|
|
4284
|
-
*
|
|
4285
|
-
* The component automatically detects connection state and displays appropriate
|
|
4286
|
-
* visual feedback with proper semantic markup for accessibility tools.
|
|
4287
|
-
*
|
|
4288
|
-
* @param activeConnector - Identifier of the currently connecting wallet
|
|
4289
|
-
* @param selectedAdapter - Orbit adapter instance for the connection
|
|
4290
|
-
* @param connectors - Array of available wallet connector options
|
|
4291
|
-
* @param isConnected - Boolean flag indicating successful connection
|
|
4292
|
-
* @param customErrorMessage - Optional custom error message override
|
|
4293
|
-
* @param showDetailedError - Flag to show detailed error information
|
|
4294
|
-
* @returns JSX element displaying connection status with visual feedback
|
|
4295
|
-
*
|
|
4296
|
-
* @example
|
|
4297
|
-
* ```tsx
|
|
4298
|
-
* <Connecting
|
|
4299
|
-
* activeConnector="metamask"
|
|
4300
|
-
* selectedAdapter={ethereumAdapter}
|
|
4301
|
-
* connectors={availableConnectors}
|
|
4302
|
-
* isConnected={false}
|
|
4303
|
-
* />
|
|
4304
|
-
* ```
|
|
4305
|
-
*
|
|
4306
|
-
* @example
|
|
4307
|
-
* ```tsx
|
|
4308
|
-
* // With custom error handling
|
|
4309
|
-
* <Connecting
|
|
4310
|
-
* activeConnector="walletconnect"
|
|
4311
|
-
* selectedAdapter={polygonAdapter}
|
|
4312
|
-
* connectors={connectors}
|
|
4313
|
-
* isConnected={false}
|
|
4314
|
-
* customErrorMessage="Custom connection error occurred"
|
|
4315
|
-
* showDetailedError={true}
|
|
4316
|
-
* />
|
|
4317
|
-
* ```
|
|
4318
|
-
*
|
|
4319
|
-
* @example
|
|
4320
|
-
* ```tsx
|
|
4321
|
-
* // Successful connection state
|
|
4322
|
-
* <Connecting
|
|
4323
|
-
* activeConnector="phantom"
|
|
4324
|
-
* selectedAdapter={solanaAdapter}
|
|
4325
|
-
* connectors={solanaConnectors}
|
|
4326
|
-
* isConnected={true}
|
|
4327
|
-
* />
|
|
4328
|
-
* ```
|
|
4329
|
-
*
|
|
4330
|
-
* @public
|
|
4628
|
+
* Individual connector item data
|
|
4331
4629
|
*/
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
connectors: GroupedConnector$1[];
|
|
4342
|
-
/** Click handler for connector selection */
|
|
4343
|
-
onClick: (connector: GroupedConnector$1) => void;
|
|
4344
|
-
/** Function to set connection status */
|
|
4345
|
-
setIsConnected: (value: boolean) => void;
|
|
4346
|
-
/** Function to control modal open state */
|
|
4347
|
-
setIsOpen: (value: boolean) => void;
|
|
4348
|
-
/** Function to wait for connection prediction */
|
|
4349
|
-
waitForPredict: () => boolean | undefined;
|
|
4350
|
-
/** Function to set modal content type */
|
|
4351
|
-
setContentType: (contentType: ConnectContentType) => void;
|
|
4352
|
-
/** Whether only one network is available */
|
|
4353
|
-
isOnlyOneNetwork?: boolean;
|
|
4630
|
+
interface ConnectorItemData {
|
|
4631
|
+
/** Grouped connector configuration */
|
|
4632
|
+
group: GroupedConnector;
|
|
4633
|
+
/** Formatted wallet name */
|
|
4634
|
+
name: string;
|
|
4635
|
+
/** Whether this wallet was recently used */
|
|
4636
|
+
isRecent: boolean;
|
|
4637
|
+
/** Item index in the list */
|
|
4638
|
+
index: number;
|
|
4354
4639
|
}
|
|
4640
|
+
type ContainerProps$8 = {
|
|
4641
|
+
className?: string;
|
|
4642
|
+
style?: React__default.CSSProperties;
|
|
4643
|
+
children: React__default.ReactNode;
|
|
4644
|
+
role?: string;
|
|
4645
|
+
'aria-labelledby'?: string;
|
|
4646
|
+
'aria-label'?: string;
|
|
4647
|
+
blockData: ConnectorsBlockData;
|
|
4648
|
+
} & React__default.RefAttributes<HTMLElement>;
|
|
4649
|
+
type TitleProps$3 = {
|
|
4650
|
+
className?: string;
|
|
4651
|
+
style?: React__default.CSSProperties;
|
|
4652
|
+
children: React__default.ReactNode;
|
|
4653
|
+
id?: string;
|
|
4654
|
+
role?: string;
|
|
4655
|
+
'aria-level'?: number;
|
|
4656
|
+
onClick?: () => void;
|
|
4657
|
+
blockData: ConnectorsBlockData;
|
|
4658
|
+
} & React__default.RefAttributes<HTMLHeadingElement>;
|
|
4659
|
+
type ConnectorsListProps = {
|
|
4660
|
+
className?: string;
|
|
4661
|
+
style?: React__default.CSSProperties;
|
|
4662
|
+
children: React__default.ReactNode;
|
|
4663
|
+
role?: string;
|
|
4664
|
+
'aria-label'?: string;
|
|
4665
|
+
blockData: ConnectorsBlockData;
|
|
4666
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4667
|
+
type ConnectorItemProps = {
|
|
4668
|
+
className?: string;
|
|
4669
|
+
style?: React__default.CSSProperties;
|
|
4670
|
+
children: React__default.ReactNode;
|
|
4671
|
+
role?: string;
|
|
4672
|
+
itemData: ConnectorItemData;
|
|
4673
|
+
blockData: ConnectorsBlockData;
|
|
4674
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4675
|
+
type EmptyStateProps$1 = {
|
|
4676
|
+
className?: string;
|
|
4677
|
+
style?: React__default.CSSProperties;
|
|
4678
|
+
children: React__default.ReactNode;
|
|
4679
|
+
role?: string;
|
|
4680
|
+
'aria-label'?: string;
|
|
4681
|
+
onClick?: () => void;
|
|
4682
|
+
blockData: ConnectorsBlockData;
|
|
4683
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4355
4684
|
/**
|
|
4356
|
-
*
|
|
4357
|
-
*
|
|
4358
|
-
* This component provides the primary wallet selection interface with:
|
|
4359
|
-
* - Categorized wallet sections (Installed, Popular, Impersonate)
|
|
4360
|
-
* - Responsive layout adapting to touch/mouse interfaces
|
|
4361
|
-
* - Safe App environment detection and filtering
|
|
4362
|
-
* - Empty state handling for missing connectors
|
|
4363
|
-
* - Educational content integration for touch devices
|
|
4364
|
-
* - Full accessibility support with semantic structure
|
|
4365
|
-
*
|
|
4366
|
-
* Wallet categorization:
|
|
4367
|
-
* - Installed: Detected browser extension wallets (excluding popular ones)
|
|
4368
|
-
* - Popular: Coinbase Wallet and WalletConnect for broader compatibility
|
|
4369
|
-
* - Impersonate: Development/testing wallet for address simulation
|
|
4370
|
-
* - Safe App filtering: Conditional Safe Wallet display based on environment
|
|
4371
|
-
*
|
|
4372
|
-
* Layout features:
|
|
4373
|
-
* - Touch devices: Horizontal scrolling with educational disclaimer
|
|
4374
|
-
* - Mouse devices: Vertical scrolling with fixed height container
|
|
4375
|
-
* - Responsive grid adapting to screen size and device capabilities
|
|
4376
|
-
* - Custom scrollbar styling with NovaCustomScroll class
|
|
4377
|
-
*
|
|
4378
|
-
* Empty state handling:
|
|
4379
|
-
* - Clear error messaging when no connectors found
|
|
4380
|
-
* - Contextual help text explaining the issue
|
|
4381
|
-
* - Visual indicators with warning icons
|
|
4382
|
-
* - Proper error state accessibility
|
|
4383
|
-
*
|
|
4384
|
-
* Accessibility features:
|
|
4385
|
-
* - Semantic HTML structure with proper headings
|
|
4386
|
-
* - ARIA labels for screen readers
|
|
4387
|
-
* - Role-based navigation support
|
|
4388
|
-
* - Focus management for keyboard users
|
|
4389
|
-
* - Error states with descriptive messaging
|
|
4390
|
-
*
|
|
4391
|
-
* @param selectedAdapter - Currently selected network adapter
|
|
4392
|
-
* @param connectors - Array of available wallet connectors
|
|
4393
|
-
* @param onClick - Handler for wallet connector selection
|
|
4394
|
-
* @param setIsConnected - Function to update connection status
|
|
4395
|
-
* @param setIsOpen - Function to control modal visibility
|
|
4396
|
-
* @param waitForPredict - Function for connection state prediction
|
|
4397
|
-
* @param setContentType - Function to change modal content
|
|
4398
|
-
* @param withImpersonated - Whether to show impersonation option
|
|
4399
|
-
* @param isOnlyOneNetwork - Whether only one network is available
|
|
4400
|
-
* @param appChains - Configuration for supported blockchain networks
|
|
4401
|
-
* @param solanaRPCUrls - Solana RPC endpoints configuration
|
|
4402
|
-
* @returns JSX element representing the connector selection interface
|
|
4403
|
-
*
|
|
4404
|
-
* @example
|
|
4405
|
-
* ```tsx
|
|
4406
|
-
* <ConnectorsSelections
|
|
4407
|
-
* selectedAdapter={OrbitAdapter.EVM}
|
|
4408
|
-
* connectors={availableConnectors}
|
|
4409
|
-
* onClick={(connector) => handleWalletSelection(connector)}
|
|
4410
|
-
* setIsConnected={setConnectionStatus}
|
|
4411
|
-
* setIsOpen={setModalOpen}
|
|
4412
|
-
* waitForPredict={() => checkConnectionState()}
|
|
4413
|
-
* setContentType={setModalContent}
|
|
4414
|
-
* withImpersonated={true}
|
|
4415
|
-
* isOnlyOneNetwork={false}
|
|
4416
|
-
* appChains={chainConfiguration}
|
|
4417
|
-
* solanaRPCUrls={solanaConfig}
|
|
4418
|
-
* />
|
|
4419
|
-
* ```
|
|
4420
|
-
*
|
|
4421
|
-
* @example
|
|
4422
|
-
* ```tsx
|
|
4423
|
-
* // Touch device optimized with educational content
|
|
4424
|
-
* <ConnectorsSelections
|
|
4425
|
-
* selectedAdapter={undefined}
|
|
4426
|
-
* connectors={allConnectors}
|
|
4427
|
-
* onClick={(connector) => initiateConnection(connector)}
|
|
4428
|
-
* setIsConnected={updateConnectionState}
|
|
4429
|
-
* setIsOpen={toggleModal}
|
|
4430
|
-
* waitForPredict={predictConnection}
|
|
4431
|
-
* setContentType={changeContent}
|
|
4432
|
-
* withImpersonated={false}
|
|
4433
|
-
* isOnlyOneNetwork={true}
|
|
4434
|
-
* />
|
|
4435
|
-
* ```
|
|
4436
|
-
*
|
|
4437
|
-
* @public
|
|
4685
|
+
* Customization options for ConnectorsBlock component
|
|
4438
4686
|
*/
|
|
4439
|
-
|
|
4440
|
-
|
|
4687
|
+
type ConnectorsBlockCustomization = {
|
|
4688
|
+
/** Custom components */
|
|
4689
|
+
components?: {
|
|
4690
|
+
/** Custom container wrapper */
|
|
4691
|
+
Container?: ComponentType<ContainerProps$8>;
|
|
4692
|
+
/** Custom title component */
|
|
4693
|
+
Title?: ComponentType<TitleProps$3>;
|
|
4694
|
+
/** Custom connectors list */
|
|
4695
|
+
ConnectorsList?: ComponentType<ConnectorsListProps>;
|
|
4696
|
+
/** Custom connector item wrapper */
|
|
4697
|
+
ConnectorItem?: ComponentType<ConnectorItemProps>;
|
|
4698
|
+
/** Custom empty state component */
|
|
4699
|
+
EmptyState?: ComponentType<EmptyStateProps$1>;
|
|
4700
|
+
};
|
|
4701
|
+
/** Custom class name generators */
|
|
4702
|
+
classNames?: {
|
|
4703
|
+
/** Function to generate container classes */
|
|
4704
|
+
container?: (params: {
|
|
4705
|
+
blockData: ConnectorsBlockData;
|
|
4706
|
+
}) => string;
|
|
4707
|
+
/** Function to generate title classes */
|
|
4708
|
+
title?: (params: {
|
|
4709
|
+
blockData: ConnectorsBlockData;
|
|
4710
|
+
}) => string;
|
|
4711
|
+
/** Function to generate connectors list classes */
|
|
4712
|
+
connectorsList?: (params: {
|
|
4713
|
+
blockData: ConnectorsBlockData;
|
|
4714
|
+
}) => string;
|
|
4715
|
+
/** Function to generate connector item classes */
|
|
4716
|
+
connectorItem?: (params: {
|
|
4717
|
+
itemData: ConnectorItemData;
|
|
4718
|
+
blockData: ConnectorsBlockData;
|
|
4719
|
+
}) => string;
|
|
4720
|
+
/** Function to generate empty state classes */
|
|
4721
|
+
emptyState?: (params: {
|
|
4722
|
+
blockData: ConnectorsBlockData;
|
|
4723
|
+
}) => string;
|
|
4724
|
+
};
|
|
4725
|
+
/** Custom style generators */
|
|
4726
|
+
styles?: {
|
|
4727
|
+
/** Function to generate container styles */
|
|
4728
|
+
container?: (params: {
|
|
4729
|
+
blockData: ConnectorsBlockData;
|
|
4730
|
+
}) => React__default.CSSProperties;
|
|
4731
|
+
/** Function to generate title styles */
|
|
4732
|
+
title?: (params: {
|
|
4733
|
+
blockData: ConnectorsBlockData;
|
|
4734
|
+
}) => React__default.CSSProperties;
|
|
4735
|
+
/** Function to generate connectors list styles */
|
|
4736
|
+
connectorsList?: (params: {
|
|
4737
|
+
blockData: ConnectorsBlockData;
|
|
4738
|
+
}) => React__default.CSSProperties;
|
|
4739
|
+
/** Function to generate connector item styles */
|
|
4740
|
+
connectorItem?: (params: {
|
|
4741
|
+
itemData: ConnectorItemData;
|
|
4742
|
+
blockData: ConnectorsBlockData;
|
|
4743
|
+
}) => React__default.CSSProperties;
|
|
4744
|
+
/** Function to generate empty state styles */
|
|
4745
|
+
emptyState?: (params: {
|
|
4746
|
+
blockData: ConnectorsBlockData;
|
|
4747
|
+
}) => React__default.CSSProperties;
|
|
4748
|
+
};
|
|
4749
|
+
/** Custom event handlers */
|
|
4750
|
+
handlers?: {
|
|
4751
|
+
/** Custom connector click handler */
|
|
4752
|
+
onConnectorClick?: (itemData: ConnectorItemData, blockData: ConnectorsBlockData, originalHandler: (group: GroupedConnector) => Promise<void>) => void;
|
|
4753
|
+
/** Custom title click handler */
|
|
4754
|
+
onTitleClick?: (blockData: ConnectorsBlockData) => void;
|
|
4755
|
+
/** Custom empty state action handler */
|
|
4756
|
+
onEmptyStateAction?: (blockData: ConnectorsBlockData) => void;
|
|
4757
|
+
};
|
|
4758
|
+
/** Configuration options */
|
|
4759
|
+
config?: {
|
|
4760
|
+
/** Custom ARIA labels */
|
|
4761
|
+
ariaLabels?: {
|
|
4762
|
+
container?: (blockData: ConnectorsBlockData) => string;
|
|
4763
|
+
connectorsList?: (blockData: ConnectorsBlockData) => string;
|
|
4764
|
+
emptyState?: (blockData: ConnectorsBlockData) => string;
|
|
4765
|
+
};
|
|
4766
|
+
/** Custom layout configuration */
|
|
4767
|
+
layout?: {
|
|
4768
|
+
/** Touch device gap between items */
|
|
4769
|
+
touchGap?: string;
|
|
4770
|
+
/** Mouse device gap between items */
|
|
4771
|
+
mouseGap?: string;
|
|
4772
|
+
/** Custom touch layout classes */
|
|
4773
|
+
touchClasses?: string[];
|
|
4774
|
+
/** Custom mouse layout classes */
|
|
4775
|
+
mouseClasses?: string[];
|
|
4776
|
+
};
|
|
4777
|
+
/** Show/hide features */
|
|
4778
|
+
features?: {
|
|
4779
|
+
/** Whether to show empty state */
|
|
4780
|
+
showEmptyState?: boolean;
|
|
4781
|
+
/** Whether to show title when no connectors */
|
|
4782
|
+
showTitleWhenEmpty?: boolean;
|
|
4783
|
+
/** Whether to show recent indicators */
|
|
4784
|
+
showRecentIndicators?: boolean;
|
|
4785
|
+
};
|
|
4786
|
+
};
|
|
4787
|
+
/** ConnectCard customization for each connector card */
|
|
4788
|
+
connectCard?: ConnectCardCustomization;
|
|
4789
|
+
};
|
|
4441
4790
|
/**
|
|
4442
4791
|
* Props for the ConnectorsBlock component
|
|
4443
4792
|
*/
|
|
@@ -4445,16 +4794,18 @@ interface ConnectorsBlockProps extends Pick<ConnectorsSelectionsProps, 'waitForP
|
|
|
4445
4794
|
/** Currently selected network adapter */
|
|
4446
4795
|
selectedAdapter: OrbitAdapter | undefined;
|
|
4447
4796
|
/** Array of grouped wallet connectors to display */
|
|
4448
|
-
connectors: GroupedConnector
|
|
4797
|
+
connectors: GroupedConnector[];
|
|
4449
4798
|
/** Title text for the connector group */
|
|
4450
4799
|
title: string;
|
|
4451
4800
|
/** Whether to render the title in bold accent color */
|
|
4452
4801
|
isTitleBold?: boolean;
|
|
4453
4802
|
/** Whether only one network is available */
|
|
4454
4803
|
isOnlyOneNetwork?: boolean;
|
|
4804
|
+
/** Customization options */
|
|
4805
|
+
customization?: ConnectorsBlockCustomization;
|
|
4455
4806
|
}
|
|
4456
4807
|
/**
|
|
4457
|
-
* ConnectorsBlock component - Displays a grouped section of wallet connectors
|
|
4808
|
+
* ConnectorsBlock component - Displays a grouped section of wallet connectors with full customization
|
|
4458
4809
|
*
|
|
4459
4810
|
* This component renders a section of wallet connectors with:
|
|
4460
4811
|
* - Responsive layout adapting to touch/mouse interfaces
|
|
@@ -4463,39 +4814,30 @@ interface ConnectorsBlockProps extends Pick<ConnectorsSelectionsProps, 'waitForP
|
|
|
4463
4814
|
* - Recent wallet indicators and prioritization
|
|
4464
4815
|
* - Full accessibility support with proper labeling
|
|
4465
4816
|
* - Error handling and connection retry logic
|
|
4817
|
+
* - Complete customization of all child components and styling
|
|
4466
4818
|
*
|
|
4467
4819
|
* Layout features:
|
|
4468
4820
|
* - Touch devices: Horizontal scrolling layout with cards
|
|
4469
4821
|
* - Mouse devices: Vertical stacked layout for better readability
|
|
4470
4822
|
* - Dynamic title styling based on section importance
|
|
4471
4823
|
* - Consistent spacing and visual hierarchy
|
|
4824
|
+
* - Customizable layout parameters and responsive behavior
|
|
4472
4825
|
*
|
|
4473
4826
|
* Connection flow:
|
|
4474
4827
|
* - Single adapter: Direct connection attempt
|
|
4475
4828
|
* - Multiple adapters without selection: Triggers network selection
|
|
4476
4829
|
* - Selected adapter: Uses specific adapter for connection
|
|
4477
4830
|
* - Recent wallets: Visual indicators for previously used wallets
|
|
4831
|
+
* - Error handling with retry mechanisms
|
|
4478
4832
|
*
|
|
4479
4833
|
* Accessibility features:
|
|
4480
4834
|
* - Semantic heading structure with proper levels
|
|
4481
4835
|
* - Group labeling for related connector sets
|
|
4482
4836
|
* - Screen reader friendly section descriptions
|
|
4483
4837
|
* - Proper focus management and keyboard navigation
|
|
4838
|
+
* - ARIA live regions for dynamic content updates
|
|
4484
4839
|
*
|
|
4485
|
-
* @
|
|
4486
|
-
* @param connectors - Array of grouped wallet connectors
|
|
4487
|
-
* @param title - Section title for the connector group
|
|
4488
|
-
* @param isTitleBold - Whether to style title as accent/important
|
|
4489
|
-
* @param isOnlyOneNetwork - Whether only one network is available
|
|
4490
|
-
* @param waitForPredict - Function to wait for connection prediction
|
|
4491
|
-
* @param setIsOpen - Function to control modal open state
|
|
4492
|
-
* @param setIsConnected - Function to set connection status
|
|
4493
|
-
* @param onClick - Click handler for connector selection
|
|
4494
|
-
* @param appChains - Configuration for supported chains
|
|
4495
|
-
* @param solanaRPCUrls - Solana RPC URL configuration
|
|
4496
|
-
* @returns JSX element representing the connectors block
|
|
4497
|
-
*
|
|
4498
|
-
* @example
|
|
4840
|
+
* @example Basic usage
|
|
4499
4841
|
* ```tsx
|
|
4500
4842
|
* <ConnectorsBlock
|
|
4501
4843
|
* selectedAdapter={OrbitAdapter.EVM}
|
|
@@ -4506,12 +4848,12 @@ interface ConnectorsBlockProps extends Pick<ConnectorsSelectionsProps, 'waitForP
|
|
|
4506
4848
|
* onClick={(group) => handleWalletSelection(group)}
|
|
4507
4849
|
* appChains={appConfiguration}
|
|
4508
4850
|
* solanaRPCUrls={rpcConfig}
|
|
4851
|
+
* store={walletStore}
|
|
4509
4852
|
* />
|
|
4510
4853
|
* ```
|
|
4511
4854
|
*
|
|
4512
|
-
* @example
|
|
4855
|
+
* @example With full customization
|
|
4513
4856
|
* ```tsx
|
|
4514
|
-
* // Popular wallets section without network selection
|
|
4515
4857
|
* <ConnectorsBlock
|
|
4516
4858
|
* selectedAdapter={undefined}
|
|
4517
4859
|
* connectors={popularConnectors}
|
|
@@ -4519,272 +4861,385 @@ interface ConnectorsBlockProps extends Pick<ConnectorsSelectionsProps, 'waitForP
|
|
|
4519
4861
|
* isTitleBold={false}
|
|
4520
4862
|
* isOnlyOneNetwork={true}
|
|
4521
4863
|
* onClick={(group) => initiateConnection(group)}
|
|
4522
|
-
*
|
|
4523
|
-
*
|
|
4864
|
+
* customization={{
|
|
4865
|
+
* components: {
|
|
4866
|
+
* Container: CustomConnectorsContainer,
|
|
4867
|
+
* Title: CustomSectionTitle
|
|
4868
|
+
* },
|
|
4869
|
+
* classNames: {
|
|
4870
|
+
* connectorsList: ({ blockData }) =>
|
|
4871
|
+
* blockData.isTouch ? 'horizontal-scroll' : 'vertical-stack',
|
|
4872
|
+
* connectorItem: ({ itemData, blockData }) =>
|
|
4873
|
+
* itemData.isRecent ? 'recent-connector' : 'standard-connector'
|
|
4874
|
+
* },
|
|
4875
|
+
* handlers: {
|
|
4876
|
+
* onConnectorClick: (itemData, blockData, originalHandler) => {
|
|
4877
|
+
* analytics.track('connector_clicked', { wallet: itemData.name });
|
|
4878
|
+
* originalHandler(itemData.group);
|
|
4879
|
+
* }
|
|
4880
|
+
* },
|
|
4881
|
+
* connectCard: {
|
|
4882
|
+
* classNames: {
|
|
4883
|
+
* container: ({ cardData }) =>
|
|
4884
|
+
* cardData.isRecent ? 'bg-accent' : 'bg-default'
|
|
4885
|
+
* }
|
|
4886
|
+
* }
|
|
4887
|
+
* }}
|
|
4524
4888
|
* />
|
|
4525
4889
|
* ```
|
|
4526
|
-
*
|
|
4527
|
-
* @public
|
|
4528
4890
|
*/
|
|
4529
|
-
declare
|
|
4891
|
+
declare const ConnectorsBlock: React__default.NamedExoticComponent<ConnectorsBlockProps & React__default.RefAttributes<HTMLElement>>;
|
|
4530
4892
|
|
|
4531
4893
|
/**
|
|
4532
|
-
* @file
|
|
4894
|
+
* @file ConnectorsSelections component with comprehensive customization options and categorized connector display.
|
|
4533
4895
|
*/
|
|
4534
4896
|
|
|
4535
4897
|
/**
|
|
4536
|
-
*
|
|
4537
|
-
* Can be either a URL string for external links or a callback function
|
|
4898
|
+
* Connector selections data for customization context
|
|
4538
4899
|
*/
|
|
4539
|
-
|
|
4540
|
-
|
|
4900
|
+
interface ConnectorsSelectionsData {
|
|
4901
|
+
/** Currently selected network adapter */
|
|
4902
|
+
selectedAdapter: OrbitAdapter | undefined;
|
|
4903
|
+
/** All available connectors */
|
|
4904
|
+
connectors: GroupedConnector[];
|
|
4905
|
+
/** Whether only one network is available */
|
|
4906
|
+
isOnlyOneNetwork: boolean;
|
|
4907
|
+
/** Whether device is touch-enabled */
|
|
4908
|
+
isTouch: boolean;
|
|
4909
|
+
/** Whether impersonated wallet is available */
|
|
4910
|
+
hasImpersonatedConnector: boolean;
|
|
4911
|
+
/** Whether impersonated section should be shown */
|
|
4912
|
+
showImpersonated: boolean;
|
|
4913
|
+
/** Filtered connector groups */
|
|
4914
|
+
connectorGroups: {
|
|
4915
|
+
installed: GroupedConnector[];
|
|
4916
|
+
popular: GroupedConnector[];
|
|
4917
|
+
impersonated?: GroupedConnector;
|
|
4918
|
+
};
|
|
4919
|
+
/** Current labels from i18n */
|
|
4920
|
+
labels: ReturnType<typeof useNovaConnectLabels>;
|
|
4921
|
+
}
|
|
4922
|
+
/**
|
|
4923
|
+
* Impersonate section data
|
|
4924
|
+
*/
|
|
4925
|
+
interface ImpersonateSectionData {
|
|
4926
|
+
/** The impersonated wallet connector */
|
|
4927
|
+
connector: GroupedConnector;
|
|
4928
|
+
/** Whether device is touch-enabled */
|
|
4929
|
+
isTouch: boolean;
|
|
4930
|
+
/** Current labels from i18n */
|
|
4931
|
+
labels: ReturnType<typeof useNovaConnectLabels>;
|
|
4932
|
+
/** Section data for context */
|
|
4933
|
+
sectionsData: ConnectorsSelectionsData;
|
|
4934
|
+
}
|
|
4935
|
+
type ContainerProps$7 = {
|
|
4541
4936
|
className?: string;
|
|
4542
4937
|
style?: React__default.CSSProperties;
|
|
4543
4938
|
children: React__default.ReactNode;
|
|
4544
4939
|
role?: string;
|
|
4545
4940
|
'aria-label'?: string;
|
|
4546
|
-
|
|
4547
|
-
'data-testid'?: string;
|
|
4548
|
-
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
4941
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4549
4942
|
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4550
|
-
type
|
|
4943
|
+
type ContentWrapperProps = {
|
|
4551
4944
|
className?: string;
|
|
4552
4945
|
style?: React__default.CSSProperties;
|
|
4553
4946
|
children: React__default.ReactNode;
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
type TitleProps$1 = {
|
|
4558
|
-
id: string;
|
|
4947
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4948
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4949
|
+
type ConnectorsAreaProps = {
|
|
4559
4950
|
className?: string;
|
|
4560
4951
|
style?: React__default.CSSProperties;
|
|
4561
4952
|
children: React__default.ReactNode;
|
|
4562
4953
|
role?: string;
|
|
4563
|
-
'aria-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4954
|
+
'aria-label'?: string;
|
|
4955
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4956
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4957
|
+
type ImpersonateSectionProps = {
|
|
4567
4958
|
className?: string;
|
|
4568
4959
|
style?: React__default.CSSProperties;
|
|
4569
4960
|
children: React__default.ReactNode;
|
|
4570
4961
|
role?: string;
|
|
4571
|
-
|
|
4572
|
-
|
|
4962
|
+
'aria-label'?: string;
|
|
4963
|
+
impersonateData: ImpersonateSectionData;
|
|
4964
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4965
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4966
|
+
type ImpersonateTitleProps = {
|
|
4573
4967
|
className?: string;
|
|
4574
4968
|
style?: React__default.CSSProperties;
|
|
4575
4969
|
children: React__default.ReactNode;
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
}
|
|
4579
|
-
type
|
|
4970
|
+
impersonateData: ImpersonateSectionData;
|
|
4971
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4972
|
+
} & React__default.RefAttributes<HTMLParagraphElement>;
|
|
4973
|
+
type EmptyStateProps = {
|
|
4580
4974
|
className?: string;
|
|
4581
4975
|
style?: React__default.CSSProperties;
|
|
4582
4976
|
children: React__default.ReactNode;
|
|
4583
4977
|
role?: string;
|
|
4584
|
-
'aria-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
'aria-label'?: string;
|
|
4590
|
-
className?: string;
|
|
4591
|
-
'data-testid'?: string;
|
|
4592
|
-
style?: React__default.CSSProperties;
|
|
4593
|
-
};
|
|
4594
|
-
type StatusProps = {
|
|
4978
|
+
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
4979
|
+
onClick?: () => void;
|
|
4980
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4981
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4982
|
+
type DisclaimerSectionProps = {
|
|
4595
4983
|
className?: string;
|
|
4596
4984
|
style?: React__default.CSSProperties;
|
|
4597
|
-
children
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
role?: string;
|
|
4601
|
-
};
|
|
4985
|
+
children: React__default.ReactNode;
|
|
4986
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4987
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4602
4988
|
/**
|
|
4603
|
-
* Customization options for
|
|
4989
|
+
* Customization options for ConnectorsSelections component
|
|
4604
4990
|
*/
|
|
4605
|
-
type
|
|
4991
|
+
type ConnectorsSelectionsCustomization = {
|
|
4606
4992
|
/** Custom components */
|
|
4607
4993
|
components?: {
|
|
4608
4994
|
/** Custom container wrapper */
|
|
4609
|
-
Container?: ComponentType<ContainerProps$
|
|
4610
|
-
/** Custom content
|
|
4611
|
-
|
|
4612
|
-
/** Custom
|
|
4613
|
-
|
|
4614
|
-
/** Custom
|
|
4615
|
-
|
|
4616
|
-
/** Custom
|
|
4617
|
-
|
|
4618
|
-
/** Custom
|
|
4619
|
-
|
|
4620
|
-
/** Custom
|
|
4621
|
-
|
|
4622
|
-
/** Custom action button */
|
|
4623
|
-
ActionButton?: ComponentType<ButtonProps>;
|
|
4624
|
-
/** Custom status component */
|
|
4625
|
-
Status?: ComponentType<StatusProps>;
|
|
4995
|
+
Container?: ComponentType<ContainerProps$7>;
|
|
4996
|
+
/** Custom content wrapper */
|
|
4997
|
+
ContentWrapper?: ComponentType<ContentWrapperProps>;
|
|
4998
|
+
/** Custom connectors area wrapper */
|
|
4999
|
+
ConnectorsArea?: ComponentType<ConnectorsAreaProps>;
|
|
5000
|
+
/** Custom impersonate section */
|
|
5001
|
+
ImpersonateSection?: ComponentType<ImpersonateSectionProps>;
|
|
5002
|
+
/** Custom impersonate title */
|
|
5003
|
+
ImpersonateTitle?: ComponentType<ImpersonateTitleProps>;
|
|
5004
|
+
/** Custom empty state */
|
|
5005
|
+
EmptyState?: ComponentType<EmptyStateProps>;
|
|
5006
|
+
/** Custom disclaimer section */
|
|
5007
|
+
DisclaimerSection?: ComponentType<DisclaimerSectionProps>;
|
|
4626
5008
|
};
|
|
4627
5009
|
/** Custom class name generators */
|
|
4628
5010
|
classNames?: {
|
|
4629
5011
|
/** Function to generate container classes */
|
|
4630
5012
|
container?: (params: {
|
|
4631
|
-
|
|
5013
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4632
5014
|
}) => string;
|
|
4633
|
-
/** Function to generate content
|
|
4634
|
-
|
|
4635
|
-
|
|
5015
|
+
/** Function to generate content wrapper classes */
|
|
5016
|
+
contentWrapper?: (params: {
|
|
5017
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4636
5018
|
}) => string;
|
|
4637
|
-
/** Function to generate
|
|
4638
|
-
|
|
4639
|
-
|
|
5019
|
+
/** Function to generate connectors area classes */
|
|
5020
|
+
connectorsArea?: (params: {
|
|
5021
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4640
5022
|
}) => string;
|
|
4641
|
-
/** Function to generate
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
5023
|
+
/** Function to generate impersonate section classes */
|
|
5024
|
+
impersonateSection?: (params: {
|
|
5025
|
+
impersonateData: ImpersonateSectionData;
|
|
5026
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5027
|
+
}) => string;
|
|
5028
|
+
/** Function to generate impersonate title classes */
|
|
5029
|
+
impersonateTitle?: (params: {
|
|
5030
|
+
impersonateData: ImpersonateSectionData;
|
|
5031
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5032
|
+
}) => string;
|
|
5033
|
+
/** Function to generate empty state classes */
|
|
5034
|
+
emptyState?: (params: {
|
|
5035
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5036
|
+
}) => string;
|
|
5037
|
+
/** Function to generate disclaimer section classes */
|
|
5038
|
+
disclaimerSection?: (params: {
|
|
5039
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4651
5040
|
}) => string;
|
|
4652
|
-
/** Function to generate status classes */
|
|
4653
|
-
status?: () => string;
|
|
4654
5041
|
};
|
|
4655
5042
|
/** Custom style generators */
|
|
4656
5043
|
styles?: {
|
|
4657
5044
|
/** Function to generate container styles */
|
|
4658
5045
|
container?: (params: {
|
|
4659
|
-
|
|
5046
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4660
5047
|
}) => React__default.CSSProperties;
|
|
4661
|
-
/** Function to generate content
|
|
4662
|
-
|
|
4663
|
-
|
|
5048
|
+
/** Function to generate content wrapper styles */
|
|
5049
|
+
contentWrapper?: (params: {
|
|
5050
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4664
5051
|
}) => React__default.CSSProperties;
|
|
4665
|
-
/** Function to generate
|
|
4666
|
-
|
|
4667
|
-
|
|
5052
|
+
/** Function to generate connectors area styles */
|
|
5053
|
+
connectorsArea?: (params: {
|
|
5054
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4668
5055
|
}) => React__default.CSSProperties;
|
|
4669
|
-
/** Function to generate
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
5056
|
+
/** Function to generate impersonate section styles */
|
|
5057
|
+
impersonateSection?: (params: {
|
|
5058
|
+
impersonateData: ImpersonateSectionData;
|
|
5059
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5060
|
+
}) => React__default.CSSProperties;
|
|
5061
|
+
/** Function to generate impersonate title styles */
|
|
5062
|
+
impersonateTitle?: (params: {
|
|
5063
|
+
impersonateData: ImpersonateSectionData;
|
|
5064
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5065
|
+
}) => React__default.CSSProperties;
|
|
5066
|
+
/** Function to generate empty state styles */
|
|
5067
|
+
emptyState?: (params: {
|
|
5068
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5069
|
+
}) => React__default.CSSProperties;
|
|
5070
|
+
/** Function to generate disclaimer section styles */
|
|
5071
|
+
disclaimerSection?: (params: {
|
|
5072
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4679
5073
|
}) => React__default.CSSProperties;
|
|
4680
|
-
/** Function to generate status styles */
|
|
4681
|
-
status?: () => React__default.CSSProperties;
|
|
4682
5074
|
};
|
|
4683
5075
|
/** Custom event handlers */
|
|
4684
5076
|
handlers?: {
|
|
4685
|
-
/** Custom
|
|
4686
|
-
|
|
4687
|
-
/** Custom
|
|
4688
|
-
|
|
4689
|
-
/** Custom handler for component mount */
|
|
4690
|
-
onMount?: () => void;
|
|
4691
|
-
/** Custom handler for component unmount */
|
|
4692
|
-
onUnmount?: () => void;
|
|
5077
|
+
/** Custom impersonate click handler */
|
|
5078
|
+
onImpersonateClick?: (impersonateData: ImpersonateSectionData, selectionsData: ConnectorsSelectionsData, originalHandler: () => void) => void;
|
|
5079
|
+
/** Custom empty state action handler */
|
|
5080
|
+
onEmptyStateAction?: (selectionsData: ConnectorsSelectionsData) => void;
|
|
4693
5081
|
};
|
|
4694
5082
|
/** Configuration options */
|
|
4695
5083
|
config?: {
|
|
4696
|
-
/** Custom button labels */
|
|
4697
|
-
buttonLabels?: {
|
|
4698
|
-
learnMore?: string;
|
|
4699
|
-
listAction?: string;
|
|
4700
|
-
};
|
|
4701
5084
|
/** Custom ARIA labels */
|
|
4702
5085
|
ariaLabels?: {
|
|
4703
|
-
container?: string;
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
5086
|
+
container?: (selectionsData: ConnectorsSelectionsData) => string;
|
|
5087
|
+
connectorsArea?: (selectionsData: ConnectorsSelectionsData) => string;
|
|
5088
|
+
impersonateSection?: (impersonateData: ImpersonateSectionData) => string;
|
|
5089
|
+
};
|
|
5090
|
+
/** Layout configuration */
|
|
5091
|
+
layout?: {
|
|
5092
|
+
/** Touch device classes for connectors area */
|
|
5093
|
+
touchConnectorsClasses?: string[];
|
|
5094
|
+
/** Mouse device classes for connectors area */
|
|
5095
|
+
mouseConnectorsClasses?: string[];
|
|
5096
|
+
/** Touch device classes for content wrapper */
|
|
5097
|
+
touchContentClasses?: string[];
|
|
5098
|
+
/** Mouse device classes for content wrapper */
|
|
5099
|
+
mouseContentClasses?: string[];
|
|
5100
|
+
};
|
|
5101
|
+
/** Show/hide features */
|
|
5102
|
+
features?: {
|
|
5103
|
+
/** Whether to show empty state */
|
|
5104
|
+
showEmptyState?: boolean;
|
|
5105
|
+
/** Whether to show disclaimer on touch devices */
|
|
5106
|
+
showDisclaimer?: boolean;
|
|
5107
|
+
/** Whether to show impersonate section */
|
|
5108
|
+
showImpersonate?: boolean;
|
|
4707
5109
|
};
|
|
4708
5110
|
};
|
|
5111
|
+
/** ConnectorsBlock customization for each connector block */
|
|
5112
|
+
connectorsBlock?: {
|
|
5113
|
+
/** Customization for installed connectors block */
|
|
5114
|
+
installed?: ConnectorsBlockCustomization;
|
|
5115
|
+
/** Customization for popular connectors block */
|
|
5116
|
+
popular?: ConnectorsBlockCustomization;
|
|
5117
|
+
};
|
|
5118
|
+
/** ConnectCard customization for impersonate card */
|
|
5119
|
+
impersonateCard?: ConnectCardCustomization;
|
|
4709
5120
|
};
|
|
4710
5121
|
/**
|
|
4711
|
-
* Props for the
|
|
5122
|
+
* Props for the ConnectorsSelections component
|
|
4712
5123
|
*/
|
|
4713
|
-
interface
|
|
4714
|
-
/**
|
|
4715
|
-
|
|
4716
|
-
/**
|
|
4717
|
-
|
|
4718
|
-
/**
|
|
4719
|
-
|
|
4720
|
-
/**
|
|
4721
|
-
|
|
4722
|
-
/**
|
|
4723
|
-
|
|
4724
|
-
/**
|
|
4725
|
-
|
|
4726
|
-
/**
|
|
4727
|
-
|
|
4728
|
-
/**
|
|
4729
|
-
|
|
4730
|
-
/** Custom test ID for testing purposes */
|
|
4731
|
-
'data-testid'?: string;
|
|
4732
|
-
/** Whether the disclaimer should be announced to screen readers */
|
|
4733
|
-
announceToScreenReader?: boolean;
|
|
5124
|
+
interface ConnectorsSelectionsProps extends Pick<ConnectButtonProps, 'withImpersonated' | 'store'>, InitialChains {
|
|
5125
|
+
/** Currently selected network adapter */
|
|
5126
|
+
selectedAdapter: OrbitAdapter | undefined;
|
|
5127
|
+
/** Array of grouped wallet connectors */
|
|
5128
|
+
connectors: GroupedConnector[];
|
|
5129
|
+
/** Click handler for connector selection */
|
|
5130
|
+
onClick: (connector: GroupedConnector) => void;
|
|
5131
|
+
/** Function to set connection status */
|
|
5132
|
+
setIsConnected: (value: boolean) => void;
|
|
5133
|
+
/** Function to control modal open state */
|
|
5134
|
+
setIsOpen: (value: boolean) => void;
|
|
5135
|
+
/** Function to wait for connection prediction */
|
|
5136
|
+
waitForPredict: () => boolean | undefined;
|
|
5137
|
+
/** Function to set modal content type */
|
|
5138
|
+
setContentType: (contentType: ConnectContentType) => void;
|
|
5139
|
+
/** Whether only one network is available */
|
|
5140
|
+
isOnlyOneNetwork?: boolean;
|
|
4734
5141
|
/** Customization options */
|
|
4735
|
-
customization?:
|
|
5142
|
+
customization?: ConnectorsSelectionsCustomization;
|
|
4736
5143
|
}
|
|
4737
5144
|
/**
|
|
4738
|
-
*
|
|
5145
|
+
* ConnectorsSelections component - Main wallet selection interface with categorized connectors
|
|
4739
5146
|
*
|
|
4740
|
-
* This component provides
|
|
4741
|
-
* -
|
|
4742
|
-
* -
|
|
4743
|
-
* -
|
|
4744
|
-
* -
|
|
4745
|
-
* -
|
|
4746
|
-
* -
|
|
4747
|
-
* -
|
|
4748
|
-
* - Internationalization support for button labels
|
|
4749
|
-
* - Support for both internal callbacks and external links
|
|
4750
|
-
* - Flexible content areas with optional children support
|
|
4751
|
-
* - Full customization of all child components
|
|
5147
|
+
* This component provides the primary wallet selection interface with:
|
|
5148
|
+
* - Categorized wallet sections (Installed, Popular, Impersonate)
|
|
5149
|
+
* - Responsive layout adapting to touch/mouse interfaces
|
|
5150
|
+
* - Safe App environment detection and filtering
|
|
5151
|
+
* - Empty state handling for missing connectors
|
|
5152
|
+
* - Educational content integration for touch devices
|
|
5153
|
+
* - Full accessibility support with semantic structure
|
|
5154
|
+
* - Complete customization of all child components and styling
|
|
4752
5155
|
*
|
|
4753
|
-
*
|
|
4754
|
-
* -
|
|
4755
|
-
* -
|
|
4756
|
-
* -
|
|
5156
|
+
* Wallet categorization:
|
|
5157
|
+
* - Installed: Detected browser extension wallets (excluding popular ones)
|
|
5158
|
+
* - Popular: Coinbase Wallet and WalletConnect for broader compatibility
|
|
5159
|
+
* - Impersonate: Development/testing wallet for address simulation
|
|
5160
|
+
* - Safe App filtering: Conditional Safe Wallet display based on environment
|
|
5161
|
+
*
|
|
5162
|
+
* Layout features:
|
|
5163
|
+
* - Touch devices: Horizontal scrolling with educational disclaimer
|
|
5164
|
+
* - Mouse devices: Vertical scrolling with fixed height container
|
|
5165
|
+
* - Responsive grid adapting to screen size and device capabilities
|
|
5166
|
+
* - Custom scrollbar styling with NovaCustomScroll class
|
|
5167
|
+
* - Customizable layout parameters and responsive behavior
|
|
5168
|
+
*
|
|
5169
|
+
* Empty state handling:
|
|
5170
|
+
* - Clear error messaging when no connectors found
|
|
5171
|
+
* - Contextual help text explaining the issue
|
|
5172
|
+
* - Visual indicators with warning icons
|
|
5173
|
+
* - Proper error state accessibility
|
|
5174
|
+
* - Customizable empty state content and styling
|
|
5175
|
+
*
|
|
5176
|
+
* Accessibility features:
|
|
5177
|
+
* - Semantic HTML structure with proper headings
|
|
5178
|
+
* - ARIA labels for screen readers
|
|
5179
|
+
* - Role-based navigation support
|
|
5180
|
+
* - Focus management for keyboard users
|
|
5181
|
+
* - Error states with descriptive messaging
|
|
5182
|
+
* - Customizable ARIA labels and descriptions
|
|
4757
5183
|
*
|
|
4758
5184
|
* @example Basic usage
|
|
4759
5185
|
* ```tsx
|
|
4760
|
-
* <
|
|
4761
|
-
*
|
|
4762
|
-
*
|
|
4763
|
-
*
|
|
4764
|
-
*
|
|
5186
|
+
* <ConnectorsSelections
|
|
5187
|
+
* selectedAdapter={OrbitAdapter.EVM}
|
|
5188
|
+
* connectors={availableConnectors}
|
|
5189
|
+
* onClick={(connector) => handleWalletSelection(connector)}
|
|
5190
|
+
* setIsConnected={setConnectionStatus}
|
|
5191
|
+
* setIsOpen={setModalOpen}
|
|
5192
|
+
* waitForPredict={() => checkConnectionState()}
|
|
5193
|
+
* setContentType={setModalContent}
|
|
5194
|
+
* withImpersonated={true}
|
|
5195
|
+
* isOnlyOneNetwork={false}
|
|
5196
|
+
* appChains={chainConfiguration}
|
|
5197
|
+
* solanaRPCUrls={solanaConfig}
|
|
5198
|
+
* store={walletStore}
|
|
4765
5199
|
* />
|
|
4766
5200
|
* ```
|
|
4767
5201
|
*
|
|
4768
|
-
* @example With customization
|
|
5202
|
+
* @example With full customization
|
|
4769
5203
|
* ```tsx
|
|
4770
|
-
* <
|
|
4771
|
-
*
|
|
4772
|
-
*
|
|
4773
|
-
*
|
|
4774
|
-
*
|
|
5204
|
+
* <ConnectorsSelections
|
|
5205
|
+
* selectedAdapter={undefined}
|
|
5206
|
+
* connectors={allConnectors}
|
|
5207
|
+
* onClick={(connector) => initiateConnection(connector)}
|
|
5208
|
+
* setIsConnected={updateConnectionState}
|
|
5209
|
+
* setIsOpen={toggleModal}
|
|
5210
|
+
* waitForPredict={predictConnection}
|
|
5211
|
+
* setContentType={changeContent}
|
|
5212
|
+
* withImpersonated={false}
|
|
5213
|
+
* isOnlyOneNetwork={true}
|
|
4775
5214
|
* customization={{
|
|
5215
|
+
* components: {
|
|
5216
|
+
* Container: CustomSelectionsContainer,
|
|
5217
|
+
* EmptyState: CustomEmptyStateComponent
|
|
5218
|
+
* },
|
|
4776
5219
|
* classNames: {
|
|
4777
|
-
*
|
|
4778
|
-
*
|
|
5220
|
+
* connectorsArea: ({ selectionsData }) =>
|
|
5221
|
+
* selectionsData.isTouch ? 'horizontal-scroll' : 'vertical-stack',
|
|
5222
|
+
* impersonateSection: ({ impersonateData }) =>
|
|
5223
|
+
* impersonateData.isTouch ? 'touch-impersonate' : 'mouse-impersonate'
|
|
4779
5224
|
* },
|
|
4780
|
-
*
|
|
4781
|
-
*
|
|
5225
|
+
* handlers: {
|
|
5226
|
+
* onImpersonateClick: (impersonateData, selectionsData, originalHandler) => {
|
|
5227
|
+
* analytics.track('impersonate_clicked');
|
|
5228
|
+
* originalHandler();
|
|
5229
|
+
* }
|
|
5230
|
+
* },
|
|
5231
|
+
* connectorsBlock: {
|
|
5232
|
+
* installed: {
|
|
5233
|
+
* classNames: {
|
|
5234
|
+
* title: () => 'custom-installed-title'
|
|
5235
|
+
* }
|
|
5236
|
+
* }
|
|
4782
5237
|
* }
|
|
4783
5238
|
* }}
|
|
4784
5239
|
* />
|
|
4785
5240
|
* ```
|
|
4786
5241
|
*/
|
|
4787
|
-
declare const
|
|
5242
|
+
declare const ConnectorsSelections: React__default.NamedExoticComponent<ConnectorsSelectionsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
4788
5243
|
|
|
4789
5244
|
/**
|
|
4790
5245
|
* @file GetWallet component with comprehensive customization options and staggered animations.
|
|
@@ -4836,7 +5291,7 @@ interface WalletIconConfig {
|
|
|
4836
5291
|
/** ARIA label for the wallet icon */
|
|
4837
5292
|
ariaLabel?: string;
|
|
4838
5293
|
}
|
|
4839
|
-
type ContainerProps$
|
|
5294
|
+
type ContainerProps$6 = {
|
|
4840
5295
|
className?: string;
|
|
4841
5296
|
style?: React__default.CSSProperties;
|
|
4842
5297
|
children: React__default.ReactNode;
|
|
@@ -4878,20 +5333,20 @@ type WalletIconProps = {
|
|
|
4878
5333
|
className?: string;
|
|
4879
5334
|
style?: React__default.CSSProperties;
|
|
4880
5335
|
};
|
|
4881
|
-
type ContentSectionProps = {
|
|
5336
|
+
type ContentSectionProps$1 = {
|
|
4882
5337
|
className?: string;
|
|
4883
5338
|
style?: React__default.CSSProperties;
|
|
4884
5339
|
children: React__default.ReactNode;
|
|
4885
5340
|
role?: string;
|
|
4886
5341
|
};
|
|
4887
|
-
type TitleProps = {
|
|
5342
|
+
type TitleProps$2 = {
|
|
4888
5343
|
className?: string;
|
|
4889
5344
|
style?: React__default.CSSProperties;
|
|
4890
5345
|
children: React__default.ReactNode;
|
|
4891
5346
|
role?: string;
|
|
4892
5347
|
'aria-level'?: number;
|
|
4893
5348
|
};
|
|
4894
|
-
type DescriptionProps = {
|
|
5349
|
+
type DescriptionProps$1 = {
|
|
4895
5350
|
className?: string;
|
|
4896
5351
|
style?: React__default.CSSProperties;
|
|
4897
5352
|
children: React__default.ReactNode;
|
|
@@ -4909,7 +5364,7 @@ type GetWalletCustomization = {
|
|
|
4909
5364
|
/** Custom components */
|
|
4910
5365
|
components?: {
|
|
4911
5366
|
/** Custom container wrapper */
|
|
4912
|
-
Container?: ComponentType<ContainerProps$
|
|
5367
|
+
Container?: ComponentType<ContainerProps$6>;
|
|
4913
5368
|
/** Custom animation section */
|
|
4914
5369
|
AnimationSection?: ComponentType<AnimationSectionProps>;
|
|
4915
5370
|
/** Custom stars background */
|
|
@@ -4921,11 +5376,11 @@ type GetWalletCustomization = {
|
|
|
4921
5376
|
/** Custom wallet icon display */
|
|
4922
5377
|
WalletIcon?: ComponentType<WalletIconProps>;
|
|
4923
5378
|
/** Custom content section */
|
|
4924
|
-
ContentSection?: ComponentType<ContentSectionProps>;
|
|
5379
|
+
ContentSection?: ComponentType<ContentSectionProps$1>;
|
|
4925
5380
|
/** Custom title component */
|
|
4926
|
-
Title?: ComponentType<TitleProps>;
|
|
5381
|
+
Title?: ComponentType<TitleProps$2>;
|
|
4927
5382
|
/** Custom description component */
|
|
4928
|
-
Description?: ComponentType<DescriptionProps>;
|
|
5383
|
+
Description?: ComponentType<DescriptionProps$1>;
|
|
4929
5384
|
/** Custom screen reader component */
|
|
4930
5385
|
ScreenReader?: ComponentType<ScreenReaderProps>;
|
|
4931
5386
|
};
|
|
@@ -5117,7 +5572,7 @@ interface ValidationConfig {
|
|
|
5117
5572
|
/** Custom validation function */
|
|
5118
5573
|
customValidator?: (address: string) => string | null;
|
|
5119
5574
|
}
|
|
5120
|
-
type ContainerProps$
|
|
5575
|
+
type ContainerProps$5 = {
|
|
5121
5576
|
className?: string;
|
|
5122
5577
|
style?: React__default.CSSProperties;
|
|
5123
5578
|
children: React__default.ReactNode;
|
|
@@ -5143,7 +5598,7 @@ type InputProps = {
|
|
|
5143
5598
|
spellCheck?: boolean;
|
|
5144
5599
|
hasError: boolean;
|
|
5145
5600
|
} & React__default.RefAttributes<HTMLInputElement>;
|
|
5146
|
-
type ErrorMessageProps = {
|
|
5601
|
+
type ErrorMessageProps$2 = {
|
|
5147
5602
|
className?: string;
|
|
5148
5603
|
style?: React__default.CSSProperties;
|
|
5149
5604
|
children: React__default.ReactNode;
|
|
@@ -5158,13 +5613,13 @@ type ImpersonateFormCustomization = {
|
|
|
5158
5613
|
/** Custom components */
|
|
5159
5614
|
components?: {
|
|
5160
5615
|
/** Custom container wrapper */
|
|
5161
|
-
Container?: ComponentType<ContainerProps$
|
|
5616
|
+
Container?: ComponentType<ContainerProps$5>;
|
|
5162
5617
|
/** Custom label component */
|
|
5163
5618
|
Label?: ComponentType<LabelProps>;
|
|
5164
5619
|
/** Custom input component */
|
|
5165
5620
|
Input?: ComponentType<InputProps>;
|
|
5166
5621
|
/** Custom error message component */
|
|
5167
|
-
ErrorMessage?: ComponentType<ErrorMessageProps>;
|
|
5622
|
+
ErrorMessage?: ComponentType<ErrorMessageProps$2>;
|
|
5168
5623
|
};
|
|
5169
5624
|
/** Custom class name generators */
|
|
5170
5625
|
classNames?: {
|
|
@@ -5320,6 +5775,508 @@ interface ImpersonateFormProps extends Pick<ConnectButtonProps, 'store'> {
|
|
|
5320
5775
|
*/
|
|
5321
5776
|
declare const ImpersonateForm: React__default.ForwardRefExoticComponent<ImpersonateFormProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
5322
5777
|
|
|
5778
|
+
/**
|
|
5779
|
+
* @file Disclaimer component with comprehensive customization options.
|
|
5780
|
+
*/
|
|
5781
|
+
|
|
5782
|
+
/**
|
|
5783
|
+
* Type definition for button actions
|
|
5784
|
+
* Can be either a URL string for external links or a callback function
|
|
5785
|
+
*/
|
|
5786
|
+
type ButtonAction = string | (() => void);
|
|
5787
|
+
type ContainerProps$4 = {
|
|
5788
|
+
className?: string;
|
|
5789
|
+
style?: React__default.CSSProperties;
|
|
5790
|
+
children: React__default.ReactNode;
|
|
5791
|
+
role?: string;
|
|
5792
|
+
'aria-label'?: string;
|
|
5793
|
+
'aria-describedby'?: string;
|
|
5794
|
+
'data-testid'?: string;
|
|
5795
|
+
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
5796
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
5797
|
+
type ContentSectionProps = {
|
|
5798
|
+
className?: string;
|
|
5799
|
+
style?: React__default.CSSProperties;
|
|
5800
|
+
children: React__default.ReactNode;
|
|
5801
|
+
role?: string;
|
|
5802
|
+
'aria-labelledby'?: string;
|
|
5803
|
+
};
|
|
5804
|
+
type TitleProps$1 = {
|
|
5805
|
+
id: string;
|
|
5806
|
+
className?: string;
|
|
5807
|
+
style?: React__default.CSSProperties;
|
|
5808
|
+
children: React__default.ReactNode;
|
|
5809
|
+
role?: string;
|
|
5810
|
+
'aria-level'?: number;
|
|
5811
|
+
};
|
|
5812
|
+
type DescriptionProps = {
|
|
5813
|
+
id: string;
|
|
5814
|
+
className?: string;
|
|
5815
|
+
style?: React__default.CSSProperties;
|
|
5816
|
+
children: React__default.ReactNode;
|
|
5817
|
+
role?: string;
|
|
5818
|
+
};
|
|
5819
|
+
type AdditionalContentProps = {
|
|
5820
|
+
className?: string;
|
|
5821
|
+
style?: React__default.CSSProperties;
|
|
5822
|
+
children: React__default.ReactNode;
|
|
5823
|
+
role?: string;
|
|
5824
|
+
'aria-label'?: string;
|
|
5825
|
+
};
|
|
5826
|
+
type ActionsProps = {
|
|
5827
|
+
className?: string;
|
|
5828
|
+
style?: React__default.CSSProperties;
|
|
5829
|
+
children: React__default.ReactNode;
|
|
5830
|
+
role?: string;
|
|
5831
|
+
'aria-label'?: string;
|
|
5832
|
+
};
|
|
5833
|
+
type ButtonProps = {
|
|
5834
|
+
action: ButtonAction;
|
|
5835
|
+
children: React__default.ReactNode;
|
|
5836
|
+
'aria-label'?: string;
|
|
5837
|
+
className?: string;
|
|
5838
|
+
'data-testid'?: string;
|
|
5839
|
+
style?: React__default.CSSProperties;
|
|
5840
|
+
};
|
|
5841
|
+
type StatusProps = {
|
|
5842
|
+
className?: string;
|
|
5843
|
+
style?: React__default.CSSProperties;
|
|
5844
|
+
children?: React__default.ReactNode;
|
|
5845
|
+
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
5846
|
+
'aria-atomic'?: boolean;
|
|
5847
|
+
role?: string;
|
|
5848
|
+
};
|
|
5849
|
+
/**
|
|
5850
|
+
* Customization options for Disclaimer component
|
|
5851
|
+
*/
|
|
5852
|
+
type DisclaimerCustomization = {
|
|
5853
|
+
/** Custom components */
|
|
5854
|
+
components?: {
|
|
5855
|
+
/** Custom container wrapper */
|
|
5856
|
+
Container?: ComponentType<ContainerProps$4>;
|
|
5857
|
+
/** Custom content section */
|
|
5858
|
+
ContentSection?: ComponentType<ContentSectionProps>;
|
|
5859
|
+
/** Custom title component */
|
|
5860
|
+
Title?: ComponentType<TitleProps$1>;
|
|
5861
|
+
/** Custom description component */
|
|
5862
|
+
Description?: ComponentType<DescriptionProps>;
|
|
5863
|
+
/** Custom additional content wrapper */
|
|
5864
|
+
AdditionalContent?: ComponentType<AdditionalContentProps>;
|
|
5865
|
+
/** Custom actions section */
|
|
5866
|
+
Actions?: ComponentType<ActionsProps>;
|
|
5867
|
+
/** Custom link button */
|
|
5868
|
+
LinkButton?: ComponentType<ButtonProps>;
|
|
5869
|
+
/** Custom action button */
|
|
5870
|
+
ActionButton?: ComponentType<ButtonProps>;
|
|
5871
|
+
/** Custom status component */
|
|
5872
|
+
Status?: ComponentType<StatusProps>;
|
|
5873
|
+
};
|
|
5874
|
+
/** Custom class name generators */
|
|
5875
|
+
classNames?: {
|
|
5876
|
+
/** Function to generate container classes */
|
|
5877
|
+
container?: (params: {
|
|
5878
|
+
compact: boolean;
|
|
5879
|
+
}) => string;
|
|
5880
|
+
/** Function to generate content section classes */
|
|
5881
|
+
contentSection?: (params: {
|
|
5882
|
+
compact: boolean;
|
|
5883
|
+
}) => string;
|
|
5884
|
+
/** Function to generate title classes */
|
|
5885
|
+
title?: (params: {
|
|
5886
|
+
compact: boolean;
|
|
5887
|
+
}) => string;
|
|
5888
|
+
/** Function to generate description classes */
|
|
5889
|
+
description?: () => string;
|
|
5890
|
+
/** Function to generate additional content classes */
|
|
5891
|
+
additionalContent?: () => string;
|
|
5892
|
+
/** Function to generate actions classes */
|
|
5893
|
+
actions?: () => string;
|
|
5894
|
+
/** Function to generate button classes */
|
|
5895
|
+
button?: (params: {
|
|
5896
|
+
isLink: boolean;
|
|
5897
|
+
isPrimary: boolean;
|
|
5898
|
+
}) => string;
|
|
5899
|
+
/** Function to generate status classes */
|
|
5900
|
+
status?: () => string;
|
|
5901
|
+
};
|
|
5902
|
+
/** Custom style generators */
|
|
5903
|
+
styles?: {
|
|
5904
|
+
/** Function to generate container styles */
|
|
5905
|
+
container?: (params: {
|
|
5906
|
+
compact: boolean;
|
|
5907
|
+
}) => React__default.CSSProperties;
|
|
5908
|
+
/** Function to generate content section styles */
|
|
5909
|
+
contentSection?: (params: {
|
|
5910
|
+
compact: boolean;
|
|
5911
|
+
}) => React__default.CSSProperties;
|
|
5912
|
+
/** Function to generate title styles */
|
|
5913
|
+
title?: (params: {
|
|
5914
|
+
compact: boolean;
|
|
5915
|
+
}) => React__default.CSSProperties;
|
|
5916
|
+
/** Function to generate description styles */
|
|
5917
|
+
description?: () => React__default.CSSProperties;
|
|
5918
|
+
/** Function to generate additional content styles */
|
|
5919
|
+
additionalContent?: () => React__default.CSSProperties;
|
|
5920
|
+
/** Function to generate actions styles */
|
|
5921
|
+
actions?: () => React__default.CSSProperties;
|
|
5922
|
+
/** Function to generate button styles */
|
|
5923
|
+
button?: (params: {
|
|
5924
|
+
isLink: boolean;
|
|
5925
|
+
isPrimary: boolean;
|
|
5926
|
+
}) => React__default.CSSProperties;
|
|
5927
|
+
/** Function to generate status styles */
|
|
5928
|
+
status?: () => React__default.CSSProperties;
|
|
5929
|
+
};
|
|
5930
|
+
/** Custom event handlers */
|
|
5931
|
+
handlers?: {
|
|
5932
|
+
/** Custom handler for primary button action */
|
|
5933
|
+
onLearnMoreAction?: () => void;
|
|
5934
|
+
/** Custom handler for secondary button action */
|
|
5935
|
+
onListAction?: () => void;
|
|
5936
|
+
/** Custom handler for component mount */
|
|
5937
|
+
onMount?: () => void;
|
|
5938
|
+
/** Custom handler for component unmount */
|
|
5939
|
+
onUnmount?: () => void;
|
|
5940
|
+
};
|
|
5941
|
+
/** Configuration options */
|
|
5942
|
+
config?: {
|
|
5943
|
+
/** Custom button labels */
|
|
5944
|
+
buttonLabels?: {
|
|
5945
|
+
learnMore?: string;
|
|
5946
|
+
listAction?: string;
|
|
5947
|
+
};
|
|
5948
|
+
/** Custom ARIA labels */
|
|
5949
|
+
ariaLabels?: {
|
|
5950
|
+
container?: string;
|
|
5951
|
+
contentSection?: string;
|
|
5952
|
+
actions?: string;
|
|
5953
|
+
additionalContent?: string;
|
|
5954
|
+
};
|
|
5955
|
+
};
|
|
5956
|
+
};
|
|
5957
|
+
/**
|
|
5958
|
+
* Props for the Disclaimer component
|
|
5959
|
+
*/
|
|
5960
|
+
interface DisclaimerProps {
|
|
5961
|
+
/** Main title text for the disclaimer */
|
|
5962
|
+
title: string;
|
|
5963
|
+
/** Descriptive text explaining the disclaimer content */
|
|
5964
|
+
description: string;
|
|
5965
|
+
/** Action for the primary "Learn More" button - can be URL or callback */
|
|
5966
|
+
learnMoreAction: ButtonAction;
|
|
5967
|
+
/** Optional action for the secondary "List of Networks" button */
|
|
5968
|
+
listAction?: ButtonAction;
|
|
5969
|
+
/** Custom CSS classes for styling the disclaimer container */
|
|
5970
|
+
className?: string;
|
|
5971
|
+
/** Optional custom ARIA label for enhanced accessibility */
|
|
5972
|
+
'aria-label'?: string;
|
|
5973
|
+
/** Whether to show the disclaimer in compact mode */
|
|
5974
|
+
compact?: boolean;
|
|
5975
|
+
/** Additional content to display below the description */
|
|
5976
|
+
children?: React__default.ReactNode;
|
|
5977
|
+
/** Custom test ID for testing purposes */
|
|
5978
|
+
'data-testid'?: string;
|
|
5979
|
+
/** Whether the disclaimer should be announced to screen readers */
|
|
5980
|
+
announceToScreenReader?: boolean;
|
|
5981
|
+
/** Customization options */
|
|
5982
|
+
customization?: DisclaimerCustomization;
|
|
5983
|
+
}
|
|
5984
|
+
/**
|
|
5985
|
+
* Educational disclaimer component with call-to-action buttons
|
|
5986
|
+
*
|
|
5987
|
+
* This component provides educational content with actionable buttons for:
|
|
5988
|
+
* - Informational disclaimers about wallets, networks, or other concepts
|
|
5989
|
+
* - Educational content with "Learn More" functionality
|
|
5990
|
+
* - Network information with optional "List of Networks" access
|
|
5991
|
+
* - Responsive layout with proper spacing and visual hierarchy
|
|
5992
|
+
* - Full WCAG accessibility compliance with screen reader support
|
|
5993
|
+
* - Keyboard navigation with proper focus management
|
|
5994
|
+
* - Semantic HTML structure with comprehensive ARIA labeling
|
|
5995
|
+
* - Internationalization support for button labels
|
|
5996
|
+
* - Support for both internal callbacks and external links
|
|
5997
|
+
* - Flexible content areas with optional children support
|
|
5998
|
+
* - Full customization of all child components
|
|
5999
|
+
*
|
|
6000
|
+
* The component automatically handles different action types:
|
|
6001
|
+
* - **String actions**: Rendered as external links with security attributes
|
|
6002
|
+
* - **Function actions**: Rendered as buttons with callback execution
|
|
6003
|
+
* - **Mixed actions**: Can combine both types for different buttons
|
|
6004
|
+
*
|
|
6005
|
+
* @example Basic usage
|
|
6006
|
+
* ```tsx
|
|
6007
|
+
* <Disclaimer
|
|
6008
|
+
* title="What is a wallet?"
|
|
6009
|
+
* description="Wallets are essential for managing your crypto..."
|
|
6010
|
+
* learnMoreAction={() => setContentType('about')}
|
|
6011
|
+
* listAction="https://example.com/networks"
|
|
6012
|
+
* />
|
|
6013
|
+
* ```
|
|
6014
|
+
*
|
|
6015
|
+
* @example With customization
|
|
6016
|
+
* ```tsx
|
|
6017
|
+
* <Disclaimer
|
|
6018
|
+
* title="Network Information"
|
|
6019
|
+
* description="Choose the right network for your transactions"
|
|
6020
|
+
* learnMoreAction={handleLearnMore}
|
|
6021
|
+
* compact
|
|
6022
|
+
* customization={{
|
|
6023
|
+
* classNames: {
|
|
6024
|
+
* container: ({ compact }) => compact ? 'custom-compact' : 'custom-full',
|
|
6025
|
+
* title: () => 'custom-title-styling'
|
|
6026
|
+
* },
|
|
6027
|
+
* components: {
|
|
6028
|
+
* LinkButton: CustomLinkButton
|
|
6029
|
+
* }
|
|
6030
|
+
* }}
|
|
6031
|
+
* />
|
|
6032
|
+
* ```
|
|
6033
|
+
*/
|
|
6034
|
+
declare const Disclaimer: React__default.ForwardRefExoticComponent<DisclaimerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
6035
|
+
|
|
6036
|
+
/**
|
|
6037
|
+
* @file NetworkSelections component with comprehensive customization options for network selection.
|
|
6038
|
+
*/
|
|
6039
|
+
|
|
6040
|
+
/**
|
|
6041
|
+
* Network data for display
|
|
6042
|
+
*/
|
|
6043
|
+
interface NetworkData {
|
|
6044
|
+
/** Network adapter */
|
|
6045
|
+
adapter: OrbitAdapter;
|
|
6046
|
+
/** Chain ID for icon display */
|
|
6047
|
+
chainId?: number | string;
|
|
6048
|
+
/** Network display name */
|
|
6049
|
+
name: string;
|
|
6050
|
+
/** Network info link URL */
|
|
6051
|
+
infoLink?: string;
|
|
6052
|
+
/** Network index in list */
|
|
6053
|
+
index: number;
|
|
6054
|
+
}
|
|
6055
|
+
/**
|
|
6056
|
+
* Network selections data for customization context
|
|
6057
|
+
*/
|
|
6058
|
+
interface NetworkSelectionsData {
|
|
6059
|
+
/** Currently active connector name */
|
|
6060
|
+
activeConnector?: string;
|
|
6061
|
+
/** Available grouped connectors */
|
|
6062
|
+
connectors: GroupedConnector[];
|
|
6063
|
+
/** Whether device is touch-enabled */
|
|
6064
|
+
isTouch: boolean;
|
|
6065
|
+
/** Whether in error state */
|
|
6066
|
+
isError: boolean;
|
|
6067
|
+
/** Available networks */
|
|
6068
|
+
networks: NetworkData[];
|
|
6069
|
+
}
|
|
6070
|
+
type ContainerProps$3 = {
|
|
6071
|
+
className?: string;
|
|
6072
|
+
style?: React__default.CSSProperties;
|
|
6073
|
+
children: React__default.ReactNode;
|
|
6074
|
+
role?: string;
|
|
6075
|
+
'aria-labelledby'?: string;
|
|
6076
|
+
selectionsData: NetworkSelectionsData;
|
|
6077
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6078
|
+
type TitleProps = {
|
|
6079
|
+
className?: string;
|
|
6080
|
+
style?: React__default.CSSProperties;
|
|
6081
|
+
children: React__default.ReactNode;
|
|
6082
|
+
id?: string;
|
|
6083
|
+
role?: string;
|
|
6084
|
+
'aria-level'?: number;
|
|
6085
|
+
selectionsData: NetworkSelectionsData;
|
|
6086
|
+
} & React__default.RefAttributes<HTMLHeadingElement>;
|
|
6087
|
+
type NetworkListProps = {
|
|
6088
|
+
className?: string;
|
|
6089
|
+
style?: React__default.CSSProperties;
|
|
6090
|
+
children: React__default.ReactNode;
|
|
6091
|
+
role?: string;
|
|
6092
|
+
'aria-label'?: string;
|
|
6093
|
+
selectionsData: NetworkSelectionsData;
|
|
6094
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6095
|
+
type NetworkItemProps = {
|
|
6096
|
+
className?: string;
|
|
6097
|
+
style?: React__default.CSSProperties;
|
|
6098
|
+
children: React__default.ReactNode;
|
|
6099
|
+
role?: string;
|
|
6100
|
+
networkData: NetworkData;
|
|
6101
|
+
selectionsData: NetworkSelectionsData;
|
|
6102
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6103
|
+
type NetworkIconProps = {
|
|
6104
|
+
className?: string;
|
|
6105
|
+
style?: React__default.CSSProperties;
|
|
6106
|
+
children: React__default.ReactNode;
|
|
6107
|
+
role?: string;
|
|
6108
|
+
'aria-label'?: string;
|
|
6109
|
+
networkData: NetworkData;
|
|
6110
|
+
selectionsData: NetworkSelectionsData;
|
|
6111
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6112
|
+
type ErrorContainerProps = {
|
|
6113
|
+
className?: string;
|
|
6114
|
+
style?: React__default.CSSProperties;
|
|
6115
|
+
children: React__default.ReactNode;
|
|
6116
|
+
role?: string;
|
|
6117
|
+
'aria-live'?: 'polite' | 'assertive';
|
|
6118
|
+
selectionsData: NetworkSelectionsData;
|
|
6119
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6120
|
+
type ErrorIconProps = {
|
|
6121
|
+
className?: string;
|
|
6122
|
+
style?: React__default.CSSProperties;
|
|
6123
|
+
children: React__default.ReactNode;
|
|
6124
|
+
'aria-hidden'?: boolean;
|
|
6125
|
+
selectionsData: NetworkSelectionsData;
|
|
6126
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6127
|
+
type ErrorTitleProps = {
|
|
6128
|
+
className?: string;
|
|
6129
|
+
style?: React__default.CSSProperties;
|
|
6130
|
+
children: React__default.ReactNode;
|
|
6131
|
+
role?: string;
|
|
6132
|
+
'aria-level'?: number;
|
|
6133
|
+
selectionsData: NetworkSelectionsData;
|
|
6134
|
+
} & React__default.RefAttributes<HTMLHeadingElement>;
|
|
6135
|
+
type ErrorMessageProps$1 = {
|
|
6136
|
+
className?: string;
|
|
6137
|
+
style?: React__default.CSSProperties;
|
|
6138
|
+
children: React__default.ReactNode;
|
|
6139
|
+
role?: string;
|
|
6140
|
+
selectionsData: NetworkSelectionsData;
|
|
6141
|
+
} & React__default.RefAttributes<HTMLParagraphElement>;
|
|
6142
|
+
/**
|
|
6143
|
+
* NetworkSelections customization options
|
|
6144
|
+
*/
|
|
6145
|
+
type NetworkSelectionsCustomization = {
|
|
6146
|
+
/** Custom components */
|
|
6147
|
+
components?: {
|
|
6148
|
+
/** Custom container wrapper */
|
|
6149
|
+
Container?: ComponentType<ContainerProps$3>;
|
|
6150
|
+
/** Custom title */
|
|
6151
|
+
Title?: ComponentType<TitleProps>;
|
|
6152
|
+
/** Custom network list */
|
|
6153
|
+
NetworkList?: ComponentType<NetworkListProps>;
|
|
6154
|
+
/** Custom network item wrapper */
|
|
6155
|
+
NetworkItem?: ComponentType<NetworkItemProps>;
|
|
6156
|
+
/** Custom network icon wrapper */
|
|
6157
|
+
NetworkIcon?: ComponentType<NetworkIconProps>;
|
|
6158
|
+
/** Custom error container */
|
|
6159
|
+
ErrorContainer?: ComponentType<ErrorContainerProps>;
|
|
6160
|
+
/** Custom error icon wrapper */
|
|
6161
|
+
ErrorIcon?: ComponentType<ErrorIconProps>;
|
|
6162
|
+
/** Custom error title */
|
|
6163
|
+
ErrorTitle?: ComponentType<ErrorTitleProps>;
|
|
6164
|
+
/** Custom error message */
|
|
6165
|
+
ErrorMessage?: ComponentType<ErrorMessageProps$1>;
|
|
6166
|
+
};
|
|
6167
|
+
/** Custom class name generators */
|
|
6168
|
+
classNames?: {
|
|
6169
|
+
/** Function to generate container classes */
|
|
6170
|
+
container?: (params: {
|
|
6171
|
+
selectionsData: NetworkSelectionsData;
|
|
6172
|
+
}) => string;
|
|
6173
|
+
/** Function to generate title classes */
|
|
6174
|
+
title?: (params: {
|
|
6175
|
+
selectionsData: NetworkSelectionsData;
|
|
6176
|
+
}) => string;
|
|
6177
|
+
/** Function to generate network list classes */
|
|
6178
|
+
networkList?: (params: {
|
|
6179
|
+
selectionsData: NetworkSelectionsData;
|
|
6180
|
+
}) => string;
|
|
6181
|
+
/** Function to generate network item classes */
|
|
6182
|
+
networkItem?: (params: {
|
|
6183
|
+
networkData: NetworkData;
|
|
6184
|
+
selectionsData: NetworkSelectionsData;
|
|
6185
|
+
}) => string;
|
|
6186
|
+
/** Function to generate network icon classes */
|
|
6187
|
+
networkIcon?: (params: {
|
|
6188
|
+
networkData: NetworkData;
|
|
6189
|
+
selectionsData: NetworkSelectionsData;
|
|
6190
|
+
}) => string;
|
|
6191
|
+
/** Function to generate error container classes */
|
|
6192
|
+
errorContainer?: (params: {
|
|
6193
|
+
selectionsData: NetworkSelectionsData;
|
|
6194
|
+
}) => string;
|
|
6195
|
+
/** Function to generate error icon classes */
|
|
6196
|
+
errorIcon?: (params: {
|
|
6197
|
+
selectionsData: NetworkSelectionsData;
|
|
6198
|
+
}) => string;
|
|
6199
|
+
/** Function to generate error title classes */
|
|
6200
|
+
errorTitle?: (params: {
|
|
6201
|
+
selectionsData: NetworkSelectionsData;
|
|
6202
|
+
}) => string;
|
|
6203
|
+
/** Function to generate error message classes */
|
|
6204
|
+
errorMessage?: (params: {
|
|
6205
|
+
selectionsData: NetworkSelectionsData;
|
|
6206
|
+
}) => string;
|
|
6207
|
+
};
|
|
6208
|
+
/** Custom style generators */
|
|
6209
|
+
styles?: {
|
|
6210
|
+
/** Function to generate container styles */
|
|
6211
|
+
container?: (params: {
|
|
6212
|
+
selectionsData: NetworkSelectionsData;
|
|
6213
|
+
}) => React__default.CSSProperties;
|
|
6214
|
+
/** Function to generate title styles */
|
|
6215
|
+
title?: (params: {
|
|
6216
|
+
selectionsData: NetworkSelectionsData;
|
|
6217
|
+
}) => React__default.CSSProperties;
|
|
6218
|
+
/** Function to generate network list styles */
|
|
6219
|
+
networkList?: (params: {
|
|
6220
|
+
selectionsData: NetworkSelectionsData;
|
|
6221
|
+
}) => React__default.CSSProperties;
|
|
6222
|
+
/** Function to generate network item styles */
|
|
6223
|
+
networkItem?: (params: {
|
|
6224
|
+
networkData: NetworkData;
|
|
6225
|
+
selectionsData: NetworkSelectionsData;
|
|
6226
|
+
}) => React__default.CSSProperties;
|
|
6227
|
+
/** Function to generate network icon styles */
|
|
6228
|
+
networkIcon?: (params: {
|
|
6229
|
+
networkData: NetworkData;
|
|
6230
|
+
selectionsData: NetworkSelectionsData;
|
|
6231
|
+
}) => React__default.CSSProperties;
|
|
6232
|
+
/** Function to generate error container styles */
|
|
6233
|
+
errorContainer?: (params: {
|
|
6234
|
+
selectionsData: NetworkSelectionsData;
|
|
6235
|
+
}) => React__default.CSSProperties;
|
|
6236
|
+
/** Function to generate error icon styles */
|
|
6237
|
+
errorIcon?: (params: {
|
|
6238
|
+
selectionsData: NetworkSelectionsData;
|
|
6239
|
+
}) => React__default.CSSProperties;
|
|
6240
|
+
/** Function to generate error title styles */
|
|
6241
|
+
errorTitle?: (params: {
|
|
6242
|
+
selectionsData: NetworkSelectionsData;
|
|
6243
|
+
}) => React__default.CSSProperties;
|
|
6244
|
+
/** Function to generate error message styles */
|
|
6245
|
+
errorMessage?: (params: {
|
|
6246
|
+
selectionsData: NetworkSelectionsData;
|
|
6247
|
+
}) => React__default.CSSProperties;
|
|
6248
|
+
};
|
|
6249
|
+
/** Custom event handlers */
|
|
6250
|
+
handlers?: {
|
|
6251
|
+
/** Custom network click handler */
|
|
6252
|
+
onNetworkClick?: (networkData: NetworkData, selectionsData: NetworkSelectionsData, originalHandler: (network: OrbitAdapter) => void) => void;
|
|
6253
|
+
/** Custom error retry handler */
|
|
6254
|
+
onErrorRetry?: (selectionsData: NetworkSelectionsData) => void;
|
|
6255
|
+
};
|
|
6256
|
+
/** Configuration options */
|
|
6257
|
+
config?: {
|
|
6258
|
+
/** Custom ARIA labels */
|
|
6259
|
+
ariaLabels?: {
|
|
6260
|
+
container?: (selectionsData: NetworkSelectionsData) => string;
|
|
6261
|
+
networkList?: (selectionsData: NetworkSelectionsData) => string;
|
|
6262
|
+
networkIcon?: (networkData: NetworkData) => string;
|
|
6263
|
+
errorContainer?: (selectionsData: NetworkSelectionsData) => string;
|
|
6264
|
+
};
|
|
6265
|
+
/** Custom scroll behavior */
|
|
6266
|
+
scroll?: {
|
|
6267
|
+
touchMaxHeight?: string;
|
|
6268
|
+
mouseMaxHeight?: string;
|
|
6269
|
+
gap?: {
|
|
6270
|
+
touch?: string;
|
|
6271
|
+
mouse?: string;
|
|
6272
|
+
};
|
|
6273
|
+
};
|
|
6274
|
+
};
|
|
6275
|
+
/** ConnectCard customization for network cards */
|
|
6276
|
+
connectCard?: ConnectCardCustomization;
|
|
6277
|
+
/** Disclaimer customization */
|
|
6278
|
+
disclaimer?: DisclaimerCustomization;
|
|
6279
|
+
};
|
|
5323
6280
|
/**
|
|
5324
6281
|
* Props for the NetworkSelections component
|
|
5325
6282
|
*/
|
|
@@ -5327,12 +6284,14 @@ interface NetworkSelectionsProps {
|
|
|
5327
6284
|
/** Name of the currently active wallet connector */
|
|
5328
6285
|
activeConnector: string | undefined;
|
|
5329
6286
|
/** Array of grouped wallet connectors with their supported networks */
|
|
5330
|
-
connectors: GroupedConnector
|
|
6287
|
+
connectors: GroupedConnector[];
|
|
5331
6288
|
/** Click handler for network selection */
|
|
5332
6289
|
onClick: (adapter: OrbitAdapter, walletType: WalletType) => Promise<void>;
|
|
6290
|
+
/** Customization options */
|
|
6291
|
+
customization?: NetworkSelectionsCustomization;
|
|
5333
6292
|
}
|
|
5334
6293
|
/**
|
|
5335
|
-
* NetworkSelections component - Network/blockchain selection interface for multi-network wallets
|
|
6294
|
+
* NetworkSelections component - Network/blockchain selection interface for multi-network wallets with full customization
|
|
5336
6295
|
*
|
|
5337
6296
|
* This component provides a network selection interface when a wallet supports multiple blockchains:
|
|
5338
6297
|
* - Visual network cards with blockchain icons and names
|
|
@@ -5341,6 +6300,7 @@ interface NetworkSelectionsProps {
|
|
|
5341
6300
|
* - Educational content about blockchain networks
|
|
5342
6301
|
* - Full accessibility support with semantic structure
|
|
5343
6302
|
* - External documentation links for each network
|
|
6303
|
+
* - Complete customization of all child components and styling
|
|
5344
6304
|
*
|
|
5345
6305
|
* Use cases:
|
|
5346
6306
|
* - Multi-network wallets (e.g., MetaMask supporting EVM chains)
|
|
@@ -5367,12 +6327,7 @@ interface NetworkSelectionsProps {
|
|
|
5367
6327
|
* - Keyboard navigation support for all interactive elements
|
|
5368
6328
|
* - Error announcements with live regions
|
|
5369
6329
|
*
|
|
5370
|
-
* @
|
|
5371
|
-
* @param connectors - Array of available wallet connectors with supported networks
|
|
5372
|
-
* @param onClick - Async handler for network selection with adapter and wallet type
|
|
5373
|
-
* @returns JSX element representing the network selection interface
|
|
5374
|
-
*
|
|
5375
|
-
* @example
|
|
6330
|
+
* @example Basic usage
|
|
5376
6331
|
* ```tsx
|
|
5377
6332
|
* <NetworkSelections
|
|
5378
6333
|
* activeConnector="metamask"
|
|
@@ -5383,23 +6338,32 @@ interface NetworkSelectionsProps {
|
|
|
5383
6338
|
* />
|
|
5384
6339
|
* ```
|
|
5385
6340
|
*
|
|
5386
|
-
* @example
|
|
6341
|
+
* @example With customization
|
|
5387
6342
|
* ```tsx
|
|
5388
|
-
* // For cross-chain wallet selection
|
|
5389
6343
|
* <NetworkSelections
|
|
5390
6344
|
* activeConnector="phantom"
|
|
5391
|
-
* connectors={
|
|
5392
|
-
* name: "Phantom",
|
|
5393
|
-
* adapters: [OrbitAdapter.SOLANA, OrbitAdapter.EVM],
|
|
5394
|
-
* connectors: phantomConnectors
|
|
5395
|
-
* }]}
|
|
6345
|
+
* connectors={crossChainConnectors}
|
|
5396
6346
|
* onClick={(adapter, type) => handleNetworkConnection(adapter, type)}
|
|
6347
|
+
* customization={{
|
|
6348
|
+
* components: {
|
|
6349
|
+
* Container: CustomNetworkContainer,
|
|
6350
|
+
* NetworkIcon: CustomNetworkIcon
|
|
6351
|
+
* },
|
|
6352
|
+
* classNames: {
|
|
6353
|
+
* networkList: ({ selectionsData }) =>
|
|
6354
|
+
* selectionsData.isTouch ? 'touch-network-list' : 'desktop-network-list'
|
|
6355
|
+
* },
|
|
6356
|
+
* handlers: {
|
|
6357
|
+
* onNetworkClick: (networkData, selectionsData, originalHandler) => {
|
|
6358
|
+
* analytics.track('network_selected', { network: networkData.name });
|
|
6359
|
+
* originalHandler(networkData.adapter);
|
|
6360
|
+
* }
|
|
6361
|
+
* }
|
|
6362
|
+
* }}
|
|
5397
6363
|
* />
|
|
5398
6364
|
* ```
|
|
5399
|
-
*
|
|
5400
|
-
* @public
|
|
5401
6365
|
*/
|
|
5402
|
-
declare
|
|
6366
|
+
declare const NetworkSelections: React__default.NamedExoticComponent<NetworkSelectionsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
5403
6367
|
|
|
5404
6368
|
/**
|
|
5405
6369
|
* Parameters for retrieving chain lists based on wallet configuration.
|
|
@@ -5963,30 +6927,30 @@ declare function getAvailableChainIds({ selectedAdapter, appChains, solanaRPCUrl
|
|
|
5963
6927
|
selectedAdapter: OrbitAdapter;
|
|
5964
6928
|
} & InitialChains): Array<number | string>;
|
|
5965
6929
|
|
|
5966
|
-
interface GroupedConnector {
|
|
6930
|
+
interface GroupedConnector$1 {
|
|
5967
6931
|
name: string;
|
|
5968
6932
|
icon?: string;
|
|
5969
6933
|
adapters: OrbitAdapter[];
|
|
5970
|
-
connectors: (Connector
|
|
6934
|
+
connectors: (Connector & {
|
|
5971
6935
|
adapter: OrbitAdapter;
|
|
5972
6936
|
})[];
|
|
5973
6937
|
}
|
|
5974
6938
|
interface GetGroupedConnectorsParams {
|
|
5975
|
-
connectors: Partial<Record<OrbitAdapter, Connector
|
|
6939
|
+
connectors: Partial<Record<OrbitAdapter, Connector[]>>;
|
|
5976
6940
|
excludeConnectors?: string[];
|
|
5977
6941
|
}
|
|
5978
6942
|
/**
|
|
5979
6943
|
* Groups wallet connectors by their formatted names across different adapters.
|
|
5980
6944
|
* Filters out specified excluded connectors (like 'injected' wallets).
|
|
5981
6945
|
*/
|
|
5982
|
-
declare function getGroupedConnectors({ connectors, excludeConnectors }?: GetGroupedConnectorsParams): GroupedConnector[];
|
|
6946
|
+
declare function getGroupedConnectors({ connectors, excludeConnectors }?: GetGroupedConnectorsParams): GroupedConnector$1[];
|
|
5983
6947
|
/**
|
|
5984
6948
|
* Quick helper to check if connectors are available
|
|
5985
6949
|
*/
|
|
5986
|
-
declare function hasAvailableConnectors(connectors: Partial<Record<OrbitAdapter, Connector
|
|
6950
|
+
declare function hasAvailableConnectors(connectors: Partial<Record<OrbitAdapter, Connector[]>>): boolean;
|
|
5987
6951
|
|
|
5988
6952
|
interface GetFilteredConnectorsParams {
|
|
5989
|
-
connectors: Partial<Record<OrbitAdapter, Connector
|
|
6953
|
+
connectors: Partial<Record<OrbitAdapter, Connector[]>>;
|
|
5990
6954
|
selectedAdapter?: OrbitAdapter;
|
|
5991
6955
|
}
|
|
5992
6956
|
/**
|
|
@@ -5997,11 +6961,11 @@ interface GetFilteredConnectorsParams {
|
|
|
5997
6961
|
* @param params Configuration object with connectors and optional adapter filter
|
|
5998
6962
|
* @returns Filtered array of grouped connectors
|
|
5999
6963
|
*/
|
|
6000
|
-
declare function getFilteredConnectors({ connectors, selectedAdapter, }: GetFilteredConnectorsParams): GroupedConnector[];
|
|
6964
|
+
declare function getFilteredConnectors({ connectors, selectedAdapter, }: GetFilteredConnectorsParams): GroupedConnector$1[];
|
|
6001
6965
|
/**
|
|
6002
6966
|
* Quick helper to check if any connectors exist for an adapter
|
|
6003
6967
|
*/
|
|
6004
|
-
declare function hasConnectorsForAdapter(connectors: Partial<Record<OrbitAdapter, Connector
|
|
6968
|
+
declare function hasConnectorsForAdapter(connectors: Partial<Record<OrbitAdapter, Connector[]>>, adapter: OrbitAdapter): boolean;
|
|
6005
6969
|
|
|
6006
6970
|
declare const getNetworkIcon: (adapter: OrbitAdapter) => {
|
|
6007
6971
|
chainId: number;
|
|
@@ -6134,7 +7098,7 @@ interface NetworkTabData {
|
|
|
6134
7098
|
/** Tab index */
|
|
6135
7099
|
index: number;
|
|
6136
7100
|
}
|
|
6137
|
-
type ContainerProps$
|
|
7101
|
+
type ContainerProps$2 = {
|
|
6138
7102
|
className?: string;
|
|
6139
7103
|
style?: React__default.CSSProperties;
|
|
6140
7104
|
children: React__default.ReactNode;
|
|
@@ -6197,7 +7161,7 @@ type NetworkTabsCustomization = {
|
|
|
6197
7161
|
/** Custom components */
|
|
6198
7162
|
components?: {
|
|
6199
7163
|
/** Custom container wrapper */
|
|
6200
|
-
Container?: ComponentType<ContainerProps$
|
|
7164
|
+
Container?: ComponentType<ContainerProps$2>;
|
|
6201
7165
|
/** Custom tab list container */
|
|
6202
7166
|
TabList?: ComponentType<TabListProps>;
|
|
6203
7167
|
/** Custom tab wrapper */
|
|
@@ -6410,6 +7374,361 @@ interface NetworkTabsProps {
|
|
|
6410
7374
|
*/
|
|
6411
7375
|
declare const NetworkTabs: React__default.NamedExoticComponent<NetworkTabsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
6412
7376
|
|
|
7377
|
+
/**
|
|
7378
|
+
* Interface for grouped wallet connectors
|
|
7379
|
+
*/
|
|
7380
|
+
interface GroupedConnector {
|
|
7381
|
+
/** Name of the wallet connector */
|
|
7382
|
+
name: string;
|
|
7383
|
+
/** Optional icon for the wallet */
|
|
7384
|
+
icon?: string;
|
|
7385
|
+
/** Array of supported network adapters */
|
|
7386
|
+
adapters: OrbitAdapter[];
|
|
7387
|
+
/** Array of connectors with their associated adapters */
|
|
7388
|
+
connectors: (Connector & {
|
|
7389
|
+
adapter: OrbitAdapter;
|
|
7390
|
+
})[];
|
|
7391
|
+
}
|
|
7392
|
+
|
|
7393
|
+
/**
|
|
7394
|
+
* @file Connecting component with comprehensive customization options and connection status display.
|
|
7395
|
+
*/
|
|
7396
|
+
|
|
7397
|
+
/**
|
|
7398
|
+
* Connection states
|
|
7399
|
+
*/
|
|
7400
|
+
type ConnectionState = 'connecting' | 'success' | 'error';
|
|
7401
|
+
/**
|
|
7402
|
+
* Connection status data
|
|
7403
|
+
*/
|
|
7404
|
+
interface ConnectingStatusData {
|
|
7405
|
+
/** Connection state */
|
|
7406
|
+
state: ConnectionState;
|
|
7407
|
+
/** Display message */
|
|
7408
|
+
message: string;
|
|
7409
|
+
/** Error message if any */
|
|
7410
|
+
errorMessage: string | null;
|
|
7411
|
+
/** Currently active connector */
|
|
7412
|
+
activeConnector: string | undefined;
|
|
7413
|
+
/** Selected adapter */
|
|
7414
|
+
selectedAdapter: OrbitAdapter | undefined;
|
|
7415
|
+
/** Current connector configuration */
|
|
7416
|
+
currentConnector: GroupedConnector | null;
|
|
7417
|
+
/** Whether to show detailed error */
|
|
7418
|
+
showDetailedError: boolean;
|
|
7419
|
+
/** Raw error object */
|
|
7420
|
+
rawError: unknown;
|
|
7421
|
+
}
|
|
7422
|
+
type ContainerProps$1 = {
|
|
7423
|
+
className?: string;
|
|
7424
|
+
style?: React__default.CSSProperties;
|
|
7425
|
+
children: React__default.ReactNode;
|
|
7426
|
+
role?: string;
|
|
7427
|
+
'aria-label'?: string;
|
|
7428
|
+
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
7429
|
+
'aria-atomic'?: boolean;
|
|
7430
|
+
statusData: ConnectingStatusData;
|
|
7431
|
+
} & React__default.RefAttributes<HTMLElement>;
|
|
7432
|
+
type StatusContainerProps = {
|
|
7433
|
+
className?: string;
|
|
7434
|
+
style?: React__default.CSSProperties;
|
|
7435
|
+
children: React__default.ReactNode;
|
|
7436
|
+
statusData: ConnectingStatusData;
|
|
7437
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7438
|
+
type SpinnerProps = {
|
|
7439
|
+
className?: string;
|
|
7440
|
+
style?: React__default.CSSProperties;
|
|
7441
|
+
role?: string;
|
|
7442
|
+
'aria-label'?: string;
|
|
7443
|
+
'aria-describedby'?: string;
|
|
7444
|
+
statusData: ConnectingStatusData;
|
|
7445
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7446
|
+
type StatusIconProps = {
|
|
7447
|
+
className?: string;
|
|
7448
|
+
style?: React__default.CSSProperties;
|
|
7449
|
+
role?: string;
|
|
7450
|
+
'aria-label'?: string;
|
|
7451
|
+
statusData: ConnectingStatusData;
|
|
7452
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7453
|
+
type WalletIconContainerProps = {
|
|
7454
|
+
className?: string;
|
|
7455
|
+
style?: React__default.CSSProperties;
|
|
7456
|
+
children: React__default.ReactNode;
|
|
7457
|
+
statusData: ConnectingStatusData;
|
|
7458
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7459
|
+
type MessageContainerProps = {
|
|
7460
|
+
className?: string;
|
|
7461
|
+
style?: React__default.CSSProperties;
|
|
7462
|
+
children: React__default.ReactNode;
|
|
7463
|
+
statusData: ConnectingStatusData;
|
|
7464
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7465
|
+
type StatusMessageProps = {
|
|
7466
|
+
className?: string;
|
|
7467
|
+
style?: React__default.CSSProperties;
|
|
7468
|
+
children: React__default.ReactNode;
|
|
7469
|
+
id?: string;
|
|
7470
|
+
role?: string;
|
|
7471
|
+
'aria-level'?: number;
|
|
7472
|
+
statusData: ConnectingStatusData;
|
|
7473
|
+
} & React__default.RefAttributes<HTMLHeadingElement>;
|
|
7474
|
+
type ErrorMessageProps = {
|
|
7475
|
+
className?: string;
|
|
7476
|
+
style?: React__default.CSSProperties;
|
|
7477
|
+
children: React__default.ReactNode;
|
|
7478
|
+
role?: string;
|
|
7479
|
+
'aria-describedby'?: string;
|
|
7480
|
+
statusData: ConnectingStatusData;
|
|
7481
|
+
} & React__default.RefAttributes<HTMLParagraphElement>;
|
|
7482
|
+
type ErrorDetailsProps = {
|
|
7483
|
+
className?: string;
|
|
7484
|
+
style?: React__default.CSSProperties;
|
|
7485
|
+
children: React__default.ReactNode;
|
|
7486
|
+
statusData: ConnectingStatusData;
|
|
7487
|
+
} & React__default.RefAttributes<HTMLDetailsElement>;
|
|
7488
|
+
type LoadingPlaceholderProps = {
|
|
7489
|
+
className?: string;
|
|
7490
|
+
style?: React__default.CSSProperties;
|
|
7491
|
+
role?: string;
|
|
7492
|
+
'aria-label'?: string;
|
|
7493
|
+
statusData: ConnectingStatusData;
|
|
7494
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7495
|
+
/**
|
|
7496
|
+
* Customization options for Connecting component
|
|
7497
|
+
*/
|
|
7498
|
+
type ConnectingCustomization = {
|
|
7499
|
+
/** Custom components */
|
|
7500
|
+
components?: {
|
|
7501
|
+
/** Custom container wrapper */
|
|
7502
|
+
Container?: ComponentType<ContainerProps$1>;
|
|
7503
|
+
/** Custom status container */
|
|
7504
|
+
StatusContainer?: ComponentType<StatusContainerProps>;
|
|
7505
|
+
/** Custom loading spinner */
|
|
7506
|
+
Spinner?: ComponentType<SpinnerProps>;
|
|
7507
|
+
/** Custom status icon */
|
|
7508
|
+
StatusIcon?: ComponentType<StatusIconProps>;
|
|
7509
|
+
/** Custom wallet icon container */
|
|
7510
|
+
WalletIconContainer?: ComponentType<WalletIconContainerProps>;
|
|
7511
|
+
/** Custom message container */
|
|
7512
|
+
MessageContainer?: ComponentType<MessageContainerProps>;
|
|
7513
|
+
/** Custom status message */
|
|
7514
|
+
StatusMessage?: ComponentType<StatusMessageProps>;
|
|
7515
|
+
/** Custom error message */
|
|
7516
|
+
ErrorMessage?: ComponentType<ErrorMessageProps>;
|
|
7517
|
+
/** Custom error details */
|
|
7518
|
+
ErrorDetails?: ComponentType<ErrorDetailsProps>;
|
|
7519
|
+
/** Custom loading placeholder */
|
|
7520
|
+
LoadingPlaceholder?: ComponentType<LoadingPlaceholderProps>;
|
|
7521
|
+
};
|
|
7522
|
+
/** Custom class name generators */
|
|
7523
|
+
classNames?: {
|
|
7524
|
+
/** Function to generate container classes */
|
|
7525
|
+
container?: (params: {
|
|
7526
|
+
statusData: ConnectingStatusData;
|
|
7527
|
+
}) => string;
|
|
7528
|
+
/** Function to generate status container classes */
|
|
7529
|
+
statusContainer?: (params: {
|
|
7530
|
+
statusData: ConnectingStatusData;
|
|
7531
|
+
}) => string;
|
|
7532
|
+
/** Function to generate spinner classes */
|
|
7533
|
+
spinner?: (params: {
|
|
7534
|
+
statusData: ConnectingStatusData;
|
|
7535
|
+
}) => string;
|
|
7536
|
+
/** Function to generate status icon classes */
|
|
7537
|
+
statusIcon?: (params: {
|
|
7538
|
+
statusData: ConnectingStatusData;
|
|
7539
|
+
}) => string;
|
|
7540
|
+
/** Function to generate wallet icon container classes */
|
|
7541
|
+
walletIconContainer?: (params: {
|
|
7542
|
+
statusData: ConnectingStatusData;
|
|
7543
|
+
}) => string;
|
|
7544
|
+
/** Function to generate message container classes */
|
|
7545
|
+
messageContainer?: (params: {
|
|
7546
|
+
statusData: ConnectingStatusData;
|
|
7547
|
+
}) => string;
|
|
7548
|
+
/** Function to generate status message classes */
|
|
7549
|
+
statusMessage?: (params: {
|
|
7550
|
+
statusData: ConnectingStatusData;
|
|
7551
|
+
}) => string;
|
|
7552
|
+
/** Function to generate error message classes */
|
|
7553
|
+
errorMessage?: (params: {
|
|
7554
|
+
statusData: ConnectingStatusData;
|
|
7555
|
+
}) => string;
|
|
7556
|
+
/** Function to generate error details classes */
|
|
7557
|
+
errorDetails?: (params: {
|
|
7558
|
+
statusData: ConnectingStatusData;
|
|
7559
|
+
}) => string;
|
|
7560
|
+
/** Function to generate loading placeholder classes */
|
|
7561
|
+
loadingPlaceholder?: (params: {
|
|
7562
|
+
statusData: ConnectingStatusData;
|
|
7563
|
+
}) => string;
|
|
7564
|
+
};
|
|
7565
|
+
/** Custom style generators */
|
|
7566
|
+
styles?: {
|
|
7567
|
+
/** Function to generate container styles */
|
|
7568
|
+
container?: (params: {
|
|
7569
|
+
statusData: ConnectingStatusData;
|
|
7570
|
+
}) => React__default.CSSProperties;
|
|
7571
|
+
/** Function to generate status container styles */
|
|
7572
|
+
statusContainer?: (params: {
|
|
7573
|
+
statusData: ConnectingStatusData;
|
|
7574
|
+
}) => React__default.CSSProperties;
|
|
7575
|
+
/** Function to generate spinner styles */
|
|
7576
|
+
spinner?: (params: {
|
|
7577
|
+
statusData: ConnectingStatusData;
|
|
7578
|
+
}) => React__default.CSSProperties;
|
|
7579
|
+
/** Function to generate status icon styles */
|
|
7580
|
+
statusIcon?: (params: {
|
|
7581
|
+
statusData: ConnectingStatusData;
|
|
7582
|
+
}) => React__default.CSSProperties;
|
|
7583
|
+
/** Function to generate wallet icon container styles */
|
|
7584
|
+
walletIconContainer?: (params: {
|
|
7585
|
+
statusData: ConnectingStatusData;
|
|
7586
|
+
}) => React__default.CSSProperties;
|
|
7587
|
+
/** Function to generate message container styles */
|
|
7588
|
+
messageContainer?: (params: {
|
|
7589
|
+
statusData: ConnectingStatusData;
|
|
7590
|
+
}) => React__default.CSSProperties;
|
|
7591
|
+
/** Function to generate status message styles */
|
|
7592
|
+
statusMessage?: (params: {
|
|
7593
|
+
statusData: ConnectingStatusData;
|
|
7594
|
+
}) => React__default.CSSProperties;
|
|
7595
|
+
/** Function to generate error message styles */
|
|
7596
|
+
errorMessage?: (params: {
|
|
7597
|
+
statusData: ConnectingStatusData;
|
|
7598
|
+
}) => React__default.CSSProperties;
|
|
7599
|
+
/** Function to generate error details styles */
|
|
7600
|
+
errorDetails?: (params: {
|
|
7601
|
+
statusData: ConnectingStatusData;
|
|
7602
|
+
}) => React__default.CSSProperties;
|
|
7603
|
+
/** Function to generate loading placeholder styles */
|
|
7604
|
+
loadingPlaceholder?: (params: {
|
|
7605
|
+
statusData: ConnectingStatusData;
|
|
7606
|
+
}) => React__default.CSSProperties;
|
|
7607
|
+
};
|
|
7608
|
+
/** Custom event handlers */
|
|
7609
|
+
handlers?: {
|
|
7610
|
+
/** Custom handler for state change */
|
|
7611
|
+
onStateChange?: (state: ConnectionState, statusData: ConnectingStatusData) => void;
|
|
7612
|
+
/** Custom handler for error occurrence */
|
|
7613
|
+
onError?: (error: unknown, statusData: ConnectingStatusData) => void;
|
|
7614
|
+
/** Custom handler for successful connection */
|
|
7615
|
+
onSuccess?: (statusData: ConnectingStatusData) => void;
|
|
7616
|
+
/** Custom handler for connection start */
|
|
7617
|
+
onConnectingStart?: (statusData: ConnectingStatusData) => void;
|
|
7618
|
+
/** Custom cleanup handler called on unmount */
|
|
7619
|
+
onCleanup?: (statusData: ConnectingStatusData) => void;
|
|
7620
|
+
};
|
|
7621
|
+
/** Configuration options */
|
|
7622
|
+
config?: {
|
|
7623
|
+
/** Custom ARIA labels */
|
|
7624
|
+
ariaLabels?: {
|
|
7625
|
+
container?: string;
|
|
7626
|
+
spinner?: string;
|
|
7627
|
+
successIcon?: string;
|
|
7628
|
+
errorIcon?: string;
|
|
7629
|
+
loading?: string;
|
|
7630
|
+
};
|
|
7631
|
+
/** Custom animation settings */
|
|
7632
|
+
animation?: {
|
|
7633
|
+
spinnerDuration?: string;
|
|
7634
|
+
transitionDuration?: string;
|
|
7635
|
+
};
|
|
7636
|
+
/** Custom icon settings */
|
|
7637
|
+
icons?: {
|
|
7638
|
+
showSuccessIcon?: boolean;
|
|
7639
|
+
showErrorIcon?: boolean;
|
|
7640
|
+
customSuccessIcon?: ComponentType<{
|
|
7641
|
+
className?: string;
|
|
7642
|
+
}>;
|
|
7643
|
+
customErrorIcon?: ComponentType<{
|
|
7644
|
+
className?: string;
|
|
7645
|
+
}>;
|
|
7646
|
+
};
|
|
7647
|
+
};
|
|
7648
|
+
};
|
|
7649
|
+
/**
|
|
7650
|
+
* Connection status component props interface
|
|
7651
|
+
*/
|
|
7652
|
+
interface ConnectingProps {
|
|
7653
|
+
/** Currently active connector identifier */
|
|
7654
|
+
activeConnector: string | undefined;
|
|
7655
|
+
/** Selected orbit adapter for the connection */
|
|
7656
|
+
selectedAdapter: OrbitAdapter | undefined;
|
|
7657
|
+
/** Array of available wallet connectors */
|
|
7658
|
+
connectors: GroupedConnector[];
|
|
7659
|
+
/** Whether the wallet connection is successfully established */
|
|
7660
|
+
isConnected: boolean;
|
|
7661
|
+
/** Optional custom error message to display */
|
|
7662
|
+
customErrorMessage?: string;
|
|
7663
|
+
/** Whether to show detailed error information */
|
|
7664
|
+
showDetailedError?: boolean;
|
|
7665
|
+
/** Custom CSS classes for styling the container */
|
|
7666
|
+
className?: string;
|
|
7667
|
+
/** Customization options */
|
|
7668
|
+
customization?: ConnectingCustomization;
|
|
7669
|
+
}
|
|
7670
|
+
/**
|
|
7671
|
+
* Connection status display component for wallet connection flow
|
|
7672
|
+
*
|
|
7673
|
+
* This component provides comprehensive visual feedback during wallet connection:
|
|
7674
|
+
* - Animated loading spinner for connection in progress
|
|
7675
|
+
* - Success state with checkmark icon for completed connections
|
|
7676
|
+
* - Error state with warning icon and detailed error messages
|
|
7677
|
+
* - Fully internationalized text content with translation support
|
|
7678
|
+
* - WCAG compliant accessibility with proper ARIA labels and live regions
|
|
7679
|
+
* - Responsive design that adapts to different screen sizes
|
|
7680
|
+
* - Visual status indicators with semantic colors and icons
|
|
7681
|
+
* - Screen reader announcements for state changes
|
|
7682
|
+
*
|
|
7683
|
+
* The component automatically detects connection state and displays appropriate
|
|
7684
|
+
* visual feedback with proper semantic markup for accessibility tools.
|
|
7685
|
+
*
|
|
7686
|
+
* @param activeConnector - Identifier of the currently connecting wallet
|
|
7687
|
+
* @param selectedAdapter - Orbit adapter instance for the connection
|
|
7688
|
+
* @param connectors - Array of available wallet connector options
|
|
7689
|
+
* @param isConnected - Boolean flag indicating successful connection
|
|
7690
|
+
* @param customErrorMessage - Optional custom error message override
|
|
7691
|
+
* @param showDetailedError - Flag to show detailed error information
|
|
7692
|
+
* @returns JSX element displaying connection status with visual feedback
|
|
7693
|
+
*
|
|
7694
|
+
* @example
|
|
7695
|
+
* ```tsx
|
|
7696
|
+
* <Connecting
|
|
7697
|
+
* activeConnector="metamask"
|
|
7698
|
+
* selectedAdapter={ethereumAdapter}
|
|
7699
|
+
* connectors={availableConnectors}
|
|
7700
|
+
* isConnected={false}
|
|
7701
|
+
* />
|
|
7702
|
+
* ```
|
|
7703
|
+
*
|
|
7704
|
+
* @example
|
|
7705
|
+
* ```tsx
|
|
7706
|
+
* // With custom error handling
|
|
7707
|
+
* <Connecting
|
|
7708
|
+
* activeConnector="walletconnect"
|
|
7709
|
+
* selectedAdapter={polygonAdapter}
|
|
7710
|
+
* connectors={connectors}
|
|
7711
|
+
* isConnected={false}
|
|
7712
|
+
* customErrorMessage="Custom connection error occurred"
|
|
7713
|
+
* showDetailedError={true}
|
|
7714
|
+
* />
|
|
7715
|
+
* ```
|
|
7716
|
+
*
|
|
7717
|
+
* @example
|
|
7718
|
+
* ```tsx
|
|
7719
|
+
* // Successful connection state
|
|
7720
|
+
* <Connecting
|
|
7721
|
+
* activeConnector="phantom"
|
|
7722
|
+
* selectedAdapter={solanaAdapter}
|
|
7723
|
+
* connectors={solanaConnectors}
|
|
7724
|
+
* isConnected={true}
|
|
7725
|
+
* />
|
|
7726
|
+
* ```
|
|
7727
|
+
*
|
|
7728
|
+
* @public
|
|
7729
|
+
*/
|
|
7730
|
+
declare const Connecting: React__default.NamedExoticComponent<ConnectingProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
7731
|
+
|
|
6413
7732
|
/**
|
|
6414
7733
|
* @file RecentBadge component with comprehensive customization options and animated gradient border.
|
|
6415
7734
|
*/
|
|
@@ -6926,4 +8245,4 @@ declare function initializeBlockchainSupport(): Promise<InitializationResult>;
|
|
|
6926
8245
|
*/
|
|
6927
8246
|
declare function isAdapterSupported(adapter: OrbitAdapter): Promise<boolean>;
|
|
6928
8247
|
|
|
6929
|
-
export { AboutWallets, type AboutWalletsCustomization, type AboutWalletsProps, type AdapterInfo, type AdapterLoadStatus, type AllChainConfigs, type AllConnectors, type AllWallets, type AnimationConfig, type BadgeAnimationConfig, type BadgeGradientConfig, type BlockchainUtilities, type BlockchainUtilityResult, type ChainAdapter, type ChainIdentifierArray, ChainListRenderer, type ChainListRendererCustomization, type ChainListRendererProps, ChainSelector, type ChainSelectorCustomization, type ChainSelectorProps, type ChainTriggerButtonCustomization, ConnectButton, type ConnectButtonProps, ConnectCard, ConnectedContent, type ConnectedContentCustomization, type ConnectedContentProps, ConnectedModal, type ConnectedModalCustomization, ConnectedModalFooter, type ConnectedModalFooterCustomization, type ConnectedModalFooterProps, ConnectedModalMainContent, type ConnectedModalMainContentCustomization, type ConnectedModalMainContentProps, ConnectedModalNameAndBalance, type ConnectedModalNameAndBalanceCustomization, type ConnectedModalNameAndBalanceProps, type ConnectedModalProps, ConnectedModalTxHistory, type ConnectedModalTxHistoryCustomization, type ConnectedModalTxHistoryProps, Connecting, type Connector, ConnectorsBlock, ConnectorsSelections, type ConnectorsSelectionsProps, Disclaimer, type DisclaimerCustomization, type DisclaimerProps, GetWallet, type GetWalletCustomization, type GetWalletProps, type GroupedConnector, IconButton, type IconButtonCustomization, type IconButtonProps, ImpersonateForm, type ImpersonateFormCustomization, type ImpersonateFormProps, type InitialChains, type InitializationResult, NetworkSelections, type NetworkTabData, NetworkTabs, type NetworkTabsCustomization, type NetworkTabsProps, type NovaConnectLabels, RecentBadge, type RecentBadgeCustomization, type RecentBadgeProps, ScrollableChainList, type ScrollableChainListCustomization, type ScrollableChainListProps, SelectContentAnimated, type SelectContentAnimatedProps, StatusIcon, type StatusIconCustomization, type StatusIconProps, ToBottomButton, type ToBottomButtonCustomization, type ToBottomButtonProps, ToTopButton, type ToTopButtonCustomization, type ToTopButtonProps, ToastError, type ToastErrorCustomization, type ToastErrorProps, type ValidationConfig, WaitForConnectionContent, type WaitForConnectionContentCustomization, type WaitForConnectionContentProps, type Wallet, WalletAvatar, type WalletAvatarCustomization, type WalletAvatarProps, type WalletAvatarSize, WalletIcon, type WalletIconConfig, type WalletIconCustomization, type WalletIconProps$1 as WalletIconProps, defaultLabels, getAdapterStatus, getAllAdaptersStatus, getAvailableChainIds, getAvailableSolanaClusters, getAvailableSolanaClusters$1 as getAvailableSolanaClustersAsync, getBlockchainUtilities, getChainsListByWalletTypeSync as getChainsListByWalletType, getChainsListByWalletType as getChainsListByWalletTypeAsync, getChainsListByWalletTypeSync, getConnectChainId, getEvmUtils, getFilteredConnectors, getGroupedConnectors, getNetworkIcon, getSolanaUtils, getWalletChains, hasAvailableConnectors, hasConnectorsForAdapter, initializeBlockchainSupport, isAdapterSupported, isEvmChainListSync as isEvmChainList, isEvmChainList as isEvmChainListAsync, isEvmChainListSync, isSolanaChainListSync as isSolanaChainList, isSolanaChainList as isSolanaChainListAsync, isSolanaChainListSync, isValidSolanaCluster, isValidSolanaCluster$1 as isValidSolanaClusterAsync, networksLinks, preloadChainAdapters, ukrainianLabels };
|
|
8248
|
+
export { AboutWallets, type AboutWalletsCustomization, type AboutWalletsProps, type AdapterInfo, type AdapterLoadStatus, type AllChainConfigs, type AllConnectors, type AllWallets, type AnimationConfig, type BadgeAnimationConfig, type BadgeGradientConfig, type BlockchainUtilities, type BlockchainUtilityResult, type ChainAdapter, type ChainIdentifierArray, ChainListRenderer, type ChainListRendererCustomization, type ChainListRendererProps, ChainSelector, type ChainSelectorCustomization, type ChainSelectorProps, type ChainTriggerButtonCustomization, ConnectButton, type ConnectButtonProps, ConnectCard, type ConnectCardCustomization, type ConnectCardData, ConnectedContent, type ConnectedContentCustomization, type ConnectedContentProps, ConnectedModal, type ConnectedModalCustomization, ConnectedModalFooter, type ConnectedModalFooterCustomization, type ConnectedModalFooterProps, ConnectedModalMainContent, type ConnectedModalMainContentCustomization, type ConnectedModalMainContentProps, ConnectedModalNameAndBalance, type ConnectedModalNameAndBalanceCustomization, type ConnectedModalNameAndBalanceProps, type ConnectedModalProps, ConnectedModalTxHistory, type ConnectedModalTxHistoryCustomization, type ConnectedModalTxHistoryProps, Connecting, type ConnectingCustomization, type ConnectingProps, type ConnectingStatusData, type ConnectionState, type Connector, type ConnectorItemData, ConnectorsBlock, type ConnectorsBlockCustomization, type ConnectorsBlockData, ConnectorsSelections, type ConnectorsSelectionsCustomization, type ConnectorsSelectionsData, type ConnectorsSelectionsProps, Disclaimer, type DisclaimerCustomization, type DisclaimerProps, GetWallet, type GetWalletCustomization, type GetWalletProps, type GroupedConnector$1 as GroupedConnector, IconButton, type IconButtonCustomization, type IconButtonProps, ImpersonateForm, type ImpersonateFormCustomization, type ImpersonateFormProps, type ImpersonateSectionData, type InitialChains, type InitializationResult, type NetworkIconsCustomization, NetworkSelections, type NetworkSelectionsCustomization, type NetworkSelectionsData, type NetworkTabData, NetworkTabs, type NetworkTabsCustomization, type NetworkTabsProps, type NovaConnectLabels, RecentBadge, type RecentBadgeCustomization, type RecentBadgeProps, ScrollableChainList, type ScrollableChainListCustomization, type ScrollableChainListProps, SelectContentAnimated, type SelectContentAnimatedProps, StatusIcon, type StatusIconCustomization, type StatusIconProps$1 as StatusIconProps, ToBottomButton, type ToBottomButtonCustomization, type ToBottomButtonProps, ToTopButton, type ToTopButtonCustomization, type ToTopButtonProps, ToastError, type ToastErrorCustomization, type ToastErrorProps, type ValidationConfig, WaitForConnectionContent, type WaitForConnectionContentCustomization, type WaitForConnectionContentProps, type Wallet, WalletAvatar, type WalletAvatarCustomization, type WalletAvatarProps, type WalletAvatarSize, WalletIcon, type WalletIconConfig, type WalletIconCustomization, type WalletIconProps$1 as WalletIconProps, defaultLabels, getAdapterStatus, getAllAdaptersStatus, getAvailableChainIds, getAvailableSolanaClusters, getAvailableSolanaClusters$1 as getAvailableSolanaClustersAsync, getBlockchainUtilities, getChainsListByWalletTypeSync as getChainsListByWalletType, getChainsListByWalletType as getChainsListByWalletTypeAsync, getChainsListByWalletTypeSync, getConnectChainId, getEvmUtils, getFilteredConnectors, getGroupedConnectors, getNetworkIcon, getSolanaUtils, getWalletChains, hasAvailableConnectors, hasConnectorsForAdapter, initializeBlockchainSupport, isAdapterSupported, isEvmChainListSync as isEvmChainList, isEvmChainList as isEvmChainListAsync, isEvmChainListSync, isSolanaChainListSync as isSolanaChainList, isSolanaChainList as isSolanaChainListAsync, isSolanaChainListSync, isValidSolanaCluster, isValidSolanaCluster$1 as isValidSolanaClusterAsync, networksLinks, preloadChainAdapters, ukrainianLabels };
|