ikramhussainsiyam-create-my-project 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- package/cli.js +1 -3
- package/package.json +1 -1
- package/templates/NextJS/JavaScript/.eslintrc.json +11 -1
- package/templates/NextJS/JavaScript/README.md +4 -4
- package/templates/NextJS/JavaScript/gitignore-template +13 -6
- package/templates/NextJS/JavaScript/package-lock.json +704 -162
- package/templates/NextJS/JavaScript/package.json +5 -5
- package/templates/NextJS/JavaScript/public/lws.svg +10 -0
- package/templates/NextJS/JavaScript/src/app/layout.jsx +2 -2
- package/templates/NextJS/JavaScript/src/app/page.jsx +1 -1
- package/templates/NextJS/JavaScript/src/components/Navlink.jsx +15 -12
- package/templates/NextJS/JavaScript/src/lib/toast.js +19 -0
- package/templates/NextJS/JavaScript/src/lib/utils.js +0 -14
- package/templates/NextJS/JavaScript/tailwind.config.js +4 -5
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"name": "
|
2
|
+
"name": "test",
|
3
3
|
"version": "0.1.0",
|
4
4
|
"private": true,
|
5
5
|
"scripts": {
|
@@ -12,9 +12,9 @@
|
|
12
12
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
13
13
|
"@tailwindcss/forms": "^0.5.9",
|
14
14
|
"clsx": "^2.1.1",
|
15
|
-
"next": "
|
16
|
-
"react": "
|
17
|
-
"react-dom": "
|
15
|
+
"next": "15.0.3",
|
16
|
+
"react": "18.3.1",
|
17
|
+
"react-dom": "18.3.1",
|
18
18
|
"react-hook-form": "^7.53.2",
|
19
19
|
"react-icons": "^5.3.0",
|
20
20
|
"sonner": "^1.7.0",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
},
|
24
24
|
"devDependencies": {
|
25
25
|
"eslint": "^8",
|
26
|
-
"eslint-config-next": "
|
26
|
+
"eslint-config-next": "15.0.3",
|
27
27
|
"postcss": "^8",
|
28
28
|
"tailwindcss": "^3.4.1"
|
29
29
|
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<svg width="1286" height="1286" viewBox="0 0 1286 1286" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M643.334 1260.29C984.068 1260.29 1260.29 984.072 1260.29 643.338C1260.29 302.605 984.068 26.3857 643.334 26.3857C302.6 26.3857 26.3809 302.605 26.3809 643.338C26.3809 984.072 302.6 1260.29 643.334 1260.29Z" fill="#171C2A"/>
|
3
|
+
<path d="M643.341 1286C516.235 1286 391.984 1248.31 286.299 1177.69C180.614 1107.08 98.2429 1006.71 49.6015 889.275C0.960094 771.845 -11.7667 642.627 13.0305 517.964C37.8276 393.3 99.035 278.789 188.913 188.912C278.79 99.0344 393.301 37.8271 517.965 13.03C642.629 -11.7672 771.846 0.959605 889.277 49.6009C1006.71 98.2423 1107.08 180.613 1177.69 286.298C1248.31 391.983 1286 516.234 1286 643.34C1285.8 813.721 1218.02 977.066 1097.54 1097.54C977.067 1218.02 813.723 1285.8 643.341 1286ZM643.341 52.0942C526.404 52.0942 412.092 86.7701 314.862 151.737C217.632 216.704 141.851 309.044 97.1007 417.08C52.3506 525.116 40.6419 643.996 63.4553 758.687C86.2687 873.377 142.58 978.727 225.267 1061.41C307.954 1144.1 413.304 1200.41 527.995 1223.23C642.686 1246.04 761.566 1234.33 869.602 1189.58C977.638 1144.83 1069.98 1069.05 1134.95 971.819C1199.91 874.589 1234.59 760.278 1234.59 643.34C1234.38 486.595 1172.03 336.328 1061.19 225.492C950.355 114.656 800.087 52.2982 643.341 52.0942Z" fill="#00D991"/>
|
4
|
+
<path d="M491.347 691.554L487.623 695.283C485.717 697.191 485.719 700.284 487.628 702.19L543.562 758.046C545.47 759.952 548.563 759.95 550.469 758.041L554.193 754.312C556.099 752.403 556.097 749.311 554.188 747.405L498.254 691.549C496.345 689.643 493.253 689.645 491.347 691.554Z" fill="white"/>
|
5
|
+
<path d="M492.578 662.844L488.852 666.57C486.945 668.478 486.945 671.57 488.852 673.478L535.022 719.648C536.929 721.555 540.022 721.555 541.929 719.648L545.656 715.921C547.563 714.014 547.563 710.921 545.656 709.014L499.486 662.844C497.578 660.937 494.486 660.937 492.578 662.844Z" fill="white"/>
|
6
|
+
<path d="M807.245 691.69L803.522 695.419C801.615 697.328 801.618 700.421 803.526 702.327L859.46 758.182C861.369 760.088 864.461 760.086 866.367 758.178L870.091 754.449C871.997 752.54 871.995 749.447 870.086 747.541L814.153 691.686C812.244 689.78 809.151 689.782 807.245 691.69Z" fill="white"/>
|
7
|
+
<path d="M808.089 662.878L804.359 666.601C802.45 668.506 802.447 671.599 804.353 673.508L850.483 719.718C852.388 721.627 855.481 721.63 857.39 719.724L861.12 716.001C863.029 714.095 863.031 711.003 861.126 709.094L814.996 662.884C813.09 660.975 809.998 660.972 808.089 662.878Z" fill="white"/>
|
8
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M938.973 726.233H926.12C922.473 695.802 907.889 667.734 885.084 647.257C862.279 626.781 832.808 615.291 802.161 614.93C771.515 614.568 741.781 625.359 718.499 645.292C695.218 665.224 679.975 692.941 675.611 723.277C668.799 724.82 642.193 726.233 642.193 726.233C642.193 726.233 616.486 724.948 610.188 723.534C605.853 693.195 590.638 665.467 567.377 645.512C544.117 625.558 514.396 614.738 483.751 615.068C453.105 615.398 423.625 626.856 400.799 647.307C377.974 667.758 363.36 695.808 359.68 726.233H345.284C342.693 726.233 340.209 727.263 338.377 729.095C336.545 730.926 335.516 733.411 335.516 736.002V746.156C335.549 748.702 336.575 751.135 338.376 752.935C340.177 754.736 342.609 755.762 345.156 755.796H359.037C362.65 786.233 377.204 814.319 399.989 834.822C422.773 855.324 452.234 866.846 482.882 867.239C513.531 867.632 543.277 856.87 566.58 836.959C589.883 817.047 605.153 789.344 609.546 759.009C616.615 757.595 641.55 756.181 641.55 756.181C641.55 756.181 668.028 757.852 674.968 759.266C678.745 790.145 693.781 818.546 717.196 839.028C740.612 859.51 770.761 870.633 801.868 870.267C832.975 869.901 862.854 858.071 885.781 837.044C908.708 816.016 923.071 787.27 926.12 756.31H938.973C941.52 756.311 943.966 755.317 945.791 753.54C947.616 751.764 948.674 749.344 948.741 746.799V736.13C948.741 733.54 947.712 731.055 945.88 729.223C944.048 727.391 941.564 726.362 938.973 726.362V726.233ZM484.484 837.542C465.444 837.542 446.831 831.896 430.999 821.317C415.168 810.739 402.828 795.704 395.542 778.113C388.255 760.522 386.349 741.165 390.064 722.49C393.778 703.816 402.947 686.662 416.411 673.198C429.874 659.735 447.028 650.566 465.703 646.851C484.377 643.137 503.734 645.043 521.325 652.33C538.916 659.616 553.952 671.955 564.53 687.787C575.108 703.618 580.755 722.231 580.755 741.272C580.755 766.804 570.612 791.291 552.558 809.345C534.503 827.399 510.017 837.542 484.484 837.542ZM800.03 837.542C780.99 837.542 762.377 831.896 746.545 821.317C730.713 810.739 718.374 795.704 711.088 778.113C703.801 760.522 701.895 741.165 705.609 722.49C709.324 703.816 718.493 686.662 731.957 673.198C745.42 659.735 762.574 650.566 781.249 646.851C799.923 643.137 819.28 645.043 836.871 652.33C854.462 659.616 869.498 671.955 880.076 687.787C890.654 703.618 896.3 722.231 896.3 741.272C896.3 766.804 886.158 791.291 868.103 809.345C850.049 827.399 825.562 837.542 800.03 837.542Z" fill="white"/>
|
9
|
+
<path d="M1049.24 689.872V465.07H970.193C974.816 440.361 977.779 415.369 979.062 390.264L932.533 424.839C958.239 395.148 932.533 256.72 932.533 256.72C932.533 256.72 898.601 323.299 687.037 306.333C475.473 289.367 445.783 373.427 445.783 373.427C420.076 347.72 445.783 305.69 445.783 305.69C438.117 309.232 431.225 314.25 425.499 320.457C419.774 326.663 415.328 333.938 412.415 341.864C409.503 349.79 408.181 358.212 408.525 366.649C408.869 375.086 410.872 383.373 414.421 391.035L416.22 394.506H347.713L395.012 424.839C380.107 434.729 368.652 449.015 362.237 465.712H234.99V689.872L188.719 736.143L234.99 782.415L247.843 1007.22H368.021L355.168 769.305C355.294 768.517 355.261 767.713 355.069 766.939C354.877 766.165 354.53 765.438 354.05 764.802C353.569 764.166 352.965 763.633 352.274 763.236C351.583 762.839 350.818 762.586 350.026 762.492C348.461 762.27 346.87 762.67 345.597 763.608C344.323 764.545 343.468 765.944 343.214 767.505C343.085 768.098 343.085 768.712 343.214 769.305V951.82H289.359V767.505L257.74 736.143L289.231 704.782V520.467H349.127C347.712 534.389 347.454 548.404 348.355 562.368H390.642C392.995 536.697 405.259 512.952 424.832 496.174C496.81 407.23 801.559 459.157 801.559 459.157L835.363 409.287L822.51 459.157C894.23 476.252 900.4 560.826 900.4 560.826H932.533C942.193 548.697 949.792 535.062 955.026 520.467H994.871V704.782L1026.36 736.143L994.871 767.505V951.82H929.063L941.916 1007.22H1062.09L1049.24 782.415L1095.51 736.143L1049.24 689.872Z" fill="white"/>
|
10
|
+
</svg>
|
@@ -1,28 +1,31 @@
|
|
1
1
|
"use client";
|
2
|
+
import { cn } from "@/lib/utils";
|
2
3
|
import Link from "next/link";
|
3
4
|
import { usePathname } from "next/navigation";
|
4
|
-
import { forwardRef } from "react";
|
5
5
|
|
6
|
-
function Navlink({
|
6
|
+
export default function Navlink({
|
7
|
+
href,
|
8
|
+
className,
|
9
|
+
activeStyle,
|
10
|
+
children,
|
11
|
+
prefetch,
|
12
|
+
replace,
|
13
|
+
scroll,
|
14
|
+
...props
|
15
|
+
}) {
|
7
16
|
const pathname = usePathname();
|
8
17
|
const isActive = href === pathname;
|
9
18
|
|
10
19
|
return (
|
11
20
|
<Link
|
21
|
+
scroll={scroll}
|
22
|
+
replace={replace}
|
23
|
+
prefetch={prefetch}
|
12
24
|
href={href}
|
13
25
|
{...props}
|
14
|
-
className={
|
15
|
-
isActive && className
|
16
|
-
? `underline ${className}`
|
17
|
-
: isActive
|
18
|
-
? "underline"
|
19
|
-
: className
|
20
|
-
}
|
21
|
-
ref={ref}
|
26
|
+
className={cn(isActive && (activeStyle ?? "active"), className)}
|
22
27
|
>
|
23
28
|
{children}
|
24
29
|
</Link>
|
25
30
|
);
|
26
31
|
}
|
27
|
-
|
28
|
-
export default forwardRef(Navlink);
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { toast } from "sonner";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @typedef {'success' | 'error' | 'info' | 'warning' | 'loading'} Type
|
5
|
+
* @typedef {'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'} Position
|
6
|
+
*
|
7
|
+
* @param {Type} type
|
8
|
+
* @param {string} message
|
9
|
+
* @param {{ position?: Position, id?: string | number, duration?: number, description?: string}} options
|
10
|
+
*/
|
11
|
+
|
12
|
+
export default function showToast(type, message, options) {
|
13
|
+
toast[type](message, {
|
14
|
+
position: options?.position || "top-center",
|
15
|
+
id: options?.id,
|
16
|
+
duration: options?.duration || 5000,
|
17
|
+
description: options?.description,
|
18
|
+
});
|
19
|
+
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import clsx from "clsx";
|
2
|
-
import { toast } from "sonner";
|
3
2
|
import { twMerge } from "tailwind-merge";
|
4
3
|
|
5
4
|
export function cn(...classes) {
|
@@ -9,16 +8,3 @@ export function cn(...classes) {
|
|
9
8
|
export function getRandomID() {
|
10
9
|
return Math.random().toString(36).substring(2, 9);
|
11
10
|
}
|
12
|
-
|
13
|
-
export const showToast = (
|
14
|
-
type, // "success" | "error" | "info" | "warning" | "loading"
|
15
|
-
message,
|
16
|
-
options
|
17
|
-
) => {
|
18
|
-
toast[type](message, {
|
19
|
-
position: options?.position || "top-center",
|
20
|
-
id: options?.id,
|
21
|
-
duration: options?.duration || 2000,
|
22
|
-
description: options?.description,
|
23
|
-
});
|
24
|
-
};
|
@@ -1,14 +1,10 @@
|
|
1
1
|
/** @type {import('tailwindcss').Config} */
|
2
|
-
import aspectRatio from "@tailwindcss/aspect-ratio";
|
3
|
-
import forms from "@tailwindcss/forms";
|
4
|
-
|
5
2
|
module.exports = {
|
6
3
|
content: [
|
7
4
|
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
8
5
|
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
|
9
6
|
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
10
7
|
],
|
11
|
-
|
12
8
|
theme: {
|
13
9
|
extend: {
|
14
10
|
fontFamily: {
|
@@ -16,5 +12,8 @@ module.exports = {
|
|
16
12
|
},
|
17
13
|
},
|
18
14
|
},
|
19
|
-
plugins: [
|
15
|
+
plugins: [
|
16
|
+
require("@tailwindcss/aspect-ratio"),
|
17
|
+
require("@tailwindcss/forms"),
|
18
|
+
],
|
20
19
|
};
|