@orderly.network/ui-scaffold 2.0.7 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +60 -7
- package/dist/index.d.ts +60 -7
- package/dist/index.js +29 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +10 -9
package/dist/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ import { LogoProps } from '@orderly.network/ui';
|
|
|
5
5
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
6
6
|
import { AccountStatusEnum, NetworkId } from '@orderly.network/types';
|
|
7
7
|
import { WsNetworkStatus } from '@orderly.network/hooks';
|
|
8
|
+
import * as _orderly_network_i18n from '@orderly.network/i18n';
|
|
8
9
|
|
|
9
10
|
declare const AccountMenuWidget: () => react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
@@ -170,14 +171,17 @@ type RouterAdapter = {
|
|
|
170
171
|
onRouteChange: (option: RouteOption) => void;
|
|
171
172
|
currentPath?: string;
|
|
172
173
|
};
|
|
173
|
-
type
|
|
174
|
+
type ScaffoldState = {
|
|
174
175
|
routerAdapter?: RouterAdapter;
|
|
175
176
|
expanded?: boolean;
|
|
176
177
|
setExpand: (expand: boolean) => void;
|
|
177
178
|
checkChainSupport: (chainId: number | string) => boolean;
|
|
179
|
+
topNavbarHeight: number;
|
|
180
|
+
footerHeight: number;
|
|
181
|
+
announcementHeight: number;
|
|
178
182
|
};
|
|
179
|
-
declare const
|
|
180
|
-
declare const useScaffoldContext: () =>
|
|
183
|
+
declare const ScaffoldContext: React$1.Context<ScaffoldState>;
|
|
184
|
+
declare const useScaffoldContext: () => ScaffoldState;
|
|
181
185
|
|
|
182
186
|
type FooterReturns = {
|
|
183
187
|
wsStatus: WsNetworkStatus;
|
|
@@ -193,12 +197,11 @@ declare const FooterWidget: (props: FooterProps) => react_jsx_runtime.JSX.Elemen
|
|
|
193
197
|
|
|
194
198
|
declare const Footer: FC<FooterReturns & FooterProps>;
|
|
195
199
|
|
|
196
|
-
type
|
|
200
|
+
type ScaffoldProps = {
|
|
197
201
|
/**
|
|
198
202
|
* Custom left sidebar component,
|
|
199
203
|
* if provided, the layout will use this component over the default sidebar component
|
|
200
204
|
*/
|
|
201
|
-
gap?: number;
|
|
202
205
|
leftSidebar?: React__default.ReactNode;
|
|
203
206
|
leftSideProps?: SideBarProps;
|
|
204
207
|
topBar?: React__default.ReactNode;
|
|
@@ -208,6 +211,7 @@ type LayoutProps = {
|
|
|
208
211
|
routerAdapter?: RouterAdapter;
|
|
209
212
|
classNames?: {
|
|
210
213
|
root?: string;
|
|
214
|
+
container?: string;
|
|
211
215
|
content?: string;
|
|
212
216
|
body?: string;
|
|
213
217
|
leftSidebar?: string;
|
|
@@ -215,7 +219,7 @@ type LayoutProps = {
|
|
|
215
219
|
footer?: string;
|
|
216
220
|
};
|
|
217
221
|
};
|
|
218
|
-
declare const Scaffold: (props: PropsWithChildren<
|
|
222
|
+
declare const Scaffold: (props: PropsWithChildren<ScaffoldProps>) => react_jsx_runtime.JSX.Element;
|
|
219
223
|
|
|
220
224
|
interface MaintenanceTipInterface {
|
|
221
225
|
tipsContent: string;
|
|
@@ -229,6 +233,41 @@ declare const MaintenanceTipsUI: (props: MaintenanceTipInterface) => react_jsx_r
|
|
|
229
233
|
|
|
230
234
|
declare const MaintenanceTipsWidget: () => react_jsx_runtime.JSX.Element;
|
|
231
235
|
|
|
236
|
+
declare enum AnnouncementType {
|
|
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 = {
|
|
248
|
+
hideTips?: boolean;
|
|
249
|
+
};
|
|
250
|
+
declare const useAnnouncementTipsScript: (options?: AnnouncementTipsScriptOptions) => {
|
|
251
|
+
maintenanceDialogInfo: string | undefined;
|
|
252
|
+
tips: AnnouncementTips[];
|
|
253
|
+
currentIndex: number;
|
|
254
|
+
showTips: boolean;
|
|
255
|
+
closeTips: () => void;
|
|
256
|
+
nextTips: () => void;
|
|
257
|
+
prevTips: () => void;
|
|
258
|
+
showAnnouncement: boolean;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
type AnnouncementTipsUIProps = ReturnType<typeof useAnnouncementTipsScript> & {
|
|
262
|
+
style?: React.CSSProperties;
|
|
263
|
+
className?: string;
|
|
264
|
+
hideTips?: boolean;
|
|
265
|
+
};
|
|
266
|
+
declare const AnnouncementTipsUI: (props: AnnouncementTipsUIProps) => react_jsx_runtime.JSX.Element | null;
|
|
267
|
+
|
|
268
|
+
type AnnouncementTipsWidgetProps = Pick<AnnouncementTipsUIProps, "style" | "className" | "hideTips">;
|
|
269
|
+
declare const AnnouncementTipsWidget: (props: AnnouncementTipsWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
270
|
+
|
|
232
271
|
type UseRestrictedInfoScriptReturn = ReturnType<typeof useRestrictedInfoScript> & {
|
|
233
272
|
brokerName?: string;
|
|
234
273
|
};
|
|
@@ -261,4 +300,18 @@ type MainLogoProps = {
|
|
|
261
300
|
};
|
|
262
301
|
declare const MainLogo: FC<MainLogoProps>;
|
|
263
302
|
|
|
264
|
-
|
|
303
|
+
declare const LanguageSwitcherWidget: () => react_jsx_runtime.JSX.Element;
|
|
304
|
+
|
|
305
|
+
type LanguageSwitcherScriptReturn = ReturnType<typeof useLanguageSwitcherScript>;
|
|
306
|
+
declare const useLanguageSwitcherScript: () => {
|
|
307
|
+
open: boolean;
|
|
308
|
+
onOpenChange: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
309
|
+
languages: _orderly_network_i18n.Language[];
|
|
310
|
+
selectedLang: string;
|
|
311
|
+
onLangChange: (lang: string) => void;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
type LanguageSwitcherProps = LanguageSwitcherScriptReturn;
|
|
315
|
+
declare const LanguageSwitcher: FC<LanguageSwitcherProps>;
|
|
316
|
+
|
|
317
|
+
export { AccountMenuWidget, AccountSummaryWidget, AnnouncementTipsUI, AnnouncementTipsWidget, 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, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { LogoProps } from '@orderly.network/ui';
|
|
|
5
5
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
6
6
|
import { AccountStatusEnum, NetworkId } from '@orderly.network/types';
|
|
7
7
|
import { WsNetworkStatus } from '@orderly.network/hooks';
|
|
8
|
+
import * as _orderly_network_i18n from '@orderly.network/i18n';
|
|
8
9
|
|
|
9
10
|
declare const AccountMenuWidget: () => react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
@@ -170,14 +171,17 @@ type RouterAdapter = {
|
|
|
170
171
|
onRouteChange: (option: RouteOption) => void;
|
|
171
172
|
currentPath?: string;
|
|
172
173
|
};
|
|
173
|
-
type
|
|
174
|
+
type ScaffoldState = {
|
|
174
175
|
routerAdapter?: RouterAdapter;
|
|
175
176
|
expanded?: boolean;
|
|
176
177
|
setExpand: (expand: boolean) => void;
|
|
177
178
|
checkChainSupport: (chainId: number | string) => boolean;
|
|
179
|
+
topNavbarHeight: number;
|
|
180
|
+
footerHeight: number;
|
|
181
|
+
announcementHeight: number;
|
|
178
182
|
};
|
|
179
|
-
declare const
|
|
180
|
-
declare const useScaffoldContext: () =>
|
|
183
|
+
declare const ScaffoldContext: React$1.Context<ScaffoldState>;
|
|
184
|
+
declare const useScaffoldContext: () => ScaffoldState;
|
|
181
185
|
|
|
182
186
|
type FooterReturns = {
|
|
183
187
|
wsStatus: WsNetworkStatus;
|
|
@@ -193,12 +197,11 @@ declare const FooterWidget: (props: FooterProps) => react_jsx_runtime.JSX.Elemen
|
|
|
193
197
|
|
|
194
198
|
declare const Footer: FC<FooterReturns & FooterProps>;
|
|
195
199
|
|
|
196
|
-
type
|
|
200
|
+
type ScaffoldProps = {
|
|
197
201
|
/**
|
|
198
202
|
* Custom left sidebar component,
|
|
199
203
|
* if provided, the layout will use this component over the default sidebar component
|
|
200
204
|
*/
|
|
201
|
-
gap?: number;
|
|
202
205
|
leftSidebar?: React__default.ReactNode;
|
|
203
206
|
leftSideProps?: SideBarProps;
|
|
204
207
|
topBar?: React__default.ReactNode;
|
|
@@ -208,6 +211,7 @@ type LayoutProps = {
|
|
|
208
211
|
routerAdapter?: RouterAdapter;
|
|
209
212
|
classNames?: {
|
|
210
213
|
root?: string;
|
|
214
|
+
container?: string;
|
|
211
215
|
content?: string;
|
|
212
216
|
body?: string;
|
|
213
217
|
leftSidebar?: string;
|
|
@@ -215,7 +219,7 @@ type LayoutProps = {
|
|
|
215
219
|
footer?: string;
|
|
216
220
|
};
|
|
217
221
|
};
|
|
218
|
-
declare const Scaffold: (props: PropsWithChildren<
|
|
222
|
+
declare const Scaffold: (props: PropsWithChildren<ScaffoldProps>) => react_jsx_runtime.JSX.Element;
|
|
219
223
|
|
|
220
224
|
interface MaintenanceTipInterface {
|
|
221
225
|
tipsContent: string;
|
|
@@ -229,6 +233,41 @@ declare const MaintenanceTipsUI: (props: MaintenanceTipInterface) => react_jsx_r
|
|
|
229
233
|
|
|
230
234
|
declare const MaintenanceTipsWidget: () => react_jsx_runtime.JSX.Element;
|
|
231
235
|
|
|
236
|
+
declare enum AnnouncementType {
|
|
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 = {
|
|
248
|
+
hideTips?: boolean;
|
|
249
|
+
};
|
|
250
|
+
declare const useAnnouncementTipsScript: (options?: AnnouncementTipsScriptOptions) => {
|
|
251
|
+
maintenanceDialogInfo: string | undefined;
|
|
252
|
+
tips: AnnouncementTips[];
|
|
253
|
+
currentIndex: number;
|
|
254
|
+
showTips: boolean;
|
|
255
|
+
closeTips: () => void;
|
|
256
|
+
nextTips: () => void;
|
|
257
|
+
prevTips: () => void;
|
|
258
|
+
showAnnouncement: boolean;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
type AnnouncementTipsUIProps = ReturnType<typeof useAnnouncementTipsScript> & {
|
|
262
|
+
style?: React.CSSProperties;
|
|
263
|
+
className?: string;
|
|
264
|
+
hideTips?: boolean;
|
|
265
|
+
};
|
|
266
|
+
declare const AnnouncementTipsUI: (props: AnnouncementTipsUIProps) => react_jsx_runtime.JSX.Element | null;
|
|
267
|
+
|
|
268
|
+
type AnnouncementTipsWidgetProps = Pick<AnnouncementTipsUIProps, "style" | "className" | "hideTips">;
|
|
269
|
+
declare const AnnouncementTipsWidget: (props: AnnouncementTipsWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
270
|
+
|
|
232
271
|
type UseRestrictedInfoScriptReturn = ReturnType<typeof useRestrictedInfoScript> & {
|
|
233
272
|
brokerName?: string;
|
|
234
273
|
};
|
|
@@ -261,4 +300,18 @@ type MainLogoProps = {
|
|
|
261
300
|
};
|
|
262
301
|
declare const MainLogo: FC<MainLogoProps>;
|
|
263
302
|
|
|
264
|
-
|
|
303
|
+
declare const LanguageSwitcherWidget: () => react_jsx_runtime.JSX.Element;
|
|
304
|
+
|
|
305
|
+
type LanguageSwitcherScriptReturn = ReturnType<typeof useLanguageSwitcherScript>;
|
|
306
|
+
declare const useLanguageSwitcherScript: () => {
|
|
307
|
+
open: boolean;
|
|
308
|
+
onOpenChange: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
309
|
+
languages: _orderly_network_i18n.Language[];
|
|
310
|
+
selectedLang: string;
|
|
311
|
+
onLangChange: (lang: string) => void;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
type LanguageSwitcherProps = LanguageSwitcherScriptReturn;
|
|
315
|
+
declare const LanguageSwitcher: FC<LanguageSwitcherProps>;
|
|
316
|
+
|
|
317
|
+
export { AccountMenuWidget, AccountSummaryWidget, AnnouncementTipsUI, AnnouncementTipsWidget, 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, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext };
|