Skip to content

Commit b335669

Browse files
committed
initial
0 parents  commit b335669

34 files changed

+12017
-0
lines changed

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
.yarn/cache
9+
10+
# testing
11+
/coverage
12+
13+
# next.js
14+
/.next/
15+
/out/
16+
17+
# production
18+
/build
19+
20+
# misc
21+
.DS_Store
22+
*.pem
23+
24+
# debug
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
29+
# local env files
30+
.env*.local
31+
32+
# vercel
33+
.vercel
34+
35+
# typescript
36+
*.tsbuildinfo
37+
next-env.d.ts

.yarn/releases/yarn-4.1.1.cjs

+893
Large diffs are not rendered by default.

.yarnrc.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
enableTelemetry: false
2+
3+
logFilters:
4+
- code: YN0002
5+
level: discard
6+
- code: YN0060
7+
level: discard
8+
- code: YN0006
9+
level: discard
10+
- code: YN0076
11+
level: discard
12+
- code: YN0013
13+
level: discard
14+
15+
nodeLinker: node-modules
16+
17+
yarnPath: .yarn/releases/yarn-4.1.1.cjs

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
20+
21+
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
22+
23+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
24+
25+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
26+
27+
## Learn More
28+
29+
To learn more about Next.js, take a look at the following resources:
30+
31+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
32+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
33+
34+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
35+
36+
## Deploy on Vercel
37+
38+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
39+
40+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

components.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"platforms": "universal",
3+
"aliases": {
4+
"components": "~/components",
5+
"lib": "~/lib"
6+
}
7+
}

nativewind-env.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="nativewind/types" />

next.config.mjs

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/** @type {import('next').NextConfig} */
2+
import { withExpo } from "@expo/next-adapter"
3+
4+
const nextConfig = {
5+
reactStrictMode: true,
6+
transpilePackages: [
7+
//'@notifee',
8+
"@react-navigation/elements", // kann raus, wenn man ui umbaut
9+
"@react-navigation/native", // kann raus, wenn man ui umbaut
10+
"@rn-primitives/checkbox",
11+
"@rn-primitives/dropdown-menu",
12+
"@rn-primitives/hooks",
13+
"@rn-primitives/label",
14+
"@rn-primitives/portal",
15+
"@rn-primitives/popover",
16+
"@rn-primitives/select",
17+
"@rn-primitives/separator",
18+
"@rn-primitives/slot",
19+
"@rn-primitives/switch",
20+
"expo-apple-authentication",
21+
"expo-av",
22+
"expo-constants",
23+
"expo-crypto",
24+
"expo-haptics",
25+
"expo-image-picker",
26+
"expo-linking",
27+
"expo-modules-core",
28+
"expo-navigation-bar",
29+
"expo-web-browser",
30+
//'react-native-gesture-handler',
31+
"lucide-react-native",
32+
"nativewind",
33+
"react-native",
34+
"react-native-css-interop",
35+
"react-native-mmkv",
36+
"react-native-reanimated",
37+
"react-native-safe-area-context", // kann raus, wenn man ui umbaut
38+
"react-native-svg",
39+
"react-native-web",
40+
"solito",
41+
],
42+
/*webpack: (config) => {
43+
config.resolve.alias["react-native"] = "react-native-web"
44+
return config
45+
},*/
46+
experimental: {
47+
forceSwcTransforms: true,
48+
scrollRestoration: true,
49+
},
50+
}
51+
52+
export default withExpo(nextConfig)

