Skip to content

Commit

Permalink
chore: add nextjs app
Browse files Browse the repository at this point in the history
  • Loading branch information
AliKdhim87 committed Nov 19, 2024
1 parent 3a5cc55 commit e435d29
Show file tree
Hide file tree
Showing 19 changed files with 2,373 additions and 1,046 deletions.
3 changes: 3 additions & 0 deletions apps/next/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "next/typescript"]
}
40 changes: 40 additions & 0 deletions apps/next/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
1 change: 1 addition & 0 deletions apps/next/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Next.JS App
7 changes: 7 additions & 0 deletions apps/next/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
/* config options here */
};

export default nextConfig;
33 changes: 33 additions & 0 deletions apps/next/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "@utrecht/next",
"version": "0.0.0",
"private": true,
"license": "EUPL-1.2",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"next": "15.0.3",
"@utrecht/design-tokens": "workspace:*",
"@utrecht/component-library-css": "workspace:*"
},
"devDependencies": {
"typescript": "5",
"@types/node": "20",
"@types/react": "18",
"@types/react-dom": "18",
"eslint": "8",
"eslint-config-next": "15.0.3",
"@utrecht/component-library-react": "workspace:*"
},
"repository": {
"type": "git+ssh",
"url": "git@github.com:nl-design-system/utrecht.git",
"directory": "apps/next"
}
}
1 change: 1 addition & 0 deletions apps/next/public/file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/next/public/globe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/next/public/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/next/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/next/public/window.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/next/src/app/favicon.ico
Binary file not shown.
Binary file added apps/next/src/app/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file added apps/next/src/app/fonts/GeistVF.woff
Binary file not shown.
13 changes: 13 additions & 0 deletions apps/next/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
html,
body {
max-inline-size: 100vw;
overflow-x: hidden;
}

* {
box-sizing: border-box;
margin-block: 0;
margin-inline: 0;
padding-block: 0;
padding-inline: 0;
}
20 changes: 20 additions & 0 deletions apps/next/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Metadata } from 'next';
import '@utrecht/component-library-css';
import '@utrecht/design-tokens/dist/index.css';

export const metadata: Metadata = {
title: 'Next App',
description: 'Demo App for Utrecht Design System',
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className="utrecht-theme">{children}</body>
</html>
);
}
142 changes: 142 additions & 0 deletions apps/next/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import {
Button,
ButtonLink,
DataList,
DataListItem,
DataListKey,
DataListValue,
Document,
FormField,
FormLabel,
Heading1,
Heading2,
Heading3,
Link,
Page,
PageContent,
PageFooter,
PageHeader,
Paragraph,
Separator,
Textbox,
} from '@/components';

export default function Home() {
return (
<Document>
<Page>
<PageHeader>
<Link href="/"></Link>
</PageHeader>
<PageContent
style={
{
'--utrecht-space-around': 1,
} as any
}
>
<aside>
<Heading3>MIJN LOKET</Heading3>
<ButtonLink appearance="primary-action-button">Uitloggen</ButtonLink>
<Paragraph>Mevrouw Cindy</Paragraph>
<br />
<br />
</aside>
<Heading1>
<Paragraph lead>ONLINE LOKET</Paragraph>
Een verhuizing doorgeven
</Heading1>
<section>
<Heading2>Uw gegevens</Heading2>
<Paragraph>
Hieronder ziet u de gegevens die wij van u weten. Kloppen uw gegevens niet? Dan kunt u deze laten
aanpassen via
<Link href="https://www.utrecht.nl/persoonsgegevenswijzigen">
www.utrecht.nl/persoonsgegevenswijzigen.{' '}
</Link>
Uw e-mailadres en telefoonnummer vult u zelf in.
</Paragraph>
</section>
<section>
<Heading2>PERSOONSGEGEVENS</Heading2>
<DataList appearance="rows">
<DataListItem>
<DataListKey>Burgerservicenummer</DataListKey>
<DataListValue>298272921</DataListValue>
</DataListItem>
<DataListItem>
<DataListKey>Aanhef</DataListKey>
<DataListValue>Vrouw</DataListValue>
</DataListItem>
<DataListItem>
<DataListKey>Voorletter(s)</DataListKey>
<DataListValue notranslate>C.</DataListValue>
</DataListItem>
<DataListItem>
<DataListKey>Tussenvoegsel(s)</DataListKey>
<DataListValue notranslate />
</DataListItem>
<DataListItem>
<DataListKey>Achternaam</DataListKey>
<DataListValue notranslate>Verburg</DataListValue>
</DataListItem>
</DataList>
</section>
<Separator />
<section>
<Heading2>ADRESGEGEVENS</Heading2>
<DataList appearance="rows">
<DataListItem>
<DataListKey>Straatnaam</DataListKey>
<DataListValue notranslate>Stadsplateau</DataListValue>
</DataListItem>
<DataListItem>
<DataListKey>Huisnummer</DataListKey>
<DataListValue>1</DataListValue>
</DataListItem>
<DataListItem>
<DataListKey>Huisletter</DataListKey>
<DataListValue notranslate />
</DataListItem>
<DataListItem>
<DataListKey>Huisnummertoevoeging</DataListKey>
<DataListValue notranslate />
</DataListItem>
<DataListItem>
<DataListKey>Postcode</DataListKey>
<DataListValue notranslate>3521AZ</DataListValue>
</DataListItem>
<DataListItem>
<DataListKey>Woonplaats</DataListKey>
<DataListValue notranslate>Utrecht</DataListValue>
</DataListItem>
</DataList>
</section>
<Separator />
<section>
<Heading2>CONTACTGEGEVENS</Heading2>
<form>
<FormField>
<FormLabel htmlFor="telefoonnummer">Telefoonnummer</FormLabel>
<br />
<Textbox id="telefoonnummer" />
</FormField>
<FormField>
<FormLabel htmlFor="email" id="email-label">
E-mailadres *
</FormLabel>
<br />
<Textbox aria-describedby="email-desc" aria-labelledby="email-label" id="email" required />
Vragen met een * zijn verplicht.
</FormField>
<Button appearance="primary-action-button" type="submit">
VOLGENDE
</Button>
</form>
</section>
</PageContent>
<PageFooter />
</Page>
</Document>
);
}
2 changes: 2 additions & 0 deletions apps/next/src/components/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'use client';
export * from '@utrecht/component-library-react';
27 changes: 27 additions & 0 deletions apps/next/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
Loading

0 comments on commit e435d29

Please sign in to comment.