@orderly.network/ui-scaffold 2.1.1 → 2.1.2
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 +37 -38
- package/dist/index.d.ts +37 -38
- package/dist/index.js +30 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -7
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +11 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default, { HTMLAttributeAnchorTarget,
|
|
4
|
-
import { LogoProps } from '@orderly.network/ui';
|
|
3
|
+
import react__default, { HTMLAttributeAnchorTarget, ReactNode, PropsWithChildren, FC } from 'react';
|
|
5
4
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
6
|
-
import { AccountStatusEnum, NetworkId, API } from '@orderly.network/types';
|
|
5
|
+
import { AccountStatusEnum, NetworkId, API, AnnouncementType } from '@orderly.network/types';
|
|
6
|
+
import { LogoProps } from '@orderly.network/ui';
|
|
7
7
|
import { WsNetworkStatus } from '@orderly.network/hooks';
|
|
8
8
|
import * as _orderly_network_i18n from '@orderly.network/i18n';
|
|
9
|
+
import { LocaleContextState } from '@orderly.network/i18n';
|
|
9
10
|
|
|
10
11
|
declare const AccountMenuWidget: () => react_jsx_runtime.JSX.Element;
|
|
11
12
|
|
|
@@ -25,6 +26,13 @@ type MainNavItem = {
|
|
|
25
26
|
asChild?: boolean;
|
|
26
27
|
};
|
|
27
28
|
|
|
29
|
+
type CampaignProps = {
|
|
30
|
+
item: MainNavItem;
|
|
31
|
+
className?: string;
|
|
32
|
+
onItemClick?: (item: MainNavItem[]) => void;
|
|
33
|
+
current?: string[];
|
|
34
|
+
};
|
|
35
|
+
|
|
28
36
|
type MainNavClassNames = {
|
|
29
37
|
root?: string;
|
|
30
38
|
navItem?: string;
|
|
@@ -37,42 +45,18 @@ type MainNavItemsProps = {
|
|
|
37
45
|
onItemClick?: (item: MainNavItem[]) => void;
|
|
38
46
|
};
|
|
39
47
|
|
|
40
|
-
type ProductItem = {
|
|
41
|
-
name: string;
|
|
42
|
-
href: string;
|
|
43
|
-
};
|
|
44
|
-
declare const ProductItem: FC<{
|
|
45
|
-
item: ProductItem;
|
|
46
|
-
active?: boolean;
|
|
47
|
-
onClick?: (product: ProductItem) => void;
|
|
48
|
-
}>;
|
|
49
|
-
|
|
50
|
-
type ProductsProps = {
|
|
51
|
-
items?: ProductItem[];
|
|
52
|
-
current?: string;
|
|
53
|
-
className?: string;
|
|
54
|
-
onItemClick?: (product: ProductItem) => void;
|
|
55
|
-
};
|
|
56
|
-
declare const ProductsMenu: FC<ProductsProps>;
|
|
57
|
-
|
|
58
48
|
declare enum CampaignPositionEnum {
|
|
59
49
|
menuLeading = "menuLeading",
|
|
60
50
|
menuTailing = "menuTailing",
|
|
61
51
|
navTailing = "navTailing"
|
|
62
52
|
}
|
|
63
53
|
|
|
64
|
-
type CampaignProps = {
|
|
65
|
-
item: MainNavItem;
|
|
66
|
-
className?: string;
|
|
67
|
-
onItemClick?: (item: MainNavItem[]) => void;
|
|
68
|
-
current?: string[];
|
|
69
|
-
};
|
|
70
|
-
|
|
71
54
|
type MainNavProps = {
|
|
72
55
|
className?: string;
|
|
73
56
|
logo: LogoProps;
|
|
74
|
-
products: ProductsProps;
|
|
75
57
|
mainMenus: MainNavItemsProps;
|
|
58
|
+
leading?: ReactNode;
|
|
59
|
+
trailing?: ReactNode;
|
|
76
60
|
wrongNetwork: boolean;
|
|
77
61
|
isConnected: boolean;
|
|
78
62
|
campaigns?: CampaignProps;
|
|
@@ -91,12 +75,13 @@ type MainNavProps = {
|
|
|
91
75
|
};
|
|
92
76
|
|
|
93
77
|
type MainNavWidgetProps = PropsWithChildren<{
|
|
78
|
+
leading?: ReactNode;
|
|
79
|
+
trailing?: ReactNode;
|
|
94
80
|
logo?: {
|
|
95
81
|
src: string;
|
|
96
82
|
alt: string;
|
|
97
83
|
};
|
|
98
84
|
mainMenus?: MainNavItem[];
|
|
99
|
-
products?: MainNavItem[];
|
|
100
85
|
campaigns?: MainNavItem;
|
|
101
86
|
campaignPosition?: CampaignPositionEnum;
|
|
102
87
|
initialProduct?: string;
|
|
@@ -193,11 +178,18 @@ type AnnouncementScriptOptions = {
|
|
|
193
178
|
type AnnouncementScriptReturn = ReturnType<typeof useAnnouncementScript>;
|
|
194
179
|
declare const useAnnouncementScript: (options?: AnnouncementScriptOptions) => {
|
|
195
180
|
mutiLine: boolean;
|
|
196
|
-
contentRef:
|
|
181
|
+
contentRef: react__default.RefObject<HTMLDivElement>;
|
|
197
182
|
maintenanceDialogInfo: string | undefined;
|
|
198
|
-
tips: API.Announcement
|
|
183
|
+
tips: API.Announcement;
|
|
199
184
|
currentIndex: number;
|
|
200
|
-
currentTip:
|
|
185
|
+
currentTip: {
|
|
186
|
+
announcement_id: number | string;
|
|
187
|
+
message: string;
|
|
188
|
+
i18n?: Record<PropertyKey, string | null>;
|
|
189
|
+
url?: string | null;
|
|
190
|
+
type?: AnnouncementType | null;
|
|
191
|
+
updated_time?: number | null;
|
|
192
|
+
} | undefined;
|
|
201
193
|
closeTips: () => void;
|
|
202
194
|
nextTips: () => void;
|
|
203
195
|
prevTips: () => void;
|
|
@@ -206,11 +198,11 @@ declare const useAnnouncementScript: (options?: AnnouncementScriptOptions) => {
|
|
|
206
198
|
};
|
|
207
199
|
|
|
208
200
|
type AnnouncementProps = AnnouncementScriptReturn & {
|
|
209
|
-
style?:
|
|
201
|
+
style?: react__default.CSSProperties;
|
|
210
202
|
className?: string;
|
|
211
203
|
hideTips?: boolean;
|
|
212
204
|
};
|
|
213
|
-
declare const Announcement:
|
|
205
|
+
declare const Announcement: react__default.FC<Readonly<AnnouncementProps>>;
|
|
214
206
|
|
|
215
207
|
type AnnouncementWidgetProps = Pick<AnnouncementProps, "style" | "className" | "hideTips">;
|
|
216
208
|
declare const AnnouncementWidget: (props: AnnouncementWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -293,19 +285,26 @@ type MainLogoProps = {
|
|
|
293
285
|
};
|
|
294
286
|
declare const MainLogo: FC<MainLogoProps>;
|
|
295
287
|
|
|
296
|
-
|
|
288
|
+
type LanguageSwitcherWidgetProps = Pick<LocaleContextState, "popup">;
|
|
289
|
+
declare const LanguageSwitcherWidget: (props: LanguageSwitcherWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
297
290
|
|
|
298
291
|
type LanguageSwitcherScriptReturn = ReturnType<typeof useLanguageSwitcherScript>;
|
|
299
|
-
|
|
292
|
+
type LanguageSwitcherScriptOptions = Pick<LocaleContextState, "popup">;
|
|
293
|
+
declare const useLanguageSwitcherScript: (options?: LanguageSwitcherScriptOptions) => {
|
|
300
294
|
open: boolean;
|
|
301
295
|
onOpenChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
302
296
|
languages: _orderly_network_i18n.Language[];
|
|
303
297
|
selectedLang: string;
|
|
304
298
|
onLangChange: (lang: string, displayName: string) => Promise<void>;
|
|
305
299
|
loading: boolean;
|
|
300
|
+
popup: {
|
|
301
|
+
mode: _orderly_network_i18n.PopupMode;
|
|
302
|
+
className?: string;
|
|
303
|
+
style?: React.CSSProperties;
|
|
304
|
+
};
|
|
306
305
|
};
|
|
307
306
|
|
|
308
307
|
type LanguageSwitcherProps = LanguageSwitcherScriptReturn;
|
|
309
308
|
declare const LanguageSwitcher: FC<LanguageSwitcherProps>;
|
|
310
309
|
|
|
311
|
-
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, LanguageSwitcherWidget, MainLogo, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget,
|
|
310
|
+
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, type LanguageSwitcherProps, type LanguageSwitcherScriptReturn, LanguageSwitcherWidget, type LanguageSwitcherWidgetProps, MainLogo, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget, 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,11 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default, { HTMLAttributeAnchorTarget,
|
|
4
|
-
import { LogoProps } from '@orderly.network/ui';
|
|
3
|
+
import react__default, { HTMLAttributeAnchorTarget, ReactNode, PropsWithChildren, FC } from 'react';
|
|
5
4
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
6
|
-
import { AccountStatusEnum, NetworkId, API } from '@orderly.network/types';
|
|
5
|
+
import { AccountStatusEnum, NetworkId, API, AnnouncementType } from '@orderly.network/types';
|
|
6
|
+
import { LogoProps } from '@orderly.network/ui';
|
|
7
7
|
import { WsNetworkStatus } from '@orderly.network/hooks';
|
|
8
8
|
import * as _orderly_network_i18n from '@orderly.network/i18n';
|
|
9
|
+
import { LocaleContextState } from '@orderly.network/i18n';
|
|
9
10
|
|
|
10
11
|
declare const AccountMenuWidget: () => react_jsx_runtime.JSX.Element;
|
|
11
12
|
|
|
@@ -25,6 +26,13 @@ type MainNavItem = {
|
|
|
25
26
|
asChild?: boolean;
|
|
26
27
|
};
|
|
27
28
|
|
|
29
|
+
type CampaignProps = {
|
|
30
|
+
item: MainNavItem;
|
|
31
|
+
className?: string;
|
|
32
|
+
onItemClick?: (item: MainNavItem[]) => void;
|
|
33
|
+
current?: string[];
|
|
34
|
+
};
|
|
35
|
+
|
|
28
36
|
type MainNavClassNames = {
|
|
29
37
|
root?: string;
|
|
30
38
|
navItem?: string;
|
|
@@ -37,42 +45,18 @@ type MainNavItemsProps = {
|
|
|
37
45
|
onItemClick?: (item: MainNavItem[]) => void;
|
|
38
46
|
};
|
|
39
47
|
|
|
40
|
-
type ProductItem = {
|
|
41
|
-
name: string;
|
|
42
|
-
href: string;
|
|
43
|
-
};
|
|
44
|
-
declare const ProductItem: FC<{
|
|
45
|
-
item: ProductItem;
|
|
46
|
-
active?: boolean;
|
|
47
|
-
onClick?: (product: ProductItem) => void;
|
|
48
|
-
}>;
|
|
49
|
-
|
|
50
|
-
type ProductsProps = {
|
|
51
|
-
items?: ProductItem[];
|
|
52
|
-
current?: string;
|
|
53
|
-
className?: string;
|
|
54
|
-
onItemClick?: (product: ProductItem) => void;
|
|
55
|
-
};
|
|
56
|
-
declare const ProductsMenu: FC<ProductsProps>;
|
|
57
|
-
|
|
58
48
|
declare enum CampaignPositionEnum {
|
|
59
49
|
menuLeading = "menuLeading",
|
|
60
50
|
menuTailing = "menuTailing",
|
|
61
51
|
navTailing = "navTailing"
|
|
62
52
|
}
|
|
63
53
|
|
|
64
|
-
type CampaignProps = {
|
|
65
|
-
item: MainNavItem;
|
|
66
|
-
className?: string;
|
|
67
|
-
onItemClick?: (item: MainNavItem[]) => void;
|
|
68
|
-
current?: string[];
|
|
69
|
-
};
|
|
70
|
-
|
|
71
54
|
type MainNavProps = {
|
|
72
55
|
className?: string;
|
|
73
56
|
logo: LogoProps;
|
|
74
|
-
products: ProductsProps;
|
|
75
57
|
mainMenus: MainNavItemsProps;
|
|
58
|
+
leading?: ReactNode;
|
|
59
|
+
trailing?: ReactNode;
|
|
76
60
|
wrongNetwork: boolean;
|
|
77
61
|
isConnected: boolean;
|
|
78
62
|
campaigns?: CampaignProps;
|
|
@@ -91,12 +75,13 @@ type MainNavProps = {
|
|
|
91
75
|
};
|
|
92
76
|
|
|
93
77
|
type MainNavWidgetProps = PropsWithChildren<{
|
|
78
|
+
leading?: ReactNode;
|
|
79
|
+
trailing?: ReactNode;
|
|
94
80
|
logo?: {
|
|
95
81
|
src: string;
|
|
96
82
|
alt: string;
|
|
97
83
|
};
|
|
98
84
|
mainMenus?: MainNavItem[];
|
|
99
|
-
products?: MainNavItem[];
|
|
100
85
|
campaigns?: MainNavItem;
|
|
101
86
|
campaignPosition?: CampaignPositionEnum;
|
|
102
87
|
initialProduct?: string;
|
|
@@ -193,11 +178,18 @@ type AnnouncementScriptOptions = {
|
|
|
193
178
|
type AnnouncementScriptReturn = ReturnType<typeof useAnnouncementScript>;
|
|
194
179
|
declare const useAnnouncementScript: (options?: AnnouncementScriptOptions) => {
|
|
195
180
|
mutiLine: boolean;
|
|
196
|
-
contentRef:
|
|
181
|
+
contentRef: react__default.RefObject<HTMLDivElement>;
|
|
197
182
|
maintenanceDialogInfo: string | undefined;
|
|
198
|
-
tips: API.Announcement
|
|
183
|
+
tips: API.Announcement;
|
|
199
184
|
currentIndex: number;
|
|
200
|
-
currentTip:
|
|
185
|
+
currentTip: {
|
|
186
|
+
announcement_id: number | string;
|
|
187
|
+
message: string;
|
|
188
|
+
i18n?: Record<PropertyKey, string | null>;
|
|
189
|
+
url?: string | null;
|
|
190
|
+
type?: AnnouncementType | null;
|
|
191
|
+
updated_time?: number | null;
|
|
192
|
+
} | undefined;
|
|
201
193
|
closeTips: () => void;
|
|
202
194
|
nextTips: () => void;
|
|
203
195
|
prevTips: () => void;
|
|
@@ -206,11 +198,11 @@ declare const useAnnouncementScript: (options?: AnnouncementScriptOptions) => {
|
|
|
206
198
|
};
|
|
207
199
|
|
|
208
200
|
type AnnouncementProps = AnnouncementScriptReturn & {
|
|
209
|
-
style?:
|
|
201
|
+
style?: react__default.CSSProperties;
|
|
210
202
|
className?: string;
|
|
211
203
|
hideTips?: boolean;
|
|
212
204
|
};
|
|
213
|
-
declare const Announcement:
|
|
205
|
+
declare const Announcement: react__default.FC<Readonly<AnnouncementProps>>;
|
|
214
206
|
|
|
215
207
|
type AnnouncementWidgetProps = Pick<AnnouncementProps, "style" | "className" | "hideTips">;
|
|
216
208
|
declare const AnnouncementWidget: (props: AnnouncementWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -293,19 +285,26 @@ type MainLogoProps = {
|
|
|
293
285
|
};
|
|
294
286
|
declare const MainLogo: FC<MainLogoProps>;
|
|
295
287
|
|
|
296
|
-
|
|
288
|
+
type LanguageSwitcherWidgetProps = Pick<LocaleContextState, "popup">;
|
|
289
|
+
declare const LanguageSwitcherWidget: (props: LanguageSwitcherWidgetProps) => react_jsx_runtime.JSX.Element;
|
|
297
290
|
|
|
298
291
|
type LanguageSwitcherScriptReturn = ReturnType<typeof useLanguageSwitcherScript>;
|
|
299
|
-
|
|
292
|
+
type LanguageSwitcherScriptOptions = Pick<LocaleContextState, "popup">;
|
|
293
|
+
declare const useLanguageSwitcherScript: (options?: LanguageSwitcherScriptOptions) => {
|
|
300
294
|
open: boolean;
|
|
301
295
|
onOpenChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
302
296
|
languages: _orderly_network_i18n.Language[];
|
|
303
297
|
selectedLang: string;
|
|
304
298
|
onLangChange: (lang: string, displayName: string) => Promise<void>;
|
|
305
299
|
loading: boolean;
|
|
300
|
+
popup: {
|
|
301
|
+
mode: _orderly_network_i18n.PopupMode;
|
|
302
|
+
className?: string;
|
|
303
|
+
style?: React.CSSProperties;
|
|
304
|
+
};
|
|
306
305
|
};
|
|
307
306
|
|
|
308
307
|
type LanguageSwitcherProps = LanguageSwitcherScriptReturn;
|
|
309
308
|
declare const LanguageSwitcher: FC<LanguageSwitcherProps>;
|
|
310
309
|
|
|
311
|
-
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, LanguageSwitcherWidget, MainLogo, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget,
|
|
310
|
+
export { AccountMenuWidget, AccountSummaryWidget, Announcement, AnnouncementWidget, type AnnouncementWidgetProps, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, type FooterProps, FooterWidget, LanguageSwitcher, type LanguageSwitcherProps, type LanguageSwitcherScriptReturn, LanguageSwitcherWidget, type LanguageSwitcherWidgetProps, MainLogo, MainNavWidget, type MainNavWidgetProps, MaintenanceTipsUI, MaintenanceTipsWidget, RestrictedInfo, RestrictedInfoWidget, type RouteOption, type RouterAdapter, Scaffold, ScaffoldContext, type ScaffoldProps, SideBar, type SideBarProps, type SideMenuItem, SideNavbarWidget, useAnnouncementScript, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext };
|