@agg-build/ui 1.2.10 → 1.2.12
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/{chunk-K23CJ5UP.mjs → chunk-3JXBOU24.mjs} +580 -307
- package/dist/{chunk-5MTIBPDY.mjs → chunk-4WBQTUPW.mjs} +1091 -441
- package/dist/{chunk-5PSAIGOT.mjs → chunk-IBOE7DRY.mjs} +137 -61
- package/dist/{chunk-XKADJNAJ.mjs → chunk-J6WELNCX.mjs} +601 -326
- package/dist/{chunk-7JKGAWU5.mjs → chunk-U55T5BPE.mjs} +1802 -1564
- package/dist/{chunk-QFW5NDJ6.mjs → chunk-X3KCFWXN.mjs} +1312 -1040
- package/dist/{chunk-5MDFM2MX.mjs → chunk-YSW4ULL5.mjs} +1 -1
- package/dist/events.js +2892 -1746
- package/dist/events.mjs +3 -3
- package/dist/index.js +7085 -4956
- package/dist/index.mjs +520 -139
- package/dist/modals.js +3434 -2315
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +4175 -2764
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +1295 -942
- package/dist/primitives.mjs +5 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +1677 -1249
- package/dist/trading.mjs +4 -4
- package/dist/types/agg-provider.d.mts +27 -0
- package/dist/types/agg-provider.d.ts +27 -0
- package/dist/types/deposit/deposit-modal.types.d.mts +10 -1
- package/dist/types/deposit/deposit-modal.types.d.ts +10 -1
- package/dist/types/deposit/index.d.mts +1 -1
- package/dist/types/deposit/index.d.ts +1 -1
- package/dist/types/deposit/steps/crypto-transfer.d.mts +1 -2
- package/dist/types/deposit/steps/crypto-transfer.d.ts +1 -2
- package/dist/types/deposit/steps/deposit-method.d.mts +2 -1
- package/dist/types/deposit/steps/deposit-method.d.ts +2 -1
- package/dist/types/events/item/event-list-item.types.d.mts +3 -1
- package/dist/types/events/item/event-list-item.types.d.ts +3 -1
- package/dist/types/events/item/event-list-item.utils.d.mts +26 -2
- package/dist/types/events/item/event-list-item.utils.d.ts +26 -2
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +30 -1
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +30 -1
- package/dist/types/events/list/event-list-tabs.d.mts +6 -1
- package/dist/types/events/list/event-list-tabs.d.ts +6 -1
- package/dist/types/events/market-details/index.d.mts +1 -1
- package/dist/types/events/market-details/index.d.ts +1 -1
- package/dist/types/events/market-details/market-details.types.d.mts +27 -2
- package/dist/types/events/market-details/market-details.types.d.ts +27 -2
- package/dist/types/events/market-details/market-details.utils.d.mts +18 -4
- package/dist/types/events/market-details/market-details.utils.d.ts +18 -4
- package/dist/types/events/market-details/orderbook-aggregation.d.mts +30 -10
- package/dist/types/events/market-details/orderbook-aggregation.d.ts +30 -10
- package/dist/types/events/shared/chart-auto-fallback.d.mts +43 -0
- package/dist/types/events/shared/chart-auto-fallback.d.ts +43 -0
- package/dist/types/events/shared/display-outcome-price.d.mts +14 -0
- package/dist/types/events/shared/display-outcome-price.d.ts +14 -0
- package/dist/types/events/shared/display-outcome-venue.d.mts +30 -0
- package/dist/types/events/shared/display-outcome-venue.d.ts +30 -0
- package/dist/types/events/shared/display-reference-price.d.mts +4 -0
- package/dist/types/events/shared/display-reference-price.d.ts +4 -0
- package/dist/types/events/shared/select-outcome-price.d.mts +21 -0
- package/dist/types/events/shared/select-outcome-price.d.ts +21 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/notifications/agg-notification-events-provider.d.mts +35 -0
- package/dist/types/notifications/agg-notification-events-provider.d.ts +35 -0
- package/dist/types/notifications/agg-toast-provider.d.mts +27 -0
- package/dist/types/notifications/agg-toast-provider.d.ts +27 -0
- package/dist/types/notifications/deposit-notification-events.d.mts +10 -0
- package/dist/types/notifications/deposit-notification-events.d.ts +10 -0
- package/dist/types/notifications/index.d.mts +2 -0
- package/dist/types/notifications/index.d.ts +2 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +2 -1
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +2 -1
- package/dist/types/pages/user-profile/components/positions-value-card.d.mts +2 -1
- package/dist/types/pages/user-profile/components/positions-value-card.d.ts +2 -1
- package/dist/types/pages/user-profile/index.d.mts +2 -2
- package/dist/types/pages/user-profile/index.d.ts +2 -2
- package/dist/types/pages/user-profile/user-profile.types.d.mts +54 -1
- package/dist/types/pages/user-profile/user-profile.types.d.ts +54 -1
- package/dist/types/primitives/button/button.types.d.mts +4 -0
- package/dist/types/primitives/button/button.types.d.ts +4 -0
- package/dist/types/primitives/button/index.d.mts +1 -1
- package/dist/types/primitives/button/index.d.ts +1 -1
- package/dist/types/primitives/chart/chart.utils.d.mts +9 -10
- package/dist/types/primitives/chart/chart.utils.d.ts +9 -10
- package/dist/types/primitives/icon/index.d.mts +2 -1
- package/dist/types/primitives/icon/index.d.ts +2 -1
- package/dist/types/primitives/icon/registry.d.mts +24 -0
- package/dist/types/primitives/icon/registry.d.ts +24 -0
- package/dist/types/primitives/icon/svg/circle-xmark.d.mts +5 -0
- package/dist/types/primitives/icon/svg/circle-xmark.d.ts +5 -0
- package/dist/types/primitives/icon/svg/sort-end-date.d.mts +5 -0
- package/dist/types/primitives/icon/svg/sort-end-date.d.ts +5 -0
- package/dist/types/primitives/icon/svg/sort-top-arbitrage.d.mts +5 -0
- package/dist/types/primitives/icon/svg/sort-top-arbitrage.d.ts +5 -0
- package/dist/types/primitives/icon/svg/sort-volume-24hr.d.mts +5 -0
- package/dist/types/primitives/icon/svg/sort-volume-24hr.d.ts +5 -0
- package/dist/types/primitives/icon/svg/sort-volume.d.mts +5 -0
- package/dist/types/primitives/icon/svg/sort-volume.d.ts +5 -0
- package/dist/types/primitives/icon/svg/spinner.d.mts +5 -0
- package/dist/types/primitives/icon/svg/spinner.d.ts +5 -0
- package/dist/types/primitives/select/index.d.mts +1 -1
- package/dist/types/primitives/select/index.d.ts +1 -1
- package/dist/types/primitives/select/select.types.d.mts +9 -0
- package/dist/types/primitives/select/select.types.d.ts +9 -0
- package/dist/types/primitives/toast/index.d.mts +2 -0
- package/dist/types/primitives/toast/index.d.ts +2 -0
- package/dist/types/primitives/toast/toast.types.d.mts +3 -0
- package/dist/types/primitives/toast/toast.types.d.ts +3 -0
- package/dist/types/primitives/tooltip/tooltip.types.d.mts +1 -0
- package/dist/types/primitives/tooltip/tooltip.types.d.ts +1 -0
- package/dist/types/primitives/typography/index.d.mts +1 -1
- package/dist/types/primitives/typography/index.d.ts +1 -1
- package/dist/types/primitives/typography/typography.types.d.mts +2 -0
- package/dist/types/primitives/typography/typography.types.d.ts +2 -0
- package/dist/types/profile/index.d.mts +1 -1
- package/dist/types/profile/index.d.ts +1 -1
- package/dist/types/profile/profile-modal.constants.d.mts +2 -2
- package/dist/types/profile/profile-modal.constants.d.ts +2 -2
- package/dist/types/profile/tabs/accounts-wallets-tab.d.mts +2 -17
- package/dist/types/profile/tabs/accounts-wallets-tab.d.ts +2 -17
- package/dist/types/profile/tabs/trading-access-tab.d.mts +15 -0
- package/dist/types/profile/tabs/trading-access-tab.d.ts +15 -0
- package/dist/types/shared/transfer-fee-summary.d.mts +10 -0
- package/dist/types/shared/transfer-fee-summary.d.ts +10 -0
- package/dist/types/shared/utils.d.mts +3 -0
- package/dist/types/shared/utils.d.ts +3 -0
- package/dist/types/trading/place-order/index.d.mts +1 -1
- package/dist/types/trading/place-order/index.d.ts +1 -1
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +9 -0
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +9 -0
- package/dist/types/trading/place-order/index.place-order.types.d.mts +15 -2
- package/dist/types/trading/place-order/index.place-order.types.d.ts +15 -2
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +49 -6
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +49 -6
- package/dist/types/withdraw/index.d.mts +1 -1
- package/dist/types/withdraw/index.d.ts +1 -1
- package/dist/types/withdraw/steps/withdraw-success.d.mts +13 -7
- package/dist/types/withdraw/steps/withdraw-success.d.ts +13 -7
- package/dist/types/withdraw/steps/withdraw-success.utils.d.mts +2 -0
- package/dist/types/withdraw/steps/withdraw-success.utils.d.ts +2 -0
- package/dist/types/withdraw/withdraw-modal.types.d.mts +5 -0
- package/dist/types/withdraw/withdraw-modal.types.d.ts +5 -0
- package/package.json +3 -3
|
@@ -8,10 +8,11 @@ type AvailableBalanceCardProps = {
|
|
|
8
8
|
label?: string;
|
|
9
9
|
valueLabel: string;
|
|
10
10
|
chains: ChainRow[];
|
|
11
|
+
isLoading?: boolean;
|
|
11
12
|
className?: string;
|
|
12
13
|
};
|
|
13
14
|
export declare const AvailableBalanceCard: {
|
|
14
|
-
({ label, valueLabel, chains, className, }: AvailableBalanceCardProps): JSX.Element;
|
|
15
|
+
({ label, valueLabel, chains, isLoading, className, }: AvailableBalanceCardProps): JSX.Element;
|
|
15
16
|
displayName: string;
|
|
16
17
|
};
|
|
17
18
|
export {};
|
|
@@ -8,10 +8,11 @@ type AvailableBalanceCardProps = {
|
|
|
8
8
|
label?: string;
|
|
9
9
|
valueLabel: string;
|
|
10
10
|
chains: ChainRow[];
|
|
11
|
+
isLoading?: boolean;
|
|
11
12
|
className?: string;
|
|
12
13
|
};
|
|
13
14
|
export declare const AvailableBalanceCard: {
|
|
14
|
-
({ label, valueLabel, chains, className, }: AvailableBalanceCardProps): JSX.Element;
|
|
15
|
+
({ label, valueLabel, chains, isLoading, className, }: AvailableBalanceCardProps): JSX.Element;
|
|
15
16
|
displayName: string;
|
|
16
17
|
};
|
|
17
18
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
type PositionsValueCardProps = {
|
|
2
2
|
label?: string;
|
|
3
3
|
valueLabel: string;
|
|
4
|
+
isLoading?: boolean;
|
|
4
5
|
className?: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const PositionsValueCard: {
|
|
7
|
-
({ label, valueLabel, className, }: PositionsValueCardProps): JSX.Element;
|
|
8
|
+
({ label, valueLabel, isLoading, className, }: PositionsValueCardProps): JSX.Element;
|
|
8
9
|
displayName: string;
|
|
9
10
|
};
|
|
10
11
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
type PositionsValueCardProps = {
|
|
2
2
|
label?: string;
|
|
3
3
|
valueLabel: string;
|
|
4
|
+
isLoading?: boolean;
|
|
4
5
|
className?: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const PositionsValueCard: {
|
|
7
|
-
({ label, valueLabel, className, }: PositionsValueCardProps): JSX.Element;
|
|
8
|
+
({ label, valueLabel, isLoading, className, }: PositionsValueCardProps): JSX.Element;
|
|
8
9
|
displayName: string;
|
|
9
10
|
};
|
|
10
11
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { UserProfilePageProps } from "./user-profile.types";
|
|
2
|
-
export type { UserProfileActivity, UserProfileBalance, UserProfileConnectedExchange, UserProfileConnectedWallet, UserProfileInfo, UserProfilePageClassNames, UserProfilePageProps, UserProfilePosition, UserProfilePositionFilter, UserProfilePositionVenueShare, UserProfileSocialLink, UserProfileVenueBalance, } from "./user-profile.types";
|
|
2
|
+
export type { UserProfileActivity, UserProfileActivityStatus, UserProfileBalance, UserProfileConnectedExchange, UserProfileConnectedWallet, UserProfileInfo, UserProfilePageClassNames, UserProfilePageProps, UserProfilePosition, UserProfilePositionFilter, UserProfilePositionVenueShare, UserProfileSocialLink, UserProfileTransferStatus, UserProfileVenueBalance, } from "./user-profile.types";
|
|
3
3
|
export { USER_PROFILE_TAB_ACTIVITY, USER_PROFILE_TAB_OPEN_ORDERS, USER_PROFILE_TAB_POSITIONS, } from "./user-profile.constants";
|
|
4
4
|
export type { UserProfileTabValue } from "./user-profile.constants";
|
|
5
5
|
export declare const UserProfilePage: {
|
|
6
|
-
({ user, balanceChainsOverride, venueBalances: _venueBalances, balance, activePositions, closedPositions, activities, onEditProfile, onDeposit, onWithdraw, openOrders, initialPositionFilter, tab, onTabChange, onPositionClick, getPositionHref, onClaim, claimingPositionKeys, onActivityClick, getActivityHref, onOpenOrderClick, onCancelOrder, cancellingOrderIds, isLoadingPositions, isLoadingActivities, isLoadingOpenOrders, positionsError, activitiesError, openOrdersError, hasMoreActivePositions, isLoadingMoreActivePositions, onLoadMoreActivePositions, hasMoreClosedPositions, isLoadingMoreClosedPositions, onLoadMoreClosedPositions, onPositionFilterChange: onPositionFilterChangeProp, hasMoreActivities, isLoadingMoreActivities, onLoadMoreActivities, hasMoreOpenOrders, isLoadingMoreOpenOrders, onLoadMoreOpenOrders, classNames, onError, }: UserProfilePageProps & {
|
|
6
|
+
({ user, balanceChainsOverride, venueBalances: _venueBalances, balance, activePositions, closedPositions, activities, onEditProfile, onDeposit, onWithdraw, openOrders, initialPositionFilter, tab, onTabChange, onPositionClick, getPositionHref, onClaim, claimingPositionKeys, onClaimResult, onClaimSubmitError, onActivityClick, getActivityHref, onOpenOrderClick, onCancelOrder, cancellingOrderIds, isLoadingPositions, isLoadingActivities, isLoadingOpenOrders, positionsError, activitiesError, openOrdersError, hasMoreActivePositions, isLoadingMoreActivePositions, onLoadMoreActivePositions, hasMoreClosedPositions, isLoadingMoreClosedPositions, onLoadMoreClosedPositions, onPositionFilterChange: onPositionFilterChangeProp, hasMoreActivities, isLoadingMoreActivities, onLoadMoreActivities, hasMoreOpenOrders, isLoadingMoreOpenOrders, onLoadMoreOpenOrders, classNames, onError, }: UserProfilePageProps & {
|
|
7
7
|
onError?: (error: Error) => void;
|
|
8
8
|
}): JSX.Element;
|
|
9
9
|
displayName: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { UserProfilePageProps } from "./user-profile.types";
|
|
2
|
-
export type { UserProfileActivity, UserProfileBalance, UserProfileConnectedExchange, UserProfileConnectedWallet, UserProfileInfo, UserProfilePageClassNames, UserProfilePageProps, UserProfilePosition, UserProfilePositionFilter, UserProfilePositionVenueShare, UserProfileSocialLink, UserProfileVenueBalance, } from "./user-profile.types";
|
|
2
|
+
export type { UserProfileActivity, UserProfileActivityStatus, UserProfileBalance, UserProfileConnectedExchange, UserProfileConnectedWallet, UserProfileInfo, UserProfilePageClassNames, UserProfilePageProps, UserProfilePosition, UserProfilePositionFilter, UserProfilePositionVenueShare, UserProfileSocialLink, UserProfileTransferStatus, UserProfileVenueBalance, } from "./user-profile.types";
|
|
3
3
|
export { USER_PROFILE_TAB_ACTIVITY, USER_PROFILE_TAB_OPEN_ORDERS, USER_PROFILE_TAB_POSITIONS, } from "./user-profile.constants";
|
|
4
4
|
export type { UserProfileTabValue } from "./user-profile.constants";
|
|
5
5
|
export declare const UserProfilePage: {
|
|
6
|
-
({ user, balanceChainsOverride, venueBalances: _venueBalances, balance, activePositions, closedPositions, activities, onEditProfile, onDeposit, onWithdraw, openOrders, initialPositionFilter, tab, onTabChange, onPositionClick, getPositionHref, onClaim, claimingPositionKeys, onActivityClick, getActivityHref, onOpenOrderClick, onCancelOrder, cancellingOrderIds, isLoadingPositions, isLoadingActivities, isLoadingOpenOrders, positionsError, activitiesError, openOrdersError, hasMoreActivePositions, isLoadingMoreActivePositions, onLoadMoreActivePositions, hasMoreClosedPositions, isLoadingMoreClosedPositions, onLoadMoreClosedPositions, onPositionFilterChange: onPositionFilterChangeProp, hasMoreActivities, isLoadingMoreActivities, onLoadMoreActivities, hasMoreOpenOrders, isLoadingMoreOpenOrders, onLoadMoreOpenOrders, classNames, onError, }: UserProfilePageProps & {
|
|
6
|
+
({ user, balanceChainsOverride, venueBalances: _venueBalances, balance, activePositions, closedPositions, activities, onEditProfile, onDeposit, onWithdraw, openOrders, initialPositionFilter, tab, onTabChange, onPositionClick, getPositionHref, onClaim, claimingPositionKeys, onClaimResult, onClaimSubmitError, onActivityClick, getActivityHref, onOpenOrderClick, onCancelOrder, cancellingOrderIds, isLoadingPositions, isLoadingActivities, isLoadingOpenOrders, positionsError, activitiesError, openOrdersError, hasMoreActivePositions, isLoadingMoreActivePositions, onLoadMoreActivePositions, hasMoreClosedPositions, isLoadingMoreClosedPositions, onLoadMoreClosedPositions, onPositionFilterChange: onPositionFilterChangeProp, hasMoreActivities, isLoadingMoreActivities, onLoadMoreActivities, hasMoreOpenOrders, isLoadingMoreOpenOrders, onLoadMoreOpenOrders, classNames, onError, }: UserProfilePageProps & {
|
|
7
7
|
onError?: (error: Error) => void;
|
|
8
8
|
}): JSX.Element;
|
|
9
9
|
displayName: string;
|
|
@@ -65,6 +65,8 @@ export interface UserProfilePosition {
|
|
|
65
65
|
title: string;
|
|
66
66
|
/** Outcome name for the pill only, e.g. "Yes" (no price). */
|
|
67
67
|
outcomeLabel: string;
|
|
68
|
+
/** Resolved winning outcome name shown in closed position rows, e.g. "No". */
|
|
69
|
+
resolutionLabel?: string | null;
|
|
68
70
|
/** Per-venue position sizes with logos below the pill. */
|
|
69
71
|
venueShareBreakdown: UserProfilePositionVenueShare[];
|
|
70
72
|
/** Total shares/contracts represented by this row. */
|
|
@@ -130,6 +132,10 @@ export interface UserProfileTradeActivity {
|
|
|
130
132
|
isFailed?: boolean;
|
|
131
133
|
/** Whether the row should use error-colored text because the activity has an error. */
|
|
132
134
|
hasError?: boolean;
|
|
135
|
+
/** Error message for the activity. */
|
|
136
|
+
errorMessage?: string;
|
|
137
|
+
/** Normalized lifecycle status driving row tone. Defaults to "completed". */
|
|
138
|
+
status?: UserProfileActivityStatus;
|
|
133
139
|
/** Activity type, e.g. "Buy", "Sell" */
|
|
134
140
|
type: string;
|
|
135
141
|
/** Market thumbnail image URL */
|
|
@@ -147,6 +153,14 @@ export interface UserProfileTradeActivity {
|
|
|
147
153
|
/** Time label, e.g. "3d ago" */
|
|
148
154
|
timeLabel: string;
|
|
149
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Normalized UI state for activity rows. Backend statuses collapse into
|
|
158
|
+
* one of four buckets so row tone, status icons, titles, and amounts stay
|
|
159
|
+
* aligned. Unknown statuses fall back to "completed" — a stale row at rest
|
|
160
|
+
* is the safer default than a sticky spinner.
|
|
161
|
+
*/
|
|
162
|
+
export type UserProfileActivityStatus = "completed" | "pending" | "failed" | "canceled";
|
|
163
|
+
export type UserProfileTransferStatus = UserProfileActivityStatus;
|
|
150
164
|
/** Non-trade activity row: withdrawal / deposit / bridge / user_op. */
|
|
151
165
|
export interface UserProfileTransferActivity {
|
|
152
166
|
kind: "withdrawal" | "deposit" | "bridge" | "user_op";
|
|
@@ -155,6 +169,10 @@ export interface UserProfileTransferActivity {
|
|
|
155
169
|
isFailed?: boolean;
|
|
156
170
|
/** Whether the row should use error-colored text because the activity has an error. */
|
|
157
171
|
hasError?: boolean;
|
|
172
|
+
/** Error message for the activity. */
|
|
173
|
+
errorMessage?: string;
|
|
174
|
+
/** Normalized status driving icon, title, and amount rendering. Defaults to "completed". */
|
|
175
|
+
status?: UserProfileTransferStatus;
|
|
158
176
|
/** Header label, e.g. "Withdraw", "Deposit", "Bridge", "Wallet op". */
|
|
159
177
|
type: string;
|
|
160
178
|
/** Title, e.g. "Withdraw USDC". */
|
|
@@ -254,8 +272,43 @@ export interface UserProfilePageProps {
|
|
|
254
272
|
getPositionHref?: (position: UserProfilePosition) => string | undefined;
|
|
255
273
|
/** Called when the user claims a closed winning position. */
|
|
256
274
|
onClaim?: (position: UserProfilePosition) => Promise<void> | void;
|
|
257
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* Map of claim key (marketId or position id) to loading state while claim is in-flight.
|
|
277
|
+
*
|
|
278
|
+
* Passing this prop overrides the internal lifecycle-driven spinner (the page derives
|
|
279
|
+
* spinner state from the in-flight redeem's WS lifecycle when this prop is omitted).
|
|
280
|
+
* Partners who own the claim flow via `onClaim` typically pass their own state here;
|
|
281
|
+
* partners who let the page own the flow should omit this prop.
|
|
282
|
+
*/
|
|
258
283
|
claimingPositionKeys?: Record<string, boolean>;
|
|
284
|
+
/**
|
|
285
|
+
* Called once per redeem when its lifecycle reaches terminal (every expected leg
|
|
286
|
+
* confirmed or failed on chain). Receives the same `claimKey` that
|
|
287
|
+
* `claimingPositionKeys` uses (i.e. `position.marketId ?? position.id`) plus a
|
|
288
|
+
* summary of the terminal lifecycle state. Use this to fire one-shot success/failure
|
|
289
|
+
* toasts.
|
|
290
|
+
*
|
|
291
|
+
* NOT fired for synchronous submit failures (network errors, `RedeemRejectedError`)
|
|
292
|
+
* — those go through `onClaimSubmitError`.
|
|
293
|
+
*
|
|
294
|
+
* Only fired when the internal claim path is used (i.e. when the caller does NOT
|
|
295
|
+
* pass an `onClaim` prop). Callers that own the claim flow via `onClaim` are
|
|
296
|
+
* responsible for their own toasting.
|
|
297
|
+
*/
|
|
298
|
+
onClaimResult?: (claimKey: string, lifecycle: {
|
|
299
|
+
allConfirmed: boolean;
|
|
300
|
+
anyFailed: boolean;
|
|
301
|
+
errorMessage: string | null;
|
|
302
|
+
}) => void;
|
|
303
|
+
/**
|
|
304
|
+
* Called when the redeem mutation itself rejects — i.e. transport error, validation
|
|
305
|
+
* error, or `RedeemRejectedError` (all legs ineligible/rejected at submit time). The
|
|
306
|
+
* redeem never enters the WS lifecycle in these cases, so `onClaimResult` does NOT
|
|
307
|
+
* fire.
|
|
308
|
+
*
|
|
309
|
+
* Only fired when the internal claim path is used.
|
|
310
|
+
*/
|
|
311
|
+
onClaimSubmitError?: (claimKey: string, error: Error) => void;
|
|
259
312
|
/** Called when an activity row is clicked */
|
|
260
313
|
onActivityClick?: (activity: UserProfileActivity) => void;
|
|
261
314
|
/** Optional href for an activity row (enables ctrl/cmd/middle-click to open in a new tab). */
|
|
@@ -65,6 +65,8 @@ export interface UserProfilePosition {
|
|
|
65
65
|
title: string;
|
|
66
66
|
/** Outcome name for the pill only, e.g. "Yes" (no price). */
|
|
67
67
|
outcomeLabel: string;
|
|
68
|
+
/** Resolved winning outcome name shown in closed position rows, e.g. "No". */
|
|
69
|
+
resolutionLabel?: string | null;
|
|
68
70
|
/** Per-venue position sizes with logos below the pill. */
|
|
69
71
|
venueShareBreakdown: UserProfilePositionVenueShare[];
|
|
70
72
|
/** Total shares/contracts represented by this row. */
|
|
@@ -130,6 +132,10 @@ export interface UserProfileTradeActivity {
|
|
|
130
132
|
isFailed?: boolean;
|
|
131
133
|
/** Whether the row should use error-colored text because the activity has an error. */
|
|
132
134
|
hasError?: boolean;
|
|
135
|
+
/** Error message for the activity. */
|
|
136
|
+
errorMessage?: string;
|
|
137
|
+
/** Normalized lifecycle status driving row tone. Defaults to "completed". */
|
|
138
|
+
status?: UserProfileActivityStatus;
|
|
133
139
|
/** Activity type, e.g. "Buy", "Sell" */
|
|
134
140
|
type: string;
|
|
135
141
|
/** Market thumbnail image URL */
|
|
@@ -147,6 +153,14 @@ export interface UserProfileTradeActivity {
|
|
|
147
153
|
/** Time label, e.g. "3d ago" */
|
|
148
154
|
timeLabel: string;
|
|
149
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Normalized UI state for activity rows. Backend statuses collapse into
|
|
158
|
+
* one of four buckets so row tone, status icons, titles, and amounts stay
|
|
159
|
+
* aligned. Unknown statuses fall back to "completed" — a stale row at rest
|
|
160
|
+
* is the safer default than a sticky spinner.
|
|
161
|
+
*/
|
|
162
|
+
export type UserProfileActivityStatus = "completed" | "pending" | "failed" | "canceled";
|
|
163
|
+
export type UserProfileTransferStatus = UserProfileActivityStatus;
|
|
150
164
|
/** Non-trade activity row: withdrawal / deposit / bridge / user_op. */
|
|
151
165
|
export interface UserProfileTransferActivity {
|
|
152
166
|
kind: "withdrawal" | "deposit" | "bridge" | "user_op";
|
|
@@ -155,6 +169,10 @@ export interface UserProfileTransferActivity {
|
|
|
155
169
|
isFailed?: boolean;
|
|
156
170
|
/** Whether the row should use error-colored text because the activity has an error. */
|
|
157
171
|
hasError?: boolean;
|
|
172
|
+
/** Error message for the activity. */
|
|
173
|
+
errorMessage?: string;
|
|
174
|
+
/** Normalized status driving icon, title, and amount rendering. Defaults to "completed". */
|
|
175
|
+
status?: UserProfileTransferStatus;
|
|
158
176
|
/** Header label, e.g. "Withdraw", "Deposit", "Bridge", "Wallet op". */
|
|
159
177
|
type: string;
|
|
160
178
|
/** Title, e.g. "Withdraw USDC". */
|
|
@@ -254,8 +272,43 @@ export interface UserProfilePageProps {
|
|
|
254
272
|
getPositionHref?: (position: UserProfilePosition) => string | undefined;
|
|
255
273
|
/** Called when the user claims a closed winning position. */
|
|
256
274
|
onClaim?: (position: UserProfilePosition) => Promise<void> | void;
|
|
257
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* Map of claim key (marketId or position id) to loading state while claim is in-flight.
|
|
277
|
+
*
|
|
278
|
+
* Passing this prop overrides the internal lifecycle-driven spinner (the page derives
|
|
279
|
+
* spinner state from the in-flight redeem's WS lifecycle when this prop is omitted).
|
|
280
|
+
* Partners who own the claim flow via `onClaim` typically pass their own state here;
|
|
281
|
+
* partners who let the page own the flow should omit this prop.
|
|
282
|
+
*/
|
|
258
283
|
claimingPositionKeys?: Record<string, boolean>;
|
|
284
|
+
/**
|
|
285
|
+
* Called once per redeem when its lifecycle reaches terminal (every expected leg
|
|
286
|
+
* confirmed or failed on chain). Receives the same `claimKey` that
|
|
287
|
+
* `claimingPositionKeys` uses (i.e. `position.marketId ?? position.id`) plus a
|
|
288
|
+
* summary of the terminal lifecycle state. Use this to fire one-shot success/failure
|
|
289
|
+
* toasts.
|
|
290
|
+
*
|
|
291
|
+
* NOT fired for synchronous submit failures (network errors, `RedeemRejectedError`)
|
|
292
|
+
* — those go through `onClaimSubmitError`.
|
|
293
|
+
*
|
|
294
|
+
* Only fired when the internal claim path is used (i.e. when the caller does NOT
|
|
295
|
+
* pass an `onClaim` prop). Callers that own the claim flow via `onClaim` are
|
|
296
|
+
* responsible for their own toasting.
|
|
297
|
+
*/
|
|
298
|
+
onClaimResult?: (claimKey: string, lifecycle: {
|
|
299
|
+
allConfirmed: boolean;
|
|
300
|
+
anyFailed: boolean;
|
|
301
|
+
errorMessage: string | null;
|
|
302
|
+
}) => void;
|
|
303
|
+
/**
|
|
304
|
+
* Called when the redeem mutation itself rejects — i.e. transport error, validation
|
|
305
|
+
* error, or `RedeemRejectedError` (all legs ineligible/rejected at submit time). The
|
|
306
|
+
* redeem never enters the WS lifecycle in these cases, so `onClaimResult` does NOT
|
|
307
|
+
* fire.
|
|
308
|
+
*
|
|
309
|
+
* Only fired when the internal claim path is used.
|
|
310
|
+
*/
|
|
311
|
+
onClaimSubmitError?: (claimKey: string, error: Error) => void;
|
|
259
312
|
/** Called when an activity row is clicked */
|
|
260
313
|
onActivityClick?: (activity: UserProfileActivity) => void;
|
|
261
314
|
/** Optional href for an activity row (enables ctrl/cmd/middle-click to open in a new tab). */
|
|
@@ -15,4 +15,8 @@ export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "childre
|
|
|
15
15
|
prefix?: JSX.Element | FC | ReactNode;
|
|
16
16
|
/** Optional content rendered after the button label. */
|
|
17
17
|
suffix?: JSX.Element | FC | ReactNode;
|
|
18
|
+
classNames?: {
|
|
19
|
+
root?: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
};
|
|
18
22
|
};
|
|
@@ -15,4 +15,8 @@ export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "childre
|
|
|
15
15
|
prefix?: JSX.Element | FC | ReactNode;
|
|
16
16
|
/** Optional content rendered after the button label. */
|
|
17
17
|
suffix?: JSX.Element | FC | ReactNode;
|
|
18
|
+
classNames?: {
|
|
19
|
+
root?: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
};
|
|
18
22
|
};
|
|
@@ -2,6 +2,6 @@ import type { ButtonProps } from "./button.types";
|
|
|
2
2
|
export type { ButtonProps, ButtonSize, ButtonVariant } from "./button.types";
|
|
3
3
|
/** Renders a themed action button with loading state, sizing variants, and optional icon slots. */
|
|
4
4
|
export declare const Button: {
|
|
5
|
-
({ children, variant, size, isLoading, disabled, prefix, suffix, type, className, "aria-label": ariaLabel, ...other }: ButtonProps): JSX.Element;
|
|
5
|
+
({ children, variant, size, isLoading, disabled, prefix, suffix, type, className, classNames, "aria-label": ariaLabel, ...other }: ButtonProps): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -2,6 +2,6 @@ import type { ButtonProps } from "./button.types";
|
|
|
2
2
|
export type { ButtonProps, ButtonSize, ButtonVariant } from "./button.types";
|
|
3
3
|
/** Renders a themed action button with loading state, sizing variants, and optional icon slots. */
|
|
4
4
|
export declare const Button: {
|
|
5
|
-
({ children, variant, size, isLoading, disabled, prefix, suffix, type, className, "aria-label": ariaLabel, ...other }: ButtonProps): JSX.Element;
|
|
5
|
+
({ children, variant, size, isLoading, disabled, prefix, suffix, type, className, classNames, "aria-label": ariaLabel, ...other }: ButtonProps): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -15,17 +15,16 @@ export declare const padSparseCandles: (candles: CandlePoint[], intervalSeconds?
|
|
|
15
15
|
export declare const resolveCandleWidthSeconds: (points: LineChartPoint[], fallback?: number) => number | undefined;
|
|
16
16
|
export declare const resolveWindowSeconds: (normalizedSeries: LineChartSeries[]) => number;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* series
|
|
18
|
+
* Renderer-only fallback. Liveline anchors its visible window to `Date.now()`
|
|
19
|
+
* and refuses to draw fewer than 2 points per series, so this helper:
|
|
20
|
+
* - extends a series forward to "now" (projecting the last known value)
|
|
21
|
+
* when the tail is older than 5 minutes, and
|
|
22
|
+
* - pads single-point series with a duplicate shifted 5m back.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* at
|
|
27
|
-
*
|
|
28
|
-
* The returned series should be used for both `data` and `series` props.
|
|
24
|
+
* **It is a fallback only.** The real-time pipeline keeps the chart fresh by
|
|
25
|
+
* (a) ticking the rolling window's `nowSec`, (b) backfilling via REST refetch
|
|
26
|
+
* at each candle bucket, and (c) promoting closed WS live candles into the
|
|
27
|
+
* cached history. When those are working, `extendSeriesToNow` is a no-op.
|
|
29
28
|
*/
|
|
30
29
|
export declare const extendSeriesToNow: (series: LineChartSeries[]) => LineChartSeries[];
|
|
31
30
|
export declare const resolveLatestValue: (points: LineChartPoint[]) => number;
|
|
@@ -15,17 +15,16 @@ export declare const padSparseCandles: (candles: CandlePoint[], intervalSeconds?
|
|
|
15
15
|
export declare const resolveCandleWidthSeconds: (points: LineChartPoint[], fallback?: number) => number | undefined;
|
|
16
16
|
export declare const resolveWindowSeconds: (normalizedSeries: LineChartSeries[]) => number;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* series
|
|
18
|
+
* Renderer-only fallback. Liveline anchors its visible window to `Date.now()`
|
|
19
|
+
* and refuses to draw fewer than 2 points per series, so this helper:
|
|
20
|
+
* - extends a series forward to "now" (projecting the last known value)
|
|
21
|
+
* when the tail is older than 5 minutes, and
|
|
22
|
+
* - pads single-point series with a duplicate shifted 5m back.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* at
|
|
27
|
-
*
|
|
28
|
-
* The returned series should be used for both `data` and `series` props.
|
|
24
|
+
* **It is a fallback only.** The real-time pipeline keeps the chart fresh by
|
|
25
|
+
* (a) ticking the rolling window's `nowSec`, (b) backfilling via REST refetch
|
|
26
|
+
* at each candle bucket, and (c) promoting closed WS live candles into the
|
|
27
|
+
* cached history. When those are working, `extendSeriesToNow` is a no-op.
|
|
29
28
|
*/
|
|
30
29
|
export declare const extendSeriesToNow: (series: LineChartSeries[]) => LineChartSeries[];
|
|
31
30
|
export declare const resolveLatestValue: (points: LineChartPoint[]) => number;
|
|
@@ -14,6 +14,7 @@ import { CheckCircleIcon } from "./svg/check-circle";
|
|
|
14
14
|
import { ChartCandlestickIcon } from "./svg/chart-candlestick";
|
|
15
15
|
import { ChartLineIcon } from "./svg/chart-line";
|
|
16
16
|
import { CircleOverlapIcon } from "./svg/circle-overlap";
|
|
17
|
+
import { CircleXmarkIcon } from "./svg/circle-xmark";
|
|
17
18
|
import { ChevronDownIcon } from "./svg/chevron-down";
|
|
18
19
|
import { ChevronLeftIcon } from "./svg/chevron-left";
|
|
19
20
|
import { ChevronRightIcon } from "./svg/chevron-right";
|
|
@@ -69,4 +70,4 @@ export declare const Icon: {
|
|
|
69
70
|
({ name, color, size, className, style, ...props }: IconProps): JSX.Element | null;
|
|
70
71
|
displayName: string;
|
|
71
72
|
};
|
|
72
|
-
export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
|
|
73
|
+
export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
|
|
@@ -14,6 +14,7 @@ import { CheckCircleIcon } from "./svg/check-circle";
|
|
|
14
14
|
import { ChartCandlestickIcon } from "./svg/chart-candlestick";
|
|
15
15
|
import { ChartLineIcon } from "./svg/chart-line";
|
|
16
16
|
import { CircleOverlapIcon } from "./svg/circle-overlap";
|
|
17
|
+
import { CircleXmarkIcon } from "./svg/circle-xmark";
|
|
17
18
|
import { ChevronDownIcon } from "./svg/chevron-down";
|
|
18
19
|
import { ChevronLeftIcon } from "./svg/chevron-left";
|
|
19
20
|
import { ChevronRightIcon } from "./svg/chevron-right";
|
|
@@ -69,4 +70,4 @@ export declare const Icon: {
|
|
|
69
70
|
({ name, color, size, className, style, ...props }: IconProps): JSX.Element | null;
|
|
70
71
|
displayName: string;
|
|
71
72
|
};
|
|
72
|
-
export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
|
|
73
|
+
export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
|
|
@@ -80,6 +80,10 @@ export declare const iconRegistry: {
|
|
|
80
80
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
81
81
|
displayName: string;
|
|
82
82
|
};
|
|
83
|
+
readonly "circle-xmark": {
|
|
84
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
85
|
+
displayName: string;
|
|
86
|
+
};
|
|
83
87
|
readonly "chevron-down": {
|
|
84
88
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
85
89
|
displayName: string;
|
|
@@ -228,10 +232,30 @@ export declare const iconRegistry: {
|
|
|
228
232
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
229
233
|
displayName: string;
|
|
230
234
|
};
|
|
235
|
+
readonly "sort-end-date": {
|
|
236
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
237
|
+
displayName: string;
|
|
238
|
+
};
|
|
239
|
+
readonly "sort-top-arbitrage": {
|
|
240
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
241
|
+
displayName: string;
|
|
242
|
+
};
|
|
243
|
+
readonly "sort-volume": {
|
|
244
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
245
|
+
displayName: string;
|
|
246
|
+
};
|
|
247
|
+
readonly "sort-volume-24hr": {
|
|
248
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
249
|
+
displayName: string;
|
|
250
|
+
};
|
|
231
251
|
readonly "sparkles-filled": {
|
|
232
252
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
233
253
|
displayName: string;
|
|
234
254
|
};
|
|
255
|
+
readonly spinner: {
|
|
256
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
257
|
+
displayName: string;
|
|
258
|
+
};
|
|
235
259
|
readonly "stay-in-control": {
|
|
236
260
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
237
261
|
displayName: string;
|
|
@@ -80,6 +80,10 @@ export declare const iconRegistry: {
|
|
|
80
80
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
81
81
|
displayName: string;
|
|
82
82
|
};
|
|
83
|
+
readonly "circle-xmark": {
|
|
84
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
85
|
+
displayName: string;
|
|
86
|
+
};
|
|
83
87
|
readonly "chevron-down": {
|
|
84
88
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
85
89
|
displayName: string;
|
|
@@ -228,10 +232,30 @@ export declare const iconRegistry: {
|
|
|
228
232
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
229
233
|
displayName: string;
|
|
230
234
|
};
|
|
235
|
+
readonly "sort-end-date": {
|
|
236
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
237
|
+
displayName: string;
|
|
238
|
+
};
|
|
239
|
+
readonly "sort-top-arbitrage": {
|
|
240
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
241
|
+
displayName: string;
|
|
242
|
+
};
|
|
243
|
+
readonly "sort-volume": {
|
|
244
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
245
|
+
displayName: string;
|
|
246
|
+
};
|
|
247
|
+
readonly "sort-volume-24hr": {
|
|
248
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
249
|
+
displayName: string;
|
|
250
|
+
};
|
|
231
251
|
readonly "sparkles-filled": {
|
|
232
252
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
233
253
|
displayName: string;
|
|
234
254
|
};
|
|
255
|
+
readonly spinner: {
|
|
256
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
257
|
+
displayName: string;
|
|
258
|
+
};
|
|
235
259
|
readonly "stay-in-control": {
|
|
236
260
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
237
261
|
displayName: string;
|
|
@@ -2,6 +2,6 @@ import type { SelectProps } from "./select.types";
|
|
|
2
2
|
export type { SelectItem, SelectProps } from "./select.types";
|
|
3
3
|
/** Renders a custom select trigger and portaled listbox. */
|
|
4
4
|
export declare const Select: {
|
|
5
|
-
<TValue extends string = string>({ items, value, onChange, ariaLabel, className, triggerClassName, disabled, }: SelectProps<TValue>): JSX.Element;
|
|
5
|
+
<TValue extends string = string>({ items, value, onChange, ariaLabel, className, triggerClassName, contentClassName, itemClassName, disabled, }: SelectProps<TValue>): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -2,6 +2,6 @@ import type { SelectProps } from "./select.types";
|
|
|
2
2
|
export type { SelectItem, SelectProps } from "./select.types";
|
|
3
3
|
/** Renders a custom select trigger and portaled listbox. */
|
|
4
4
|
export declare const Select: {
|
|
5
|
-
<TValue extends string = string>({ items, value, onChange, ariaLabel, className, triggerClassName, disabled, }: SelectProps<TValue>): JSX.Element;
|
|
5
|
+
<TValue extends string = string>({ items, value, onChange, ariaLabel, className, triggerClassName, contentClassName, itemClassName, disabled, }: SelectProps<TValue>): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export type SelectItem<TValue extends string = string> = {
|
|
2
|
+
/** The value of the option */
|
|
2
3
|
value: TValue;
|
|
4
|
+
/** The display label for the option */
|
|
3
5
|
label: string;
|
|
6
|
+
/** If true, the option will be disabled and not clickable */
|
|
4
7
|
disabled?: boolean;
|
|
8
|
+
/** If true, the option will be hidden and not displayed in the dropdown */
|
|
9
|
+
hidden?: boolean;
|
|
5
10
|
/** Optional icon URL rendered beside the label in trigger and dropdown. */
|
|
6
11
|
iconUrl?: string;
|
|
7
12
|
/** Optional React node rendered as an icon beside the label (takes precedence over iconUrl). */
|
|
@@ -20,6 +25,10 @@ export type SelectProps<TValue extends string = string> = {
|
|
|
20
25
|
className?: string;
|
|
21
26
|
/** Extra classes for the trigger button, e.g. corner radius. */
|
|
22
27
|
triggerClassName?: string;
|
|
28
|
+
/** Extra classes for the dropdown content container. */
|
|
29
|
+
contentClassName?: string;
|
|
30
|
+
/** Extra classes for each option row. */
|
|
31
|
+
itemClassName?: string;
|
|
23
32
|
/** Whether the select should block user interaction. */
|
|
24
33
|
disabled?: boolean;
|
|
25
34
|
};
|