create-next-mui 0.1.4 → 0.2.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/next-mui-features/react-query/js/.vscode/settings.json +7 -0
- package/next-mui-features/react-query/js/.vscode/typescript.code-snippets +10 -0
- package/next-mui-features/react-query/js/eslint.config.mjs +90 -0
- package/next-mui-features/react-query/js/jsconfig.json +11 -0
- package/next-mui-features/react-query/js/next.config.js +5 -0
- package/next-mui-features/react-query/js/package-lock.json +6779 -0
- package/next-mui-features/react-query/js/package.json +34 -0
- package/next-mui-features/react-query/js/public/mui.svg +11 -0
- package/next-mui-features/react-query/js/public/next.svg +23 -0
- package/next-mui-features/react-query/js/public/vercel.svg +1 -0
- package/next-mui-features/react-query/js/src/app/favicon.ico +0 -0
- package/next-mui-features/react-query/js/src/app/globals.css +28 -0
- package/next-mui-features/react-query/js/src/app/layout.jsx +40 -0
- package/next-mui-features/react-query/js/src/app/page.jsx +7 -0
- package/next-mui-features/react-query/js/src/app/profile/page.jsx +7 -0
- package/next-mui-features/react-query/js/src/config-global.js +6 -0
- package/next-mui-features/react-query/js/src/lib/router-link/index.js +5 -0
- package/next-mui-features/react-query/js/src/lib/tanstack-provider.jsx +29 -0
- package/next-mui-features/react-query/js/src/sections/home/profile-view.jsx +43 -0
- package/next-mui-features/react-query/js/src/sections/home/view.jsx +160 -0
- package/next-mui-features/react-query/js/src/theme/core/colors.json +46 -0
- package/next-mui-features/react-query/js/src/theme/core/components/button.js +31 -0
- package/next-mui-features/react-query/js/src/theme/core/components/card.js +13 -0
- package/next-mui-features/react-query/js/src/theme/core/components/index.js +9 -0
- package/next-mui-features/react-query/js/src/theme/core/palette.js +23 -0
- package/next-mui-features/react-query/js/src/theme/core/typography.js +51 -0
- package/next-mui-features/react-query/js/src/theme/create-theme.js +28 -0
- package/next-mui-features/react-query/js/src/theme/theme-provider.jsx +19 -0
- package/next-mui-features/react-query/manifest.json +18 -0
- package/next-mui-features/react-query/ts/.vscode/settings.json +7 -0
- package/next-mui-features/react-query/ts/.vscode/typescript.code-snippets +10 -0
- package/next-mui-features/react-query/ts/eslint.config.mjs +90 -0
- package/next-mui-features/react-query/ts/next.config.ts +7 -0
- package/next-mui-features/react-query/ts/package-lock.json +6779 -0
- package/next-mui-features/react-query/ts/package.json +34 -0
- package/next-mui-features/react-query/ts/public/mui.svg +11 -0
- package/next-mui-features/react-query/ts/public/next.svg +23 -0
- package/next-mui-features/react-query/ts/public/vercel.svg +1 -0
- package/next-mui-features/react-query/ts/src/app/favicon.ico +0 -0
- package/next-mui-features/react-query/ts/src/app/globals.css +28 -0
- package/next-mui-features/react-query/ts/src/app/layout.tsx +46 -0
- package/next-mui-features/react-query/ts/src/app/page.tsx +7 -0
- package/next-mui-features/react-query/ts/src/app/profile/page.tsx +7 -0
- package/next-mui-features/react-query/ts/src/config-global.ts +7 -0
- package/next-mui-features/react-query/ts/src/lib/router-link/index.ts +5 -0
- package/next-mui-features/react-query/ts/src/lib/tanstack-provider.tsx +29 -0
- package/next-mui-features/react-query/ts/src/sections/home/profile-view.tsx +43 -0
- package/next-mui-features/react-query/ts/src/sections/home/view.tsx +160 -0
- package/next-mui-features/react-query/ts/src/theme/core/colors.json +46 -0
- package/next-mui-features/react-query/ts/src/theme/core/components/button.ts +43 -0
- package/next-mui-features/react-query/ts/src/theme/core/components/card.ts +17 -0
- package/next-mui-features/react-query/ts/src/theme/core/components/index.ts +9 -0
- package/next-mui-features/react-query/ts/src/theme/core/palette.ts +34 -0
- package/next-mui-features/react-query/ts/src/theme/core/typography.ts +51 -0
- package/next-mui-features/react-query/ts/src/theme/create-theme.ts +28 -0
- package/next-mui-features/react-query/ts/src/theme/theme-provider.tsx +19 -0
- package/next-mui-features/react-query/ts/tsconfig.json +34 -0
- package/next-mui-features/zustand/js/.vscode/settings.json +7 -0
- package/next-mui-features/zustand/js/.vscode/typescript.code-snippets +10 -0
- package/next-mui-features/zustand/js/eslint.config.mjs +90 -0
- package/next-mui-features/zustand/js/jsconfig.json +11 -0
- package/next-mui-features/zustand/js/next.config.js +5 -0
- package/next-mui-features/zustand/js/package-lock.json +6753 -0
- package/next-mui-features/zustand/js/package.json +33 -0
- package/next-mui-features/zustand/js/public/mui.svg +11 -0
- package/next-mui-features/zustand/js/public/next.svg +23 -0
- package/next-mui-features/zustand/js/public/vercel.svg +1 -0
- package/next-mui-features/zustand/js/src/app/favicon.ico +0 -0
- package/next-mui-features/zustand/js/src/app/globals.css +28 -0
- package/next-mui-features/zustand/js/src/app/layout.jsx +36 -0
- package/next-mui-features/zustand/js/src/app/page.jsx +7 -0
- package/next-mui-features/zustand/js/src/config-global.js +6 -0
- package/next-mui-features/zustand/js/src/lib/router-link/index.js +5 -0
- package/next-mui-features/zustand/js/src/sections/home/view.jsx +218 -0
- package/next-mui-features/zustand/js/src/stores/counter-store.jsx +10 -0
- package/next-mui-features/zustand/js/src/theme/core/colors.json +46 -0
- package/next-mui-features/zustand/js/src/theme/core/components/button.js +31 -0
- package/next-mui-features/zustand/js/src/theme/core/components/card.js +13 -0
- package/next-mui-features/zustand/js/src/theme/core/components/index.js +9 -0
- package/next-mui-features/zustand/js/src/theme/core/palette.js +23 -0
- package/next-mui-features/zustand/js/src/theme/core/typography.js +51 -0
- package/next-mui-features/zustand/js/src/theme/create-theme.js +28 -0
- package/next-mui-features/zustand/js/src/theme/theme-provider.jsx +19 -0
- package/next-mui-features/zustand/manifest.json +12 -0
- package/next-mui-features/zustand/ts/.vscode/settings.json +7 -0
- package/next-mui-features/zustand/ts/.vscode/typescript.code-snippets +10 -0
- package/next-mui-features/zustand/ts/eslint.config.mjs +90 -0
- package/next-mui-features/zustand/ts/next.config.ts +7 -0
- package/next-mui-features/zustand/ts/package-lock.json +6753 -0
- package/next-mui-features/zustand/ts/package.json +33 -0
- package/next-mui-features/zustand/ts/public/mui.svg +11 -0
- package/next-mui-features/zustand/ts/public/next.svg +23 -0
- package/next-mui-features/zustand/ts/public/vercel.svg +1 -0
- package/next-mui-features/zustand/ts/src/app/favicon.ico +0 -0
- package/next-mui-features/zustand/ts/src/app/globals.css +28 -0
- package/next-mui-features/zustand/ts/src/app/layout.tsx +42 -0
- package/next-mui-features/zustand/ts/src/app/page.tsx +7 -0
- package/next-mui-features/zustand/ts/src/config-global.ts +7 -0
- package/next-mui-features/zustand/ts/src/lib/router-link/index.ts +5 -0
- package/next-mui-features/zustand/ts/src/sections/home/view.tsx +218 -0
- package/next-mui-features/zustand/ts/src/stores/counter-store.tsx +17 -0
- package/next-mui-features/zustand/ts/src/theme/core/colors.json +46 -0
- package/next-mui-features/zustand/ts/src/theme/core/components/button.ts +43 -0
- package/next-mui-features/zustand/ts/src/theme/core/components/card.ts +17 -0
- package/next-mui-features/zustand/ts/src/theme/core/components/index.ts +9 -0
- package/next-mui-features/zustand/ts/src/theme/core/palette.ts +34 -0
- package/next-mui-features/zustand/ts/src/theme/core/typography.ts +51 -0
- package/next-mui-features/zustand/ts/src/theme/create-theme.ts +28 -0
- package/next-mui-features/zustand/ts/src/theme/theme-provider.tsx +19 -0
- package/next-mui-features/zustand/ts/tsconfig.json +34 -0
- package/package.json +3 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-next-mui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "eslint ./src",
|
|
10
|
+
"lint:fix": "eslint ./src --fix"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@emotion/react": "^11.14.0",
|
|
14
|
+
"@emotion/styled": "^11.14.1",
|
|
15
|
+
"@mui/icons-material": "^9.0.0",
|
|
16
|
+
"@mui/material": "^9.0.0",
|
|
17
|
+
"@mui/material-nextjs": "^9.0.1",
|
|
18
|
+
"next": "16.2.4",
|
|
19
|
+
"react": "19.2.4",
|
|
20
|
+
"react-dom": "19.2.4",
|
|
21
|
+
"zustand": "^5.0.14"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^20",
|
|
25
|
+
"@types/react": "^19",
|
|
26
|
+
"@types/react-dom": "^19",
|
|
27
|
+
"eslint": "^9",
|
|
28
|
+
"eslint-config-next": "16.2.4",
|
|
29
|
+
"eslint-plugin-perfectionist": "^4.15.1",
|
|
30
|
+
"eslint-plugin-unused-imports": "^4.3.0",
|
|
31
|
+
"typescript": "^5"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M4.16602 20.8334L29.166 37.5V120.833L4.16602 104.167V20.8334Z" fill="#29B6F6"/>
|
|
3
|
+
<path d="M195.834 83.3333L170.834 100V154.167L195.834 137.5V83.3333Z" fill="#0288D1"/>
|
|
4
|
+
<path d="M195.834 25L170.834 41.6667V70.8333L195.834 54.1667V25Z" fill="#0288D1"/>
|
|
5
|
+
<path d="M145.834 20.8334L120.834 37.5V120.833L145.834 104.167V20.8334Z" fill="#0288D1"/>
|
|
6
|
+
<path d="M4.16602 50L74.9993 95.8334V66.6667L4.16602 20.8334V50Z" fill="#29B6F6"/>
|
|
7
|
+
<path d="M145.833 50L75 95.8334V66.6667L145.833 20.8334V50Z" fill="#0288D1"/>
|
|
8
|
+
<path d="M145.833 108.333L75 154.167V125L145.833 79.1666V108.333Z" fill="#0288D1"/>
|
|
9
|
+
<path d="M195.833 141.667L125 187.5V158.333L195.833 112.5V141.667Z" fill="#0288D1"/>
|
|
10
|
+
<path d="M125 157.354L75 125V154.167L125 186.521V157.354Z" fill="#29B6F6"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<svg width="212" height="212" viewBox="0 0 212 212" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M106 193.158C154.137 193.158 193.159 154.136 193.159 106C193.159 57.8637 154.137 18.8415 106 18.8415C57.864 18.8415 18.8418 57.8637 18.8418 106C18.8418 154.136 57.864 193.158 106 193.158Z" fill="url(#paint0_linear_694_4)"/>
|
|
3
|
+
<path d="M83.9824 70.7859H70.6309V141.435H83.9824V70.7859Z" fill="white"/>
|
|
4
|
+
<path d="M141.281 70.4767H128.238V134.916H141.281V70.4767Z" fill="url(#paint1_linear_694_4)"/>
|
|
5
|
+
<path d="M162.449 168.248L150.908 172.647L70.6309 70.7859H86.1599L162.449 168.248Z" fill="url(#paint2_linear_694_4)"/>
|
|
6
|
+
<defs>
|
|
7
|
+
<linearGradient id="paint0_linear_694_4" x1="106" y1="193.158" x2="106" y2="18.8415" gradientUnits="userSpaceOnUse">
|
|
8
|
+
<stop stop-color="#0A070A"/>
|
|
9
|
+
<stop offset="0.465" stop-color="#2B2B2B"/>
|
|
10
|
+
<stop offset="1" stop-color="#4B4B4B"/>
|
|
11
|
+
</linearGradient>
|
|
12
|
+
<linearGradient id="paint1_linear_694_4" x1="134.762" y1="145.843" x2="134.762" y2="81.4036" gradientUnits="userSpaceOnUse">
|
|
13
|
+
<stop offset="0.377" stop-color="white" stop-opacity="0"/>
|
|
14
|
+
<stop offset="0.666" stop-color="white" stop-opacity="0.3"/>
|
|
15
|
+
<stop offset="0.988" stop-color="white"/>
|
|
16
|
+
</linearGradient>
|
|
17
|
+
<linearGradient id="paint2_linear_694_4" x1="97.6167" y1="94.7065" x2="161.919" y2="179.003" gradientUnits="userSpaceOnUse">
|
|
18
|
+
<stop offset="0.296" stop-color="white"/>
|
|
19
|
+
<stop offset="0.521" stop-color="white" stop-opacity="0.5"/>
|
|
20
|
+
<stop offset="0.838" stop-color="white" stop-opacity="0"/>
|
|
21
|
+
</linearGradient>
|
|
22
|
+
</defs>
|
|
23
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
html {
|
|
2
|
+
height: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
html,
|
|
6
|
+
body {
|
|
7
|
+
max-width: 100vw;
|
|
8
|
+
overflow-x: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
body {
|
|
12
|
+
min-height: 100%;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
* {
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a {
|
|
26
|
+
color: inherit;
|
|
27
|
+
text-decoration: none;
|
|
28
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "./globals.css";
|
|
2
|
+
|
|
3
|
+
import { Geist, Geist_Mono } from "next/font/google";
|
|
4
|
+
|
|
5
|
+
import type { Metadata } from "next";
|
|
6
|
+
|
|
7
|
+
import { ThemeProvider } from "@/theme/theme-provider";
|
|
8
|
+
|
|
9
|
+
// ---------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
const geistSans = Geist({
|
|
12
|
+
variable: "--font-geist-sans",
|
|
13
|
+
subsets: ["latin"],
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const geistMono = Geist_Mono({
|
|
17
|
+
variable: "--font-geist-mono",
|
|
18
|
+
subsets: ["latin"],
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export const metadata: Metadata = {
|
|
22
|
+
title: "create-next-mui",
|
|
23
|
+
description: "The fastest way to scaffold Nextjs + MUI",
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default function RootLayout({
|
|
27
|
+
children,
|
|
28
|
+
}: Readonly<{
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
}>) {
|
|
31
|
+
return (
|
|
32
|
+
<html
|
|
33
|
+
lang="en"
|
|
34
|
+
suppressHydrationWarning
|
|
35
|
+
className={`${geistSans.variable} ${geistMono.variable}`}
|
|
36
|
+
>
|
|
37
|
+
<body>
|
|
38
|
+
<ThemeProvider> {children} </ThemeProvider>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Image from "next/image";
|
|
4
|
+
|
|
5
|
+
import Box from "@mui/material/Box";
|
|
6
|
+
import Link from "@mui/material/Link";
|
|
7
|
+
import Paper from "@mui/material/Paper";
|
|
8
|
+
import Stack from "@mui/material/Stack";
|
|
9
|
+
import Button from "@mui/material/Button";
|
|
10
|
+
import SvgIcon from "@mui/material/SvgIcon";
|
|
11
|
+
import Container from "@mui/material/Container";
|
|
12
|
+
import IconButton from "@mui/material/IconButton";
|
|
13
|
+
import Typography from "@mui/material/Typography";
|
|
14
|
+
import { alpha as hexAlpha } from "@mui/material/styles";
|
|
15
|
+
|
|
16
|
+
import { RouterLink } from "@/lib/router-link";
|
|
17
|
+
|
|
18
|
+
import { useCounterStore } from "@/stores/counter-store";
|
|
19
|
+
|
|
20
|
+
// ---------------------------------------------------------------
|
|
21
|
+
|
|
22
|
+
export function HomeView() {
|
|
23
|
+
const count = useCounterStore((state) => state.count);
|
|
24
|
+
const increment = useCounterStore((state) => state.increment);
|
|
25
|
+
const decrement = useCounterStore((state) => state.decrement);
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Box>
|
|
29
|
+
<Container maxWidth="md">
|
|
30
|
+
<Stack
|
|
31
|
+
sx={{
|
|
32
|
+
minHeight: "100vh",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
}}
|
|
36
|
+
spacing={8}
|
|
37
|
+
>
|
|
38
|
+
<Stack direction="row" sx={{ alignItems: "center" }} spacing={8}>
|
|
39
|
+
<Box>
|
|
40
|
+
<Image
|
|
41
|
+
width={180}
|
|
42
|
+
height={180}
|
|
43
|
+
alt="nextjs"
|
|
44
|
+
src="/next.svg"
|
|
45
|
+
loading="eager"
|
|
46
|
+
/>
|
|
47
|
+
</Box>
|
|
48
|
+
|
|
49
|
+
<Box>
|
|
50
|
+
<SvgIcon
|
|
51
|
+
fill="none"
|
|
52
|
+
stroke="#fff"
|
|
53
|
+
strokeWidth="2"
|
|
54
|
+
viewBox="0 0 24 24"
|
|
55
|
+
strokeLinecap="round"
|
|
56
|
+
strokeLinejoin="round"
|
|
57
|
+
sx={{ width: 80, height: 80 }}
|
|
58
|
+
className="lucide lucide-plus-icon lucide-plus"
|
|
59
|
+
>
|
|
60
|
+
<path d="M5 12h14" />
|
|
61
|
+
<path d="M12 5v14" />
|
|
62
|
+
</SvgIcon>
|
|
63
|
+
</Box>
|
|
64
|
+
|
|
65
|
+
<Box>
|
|
66
|
+
<Image
|
|
67
|
+
width={150}
|
|
68
|
+
height={150}
|
|
69
|
+
alt="nextjs"
|
|
70
|
+
src="/mui.svg"
|
|
71
|
+
loading="eager"
|
|
72
|
+
/>
|
|
73
|
+
</Box>
|
|
74
|
+
</Stack>
|
|
75
|
+
|
|
76
|
+
<Stack spacing={4} sx={{ alignItems: "center" }}>
|
|
77
|
+
<Stack direction="row" spacing={2}>
|
|
78
|
+
<Button
|
|
79
|
+
variant="outlined"
|
|
80
|
+
LinkComponent={RouterLink}
|
|
81
|
+
href="https://github.com/thatonevikash/create-next-mui/"
|
|
82
|
+
target="_blank"
|
|
83
|
+
sx={(theme) => ({
|
|
84
|
+
px: 1.5,
|
|
85
|
+
borderRadius: 4,
|
|
86
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
87
|
+
})}
|
|
88
|
+
>
|
|
89
|
+
<SvgIcon
|
|
90
|
+
fill="none"
|
|
91
|
+
viewBox="0 0 200 200"
|
|
92
|
+
sx={{ width: 44, height: 44 }}
|
|
93
|
+
>
|
|
94
|
+
<path
|
|
95
|
+
fill="white"
|
|
96
|
+
d="M100 20C55.82 20 20 55.82 20 100C20 137.487 45.8133 168.853 80.6133 177.533C80.24 176.453 80 175.2 80 173.647V159.973C76.7533 159.973 71.3133 159.973 69.9467 159.973C64.4733 159.973 59.6067 157.62 57.2467 153.247C54.6267 148.387 54.1733 140.953 47.68 136.407C45.7533 134.893 47.22 133.167 49.44 133.4C53.54 134.56 56.94 137.373 60.14 141.547C63.3267 145.727 64.8267 146.673 70.78 146.673C73.6667 146.673 77.9867 146.507 82.0533 145.867C84.24 140.313 88.02 135.2 92.64 132.787C66 130.047 53.2867 116.793 53.2867 98.8C53.2867 91.0534 56.5867 83.56 62.1933 77.2467C60.3533 70.98 58.04 58.2 62.9 53.3333C74.8867 53.3333 82.1333 61.1067 83.8733 63.2067C89.8467 61.16 96.4067 60 103.3 60C110.207 60 116.793 61.16 122.78 63.22C124.5 61.1334 131.753 53.3333 143.767 53.3333C148.647 58.2067 146.307 71.04 144.447 77.2934C150.02 83.5934 153.3 91.0667 153.3 98.8C153.3 116.78 140.607 130.027 114.007 132.78C121.327 136.6 126.667 147.333 126.667 155.42V173.647C126.667 174.34 126.513 174.84 126.433 175.433C157.607 164.507 180 134.907 180 100C180 55.82 144.18 20 100 20Z"
|
|
97
|
+
/>
|
|
98
|
+
</SvgIcon>
|
|
99
|
+
</Button>
|
|
100
|
+
<Paper variant="outlined" sx={{ px: 4, py: 2, borderRadius: 4 }}>
|
|
101
|
+
<Typography
|
|
102
|
+
variant="h5"
|
|
103
|
+
sx={{
|
|
104
|
+
display: "flex",
|
|
105
|
+
alignItems: "center",
|
|
106
|
+
gap: 1.2,
|
|
107
|
+
}}
|
|
108
|
+
>
|
|
109
|
+
<Box component="span" sx={{ color: "text.secondary" }}>
|
|
110
|
+
npx
|
|
111
|
+
</Box>
|
|
112
|
+
|
|
113
|
+
<Box component="span">create-next-mui</Box>
|
|
114
|
+
|
|
115
|
+
<Box
|
|
116
|
+
sx={(theme) => ({
|
|
117
|
+
p: 1,
|
|
118
|
+
ml: 1,
|
|
119
|
+
borderRadius: 2,
|
|
120
|
+
cursor: "pointer",
|
|
121
|
+
bgcolor: hexAlpha(theme.palette.grey["800"], 0.2),
|
|
122
|
+
display: "flex",
|
|
123
|
+
alignItems: "center",
|
|
124
|
+
justifyContent: "center",
|
|
125
|
+
})}
|
|
126
|
+
>
|
|
127
|
+
<SvgIcon
|
|
128
|
+
strokeWidth="2"
|
|
129
|
+
stroke="#dadada"
|
|
130
|
+
viewBox="0 0 24 24"
|
|
131
|
+
strokeLinecap="round"
|
|
132
|
+
strokeLinejoin="round"
|
|
133
|
+
sx={{ fill: "transparent" }}
|
|
134
|
+
className="lucide lucide-copy-icon lucide-copy"
|
|
135
|
+
>
|
|
136
|
+
<rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
|
|
137
|
+
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
|
|
138
|
+
</SvgIcon>
|
|
139
|
+
</Box>
|
|
140
|
+
</Typography>
|
|
141
|
+
</Paper>
|
|
142
|
+
</Stack>
|
|
143
|
+
|
|
144
|
+
<Typography variant="caption" sx={{ color: "text.disabled" }}>
|
|
145
|
+
The fastest way to scaffold
|
|
146
|
+
<Link
|
|
147
|
+
component={RouterLink}
|
|
148
|
+
href="https://nextjs.org/"
|
|
149
|
+
target="_blank"
|
|
150
|
+
>
|
|
151
|
+
Nextjs
|
|
152
|
+
</Link>
|
|
153
|
+
+
|
|
154
|
+
<Link
|
|
155
|
+
component={RouterLink}
|
|
156
|
+
href="https://mui.com/"
|
|
157
|
+
target="_blank"
|
|
158
|
+
>
|
|
159
|
+
MUI
|
|
160
|
+
</Link>
|
|
161
|
+
</Typography>
|
|
162
|
+
|
|
163
|
+
<Stack direction="row" sx={{ mt: 4, alignItems: "center", gap: 2 }}>
|
|
164
|
+
<IconButton
|
|
165
|
+
disableTouchRipple
|
|
166
|
+
onClick={decrement}
|
|
167
|
+
sx={{ borderRadius: 1 }}
|
|
168
|
+
>
|
|
169
|
+
<SvgIcon
|
|
170
|
+
fill="none"
|
|
171
|
+
stroke="#fff"
|
|
172
|
+
strokeWidth="2"
|
|
173
|
+
viewBox="0 0 24 24"
|
|
174
|
+
strokeLinecap="round"
|
|
175
|
+
strokeLinejoin="round"
|
|
176
|
+
sx={{ width: 16, height: 16 }}
|
|
177
|
+
className="lucide lucide-plus-icon lucide-plus"
|
|
178
|
+
>
|
|
179
|
+
<path d="M5 12h14" />
|
|
180
|
+
{/* <path d="M12 5v14" /> */}
|
|
181
|
+
</SvgIcon>
|
|
182
|
+
</IconButton>
|
|
183
|
+
<Box
|
|
184
|
+
sx={(theme) => ({
|
|
185
|
+
px: 2,
|
|
186
|
+
py: 0.5,
|
|
187
|
+
borderRadius: 1,
|
|
188
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
189
|
+
})}
|
|
190
|
+
>
|
|
191
|
+
{count}
|
|
192
|
+
</Box>
|
|
193
|
+
<IconButton
|
|
194
|
+
disableTouchRipple
|
|
195
|
+
onClick={increment}
|
|
196
|
+
sx={{ borderRadius: 1 }}
|
|
197
|
+
>
|
|
198
|
+
<SvgIcon
|
|
199
|
+
fill="none"
|
|
200
|
+
stroke="#fff"
|
|
201
|
+
strokeWidth="2"
|
|
202
|
+
viewBox="0 0 24 24"
|
|
203
|
+
strokeLinecap="round"
|
|
204
|
+
strokeLinejoin="round"
|
|
205
|
+
sx={{ width: 16, height: 16 }}
|
|
206
|
+
className="lucide lucide-plus-icon lucide-plus"
|
|
207
|
+
>
|
|
208
|
+
<path d="M5 12h14" />
|
|
209
|
+
<path d="M12 5v14" />
|
|
210
|
+
</SvgIcon>
|
|
211
|
+
</IconButton>
|
|
212
|
+
</Stack>
|
|
213
|
+
</Stack>
|
|
214
|
+
</Stack>
|
|
215
|
+
</Container>
|
|
216
|
+
</Box>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { create } from "zustand";
|
|
2
|
+
|
|
3
|
+
// ---------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
interface CounterStore {
|
|
6
|
+
count: number;
|
|
7
|
+
increment(): void;
|
|
8
|
+
decrement(): void;
|
|
9
|
+
reset(): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const useCounterStore = create<CounterStore>((set) => ({
|
|
13
|
+
count: 0,
|
|
14
|
+
increment: () => set((state) => ({ count: state.count + 1 })),
|
|
15
|
+
decrement: () => set((state) => ({ count: state.count - 1 })),
|
|
16
|
+
reset: () => set({ count: 0 }),
|
|
17
|
+
}));
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"error": {
|
|
3
|
+
"light": "#FF6183",
|
|
4
|
+
"main": "#DC103C",
|
|
5
|
+
"dark": "#AD1032",
|
|
6
|
+
"contrastText": "#FFFFFF"
|
|
7
|
+
},
|
|
8
|
+
"info": {
|
|
9
|
+
"light": "#4FB0E1",
|
|
10
|
+
"main": "#008BD1",
|
|
11
|
+
"dark": "#005D8B",
|
|
12
|
+
"contrastText": "#FFFFFF"
|
|
13
|
+
},
|
|
14
|
+
"success": {
|
|
15
|
+
"light": "#34FA91",
|
|
16
|
+
"main": "#0CC663",
|
|
17
|
+
"dark": "#0A974C",
|
|
18
|
+
"contrastText": "#FFFFFF"
|
|
19
|
+
},
|
|
20
|
+
"warning": {
|
|
21
|
+
"light": "#E4A942",
|
|
22
|
+
"main": "#E79200",
|
|
23
|
+
"dark": "#AC7312",
|
|
24
|
+
"contrastText": "#FFFFFF"
|
|
25
|
+
},
|
|
26
|
+
"purple": {
|
|
27
|
+
"light": "#A463E5",
|
|
28
|
+
"main": "#9437F1",
|
|
29
|
+
"dark": "#6C0CCB",
|
|
30
|
+
"contrastText": "#FFFFFF"
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
"grey": {
|
|
34
|
+
"50": "#FFFFFF",
|
|
35
|
+
"100": "#FFF5F5",
|
|
36
|
+
"200": "#F4F4F4",
|
|
37
|
+
"300": "#F2F2F2",
|
|
38
|
+
"400": "#D8D3D3",
|
|
39
|
+
"500": "#D2D2D2",
|
|
40
|
+
"600": "#C2C2C2",
|
|
41
|
+
"700": "#959595",
|
|
42
|
+
"800": "#3E3E3E",
|
|
43
|
+
"900": "#141615",
|
|
44
|
+
"950": "#000000"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Theme, Components } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
import type {} from "@mui/material/themeCssVarsAugmentation";
|
|
4
|
+
|
|
5
|
+
// ---------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
const MuiButton: Components<Theme>["MuiButton"] = {
|
|
8
|
+
styleOverrides: {
|
|
9
|
+
root: ({ theme }) => ({
|
|
10
|
+
textTransform: "unset",
|
|
11
|
+
borderRadius: theme.spacing(1.5),
|
|
12
|
+
color: theme.vars.palette.common.black,
|
|
13
|
+
variants: [
|
|
14
|
+
{
|
|
15
|
+
props: { variant: "contained" },
|
|
16
|
+
style: {
|
|
17
|
+
borderRadius: theme.spacing(1.5),
|
|
18
|
+
color: theme.vars.palette.common.white,
|
|
19
|
+
backgroundColor: theme.vars.palette.grey[900],
|
|
20
|
+
...theme.applyStyles("dark", {
|
|
21
|
+
color: theme.vars.palette.common.black,
|
|
22
|
+
backgroundColor: theme.vars.palette.grey[100],
|
|
23
|
+
}),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
props: { variant: "outlined" },
|
|
28
|
+
style: {
|
|
29
|
+
borderRadius: theme.spacing(1.5),
|
|
30
|
+
color: theme.vars.palette.common.black,
|
|
31
|
+
borderColor: theme.vars.palette.grey[900],
|
|
32
|
+
...theme.applyStyles("dark", {
|
|
33
|
+
color: theme.vars.palette.common.white,
|
|
34
|
+
borderColor: theme.vars.palette.grey[100],
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { MuiButton };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Theme, Components } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
import type {} from "@mui/material/themeCssVarsAugmentation";
|
|
4
|
+
|
|
5
|
+
// ---------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
const MuiCard: Components<Theme>["MuiCard"] = {
|
|
8
|
+
styleOverrides: {
|
|
9
|
+
root: ({ theme }) => ({
|
|
10
|
+
borderRadius: theme.spacing(2.5),
|
|
11
|
+
boxShadow: `-4px -4px 24px 4px rgba(20, 22, 21, 0.04),
|
|
12
|
+
4px 12px 12px 4px rgba(20, 22, 21, 0.04)`,
|
|
13
|
+
}),
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { MuiCard };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import COLORS from "./colors.json";
|
|
2
|
+
|
|
3
|
+
// ---------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
const GREY = COLORS.grey;
|
|
6
|
+
|
|
7
|
+
const INFO = COLORS.info;
|
|
8
|
+
const ERROR = COLORS.error;
|
|
9
|
+
const SUCCESS = COLORS.success;
|
|
10
|
+
const WARNING = COLORS.warning;
|
|
11
|
+
|
|
12
|
+
const PURPLE = COLORS.purple;
|
|
13
|
+
|
|
14
|
+
// ---------------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
export const palette = {
|
|
17
|
+
grey: GREY,
|
|
18
|
+
info: INFO,
|
|
19
|
+
error: ERROR,
|
|
20
|
+
purple: PURPLE,
|
|
21
|
+
success: SUCCESS,
|
|
22
|
+
warning: WARNING,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// ---------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
declare module "@mui/material/styles" {
|
|
28
|
+
interface Palette {
|
|
29
|
+
purple: Palette["primary"];
|
|
30
|
+
}
|
|
31
|
+
interface PaletteOptions {
|
|
32
|
+
purple?: PaletteOptions["primary"];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// ---------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
export const typography = {
|
|
4
|
+
h1: {
|
|
5
|
+
fontSize: "56px",
|
|
6
|
+
lineHeight: "64px",
|
|
7
|
+
fontWeight: 700,
|
|
8
|
+
},
|
|
9
|
+
h2: {
|
|
10
|
+
fontSize: "44px",
|
|
11
|
+
lineHeight: "56px",
|
|
12
|
+
fontWeight: 700,
|
|
13
|
+
},
|
|
14
|
+
h3: {
|
|
15
|
+
fontSize: "36px",
|
|
16
|
+
lineHeight: "44px",
|
|
17
|
+
fontWeight: 700,
|
|
18
|
+
},
|
|
19
|
+
h4: {
|
|
20
|
+
fontSize: "32px",
|
|
21
|
+
lineHeight: "40px",
|
|
22
|
+
fontWeight: 600,
|
|
23
|
+
},
|
|
24
|
+
h5: {
|
|
25
|
+
fontSize: "20px",
|
|
26
|
+
lineHeight: "28px",
|
|
27
|
+
fontWeight: 600,
|
|
28
|
+
},
|
|
29
|
+
h6: {
|
|
30
|
+
fontSize: "16px",
|
|
31
|
+
lineHeight: "20px",
|
|
32
|
+
fontWeight: 600,
|
|
33
|
+
},
|
|
34
|
+
body1: {
|
|
35
|
+
fontSize: "16px",
|
|
36
|
+
lineHeight: "20px",
|
|
37
|
+
},
|
|
38
|
+
body2: {
|
|
39
|
+
fontSize: "14px",
|
|
40
|
+
lineHeight: "18px",
|
|
41
|
+
},
|
|
42
|
+
caption: {
|
|
43
|
+
fontSize: "12px",
|
|
44
|
+
lineHeight: "16px",
|
|
45
|
+
fontWeight: 500,
|
|
46
|
+
},
|
|
47
|
+
button: {
|
|
48
|
+
fontWeight: 500,
|
|
49
|
+
lineHeight: "16px",
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createTheme } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
import { CONFIG } from "@/config-global";
|
|
4
|
+
|
|
5
|
+
import { palette } from "./core/palette";
|
|
6
|
+
import { components } from "./core/components";
|
|
7
|
+
import { typography } from "./core/typography";
|
|
8
|
+
|
|
9
|
+
// ---------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
const { defaultMode } = CONFIG;
|
|
12
|
+
|
|
13
|
+
const defaultFont = "var(--font-geist-sans), Arial, sans-serif";
|
|
14
|
+
|
|
15
|
+
export const theme = createTheme({
|
|
16
|
+
cssVariables: true,
|
|
17
|
+
|
|
18
|
+
palette: { mode: defaultMode, ...palette },
|
|
19
|
+
|
|
20
|
+
typography: {
|
|
21
|
+
fontFamily: defaultFont,
|
|
22
|
+
...typography,
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
spacing: "8px",
|
|
26
|
+
|
|
27
|
+
components,
|
|
28
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { AppRouterCacheProvider } from "@mui/material-nextjs/v16-appRouter";
|
|
4
|
+
import { CssBaseline, ThemeProvider as MuiThemeProvider } from "@mui/material";
|
|
5
|
+
|
|
6
|
+
import { theme } from "./create-theme";
|
|
7
|
+
|
|
8
|
+
// ---------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
|
11
|
+
return (
|
|
12
|
+
<AppRouterCacheProvider>
|
|
13
|
+
<MuiThemeProvider theme={theme}>
|
|
14
|
+
<CssBaseline />
|
|
15
|
+
{children}
|
|
16
|
+
</MuiThemeProvider>
|
|
17
|
+
</AppRouterCacheProvider>
|
|
18
|
+
);
|
|
19
|
+
}
|