From 2154093a35e07bbf066e97532ed503f4f8d69823 Mon Sep 17 00:00:00 2001 From: Jim Hodapp Date: Sat, 18 Nov 2023 15:33:01 -0600 Subject: [PATCH 1/2] Bring in the free Material-UI template Devias.io, customize the login screen text, and remove other remnants of tailwindcss --- package-lock.json | 885 ++++++++++++++++-- package.json | 21 +- postcss.config.js | 1 - src/app/favicon.ico | Bin 25931 -> 0 bytes src/app/globals.css | 27 - src/app/layout.tsx | 22 - src/app/page.tsx | 113 --- src/components/chart.js | 9 + src/components/logo.js | 26 + src/components/scrollbar.js | 4 + src/components/severity-pill.js | 58 ++ src/contexts/auth-context.js | 185 ++++ src/guards/auth-guard.js | 57 ++ src/hocs/with-auth-guard.js | 7 + src/hooks/use-auth.js | 4 + src/hooks/use-mocked-user.js | 10 + src/hooks/use-nprogress.js | 17 + src/hooks/use-popover.js | 26 + src/hooks/use-selection.js | 35 + src/layouts/auth/layout.js | 111 +++ src/layouts/dashboard/account-popover.js | 71 ++ src/layouts/dashboard/config.js | 84 ++ src/layouts/dashboard/layout.js | 62 ++ src/layouts/dashboard/side-nav-item.js | 92 ++ src/layouts/dashboard/side-nav.js | 223 +++++ src/layouts/dashboard/top-nav.js | 125 +++ src/pages/404.js | 80 ++ src/pages/_app.js | 55 ++ src/pages/_document.js | 105 +++ src/pages/account.js | 61 ++ src/pages/auth/login.js | 227 +++++ src/pages/auth/register.js | 164 ++++ src/pages/companies.js | 174 ++++ src/pages/customers.js | 290 ++++++ src/pages/index.js | 232 +++++ src/pages/settings.js | 40 + .../account/account-profile-details.js | 179 ++++ src/sections/account/account-profile.js | 69 ++ src/sections/companies/companies-search.js | 23 + src/sections/companies/company-card.js | 98 ++ src/sections/customer/customers-search.js | 23 + src/sections/customer/customers-table.js | 156 +++ src/sections/overview/overview-budget.js | 85 ++ .../overview/overview-latest-orders.js | 104 ++ .../overview/overview-latest-products.js | 99 ++ src/sections/overview/overview-sales.js | 159 ++++ .../overview/overview-tasks-progress.js | 64 ++ .../overview/overview-total-customers.js | 86 ++ .../overview/overview-total-profit.js | 48 + src/sections/overview/overview-traffic.js | 143 +++ .../settings/settings-notifications.js | 104 ++ src/sections/settings/settings-password.js | 76 ++ src/theme/colors.js | 70 ++ src/theme/create-components.js | 301 ++++++ src/theme/create-palette.js | 33 + src/theme/create-shadows.js | 29 + src/theme/create-typography.js | 76 ++ src/theme/index.js | 31 + src/utils/apply-pagination.js | 3 + src/utils/create-emotion-cache.js | 5 + src/utils/create-resource-id.js | 5 + src/utils/get-initials.js | 6 + tailwind.config.ts | 20 - 63 files changed, 5546 insertions(+), 252 deletions(-) delete mode 100644 src/app/favicon.ico delete mode 100644 src/app/globals.css delete mode 100644 src/app/layout.tsx delete mode 100644 src/app/page.tsx create mode 100644 src/components/chart.js create mode 100644 src/components/logo.js create mode 100644 src/components/scrollbar.js create mode 100644 src/components/severity-pill.js create mode 100644 src/contexts/auth-context.js create mode 100644 src/guards/auth-guard.js create mode 100644 src/hocs/with-auth-guard.js create mode 100644 src/hooks/use-auth.js create mode 100644 src/hooks/use-mocked-user.js create mode 100644 src/hooks/use-nprogress.js create mode 100644 src/hooks/use-popover.js create mode 100644 src/hooks/use-selection.js create mode 100644 src/layouts/auth/layout.js create mode 100644 src/layouts/dashboard/account-popover.js create mode 100644 src/layouts/dashboard/config.js create mode 100644 src/layouts/dashboard/layout.js create mode 100644 src/layouts/dashboard/side-nav-item.js create mode 100644 src/layouts/dashboard/side-nav.js create mode 100644 src/layouts/dashboard/top-nav.js create mode 100644 src/pages/404.js create mode 100644 src/pages/_app.js create mode 100644 src/pages/_document.js create mode 100644 src/pages/account.js create mode 100644 src/pages/auth/login.js create mode 100644 src/pages/auth/register.js create mode 100644 src/pages/companies.js create mode 100644 src/pages/customers.js create mode 100644 src/pages/index.js create mode 100644 src/pages/settings.js create mode 100644 src/sections/account/account-profile-details.js create mode 100644 src/sections/account/account-profile.js create mode 100644 src/sections/companies/companies-search.js create mode 100644 src/sections/companies/company-card.js create mode 100644 src/sections/customer/customers-search.js create mode 100644 src/sections/customer/customers-table.js create mode 100644 src/sections/overview/overview-budget.js create mode 100644 src/sections/overview/overview-latest-orders.js create mode 100644 src/sections/overview/overview-latest-products.js create mode 100644 src/sections/overview/overview-sales.js create mode 100644 src/sections/overview/overview-tasks-progress.js create mode 100644 src/sections/overview/overview-total-customers.js create mode 100644 src/sections/overview/overview-total-profit.js create mode 100644 src/sections/overview/overview-traffic.js create mode 100644 src/sections/settings/settings-notifications.js create mode 100644 src/sections/settings/settings-password.js create mode 100644 src/theme/colors.js create mode 100644 src/theme/create-components.js create mode 100644 src/theme/create-palette.js create mode 100644 src/theme/create-shadows.js create mode 100644 src/theme/create-typography.js create mode 100644 src/theme/index.js create mode 100644 src/utils/apply-pagination.js create mode 100644 src/utils/create-emotion-cache.js create mode 100644 src/utils/create-resource-id.js create mode 100644 src/utils/get-initials.js delete mode 100644 tailwind.config.ts diff --git a/package-lock.json b/package-lock.json index a9545fd..eb0ca95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,16 +8,32 @@ "name": "refactor-platform-fe", "version": "0.1.0", "dependencies": { + "@emotion/cache": "11.10.5", "@emotion/react": "^11.11.1", + "@emotion/server": "11.10.0", "@emotion/styled": "^11.11.0", "@fontsource/roboto": "^5.0.8", + "@heroicons/react": "2.0.16", + "@mui/lab": "5.0.0-alpha.120", "@mui/material": "^5.14.18", - "next": "14.0.1", + "@mui/system": "5.11.9", + "@mui/x-date-pickers": "5.0.19", + "apexcharts": "3.37.0", + "date-fns": "2.29.3", + "formik": "2.2.9", + "next": "^14.0.3", + "nprogress": "0.2.0", + "prop-types": "15.8.1", "react": "^18", - "react-dom": "^18" + "react-apexcharts": "1.4.0", + "react-dom": "^18", + "simplebar-react": "^3.2.1", + "yup": "1.0.0" }, "devDependencies": { "@types/node": "^20", + "@types/nprogress": "0.2.0", + "@types/numeral": "2.0.2", "@types/react": "^18", "@types/react-dom": "^18", "autoprefixer": "^10.0.1", @@ -240,6 +256,75 @@ "node": ">=6.9.0" } }, + "node_modules/@date-io/core": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/@date-io/core/-/core-2.17.0.tgz", + "integrity": "sha512-+EQE8xZhRM/hsY0CDTVyayMDDY5ihc4MqXCrPxooKw19yAzUIC6uUqsZeaOFNL9YKTNxYKrJP5DFgE8o5xRCOw==" + }, + "node_modules/@date-io/date-fns": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/@date-io/date-fns/-/date-fns-2.17.0.tgz", + "integrity": "sha512-L0hWZ/mTpy3Gx/xXJ5tq5CzHo0L7ry6KEO9/w/JWiFWFLZgiNVo3ex92gOl3zmzjHqY/3Ev+5sehAr8UnGLEng==", + "dependencies": { + "@date-io/core": "^2.17.0" + }, + "peerDependencies": { + "date-fns": "^2.0.0" + }, + "peerDependenciesMeta": { + "date-fns": { + "optional": true + } + } + }, + "node_modules/@date-io/dayjs": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/@date-io/dayjs/-/dayjs-2.17.0.tgz", + "integrity": "sha512-Iq1wjY5XzBh0lheFA0it6Dsyv94e8mTiNR8vuTai+KopxDkreL3YjwTmZHxkgB7/vd0RMIACStzVgWvPATnDCA==", + "dependencies": { + "@date-io/core": "^2.17.0" + }, + "peerDependencies": { + "dayjs": "^1.8.17" + }, + "peerDependenciesMeta": { + "dayjs": { + "optional": true + } + } + }, + "node_modules/@date-io/luxon": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/@date-io/luxon/-/luxon-2.17.0.tgz", + "integrity": "sha512-l712Vdm/uTddD2XWt9TlQloZUiTiRQtY5TCOG45MQ/8u0tu8M17BD6QYHar/3OrnkGybALAMPzCy1r5D7+0HBg==", + "dependencies": { + "@date-io/core": "^2.17.0" + }, + "peerDependencies": { + "luxon": "^1.21.3 || ^2.x || ^3.x" + }, + "peerDependenciesMeta": { + "luxon": { + "optional": true + } + } + }, + "node_modules/@date-io/moment": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/@date-io/moment/-/moment-2.17.0.tgz", + "integrity": "sha512-e4nb4CDZU4k0WRVhz1Wvl7d+hFsedObSauDHKtZwU9kt7gdYEAzKgnrSCTHsEaXrDumdrkCYTeZ0Tmyk7uV4tw==", + "dependencies": { + "@date-io/core": "^2.17.0" + }, + "peerDependencies": { + "moment": "^2.24.0" + }, + "peerDependenciesMeta": { + "moment": { + "optional": true + } + } + }, "node_modules/@emotion/babel-plugin": { "version": "11.11.0", "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", @@ -259,17 +344,22 @@ } }, "node_modules/@emotion/cache": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", - "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", + "version": "11.10.5", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.10.5.tgz", + "integrity": "sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA==", "dependencies": { - "@emotion/memoize": "^0.8.1", - "@emotion/sheet": "^1.2.2", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", - "stylis": "4.2.0" + "@emotion/memoize": "^0.8.0", + "@emotion/sheet": "^1.2.1", + "@emotion/utils": "^1.2.0", + "@emotion/weak-memoize": "^0.3.0", + "stylis": "4.1.3" } }, + "node_modules/@emotion/cache/node_modules/stylis": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.1.3.tgz", + "integrity": "sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==" + }, "node_modules/@emotion/hash": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", @@ -311,6 +401,18 @@ } } }, + "node_modules/@emotion/react/node_modules/@emotion/cache": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", + "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", + "dependencies": { + "@emotion/memoize": "^0.8.1", + "@emotion/sheet": "^1.2.2", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "stylis": "4.2.0" + } + }, "node_modules/@emotion/serialize": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz", @@ -323,6 +425,25 @@ "csstype": "^3.0.2" } }, + "node_modules/@emotion/server": { + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/@emotion/server/-/server-11.10.0.tgz", + "integrity": "sha512-MTvJ21JPo9aS02GdjFW4nhdwOi2tNNpMmAM/YED0pkxzjDNi5WbiTwXqaCnvLc2Lr8NFtjhT0az1vTJyLIHYcw==", + "dependencies": { + "@emotion/utils": "^1.2.0", + "html-tokenize": "^2.0.0", + "multipipe": "^1.0.2", + "through": "^2.3.8" + }, + "peerDependencies": { + "@emotion/css": "^11.0.0-rc.0" + }, + "peerDependenciesMeta": { + "@emotion/css": { + "optional": true + } + } + }, "node_modules/@emotion/sheet": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", @@ -468,6 +589,14 @@ "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-5.0.8.tgz", "integrity": "sha512-XxPltXs5R31D6UZeLIV1td3wTXU3jzd3f2DLsXI8tytMGBkIsGcc9sIyiupRtA8y73HAhuSCeweOoBqf6DbWCA==" }, + "node_modules/@heroicons/react": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.0.16.tgz", + "integrity": "sha512-x89rFxH3SRdYaA+JCXwfe+RkE1SFTo9GcOkZettHer71Y3T7V+ogKmfw5CjTazgS3d0ClJ7p1NA+SP7VQLQcLw==", + "peerDependencies": { + "react": ">= 16" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.13", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", @@ -541,6 +670,92 @@ "url": "https://opencollective.com/mui" } }, + "node_modules/@mui/lab": { + "version": "5.0.0-alpha.120", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.120.tgz", + "integrity": "sha512-vjlF2jTKSZnNxtUO0xxHEDfpL5cG0LLNRsfKv8TYOiPs0Q1bbqO3YfqJsqxv8yh+wx7EFZc8lwJ4NSAQdenW3A==", + "dependencies": { + "@babel/runtime": "^7.20.13", + "@mui/base": "5.0.0-alpha.118", + "@mui/system": "^5.11.9", + "@mui/types": "^7.2.3", + "@mui/utils": "^5.11.9", + "clsx": "^1.2.1", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@mui/material": "^5.0.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/lab/node_modules/@mui/base": { + "version": "5.0.0-alpha.118", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.118.tgz", + "integrity": "sha512-GAEpqhnuHjRaAZLdxFNuOf2GDTp9sUawM46oHZV4VnYPFjXJDkIYFWfIQLONb0nga92OiqS5DD/scGzVKCL0Mw==", + "dependencies": { + "@babel/runtime": "^7.20.13", + "@emotion/is-prop-valid": "^1.2.0", + "@mui/types": "^7.2.3", + "@mui/utils": "^5.11.9", + "@popperjs/core": "^2.11.6", + "clsx": "^1.2.1", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/lab/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/@mui/lab/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, "node_modules/@mui/material": { "version": "5.14.18", "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.18.tgz", @@ -585,6 +800,45 @@ } } }, + "node_modules/@mui/material/node_modules/@mui/system": { + "version": "5.14.18", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.18.tgz", + "integrity": "sha512-hSQQdb3KF72X4EN2hMEiv8EYJZSflfdd1TRaGPoR7CIAG347OxCslpBUwWngYobaxgKvq6xTrlIl+diaactVww==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/private-theming": "^5.14.18", + "@mui/styled-engine": "^5.14.18", + "@mui/types": "^7.2.9", + "@mui/utils": "^5.14.18", + "clsx": "^2.0.0", + "csstype": "^3.1.2", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, "node_modules/@mui/material/node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -647,18 +901,30 @@ } } }, - "node_modules/@mui/system": { - "version": "5.14.18", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.18.tgz", - "integrity": "sha512-hSQQdb3KF72X4EN2hMEiv8EYJZSflfdd1TRaGPoR7CIAG347OxCslpBUwWngYobaxgKvq6xTrlIl+diaactVww==", + "node_modules/@mui/styled-engine/node_modules/@emotion/cache": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", + "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", "dependencies": { - "@babel/runtime": "^7.23.2", - "@mui/private-theming": "^5.14.18", - "@mui/styled-engine": "^5.14.18", - "@mui/types": "^7.2.9", - "@mui/utils": "^5.14.18", - "clsx": "^2.0.0", - "csstype": "^3.1.2", + "@emotion/memoize": "^0.8.1", + "@emotion/sheet": "^1.2.2", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "stylis": "4.2.0" + } + }, + "node_modules/@mui/system": { + "version": "5.11.9", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.11.9.tgz", + "integrity": "sha512-h6uarf+l3FO6l75Nf7yO+qDGrIoa1DM9nAMCUFZQsNCDKOInRzcptnm8M1w/Z3gVetfeeGoIGAYuYKbft6KZZA==", + "dependencies": { + "@babel/runtime": "^7.20.13", + "@mui/private-theming": "^5.11.9", + "@mui/styled-engine": "^5.11.9", + "@mui/types": "^7.2.3", + "@mui/utils": "^5.11.9", + "clsx": "^1.2.1", + "csstype": "^3.1.1", "prop-types": "^15.8.1" }, "engines": { @@ -686,6 +952,14 @@ } } }, + "node_modules/@mui/system/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, "node_modules/@mui/types": { "version": "7.2.9", "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.9.tgz", @@ -731,10 +1005,76 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" }, + "node_modules/@mui/x-date-pickers": { + "version": "5.0.19", + "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-5.0.19.tgz", + "integrity": "sha512-D8zFyFgwA6faPCTM//3SG17RqCegczKQS9wF/toemhjsP7Ps4ape/llHqowL/BZLbi14OXV0Ud10tfUyVP7Q/Q==", + "dependencies": { + "@babel/runtime": "^7.18.9", + "@date-io/core": "^2.15.0", + "@date-io/date-fns": "^2.15.0", + "@date-io/dayjs": "^2.15.0", + "@date-io/luxon": "^2.15.0", + "@date-io/moment": "^2.15.0", + "@mui/utils": "^5.10.3", + "@types/react-transition-group": "^4.4.5", + "clsx": "^1.2.1", + "prop-types": "^15.7.2", + "react-transition-group": "^4.4.5", + "rifm": "^0.12.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/material": "^5.4.1", + "@mui/system": "^5.4.1", + "date-fns": "^2.25.0", + "dayjs": "^1.10.7", + "luxon": "^1.28.0 || ^2.0.0 || ^3.0.0", + "moment": "^2.29.1", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "date-fns": { + "optional": true + }, + "dayjs": { + "optional": true + }, + "luxon": { + "optional": true + }, + "moment": { + "optional": true + } + } + }, + "node_modules/@mui/x-date-pickers/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, "node_modules/@next/env": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.0.1.tgz", - "integrity": "sha512-Ms8ZswqY65/YfcjrlcIwMPD7Rg/dVjdLapMcSHG26W6O67EJDF435ShW4H4LXi1xKO1oRc97tLXUpx8jpLe86A==" + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.0.3.tgz", + "integrity": "sha512-7xRqh9nMvP5xrW4/+L0jgRRX+HoNRGnfJpD+5Wq6/13j3dsdzxO3BCXn7D3hMqsDb+vjZnJq+vI7+EtgrYZTeA==" }, "node_modules/@next/eslint-plugin-next": { "version": "14.0.1", @@ -746,9 +1086,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.1.tgz", - "integrity": "sha512-JyxnGCS4qT67hdOKQ0CkgFTp+PXub5W1wsGvIq98TNbF3YEIN7iDekYhYsZzc8Ov0pWEsghQt+tANdidITCLaw==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.3.tgz", + "integrity": "sha512-64JbSvi3nbbcEtyitNn2LEDS/hcleAFpHdykpcnrstITFlzFgB/bW0ER5/SJJwUPj+ZPY+z3e+1jAfcczRLVGw==", "cpu": [ "arm64" ], @@ -761,9 +1101,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.0.1.tgz", - "integrity": "sha512-625Z7bb5AyIzswF9hvfZWa+HTwFZw+Jn3lOBNZB87lUS0iuCYDHqk3ujuHCkiyPtSC0xFBtYDLcrZ11mF/ap3w==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.0.3.tgz", + "integrity": "sha512-RkTf+KbAD0SgYdVn1XzqE/+sIxYGB7NLMZRn9I4Z24afrhUpVJx6L8hsRnIwxz3ERE2NFURNliPjJ2QNfnWicQ==", "cpu": [ "x64" ], @@ -776,9 +1116,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.0.1.tgz", - "integrity": "sha512-iVpn3KG3DprFXzVHM09kvb//4CNNXBQ9NB/pTm8LO+vnnnaObnzFdS5KM+w1okwa32xH0g8EvZIhoB3fI3mS1g==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.0.3.tgz", + "integrity": "sha512-3tBWGgz7M9RKLO6sPWC6c4pAw4geujSwQ7q7Si4d6bo0l6cLs4tmO+lnSwFp1Tm3lxwfMk0SgkJT7EdwYSJvcg==", "cpu": [ "arm64" ], @@ -791,9 +1131,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.0.1.tgz", - "integrity": "sha512-mVsGyMxTLWZXyD5sen6kGOTYVOO67lZjLApIj/JsTEEohDDt1im2nkspzfV5MvhfS7diDw6Rp/xvAQaWZTv1Ww==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.0.3.tgz", + "integrity": "sha512-v0v8Kb8j8T23jvVUWZeA2D8+izWspeyeDGNaT2/mTHWp7+37fiNfL8bmBWiOmeumXkacM/AB0XOUQvEbncSnHA==", "cpu": [ "arm64" ], @@ -806,9 +1146,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.0.1.tgz", - "integrity": "sha512-wMqf90uDWN001NqCM/auRl3+qVVeKfjJdT9XW+RMIOf+rhUzadmYJu++tp2y+hUbb6GTRhT+VjQzcgg/QTD9NQ==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.0.3.tgz", + "integrity": "sha512-VM1aE1tJKLBwMGtyBR21yy+STfl0MapMQnNrXkxeyLs0GFv/kZqXS5Jw/TQ3TSUnbv0QPDf/X8sDXuMtSgG6eg==", "cpu": [ "x64" ], @@ -821,9 +1161,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.0.1.tgz", - "integrity": "sha512-ol1X1e24w4j4QwdeNjfX0f+Nza25n+ymY0T2frTyalVczUmzkVD7QGgPTZMHfR1aLrO69hBs0G3QBYaj22J5GQ==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.0.3.tgz", + "integrity": "sha512-64EnmKy18MYFL5CzLaSuUn561hbO1Gk16jM/KHznYP3iCIfF9e3yULtHaMy0D8zbHfxset9LTOv6cuYKJgcOxg==", "cpu": [ "x64" ], @@ -836,9 +1176,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.0.1.tgz", - "integrity": "sha512-WEmTEeWs6yRUEnUlahTgvZteh5RJc4sEjCQIodJlZZ5/VJwVP8p2L7l6VhzQhT4h7KvLx/Ed4UViBdne6zpIsw==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.0.3.tgz", + "integrity": "sha512-WRDp8QrmsL1bbGtsh5GqQ/KWulmrnMBgbnb+59qNTW1kVi1nG/2ndZLkcbs2GX7NpFLlToLRMWSQXmPzQm4tog==", "cpu": [ "arm64" ], @@ -851,9 +1191,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.0.1.tgz", - "integrity": "sha512-oFpHphN4ygAgZUKjzga7SoH2VGbEJXZa/KL8bHCAwCjDWle6R1SpiGOdUdA8EJ9YsG1TYWpzY6FTbUA+iAJeww==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.0.3.tgz", + "integrity": "sha512-EKffQeqCrj+t6qFFhIFTRoqb2QwX1mU7iTOvMyLbYw3QtqTw9sMwjykyiMlZlrfm2a4fA84+/aeW+PMg1MjuTg==", "cpu": [ "ia32" ], @@ -866,9 +1206,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.1.tgz", - "integrity": "sha512-FFp3nOJ/5qSpeWT0BZQ+YE1pSMk4IMpkME/1DwKBwhg4mJLB9L+6EXuJi4JEwaJdl5iN+UUlmUD3IsR1kx5fAg==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.3.tgz", + "integrity": "sha512-ERhKPSJ1vQrPiwrs15Pjz/rvDHZmkmvbf/BjPN/UCOI++ODftT0GtasDPi0j+y6PPJi5HsXw+dpRaXUaw4vjuQ==", "cpu": [ "x64" ], @@ -944,6 +1284,19 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "node_modules/@types/lodash": { + "version": "4.14.201", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.201.tgz", + "integrity": "sha512-y9euML0cim1JrykNxADLfaG0FgD1g/yTHwUs/Jg9ZIU7WKj2/4IW9Lbb1WZbvck78W/lfGXFfe+u2EGfIJXdLQ==" + }, + "node_modules/@types/lodash-es": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.11.tgz", + "integrity": "sha512-eCw8FYAWHt2DDl77s+AMLLzPn310LKohruumpucZI4oOFJkIgnlaJcy23OKMJxx4r9PeTF13Gv6w+jqjWQaYUg==", + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/@types/node": { "version": "20.8.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", @@ -953,6 +1306,18 @@ "undici-types": "~5.26.4" } }, + "node_modules/@types/nprogress": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@types/nprogress/-/nprogress-0.2.0.tgz", + "integrity": "sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A==", + "dev": true + }, + "node_modules/@types/numeral": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/numeral/-/numeral-2.0.2.tgz", + "integrity": "sha512-A8F30k2gYJ/6e07spSCPpkuZu79LCnkPTvqmIWQzNGcrzwFKpVOydG41lNt5wZXjSI149qjyzC2L1+F2PD/NUA==", + "dev": true + }, "node_modules/@types/parse-json": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", @@ -1164,6 +1529,19 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/apexcharts": { + "version": "3.37.0", + "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.37.0.tgz", + "integrity": "sha512-0mg1gDKUo3JG00Q//LK0jEXBS6OLjpuglqZ8ec9cqfA5oP8owopD9n5EhfARbWROb5o8GSPzFuohTJiCm2ecWw==", + "dependencies": { + "svg.draggable.js": "^2.2.2", + "svg.easing.js": "^2.0.0", + "svg.filter.js": "^2.0.2", + "svg.pathmorphing.js": "^0.1.3", + "svg.resize.js": "^1.4.3", + "svg.select.js": "^3.0.1" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1465,6 +1843,11 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer-from": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-0.1.2.tgz", + "integrity": "sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg==" + }, "node_modules/busboy": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", @@ -1498,6 +1881,11 @@ "node": ">=6" } }, + "node_modules/can-use-dom": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/can-use-dom/-/can-use-dom-0.1.0.tgz", + "integrity": "sha512-ceOhN1DL7Y4O6M0j9ICgmTYziV89WMd96SvSl0REd8PMgrY0B/WBOPoed5S1KUmJqXgUXh8gzSe6E3ae27upsQ==" + }, "node_modules/caniuse-lite": { "version": "1.0.30001559", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001559.tgz", @@ -1575,6 +1963,11 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, "node_modules/cosmiconfig": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", @@ -1623,6 +2016,18 @@ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, + "node_modules/date-fns": { + "version": "2.29.3", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz", + "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==", + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1646,6 +2051,14 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/define-data-property": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", @@ -1719,6 +2132,41 @@ "csstype": "^3.0.2" } }, + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/duplexer2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/duplexer2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/duplexer2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.575", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.575.tgz", @@ -2426,6 +2874,34 @@ "is-callable": "^1.1.3" } }, + "node_modules/formik": { + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/formik/-/formik-2.2.9.tgz", + "integrity": "sha512-LQLcISMmf1r5at4/gyJigGn0gOwFbeEAlji+N9InZF6LIMXnFNkO42sCI8Jt84YZggpD4cPWObAZaxpEFtSzNA==", + "funding": [ + { + "type": "individual", + "url": "https://opencollective.com/formik" + } + ], + "dependencies": { + "deepmerge": "^2.1.1", + "hoist-non-react-statics": "^3.3.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21", + "react-fast-compare": "^2.0.1", + "tiny-warning": "^1.0.2", + "tslib": "^1.10.0" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/formik/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/fraction.js": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", @@ -2721,6 +3197,21 @@ "react-is": "^16.7.0" } }, + "node_modules/html-tokenize": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-tokenize/-/html-tokenize-2.0.1.tgz", + "integrity": "sha512-QY6S+hZ0f5m1WT8WffYN+Hg+xm/w5I8XeUcAq/ZYP5wVC8xbKi4Whhru3FtrAebD5EhBW8rmFzkDI6eCAuFe2w==", + "dependencies": { + "buffer-from": "~0.1.1", + "inherits": "~2.0.1", + "minimist": "~1.2.5", + "readable-stream": "~1.0.27-1", + "through2": "~0.4.1" + }, + "bin": { + "html-tokenize": "bin/cmd.js" + } + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -2767,8 +3258,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/internal-slot": { "version": "1.0.6", @@ -3254,6 +3744,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3321,7 +3821,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3332,6 +3831,15 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/multipipe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-1.0.2.tgz", + "integrity": "sha512-6uiC9OvY71vzSGX8lZvSqscE7ft9nPupJ8fMjrCNRAUy2LREUW42UL+V/NTrogr6rFgRydUrCX4ZitfpSNkSCQ==", + "dependencies": { + "duplexer2": "^0.1.2", + "object-assign": "^4.1.0" + } + }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -3356,11 +3864,11 @@ "dev": true }, "node_modules/next": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/next/-/next-14.0.1.tgz", - "integrity": "sha512-s4YaLpE4b0gmb3ggtmpmV+wt+lPRuGtANzojMQ2+gmBpgX9w5fTbjsy6dXByBuENsdCX5pukZH/GxdFgO62+pA==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/next/-/next-14.0.3.tgz", + "integrity": "sha512-AbYdRNfImBr3XGtvnwOxq8ekVCwbFTv/UJoLwmaX89nk9i051AEY4/HAWzU0YpaTDw8IofUpmuIlvzWF13jxIw==", "dependencies": { - "@next/env": "14.0.1", + "@next/env": "14.0.3", "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", @@ -3375,15 +3883,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.0.1", - "@next/swc-darwin-x64": "14.0.1", - "@next/swc-linux-arm64-gnu": "14.0.1", - "@next/swc-linux-arm64-musl": "14.0.1", - "@next/swc-linux-x64-gnu": "14.0.1", - "@next/swc-linux-x64-musl": "14.0.1", - "@next/swc-win32-arm64-msvc": "14.0.1", - "@next/swc-win32-ia32-msvc": "14.0.1", - "@next/swc-win32-x64-msvc": "14.0.1" + "@next/swc-darwin-arm64": "14.0.3", + "@next/swc-darwin-x64": "14.0.3", + "@next/swc-linux-arm64-gnu": "14.0.3", + "@next/swc-linux-arm64-musl": "14.0.3", + "@next/swc-linux-x64-gnu": "14.0.3", + "@next/swc-linux-x64-musl": "14.0.3", + "@next/swc-win32-arm64-msvc": "14.0.3", + "@next/swc-win32-ia32-msvc": "14.0.3", + "@next/swc-win32-x64-msvc": "14.0.3" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -3415,6 +3923,11 @@ "node": ">=0.10.0" } }, + "node_modules/nprogress": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", + "integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==" + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -3715,6 +4228,11 @@ "node": ">= 0.8.0" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -3725,6 +4243,11 @@ "react-is": "^16.13.1" } }, + "node_modules/property-expr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz", + "integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -3765,6 +4288,18 @@ "node": ">=0.10.0" } }, + "node_modules/react-apexcharts": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/react-apexcharts/-/react-apexcharts-1.4.0.tgz", + "integrity": "sha512-DrcMV4aAMrUG+n6412yzyATWEyCDWlpPBBhVbpzBC4PDeuYU6iF84SmExbck+jx5MUm4U5PM3/T307Mc3kzc9Q==", + "dependencies": { + "prop-types": "^15.5.7" + }, + "peerDependencies": { + "apexcharts": "^3.18.0", + "react": ">=0.13" + } + }, "node_modules/react-dom": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", @@ -3777,6 +4312,11 @@ "react": "^18.2.0" } }, + "node_modules/react-fast-compare": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz", + "integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==" + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -3797,6 +4337,22 @@ "react-dom": ">=16.6.0" } }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/readable-stream/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, "node_modules/reflect.getprototypeof": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz", @@ -3882,6 +4438,14 @@ "node": ">=0.10.0" } }, + "node_modules/rifm": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/rifm/-/rifm-0.12.1.tgz", + "integrity": "sha512-OGA1Bitg/dSJtI/c4dh90svzaUPt228kzFsUkJbtA2c964IqEAwWXeL9ZJi86xWv3j5SMqRvGULl7bA6cK0Bvg==", + "peerDependencies": { + "react": ">=16.8" + } + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -3938,6 +4502,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, "node_modules/safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -4039,6 +4608,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/simplebar-core": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/simplebar-core/-/simplebar-core-1.2.4.tgz", + "integrity": "sha512-P+Sqshef4fq3++gQ82TgNYcgl3qZFSCP5jS2/8NMmw18oagXOijMzs1G+vm6RUY3oMvpwH3wGoqh9u6SyDjHfQ==", + "dependencies": { + "@types/lodash-es": "^4.17.6", + "can-use-dom": "^0.1.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21" + } + }, + "node_modules/simplebar-react": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/simplebar-react/-/simplebar-react-3.2.4.tgz", + "integrity": "sha512-ogLN79e7JUm82wJChD7NSUB+4EHCFvDkjXpiu8hT1Alk7DnCekUWds61NXcsP9jC97KOgF5To/AVjYFbX0olgg==", + "dependencies": { + "simplebar-core": "^1.2.4" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -4072,6 +4663,11 @@ "node": ">=10.0.0" } }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, "node_modules/string.prototype.matchall": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", @@ -4220,6 +4816,89 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/svg.draggable.js": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz", + "integrity": "sha512-JzNHBc2fLQMzYCZ90KZHN2ohXL0BQJGQimK1kGk6AvSeibuKcIdDX9Kr0dT9+UJ5O8nYA0RB839Lhvk4CY4MZw==", + "dependencies": { + "svg.js": "^2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/svg.easing.js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/svg.easing.js/-/svg.easing.js-2.0.0.tgz", + "integrity": "sha512-//ctPdJMGy22YoYGV+3HEfHbm6/69LJUTAqI2/5qBvaNHZ9uUFVC82B0Pl299HzgH13rKrBgi4+XyXXyVWWthA==", + "dependencies": { + "svg.js": ">=2.3.x" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/svg.filter.js": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/svg.filter.js/-/svg.filter.js-2.0.2.tgz", + "integrity": "sha512-xkGBwU+dKBzqg5PtilaTb0EYPqPfJ9Q6saVldX+5vCRy31P6TlRCP3U9NxH3HEufkKkpNgdTLBJnmhDHeTqAkw==", + "dependencies": { + "svg.js": "^2.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/svg.js": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/svg.js/-/svg.js-2.7.1.tgz", + "integrity": "sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA==" + }, + "node_modules/svg.pathmorphing.js": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/svg.pathmorphing.js/-/svg.pathmorphing.js-0.1.3.tgz", + "integrity": "sha512-49HWI9X4XQR/JG1qXkSDV8xViuTLIWm/B/7YuQELV5KMOPtXjiwH4XPJvr/ghEDibmLQ9Oc22dpWpG0vUDDNww==", + "dependencies": { + "svg.js": "^2.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/svg.resize.js": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/svg.resize.js/-/svg.resize.js-1.4.3.tgz", + "integrity": "sha512-9k5sXJuPKp+mVzXNvxz7U0uC9oVMQrrf7cFsETznzUDDm0x8+77dtZkWdMfRlmbkEEYvUn9btKuZ3n41oNA+uw==", + "dependencies": { + "svg.js": "^2.6.5", + "svg.select.js": "^2.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/svg.resize.js/node_modules/svg.select.js": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/svg.select.js/-/svg.select.js-2.1.2.tgz", + "integrity": "sha512-tH6ABEyJsAOVAhwcCjF8mw4crjXSI1aa7j2VQR8ZuJ37H2MBUbyeqYr5nEO7sSN3cy9AR9DUwNg0t/962HlDbQ==", + "dependencies": { + "svg.js": "^2.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/svg.select.js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/svg.select.js/-/svg.select.js-3.0.1.tgz", + "integrity": "sha512-h5IS/hKkuVCbKSieR9uQCj9w+zLHoPh+ce19bBYyqF53g6mnPB8sAtIbe1s9dh2S2fCmYX2xel1Ln3PJBbK4kw==", + "dependencies": { + "svg.js": "^2.6.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -4235,6 +4914,30 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, + "node_modules/through2": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", + "integrity": "sha512-45Llu+EwHKtAZYTPPVn3XZHBgakWMN3rokhEv5hu596XP+cNgplMg+Gj+1nmAvj+L0K7+N49zBKx5rah5u0QIQ==", + "dependencies": { + "readable-stream": "~1.0.17", + "xtend": "~2.1.1" + } + }, + "node_modules/tiny-case": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-case/-/tiny-case-1.0.3.tgz", + "integrity": "sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q==" + }, + "node_modules/tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -4255,6 +4958,11 @@ "node": ">=8.0" } }, + "node_modules/toposort": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", + "integrity": "sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==" + }, "node_modules/ts-api-utils": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", @@ -4446,6 +5154,11 @@ "punycode": "^2.1.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", @@ -4555,6 +5268,22 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ==", + "dependencies": { + "object-keys": "~0.4.0" + }, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/xtend/node_modules/object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==" + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -4572,6 +5301,28 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/yup": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yup/-/yup-1.0.0.tgz", + "integrity": "sha512-bRZIyMkoe212ahGJTE32cr2dLkJw53Va+Uw5mzsBKpcef9zCGQ23k/xtpQUfGwdWPKvCIlR8CzFwchs2rm2XpQ==", + "dependencies": { + "property-expr": "^2.0.5", + "tiny-case": "^1.0.3", + "toposort": "^2.0.2", + "type-fest": "^2.19.0" + } + }, + "node_modules/yup/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index d785a1f..fde986e 100644 --- a/package.json +++ b/package.json @@ -9,16 +9,33 @@ "lint": "next lint" }, "dependencies": { + "@emotion/cache": "11.10.5", "@emotion/react": "^11.11.1", + "@emotion/server": "11.10.0", "@emotion/styled": "^11.11.0", "@fontsource/roboto": "^5.0.8", + "@heroicons/react": "2.0.16", + "@mui/lab": "5.0.0-alpha.120", "@mui/material": "^5.14.18", - "next": "14.0.1", + "@mui/system": "5.11.9", + "@mui/x-date-pickers": "5.0.19", + "apexcharts": "3.37.0", + "date-fns": "2.29.3", + "formik": "2.2.9", + "nprogress": "0.2.0", + "prop-types": "15.8.1", + "next": "^14.0.3", "react": "^18", - "react-dom": "^18" + "react-apexcharts": "1.4.0", + "react-dom": "^18", + "simplebar-react": "^3.2.1", + "yup": "1.0.0" + }, "devDependencies": { "@types/node": "^20", + "@types/nprogress": "0.2.0", + "@types/numeral": "2.0.2", "@types/react": "^18", "@types/react-dom": "^18", "autoprefixer": "^10.0.1", diff --git a/postcss.config.js b/postcss.config.js index 33ad091..90d9fff 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,5 @@ module.exports = { plugins: { - tailwindcss: {}, autoprefixer: {}, }, } diff --git a/src/app/favicon.ico b/src/app/favicon.ico deleted file mode 100644 index 718d6fea4835ec2d246af9800eddb7ffb276240c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2CM0$95I6X8p^r!gHp+j_gd;9O<1~CEQQGS8) zS9Qh3#p&JM-G8rHekNmKVewU;pJRc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BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m diff --git a/src/app/globals.css b/src/app/globals.css deleted file mode 100644 index fd81e88..0000000 --- a/src/app/globals.css +++ /dev/null @@ -1,27 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -:root { - --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; - --background-end-rgb: 255, 255, 255; -} - -@media (prefers-color-scheme: dark) { - :root { - --foreground-rgb: 255, 255, 255; - --background-start-rgb: 0, 0, 0; - --background-end-rgb: 0, 0, 0; - } -} - -body { - color: rgb(var(--foreground-rgb)); - background: linear-gradient( - to bottom, - transparent, - rgb(var(--background-end-rgb)) - ) - rgb(var(--background-start-rgb)); -} diff --git a/src/app/layout.tsx b/src/app/layout.tsx deleted file mode 100644 index 40e027f..0000000 --- a/src/app/layout.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import type { Metadata } from 'next' -import { Inter } from 'next/font/google' -import './globals.css' - -const inter = Inter({ subsets: ['latin'] }) - -export const metadata: Metadata = { - title: 'Create Next App', - description: 'Generated by create next app', -} - -export default function RootLayout({ - children, -}: { - children: React.ReactNode -}) { - return ( - - {children} - - ) -} diff --git a/src/app/page.tsx b/src/app/page.tsx deleted file mode 100644 index e38c626..0000000 --- a/src/app/page.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import Image from 'next/image' - -export default function Home() { - return ( -
-
-

