decentraland-ui2 2.5.3 → 3.0.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/components/Navbar/Credits.styled.d.ts +9 -0
- package/dist/components/Navbar/Credits.styled.js +58 -0
- package/dist/components/Navbar/Credits.styled.js.map +1 -0
- package/dist/components/Navbar/MobileMenu.d.ts +8 -0
- package/dist/components/Navbar/MobileMenu.js +20 -0
- package/dist/components/Navbar/MobileMenu.js.map +1 -0
- package/dist/components/Navbar/MobileMenu.styled.d.ts +35 -0
- package/dist/components/Navbar/MobileMenu.styled.js +116 -0
- package/dist/components/Navbar/MobileMenu.styled.js.map +1 -0
- package/dist/components/Navbar/NavLinks.d.ts +11 -0
- package/dist/components/Navbar/NavLinks.js +19 -0
- package/dist/components/Navbar/NavLinks.js.map +1 -0
- package/dist/components/Navbar/NavLinks.styled.d.ts +31 -0
- package/dist/components/Navbar/NavLinks.styled.js +130 -0
- package/dist/components/Navbar/NavLinks.styled.js.map +1 -0
- package/dist/components/Navbar/Navbar.d.ts +2 -3
- package/dist/components/Navbar/Navbar.defaults.d.ts +29 -6
- package/dist/components/Navbar/Navbar.defaults.js +101 -231
- package/dist/components/Navbar/Navbar.defaults.js.map +1 -1
- package/dist/components/Navbar/Navbar.js +109 -34
- package/dist/components/Navbar/Navbar.js.map +1 -1
- package/dist/components/Navbar/Navbar.stories.d.ts +9 -8
- package/dist/components/Navbar/Navbar.stories.js +93 -60
- package/dist/components/Navbar/Navbar.stories.js.map +1 -1
- package/dist/components/Navbar/Navbar.styled.d.ts +53 -56
- package/dist/components/Navbar/Navbar.styled.js +168 -101
- package/dist/components/Navbar/Navbar.styled.js.map +1 -1
- package/dist/components/Navbar/Navbar.types.d.ts +72 -56
- package/dist/components/Navbar/Navbar.types.js +1 -10
- package/dist/components/Navbar/Navbar.types.js.map +1 -1
- package/dist/components/Navbar/NotificationBell.styled.d.ts +61 -0
- package/dist/components/Navbar/NotificationBell.styled.js +189 -0
- package/dist/components/Navbar/NotificationBell.styled.js.map +1 -0
- package/dist/components/Navbar/UserCardPanel.d.ts +27 -0
- package/dist/components/Navbar/UserCardPanel.js +106 -0
- package/dist/components/Navbar/UserCardPanel.js.map +1 -0
- package/dist/components/Navbar/UserCardPanel.styled.d.ts +133 -0
- package/dist/components/Navbar/UserCardPanel.styled.js +392 -0
- package/dist/components/Navbar/UserCardPanel.styled.js.map +1 -0
- package/dist/components/Navbar/formatBalance.d.ts +2 -0
- package/dist/components/Navbar/formatBalance.js +5 -0
- package/dist/components/Navbar/formatBalance.js.map +1 -0
- package/dist/components/Navbar/icons.d.ts +24 -0
- package/dist/components/Navbar/icons.js +67 -0
- package/dist/components/Navbar/icons.js.map +1 -0
- package/dist/components/Navbar/index.d.ts +3 -2
- package/dist/components/Navbar/index.js +2 -2
- package/dist/components/Navbar/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/Navbar/MainMenu/MainMenu.d.ts +0 -2
- package/dist/components/Navbar/MainMenu/MainMenu.js +0 -26
- package/dist/components/Navbar/MainMenu/MainMenu.js.map +0 -1
- package/dist/components/Navbar/MainMenu/MainMenu.styled.d.ts +0 -9
- package/dist/components/Navbar/MainMenu/MainMenu.styled.js +0 -39
- package/dist/components/Navbar/MainMenu/MainMenu.styled.js.map +0 -1
- package/dist/components/Navbar/MainMenu/MainMenu.types.d.ts +0 -8
- package/dist/components/Navbar/MainMenu/MainMenu.types.js +0 -2
- package/dist/components/Navbar/MainMenu/MainMenu.types.js.map +0 -1
- package/dist/components/Navbar/MenuItem/MenuItem.d.ts +0 -3
- package/dist/components/Navbar/MenuItem/MenuItem.js +0 -15
- package/dist/components/Navbar/MenuItem/MenuItem.js.map +0 -1
- package/dist/components/Navbar/MenuItem/MenuItem.styled.d.ts +0 -18
- package/dist/components/Navbar/MenuItem/MenuItem.styled.js +0 -59
- package/dist/components/Navbar/MenuItem/MenuItem.styled.js.map +0 -1
- package/dist/components/Navbar/MenuItem/MenuItem.types.d.ts +0 -12
- package/dist/components/Navbar/MenuItem/MenuItem.types.js +0 -2
- package/dist/components/Navbar/MenuItem/MenuItem.types.js.map +0 -1
- package/dist/components/Navbar/SubMenu/SubMenu.d.ts +0 -2
- package/dist/components/Navbar/SubMenu/SubMenu.js +0 -14
- package/dist/components/Navbar/SubMenu/SubMenu.js.map +0 -1
- package/dist/components/Navbar/SubMenu/SubMenu.styled.d.ts +0 -27
- package/dist/components/Navbar/SubMenu/SubMenu.styled.js +0 -165
- package/dist/components/Navbar/SubMenu/SubMenu.styled.js.map +0 -1
- package/dist/components/Navbar/SubMenu/SubMenu.types.d.ts +0 -13
- package/dist/components/Navbar/SubMenu/SubMenu.types.js +0 -2
- package/dist/components/Navbar/SubMenu/SubMenu.types.js.map +0 -1
- package/dist/components/Navbar/SubMenuColumn/SubMenuColumn.d.ts +0 -3
- package/dist/components/Navbar/SubMenuColumn/SubMenuColumn.js +0 -9
- package/dist/components/Navbar/SubMenuColumn/SubMenuColumn.js.map +0 -1
- package/dist/components/Navbar/SubMenuColumn/SubMenuColumn.styled.d.ts +0 -11
- package/dist/components/Navbar/SubMenuColumn/SubMenuColumn.styled.js +0 -33
- package/dist/components/Navbar/SubMenuColumn/SubMenuColumn.styled.js.map +0 -1
- package/dist/components/Navbar/SubMenuColumn/SubMenuColumn.types.d.ts +0 -5
- package/dist/components/Navbar/SubMenuColumn/SubMenuColumn.types.js +0 -2
- package/dist/components/Navbar/SubMenuColumn/SubMenuColumn.types.js.map +0 -1
- package/dist/components/Navbar/SubMenuItem/SubMenuItem.d.ts +0 -2
- package/dist/components/Navbar/SubMenuItem/SubMenuItem.js +0 -15
- package/dist/components/Navbar/SubMenuItem/SubMenuItem.js.map +0 -1
- package/dist/components/Navbar/SubMenuItem/SubMenuItem.styled.d.ts +0 -32
- package/dist/components/Navbar/SubMenuItem/SubMenuItem.styled.js +0 -84
- package/dist/components/Navbar/SubMenuItem/SubMenuItem.styled.js.map +0 -1
- package/dist/components/Navbar/SubMenuItem/SubMenuItem.types.d.ts +0 -13
- package/dist/components/Navbar/SubMenuItem/SubMenuItem.types.js +0 -2
- package/dist/components/Navbar/SubMenuItem/SubMenuItem.types.js.map +0 -1
- package/dist/components/Navbar/utils.d.ts +0 -16
- package/dist/components/Navbar/utils.js +0 -33
- package/dist/components/Navbar/utils.js.map +0 -1
|
@@ -1,235 +1,105 @@
|
|
|
1
1
|
import { config } from '../../config';
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
const DEFAULT_I18N = {
|
|
3
|
+
signIn: 'SIGN IN',
|
|
4
|
+
signingIn: 'SIGNING IN...',
|
|
5
|
+
whatsOn: "What's On",
|
|
6
|
+
shop: 'Shop',
|
|
7
|
+
shopAll: 'Shop All',
|
|
8
|
+
wearables: 'Wearables',
|
|
9
|
+
emotes: 'Emotes',
|
|
10
|
+
names: 'Names',
|
|
11
|
+
land: 'Land',
|
|
12
|
+
merch: 'Merch',
|
|
13
|
+
create: 'Create',
|
|
14
|
+
createInDecentraland: 'Create in Decentraland',
|
|
15
|
+
publishWearablesEmotes: 'Publish Wearables & Emotes',
|
|
16
|
+
publishLand: 'Manage Land',
|
|
17
|
+
learn: 'Learn',
|
|
18
|
+
getStarted: 'Get Started',
|
|
19
|
+
startCreating: 'Start Creating',
|
|
20
|
+
seeWhatsNew: "See What's New",
|
|
21
|
+
viewProfile: 'View Profile',
|
|
22
|
+
myAssets: 'My Assets',
|
|
23
|
+
accountSettings: 'Account Settings',
|
|
24
|
+
marketplaceAuthorizations: 'Marketplace Authorizations',
|
|
25
|
+
walletAddress: 'User ID',
|
|
26
|
+
addressCopied: 'Copied!',
|
|
27
|
+
logout: 'Log Out',
|
|
28
|
+
creditsExpiringIn: 'Expiring in {days} days',
|
|
29
|
+
creditsValueNote: '(1 Credit = 1 MANA in value)'
|
|
8
30
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
create: {
|
|
67
|
-
column1: [
|
|
68
|
-
{
|
|
69
|
-
title: 'Create in Decentraland',
|
|
70
|
-
description: 'Discover all the benefits and possibilities',
|
|
71
|
-
url: config.get('LANDING_CREATORS_URL'),
|
|
72
|
-
eventTrackingName: 'landing_creators'
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
title: 'Decentraland Studios',
|
|
76
|
-
description: 'Hire pros to transform your ideas to reality',
|
|
77
|
-
url: config.get('STUDIOS_URL'),
|
|
78
|
-
eventTrackingName: 'studios',
|
|
79
|
-
isExternal: true
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
column2Title: 'PUBLISH',
|
|
83
|
-
column2: [
|
|
84
|
-
{
|
|
85
|
-
title: 'Wearables & Emotes',
|
|
86
|
-
description: 'Publish & manage Marketplace collections',
|
|
87
|
-
url: config.get('BUILDER_WEARABLE_EMOTES_URL'),
|
|
88
|
-
eventTrackingName: 'builder_wearables_emotes'
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
title: 'Scenes',
|
|
92
|
-
description: 'Create & publish scenes to LAND or Worlds',
|
|
93
|
-
url: config.get('CREATOR_HUB_URL'),
|
|
94
|
-
eventTrackingName: 'creator_hub_scenes'
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
column3Title: 'MANAGE',
|
|
98
|
-
column3: [
|
|
99
|
-
{
|
|
100
|
-
title: 'My NAMEs',
|
|
101
|
-
description: 'Create & manage NAMEs',
|
|
102
|
-
url: config.get('BUILDER_NAMES_URL'),
|
|
103
|
-
eventTrackingName: 'builder_names'
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
title: 'My Worlds',
|
|
107
|
-
description: 'Manage Worlds & Worlds storage',
|
|
108
|
-
url: config.get('BUILDER_WORLDS_URL'),
|
|
109
|
-
eventTrackingName: 'builder_worlds'
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
title: 'My LAND',
|
|
113
|
-
description: 'Manage parcel permissions & more',
|
|
114
|
-
url: config.get('BUILDER_LAND_URL'),
|
|
115
|
-
eventTrackingName: 'builder_land'
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
explore: {
|
|
120
|
-
column1: [
|
|
121
|
-
{
|
|
122
|
-
title: 'Events',
|
|
123
|
-
description: 'Find an event to jump into',
|
|
124
|
-
url: config.get('EVENTS_URL'),
|
|
125
|
-
eventTrackingName: 'events'
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
title: 'My Events',
|
|
129
|
-
description: 'See saved events & events you’re hosting',
|
|
130
|
-
url: config.get('EVENTS_MY_EVENTS'),
|
|
131
|
-
eventTrackingName: 'events_my_events'
|
|
132
|
-
}
|
|
133
|
-
],
|
|
134
|
-
column2: [
|
|
135
|
-
{
|
|
136
|
-
title: 'Places',
|
|
137
|
-
description: 'Browse locations in Genesis City & Worlds',
|
|
138
|
-
url: config.get('PLACES_URL'),
|
|
139
|
-
eventTrackingName: 'places'
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
title: 'My Favorite Places',
|
|
143
|
-
description: 'See your saved locations',
|
|
144
|
-
url: config.get('PLACES_MY_FAVORITE_URL'),
|
|
145
|
-
eventTrackingName: 'places_my_favorite'
|
|
146
|
-
}
|
|
147
|
-
],
|
|
148
|
-
column3: [
|
|
149
|
-
{
|
|
150
|
-
title: 'Top Scenes',
|
|
151
|
-
description: "Discover Decentraland's hottest scenes",
|
|
152
|
-
url: config.get('TOP_SCENES_URL'),
|
|
153
|
-
eventTrackingName: 'places_my_favorite'
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
learn: {
|
|
158
|
-
column1: [
|
|
159
|
-
{
|
|
160
|
-
title: 'About Decentraland',
|
|
161
|
-
description: 'FAQs, Whitepaper, & DAO docs',
|
|
162
|
-
url: config.get('DOCS_ABOUT_URL'),
|
|
163
|
-
eventTrackingName: 'docs_about'
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
title: 'Creator Docs',
|
|
167
|
-
description: 'Make Wearables, Emotes, scenes, games, & more',
|
|
168
|
-
url: config.get('DOCS_CREATORS_URL'),
|
|
169
|
-
eventTrackingName: 'docs_creators'
|
|
170
|
-
}
|
|
171
|
-
],
|
|
172
|
-
column2: [
|
|
173
|
-
{
|
|
174
|
-
title: 'Blog',
|
|
175
|
-
description: 'News, Community Highlights, & more',
|
|
176
|
-
url: config.get('BLOG_URL'),
|
|
177
|
-
eventTrackingName: 'blog',
|
|
178
|
-
isExternal: true
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
title: 'Open Protocol Docs',
|
|
182
|
-
description: 'See how Decentraland works & contribute',
|
|
183
|
-
url: config.get('DOCS_CONTRIBUTOR_URL'),
|
|
184
|
-
eventTrackingName: 'docs_contributor'
|
|
185
|
-
}
|
|
186
|
-
]
|
|
187
|
-
},
|
|
188
|
-
governance: {
|
|
189
|
-
column1: [
|
|
190
|
-
{
|
|
191
|
-
title: 'Overview',
|
|
192
|
-
description: 'The latest in Decentraland governance',
|
|
193
|
-
url: config.get('GOVERNANCE_URL'),
|
|
194
|
-
eventTrackingName: 'governance_overview'
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
title: 'DAO Transparency',
|
|
198
|
-
description: 'Treasury, Activity Dashboards, & more',
|
|
199
|
-
url: config.get('GOVERNANCE_TRANSPARENCY_URL'),
|
|
200
|
-
eventTrackingName: 'governance_transparency'
|
|
201
|
-
}
|
|
202
|
-
],
|
|
203
|
-
column2: [
|
|
204
|
-
{
|
|
205
|
-
title: 'Proposals',
|
|
206
|
-
description: 'Vote on active proposals',
|
|
207
|
-
url: config.get('GOVERNANCE_PROPOSALS_URL'),
|
|
208
|
-
eventTrackingName: 'governance_proposals'
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
title: 'DAO Grants',
|
|
212
|
-
description: 'Community grants overview, highlights, & resources',
|
|
213
|
-
url: config.get('DAO_GRANTS_URL'),
|
|
214
|
-
eventTrackingName: 'dao_grants',
|
|
215
|
-
isExternal: true
|
|
216
|
-
}
|
|
217
|
-
],
|
|
218
|
-
column3: [
|
|
219
|
-
{
|
|
220
|
-
title: 'Active Grants',
|
|
221
|
-
description: 'Browse grant-funded community projects',
|
|
222
|
-
url: config.get('GOVERNANCE_PROJECTS_URL'),
|
|
223
|
-
eventTrackingName: 'governance_active_grants'
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
title: 'DAO Docs',
|
|
227
|
-
description: 'Learn about the DAO & how to participate',
|
|
228
|
-
url: config.get('DOCS_DAO_URL'),
|
|
229
|
-
eventTrackingName: 'docs_dao'
|
|
230
|
-
}
|
|
231
|
-
]
|
|
31
|
+
/**
|
|
32
|
+
* URLs resolved from the ui-env config system so they point to the correct
|
|
33
|
+
* environment (zone for dev, today for staging, org for production).
|
|
34
|
+
*/
|
|
35
|
+
function buildMenuConfig() {
|
|
36
|
+
const marketplaceUrl = config.get('MARKETPLACE_URL');
|
|
37
|
+
const builderUrl = config.get('BUILDER_URL');
|
|
38
|
+
const eventsUrl = config.get('EVENTS_URL');
|
|
39
|
+
const createUrl = config.get('CREATE_URL');
|
|
40
|
+
const blogUrl = config.get('BLOG_URL');
|
|
41
|
+
const docsPlayerUrl = config.get('DOCS_ABOUT_URL') ?? config.get('LEARN_URL');
|
|
42
|
+
const docsCreatorUrl = config.get('DOCS_CREATORS_URL');
|
|
43
|
+
const namesUrl = config.get('MARKETPLACE_NAMES_URL');
|
|
44
|
+
const landsUrl = config.get('MARKETPLACE_LANDS_URL');
|
|
45
|
+
return {
|
|
46
|
+
whatsOn: {
|
|
47
|
+
label: 'whatsOn',
|
|
48
|
+
url: eventsUrl
|
|
49
|
+
},
|
|
50
|
+
shop: {
|
|
51
|
+
label: 'shop',
|
|
52
|
+
items: [
|
|
53
|
+
{ label: 'shopAll', url: marketplaceUrl },
|
|
54
|
+
{ label: 'wearables', url: `${marketplaceUrl}/browse?assetType=item§ion=wearables&status=on_sale` },
|
|
55
|
+
{ label: 'emotes', url: `${marketplaceUrl}/browse?assetType=item§ion=emotes&status=on_sale` },
|
|
56
|
+
{ label: 'names', url: namesUrl },
|
|
57
|
+
{ label: 'land', url: landsUrl },
|
|
58
|
+
{ label: 'merch', url: 'https://store.decentraland.org/', isExternal: true }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
create: {
|
|
62
|
+
label: 'create',
|
|
63
|
+
items: [
|
|
64
|
+
{ label: 'createInDecentraland', url: createUrl },
|
|
65
|
+
{ label: 'publishWearablesEmotes', url: `${builderUrl}/collections` },
|
|
66
|
+
{ label: 'publishLand', url: `${builderUrl}/land` }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
learn: {
|
|
70
|
+
label: 'learn',
|
|
71
|
+
items: [
|
|
72
|
+
{ label: 'getStarted', url: docsPlayerUrl, isExternal: true },
|
|
73
|
+
{ label: 'startCreating', url: docsCreatorUrl, isExternal: true },
|
|
74
|
+
{ label: 'seeWhatsNew', url: blogUrl }
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Lazy singleton getters — config.get() is deferred until first call
|
|
81
|
+
* to avoid issues in SSR, test environments, or lazy-import scenarios
|
|
82
|
+
* where the env config may not be initialized at module load time.
|
|
83
|
+
*/
|
|
84
|
+
let _menuConfig = null;
|
|
85
|
+
function getMenuConfig() {
|
|
86
|
+
if (!_menuConfig) {
|
|
87
|
+
_menuConfig = buildMenuConfig();
|
|
232
88
|
}
|
|
233
|
-
|
|
234
|
-
|
|
89
|
+
return _menuConfig;
|
|
90
|
+
}
|
|
91
|
+
let _userMenuItems = null;
|
|
92
|
+
function getUserMenuItems() {
|
|
93
|
+
if (!_userMenuItems) {
|
|
94
|
+
_userMenuItems = [
|
|
95
|
+
{ label: 'viewProfile', url: config.get('PROFILE_URL'), icon: 'account' },
|
|
96
|
+
{ label: 'myAssets', url: config.get('MARKETPLACE_MY_ASSETS_URL'), icon: 'wearable' },
|
|
97
|
+
{ label: 'accountSettings', url: config.get('ACCOUNT_URL'), icon: 'settings' },
|
|
98
|
+
{ label: 'marketplaceAuthorizations', url: config.get('MARKETPLACE_SETTINGS_URL'), icon: 'shopping' }
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
return _userMenuItems;
|
|
102
|
+
}
|
|
103
|
+
const DROPDOWN_SECTIONS = ['shop', 'create', 'learn'];
|
|
104
|
+
export { DEFAULT_I18N, DROPDOWN_SECTIONS, getMenuConfig, getUserMenuItems };
|
|
235
105
|
//# sourceMappingURL=Navbar.defaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navbar.defaults.js","sourceRoot":"","sources":["../../../src/components/Navbar/Navbar.defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"Navbar.defaults.js","sourceRo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 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
import { memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { formatBalance } from './formatBalance';
|
|
4
|
+
import { CloseIcon, DclLogo, HamburgerIcon } from './icons';
|
|
5
|
+
import { MobileMenu } from './MobileMenu';
|
|
6
|
+
import { DEFAULT_I18N } from './Navbar.defaults';
|
|
7
|
+
import { NavLinks } from './NavLinks';
|
|
8
|
+
import { UserCardPanel } from './UserCardPanel';
|
|
9
|
+
import { CreditsIcon } from '../Icon/CreditsIcon';
|
|
10
|
+
import { CreditsBalanceButton, CreditsTooltip } from './Credits.styled';
|
|
11
|
+
import { HamburgerButton, LogoLink, NavbarLeft, NavbarRight, NavbarRightGroup, NavbarRoot, SignInButton } from './Navbar.styled';
|
|
12
|
+
/** Calculate days remaining until a given timestamp. */
|
|
13
|
+
function daysUntil(timestamp) {
|
|
14
|
+
const diff = timestamp - Date.now();
|
|
15
|
+
return Math.max(0, Math.ceil(diff / (1000 * 60 * 60 * 24)));
|
|
16
|
+
}
|
|
17
|
+
const Navbar = memo(function Navbar({ isSignedIn, isSigningIn, isLoadingProfile = false, address, avatar, i18n: i18nPartial, notificationSlot, selectedChain, chains, onSelectChain, manaBalances, onClickBalance, creditsBalance, onClickCredits, activePage, onToggleUserCard, onClickSignIn, onClickSignOut }) {
|
|
18
|
+
const i18n = { ...DEFAULT_I18N, ...i18nPartial };
|
|
19
|
+
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
|
20
|
+
const [desktopDropdown, setDesktopDropdown] = useState(null);
|
|
21
|
+
const [userCardOpen, setUserCardOpen] = useState(false);
|
|
22
|
+
const navRef = useRef(null);
|
|
23
|
+
const dropdownTimerRef = useRef(null);
|
|
24
|
+
const toggleMobileMenu = useCallback(() => {
|
|
25
|
+
setMobileMenuOpen(prev => {
|
|
26
|
+
if (!prev) {
|
|
27
|
+
setDesktopDropdown(null);
|
|
28
|
+
setUserCardOpen(false);
|
|
29
|
+
}
|
|
30
|
+
return !prev;
|
|
31
|
+
});
|
|
32
|
+
}, []);
|
|
33
|
+
const closeMobileMenu = useCallback(() => {
|
|
34
|
+
setMobileMenuOpen(false);
|
|
35
|
+
}, []);
|
|
36
|
+
const openDesktopDropdown = useCallback((section) => {
|
|
37
|
+
if (dropdownTimerRef.current) {
|
|
38
|
+
clearTimeout(dropdownTimerRef.current);
|
|
39
|
+
dropdownTimerRef.current = null;
|
|
28
40
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
setDesktopDropdown(section);
|
|
42
|
+
setUserCardOpen(false);
|
|
43
|
+
}, []);
|
|
44
|
+
const scheduleCloseDesktopDropdown = useCallback(() => {
|
|
45
|
+
dropdownTimerRef.current = setTimeout(() => {
|
|
46
|
+
setDesktopDropdown(null);
|
|
47
|
+
}, 300);
|
|
48
|
+
}, []);
|
|
49
|
+
const closeDesktopDropdown = useCallback(() => {
|
|
50
|
+
setDesktopDropdown(null);
|
|
51
|
+
}, []);
|
|
52
|
+
const toggleUserCard = useCallback(() => {
|
|
53
|
+
setUserCardOpen(prev => {
|
|
54
|
+
const next = !prev;
|
|
55
|
+
if (next) {
|
|
56
|
+
setDesktopDropdown(null);
|
|
57
|
+
setMobileMenuOpen(false);
|
|
58
|
+
}
|
|
59
|
+
onToggleUserCard?.(next);
|
|
60
|
+
return next;
|
|
61
|
+
});
|
|
62
|
+
}, [onToggleUserCard]);
|
|
63
|
+
const closeUserCard = useCallback(() => {
|
|
64
|
+
setUserCardOpen(false);
|
|
65
|
+
}, []);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
function handleClickOutside(event) {
|
|
68
|
+
const target = event.target;
|
|
69
|
+
if (navRef.current && !navRef.current.contains(target)) {
|
|
70
|
+
closeDesktopDropdown();
|
|
71
|
+
closeUserCard();
|
|
72
|
+
}
|
|
34
73
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
74
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
75
|
+
return () => document.removeEventListener('mousedown', handleClickOutside);
|
|
76
|
+
}, [closeDesktopDropdown, closeUserCard]);
|
|
77
|
+
// Close open panels on scroll
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
const handleScroll = () => {
|
|
80
|
+
closeUserCard();
|
|
81
|
+
closeDesktopDropdown();
|
|
82
|
+
};
|
|
83
|
+
window.addEventListener('scroll', handleScroll, { passive: true });
|
|
84
|
+
return () => window.removeEventListener('scroll', handleScroll);
|
|
85
|
+
}, [closeUserCard, closeDesktopDropdown]);
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
function handleKeyDown(event) {
|
|
88
|
+
if (event.key === 'Escape') {
|
|
89
|
+
closeDesktopDropdown();
|
|
90
|
+
closeUserCard();
|
|
91
|
+
closeMobileMenu();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
95
|
+
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
96
|
+
}, [closeDesktopDropdown, closeUserCard, closeMobileMenu]);
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (mobileMenuOpen) {
|
|
99
|
+
document.body.style.overflow = 'hidden';
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
document.body.style.overflow = '';
|
|
103
|
+
}
|
|
104
|
+
return () => {
|
|
105
|
+
document.body.style.overflow = '';
|
|
106
|
+
};
|
|
107
|
+
}, [mobileMenuOpen]);
|
|
108
|
+
return (_jsxs(_Fragment, { children: [_jsxs(NavbarRoot, { ref: navRef, children: [_jsxs(NavbarLeft, { children: [_jsx(LogoLink, { href: "https://decentraland.org", "aria-label": "Decentraland Home", children: _jsx(DclLogo, {}) }), _jsx(NavLinks, { desktopDropdown: desktopDropdown, onOpenDropdown: openDesktopDropdown, onScheduleCloseDropdown: scheduleCloseDesktopDropdown, activePage: activePage, i18n: i18n })] }), _jsxs(NavbarRight, { children: [isSignedIn && (_jsxs(NavbarRightGroup, { children: [creditsBalance && (_jsxs(CreditsBalanceButton, { onClick: onClickCredits, "aria-label": `${formatBalance(creditsBalance.balance)} credits`, children: [_jsx(CreditsIcon, { sx: { width: 20, height: 20 } }), formatBalance(creditsBalance.balance), _jsxs(CreditsTooltip, { className: "credits-tooltip", children: [i18n.creditsExpiringIn.replace('{days}', String(daysUntil(creditsBalance.expiresAt))), _jsx("br", {}), i18n.creditsValueNote] })] })), notificationSlot && (_jsx("div", { onClick: () => {
|
|
109
|
+
setUserCardOpen(false);
|
|
110
|
+
setDesktopDropdown(null);
|
|
111
|
+
}, children: notificationSlot })), _jsx(UserCardPanel, { isLoadingProfile: isLoadingProfile, address: address, avatar: avatar, userCardOpen: userCardOpen, onToggleUserCard: toggleUserCard, onClickSignOut: onClickSignOut, selectedChain: selectedChain, chains: chains, onSelectChain: onSelectChain, manaBalances: manaBalances, onClickBalance: onClickBalance, i18n: i18n })] })), !isSignedIn && (_jsx(SignInButton, { onClick: onClickSignIn, disabled: isSigningIn, children: isSigningIn ? i18n.signingIn : i18n.signIn })), _jsx(HamburgerButton, { onClick: toggleMobileMenu, "aria-label": mobileMenuOpen ? 'Close menu' : 'Open menu', "aria-expanded": mobileMenuOpen, children: mobileMenuOpen ? _jsx(CloseIcon, {}) : _jsx(HamburgerIcon, {}) })] })] }), _jsx(MobileMenu, { open: mobileMenuOpen, onClose: closeMobileMenu, i18n: i18n })] }));
|
|
38
112
|
});
|
|
113
|
+
Navbar.displayName = 'Navbar';
|
|
39
114
|
export { Navbar };
|
|
40
115
|
//# sourceMappingURL=Navbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navbar.js","sourceRoot":"","sources":["../../../src/components/Navbar/Navbar.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Navbar.js","sourceRoot":"","sources":["../../../src/components/Navbar/Navbar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEjD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACvE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAGhI,wDAAwD;AACxD,SAAS,SAAS,CAAC,SAAiB;IAClC,MAAM,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACnC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG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
|
|
1
|
+
import { Navbar } from './Navbar';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
declare const meta: Meta<
|
|
4
|
-
type Story = StoryObj<NavbarProps>;
|
|
5
|
-
declare const Simple: Story;
|
|
6
|
-
declare const WithScroll: Story;
|
|
7
|
-
declare const WithChainSelector: Story;
|
|
8
|
-
declare const WithRedirectOnly: Story;
|
|
3
|
+
declare const meta: Meta<typeof Navbar>;
|
|
9
4
|
export default meta;
|
|
10
|
-
|
|
5
|
+
type Story = StoryObj<typeof Navbar>;
|
|
6
|
+
declare const SignedOut: Story;
|
|
7
|
+
declare const SignedIn: Story;
|
|
8
|
+
declare const WithNotifications: Story;
|
|
9
|
+
declare const MarketplaceExample: Story;
|
|
10
|
+
declare const CustomI18n: Story;
|
|
11
|
+
export { SignedOut, SignedIn, WithNotifications, MarketplaceExample, CustomI18n };
|