create-near-app 6.0.0-beta.2 → 6.0.0-beta.3
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/app.js +6 -11
- package/dist/make.js +44 -81
- package/dist/messages.js +31 -23
- package/dist/package-json.js +16 -16
- package/dist/tracking.js +1 -1
- package/dist/types.js +5 -4
- package/dist/user-input.js +81 -89
- package/package.json +1 -1
- package/templates/contracts/{rust → rs}/Cargo.toml +0 -3
- package/templates/contracts/{rust → rs}/README.md +14 -5
- package/templates/contracts/rs/build.sh +3 -0
- package/templates/contracts/rs/deploy.sh +2 -0
- package/templates/contracts/{rust → rs}/src/lib.rs +4 -6
- package/templates/contracts/rs/test-rs.sh +9 -0
- package/templates/contracts/rs/test-ts.sh +10 -0
- package/templates/contracts/{js → ts}/README.md +1 -0
- package/templates/contracts/ts/package.json +20 -0
- package/templates/frontend/next/.eslintrc.json +3 -0
- package/templates/frontend/next/README.md +36 -0
- package/templates/frontend/next/jsconfig.json +7 -0
- package/templates/frontend/next/next.config.js +6 -0
- package/templates/frontend/next/package.json +40 -0
- package/templates/frontend/next/public/near-logo.svg +43 -0
- package/templates/frontend/next/public/near.svg +1 -0
- package/templates/frontend/next/src/app/app.module.css +228 -0
- package/templates/frontend/next/src/app/globals.css +95 -0
- package/templates/frontend/next/src/app/hello-components/page.js +44 -0
- package/templates/frontend/next/src/app/hello-near/page.js +64 -0
- package/templates/frontend/next/src/app/layout.js +22 -0
- package/templates/frontend/next/src/app/page.js +37 -0
- package/templates/frontend/next/src/components/cards.js +46 -0
- package/templates/frontend/next/src/components/navigation.js +36 -0
- package/templates/frontend/next/src/components/vm-component.js +26 -0
- package/templates/frontend/next/src/config.js +21 -0
- package/templates/frontend/next/src/wallets/wallet-selector.js +128 -0
- package/templates/frontend/{gateway/src/data/web3.ts → next/src/wallets/web3-wallet.ts} +4 -7
- package/templates/frontend/vanilla/.babelrc +7 -0
- package/templates/frontend/vanilla/package.json +27 -13
- package/templates/frontend/vanilla/{assets → src/assets}/global.css +25 -56
- package/templates/frontend/vanilla/src/components.html +61 -0
- package/templates/frontend/vanilla/src/components.js +63 -0
- package/templates/frontend/vanilla/src/hello-near.html +80 -0
- package/templates/frontend/vanilla/src/hello.js +61 -0
- package/templates/frontend/vanilla/src/index.html +65 -0
- package/templates/frontend/vanilla/{near-wallet.js → src/near-wallet.js} +20 -18
- package/templates/frontend/vanilla/webpack.config.js +79 -0
- package/templates/{integration-tests/rust-tests → sandbox-tests/sandbox-rs}/Cargo.toml +5 -5
- package/templates/{integration-tests/js-tests → sandbox-tests/sandbox-ts}/package.json +6 -6
- package/templates/contracts/js/build.sh +0 -5
- package/templates/contracts/js/deploy.sh +0 -18
- package/templates/contracts/js/package.json +0 -19
- package/templates/contracts/rust/build.sh +0 -6
- package/templates/contracts/rust/deploy.sh +0 -18
- package/templates/frontend/gateway/.env +0 -1
- package/templates/frontend/gateway/.nvmrc +0 -1
- package/templates/frontend/gateway/.prettierrc +0 -6
- package/templates/frontend/gateway/next.config.js +0 -15
- package/templates/frontend/gateway/package.json +0 -74
- package/templates/frontend/gateway/public/apple-touch-icon.png +0 -0
- package/templates/frontend/gateway/public/bos-meta.png +0 -0
- package/templates/frontend/gateway/public/favicon.png +0 -0
- package/templates/frontend/gateway/public/fonts/FKGrotesk.woff2 +0 -0
- package/templates/frontend/gateway/public/fonts/Mona-Sans.woff2 +0 -0
- package/templates/frontend/gateway/public/logo192.png +0 -0
- package/templates/frontend/gateway/public/robots.txt +0 -3
- package/templates/frontend/gateway/public/site.webmanifest +0 -8
- package/templates/frontend/gateway/src/assets/images/near-icon.svg +0 -3
- package/templates/frontend/gateway/src/components/MetaTags.tsx +0 -22
- package/templates/frontend/gateway/src/components/component/ComponentWrapperPage.tsx +0 -27
- package/templates/frontend/gateway/src/components/layouts/DefaultLayout.tsx +0 -16
- package/templates/frontend/gateway/src/components/layouts/SimpleLayout.tsx +0 -9
- package/templates/frontend/gateway/src/components/lib/Button/Button.tsx +0 -379
- package/templates/frontend/gateway/src/components/lib/Button/index.tsx +0 -1
- package/templates/frontend/gateway/src/components/lib/Spinner/Spinner.tsx +0 -33
- package/templates/frontend/gateway/src/components/lib/Spinner/index.ts +0 -1
- package/templates/frontend/gateway/src/components/lib/Text/Text.tsx +0 -14
- package/templates/frontend/gateway/src/components/lib/Text/index.tsx +0 -1
- package/templates/frontend/gateway/src/components/lib/Toast/README.md +0 -83
- package/templates/frontend/gateway/src/components/lib/Toast/Toast.tsx +0 -25
- package/templates/frontend/gateway/src/components/lib/Toast/Toaster.tsx +0 -48
- package/templates/frontend/gateway/src/components/lib/Toast/api.ts +0 -6
- package/templates/frontend/gateway/src/components/lib/Toast/index.ts +0 -3
- package/templates/frontend/gateway/src/components/lib/Toast/store.ts +0 -83
- package/templates/frontend/gateway/src/components/lib/Toast/styles.ts +0 -126
- package/templates/frontend/gateway/src/components/navigation/Navigation.tsx +0 -23
- package/templates/frontend/gateway/src/components/navigation/UserDropdownMenu.tsx +0 -209
- package/templates/frontend/gateway/src/components/navigation/desktop/DesktopNavigation.tsx +0 -109
- package/templates/frontend/gateway/src/components/navigation/desktop/MainNavigationMenu.tsx +0 -170
- package/templates/frontend/gateway/src/components/navigation/icons/close.svg +0 -22
- package/templates/frontend/gateway/src/components/navigation/icons/near-icon.svg +0 -3
- package/templates/frontend/gateway/src/components/navigation/icons/near-logo.svg +0 -14
- package/templates/frontend/gateway/src/components/navigation/icons/return.svg +0 -29
- package/templates/frontend/gateway/src/components/navigation/icons/search.svg +0 -3
- package/templates/frontend/gateway/src/components/navigation/mobile/AccordionMenu.tsx +0 -141
- package/templates/frontend/gateway/src/components/navigation/mobile/Menu.tsx +0 -86
- package/templates/frontend/gateway/src/components/navigation/mobile/MobileNavigation.tsx +0 -131
- package/templates/frontend/gateway/src/components/navigation/navigation-categories.ts +0 -75
- package/templates/frontend/gateway/src/components/vm/VmCommitButton.tsx +0 -20
- package/templates/frontend/gateway/src/components/vm/VmComponent.tsx +0 -29
- package/templates/frontend/gateway/src/components/vm/VmInitializer.tsx +0 -124
- package/templates/frontend/gateway/src/data/components.ts +0 -50
- package/templates/frontend/gateway/src/hooks/useBosComponents.ts +0 -14
- package/templates/frontend/gateway/src/hooks/useBosLoaderInitializer.ts +0 -60
- package/templates/frontend/gateway/src/hooks/useFlags.ts +0 -40
- package/templates/frontend/gateway/src/hooks/useLayout.tsx +0 -12
- package/templates/frontend/gateway/src/index.d.ts +0 -9
- package/templates/frontend/gateway/src/pages/_app.tsx +0 -47
- package/templates/frontend/gateway/src/pages/_document.tsx +0 -27
- package/templates/frontend/gateway/src/pages/dig.tsx +0 -25
- package/templates/frontend/gateway/src/pages/flags.tsx +0 -83
- package/templates/frontend/gateway/src/pages/hello-api.tsx +0 -105
- package/templates/frontend/gateway/src/pages/hello-component.tsx +0 -23
- package/templates/frontend/gateway/src/pages/hello-ethereum.tsx +0 -23
- package/templates/frontend/gateway/src/pages/hello-social.tsx +0 -31
- package/templates/frontend/gateway/src/pages/index.tsx +0 -51
- package/templates/frontend/gateway/src/pages/nui.tsx +0 -25
- package/templates/frontend/gateway/src/stores/auth.ts +0 -29
- package/templates/frontend/gateway/src/stores/bos-loader.ts +0 -20
- package/templates/frontend/gateway/src/stores/current-component.ts +0 -11
- package/templates/frontend/gateway/src/stores/vm.ts +0 -24
- package/templates/frontend/gateway/src/styles/globals.css +0 -68
- package/templates/frontend/gateway/src/styles/theme.css +0 -129
- package/templates/frontend/gateway/src/utils/config.ts +0 -49
- package/templates/frontend/gateway/src/utils/form-validation.ts +0 -18
- package/templates/frontend/gateway/src/utils/keypom-options.ts +0 -59
- package/templates/frontend/gateway/src/utils/route/privateRoute.tsx +0 -20
- package/templates/frontend/gateway/src/utils/route/signedOutRoute.tsx +0 -21
- package/templates/frontend/gateway/src/utils/types.ts +0 -33
- package/templates/frontend/gateway/tsconfig.json +0 -24
- package/templates/frontend/vanilla/.env +0 -1
- package/templates/frontend/vanilla/index.html +0 -97
- package/templates/frontend/vanilla/index.js +0 -70
- package/templates/shared/template.gitignore +0 -31
- /package/templates/contracts/{rust → rs}/.cargo/config +0 -0
- /package/templates/contracts/{rust → rs}/rust-toolchain.toml +0 -0
- /package/templates/contracts/{js → ts}/package-lock.json +0 -0
- /package/templates/contracts/{js → ts}/src/contract.ts +0 -0
- /package/templates/contracts/{js → ts}/tsconfig.json +0 -0
- /package/templates/frontend/{gateway → next}/public/next.svg +0 -0
- /package/templates/frontend/{gateway → next}/public/vercel.svg +0 -0
- /package/templates/frontend/{gateway/public → next/src/app}/favicon.ico +0 -0
- /package/templates/{shared → frontend/vanilla}/.gitpod.yml +0 -0
- /package/templates/{shared → frontend/vanilla}/README.md +0 -0
- /package/templates/frontend/vanilla/{assets → src/assets}/favicon.ico +0 -0
- /package/templates/frontend/vanilla/{assets → src/assets}/logo-black.svg +0 -0
- /package/templates/frontend/vanilla/{assets → src/assets}/logo-white.svg +0 -0
- /package/templates/{integration-tests/rust-tests → sandbox-tests/sandbox-rs}/src/tests.rs +0 -0
- /package/templates/{integration-tests/js-tests → sandbox-tests/sandbox-ts}/ava.config.cjs +0 -0
- /package/templates/{integration-tests/js-tests → sandbox-tests/sandbox-ts}/package-lock.json +0 -0
- /package/templates/{integration-tests/js-tests → sandbox-tests/sandbox-ts}/src/main.ava.ts +0 -0
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import Image from 'next/image';
|
|
2
|
-
import Link from 'next/link';
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
|
|
6
|
-
import { Button } from '@/components/lib/Button';
|
|
7
|
-
import { useAuthStore } from '@/stores/auth';
|
|
8
|
-
|
|
9
|
-
import NearLogo from '../icons/near-icon.svg';
|
|
10
|
-
import { UserDropdownMenu } from '../UserDropdownMenu';
|
|
11
|
-
import { MainNavigationMenu } from './MainNavigationMenu';
|
|
12
|
-
|
|
13
|
-
const Wrapper = styled.div<{
|
|
14
|
-
scrolled?: boolean;
|
|
15
|
-
}>`
|
|
16
|
-
--nav-height: 75px;
|
|
17
|
-
z-index: 1000;
|
|
18
|
-
position: sticky;
|
|
19
|
-
top: 0;
|
|
20
|
-
left: 0;
|
|
21
|
-
right: 0;
|
|
22
|
-
background-color: white;
|
|
23
|
-
height: var(--nav-height);
|
|
24
|
-
box-shadow: 0 1px 0 var(--sand6);
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
const Container = styled.div`
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
height: 100%;
|
|
31
|
-
margin: 0 auto;
|
|
32
|
-
`;
|
|
33
|
-
|
|
34
|
-
const Logo = styled.a`
|
|
35
|
-
text-decoration: none;
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
outline: none;
|
|
38
|
-
transition: all 200ms;
|
|
39
|
-
border-radius: 4px;
|
|
40
|
-
|
|
41
|
-
&:focus {
|
|
42
|
-
outline: 2px solid var(--violet4);
|
|
43
|
-
outline-offset: 0.3rem;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
img {
|
|
47
|
-
width: 110px;
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
const Actions = styled.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
margin-left: auto;
|
|
55
|
-
position: relative;
|
|
56
|
-
z-index: 10;
|
|
57
|
-
gap: 0.5rem;
|
|
58
|
-
`;
|
|
59
|
-
|
|
60
|
-
export const DesktopNavigation = () => {
|
|
61
|
-
const [scrolled, setScrolled] = useState(false);
|
|
62
|
-
const signedIn = useAuthStore((store) => store.signedIn);
|
|
63
|
-
const requestSignInWithWallet = useAuthStore((store) => store.requestSignInWithWallet);
|
|
64
|
-
|
|
65
|
-
useEffect(() => {
|
|
66
|
-
const handleScroll = () => {
|
|
67
|
-
if (window.scrollY > 0) {
|
|
68
|
-
setScrolled(true);
|
|
69
|
-
} else {
|
|
70
|
-
setScrolled(false);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
window.addEventListener('scroll', handleScroll);
|
|
75
|
-
|
|
76
|
-
return () => {
|
|
77
|
-
window.removeEventListener('scroll', handleScroll);
|
|
78
|
-
};
|
|
79
|
-
}, []);
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<>
|
|
83
|
-
|
|
84
|
-
<Wrapper scrolled={scrolled}>
|
|
85
|
-
<Container className="container-xl">
|
|
86
|
-
<Link href="/" passHref legacyBehavior>
|
|
87
|
-
<Logo>
|
|
88
|
-
<Image priority src={NearLogo} alt="NEAR" />
|
|
89
|
-
</Logo>
|
|
90
|
-
</Link>
|
|
91
|
-
|
|
92
|
-
<MainNavigationMenu />
|
|
93
|
-
|
|
94
|
-
<Actions>
|
|
95
|
-
{signedIn ? (
|
|
96
|
-
<>
|
|
97
|
-
<UserDropdownMenu />
|
|
98
|
-
</>
|
|
99
|
-
) : (
|
|
100
|
-
<>
|
|
101
|
-
<Button label="Sign In" variant="secondary" onClick={requestSignInWithWallet} />
|
|
102
|
-
</>
|
|
103
|
-
)}
|
|
104
|
-
</Actions>
|
|
105
|
-
</Container>
|
|
106
|
-
</Wrapper>
|
|
107
|
-
</>
|
|
108
|
-
);
|
|
109
|
-
};
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import * as NavigationMenu from '@radix-ui/react-navigation-menu';
|
|
2
|
-
import Link from 'next/link';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
|
|
5
|
-
import { navigationCategories } from '../navigation-categories';
|
|
6
|
-
|
|
7
|
-
const Wrapper = styled.div`
|
|
8
|
-
position: relative;
|
|
9
|
-
display: flex;
|
|
10
|
-
z-index: 1;
|
|
11
|
-
flex-grow: 1;
|
|
12
|
-
padding: 0 1rem;
|
|
13
|
-
height: var(--nav-height);
|
|
14
|
-
|
|
15
|
-
@media (min-width: 1145px) {
|
|
16
|
-
// This center aligns the nav items in the center of the viewport on larger screens
|
|
17
|
-
position: absolute;
|
|
18
|
-
left: 0;
|
|
19
|
-
right: 0;
|
|
20
|
-
margin: 0 auto;
|
|
21
|
-
max-width: min-content;
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
const NavRoot = styled(NavigationMenu.Root)`
|
|
26
|
-
height: 100%;
|
|
27
|
-
|
|
28
|
-
> div {
|
|
29
|
-
height: 100%;
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
const NavList = styled(NavigationMenu.List)`
|
|
34
|
-
display: flex;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
list-style: none;
|
|
37
|
-
margin: 0;
|
|
38
|
-
padding: 0;
|
|
39
|
-
height: 100%;
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
const NavItem = styled(NavigationMenu.Item)`
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
position: relative;
|
|
46
|
-
height: 100%;
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
const NavTrigger = styled(NavigationMenu.Trigger)`
|
|
50
|
-
all: unset;
|
|
51
|
-
font: var(--text-s);
|
|
52
|
-
color: var(--sand12);
|
|
53
|
-
font-weight: 600;
|
|
54
|
-
padding: 0 1rem;
|
|
55
|
-
height: 40px;
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
border-radius: 100px;
|
|
59
|
-
transition: all 200ms;
|
|
60
|
-
|
|
61
|
-
&:hover,
|
|
62
|
-
&:focus,
|
|
63
|
-
&[data-state='open'] {
|
|
64
|
-
background: var(--sand4);
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
const NavContent = styled(NavigationMenu.Content)`
|
|
69
|
-
position: absolute;
|
|
70
|
-
top: calc(100% - 1rem + 1px);
|
|
71
|
-
left: 0;
|
|
72
|
-
padding-top: 1rem;
|
|
73
|
-
transform-origin: center top;
|
|
74
|
-
animation: fadeIn 200ms;
|
|
75
|
-
|
|
76
|
-
@keyframes fadeIn {
|
|
77
|
-
from {
|
|
78
|
-
opacity: 0;
|
|
79
|
-
transform: scale(1, 0.5);
|
|
80
|
-
}
|
|
81
|
-
to {
|
|
82
|
-
opacity: 1;
|
|
83
|
-
transform: scale(1, 1);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
`;
|
|
87
|
-
|
|
88
|
-
const Container = styled.div`
|
|
89
|
-
display: flex;
|
|
90
|
-
padding: 12px 0;
|
|
91
|
-
transform-origin: center top;
|
|
92
|
-
background: var(--white);
|
|
93
|
-
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.06);
|
|
94
|
-
border-bottom-left-radius: 2px;
|
|
95
|
-
border-bottom-right-radius: 2px;
|
|
96
|
-
max-height: calc(100dvh - var(--nav-height));
|
|
97
|
-
overflow: auto;
|
|
98
|
-
scroll-behavior: smooth;
|
|
99
|
-
overscroll-behavior: contain;
|
|
100
|
-
`;
|
|
101
|
-
|
|
102
|
-
const NavLink = styled(NavigationMenu.Link)`
|
|
103
|
-
display: block;
|
|
104
|
-
padding: 7px 0;
|
|
105
|
-
font: var(--text-s);
|
|
106
|
-
color: var(--sand12);
|
|
107
|
-
transition: color 200ms;
|
|
108
|
-
white-space: nowrap;
|
|
109
|
-
outline: none;
|
|
110
|
-
|
|
111
|
-
&:hover,
|
|
112
|
-
&:focus {
|
|
113
|
-
color: var(--sand12);
|
|
114
|
-
text-decoration: underline;
|
|
115
|
-
text-underline-offset: 2px;
|
|
116
|
-
}
|
|
117
|
-
`;
|
|
118
|
-
|
|
119
|
-
const Section = styled.div`
|
|
120
|
-
display: flex;
|
|
121
|
-
flex-direction: column;
|
|
122
|
-
padding: 0 24px 0;
|
|
123
|
-
min-width: 200px;
|
|
124
|
-
`;
|
|
125
|
-
|
|
126
|
-
const SectionTitle = styled.p`
|
|
127
|
-
font: var(--text-xs);
|
|
128
|
-
color: var(--sand10);
|
|
129
|
-
font-weight: 450;
|
|
130
|
-
padding: 12px 0;
|
|
131
|
-
letter-spacing: 0.24px;
|
|
132
|
-
margin: 0;
|
|
133
|
-
`;
|
|
134
|
-
|
|
135
|
-
export const MainNavigationMenu = () => {
|
|
136
|
-
|
|
137
|
-
return (
|
|
138
|
-
<Wrapper>
|
|
139
|
-
<NavRoot delayDuration={0}>
|
|
140
|
-
<NavList>
|
|
141
|
-
{navigationCategories
|
|
142
|
-
.filter((category) => category.visible === 'all' || category.visible === 'desktop')
|
|
143
|
-
.map((category) => (
|
|
144
|
-
<NavItem key={category.title}>
|
|
145
|
-
<NavTrigger >{category.title}</NavTrigger>
|
|
146
|
-
|
|
147
|
-
<NavContent>
|
|
148
|
-
<Container>
|
|
149
|
-
{category.sections.map((section) => (
|
|
150
|
-
<Section key={section.title}>
|
|
151
|
-
{section.title && <SectionTitle>{section.title}</SectionTitle>}
|
|
152
|
-
|
|
153
|
-
{section.links.map((link) => (
|
|
154
|
-
<NavLink key={link.title} asChild>
|
|
155
|
-
<Link href={link.url} target={link.url.indexOf('http') === 0 ? '_blank' : undefined}>
|
|
156
|
-
{link.title}
|
|
157
|
-
</Link>
|
|
158
|
-
</NavLink>
|
|
159
|
-
))}
|
|
160
|
-
</Section>
|
|
161
|
-
))}
|
|
162
|
-
</Container>
|
|
163
|
-
</NavContent>
|
|
164
|
-
</NavItem>
|
|
165
|
-
))}
|
|
166
|
-
</NavList>
|
|
167
|
-
</NavRoot>
|
|
168
|
-
</Wrapper>
|
|
169
|
-
);
|
|
170
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
width="24"
|
|
3
|
-
height="24"
|
|
4
|
-
viewBox="0 0 24 24"
|
|
5
|
-
fill="none"
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
>
|
|
8
|
-
<path
|
|
9
|
-
d="M17.25 6.75L6.75 17.25"
|
|
10
|
-
stroke="#9BA1A6"
|
|
11
|
-
stroke-width="1.5"
|
|
12
|
-
stroke-linecap="round"
|
|
13
|
-
stroke-linejoin="round"
|
|
14
|
-
/>
|
|
15
|
-
<path
|
|
16
|
-
d="M6.75 6.75L17.25 17.25"
|
|
17
|
-
stroke="#9BA1A6"
|
|
18
|
-
stroke-width="1.5"
|
|
19
|
-
stroke-linecap="round"
|
|
20
|
-
stroke-linejoin="round"
|
|
21
|
-
/>
|
|
22
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M16.5528 1.01528L12.3722 7.22222C12.3127 7.31161 12.2875 7.41954 12.3014 7.52604C12.3153 7.63254 12.3673 7.73042 12.4477 7.80156C12.5282 7.87271 12.6317 7.91231 12.7391 7.91305C12.8465 7.91378 12.9505 7.87559 13.0319 7.80556L17.1472 4.23611C17.1713 4.21453 17.2012 4.20045 17.2332 4.19557C17.2652 4.19068 17.2979 4.19522 17.3274 4.20862C17.3568 4.22203 17.3817 4.24371 17.3991 4.27104C17.4164 4.29836 17.4254 4.33014 17.425 4.3625V15.5375C17.425 15.5717 17.4144 15.6051 17.3948 15.6331C17.3752 15.6611 17.3474 15.6824 17.3152 15.6941C17.2831 15.7058 17.2481 15.7073 17.2151 15.6984C17.182 15.6895 17.1525 15.6707 17.1306 15.6444L4.69167 0.754167C4.49159 0.51791 4.24246 0.328063 3.9616 0.197824C3.68073 0.067585 3.37487 7.92977e-05 3.06528 7.36094e-08H2.63056C2.0655 7.36094e-08 1.52358 0.224469 1.12403 0.624025C0.724468 1.02358 0.5 1.5655 0.5 2.13056V17.8694C0.5 18.4345 0.724468 18.9764 1.12403 19.376C1.52358 19.7755 2.0655 20 2.63056 20C2.99488 20.0001 3.35316 19.9068 3.67119 19.7291C3.98922 19.5513 4.2564 19.2951 4.44722 18.9847L8.62778 12.7778C8.68732 12.6884 8.71248 12.5805 8.6986 12.474C8.68472 12.3675 8.63274 12.2696 8.55228 12.1984C8.47182 12.1273 8.36832 12.0877 8.26092 12.087C8.15352 12.0862 8.04948 12.1244 7.96806 12.1944L3.85278 15.7639C3.82866 15.7855 3.79878 15.7996 3.76679 15.8044C3.7348 15.8093 3.70208 15.8048 3.67263 15.7914C3.64317 15.778 3.61826 15.7563 3.60092 15.729C3.58358 15.7016 3.57458 15.6699 3.575 15.6375V4.45972C3.57501 4.42551 3.58555 4.39213 3.60519 4.36412C3.62483 4.3361 3.65261 4.31481 3.68477 4.30313C3.71693 4.29145 3.7519 4.28995 3.78494 4.29883C3.81797 4.30772 3.84748 4.32655 3.86944 4.35278L16.3069 19.2458C16.507 19.4821 16.7562 19.6719 17.037 19.8022C17.3179 19.9324 17.6237 19.9999 17.9333 20H18.3681C18.648 20.0002 18.9252 19.9452 19.1838 19.8382C19.4425 19.7312 19.6775 19.5743 19.8755 19.3765C20.0735 19.1786 20.2305 18.9437 20.3377 18.6851C20.4448 18.4265 20.5 18.1494 20.5 17.8694V2.13056C20.5 1.5655 20.2755 1.02358 19.876 0.624025C19.4764 0.224469 18.9345 7.36094e-08 18.3694 7.36094e-08C18.0051 -9.56524e-05 17.6468 0.093176 17.3288 0.270914C17.0108 0.448651 16.7436 0.704924 16.5528 1.01528Z" fill="#11181C"/>
|
|
3
|
-
</svg>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg width="110" height="28" viewBox="0 0 110 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g clip-path="url(#clip0_1_1899)">
|
|
3
|
-
<path d="M45.5211 4.46114C43.4964 4.46114 42.0241 4.93816 40.7733 6.03856L38.5644 7.94588C38.3803 8.09301 38.0121 8.20297 37.7549 7.98228C37.4969 7.76235 37.4604 7.46886 37.6811 7.17537L38.8589 5.41442C39.043 5.15733 38.8962 4.82743 38.5644 4.82743H35.7302C35.3992 4.82743 35.1413 5.08452 35.1413 5.41442V22.5841C35.1413 22.914 35.3992 23.1711 35.7302 23.1711H38.6748C39.0058 23.1711 39.2637 22.914 39.2637 22.5841V12.8988C39.2637 8.46006 42.9813 7.76311 44.3798 7.76311C47.3609 7.76311 48.4284 9.89112 48.4284 11.5049V22.5841C48.4284 22.914 48.6863 23.1711 49.0173 23.1711H51.9618C52.2928 23.1711 52.5508 22.914 52.5508 22.5841V11.1379C52.5508 7.029 49.8634 4.46114 45.5203 4.46114H45.5211Z" fill="black"/>
|
|
4
|
-
<path d="M64.5489 4.38757C58.8439 4.38757 55.2001 7.87307 55.2001 12.6053V15.2104C55.2001 20.1997 58.8439 23.6117 64.5489 23.6117C69.5912 23.6117 73.1246 21.0067 73.4929 17.4848C73.5302 17.1177 73.2723 16.8614 72.904 16.8614H70.0332C69.7753 16.8614 69.5546 17.0085 69.4808 17.2648C69.1126 18.4388 67.3831 20.1997 64.5489 20.1997C61.7146 20.1997 59.0645 18.1453 59.1011 15.2104L59.1383 11.9456C59.1749 9.48766 61.7519 7.80027 64.5489 7.80027C67.0887 7.80027 69.5546 9.23133 69.8118 11.5793C69.8331 11.8508 69.6459 12.0957 69.3774 12.1473L61.125 13.7437C60.794 13.8172 60.5361 14.1107 60.5361 14.477V14.5134C60.5361 14.8433 60.867 15.1368 61.3456 15.1368H73.1977C73.5233 15.1368 73.7866 14.8737 73.7866 14.5498V12.2391C73.7866 7.87383 69.9952 4.38833 64.5481 4.38833L64.5489 4.38757Z" fill="black"/>
|
|
5
|
-
<path d="M85.0863 4.38757C80.4853 4.38757 76.5105 7.0654 76.5105 10.5873C76.5105 10.8808 76.7685 11.1007 77.0994 11.1007H80.0805C80.375 11.1007 80.5956 10.8808 80.6329 10.5873C80.9274 8.97348 82.8782 7.79951 84.976 7.79951C87.4785 7.79951 89.1722 9.34053 89.1722 11.982V15.174C89.1722 18.4388 86.7427 20.0898 83.7243 20.0898C81.3687 20.0898 80.0067 19.2093 80.0067 17.7782C80.0067 16.5307 80.6694 15.4667 83.3926 14.8433L87.3309 13.7793C87.7356 13.6693 87.8832 13.3387 87.8094 12.9724C87.7729 12.6789 87.4419 12.5318 87.1467 12.5318H83.0616C79.6019 12.5318 76.105 14.7326 76.105 17.961V18.4744C76.105 21.7764 79.2337 23.5002 82.8037 23.5002C85.0855 23.5002 87.0364 22.6197 88.2507 21.5929L90.0548 20.0519C90.3492 19.7948 90.6437 19.7948 90.9008 20.0519C91.1215 20.2718 91.0477 20.6024 90.8636 20.8588L89.7595 22.5833C89.5754 22.8404 89.7223 23.1703 90.054 23.1703H92.7041C93.0351 23.1703 93.293 22.9132 93.293 22.5833V11.467C93.293 7.21177 90.2381 4.38681 85.0848 4.38681L85.0863 4.38757Z" fill="black"/>
|
|
6
|
-
<path d="M109.194 4.82819H105.071C103.636 4.82819 102.237 5.70866 101.243 6.55274L99.6243 7.94663C99.4401 8.09376 99.1084 8.20372 98.8877 8.0202C98.6298 7.83667 98.5195 7.46962 98.7409 7.17612L99.9187 5.41517C100.103 5.15808 99.956 4.82819 99.6243 4.82819H96.8638C96.5328 4.82819 96.2749 5.08528 96.2749 5.41517V22.5848C96.2749 22.9147 96.5328 23.1718 96.8638 23.1718H99.8822C100.213 23.1718 100.471 22.9147 100.471 22.5848V13.7801C100.471 10.0011 102.017 8.31369 105.367 8.31369H109.194C109.525 8.31369 109.783 8.0566 109.783 7.7267V5.41517C109.783 5.08528 109.525 4.82819 109.194 4.82819H109.194Z" fill="black"/>
|
|
7
|
-
<path d="M24.079 0.690475C23.0899 0.690475 22.1715 1.20162 21.6534 2.0419L16.0709 10.3029C15.889 10.5752 15.9628 10.9422 16.236 11.1235C16.4574 11.2706 16.7503 11.2524 16.952 11.0795L22.447 6.32901C22.5383 6.24711 22.679 6.25545 22.7612 6.34645C22.7985 6.38816 22.8183 6.44201 22.8183 6.49737V21.3707C22.8183 21.4935 22.7186 21.5921 22.5953 21.5921C22.5291 21.5921 22.4668 21.5633 22.4249 21.5125L5.81436 1.69457C5.27339 1.05829 4.47904 0.691234 3.64284 0.690475H3.0623C1.4911 0.690475 0.217407 1.96 0.217407 3.52605V24.4739C0.217407 26.04 1.4911 27.3095 3.0623 27.3095C4.05143 27.3095 4.9698 26.7984 5.48795 25.9581L11.0705 17.6971C11.2523 17.4248 11.1785 17.0578 10.9053 16.8765C10.6839 16.7294 10.391 16.7476 10.1894 16.9205L4.69436 21.671C4.60306 21.7529 4.4623 21.7445 4.38013 21.6535C4.34284 21.6118 4.32306 21.558 4.32382 21.5026V6.62554C4.32382 6.50268 4.42349 6.40409 4.54675 6.40409C4.61219 6.40409 4.67534 6.43291 4.71719 6.48372L21.3255 26.3054C21.8664 26.9417 22.6608 27.3088 23.497 27.3095H24.0775C25.6487 27.3103 26.9232 26.0415 26.9247 24.4755V3.52605C26.9247 1.96 25.651 0.690475 24.0798 0.690475H24.079Z" fill="black"/>
|
|
8
|
-
</g>
|
|
9
|
-
<defs>
|
|
10
|
-
<clip-path id="clip0_1_1899">
|
|
11
|
-
<rect width="110" height="27" fill="white" transform="translate(0 0.5)"/>
|
|
12
|
-
</clip-path>
|
|
13
|
-
</defs>
|
|
14
|
-
</svg>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
width="24"
|
|
3
|
-
height="24"
|
|
4
|
-
viewBox="0 0 24 24"
|
|
5
|
-
fill="none"
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
>
|
|
8
|
-
<g clip-path="url(#clip0_2_7)">
|
|
9
|
-
<path
|
|
10
|
-
d="M9 12L4.5 16.5L9 21"
|
|
11
|
-
stroke="#9BA1A6"
|
|
12
|
-
stroke-width="1.5"
|
|
13
|
-
stroke-linecap="round"
|
|
14
|
-
stroke-linejoin="round"
|
|
15
|
-
/>
|
|
16
|
-
<path
|
|
17
|
-
d="M18 3V16.5H4.5"
|
|
18
|
-
stroke="#9BA1A6"
|
|
19
|
-
stroke-width="1.5"
|
|
20
|
-
stroke-linecap="round"
|
|
21
|
-
stroke-linejoin="round"
|
|
22
|
-
/>
|
|
23
|
-
</g>
|
|
24
|
-
<defs>
|
|
25
|
-
<clip-path id="clip0_2_7">
|
|
26
|
-
<rect width="24" height="24" fill="white" />
|
|
27
|
-
</clip-path>
|
|
28
|
-
</defs>
|
|
29
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M19.25 19.25L15.5 15.5M4.75 11C4.75 7.54822 7.54822 4.75 11 4.75C14.4518 4.75 17.25 7.54822 17.25 11C17.25 14.4518 14.4518 17.25 11 17.25C7.54822 17.25 4.75 14.4518 4.75 11Z" stroke="#9BA1A6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
</svg>
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import * as Accordion from '@radix-ui/react-accordion';
|
|
2
|
-
import Link from 'next/link';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
|
|
5
|
-
import { navigationCategories } from '../navigation-categories';
|
|
6
|
-
|
|
7
|
-
type Props = {
|
|
8
|
-
onCloseMenu: () => void;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const Wrapper = styled.div`
|
|
12
|
-
margin: 0 -24px;
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
const AccordionRoot = styled(Accordion.Root)``;
|
|
16
|
-
|
|
17
|
-
const AccordionItem = styled(Accordion.Item)``;
|
|
18
|
-
|
|
19
|
-
const AccordionHeader = styled(Accordion.Header)`
|
|
20
|
-
display: block;
|
|
21
|
-
margin: 0;
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
const AccordionTrigger = styled(Accordion.Trigger)`
|
|
25
|
-
all: unset;
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
background: var(--white);
|
|
28
|
-
font: var(--text-base);
|
|
29
|
-
font-weight: 600;
|
|
30
|
-
color: var(--sand12);
|
|
31
|
-
padding: 0 24px;
|
|
32
|
-
height: 48px;
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: space-between;
|
|
36
|
-
width: 100%;
|
|
37
|
-
|
|
38
|
-
i {
|
|
39
|
-
transition: transform 200ms;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&[data-state='open'] {
|
|
43
|
-
i {
|
|
44
|
-
transform: rotate(-180deg);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
const AccordionContent = styled(Accordion.Content)`
|
|
50
|
-
background: var(--sand3);
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
|
|
53
|
-
&[data-state='open'] {
|
|
54
|
-
animation: slideDown 200ms;
|
|
55
|
-
}
|
|
56
|
-
&[data-state='closed'] {
|
|
57
|
-
animation: slideUp 200ms;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@keyframes slideDown {
|
|
61
|
-
from {
|
|
62
|
-
height: 0;
|
|
63
|
-
}
|
|
64
|
-
to {
|
|
65
|
-
height: var(--radix-accordion-content-height);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@keyframes slideUp {
|
|
70
|
-
from {
|
|
71
|
-
height: var(--radix-accordion-content-height);
|
|
72
|
-
}
|
|
73
|
-
to {
|
|
74
|
-
height: 0;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
`;
|
|
78
|
-
|
|
79
|
-
const Section = styled.div`
|
|
80
|
-
padding: 0.5rem 0;
|
|
81
|
-
|
|
82
|
-
a {
|
|
83
|
-
display: block;
|
|
84
|
-
font: var(--text-s);
|
|
85
|
-
color: var(--sand12);
|
|
86
|
-
padding: 0.5rem 24px;
|
|
87
|
-
margin: 0;
|
|
88
|
-
}
|
|
89
|
-
`;
|
|
90
|
-
|
|
91
|
-
const SectionTitle = styled.p`
|
|
92
|
-
font: var(--text-xs);
|
|
93
|
-
color: var(--sand10);
|
|
94
|
-
font-weight: 450;
|
|
95
|
-
padding: 0.5rem 24px 1rem;
|
|
96
|
-
margin: 0 0 0.5rem;
|
|
97
|
-
letter-spacing: 0.24px;
|
|
98
|
-
border-bottom: 1px solid var(--sand6);
|
|
99
|
-
`;
|
|
100
|
-
|
|
101
|
-
export const AccordionMenu = (props: Props) => {
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<Wrapper>
|
|
105
|
-
<AccordionRoot type="multiple">
|
|
106
|
-
{navigationCategories
|
|
107
|
-
.filter((category) => category.visible === 'all' || category.visible === 'mobile')
|
|
108
|
-
.map((category) => (
|
|
109
|
-
<AccordionItem value={category.title} key={category.title}>
|
|
110
|
-
<AccordionHeader>
|
|
111
|
-
<AccordionTrigger>
|
|
112
|
-
{category.title}
|
|
113
|
-
<i className="ph-bold ph-caret-down" />
|
|
114
|
-
</AccordionTrigger>
|
|
115
|
-
</AccordionHeader>
|
|
116
|
-
|
|
117
|
-
<AccordionContent>
|
|
118
|
-
{category.sections.map((section) => (
|
|
119
|
-
<Section key={section.title}>
|
|
120
|
-
{section.title && <SectionTitle>{section.title}</SectionTitle>}
|
|
121
|
-
|
|
122
|
-
{section.links.map((link) => (
|
|
123
|
-
<Link
|
|
124
|
-
href={link.url}
|
|
125
|
-
target={link.url.indexOf('http') === 0 ? '_blank' : undefined}
|
|
126
|
-
key={link.title}
|
|
127
|
-
onClick={props.onCloseMenu}
|
|
128
|
-
>
|
|
129
|
-
{link.title}
|
|
130
|
-
</Link>
|
|
131
|
-
))}
|
|
132
|
-
</Section>
|
|
133
|
-
))}
|
|
134
|
-
|
|
135
|
-
</AccordionContent>
|
|
136
|
-
</AccordionItem>
|
|
137
|
-
))}
|
|
138
|
-
</AccordionRoot>
|
|
139
|
-
</Wrapper>
|
|
140
|
-
);
|
|
141
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { Button } from '@/components/lib/Button';
|
|
5
|
-
import { useAuthStore } from '@/stores/auth';
|
|
6
|
-
|
|
7
|
-
import { AccordionMenu } from './AccordionMenu';
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
isVisible: boolean;
|
|
11
|
-
onCloseMenu: () => void;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const Wrapper = styled.div<{
|
|
15
|
-
visible: boolean;
|
|
16
|
-
}>`
|
|
17
|
-
position: fixed;
|
|
18
|
-
top: var(--nav-height);
|
|
19
|
-
bottom: 0;
|
|
20
|
-
left: 0;
|
|
21
|
-
right: 0;
|
|
22
|
-
z-index: 10000;
|
|
23
|
-
display: ${(p) => (p.visible ? 'block' : 'none')};
|
|
24
|
-
transition: 200ms;
|
|
25
|
-
background: var(--white);
|
|
26
|
-
border-top: 1px solid var(--sand6);
|
|
27
|
-
overflow: auto;
|
|
28
|
-
scroll-behavior: smooth;
|
|
29
|
-
overscroll-behavior: contain;
|
|
30
|
-
transform-origin: center top;
|
|
31
|
-
animation: fadeIn 200ms;
|
|
32
|
-
|
|
33
|
-
@keyframes fadeIn {
|
|
34
|
-
from {
|
|
35
|
-
opacity: 0;
|
|
36
|
-
transform: scale(1, 0);
|
|
37
|
-
}
|
|
38
|
-
to {
|
|
39
|
-
opacity: 1;
|
|
40
|
-
transform: scale(1, 1);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
`;
|
|
44
|
-
|
|
45
|
-
const InnerWrapper = styled.div`
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
gap: 24px;
|
|
49
|
-
padding: 24px;
|
|
50
|
-
min-height: calc(100% + 1px);
|
|
51
|
-
|
|
52
|
-
/*
|
|
53
|
-
The +1px for "min-height" allows "overscroll-behavior: contain;" on the <Wrapper>
|
|
54
|
-
to prevent the <body> from scrolling. Setting "overflow: hidden;" on the <body> would
|
|
55
|
-
break the "position: sticky;" behavior of the navigation - that's why we need to
|
|
56
|
-
use this hack instead.
|
|
57
|
-
|
|
58
|
-
https://stackoverflow.com/a/48954092
|
|
59
|
-
*/
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
|
-
const Actions = styled.div`
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
gap: 1rem;
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
export function Menu(props: Props) {
|
|
69
|
-
const signedIn = useAuthStore((store) => store.signedIn);
|
|
70
|
-
const requestSignInWithWallet = useAuthStore((store) => store.requestSignInWithWallet);
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<Wrapper visible={props.isVisible}>
|
|
74
|
-
<InnerWrapper>
|
|
75
|
-
|
|
76
|
-
<AccordionMenu onCloseMenu={props.onCloseMenu} />
|
|
77
|
-
|
|
78
|
-
{!signedIn && (
|
|
79
|
-
<Actions>
|
|
80
|
-
<Button label="Sign in" variant="secondary" size="large" onClick={requestSignInWithWallet} />
|
|
81
|
-
</Actions>
|
|
82
|
-
)}
|
|
83
|
-
</InnerWrapper>
|
|
84
|
-
</Wrapper>
|
|
85
|
-
);
|
|
86
|
-
}
|