- Get started by editing  - src/app/page.tsx -

- -
- -
- Next.js Logo -
- - -
- ) -} diff --git a/src/components/chart.js b/src/components/chart.js new file mode 100644 index 0000000..f782ef4 --- /dev/null +++ b/src/components/chart.js @@ -0,0 +1,9 @@ +import dynamic from 'next/dynamic'; +import { styled } from '@mui/material/styles'; + +const ApexChart = dynamic(() => import('react-apexcharts'), { + ssr: false, + loading: () => null +}); + +export const Chart = styled(ApexChart)``; diff --git a/src/components/logo.js b/src/components/logo.js new file mode 100644 index 0000000..affd27c --- /dev/null +++ b/src/components/logo.js @@ -0,0 +1,26 @@ +import { useTheme } from '@mui/material/styles'; + +export const Logo = () => { + const theme = useTheme(); + const fillColor = theme.palette.primary.main; + + return ( + + + + + ); +}; diff --git a/src/components/scrollbar.js b/src/components/scrollbar.js new file mode 100644 index 0000000..8ce7d49 --- /dev/null +++ b/src/components/scrollbar.js @@ -0,0 +1,4 @@ +import SimpleBar from 'simplebar-react'; +import { styled } from '@mui/material/styles'; + +export const Scrollbar = styled(SimpleBar)``; diff --git a/src/components/severity-pill.js b/src/components/severity-pill.js new file mode 100644 index 0000000..4f3be32 --- /dev/null +++ b/src/components/severity-pill.js @@ -0,0 +1,58 @@ +import PropTypes from 'prop-types'; +import { styled } from '@mui/material/styles'; + +const SeverityPillRoot = styled('span')(({ theme, ownerState }) => { + const backgroundColor = theme.palette[ownerState.color].alpha12; + const color = theme.palette.mode === 'dark' + ? theme.palette[ownerState.color].main + : theme.palette[ownerState.color].dark; + + return { + alignItems: 'center', + backgroundColor, + borderRadius: 12, + color, + cursor: 'default', + display: 'inline-flex', + flexGrow: 0, + flexShrink: 0, + fontFamily: theme.typography.fontFamily, + fontSize: theme.typography.pxToRem(12), + lineHeight: 2, + fontWeight: 600, + justifyContent: 'center', + letterSpacing: 0.5, + minWidth: 20, + paddingLeft: theme.spacing(1), + paddingRight: theme.spacing(1), + textTransform: 'uppercase', + whiteSpace: 'nowrap' + }; +}); + +export const SeverityPill = (props) => { + const { color = 'primary', children, ...other } = props; + + const ownerState = { color }; + + return ( + + {children} + + ); +}; + +SeverityPill.propTypes = { + children: PropTypes.node, + color: PropTypes.oneOf([ + 'primary', + 'secondary', + 'error', + 'info', + 'warning', + 'success' + ]) +}; diff --git a/src/contexts/auth-context.js b/src/contexts/auth-context.js new file mode 100644 index 0000000..d79f0fb --- /dev/null +++ b/src/contexts/auth-context.js @@ -0,0 +1,185 @@ +import { createContext, useContext, useEffect, useReducer, useRef } from 'react'; +import PropTypes from 'prop-types'; + +const HANDLERS = { + INITIALIZE: 'INITIALIZE', + SIGN_IN: 'SIGN_IN', + SIGN_OUT: 'SIGN_OUT' +}; + +const initialState = { + isAuthenticated: false, + isLoading: true, + user: null +}; + +const handlers = { + [HANDLERS.INITIALIZE]: (state, action) => { + const user = action.payload; + + return { + ...state, + ...( + // if payload (user) is provided, then is authenticated + user + ? ({ + isAuthenticated: true, + isLoading: false, + user + }) + : ({ + isLoading: false + }) + ) + }; + }, + [HANDLERS.SIGN_IN]: (state, action) => { + const user = action.payload; + + return { + ...state, + isAuthenticated: true, + user + }; + }, + [HANDLERS.SIGN_OUT]: (state) => { + return { + ...state, + isAuthenticated: false, + user: null + }; + } +}; + +const reducer = (state, action) => ( + handlers[action.type] ? handlers[action.type](state, action) : state +); + +// The role of this context is to propagate authentication state through the App tree. + +export const AuthContext = createContext({ undefined }); + +export const AuthProvider = (props) => { + const { children } = props; + const [state, dispatch] = useReducer(reducer, initialState); + const initialized = useRef(false); + + const initialize = async () => { + // Prevent from calling twice in development mode with React.StrictMode enabled + if (initialized.current) { + return; + } + + initialized.current = true; + + let isAuthenticated = false; + + try { + isAuthenticated = window.sessionStorage.getItem('authenticated') === 'true'; + } catch (err) { + console.error(err); + } + + if (isAuthenticated) { + const user = { + id: '5e86809283e28b96d2d38537', + avatar: '/assets/avatars/avatar-anika-visser.png', + name: 'Anika Visser', + email: 'anika.visser@devias.io' + }; + + dispatch({ + type: HANDLERS.INITIALIZE, + payload: user + }); + } else { + dispatch({ + type: HANDLERS.INITIALIZE + }); + } + }; + + useEffect( + () => { + initialize(); + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [] + ); + + const skip = () => { + try { + window.sessionStorage.setItem('authenticated', 'true'); + } catch (err) { + console.error(err); + } + + const user = { + id: '5e86809283e28b96d2d38537', + avatar: '/assets/avatars/avatar-anika-visser.png', + name: 'Anika Visser', + email: 'anika.visser@devias.io' + }; + + dispatch({ + type: HANDLERS.SIGN_IN, + payload: user + }); + }; + + const signIn = async (email, password) => { + if (email !== 'demo@devias.io' || password !== 'Password123!') { + throw new Error('Please check your email and password'); + } + + try { + window.sessionStorage.setItem('authenticated', 'true'); + } catch (err) { + console.error(err); + } + + const user = { + id: '5e86809283e28b96d2d38537', + avatar: '/assets/avatars/avatar-anika-visser.png', + name: 'Anika Visser', + email: 'anika.visser@devias.io' + }; + + dispatch({ + type: HANDLERS.SIGN_IN, + payload: user + }); + }; + + const signUp = async (email, name, password) => { + throw new Error('Sign up is not implemented'); + }; + + const signOut = () => { + dispatch({ + type: HANDLERS.SIGN_OUT + }); + }; + + return ( + + {children} + + ); +}; + +AuthProvider.propTypes = { + children: PropTypes.node +}; + +export const AuthConsumer = AuthContext.Consumer; + +export const useAuthContext = () => useContext(AuthContext); diff --git a/src/guards/auth-guard.js b/src/guards/auth-guard.js new file mode 100644 index 0000000..2986068 --- /dev/null +++ b/src/guards/auth-guard.js @@ -0,0 +1,57 @@ +import { useEffect, useRef, useState } from 'react'; +import { useRouter } from 'next/router'; +import PropTypes from 'prop-types'; +import { useAuthContext } from 'src/contexts/auth-context'; + +export const AuthGuard = (props) => { + const { children } = props; + const router = useRouter(); + const { isAuthenticated } = useAuthContext(); + const ignore = useRef(false); + const [checked, setChecked] = useState(false); + + // Only do authentication check on component mount. + // This flow allows you to manually redirect the user after sign-out, otherwise this will be + // triggered and will automatically redirect to sign-in page. + + useEffect( + () => { + if (!router.isReady) { + return; + } + + // Prevent from calling twice in development mode with React.StrictMode enabled + if (ignore.current) { + return; + } + + ignore.current = true; + + if (!isAuthenticated) { + console.log('Not authenticated, redirecting'); + router + .replace({ + pathname: '/auth/login', + query: router.asPath !== '/' ? { continueUrl: router.asPath } : undefined + }) + .catch(console.error); + } else { + setChecked(true); + } + }, + [router.isReady] + ); + + if (!checked) { + return null; + } + + // If got here, it means that the redirect did not occur, and that tells us that the user is + // authenticated / authorized. + + return children; +}; + +AuthGuard.propTypes = { + children: PropTypes.node +}; diff --git a/src/hocs/with-auth-guard.js b/src/hocs/with-auth-guard.js new file mode 100644 index 0000000..32a7518 --- /dev/null +++ b/src/hocs/with-auth-guard.js @@ -0,0 +1,7 @@ +import { AuthGuard } from 'src/guards/auth-guard'; + +export const withAuthGuard = (Component) => (props) => ( + + + +); diff --git a/src/hooks/use-auth.js b/src/hooks/use-auth.js new file mode 100644 index 0000000..7cf048c --- /dev/null +++ b/src/hooks/use-auth.js @@ -0,0 +1,4 @@ +import { useContext } from 'react'; +import { AuthContext } from 'src/contexts/auth-context'; + +export const useAuth = () => useContext(AuthContext); diff --git a/src/hooks/use-mocked-user.js b/src/hooks/use-mocked-user.js new file mode 100644 index 0000000..d533ccd --- /dev/null +++ b/src/hooks/use-mocked-user.js @@ -0,0 +1,10 @@ +export const useMockedUser = () => { + // To get the user from the authContext, you can use + // `const { user } = useAuth();` + return { + id: '5e86809283e28b96d2d38537', + avatar: '/assets/avatars/avatar-anika-visser.png', + name: 'Anika Visser', + email: 'anika.visser@devias.io' + }; +}; diff --git a/src/hooks/use-nprogress.js b/src/hooks/use-nprogress.js new file mode 100644 index 0000000..701228a --- /dev/null +++ b/src/hooks/use-nprogress.js @@ -0,0 +1,17 @@ +import { useEffect } from 'react'; +import Router from 'next/router'; +import nProgress from 'nprogress'; + +export function useNProgress() { + useEffect(() => { + Router.events.on('routeChangeStart', nProgress.start); + Router.events.on('routeChangeError', nProgress.done); + Router.events.on('routeChangeComplete', nProgress.done); + + return () => { + Router.events.off('routeChangeStart', nProgress.start); + Router.events.off('routeChangeError', nProgress.done); + Router.events.off('routeChangeComplete', nProgress.done); + }; + }, []); +} diff --git a/src/hooks/use-popover.js b/src/hooks/use-popover.js new file mode 100644 index 0000000..a374004 --- /dev/null +++ b/src/hooks/use-popover.js @@ -0,0 +1,26 @@ +import { useCallback, useRef, useState } from 'react'; + +export function usePopover() { + const anchorRef = useRef(null); + const [open, setOpen] = useState(false); + + const handleOpen = useCallback(() => { + setOpen(true); + }, []); + + const handleClose = useCallback(() => { + setOpen(false); + }, []); + + const handleToggle = useCallback(() => { + setOpen((prevState) => !prevState); + }, []); + + return { + anchorRef, + handleClose, + handleOpen, + handleToggle, + open + }; +} diff --git a/src/hooks/use-selection.js b/src/hooks/use-selection.js new file mode 100644 index 0000000..f6b5fef --- /dev/null +++ b/src/hooks/use-selection.js @@ -0,0 +1,35 @@ +import { useCallback, useEffect, useState } from 'react'; + +export const useSelection = (items = []) => { + const [selected, setSelected] = useState([]); + + useEffect(() => { + setSelected([]); + }, [items]); + + const handleSelectAll = useCallback(() => { + setSelected([...items]); + }, [items]); + + const handleSelectOne = useCallback((item) => { + setSelected((prevState) => [...prevState, item]); + }, []); + + const handleDeselectAll = useCallback(() => { + setSelected([]); + }, []); + + const handleDeselectOne = useCallback((item) => { + setSelected((prevState) => { + return prevState.filter((_item) => _item !== item); + }); + }, []); + + return { + handleDeselectAll, + handleDeselectOne, + handleSelectAll, + handleSelectOne, + selected + }; +}; diff --git a/src/layouts/auth/layout.js b/src/layouts/auth/layout.js new file mode 100644 index 0000000..0708f3a --- /dev/null +++ b/src/layouts/auth/layout.js @@ -0,0 +1,111 @@ +import PropTypes from 'prop-types'; +import NextLink from 'next/link'; +import { Box, Typography, Unstable_Grid2 as Grid } from '@mui/material'; +import { Logo } from 'src/components/logo'; + +// TODO: Change subtitle text + +export const Layout = (props) => { + const { children } = props; + + return ( + + + + + + + + + {children} + + + + + Welcome to{' '} + + Refactor SE Coaching Platform + + + + Refactor your professional skills under the professional guidance of a coach. + + + + + + + ); +}; + +Layout.prototypes = { + children: PropTypes.node +}; \ No newline at end of file diff --git a/src/layouts/dashboard/account-popover.js b/src/layouts/dashboard/account-popover.js new file mode 100644 index 0000000..4f03272 --- /dev/null +++ b/src/layouts/dashboard/account-popover.js @@ -0,0 +1,71 @@ +import { useCallback } from 'react'; +import { useRouter } from 'next/navigation'; +import PropTypes from 'prop-types'; +import { Box, Divider, MenuItem, MenuList, Popover, Typography } from '@mui/material'; +import { useAuth } from 'src/hooks/use-auth'; + +export const AccountPopover = (props) => { + const { anchorEl, onClose, open } = props; + const router = useRouter(); + const auth = useAuth(); + + const handleSignOut = useCallback( + () => { + onClose?.(); + auth.signOut(); + router.push('/auth/login'); + }, + [onClose, auth, router] + ); + + return ( + + + + Account + + + Anika Visser + + + + *': { + borderRadius: 1 + } + }} + > + + Sign out + + + + ); +}; + +AccountPopover.propTypes = { + anchorEl: PropTypes.any, + onClose: PropTypes.func, + open: PropTypes.bool.isRequired +}; diff --git a/src/layouts/dashboard/config.js b/src/layouts/dashboard/config.js new file mode 100644 index 0000000..0e7896a --- /dev/null +++ b/src/layouts/dashboard/config.js @@ -0,0 +1,84 @@ +import ChartBarIcon from '@heroicons/react/24/solid/ChartBarIcon'; +import CogIcon from '@heroicons/react/24/solid/CogIcon'; +import LockClosedIcon from '@heroicons/react/24/solid/LockClosedIcon'; +import ShoppingBagIcon from '@heroicons/react/24/solid/ShoppingBagIcon'; +import UserIcon from '@heroicons/react/24/solid/UserIcon'; +import UserPlusIcon from '@heroicons/react/24/solid/UserPlusIcon'; +import UsersIcon from '@heroicons/react/24/solid/UsersIcon'; +import XCircleIcon from '@heroicons/react/24/solid/XCircleIcon'; +import { SvgIcon } from '@mui/material'; + +export const items = [ + { + title: 'Overview', + path: '/', + icon: ( + + + + ) + }, + { + title: 'Customers', + path: '/customers', + icon: ( + + + + ) + }, + { + title: 'Companies', + path: '/companies', + icon: ( + + + + ) + }, + { + title: 'Account', + path: '/account', + icon: ( + + + + ) + }, + { + title: 'Settings', + path: '/settings', + icon: ( + + + + ) + }, + { + title: 'Login', + path: '/auth/login', + icon: ( + + + + ) + }, + { + title: 'Register', + path: '/auth/register', + icon: ( + + + + ) + }, + { + title: 'Error', + path: '/404', + icon: ( + + + + ) + } +]; diff --git a/src/layouts/dashboard/layout.js b/src/layouts/dashboard/layout.js new file mode 100644 index 0000000..511839e --- /dev/null +++ b/src/layouts/dashboard/layout.js @@ -0,0 +1,62 @@ +import { useCallback, useEffect, useState } from 'react'; +import { usePathname } from 'next/navigation'; +import { styled } from '@mui/material/styles'; +import { withAuthGuard } from 'src/hocs/with-auth-guard'; +import { SideNav } from './side-nav'; +import { TopNav } from './top-nav'; + +const SIDE_NAV_WIDTH = 280; + +const LayoutRoot = styled('div')(({ theme }) => ({ + display: 'flex', + flex: '1 1 auto', + maxWidth: '100%', + [theme.breakpoints.up('lg')]: { + paddingLeft: SIDE_NAV_WIDTH + } +})); + +const LayoutContainer = styled('div')({ + display: 'flex', + flex: '1 1 auto', + flexDirection: 'column', + width: '100%' +}); + +export const Layout = withAuthGuard((props) => { + const { children } = props; + const pathname = usePathname(); + const [openNav, setOpenNav] = useState(false); + + const handlePathnameChange = useCallback( + () => { + if (openNav) { + setOpenNav(false); + } + }, + [openNav] + ); + + useEffect( + () => { + handlePathnameChange(); + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [pathname] + ); + + return ( + <> + setOpenNav(true)} /> + setOpenNav(false)} + open={openNav} + /> + + + {children} + + + + ); +}); diff --git a/src/layouts/dashboard/side-nav-item.js b/src/layouts/dashboard/side-nav-item.js new file mode 100644 index 0000000..560be19 --- /dev/null +++ b/src/layouts/dashboard/side-nav-item.js @@ -0,0 +1,92 @@ +import NextLink from 'next/link'; +import PropTypes from 'prop-types'; +import { Box, ButtonBase } from '@mui/material'; + +export const SideNavItem = (props) => { + const { active = false, disabled, external, icon, path, title } = props; + + const linkProps = path + ? external + ? { + component: 'a', + href: path, + target: '_blank' + } + : { + component: NextLink, + href: path + } + : {}; + + return ( +
  • + + {icon && ( + + {icon} + + )} + theme.typography.fontFamily, + fontSize: 14, + fontWeight: 600, + lineHeight: '24px', + whiteSpace: 'nowrap', + ...(active && { + color: 'common.white' + }), + ...(disabled && { + color: 'neutral.500' + }) + }} + > + {title} + + +
  • + ); +}; + +SideNavItem.propTypes = { + active: PropTypes.bool, + disabled: PropTypes.bool, + external: PropTypes.bool, + icon: PropTypes.node, + path: PropTypes.string, + title: PropTypes.string.isRequired +}; diff --git a/src/layouts/dashboard/side-nav.js b/src/layouts/dashboard/side-nav.js new file mode 100644 index 0000000..a50ba61 --- /dev/null +++ b/src/layouts/dashboard/side-nav.js @@ -0,0 +1,223 @@ +import NextLink from 'next/link'; +import { usePathname } from 'next/navigation'; +import PropTypes from 'prop-types'; +import ArrowTopRightOnSquareIcon from '@heroicons/react/24/solid/ArrowTopRightOnSquareIcon'; +import ChevronUpDownIcon from '@heroicons/react/24/solid/ChevronUpDownIcon'; +import { + Box, + Button, + Divider, + Drawer, + Stack, + SvgIcon, + Typography, + useMediaQuery +} from '@mui/material'; +import { Logo } from 'src/components/logo'; +import { Scrollbar } from 'src/components/scrollbar'; +import { items } from './config'; +import { SideNavItem } from './side-nav-item'; + +export const SideNav = (props) => { + const { open, onClose } = props; + const pathname = usePathname(); + const lgUp = useMediaQuery((theme) => theme.breakpoints.up('lg')); + + const content = ( + + + + + + + +
    + + Devias + + + Production + +
    + + + +
    +
    + + + + {items.map((item) => { + const active = item.path ? (pathname === item.path) : false; + + return ( + + ); + })} + + + + + + Need more features? + + + Check out our Pro solution template. + + + Go to pro + + + +
    +
    + ); + + if (lgUp) { + return ( + + {content} + + ); + } + + return ( + theme.zIndex.appBar + 100 }} + variant="temporary" + > + {content} + + ); +}; + +SideNav.propTypes = { + onClose: PropTypes.func, + open: PropTypes.bool +}; diff --git a/src/layouts/dashboard/top-nav.js b/src/layouts/dashboard/top-nav.js new file mode 100644 index 0000000..d5a0623 --- /dev/null +++ b/src/layouts/dashboard/top-nav.js @@ -0,0 +1,125 @@ +import PropTypes from 'prop-types'; +import BellIcon from '@heroicons/react/24/solid/BellIcon'; +import UsersIcon from '@heroicons/react/24/solid/UsersIcon'; +import Bars3Icon from '@heroicons/react/24/solid/Bars3Icon'; +import MagnifyingGlassIcon from '@heroicons/react/24/solid/MagnifyingGlassIcon'; +import { + Avatar, + Badge, + Box, + IconButton, + Stack, + SvgIcon, + Tooltip, + useMediaQuery +} from '@mui/material'; +import { alpha } from '@mui/material/styles'; +import { usePopover } from 'src/hooks/use-popover'; +import { AccountPopover } from './account-popover'; + +const SIDE_NAV_WIDTH = 280; +const TOP_NAV_HEIGHT = 64; + +export const TopNav = (props) => { + const { onNavOpen } = props; + const lgUp = useMediaQuery((theme) => theme.breakpoints.up('lg')); + const accountPopover = usePopover(); + + return ( + <> + alpha(theme.palette.background.default, 0.8), + position: 'sticky', + left: { + lg: `${SIDE_NAV_WIDTH}px` + }, + top: 0, + width: { + lg: `calc(100% - ${SIDE_NAV_WIDTH}px)` + }, + zIndex: (theme) => theme.zIndex.appBar + }} + > + + + {!lgUp && ( + + + + + + )} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +TopNav.propTypes = { + onNavOpen: PropTypes.func +}; diff --git a/src/pages/404.js b/src/pages/404.js new file mode 100644 index 0000000..e07e7df --- /dev/null +++ b/src/pages/404.js @@ -0,0 +1,80 @@ +import Head from 'next/head'; +import NextLink from 'next/link'; +import ArrowLeftIcon from '@heroicons/react/24/solid/ArrowLeftIcon'; +import { Box, Button, Container, SvgIcon, Typography } from '@mui/material'; + +const Page = () => ( + <> + + + 404 | Devias Kit + + + + + + + Under development + + + 404: The page you are looking for isn’t here + + + You either tried some shady route or you came here by mistake. + Whichever it is, try using the navigation + + + + + + +); + +export default Page; diff --git a/src/pages/_app.js b/src/pages/_app.js new file mode 100644 index 0000000..98756d1 --- /dev/null +++ b/src/pages/_app.js @@ -0,0 +1,55 @@ +import Head from 'next/head'; +import { CacheProvider } from '@emotion/react'; +import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; +import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'; +import { CssBaseline } from '@mui/material'; +import { ThemeProvider } from '@mui/material/styles'; +import { AuthConsumer, AuthProvider } from 'src/contexts/auth-context'; +import { useNProgress } from 'src/hooks/use-nprogress'; +import { createTheme } from 'src/theme'; +import { createEmotionCache } from 'src/utils/create-emotion-cache'; +import 'simplebar-react/dist/simplebar.min.css'; + +const clientSideEmotionCache = createEmotionCache(); + +const SplashScreen = () => null; + +const App = (props) => { + const { Component, emotionCache = clientSideEmotionCache, pageProps } = props; + + useNProgress(); + + const getLayout = Component.getLayout ?? ((page) => page); + + const theme = createTheme(); + + return ( + + + + Devias Kit + + + + + + + + + { + (auth) => auth.isLoading + ? + : getLayout() + } + + + + + + ); +}; + +export default App; diff --git a/src/pages/_document.js b/src/pages/_document.js new file mode 100644 index 0000000..4c67eaa --- /dev/null +++ b/src/pages/_document.js @@ -0,0 +1,105 @@ +import { Children } from 'react'; +import Document, { Head, Html, Main, NextScript } from 'next/document'; +import createEmotionServer from '@emotion/server/create-instance'; +import { createEmotionCache } from 'src/utils/create-emotion-cache'; + +const Favicon = () => ( + <> + + + + + +); + +const Fonts = () => ( + <> + + + + + + +); + +class CustomDocument extends Document { + render() { + return ( + + + + + + +
    + + + + ); + } +} + +CustomDocument.getInitialProps = async (ctx) => { + const originalRenderPage = ctx.renderPage; + const cache = createEmotionCache(); + const { extractCriticalToChunks } = createEmotionServer(cache); + + ctx.renderPage = () => originalRenderPage({ + enhanceApp: (App) => (props) => ( + + ) + }); + + const initialProps = await Document.getInitialProps(ctx); + const emotionStyles = extractCriticalToChunks(initialProps.html); + const emotionStyleTags = emotionStyles.styles.map((style) => ( +