From bf3dab00302fb779359eeda5eb927214e68bb3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Tue, 11 Jul 2023 11:48:50 +0200 Subject: [PATCH] feat: new admin (#4058) * feat: new admin * feat: wip * feat: wip * feat: wip * feat: wip --------- Co-authored-by: Sebastien Vanvelthem --- .ncurc.yml | 2 +- .yarnrc.yml | 8 - apps/nextjs-app/.eslintrc.cjs | 1 + apps/nextjs-app/.size-limit.cjs | 2 +- apps/nextjs-app/package.json | 9 +- .../src/components/avatar/TextAvatar.tsx | 33 ++ .../nextjs-app/src/config/next-auth.config.ts | 5 +- .../features/admin/layouts/AdminLayout.tsx | 2 +- .../features/admin/pages/AdminMainPage.tsx | 21 +- .../features/auth/components/LoginForm.tsx | 217 ++++++--- .../src/features/auth/pages/LoginPage.tsx | 5 +- .../src/features/demo/pages/DemoPage.tsx | 2 +- .../src/features/home/pages/HomePage.tsx | 2 +- .../src/layouts/admin/AdminLayout.tsx | 12 + .../src/layouts/admin/AdminSidebar.tsx | 413 ++++++++++++++++++ apps/nextjs-app/src/layouts/admin/index.ts | 1 + .../layout => layouts/main}/MainFooter.tsx | 0 .../layout => layouts/main}/MainLayout.tsx | 2 +- .../main}/__tests__/MainLayout.test.tsx | 2 +- .../layout => layouts/main}/index.ts | 0 apps/nextjs-app/tailwind.config.ts | 1 + apps/nextjs-app/tsconfig.json | 1 + apps/remix-app/package.json | 2 +- apps/vite-app/package.json | 4 +- package.json | 8 +- packages/api-gateway/package.json | 2 +- packages/common-i18n/package.json | 2 +- packages/core-lib/package.json | 4 +- packages/eslint-config-bases/package.json | 4 +- packages/ts-utils/package.json | 2 +- packages/ui-lib/package.json | 2 +- yarn.lock | 109 +++-- 32 files changed, 737 insertions(+), 143 deletions(-) create mode 100644 apps/nextjs-app/src/components/avatar/TextAvatar.tsx create mode 100644 apps/nextjs-app/src/layouts/admin/AdminLayout.tsx create mode 100644 apps/nextjs-app/src/layouts/admin/AdminSidebar.tsx create mode 100644 apps/nextjs-app/src/layouts/admin/index.ts rename apps/nextjs-app/src/{components/layout => layouts/main}/MainFooter.tsx (100%) rename apps/nextjs-app/src/{components/layout => layouts/main}/MainLayout.tsx (81%) rename apps/nextjs-app/src/{components/layout => layouts/main}/__tests__/MainLayout.test.tsx (84%) rename apps/nextjs-app/src/{components/layout => layouts/main}/index.ts (100%) diff --git a/.ncurc.yml b/.ncurc.yml index 8b5d2f13ec4..f2b1b1c0def 100644 --- a/.ncurc.yml +++ b/.ncurc.yml @@ -3,4 +3,4 @@ # @link https://github.com/raineorshine/npm-check-updates # Add here exclusions on packages if any -reject: [] +reject: ['@typescript-eslint/eslint-plugin', '@typescript-eslint/parser'] diff --git a/.yarnrc.yml b/.yarnrc.yml index 9273e86e312..91781200a6f 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,11 +1,3 @@ -injectEnvironmentFiles: [] -changesetBaseRefs: - - origin/main - -changesetIgnorePatterns: - - '**/*.test.{js,ts}' - - '**/*.spec.{js,ts}' - compressionLevel: mixed defaultSemverRangePrefix: '' diff --git a/apps/nextjs-app/.eslintrc.cjs b/apps/nextjs-app/.eslintrc.cjs index a0f5658efc9..8dee3768e61 100644 --- a/apps/nextjs-app/.eslintrc.cjs +++ b/apps/nextjs-app/.eslintrc.cjs @@ -36,6 +36,7 @@ module.exports = { // For the sake of example // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md 'jsx-a11y/anchor-is-valid': 'off', + 'jsx-a11y/label-has-associated-control': 'off', }, overrides: [ { diff --git a/apps/nextjs-app/.size-limit.cjs b/apps/nextjs-app/.size-limit.cjs index 051472480ee..49461dc771f 100644 --- a/apps/nextjs-app/.size-limit.cjs +++ b/apps/nextjs-app/.size-limit.cjs @@ -43,6 +43,6 @@ module.exports = [ { name: 'CSS', path: ['.next/static/css/**/*.css'], - limit: '10 kB', + limit: '15 kB', }, ]; diff --git a/apps/nextjs-app/package.json b/apps/nextjs-app/package.json index 4c502b3c473..6c868826d4e 100644 --- a/apps/nextjs-app/package.json +++ b/apps/nextjs-app/package.json @@ -98,7 +98,8 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-hook-form": "7.45.1", - "react-i18next": "13.0.1", + "react-i18next": "13.0.2", + "rippleui": "1.12.1", "rooks": "7.14.1", "sharp": "0.32.1", "superjson": "1.12.4", @@ -121,13 +122,13 @@ "@testing-library/react": "14.0.0", "@testing-library/user-event": "14.4.3", "@types/cors": "2.8.13", - "@types/jest": "29.5.2", + "@types/jest": "29.5.3", "@types/node": "20.4.1", "@types/react": "18.2.14", "@types/react-dom": "18.2.6", "@types/react-test-renderer": "18.0.0", "@types/testing-library__jest-dom": "5.14.7", - "@vitejs/plugin-react": "4.0.2", + "@vitejs/plugin-react": "4.0.3", "@vitest/coverage-istanbul": "0.33.0", "@vitest/ui": "0.33.0", "autoprefixer": "10.4.14", @@ -138,7 +139,7 @@ "eslint": "8.44.0", "eslint-config-next": "13.4.9", "get-tsconfig": "4.6.2", - "happy-dom": "10.0.3", + "happy-dom": "10.1.1", "jest": "29.6.1", "jest-css-modules-transform": "4.4.2", "npm-run-all": "4.1.5", diff --git a/apps/nextjs-app/src/components/avatar/TextAvatar.tsx b/apps/nextjs-app/src/components/avatar/TextAvatar.tsx new file mode 100644 index 00000000000..c775a0df810 --- /dev/null +++ b/apps/nextjs-app/src/components/avatar/TextAvatar.tsx @@ -0,0 +1,33 @@ +import type { FC } from 'react'; + +type FullName = { + firstName: string; + lastName?: string; +}; + +type Props = { + name: string | FullName; + className?: string; +}; + +const mapToFullName = (nameOrFullName: string | FullName): FullName => { + if (typeof nameOrFullName === 'string') { + const [firstName, lastName] = nameOrFullName.split(' '); + return { + firstName, + lastName, + }; + } + return nameOrFullName; +}; + +export const TextAvatar: FC = (props) => { + const { name, className = '' } = props; + const { firstName, lastName } = mapToFullName(name); + return ( +
+ {firstName} + {lastName} +
+ ); +}; diff --git a/apps/nextjs-app/src/config/next-auth.config.ts b/apps/nextjs-app/src/config/next-auth.config.ts index 069612a3457..9d7bcb917f2 100644 --- a/apps/nextjs-app/src/config/next-auth.config.ts +++ b/apps/nextjs-app/src/config/next-auth.config.ts @@ -24,7 +24,10 @@ export const nextAuthConfig: NextAuthOptions = { async authorize(credentials, _req) { if (!credentials) throw new HttpUnauthorized('No credentials provided'); const { username, password } = credentials ?? {}; - if (username === 'admin' && password === 'demo') { + if ( + ['admin', 'admin@example.com'].includes(username) && + password === 'demo' + ) { return { id: '1', name: 'admin', diff --git a/apps/nextjs-app/src/features/admin/layouts/AdminLayout.tsx b/apps/nextjs-app/src/features/admin/layouts/AdminLayout.tsx index f17a6988ef2..309a02a61ac 100644 --- a/apps/nextjs-app/src/features/admin/layouts/AdminLayout.tsx +++ b/apps/nextjs-app/src/features/admin/layouts/AdminLayout.tsx @@ -1,5 +1,5 @@ import type { FC, PropsWithChildren } from 'react'; -import { MainLayout } from '@/components/layout'; +import { MainLayout } from '@/layouts/main'; export const AdminLayout: FC = (props) => { const { children } = props; diff --git a/apps/nextjs-app/src/features/admin/pages/AdminMainPage.tsx b/apps/nextjs-app/src/features/admin/pages/AdminMainPage.tsx index b5d4305d6a1..22fa112371b 100644 --- a/apps/nextjs-app/src/features/admin/pages/AdminMainPage.tsx +++ b/apps/nextjs-app/src/features/admin/pages/AdminMainPage.tsx @@ -2,21 +2,24 @@ import { useTranslation } from 'next-i18next'; import { NextSeo } from 'next-seo'; import type { FC } from 'react'; import { adminConfig } from '@/features/admin/admin.config'; +import { AdminLayout } from '@/layouts/admin'; export const AdminMainPage: FC = () => { const { t } = useTranslation(adminConfig.i18nNamespaces); return ( <> -

This page is protected by Middleware

-

Only admin users can see this page.

-

- To learn more about the NextAuth middleware see  - - the docs - - . -

+ +

This page is protected by Middleware

+

Only admin users can see this page.

+

+ To learn more about the NextAuth middleware see  + + the docs + + . +

+
); }; diff --git a/apps/nextjs-app/src/features/auth/components/LoginForm.tsx b/apps/nextjs-app/src/features/auth/components/LoginForm.tsx index 67cbb50d6ac..ac851a878ab 100644 --- a/apps/nextjs-app/src/features/auth/components/LoginForm.tsx +++ b/apps/nextjs-app/src/features/auth/components/LoginForm.tsx @@ -7,18 +7,26 @@ import { useState } from 'react'; import { useForm } from 'react-hook-form'; import { z } from 'zod'; -type Props = { - /** Something */ -}; - const loginFormSchema = z.object({ - username: z.string().min(2, { message: 'Minimum 2 chars' }), + username: z.string().min(2, { message: 'Minimum 2 chars' }).email({ + message: 'Invalid email', + }), password: z.string().min(4, { message: 'Minimum 4 chars' }), }); export type LoginFormValues = z.infer; -export const LoginForm: FC = (_props) => { +type Props = { + /** in case of success, redirect to this page */ + redirectToPage?: string; +}; + +const defaultProps = { + redirectToPage: '/', +} satisfies Props; + +export const LoginForm: FC = (props) => { + const { redirectToPage } = { ...defaultProps, ...props }; const router = useRouter(); const [error, setError] = useState(null); const { @@ -46,58 +54,163 @@ export const LoginForm: FC = (_props) => { } = result ?? {}; if (ok) { - console.log('Will redirect to ' + url); - router.push('/'); + router.push(redirectToPage); } else { setError(`${status} - ${error}`); } }; return ( -
- - - - {error &&
{error}
} + +
+

Sign in with

+
+ + + +
+
+
or continue with
+ +
+
+ + + + {errors?.username && ( +

{errors.username.message}

+ )} + +
+
+ +
+ + {errors?.password && ( +

{errors.password.message}

+ )} +
+
+ +
+
+ + {error &&
{error}
} +
+
+ + +
); }; diff --git a/apps/nextjs-app/src/features/auth/pages/LoginPage.tsx b/apps/nextjs-app/src/features/auth/pages/LoginPage.tsx index 951708f337b..27416a8c9ab 100644 --- a/apps/nextjs-app/src/features/auth/pages/LoginPage.tsx +++ b/apps/nextjs-app/src/features/auth/pages/LoginPage.tsx @@ -4,13 +4,14 @@ import type { FC } from 'react'; import { authConfig } from '@/features/auth/auth.config'; import { LoginForm } from '@/features/auth/components/LoginForm'; -export const LoginPage: FC = () => { +export const LoginPage: FC = (props) => { const { t } = useTranslation(authConfig.i18nNamespaces); + const redirectToPage = '/admin'; return ( <>
- +
); diff --git a/apps/nextjs-app/src/features/demo/pages/DemoPage.tsx b/apps/nextjs-app/src/features/demo/pages/DemoPage.tsx index 42668ad5d33..913dba72ff9 100644 --- a/apps/nextjs-app/src/features/demo/pages/DemoPage.tsx +++ b/apps/nextjs-app/src/features/demo/pages/DemoPage.tsx @@ -5,7 +5,7 @@ import { useTranslation } from 'next-i18next'; import { NextSeo } from 'next-seo'; import type { FC } from 'react'; import { Banner } from '@/components/banner/Banner'; -import { MainLayout } from '@/components/layout/MainLayout'; +import { MainLayout } from '@/layouts/main'; import { DemoMuiBlock, Jumbotron, PoetryBlock } from '../blocks'; import { demoConfig } from '../demo.config'; diff --git a/apps/nextjs-app/src/features/home/pages/HomePage.tsx b/apps/nextjs-app/src/features/home/pages/HomePage.tsx index b02463e3265..a8e7fc9d0e4 100644 --- a/apps/nextjs-app/src/features/home/pages/HomePage.tsx +++ b/apps/nextjs-app/src/features/home/pages/HomePage.tsx @@ -2,7 +2,7 @@ import { useTranslation } from 'next-i18next'; import { NextSeo } from 'next-seo'; import type { FC } from 'react'; import { Banner } from '@/components/banner/Banner'; -import { MainLayout } from '@/components/layout/MainLayout'; +import { MainLayout } from '@/layouts/main'; import { CtaBlock, FeaturesBlock, HeroBlock } from '../blocks'; import { homeConfig } from '../home.config'; diff --git a/apps/nextjs-app/src/layouts/admin/AdminLayout.tsx b/apps/nextjs-app/src/layouts/admin/AdminLayout.tsx new file mode 100644 index 00000000000..b5670d7a2e5 --- /dev/null +++ b/apps/nextjs-app/src/layouts/admin/AdminLayout.tsx @@ -0,0 +1,12 @@ +import type { FC, ReactNode } from 'react'; +import { AdminSidebar } from '@/layouts/admin/AdminSidebar'; + +export const AdminLayout: FC<{ children: ReactNode }> = (props) => { + const { children } = props; + return ( +
+ +
{children}
+
+ ); +}; diff --git a/apps/nextjs-app/src/layouts/admin/AdminSidebar.tsx b/apps/nextjs-app/src/layouts/admin/AdminSidebar.tsx new file mode 100644 index 00000000000..0679a56a18e --- /dev/null +++ b/apps/nextjs-app/src/layouts/admin/AdminSidebar.tsx @@ -0,0 +1,413 @@ +import { useSession } from 'next-auth/react'; +import type { FC } from 'react'; +import { TextAvatar } from '@/components/avatar/TextAvatar'; + +export const AdminSidebar: FC = () => { + // @todo better to use middleware or https://next-auth.js.org/getting-started/client#custom-client-session-handling + const { data: session, status } = useSession(); + const user = session?.user; + return ( +
+
+ + + +
+
+
+ +
+ +
+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ ); +}; diff --git a/apps/nextjs-app/src/layouts/admin/index.ts b/apps/nextjs-app/src/layouts/admin/index.ts new file mode 100644 index 00000000000..6d4e2c27f33 --- /dev/null +++ b/apps/nextjs-app/src/layouts/admin/index.ts @@ -0,0 +1 @@ +export { AdminLayout } from './AdminLayout'; diff --git a/apps/nextjs-app/src/components/layout/MainFooter.tsx b/apps/nextjs-app/src/layouts/main/MainFooter.tsx similarity index 100% rename from apps/nextjs-app/src/components/layout/MainFooter.tsx rename to apps/nextjs-app/src/layouts/main/MainFooter.tsx diff --git a/apps/nextjs-app/src/components/layout/MainLayout.tsx b/apps/nextjs-app/src/layouts/main/MainLayout.tsx similarity index 81% rename from apps/nextjs-app/src/components/layout/MainLayout.tsx rename to apps/nextjs-app/src/layouts/main/MainLayout.tsx index f391c6baad7..fdd63fb80bb 100644 --- a/apps/nextjs-app/src/components/layout/MainLayout.tsx +++ b/apps/nextjs-app/src/layouts/main/MainLayout.tsx @@ -1,5 +1,5 @@ import type { FC, ReactNode } from 'react'; -import { MainFooter } from '@/components/layout/MainFooter'; +import { MainFooter } from './MainFooter'; export const MainLayout: FC<{ children: ReactNode }> = (props) => { const { children } = props; diff --git a/apps/nextjs-app/src/components/layout/__tests__/MainLayout.test.tsx b/apps/nextjs-app/src/layouts/main/__tests__/MainLayout.test.tsx similarity index 84% rename from apps/nextjs-app/src/components/layout/__tests__/MainLayout.test.tsx rename to apps/nextjs-app/src/layouts/main/__tests__/MainLayout.test.tsx index 84481b21499..d4955020952 100644 --- a/apps/nextjs-app/src/components/layout/__tests__/MainLayout.test.tsx +++ b/apps/nextjs-app/src/layouts/main/__tests__/MainLayout.test.tsx @@ -1,5 +1,5 @@ -import { MainLayout } from '@/components/layout/MainLayout'; import { render, screen } from '@/test-utils'; +import { MainLayout } from '../MainLayout'; describe('main layout tests', () => { it('should render children', async () => { diff --git a/apps/nextjs-app/src/components/layout/index.ts b/apps/nextjs-app/src/layouts/main/index.ts similarity index 100% rename from apps/nextjs-app/src/components/layout/index.ts rename to apps/nextjs-app/src/layouts/main/index.ts diff --git a/apps/nextjs-app/tailwind.config.ts b/apps/nextjs-app/tailwind.config.ts index 86c4588cffc..e1c0d2d66b4 100644 --- a/apps/nextjs-app/tailwind.config.ts +++ b/apps/nextjs-app/tailwind.config.ts @@ -41,6 +41,7 @@ const tailwindConfig: Config = { require('@tailwindcss/typography'), require('@tailwindcss/aspect-ratio'), require('@tailwindcss/forms'), + require('rippleui'), ], }; diff --git a/apps/nextjs-app/tsconfig.json b/apps/nextjs-app/tsconfig.json index 343c0285ddc..d0267f20bb8 100644 --- a/apps/nextjs-app/tsconfig.json +++ b/apps/nextjs-app/tsconfig.json @@ -17,6 +17,7 @@ "@/components/*": ["./components/*"], "@/backend/*": ["./backend/*"], "@/features/*": ["./features/*"], + "@/layouts/*": ["./layouts/*"], "@/pages/*": ["./pages/*"], "@/public/*": ["../public/*"], "@/themes/*": ["./themes/*"], diff --git a/apps/remix-app/package.json b/apps/remix-app/package.json index 4b40aea6761..3923a4745f7 100644 --- a/apps/remix-app/package.json +++ b/apps/remix-app/package.json @@ -60,7 +60,7 @@ "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "14.0.0", "@testing-library/user-event": "14.4.3", - "@types/jest": "29.5.2", + "@types/jest": "29.5.3", "@types/node": "20.4.1", "@types/react": "18.2.14", "@types/react-dom": "18.2.6", diff --git a/apps/vite-app/package.json b/apps/vite-app/package.json index 0f8fecb0931..078c6b127e4 100644 --- a/apps/vite-app/package.json +++ b/apps/vite-app/package.json @@ -27,12 +27,12 @@ "@babel/core": "7.22.8", "@types/react": "18.2.14", "@types/react-dom": "18.2.6", - "@vitejs/plugin-react": "4.0.2", + "@vitejs/plugin-react": "4.0.3", "@vitest/coverage-istanbul": "0.33.0", "@vitest/ui": "0.33.0", "@your-org/eslint-config-bases": "workspace:^", "eslint": "8.44.0", - "happy-dom": "10.0.3", + "happy-dom": "10.1.1", "prettier": "3.0.0", "rimraf": "5.0.1", "typescript": "5.1.6", diff --git a/package.json b/package.json index 9704546458b..54364244e57 100644 --- a/package.json +++ b/package.json @@ -103,5 +103,11 @@ "workspaces": [ "apps/*", "packages/*" - ] + ], + "resolutions?": { + "eslint-plugin-react-hooks": "https://github.com/vercel/next.js/issues/52365" + }, + "resolutions": { + "eslint-plugin-react-hooks": "4.6.0" + } } diff --git a/packages/api-gateway/package.json b/packages/api-gateway/package.json index f0eb397e683..3fda3b81f79 100644 --- a/packages/api-gateway/package.json +++ b/packages/api-gateway/package.json @@ -33,7 +33,7 @@ "@graphql-mesh/runtime": "^0.95.1" }, "devDependencies": { - "@types/jest": "29.5.2", + "@types/jest": "29.5.3", "@types/node": "20.4.1", "@your-org/eslint-config-bases": "workspace:^", "cross-env": "7.0.3", diff --git a/packages/common-i18n/package.json b/packages/common-i18n/package.json index 923ee88c853..873ecf4f144 100644 --- a/packages/common-i18n/package.json +++ b/packages/common-i18n/package.json @@ -28,7 +28,7 @@ "typecheck": "tsc --project ./tsconfig.json --noEmit" }, "devDependencies": { - "@types/jest": "29.5.2", + "@types/jest": "29.5.3", "@types/node": "20.4.1", "@your-org/eslint-config-bases": "workspace:^", "cross-env": "7.0.3", diff --git a/packages/core-lib/package.json b/packages/core-lib/package.json index 85f38a8fd7a..03eca95dbb4 100644 --- a/packages/core-lib/package.json +++ b/packages/core-lib/package.json @@ -38,11 +38,11 @@ "@testing-library/dom": "9.3.1", "@testing-library/react": "14.0.0", "@testing-library/user-event": "14.4.3", - "@types/jest": "29.5.2", + "@types/jest": "29.5.3", "@types/node": "20.4.1", "@types/react": "18.2.14", "@types/react-dom": "18.2.6", - "@vitejs/plugin-react": "4.0.2", + "@vitejs/plugin-react": "4.0.3", "@vitest/coverage-istanbul": "0.33.0", "@vitest/ui": "0.33.0", "@your-org/eslint-config-bases": "workspace:^", diff --git a/packages/eslint-config-bases/package.json b/packages/eslint-config-bases/package.json index 14e146ed6fb..006e46d2859 100644 --- a/packages/eslint-config-bases/package.json +++ b/packages/eslint-config-bases/package.json @@ -73,7 +73,7 @@ "eslint-plugin-jest-formatting": "^3.1.0", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-playwright": "^0.15.3", - "eslint-plugin-prettier": "^5.0.0-alpha.2", + "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-regexp": "^1.15.0", @@ -85,7 +85,7 @@ "devDependencies": { "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "14.0.0", - "@types/jest": "29.5.2", + "@types/jest": "29.5.3", "@types/node": "20.4.1", "@types/prettier": "2.7.3", "@types/react": "18.2.14", diff --git a/packages/ts-utils/package.json b/packages/ts-utils/package.json index 8fa5d15ee86..75b02d42e7d 100644 --- a/packages/ts-utils/package.json +++ b/packages/ts-utils/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@size-limit/file": "8.2.6", - "@types/jest": "29.5.2", + "@types/jest": "29.5.3", "@types/node": "20.4.1", "@vitest/coverage-istanbul": "0.33.0", "@your-org/eslint-config-bases": "workspace:^", diff --git a/packages/ui-lib/package.json b/packages/ui-lib/package.json index 1cb8197b305..d12e5f538a7 100644 --- a/packages/ui-lib/package.json +++ b/packages/ui-lib/package.json @@ -49,7 +49,7 @@ "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "14.0.0", "@testing-library/user-event": "14.4.3", - "@types/jest": "29.5.2", + "@types/jest": "29.5.3", "@types/node": "20.4.1", "@types/react": "18.2.14", "@types/react-dom": "18.2.6", diff --git a/yarn.lock b/yarn.lock index 730b0a3c52b..e4fca9f31ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7776,13 +7776,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:*, @types/jest@npm:29.5.2": - version: 29.5.2 - resolution: "@types/jest@npm:29.5.2" +"@types/jest@npm:*, @types/jest@npm:29.5.3": + version: 29.5.3 + resolution: "@types/jest@npm:29.5.3" dependencies: expect: "npm:^29.0.0" pretty-format: "npm:^29.0.0" - checksum: c45d1f2825b31c87b479d6ea0e22d0353c11c547f02c85e504623550527460e4fc572cd566374c4c00fcff2c8a022ef71c4b52545ccb03118b603b3c1e4e884f + checksum: e8b4eda3ba379b21fcd5c2d1d531ec94f636676f1690f06ff3f7b8dc199c2cec711d4c4e122175f05d50040e5dec69f3c13ef88bd825f0b1a1ac1332eb072c12 languageName: node linkType: hard @@ -7944,6 +7944,15 @@ __metadata: languageName: node linkType: hard +"@types/postcss-js@npm:^4.0.0": + version: 4.0.1 + resolution: "@types/postcss-js@npm:4.0.1" + dependencies: + postcss: "npm:^8.3.3" + checksum: 2d21e0e420d7ce57b2431ee531392fbbd43004aac455253a3b6d7dd17dcd7363dbac2ab2fe960bcec660058891998f0d8bc7f0788d13ac4ac3a41911628ab8c2 + languageName: node + linkType: hard + "@types/prettier@npm:2.7.3, @types/prettier@npm:^2.1.5": version: 2.7.3 resolution: "@types/prettier@npm:2.7.3" @@ -8344,9 +8353,9 @@ __metadata: languageName: node linkType: hard -"@vitejs/plugin-react@npm:4.0.2": - version: 4.0.2 - resolution: "@vitejs/plugin-react@npm:4.0.2" +"@vitejs/plugin-react@npm:4.0.3": + version: 4.0.3 + resolution: "@vitejs/plugin-react@npm:4.0.3" dependencies: "@babel/core": "npm:^7.22.5" "@babel/plugin-transform-react-jsx-self": "npm:^7.22.5" @@ -8354,7 +8363,7 @@ __metadata: react-refresh: "npm:^0.14.0" peerDependencies: vite: ^4.2.0 - checksum: aa73b825c8b3c9276d79a586ee6ee1d6befb22ec5722d45e72a0b8fdf5836f2fc2b6b250dc88b5a09c15eeae17a82ee4ca76fff4237aedb9fa6f959f09197024 + checksum: 631dc348a84cfb4617c38c8d40ce1eb6c4f14e95f98b20151eebf5a046fed47a1a2f9b293b3675be9cf8eecbd289e8987cbaf54f3a3610181ae90ec7b54646e6 languageName: node linkType: hard @@ -8524,7 +8533,7 @@ __metadata: "@graphql-mesh/cli": "npm:^0.85.1" "@graphql-mesh/openapi": "npm:^0.94.7" "@graphql-mesh/runtime": "npm:^0.95.1" - "@types/jest": "npm:29.5.2" + "@types/jest": "npm:29.5.3" "@types/node": "npm:20.4.1" "@your-org/eslint-config-bases": "workspace:^" cross-env: "npm:7.0.3" @@ -8546,7 +8555,7 @@ __metadata: version: 0.0.0-use.local resolution: "@your-org/common-i18n@workspace:packages/common-i18n" dependencies: - "@types/jest": "npm:29.5.2" + "@types/jest": "npm:29.5.3" "@types/node": "npm:20.4.1" "@your-org/eslint-config-bases": "workspace:^" cross-env: "npm:7.0.3" @@ -8565,11 +8574,11 @@ __metadata: "@testing-library/dom": "npm:9.3.1" "@testing-library/react": "npm:14.0.0" "@testing-library/user-event": "npm:14.4.3" - "@types/jest": "npm:29.5.2" + "@types/jest": "npm:29.5.3" "@types/node": "npm:20.4.1" "@types/react": "npm:18.2.14" "@types/react-dom": "npm:18.2.6" - "@vitejs/plugin-react": "npm:4.0.2" + "@vitejs/plugin-react": "npm:4.0.3" "@vitest/coverage-istanbul": "npm:0.33.0" "@vitest/ui": "npm:0.33.0" "@your-org/eslint-config-bases": "workspace:^" @@ -8643,7 +8652,7 @@ __metadata: "@rushstack/eslint-patch": "npm:^1.3.2" "@testing-library/jest-dom": "npm:5.16.5" "@testing-library/react": "npm:14.0.0" - "@types/jest": "npm:29.5.2" + "@types/jest": "npm:29.5.3" "@types/node": "npm:20.4.1" "@types/prettier": "npm:2.7.3" "@types/react": "npm:18.2.14" @@ -8658,7 +8667,7 @@ __metadata: eslint-plugin-jest-formatting: "npm:^3.1.0" eslint-plugin-jsx-a11y: "npm:^6.7.1" eslint-plugin-playwright: "npm:^0.15.3" - eslint-plugin-prettier: "npm:^5.0.0-alpha.2" + eslint-plugin-prettier: "npm:^5.0.0" eslint-plugin-react: "npm:^7.32.2" eslint-plugin-react-hooks: "npm:^4.6.0" eslint-plugin-regexp: "npm:^1.15.0" @@ -8698,7 +8707,7 @@ __metadata: resolution: "@your-org/ts-utils@workspace:packages/ts-utils" dependencies: "@size-limit/file": "npm:8.2.6" - "@types/jest": "npm:29.5.2" + "@types/jest": "npm:29.5.3" "@types/node": "npm:20.4.1" "@vitest/coverage-istanbul": "npm:0.33.0" "@your-org/eslint-config-bases": "workspace:^" @@ -8738,7 +8747,7 @@ __metadata: "@testing-library/jest-dom": "npm:5.16.5" "@testing-library/react": "npm:14.0.0" "@testing-library/user-event": "npm:14.4.3" - "@types/jest": "npm:29.5.2" + "@types/jest": "npm:29.5.3" "@types/node": "npm:20.4.1" "@types/react": "npm:18.2.14" "@types/react-dom": "npm:18.2.6" @@ -12634,9 +12643,9 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:^5.0.0-alpha.2": - version: 5.0.0-alpha.2 - resolution: "eslint-plugin-prettier@npm:5.0.0-alpha.2" +"eslint-plugin-prettier@npm:^5.0.0": + version: 5.0.0 + resolution: "eslint-plugin-prettier@npm:5.0.0" dependencies: prettier-linter-helpers: "npm:^1.0.0" synckit: "npm:^0.8.5" @@ -12649,20 +12658,11 @@ __metadata: optional: true eslint-config-prettier: optional: true - checksum: dc67d0ea0e0dfc0dcda176ddb3297c5616752ab8ba3369b2ff67336cfd5343bbce78c55295f0db07b07a9c8c72ceed41dca8834a4bcaab88dc8b45cf43ce7bc7 + checksum: 4ea0e5f82a72c80f109ca7de730a059f3fd4225907caa9fea2d858b22d6488aaa9055d17d0bc0f50b441adf1759daf75d43f9cec016445d61f0df1e93c06bc52 languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:5.0.0-canary-7118f5dd7-20230705": - version: 5.0.0-canary-7118f5dd7-20230705 - resolution: "eslint-plugin-react-hooks@npm:5.0.0-canary-7118f5dd7-20230705" - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - checksum: 0e0e80c21552998b7af2b92a74aec5e862b33f6f16c3e1303d42b5821d68b7ba11c2037bd73e3581fc7d97d9a2e64dd19e202d47d6885f53e33aac87c048d641 - languageName: node - linkType: hard - -"eslint-plugin-react-hooks@npm:^4.6.0": +"eslint-plugin-react-hooks@npm:4.6.0": version: 4.6.0 resolution: "eslint-plugin-react-hooks@npm:4.6.0" peerDependencies: @@ -14369,9 +14369,9 @@ __metadata: languageName: node linkType: hard -"happy-dom@npm:10.0.3": - version: 10.0.3 - resolution: "happy-dom@npm:10.0.3" +"happy-dom@npm:10.1.1": + version: 10.1.1 + resolution: "happy-dom@npm:10.1.1" dependencies: css.escape: "npm:^1.5.1" entities: "npm:^4.5.0" @@ -14379,7 +14379,7 @@ __metadata: webidl-conversions: "npm:^7.0.0" whatwg-encoding: "npm:^2.0.0" whatwg-mimetype: "npm:^3.0.0" - checksum: 00d6120ea741d2b9592435026d3ecf2dcfa33cb7c1a7bed27cd110244f35bbb6d976b7ab5fbc91262b92834160a08a7070fe24104102800ac4f9f0abb158ea17 + checksum: df2f6045ba2cb7c08e075930fc5313953f82aaa6b62ea1566ab200ec75d37c18004c20bc7b9515fc95ec1d4251a6bae5fb6a418d567f20a6536952509f9882ca languageName: node linkType: hard @@ -18424,14 +18424,14 @@ __metadata: "@testing-library/react": "npm:14.0.0" "@testing-library/user-event": "npm:14.4.3" "@types/cors": "npm:2.8.13" - "@types/jest": "npm:29.5.2" + "@types/jest": "npm:29.5.3" "@types/node": "npm:20.4.1" "@types/react": "npm:18.2.14" "@types/react-dom": "npm:18.2.6" "@types/react-test-renderer": "npm:18.0.0" "@types/testing-library__jest-dom": "npm:5.14.7" "@vercel/analytics": "npm:1.0.1" - "@vitejs/plugin-react": "npm:4.0.2" + "@vitejs/plugin-react": "npm:4.0.3" "@vitest/coverage-istanbul": "npm:0.33.0" "@vitest/ui": "npm:0.33.0" "@your-org/api-gateway": "workspace:^" @@ -18453,7 +18453,7 @@ __metadata: get-tsconfig: "npm:4.6.2" graphql: "npm:16.7.1" graphql-yoga: "npm:4.0.3" - happy-dom: "npm:10.0.3" + happy-dom: "npm:10.1.1" i18next: "npm:23.2.8" jest: "npm:29.6.1" jest-css-modules-transform: "npm:4.4.2" @@ -18474,9 +18474,10 @@ __metadata: react: "npm:18.2.0" react-dom: "npm:18.2.0" react-hook-form: "npm:7.45.1" - react-i18next: "npm:13.0.1" + react-i18next: "npm:13.0.2" react-test-renderer: "npm:18.2.0" rimraf: "npm:5.0.1" + rippleui: "npm:1.12.1" rooks: "npm:7.14.1" sharp: "npm:0.32.1" size-limit: "npm:8.2.6" @@ -19813,7 +19814,7 @@ __metadata: languageName: node linkType: hard -"postcss-js@npm:^4.0.1": +"postcss-js@npm:^4.0.0, postcss-js@npm:^4.0.1": version: 4.0.1 resolution: "postcss-js@npm:4.0.1" dependencies: @@ -20154,7 +20155,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:8.4.25, postcss@npm:^7.0.30 || ^8.0.0, postcss@npm:^8.4.19, postcss@npm:^8.4.23, postcss@npm:^8.4.24, postcss@npm:^8.4.4": +"postcss@npm:8.4.25, postcss@npm:^7.0.30 || ^8.0.0, postcss@npm:^8.3.3, postcss@npm:^8.4.19, postcss@npm:^8.4.23, postcss@npm:^8.4.24, postcss@npm:^8.4.4": version: 8.4.25 resolution: "postcss@npm:8.4.25" dependencies: @@ -20695,9 +20696,9 @@ __metadata: languageName: node linkType: hard -"react-i18next@npm:13.0.1": - version: 13.0.1 - resolution: "react-i18next@npm:13.0.1" +"react-i18next@npm:13.0.2": + version: 13.0.2 + resolution: "react-i18next@npm:13.0.2" dependencies: "@babel/runtime": "npm:^7.22.5" html-parse-stringify: "npm:^3.0.1" @@ -20709,7 +20710,7 @@ __metadata: optional: true react-native: optional: true - checksum: cc5f3454b6678952f9f115aab672439b83c22977163656f20ff5d75725ab5fb5a775c36dc05ec4de2163fc7f049fd426d3be3c1f72fca372ca0d09c231eaf1b8 + checksum: bdc639135e1337578098abef48707ed03919d568c673fbcb6235706accd6591ed56fb9f5f1efbfa518c45d05326ed8b0fb79f38b1dbd7bff5195b2cd94da847d languageName: node linkType: hard @@ -21285,7 +21286,7 @@ __metadata: "@testing-library/jest-dom": "npm:5.16.5" "@testing-library/react": "npm:14.0.0" "@testing-library/user-event": "npm:14.4.3" - "@types/jest": "npm:29.5.2" + "@types/jest": "npm:29.5.3" "@types/node": "npm:20.4.1" "@types/react": "npm:18.2.14" "@types/react-dom": "npm:18.2.6" @@ -21571,6 +21572,18 @@ __metadata: languageName: node linkType: hard +"rippleui@npm:1.12.1": + version: 1.12.1 + resolution: "rippleui@npm:1.12.1" + dependencies: + "@types/postcss-js": "npm:^4.0.0" + postcss: "npm:^8.4.19" + postcss-js: "npm:^4.0.0" + tailwindcss: "npm:^3.3.1" + checksum: 17cbb7d6b90b493091df17360a84da1b761550bc6d592cdb9eee0fe0adc8a916f5679ea492216f43a6524c61a0972a543ee8b702760a422dc0db09df1d2a0810 + languageName: node + linkType: hard + "rollup@npm:2.78.0": version: 2.78.0 resolution: "rollup@npm:2.78.0" @@ -23039,7 +23052,7 @@ __metadata: languageName: node linkType: hard -"tailwindcss@npm:3.3.2": +"tailwindcss@npm:3.3.2, tailwindcss@npm:^3.3.1": version: 3.3.2 resolution: "tailwindcss@npm:3.3.2" dependencies: @@ -24475,7 +24488,7 @@ __metadata: "@emotion/styled": "npm:11.11.0" "@types/react": "npm:18.2.14" "@types/react-dom": "npm:18.2.6" - "@vitejs/plugin-react": "npm:4.0.2" + "@vitejs/plugin-react": "npm:4.0.3" "@vitest/coverage-istanbul": "npm:0.33.0" "@vitest/ui": "npm:0.33.0" "@your-org/common-i18n": "workspace:^" @@ -24483,7 +24496,7 @@ __metadata: "@your-org/eslint-config-bases": "workspace:^" "@your-org/ui-lib": "workspace:^" eslint: "npm:8.44.0" - happy-dom: "npm:10.0.3" + happy-dom: "npm:10.1.1" prettier: "npm:3.0.0" react: "npm:18.2.0" react-dom: "npm:18.2.0"