package.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "test-nextjs-rnr",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint"
10+
},
11+
"dependencies": {
12+
"@expo/next-adapter": "^6.0.0",
13+
"@react-native-async-storage/async-storage": "^1.24.0",
14+
"@rn-primitives/dropdown-menu": "^1.0.3",
15+
"@rn-primitives/hooks": "^1.0.3",
16+
"@rn-primitives/portal": "^1.0.3",
17+
"@rn-primitives/select": "^1.0.3",
18+
"@rn-primitives/slot": "^1.0.3",
19+
"@rn-primitives/types": "^1.0.3",
20+
"class-variance-authority": "^0.7.0",
21+
"clsx": "^2.1.1",
22+
"lucide-react-native": "^0.412.0",
23+
"nativewind": "^4.0.36",
24+
"next": "14.2.5",
25+
"react": "18.2.0",
26+
"react-dom": "18.2.0",
27+
"react-native": "^0.74.3",
28+
"react-native-reanimated": "^3.14.0",
29+
"react-native-svg": "^15.4.0",
30+
"react-native-web": "^0.19.12",
31+
"tailwind-merge": "^2.4.0",
32+
"tailwindcss-animate": "^1.0.7"
33+
},
34+
"devDependencies": {
35+
"@types/node": "^20",
36+
"@types/react": "^18",
37+
"@types/react-dom": "^18",
38+
"autoprefixer": "^10.4.19",
39+
"eslint": "^8",
40+
"eslint-config-next": "14.2.5",
41+
"postcss": "^8.4.39",
42+
"tailwindcss": "^3.4.6",
43+
"typescript": "^5"
44+
},
45+
"packageManager": "[email protected]"
46+
}

postcss.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

public/favicon.ico

25.3 KB
Binary file not shown.

public/next.svg

+1
Loading

public/vercel.svg

+1
Loading

src/components/ui/button.tsx

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import { cva, type VariantProps } from 'class-variance-authority';
2+
import * as React from 'react';
3+
import { Pressable } from 'react-native';
4+
import { TextClassContext } from '~/components/ui/text';
5+
import { cn } from '~/lib/utils';
6+
7+
const buttonVariants = cva(
8+
'group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2',
9+
{
10+
variants: {
11+
variant: {
12+
default: 'bg-primary web:hover:opacity-90 active:opacity-90',
13+
destructive: 'bg-destructive web:hover:opacity-90 active:opacity-90',
14+
outline:
15+
'border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent',
16+
secondary: 'bg-secondary web:hover:opacity-80 active:opacity-80',
17+
ghost: 'web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent',
18+
link: 'web:underline-offset-4 web:hover:underline web:focus:underline ',
19+
},
20+
size: {
21+
default: 'h-10 px-4 py-2 native:h-12 native:px-5 native:py-3',
22+
sm: 'h-9 rounded-md px-3',
23+
lg: 'h-11 rounded-md px-8 native:h-14',
24+
icon: 'h-10 w-10',
25+
},
26+
},
27+
defaultVariants: {
28+
variant: 'default',
29+
size: 'default',
30+
},
31+
}
32+
);
33+
34+
const buttonTextVariants = cva(
35+
'web:whitespace-nowrap text-sm native:text-base font-medium text-foreground web:transition-colors',
36+
{
37+
variants: {
38+
variant: {
39+
default: 'text-primary-foreground',
40+
destructive: 'text-destructive-foreground',
41+
outline: 'group-active:text-accent-foreground',
42+
secondary: 'text-secondary-foreground group-active:text-secondary-foreground',
43+
ghost: 'group-active:text-accent-foreground',
44+
link: 'text-primary group-active:underline',
45+
},
46+
size: {
47+
default: '',
48+
sm: '',
49+
lg: 'native:text-lg',
50+
icon: '',
51+
},
52+
},
53+
defaultVariants: {
54+
variant: 'default',
55+
size: 'default',
56+
},
57+
}
58+
);
59+
60+
type ButtonProps = React.ComponentPropsWithoutRef<typeof Pressable> &
61+
VariantProps<typeof buttonVariants>;
62+
63+
const Button = React.forwardRef<React.ElementRef<typeof Pressable>, ButtonProps>(
64+
({ className, variant, size, ...props }, ref) => {
65+
return (
66+
<TextClassContext.Provider
67+
value={cn(
68+
props.disabled && 'web:pointer-events-none',
69+
buttonTextVariants({ variant, size })
70+
)}
71+
>
72+
<Pressable
73+
className={cn(
74+
props.disabled && 'opacity-50 web:pointer-events-none',
75+
buttonVariants({ variant, size, className })
76+
)}
77+
ref={ref}
78+
role='button'
79+
{...props}
80+
/>
81+
</TextClassContext.Provider>
82+
);
83+
}
84+
);
85+
Button.displayName = 'Button';
86+
87+
export { Button, buttonTextVariants, buttonVariants };
88+
export type { ButtonProps };

0 commit comments

Comments
 (0)