@orderly.network/ui-scaffold 2.3.2 → 2.4.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 +47 -2
- package/dist/index.d.ts +47 -2
- package/dist/index.js +38 -36
- 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 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default, {
|
|
3
|
+
import react__default, { ReactNode, HTMLAttributeAnchorTarget, PropsWithChildren, FC } from 'react';
|
|
4
4
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
5
5
|
import { AccountStatusEnum, NetworkId } from '@orderly.network/types';
|
|
6
6
|
import { LogoProps } from '@orderly.network/ui';
|
|
@@ -10,6 +10,23 @@ import { LocaleContextState } from '@orderly.network/i18n';
|
|
|
10
10
|
|
|
11
11
|
declare const AccountMenuWidget: () => react_jsx_runtime.JSX.Element;
|
|
12
12
|
|
|
13
|
+
type LeftNavProps = {
|
|
14
|
+
menus?: LeftNavItem[];
|
|
15
|
+
twitterUrl?: string;
|
|
16
|
+
telegramUrl?: string;
|
|
17
|
+
discordUrl?: string;
|
|
18
|
+
duneUrl?: string;
|
|
19
|
+
feedbackUrl?: string;
|
|
20
|
+
customLeftNav?: ReactNode;
|
|
21
|
+
products?: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
type LeftNavItem = {
|
|
24
|
+
name: string;
|
|
25
|
+
href: string;
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
trailing?: ReactNode;
|
|
28
|
+
};
|
|
29
|
+
|
|
13
30
|
type MainNavItem = {
|
|
14
31
|
id?: string;
|
|
15
32
|
testid?: string;
|
|
@@ -120,6 +137,9 @@ type MainNavWidgetProps = PropsWithChildren<{
|
|
|
120
137
|
chainMenu?: ReactNode;
|
|
121
138
|
walletConnect?: ReactNode;
|
|
122
139
|
}) => ReactNode;
|
|
140
|
+
/** only works on mobile */
|
|
141
|
+
leftNav?: LeftNavProps;
|
|
142
|
+
customLeftNav?: ReactNode;
|
|
123
143
|
}> & Pick<MainNavProps, "classNames">;
|
|
124
144
|
declare const MainNavWidget: (props: MainNavWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
125
145
|
|
|
@@ -150,6 +170,22 @@ declare const FooterWidget: (props: FooterProps) => react_jsx_runtime.JSX.Elemen
|
|
|
150
170
|
|
|
151
171
|
declare const Footer: FC<FooterReturns & FooterProps>;
|
|
152
172
|
|
|
173
|
+
declare const LeftNavWidget: FC<LeftNavProps>;
|
|
174
|
+
|
|
175
|
+
declare const useLeftNavState: () => {};
|
|
176
|
+
type LeftNavState = ReturnType<typeof useLeftNavState>;
|
|
177
|
+
|
|
178
|
+
type LeftNavUIProps = LeftNavProps & LeftNavState & {
|
|
179
|
+
className?: string;
|
|
180
|
+
logo?: {
|
|
181
|
+
src: string;
|
|
182
|
+
alt: string;
|
|
183
|
+
};
|
|
184
|
+
routerAdapter?: RouterAdapter;
|
|
185
|
+
showSubAccount?: boolean;
|
|
186
|
+
};
|
|
187
|
+
declare const LeftNavUI: FC<LeftNavUIProps>;
|
|
188
|
+
|
|
153
189
|
type SideMenuItem = {
|
|
154
190
|
name: string;
|
|
155
191
|
icon?: react__default.ReactNode;
|
|
@@ -209,6 +245,10 @@ type ScaffoldProps = {
|
|
|
209
245
|
* custom left sidebar props, only works on desktop
|
|
210
246
|
*/
|
|
211
247
|
leftSideProps?: SideBarProps;
|
|
248
|
+
/**
|
|
249
|
+
* custom left nav props, only works on mobile
|
|
250
|
+
*/
|
|
251
|
+
leftNavProps?: LeftNavProps;
|
|
212
252
|
/**
|
|
213
253
|
* custom top bar component
|
|
214
254
|
*/
|
|
@@ -339,10 +379,15 @@ declare const useRestrictedInfoScript: () => {
|
|
|
339
379
|
ip: string;
|
|
340
380
|
brokerName: string;
|
|
341
381
|
}) => react.ReactNode);
|
|
382
|
+
canUnblock: boolean;
|
|
383
|
+
accessRestricted: any;
|
|
384
|
+
setAccessRestricted: (value: boolean | undefined) => void;
|
|
342
385
|
};
|
|
343
386
|
brokerName: string;
|
|
344
387
|
container: react.RefObject<HTMLDivElement>;
|
|
345
388
|
mutiLine: boolean;
|
|
389
|
+
agree: boolean;
|
|
390
|
+
setAgree: react.Dispatch<react.SetStateAction<boolean>>;
|
|
346
391
|
};
|
|
347
392
|
|
|
348
393
|
type RestrictedInfoProps = UseRestrictedInfoScriptReturn & {
|
|
@@ -402,4 +447,4 @@ declare function useScanQRCodeScript(): {
|
|
|
402
447
|
type ScanQRCodeProps = UseScanQRCodeScriptReturn;
|
|
403
448
|
declare const ScanQRCode: FC<ScanQRCodeProps>;
|
|
404
449
|
|
|
405
|
-
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, BottomNav, type BottomNavProps$1 as BottomNavProps, BottomNavWidget, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, type LanguageSwitcherProps, type LanguageSwitcherScriptReturn, LanguageSwitcherWidget, type LanguageSwitcherWidgetProps, MainLogo, MainNavMobile, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget, RestrictedInfo, RestrictedInfoWidget, type RouteOption, type RouterAdapter, Scaffold, ScaffoldContext, type ScaffoldProps, ScanQRCode, ScanQRCodeWidget, SideBar, type SideBarProps, type SideMenuItem, SideNavbarWidget, useAnnouncementScript, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext, useScanQRCodeScript };
|
|
450
|
+
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, BottomNav, type BottomNavProps$1 as BottomNavProps, BottomNavWidget, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, type LanguageSwitcherProps, type LanguageSwitcherScriptReturn, LanguageSwitcherWidget, type LanguageSwitcherWidgetProps, type LeftNavItem, type LeftNavProps, LeftNavUI, LeftNavWidget, MainLogo, MainNavMobile, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget, RestrictedInfo, RestrictedInfoWidget, type RouteOption, type RouterAdapter, Scaffold, ScaffoldContext, type ScaffoldProps, ScanQRCode, ScanQRCodeWidget, SideBar, type SideBarProps, type SideMenuItem, SideNavbarWidget, useAnnouncementScript, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext, useScanQRCodeScript };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default, {
|
|
3
|
+
import react__default, { ReactNode, HTMLAttributeAnchorTarget, PropsWithChildren, FC } from 'react';
|
|
4
4
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
5
5
|
import { AccountStatusEnum, NetworkId } from '@orderly.network/types';
|
|
6
6
|
import { LogoProps } from '@orderly.network/ui';
|
|
@@ -10,6 +10,23 @@ import { LocaleContextState } from '@orderly.network/i18n';
|
|
|
10
10
|
|
|
11
11
|
declare const AccountMenuWidget: () => react_jsx_runtime.JSX.Element;
|
|
12
12
|
|
|
13
|
+
type LeftNavProps = {
|
|
14
|
+
menus?: LeftNavItem[];
|
|
15
|
+
twitterUrl?: string;
|
|
16
|
+
telegramUrl?: string;
|
|
17
|
+
discordUrl?: string;
|
|
18
|
+
duneUrl?: string;
|
|
19
|
+
feedbackUrl?: string;
|
|
20
|
+
customLeftNav?: ReactNode;
|
|
21
|
+
products?: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
type LeftNavItem = {
|
|
24
|
+
name: string;
|
|
25
|
+
href: string;
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
trailing?: ReactNode;
|
|
28
|
+
};
|
|
29
|
+
|
|
13
30
|
type MainNavItem = {
|
|
14
31
|
id?: string;
|
|
15
32
|
testid?: string;
|
|
@@ -120,6 +137,9 @@ type MainNavWidgetProps = PropsWithChildren<{
|
|
|
120
137
|
chainMenu?: ReactNode;
|
|
121
138
|
walletConnect?: ReactNode;
|
|
122
139
|
}) => ReactNode;
|
|
140
|
+
/** only works on mobile */
|
|
141
|
+
leftNav?: LeftNavProps;
|
|
142
|
+
customLeftNav?: ReactNode;
|
|
123
143
|
}> & Pick<MainNavProps, "classNames">;
|
|
124
144
|
declare const MainNavWidget: (props: MainNavWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
125
145
|
|
|
@@ -150,6 +170,22 @@ declare const FooterWidget: (props: FooterProps) => react_jsx_runtime.JSX.Elemen
|
|
|
150
170
|
|
|
151
171
|
declare const Footer: FC<FooterReturns & FooterProps>;
|
|
152
172
|
|
|
173
|
+
declare const LeftNavWidget: FC<LeftNavProps>;
|
|
174
|
+
|
|
175
|
+
declare const useLeftNavState: () => {};
|
|
176
|
+
type LeftNavState = ReturnType<typeof useLeftNavState>;
|
|
177
|
+
|
|
178
|
+
type LeftNavUIProps = LeftNavProps & LeftNavState & {
|
|
179
|
+
className?: string;
|
|
180
|
+
logo?: {
|
|
181
|
+
src: string;
|
|
182
|
+
alt: string;
|
|
183
|
+
};
|
|
184
|
+
routerAdapter?: RouterAdapter;
|
|
185
|
+
showSubAccount?: boolean;
|
|
186
|
+
};
|
|
187
|
+
declare const LeftNavUI: FC<LeftNavUIProps>;
|
|
188
|
+
|
|
153
189
|
type SideMenuItem = {
|
|
154
190
|
name: string;
|
|
155
191
|
icon?: react__default.ReactNode;
|
|
@@ -209,6 +245,10 @@ type ScaffoldProps = {
|
|
|
209
245
|
* custom left sidebar props, only works on desktop
|
|
210
246
|
*/
|
|
211
247
|
leftSideProps?: SideBarProps;
|
|
248
|
+
/**
|
|
249
|
+
* custom left nav props, only works on mobile
|
|
250
|
+
*/
|
|
251
|
+
leftNavProps?: LeftNavProps;
|
|
212
252
|
/**
|
|
213
253
|
* custom top bar component
|
|
214
254
|
*/
|
|
@@ -339,10 +379,15 @@ declare const useRestrictedInfoScript: () => {
|
|
|
339
379
|
ip: string;
|
|
340
380
|
brokerName: string;
|
|
341
381
|
}) => react.ReactNode);
|
|
382
|
+
canUnblock: boolean;
|
|
383
|
+
accessRestricted: any;
|
|
384
|
+
setAccessRestricted: (value: boolean | undefined) => void;
|
|
342
385
|
};
|
|
343
386
|
brokerName: string;
|
|
344
387
|
container: react.RefObject<HTMLDivElement>;
|
|
345
388
|
mutiLine: boolean;
|
|
389
|
+
agree: boolean;
|
|
390
|
+
setAgree: react.Dispatch<react.SetStateAction<boolean>>;
|
|
346
391
|
};
|
|
347
392
|
|
|
348
393
|
type RestrictedInfoProps = UseRestrictedInfoScriptReturn & {
|
|
@@ -402,4 +447,4 @@ declare function useScanQRCodeScript(): {
|
|
|
402
447
|
type ScanQRCodeProps = UseScanQRCodeScriptReturn;
|
|
403
448
|
declare const ScanQRCode: FC<ScanQRCodeProps>;
|
|
404
449
|
|
|
405
|
-
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, BottomNav, type BottomNavProps$1 as BottomNavProps, BottomNavWidget, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, type LanguageSwitcherProps, type LanguageSwitcherScriptReturn, LanguageSwitcherWidget, type LanguageSwitcherWidgetProps, MainLogo, MainNavMobile, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget, RestrictedInfo, RestrictedInfoWidget, type RouteOption, type RouterAdapter, Scaffold, ScaffoldContext, type ScaffoldProps, ScanQRCode, ScanQRCodeWidget, SideBar, type SideBarProps, type SideMenuItem, SideNavbarWidget, useAnnouncementScript, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext, useScanQRCodeScript };
|
|
450
|
+
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, BottomNav, type BottomNavProps$1 as BottomNavProps, BottomNavWidget, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, type LanguageSwitcherProps, type LanguageSwitcherScriptReturn, LanguageSwitcherWidget, type LanguageSwitcherWidgetProps, type LeftNavItem, type LeftNavProps, LeftNavUI, LeftNavWidget, MainLogo, MainNavMobile, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget, RestrictedInfo, RestrictedInfoWidget, type RouteOption, type RouterAdapter, Scaffold, ScaffoldContext, type ScaffoldProps, ScanQRCode, ScanQRCodeWidget, SideBar, type SideBarProps, type SideMenuItem, SideNavbarWidget, useAnnouncementScript, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext, useScanQRCodeScript };
|