@orderly.network/ui-scaffold 2.1.0 → 2.1.1
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.d.mts +74 -80
- package/dist/index.d.ts +74 -80
- package/dist/index.js +30 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default, { HTMLAttributeAnchorTarget, FC, PropsWithChildren } from 'react';
|
|
4
4
|
import { LogoProps } from '@orderly.network/ui';
|
|
5
5
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
6
|
-
import { AccountStatusEnum, NetworkId } from '@orderly.network/types';
|
|
6
|
+
import { AccountStatusEnum, NetworkId, API } from '@orderly.network/types';
|
|
7
7
|
import { WsNetworkStatus } from '@orderly.network/hooks';
|
|
8
8
|
import * as _orderly_network_i18n from '@orderly.network/i18n';
|
|
9
9
|
|
|
@@ -15,8 +15,8 @@ type MainNavItem = {
|
|
|
15
15
|
name: string;
|
|
16
16
|
href: string;
|
|
17
17
|
target?: HTMLAttributeAnchorTarget;
|
|
18
|
-
icon?: string |
|
|
19
|
-
activeIcon?: string |
|
|
18
|
+
icon?: string | react__default.ReactElement;
|
|
19
|
+
activeIcon?: string | react__default.ReactElement;
|
|
20
20
|
tag?: string;
|
|
21
21
|
description?: string;
|
|
22
22
|
disabled?: boolean;
|
|
@@ -126,7 +126,7 @@ declare const useChainMenuScript: () => {
|
|
|
126
126
|
accountStatus: _orderly_network_types.AccountStatusEnum;
|
|
127
127
|
networkId: NetworkId;
|
|
128
128
|
open: boolean;
|
|
129
|
-
onOpenChange:
|
|
129
|
+
onOpenChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
130
130
|
hide: () => void;
|
|
131
131
|
onChainChangeBefore: () => void;
|
|
132
132
|
onChainChangeAfter: () => void;
|
|
@@ -137,13 +137,13 @@ declare const ChainMenu: (props: UseChainMenuScriptReturn) => react_jsx_runtime.
|
|
|
137
137
|
|
|
138
138
|
type SideMenuItem = {
|
|
139
139
|
name: string;
|
|
140
|
-
icon?:
|
|
140
|
+
icon?: react__default.ReactNode;
|
|
141
141
|
href?: string;
|
|
142
142
|
disabled?: boolean;
|
|
143
143
|
onClick?: () => void;
|
|
144
144
|
};
|
|
145
145
|
type SideBarProps = {
|
|
146
|
-
title?:
|
|
146
|
+
title?: react__default.ReactNode;
|
|
147
147
|
items?: SideMenuItem[];
|
|
148
148
|
open?: boolean;
|
|
149
149
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -152,7 +152,7 @@ type SideBarProps = {
|
|
|
152
152
|
className?: string;
|
|
153
153
|
maxWidth?: number;
|
|
154
154
|
minWidth?: number;
|
|
155
|
-
style?:
|
|
155
|
+
style?: react__default.CSSProperties;
|
|
156
156
|
};
|
|
157
157
|
declare const SideBar: {
|
|
158
158
|
(props: SideBarProps): react_jsx_runtime.JSX.Element;
|
|
@@ -161,28 +161,6 @@ declare const SideBar: {
|
|
|
161
161
|
|
|
162
162
|
declare const SideNavbarWidget: (props?: Partial<SideBarProps>) => react_jsx_runtime.JSX.Element;
|
|
163
163
|
|
|
164
|
-
type RouteOption = {
|
|
165
|
-
href: string;
|
|
166
|
-
name: string;
|
|
167
|
-
scope?: string;
|
|
168
|
-
target?: string;
|
|
169
|
-
};
|
|
170
|
-
type RouterAdapter = {
|
|
171
|
-
onRouteChange: (option: RouteOption) => void;
|
|
172
|
-
currentPath?: string;
|
|
173
|
-
};
|
|
174
|
-
type ScaffoldState = {
|
|
175
|
-
routerAdapter?: RouterAdapter;
|
|
176
|
-
expanded?: boolean;
|
|
177
|
-
setExpand: (expand: boolean) => void;
|
|
178
|
-
checkChainSupport: (chainId: number | string) => boolean;
|
|
179
|
-
topNavbarHeight: number;
|
|
180
|
-
footerHeight: number;
|
|
181
|
-
announcementHeight: number;
|
|
182
|
-
};
|
|
183
|
-
declare const ScaffoldContext: React$1.Context<ScaffoldState>;
|
|
184
|
-
declare const useScaffoldContext: () => ScaffoldState;
|
|
185
|
-
|
|
186
164
|
type FooterReturns = {
|
|
187
165
|
wsStatus: WsNetworkStatus;
|
|
188
166
|
};
|
|
@@ -197,30 +175,6 @@ declare const FooterWidget: (props: FooterProps) => react_jsx_runtime.JSX.Elemen
|
|
|
197
175
|
|
|
198
176
|
declare const Footer: FC<FooterReturns & FooterProps>;
|
|
199
177
|
|
|
200
|
-
type ScaffoldProps = {
|
|
201
|
-
/**
|
|
202
|
-
* Custom left sidebar component,
|
|
203
|
-
* if provided, the layout will use this component over the default sidebar component
|
|
204
|
-
*/
|
|
205
|
-
leftSidebar?: React__default.ReactNode;
|
|
206
|
-
leftSideProps?: SideBarProps;
|
|
207
|
-
topBar?: React__default.ReactNode;
|
|
208
|
-
mainNavProps?: MainNavWidgetProps;
|
|
209
|
-
footer?: React__default.ReactNode;
|
|
210
|
-
footerProps?: FooterProps;
|
|
211
|
-
routerAdapter?: RouterAdapter;
|
|
212
|
-
classNames?: {
|
|
213
|
-
root?: string;
|
|
214
|
-
container?: string;
|
|
215
|
-
content?: string;
|
|
216
|
-
body?: string;
|
|
217
|
-
leftSidebar?: string;
|
|
218
|
-
topNavbar?: string;
|
|
219
|
-
footer?: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
declare const Scaffold: (props: PropsWithChildren<ScaffoldProps>) => react_jsx_runtime.JSX.Element;
|
|
223
|
-
|
|
224
178
|
interface MaintenanceTipInterface {
|
|
225
179
|
tipsContent: string;
|
|
226
180
|
showTips: boolean;
|
|
@@ -233,40 +187,33 @@ declare const MaintenanceTipsUI: (props: MaintenanceTipInterface) => react_jsx_r
|
|
|
233
187
|
|
|
234
188
|
declare const MaintenanceTipsWidget: () => react_jsx_runtime.JSX.Element;
|
|
235
189
|
|
|
236
|
-
|
|
237
|
-
Listing = "listing",
|
|
238
|
-
Maintenance = "maintenance",
|
|
239
|
-
Delisting = "delisting"
|
|
240
|
-
}
|
|
241
|
-
interface AnnouncementTips {
|
|
242
|
-
announcementId: string;
|
|
243
|
-
type?: AnnouncementType;
|
|
244
|
-
content: string;
|
|
245
|
-
url?: string;
|
|
246
|
-
}
|
|
247
|
-
type AnnouncementTipsScriptOptions = {
|
|
190
|
+
type AnnouncementScriptOptions = {
|
|
248
191
|
hideTips?: boolean;
|
|
249
192
|
};
|
|
250
|
-
|
|
193
|
+
type AnnouncementScriptReturn = ReturnType<typeof useAnnouncementScript>;
|
|
194
|
+
declare const useAnnouncementScript: (options?: AnnouncementScriptOptions) => {
|
|
195
|
+
mutiLine: boolean;
|
|
196
|
+
contentRef: react.RefObject<HTMLDivElement>;
|
|
251
197
|
maintenanceDialogInfo: string | undefined;
|
|
252
|
-
tips:
|
|
198
|
+
tips: API.Announcement[];
|
|
253
199
|
currentIndex: number;
|
|
254
|
-
|
|
200
|
+
currentTip: API.Announcement;
|
|
255
201
|
closeTips: () => void;
|
|
256
202
|
nextTips: () => void;
|
|
257
203
|
prevTips: () => void;
|
|
258
204
|
showAnnouncement: boolean;
|
|
205
|
+
isAnimating: boolean;
|
|
259
206
|
};
|
|
260
207
|
|
|
261
|
-
type
|
|
208
|
+
type AnnouncementProps = AnnouncementScriptReturn & {
|
|
262
209
|
style?: React.CSSProperties;
|
|
263
210
|
className?: string;
|
|
264
211
|
hideTips?: boolean;
|
|
265
212
|
};
|
|
266
|
-
declare const
|
|
213
|
+
declare const Announcement: (props: AnnouncementProps) => react_jsx_runtime.JSX.Element | null;
|
|
267
214
|
|
|
268
|
-
type
|
|
269
|
-
declare const
|
|
215
|
+
type AnnouncementWidgetProps = Pick<AnnouncementProps, "style" | "className" | "hideTips">;
|
|
216
|
+
declare const AnnouncementWidget: (props: AnnouncementWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
270
217
|
|
|
271
218
|
type UseRestrictedInfoScriptReturn = ReturnType<typeof useRestrictedInfoScript> & {
|
|
272
219
|
brokerName?: string;
|
|
@@ -276,13 +223,13 @@ declare const useRestrictedInfoScript: () => {
|
|
|
276
223
|
ip: string;
|
|
277
224
|
invalidRegions: string[];
|
|
278
225
|
restrictedOpen: boolean;
|
|
279
|
-
content:
|
|
226
|
+
content: react.ReactNode | ((data: {
|
|
280
227
|
ip: string;
|
|
281
228
|
brokerName: string;
|
|
282
|
-
}) =>
|
|
229
|
+
}) => react.ReactNode);
|
|
283
230
|
};
|
|
284
231
|
brokerName: string;
|
|
285
|
-
container:
|
|
232
|
+
container: react.RefObject<HTMLDivElement>;
|
|
286
233
|
mutiLine: boolean;
|
|
287
234
|
};
|
|
288
235
|
|
|
@@ -294,6 +241,52 @@ declare const RestrictedInfo: FC<RestrictedInfoProps>;
|
|
|
294
241
|
type RestrictedInfoWidgetProps = Pick<RestrictedInfoProps, "className">;
|
|
295
242
|
declare const RestrictedInfoWidget: FC<RestrictedInfoWidgetProps>;
|
|
296
243
|
|
|
244
|
+
type RouteOption = {
|
|
245
|
+
href: string;
|
|
246
|
+
name: string;
|
|
247
|
+
scope?: string;
|
|
248
|
+
target?: string;
|
|
249
|
+
};
|
|
250
|
+
type RouterAdapter = {
|
|
251
|
+
onRouteChange: (option: RouteOption) => void;
|
|
252
|
+
currentPath?: string;
|
|
253
|
+
};
|
|
254
|
+
type ScaffoldState = {
|
|
255
|
+
routerAdapter?: RouterAdapter;
|
|
256
|
+
expanded?: boolean;
|
|
257
|
+
setExpand: (expand: boolean) => void;
|
|
258
|
+
checkChainSupport: (chainId: number | string) => boolean;
|
|
259
|
+
topNavbarHeight: number;
|
|
260
|
+
footerHeight: number;
|
|
261
|
+
announcementHeight: number;
|
|
262
|
+
};
|
|
263
|
+
declare const ScaffoldContext: react.Context<ScaffoldState>;
|
|
264
|
+
declare const useScaffoldContext: () => ScaffoldState;
|
|
265
|
+
|
|
266
|
+
type ScaffoldProps = {
|
|
267
|
+
/**
|
|
268
|
+
* Custom left sidebar component,
|
|
269
|
+
* if provided, the layout will use this component over the default sidebar component
|
|
270
|
+
*/
|
|
271
|
+
leftSidebar?: react__default.ReactNode;
|
|
272
|
+
leftSideProps?: SideBarProps;
|
|
273
|
+
topBar?: react__default.ReactNode;
|
|
274
|
+
mainNavProps?: MainNavWidgetProps;
|
|
275
|
+
footer?: react__default.ReactNode;
|
|
276
|
+
footerProps?: FooterProps;
|
|
277
|
+
routerAdapter?: RouterAdapter;
|
|
278
|
+
classNames?: {
|
|
279
|
+
root?: string;
|
|
280
|
+
container?: string;
|
|
281
|
+
content?: string;
|
|
282
|
+
body?: string;
|
|
283
|
+
leftSidebar?: string;
|
|
284
|
+
topNavbar?: string;
|
|
285
|
+
footer?: string;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
declare const Scaffold: (props: PropsWithChildren<ScaffoldProps>) => react_jsx_runtime.JSX.Element;
|
|
289
|
+
|
|
297
290
|
type MainLogoProps = {
|
|
298
291
|
src?: string;
|
|
299
292
|
alt?: string;
|
|
@@ -305,13 +298,14 @@ declare const LanguageSwitcherWidget: () => react_jsx_runtime.JSX.Element;
|
|
|
305
298
|
type LanguageSwitcherScriptReturn = ReturnType<typeof useLanguageSwitcherScript>;
|
|
306
299
|
declare const useLanguageSwitcherScript: () => {
|
|
307
300
|
open: boolean;
|
|
308
|
-
onOpenChange:
|
|
301
|
+
onOpenChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
309
302
|
languages: _orderly_network_i18n.Language[];
|
|
310
303
|
selectedLang: string;
|
|
311
|
-
onLangChange: (lang: string) => void
|
|
304
|
+
onLangChange: (lang: string, displayName: string) => Promise<void>;
|
|
305
|
+
loading: boolean;
|
|
312
306
|
};
|
|
313
307
|
|
|
314
308
|
type LanguageSwitcherProps = LanguageSwitcherScriptReturn;
|
|
315
309
|
declare const LanguageSwitcher: FC<LanguageSwitcherProps>;
|
|
316
310
|
|
|
317
|
-
export { AccountMenuWidget, AccountSummaryWidget,
|
|
311
|
+
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, LanguageSwitcherWidget, MainLogo, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget, ProductsMenu, RestrictedInfo, RestrictedInfoWidget, type RouteOption, type RouterAdapter, Scaffold, ScaffoldContext, type ScaffoldProps, SideBar, type SideBarProps, type SideMenuItem, SideNavbarWidget, useAnnouncementScript, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default, { HTMLAttributeAnchorTarget, FC, PropsWithChildren } from 'react';
|
|
4
4
|
import { LogoProps } from '@orderly.network/ui';
|
|
5
5
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
6
|
-
import { AccountStatusEnum, NetworkId } from '@orderly.network/types';
|
|
6
|
+
import { AccountStatusEnum, NetworkId, API } from '@orderly.network/types';
|
|
7
7
|
import { WsNetworkStatus } from '@orderly.network/hooks';
|
|
8
8
|
import * as _orderly_network_i18n from '@orderly.network/i18n';
|
|
9
9
|
|
|
@@ -15,8 +15,8 @@ type MainNavItem = {
|
|
|
15
15
|
name: string;
|
|
16
16
|
href: string;
|
|
17
17
|
target?: HTMLAttributeAnchorTarget;
|
|
18
|
-
icon?: string |
|
|
19
|
-
activeIcon?: string |
|
|
18
|
+
icon?: string | react__default.ReactElement;
|
|
19
|
+
activeIcon?: string | react__default.ReactElement;
|
|
20
20
|
tag?: string;
|
|
21
21
|
description?: string;
|
|
22
22
|
disabled?: boolean;
|
|
@@ -126,7 +126,7 @@ declare const useChainMenuScript: () => {
|
|
|
126
126
|
accountStatus: _orderly_network_types.AccountStatusEnum;
|
|
127
127
|
networkId: NetworkId;
|
|
128
128
|
open: boolean;
|
|
129
|
-
onOpenChange:
|
|
129
|
+
onOpenChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
130
130
|
hide: () => void;
|
|
131
131
|
onChainChangeBefore: () => void;
|
|
132
132
|
onChainChangeAfter: () => void;
|
|
@@ -137,13 +137,13 @@ declare const ChainMenu: (props: UseChainMenuScriptReturn) => react_jsx_runtime.
|
|
|
137
137
|
|
|
138
138
|
type SideMenuItem = {
|
|
139
139
|
name: string;
|
|
140
|
-
icon?:
|
|
140
|
+
icon?: react__default.ReactNode;
|
|
141
141
|
href?: string;
|
|
142
142
|
disabled?: boolean;
|
|
143
143
|
onClick?: () => void;
|
|
144
144
|
};
|
|
145
145
|
type SideBarProps = {
|
|
146
|
-
title?:
|
|
146
|
+
title?: react__default.ReactNode;
|
|
147
147
|
items?: SideMenuItem[];
|
|
148
148
|
open?: boolean;
|
|
149
149
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -152,7 +152,7 @@ type SideBarProps = {
|
|
|
152
152
|
className?: string;
|
|
153
153
|
maxWidth?: number;
|
|
154
154
|
minWidth?: number;
|
|
155
|
-
style?:
|
|
155
|
+
style?: react__default.CSSProperties;
|
|
156
156
|
};
|
|
157
157
|
declare const SideBar: {
|
|
158
158
|
(props: SideBarProps): react_jsx_runtime.JSX.Element;
|
|
@@ -161,28 +161,6 @@ declare const SideBar: {
|
|
|
161
161
|
|
|
162
162
|
declare const SideNavbarWidget: (props?: Partial<SideBarProps>) => react_jsx_runtime.JSX.Element;
|
|
163
163
|
|
|
164
|
-
type RouteOption = {
|
|
165
|
-
href: string;
|
|
166
|
-
name: string;
|
|
167
|
-
scope?: string;
|
|
168
|
-
target?: string;
|
|
169
|
-
};
|
|
170
|
-
type RouterAdapter = {
|
|
171
|
-
onRouteChange: (option: RouteOption) => void;
|
|
172
|
-
currentPath?: string;
|
|
173
|
-
};
|
|
174
|
-
type ScaffoldState = {
|
|
175
|
-
routerAdapter?: RouterAdapter;
|
|
176
|
-
expanded?: boolean;
|
|
177
|
-
setExpand: (expand: boolean) => void;
|
|
178
|
-
checkChainSupport: (chainId: number | string) => boolean;
|
|
179
|
-
topNavbarHeight: number;
|
|
180
|
-
footerHeight: number;
|
|
181
|
-
announcementHeight: number;
|
|
182
|
-
};
|
|
183
|
-
declare const ScaffoldContext: React$1.Context<ScaffoldState>;
|
|
184
|
-
declare const useScaffoldContext: () => ScaffoldState;
|
|
185
|
-
|
|
186
164
|
type FooterReturns = {
|
|
187
165
|
wsStatus: WsNetworkStatus;
|
|
188
166
|
};
|
|
@@ -197,30 +175,6 @@ declare const FooterWidget: (props: FooterProps) => react_jsx_runtime.JSX.Elemen
|
|
|
197
175
|
|
|
198
176
|
declare const Footer: FC<FooterReturns & FooterProps>;
|
|
199
177
|
|
|
200
|
-
type ScaffoldProps = {
|
|
201
|
-
/**
|
|
202
|
-
* Custom left sidebar component,
|
|
203
|
-
* if provided, the layout will use this component over the default sidebar component
|
|
204
|
-
*/
|
|
205
|
-
leftSidebar?: React__default.ReactNode;
|
|
206
|
-
leftSideProps?: SideBarProps;
|
|
207
|
-
topBar?: React__default.ReactNode;
|
|
208
|
-
mainNavProps?: MainNavWidgetProps;
|
|
209
|
-
footer?: React__default.ReactNode;
|
|
210
|
-
footerProps?: FooterProps;
|
|
211
|
-
routerAdapter?: RouterAdapter;
|
|
212
|
-
classNames?: {
|
|
213
|
-
root?: string;
|
|
214
|
-
container?: string;
|
|
215
|
-
content?: string;
|
|
216
|
-
body?: string;
|
|
217
|
-
leftSidebar?: string;
|
|
218
|
-
topNavbar?: string;
|
|
219
|
-
footer?: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
declare const Scaffold: (props: PropsWithChildren<ScaffoldProps>) => react_jsx_runtime.JSX.Element;
|
|
223
|
-
|
|
224
178
|
interface MaintenanceTipInterface {
|
|
225
179
|
tipsContent: string;
|
|
226
180
|
showTips: boolean;
|
|
@@ -233,40 +187,33 @@ declare const MaintenanceTipsUI: (props: MaintenanceTipInterface) => react_jsx_r
|
|
|
233
187
|
|
|
234
188
|
declare const MaintenanceTipsWidget: () => react_jsx_runtime.JSX.Element;
|
|
235
189
|
|
|
236
|
-
|
|
237
|
-
Listing = "listing",
|
|
238
|
-
Maintenance = "maintenance",
|
|
239
|
-
Delisting = "delisting"
|
|
240
|
-
}
|
|
241
|
-
interface AnnouncementTips {
|
|
242
|
-
announcementId: string;
|
|
243
|
-
type?: AnnouncementType;
|
|
244
|
-
content: string;
|
|
245
|
-
url?: string;
|
|
246
|
-
}
|
|
247
|
-
type AnnouncementTipsScriptOptions = {
|
|
190
|
+
type AnnouncementScriptOptions = {
|
|
248
191
|
hideTips?: boolean;
|
|
249
192
|
};
|
|
250
|
-
|
|
193
|
+
type AnnouncementScriptReturn = ReturnType<typeof useAnnouncementScript>;
|
|
194
|
+
declare const useAnnouncementScript: (options?: AnnouncementScriptOptions) => {
|
|
195
|
+
mutiLine: boolean;
|
|
196
|
+
contentRef: react.RefObject<HTMLDivElement>;
|
|
251
197
|
maintenanceDialogInfo: string | undefined;
|
|
252
|
-
tips:
|
|
198
|
+
tips: API.Announcement[];
|
|
253
199
|
currentIndex: number;
|
|
254
|
-
|
|
200
|
+
currentTip: API.Announcement;
|
|
255
201
|
closeTips: () => void;
|
|
256
202
|
nextTips: () => void;
|
|
257
203
|
prevTips: () => void;
|
|
258
204
|
showAnnouncement: boolean;
|
|
205
|
+
isAnimating: boolean;
|
|
259
206
|
};
|
|
260
207
|
|
|
261
|
-
type
|
|
208
|
+
type AnnouncementProps = AnnouncementScriptReturn & {
|
|
262
209
|
style?: React.CSSProperties;
|
|
263
210
|
className?: string;
|
|
264
211
|
hideTips?: boolean;
|
|
265
212
|
};
|
|
266
|
-
declare const
|
|
213
|
+
declare const Announcement: (props: AnnouncementProps) => react_jsx_runtime.JSX.Element | null;
|
|
267
214
|
|
|
268
|
-
type
|
|
269
|
-
declare const
|
|
215
|
+
type AnnouncementWidgetProps = Pick<AnnouncementProps, "style" | "className" | "hideTips">;
|
|
216
|
+
declare const AnnouncementWidget: (props: AnnouncementWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
270
217
|
|
|
271
218
|
type UseRestrictedInfoScriptReturn = ReturnType<typeof useRestrictedInfoScript> & {
|
|
272
219
|
brokerName?: string;
|
|
@@ -276,13 +223,13 @@ declare const useRestrictedInfoScript: () => {
|
|
|
276
223
|
ip: string;
|
|
277
224
|
invalidRegions: string[];
|
|
278
225
|
restrictedOpen: boolean;
|
|
279
|
-
content:
|
|
226
|
+
content: react.ReactNode | ((data: {
|
|
280
227
|
ip: string;
|
|
281
228
|
brokerName: string;
|
|
282
|
-
}) =>
|
|
229
|
+
}) => react.ReactNode);
|
|
283
230
|
};
|
|
284
231
|
brokerName: string;
|
|
285
|
-
container:
|
|
232
|
+
container: react.RefObject<HTMLDivElement>;
|
|
286
233
|
mutiLine: boolean;
|
|
287
234
|
};
|
|
288
235
|
|
|
@@ -294,6 +241,52 @@ declare const RestrictedInfo: FC<RestrictedInfoProps>;
|
|
|
294
241
|
type RestrictedInfoWidgetProps = Pick<RestrictedInfoProps, "className">;
|
|
295
242
|
declare const RestrictedInfoWidget: FC<RestrictedInfoWidgetProps>;
|
|
296
243
|
|
|
244
|
+
type RouteOption = {
|
|
245
|
+
href: string;
|
|
246
|
+
name: string;
|
|
247
|
+
scope?: string;
|
|
248
|
+
target?: string;
|
|
249
|
+
};
|
|
250
|
+
type RouterAdapter = {
|
|
251
|
+
onRouteChange: (option: RouteOption) => void;
|
|
252
|
+
currentPath?: string;
|
|
253
|
+
};
|
|
254
|
+
type ScaffoldState = {
|
|
255
|
+
routerAdapter?: RouterAdapter;
|
|
256
|
+
expanded?: boolean;
|
|
257
|
+
setExpand: (expand: boolean) => void;
|
|
258
|
+
checkChainSupport: (chainId: number | string) => boolean;
|
|
259
|
+
topNavbarHeight: number;
|
|
260
|
+
footerHeight: number;
|
|
261
|
+
announcementHeight: number;
|
|
262
|
+
};
|
|
263
|
+
declare const ScaffoldContext: react.Context<ScaffoldState>;
|
|
264
|
+
declare const useScaffoldContext: () => ScaffoldState;
|
|
265
|
+
|
|
266
|
+
type ScaffoldProps = {
|
|
267
|
+
/**
|
|
268
|
+
* Custom left sidebar component,
|
|
269
|
+
* if provided, the layout will use this component over the default sidebar component
|
|
270
|
+
*/
|
|
271
|
+
leftSidebar?: react__default.ReactNode;
|
|
272
|
+
leftSideProps?: SideBarProps;
|
|
273
|
+
topBar?: react__default.ReactNode;
|
|
274
|
+
mainNavProps?: MainNavWidgetProps;
|
|
275
|
+
footer?: react__default.ReactNode;
|
|
276
|
+
footerProps?: FooterProps;
|
|
277
|
+
routerAdapter?: RouterAdapter;
|
|
278
|
+
classNames?: {
|
|
279
|
+
root?: string;
|
|
280
|
+
container?: string;
|
|
281
|
+
content?: string;
|
|
282
|
+
body?: string;
|
|
283
|
+
leftSidebar?: string;
|
|
284
|
+
topNavbar?: string;
|
|
285
|
+
footer?: string;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
declare const Scaffold: (props: PropsWithChildren<ScaffoldProps>) => react_jsx_runtime.JSX.Element;
|
|
289
|
+
|
|
297
290
|
type MainLogoProps = {
|
|
298
291
|
src?: string;
|
|
299
292
|
alt?: string;
|
|
@@ -305,13 +298,14 @@ declare const LanguageSwitcherWidget: () => react_jsx_runtime.JSX.Element;
|
|
|
305
298
|
type LanguageSwitcherScriptReturn = ReturnType<typeof useLanguageSwitcherScript>;
|
|
306
299
|
declare const useLanguageSwitcherScript: () => {
|
|
307
300
|
open: boolean;
|
|
308
|
-
onOpenChange:
|
|
301
|
+
onOpenChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
309
302
|
languages: _orderly_network_i18n.Language[];
|
|
310
303
|
selectedLang: string;
|
|
311
|
-
onLangChange: (lang: string) => void
|
|
304
|
+
onLangChange: (lang: string, displayName: string) => Promise<void>;
|
|
305
|
+
loading: boolean;
|
|
312
306
|
};
|
|
313
307
|
|
|
314
308
|
type LanguageSwitcherProps = LanguageSwitcherScriptReturn;
|
|
315
309
|
declare const LanguageSwitcher: FC<LanguageSwitcherProps>;
|
|
316
310
|
|
|
317
|
-
export { AccountMenuWidget, AccountSummaryWidget,
|
|
311
|
+
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, LanguageSwitcherWidget, MainLogo, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget, ProductsMenu, RestrictedInfo, RestrictedInfoWidget, type RouteOption, type RouterAdapter, Scaffold, ScaffoldContext, type ScaffoldProps, SideBar, type SideBarProps, type SideMenuItem, SideNavbarWidget, useAnnouncementScript, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext };
|