diff --git a/.eslintrc.js b/.eslintrc.js index 9720813..3d6b293 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,6 +23,7 @@ module.exports = { '@typescript-eslint' ], 'rules': { + '@typescript-eslint/no-explicit-any': 'off', 'indent': [ 'warn', 2, @@ -41,6 +42,7 @@ module.exports = { 'never' ], 'react/react-in-jsx-scope': 'off', - 'no-async-promise-executor': 'off' + 'no-async-promise-executor': 'off', + '@typescript-eslint/no-unused-vars': ['warn'] } } diff --git a/README.md b/README.md index a75ac52..8b58ea3 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,21 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# Schedule for колледж связи пгути -## Getting Started +Reskin of https://lk.ks.psuti.ru/ since it lacks mobile support and is generally ugly. -First, run the development server: +![TODO: screenshot](TODO: screenshot) -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` +[Visit website](TODO: host anywhere in Russia) -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +## Tech stack -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. +- React with Next.js v13.5 (pages router) +- Tailwind CSS +- @shadcn/ui components (built with Radix UI) +- node-html-parser for scraping, rehydration strategy for cache +- TypeScript with types for each package -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. +Built in 1 day. Tools used: pnpm, eslint. -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. +## Hire me! -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +I'm available for hire if you can provide me with a work visa in Canada. Check out my resume: [cv.hloth.dev](https://cv.hloth.dev). \ No newline at end of file diff --git a/package.json b/package.json index 876a6d2..cd57377 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,16 @@ "lint": "next lint" }, "dependencies": { + "@radix-ui/react-label": "^2.0.2", + "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-slot": "^1.0.2", + "@types/content-type": "^1.1.6", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", + "content-type": "^1.0.5", "lucide-react": "^0.279.0", "next": "latest", + "node-html-parser": "^6.1.10", "react": "latest", "react-dom": "latest", "tailwind-merge": "^1.14.0", @@ -22,6 +28,7 @@ "@types/node": "latest", "@types/react": "latest", "@types/react-dom": "latest", + "@typescript-eslint/eslint-plugin": "^6.7.3", "autoprefixer": "latest", "eslint": "latest", "eslint-config-next": "latest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 96b82ca..7b5f445 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,18 +5,36 @@ settings: excludeLinksFromLockfile: false dependencies: + '@radix-ui/react-label': + specifier: ^2.0.2 + version: 2.0.2(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-select': + specifier: ^2.0.0 + version: 2.0.0(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': + specifier: ^1.0.2 + version: 1.0.2(@types/react@18.2.24)(react@18.2.0) + '@types/content-type': + specifier: ^1.1.6 + version: 1.1.6 class-variance-authority: specifier: ^0.7.0 version: 0.7.0 clsx: specifier: ^2.0.0 version: 2.0.0 + content-type: + specifier: ^1.0.5 + version: 1.0.5 lucide-react: specifier: ^0.279.0 version: 0.279.0(react@18.2.0) next: specifier: latest version: 13.5.3(react-dom@18.2.0)(react@18.2.0) + node-html-parser: + specifier: ^6.1.10 + version: 6.1.10 react: specifier: latest version: 18.2.0 @@ -40,6 +58,9 @@ devDependencies: '@types/react-dom': specifier: latest version: 18.2.8 + '@typescript-eslint/eslint-plugin': + specifier: ^6.7.3 + version: 6.7.3(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2) autoprefixer: specifier: latest version: 10.4.16(postcss@8.4.31) @@ -75,7 +96,6 @@ packages: engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 - dev: true /@eslint-community/eslint-utils@4.4.0(eslint@8.50.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} @@ -114,6 +134,34 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@floating-ui/core@1.5.0: + resolution: {integrity: sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==} + dependencies: + '@floating-ui/utils': 0.1.4 + dev: false + + /@floating-ui/dom@1.5.3: + resolution: {integrity: sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==} + dependencies: + '@floating-ui/core': 1.5.0 + '@floating-ui/utils': 0.1.4 + dev: false + + /@floating-ui/react-dom@2.0.2(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==} + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + dependencies: + '@floating-ui/dom': 1.5.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@floating-ui/utils@0.1.4: + resolution: {integrity: sha512-qprfWkn82Iw821mcKofJ5Pk9wgioHicxcQMxx+5zt5GSKoqdWvgG5AxVmpmUUjzTLPVSH5auBrhI93Deayn/DA==} + dev: false + /@humanwhocodes/config-array@0.11.11: resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} engines: {node: '>=10.10.0'} @@ -268,6 +316,460 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 + /@radix-ui/number@1.0.1: + resolution: {integrity: sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==} + dependencies: + '@babel/runtime': 7.23.1 + dev: false + + /@radix-ui/primitive@1.0.1: + resolution: {integrity: sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==} + dependencies: + '@babel/runtime': 7.23.1 + dev: false + + /@radix-ui/react-arrow@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/react-collection@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.24)(react@18.2.0) + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/react-compose-refs@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-context@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-direction@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-dismissable-layer@1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@18.2.24)(react@18.2.0) + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/react-focus-guards@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-focus-scope@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/react-id@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-label@2.0.2(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-N5ehvlM7qoTLx7nWPodsPYPgMzA5WM8zZChQg8nyFJKnDO5WHdba1vv5/H6IO5LtJMfD2Q3wh1qHFGNtK0w3bQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/react-popper@1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@floating-ui/react-dom': 2.0.2(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-arrow': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-use-rect': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/rect': 1.0.1 + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/react-portal@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/react-primitive@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.24)(react@18.2.0) + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/react-select@2.0.0(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-RH5b7af4oHtkcHS7pG6Sgv5rk5Wxa7XI8W5gvB1N/yiuDGZxko1ynvOiVhFM7Cis2A8zxF9bTOUVbRDzPepe6w==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/number': 1.0.1 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-use-previous': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@radix-ui/react-visually-hidden': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + aria-hidden: 1.2.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-remove-scroll: 2.5.5(@types/react@18.2.24)(react@18.2.0) + dev: false + + /@radix-ui/react-slot@1.0.2(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-use-callback-ref@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-use-controllable-state@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-use-escape-keydown@1.0.3(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-use-layout-effect@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-use-previous@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-cV5La9DPwiQ7S0gf/0qiD6YgNqM5Fk97Kdrlc5yBcrF3jyEZQwm7vYFqMo4IfeHgJXsRaMvLABFtd0OVEmZhDw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-use-rect@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/rect': 1.0.1 + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-use-size@1.0.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.24)(react@18.2.0) + '@types/react': 18.2.24 + react: 18.2.0 + dev: false + + /@radix-ui/react-visually-hidden@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + dependencies: + '@babel/runtime': 7.23.1 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.24)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.24 + '@types/react-dom': 18.2.8 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@radix-ui/rect@1.0.1: + resolution: {integrity: sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==} + dependencies: + '@babel/runtime': 7.23.1 + dev: false + /@rushstack/eslint-patch@1.5.1: resolution: {integrity: sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==} dev: true @@ -278,6 +780,14 @@ packages: tslib: 2.6.2 dev: false + /@types/content-type@1.1.6: + resolution: {integrity: sha512-WFHg/KFLCdUQl3m27WSQu0NEaLzoHGmgZHlsSYr0Y0iIvItMcBq7opZc6AGXPXqf+btIM6vTBJyLvuDAihB+zQ==} + dev: false + + /@types/json-schema@7.0.13: + resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} + dev: true + /@types/json5@0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true @@ -288,13 +798,11 @@ packages: /@types/prop-types@15.7.8: resolution: {integrity: sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==} - dev: true /@types/react-dom@18.2.8: resolution: {integrity: sha512-bAIvO5lN/U8sPGvs1Xm61rlRHHaq5rp5N3kp9C+NJ/Q41P8iqjkXSu0+/qu8POsjH9pNWb0OYabFez7taP7omw==} dependencies: '@types/react': 18.2.24 - dev: true /@types/react@18.2.24: resolution: {integrity: sha512-Ee0Jt4sbJxMu1iDcetZEIKQr99J1Zfb6D4F3qfUWoR1JpInkY1Wdg4WwCyBjL257D0+jGqSl1twBjV8iCaC0Aw==} @@ -302,10 +810,41 @@ packages: '@types/prop-types': 15.7.8 '@types/scheduler': 0.16.4 csstype: 3.1.2 - dev: true /@types/scheduler@0.16.4: resolution: {integrity: sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==} + + /@types/semver@7.5.3: + resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==} + dev: true + + /@typescript-eslint/eslint-plugin@6.7.3(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-vntq452UHNltxsaaN+L9WyuMch8bMd9CqJ3zhzTPXXidwbf5mqqKCVXEuvRZUqLJSTLeWE65lQwyXsRGnXkCTA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.9.0 + '@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.7.3 + '@typescript-eslint/type-utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.3 + debug: 4.3.4 + eslint: 8.50.0 + graphemer: 1.4.0 + ignore: 5.2.4 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color dev: true /@typescript-eslint/parser@6.7.3(eslint@8.50.0)(typescript@5.2.2): @@ -337,6 +876,26 @@ packages: '@typescript-eslint/visitor-keys': 6.7.3 dev: true + /@typescript-eslint/type-utils@6.7.3(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-Fc68K0aTDrKIBvLnKTZ5Pf3MXK495YErrbHb1R6aTpfK5OdSFj0rVN7ib6Tx6ePrZ2gsjLqr0s98NG7l96KSQw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2) + debug: 4.3.4 + eslint: 8.50.0 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/types@6.7.3: resolution: {integrity: sha512-4g+de6roB2NFcfkZb439tigpAMnvEIg3rIjWQ+EM7IBaYt/CdJt6em9BJ4h4UpdgaBWdmx2iWsafHTrqmgIPNw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -363,6 +922,25 @@ packages: - supports-color dev: true + /@typescript-eslint/utils@6.7.3(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-vzLkVder21GpWRrmSR9JxGZ5+ibIUSudXlW52qeKpzUEQhRSmyZiVDDj3crAth7+5tmN1ulvgKaCU2f/bPRCzg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0) + '@types/json-schema': 7.0.13 + '@types/semver': 7.5.3 + '@typescript-eslint/scope-manager': 6.7.3 + '@typescript-eslint/types': 6.7.3 + '@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2) + eslint: 8.50.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@6.7.3: resolution: {integrity: sha512-HEVXkU9IB+nk9o63CeICMHxFWbHWr3E1mpilIQBe9+7L/lH97rleFLVtYsfnWB+JVMaiFnEaxvknvmIzX+CqVg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -423,6 +1001,13 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true + /aria-hidden@1.2.3: + resolution: {integrity: sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==} + engines: {node: '>=10'} + dependencies: + tslib: 2.6.2 + dev: false + /aria-query@5.3.0: resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} dependencies: @@ -555,6 +1140,10 @@ packages: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} + /boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + dev: false + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -659,6 +1248,11 @@ packages: /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + /content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + dev: false + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -668,6 +1262,21 @@ packages: which: 2.0.2 dev: true + /css-select@5.1.0: + resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} + dependencies: + boolbase: 1.0.0 + css-what: 6.1.0 + domhandler: 5.0.3 + domutils: 3.1.0 + nth-check: 2.1.1 + dev: false + + /css-what@6.1.0: + resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} + engines: {node: '>= 6'} + dev: false + /cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -675,7 +1284,6 @@ packages: /csstype@3.1.2: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} - dev: true /damerau-levenshtein@1.0.8: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} @@ -731,6 +1339,10 @@ packages: engines: {node: '>=6'} dev: true + /detect-node-es@1.1.0: + resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} + dev: false + /didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -758,6 +1370,33 @@ packages: esutils: 2.0.3 dev: true + /dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + dev: false + + /domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + dev: false + + /domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + dependencies: + domelementtype: 2.3.0 + dev: false + + /domutils@3.1.0: + resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + dev: false + /electron-to-chromium@1.4.537: resolution: {integrity: sha512-W1+g9qs9hviII0HAwOdehGYkr+zt7KKdmCcJcjH0mYg6oL8+ioT3Skjmt7BLoAQqXhjf40AXd+HlR4oAWMlXjA==} dev: true @@ -774,6 +1413,11 @@ packages: tapable: 2.2.1 dev: true + /entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + dev: false + /es-abstract@1.22.2: resolution: {integrity: sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==} engines: {node: '>= 0.4'} @@ -1253,6 +1897,11 @@ packages: has-symbols: 1.0.3 dev: true + /get-nonce@1.0.1: + resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} + engines: {node: '>=6'} + dev: false + /get-symbol-description@1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} @@ -1392,6 +2041,11 @@ packages: dependencies: function-bind: 1.1.1 + /he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + dev: false + /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -1428,6 +2082,12 @@ packages: side-channel: 1.0.4 dev: true + /invariant@2.2.4: + resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + dependencies: + loose-envify: 1.4.0 + dev: false + /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: @@ -1792,6 +2452,13 @@ packages: - babel-plugin-macros dev: false + /node-html-parser@6.1.10: + resolution: {integrity: sha512-6/uWdWxjQWQ7tMcFK2wWlrflsQUzh1HsEzlIf2j5+TtzfhT2yUvg3DwZYAmjEHeR3uX74ko7exjHW69J0tOzIg==} + dependencies: + css-select: 5.1.0 + he: 1.2.0 + dev: false + /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: true @@ -1805,6 +2472,12 @@ packages: engines: {node: '>=0.10.0'} dev: true + /nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + dependencies: + boolbase: 1.0.0 + dev: false + /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -2057,6 +2730,58 @@ packages: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true + /react-remove-scroll-bar@2.3.4(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.24 + react: 18.2.0 + react-style-singleton: 2.2.1(@types/react@18.2.24)(react@18.2.0) + tslib: 2.6.2 + dev: false + + /react-remove-scroll@2.5.5(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.24 + react: 18.2.0 + react-remove-scroll-bar: 2.3.4(@types/react@18.2.24)(react@18.2.0) + react-style-singleton: 2.2.1(@types/react@18.2.24)(react@18.2.0) + tslib: 2.6.2 + use-callback-ref: 1.3.0(@types/react@18.2.24)(react@18.2.0) + use-sidecar: 1.1.2(@types/react@18.2.24)(react@18.2.0) + dev: false + + /react-style-singleton@2.2.1(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.24 + get-nonce: 1.0.1 + invariant: 2.2.4 + react: 18.2.0 + tslib: 2.6.2 + dev: false + /react@18.2.0: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} engines: {node: '>=0.10.0'} @@ -2089,7 +2814,6 @@ packages: /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - dev: true /regexp.prototype.flags@1.5.1: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} @@ -2494,6 +3218,37 @@ packages: punycode: 2.3.0 dev: true + /use-callback-ref@1.3.0(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.24 + react: 18.2.0 + tslib: 2.6.2 + dev: false + + /use-sidecar@1.1.2(@types/react@18.2.24)(react@18.2.0): + resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.9.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + '@types/react': 18.2.24 + detect-node-es: 1.1.0 + react: 18.2.0 + tslib: 2.6.2 + dev: false + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} diff --git a/src/app/agregator/mock.js b/src/app/agregator/mock.js new file mode 100644 index 0000000..94f8739 --- /dev/null +++ b/src/app/agregator/mock.js @@ -0,0 +1,361 @@ +export const content = `Расписание занятий + + + + + +
 Расписание занятий Расписание преподавателейЛичный кабинет студента
Инструкция: "Доступ в личный кабинет студента"
+Расписание занятий на 1 семестр 2023-2024 уч. год (версия для печати)
+График учебного процесса на 2023/2024 уч. год (версия для печати)
+

+ + + + +
Расписание занятий
с 25.09.2023 по 01.10.2023 +
+

предыдущая неделя

            

следующая неделя

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
   ПС-7
+

Понедельник 25.09.2023 / 4 неделя

№ парыВремя занятийСпособДисциплина, преподавательТема занятияРесурсЗадание для выполнения
108:00 – 09:30 + Самостоятельная работаФизика
Кусаева Зарина Владимировна
Л. Толстого, 23
Кабинет: 410-2
Силы в природе.Лекция Задачи
Сделать конспект по теме: выписать определения, формулы. Самостоятельно решить задачи.
209:40 – 11:10 + Математика
Амукова Светлана Николаевна
Л. Толстого, 23
Кабинет: 410-2

311:40 – 13:10 + Математика
Амукова Светлана Николаевна
Л. Толстого, 23
Кабинет: 410-2

413:20 – 14:50 + Химия
Тарасова Таисия Евгеньевна
Л. Толстого, 23
Кабинет: 410-2

+

Вторник 26.09.2023 / 4 неделя

№ парыВремя занятийСпособДисциплина, преподавательТема занятияРесурсЗадание для выполнения
311:40 – 13:10 + История
Арефьев Андрей Андреевич
Московское шоссе, 120
Кабинет: 401

413:20 – 14:50 +
дистанционно
Физическая культура

515:10 – 16:40 + Информатика
Ларионова Софья Николаевна
Московское шоссе, 120
Кабинет: 208

+

Среда 27.09.2023 / 4 неделя

№ парыВремя занятийСпособДисциплина, преподавательТема занятияРесурсЗадание для выполнения
311:40 – 13:10 + Физика
Кусаева Зарина Владимировна
Московское шоссе, 120
Кабинет: 310
Импульс. Закон сохранения импульса.Проверка конспекта и задач
413:20 – 14:50 +
перенос с 02.10.23
Физика
Кусаева Зарина Владимировна
Московское шоссе, 120
Кабинет: 310
Закон сохранения энергии
515:10 – 16:40 + Иностранный язык
Карпеева Александра Сергеевна
Московское шоссе, 120
Кабинет: 234

616:50 – 18:20 +
дистанционно
География

+

Четверг 28.09.2023 / 4 неделя

№ парыВремя занятийСпособДисциплина, преподавательТема занятияРесурсЗадание для выполнения
209:40 – 11:10 +
дистанционно
География

311:40 – 13:10 + Математика
Амукова Светлана Николаевна
Л. Толстого, 23
Кабинет: 410-2

413:20 – 14:50 + ОчноРусский язык
Назарова Елена Федоровна
Л. Толстого, 23
Кабинет: 410-2
Признаки заимствованного слова. Практическая работа 2Практическая работа 2

515:10 – 16:40 + ОчноЛитература
Назарова Елена Федоровна
Л. Толстого, 23
Кабинет: 410-2
Роман И. А. Гончарова "Обломов"лекция
пересказ лекции, ответить на вопросы викторины
+

Пятница 29.09.2023 / 5 неделя

№ парыВремя занятийСпособДисциплина, преподавательТема занятияРесурсЗадание для выполнения
209:40 – 11:10 + ОчноРусский язык
Назарова Елена Федоровна
Московское шоссе, 120
Кабинет: 324
Язык как системапрезентация
изучить презентацию, выучить определения
311:40 – 13:10 + ОчноЛитература
Назарова Елена Федоровна
Московское шоссе, 120
Кабинет: 321
"Илья Ильич Обломов как временной тип и одна из граней национального характера"написать сочинение на тему "Что во мне есть от Обломова"
+

Суббота 30.09.2023 / 5 неделя

№ парыВремя занятийСпособДисциплина, преподавательТема занятияРесурсЗадание для выполнения
108:00 – 09:30 + Основы безопасности жизнедеятельности
Корнилова Светлана Александровна
Московское шоссе, 120
Кабинет: 110
Пр№1 Обеспечение личной безопасности на дорогахоформить отчет
209:40 – 11:10 + ОчноЛитература
Назарова Елена Федоровна
Московское шоссе, 120
Кабинет: 321
Новый герой, «отрицающий все», в романе И. С. Тургенева (1818- 1883) «Отцы и дети»читать роман "Отцы и дети"
311:30 – 13:00 + Свободное время

+ +
+

предыдущая неделя

            

следующая неделя


+ + + + + + + + +
Дневное отделение:

Выберите группу:

Первый курс:

Второй курс:

Третий курс:

Четвертый курс:

+ + + + + + + + + + + + + + + + + + + +
ИБ-5
ИБ-6
ИКС-6
ИКС-7к
ИСПВ-6
ИСПВ-7
ИСПВ-8к
ИСПИ-5
ИСПИ-6к
ИСПП-22
ИСПП-23
ИСПП-24к
ИСПП-25к
ИСПП-26к
ИСПП-27к
ПС-7
СБ-1к
ССА-10
ССА-11
+ + + + + + + + + + + + + + + + + + +
ИБ-3
ИБ-4к
ИКС-4
ИКС-5к
ИСПВ-4
ИСПВ-5к
ИСПИ-3
ИСПИ-4к
ИСПП-16
ИСПП-17
ИСПП-18к
ИСПП-19к
ИСПП-20к
ИСПП-21к
ПС-6
ССА-7
ССА-8к
ССА-9к
+ + + + + + + + + + + + + + + + + + +
ИБ-1к
ИБ-2к
ИКС-2
ИКС-3к
ИСПВ-1
ИСПВ-2к
ИСПВ-3к
ИСПИ-1
ИСПИ-2к
ИСПП-11
ИСПП-12
ИСПП-13к
ИСПП-14к
ИСПП-15к
ПС-5
ССА-4
ССА-5
ССА-6к
+ + + + + + + + + + + + + + + +
ИКС-1
ИС-21
ИС-22
ИСПП-5
ИСПП-6
ИСПП-7к
ИСПП-8к
ИСПП-9к
МТС-78
ПКС-33
ПКС-34
ПКС-35к
СК-69
ССА-1к
ССА-3к

+ + + + + + + + + + + + + +
Заочное отделение:

Выберите группу:

Первый курс:

Второй курс:

Третий курс:

Четвертый курс:

Пятый курс:

+ + +
(з/о)иксс-23
(з/о)ПС-23к
+ +
(з/о)ИКСС-22к
+ + +
(з/о)ИКСС-21к
(з/о)ПС-22к
+ +
(з/о)ПКС-20
+ +
(з/о)ПКС-19

+ +` \ No newline at end of file diff --git a/src/app/agregator/schedule.ts b/src/app/agregator/schedule.ts new file mode 100644 index 0000000..f51c125 --- /dev/null +++ b/src/app/agregator/schedule.ts @@ -0,0 +1,21 @@ +import { Day } from '@/shared/model/day' +import { parsePage } from '@/app/parser/schedule' +import contentTypeParser from 'content-type' +import { parse } from 'node-html-parser' +import { content as mockContent } from './mock' + +// ПС-7: 146 +export async function getSchedule(groupID: number): Promise { + // const page = await fetch(`https://lk.ks.psuti.ru/?mn=2&obj=${groupID}`) + const page = { text: async () => mockContent, status: 200, headers: { get: (s: string) => s && 'text/html' } } + const content = await page.text() + const contentType = page.headers.get('content-type') + if (page.status === 200 && contentType && contentTypeParser.parse(contentType).type === 'text/html') { + const root = parse(content) + return parsePage(root) + } else { + console.error(page.status, contentType) + console.error(content.length > 500 ? content.slice(0, 500 - 3) + '...' : content) + throw new Error('Error while fetching lk.ks.psuti.ru') + } +} \ No newline at end of file diff --git a/src/app/parser/schedule.ts b/src/app/parser/schedule.ts new file mode 100644 index 0000000..1612705 --- /dev/null +++ b/src/app/parser/schedule.ts @@ -0,0 +1,97 @@ +import { Day } from '@/shared/model/day' +import { Lesson } from '@/shared/model/lesson' +import { HTMLElement } from 'node-html-parser' + +const dayTitleParser = (text: string) => { + const [dateString, week] = text.trim().split(' / ') + const weekNumber = Number(week.trim().match(/^(\d+) неделя$/)![1]) + const [, day, month, year] = dateString.trim().match(/^[а-яА-Я]+ (\d{1,2})\.(\d{1,2})\.(\d{4})$/)! + const date = new Date(Number(year), Number(month) - 1, Number(day), 12) + return { date, weekNumber } +} + +const parseLesson = (row: HTMLElement): Lesson => { + const cells = row.querySelectorAll(':scope > td') + + const isChange = cells.every(td => td.getAttribute('bgcolor') === 'ffffbb') + + const timeCell = cells[1].childNodes + const [startTime, endTime] = timeCell[0].textContent.trim().split(' – ') + const time: Lesson['time'] = { + start: startTime, + end: endTime + } + if (timeCell[2]) { + time.hint = timeCell[2].textContent.trim() + } + + const subject = '' + const teacher = '' + + const place: Lesson['place'] = { + address: '1', + classroom: 1 + } + + const topic = cells[4].textContent.trim() + + const resources: Lesson['resources'] = [] + // { + // type: 'link' + // title: string + // url: string + // } [] + + return { + isChange, + time, + type: cells[2].textContent.trim(), + subject, + teacher, + place, + ...(topic && { topic }), + resources, + homework: cells[6].textContent.trim() + } +} + +export function parsePage(document: HTMLElement): Day[] { + const tables = Array.from(document.querySelectorAll('body > table')) + const table = tables.find(table => table.querySelector(':scope > tbody > tr:first-child')?.textContent?.trim() === 'ПС-7') + const rows = Array.from(table!.querySelectorAll(':scope > tbody > tr')).slice(1) + + const days = [] + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + let dayInfo: Day = {} + let dayLessons: Lesson[] = [] + let previousRowIsDayTitle = false + for (let i = 0; i < rows.length; i++) { + const row = rows[i] + + const isDivider = row.textContent?.trim() === '' + const isDayTitle = dayLessons.length === 0 && !('date' in dayInfo) + const isTableHeader = previousRowIsDayTitle + + if (isDivider) { + days.push({ ...dayInfo, lessons: dayLessons }) + dayLessons = [] + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + dayInfo = {} + previousRowIsDayTitle = false + } else if (isTableHeader) { + previousRowIsDayTitle = false + continue + } else if (isDayTitle) { + const { date, weekNumber } = dayTitleParser(row.querySelector('h3')!.textContent!) + dayInfo.date = date + dayInfo.weekNumber = weekNumber + previousRowIsDayTitle = true + } else { + dayLessons.push(parseLesson(row)) + } + } + + return days +} \ No newline at end of file diff --git a/src/app/utils/date-serializer.ts b/src/app/utils/date-serializer.ts new file mode 100644 index 0000000..6b922d6 --- /dev/null +++ b/src/app/utils/date-serializer.ts @@ -0,0 +1,44 @@ +const isDate = (value: any): boolean => Object.prototype.toString.call(value) === '[object Date]' + +export const nextSerialized = (obj: any): any => { + if (Array.isArray(obj)) { + return obj.map(nextSerialized) + } + + if (typeof obj === 'object' && obj !== null) { + const newObj: any = {} + for (const [key, value] of Object.entries(obj)) { + newObj[key] = isDate(value as Date) ? (value as Date).toISOString() : nextSerialized(value) + } + return newObj + } + + return obj +} + +const looksLikeISODate = (value: string): boolean => /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z?$/.test(value) + +export const nextDeserializer = (obj: any): any => { + if (Array.isArray(obj)) { + return obj.map(nextDeserializer) + } + + if (typeof obj === 'object' && obj !== null) { + const newObj: any = {} + for (const [key, value] of Object.entries(obj)) { + newObj[key] = typeof value === 'string' && looksLikeISODate(value) ? new Date(value) : nextDeserializer(value) + } + return newObj + } + + return obj +} + + +export type NextSerialized = { + [K in keyof T]: + T[K] extends Date ? string : + T[K] extends Array ? NextSerialized[] : + T[K] extends object ? NextSerialized : + T[K] +}; \ No newline at end of file diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 021681f..1c19372 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,4 +1,4 @@ -import '@/styles/globals.css' +import '@/shared/styles/globals.css' import type { AppProps } from 'next/app' export default function App({ Component, pageProps }: AppProps) { diff --git a/src/pages/index.tsx b/src/pages/index.tsx index be88f73..4090fc6 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,118 +1,27 @@ -import Image from 'next/image' -import { Inter } from 'next/font/google' +import { Schedule } from '@/widgets/schedule' +import { Day } from '@/shared/model/day' +import { GetServerSidePropsResult } from 'next' +import { getSchedule } from '@/app/agregator/schedule' +import { NextSerialized, nextDeserializer, nextSerialized } from '@/app/utils/date-serializer' -const inter = Inter({ subsets: ['latin'] }) +type PageProps = NextSerialized<{ + schedule: Day[] +}> + +export default function HomePage(props: PageProps) { + const { schedule } = nextDeserializer(props) -export default function Home() { return ( -
-
-

- Get started by editing  - src/pages/index.tsx -

- -
- -
- Next.js Logo -
- - -
+ ) } + +export async function getServerSideProps(): Promise> { + const schedule = await getSchedule(146) + + return { + props: { + schedule: nextSerialized(schedule) + } + } +} \ No newline at end of file diff --git a/src/shadcn/ui/button.tsx b/src/shadcn/ui/button.tsx new file mode 100644 index 0000000..a1df668 --- /dev/null +++ b/src/shadcn/ui/button.tsx @@ -0,0 +1,56 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/shared/utils" + +const buttonVariants = cva( + "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: + "border border-input bg-background hover:bg-accent hover:text-accent-foreground", + secondary: + "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-10 px-4 py-2", + sm: "h-9 rounded-md px-3", + lg: "h-11 rounded-md px-8", + icon: "h-10 w-10", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button" + return ( + + ) + } +) +Button.displayName = "Button" + +export { Button, buttonVariants } diff --git a/src/shadcn/ui/input.tsx b/src/shadcn/ui/input.tsx new file mode 100644 index 0000000..08d0621 --- /dev/null +++ b/src/shadcn/ui/input.tsx @@ -0,0 +1,25 @@ +import * as React from "react" + +import { cn } from "@/shared/utils" + +export interface InputProps + extends React.InputHTMLAttributes {} + +const Input = React.forwardRef( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) +Input.displayName = "Input" + +export { Input } diff --git a/src/shadcn/ui/label.tsx b/src/shadcn/ui/label.tsx new file mode 100644 index 0000000..4722b42 --- /dev/null +++ b/src/shadcn/ui/label.tsx @@ -0,0 +1,24 @@ +import * as React from "react" +import * as LabelPrimitive from "@radix-ui/react-label" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/shared/utils" + +const labelVariants = cva( + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" +) + +const Label = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef & + VariantProps +>(({ className, ...props }, ref) => ( + +)) +Label.displayName = LabelPrimitive.Root.displayName + +export { Label } diff --git a/src/shadcn/ui/select.tsx b/src/shadcn/ui/select.tsx new file mode 100644 index 0000000..dd0e935 --- /dev/null +++ b/src/shadcn/ui/select.tsx @@ -0,0 +1,119 @@ +import * as React from "react" +import * as SelectPrimitive from "@radix-ui/react-select" +import { Check, ChevronDown } from "lucide-react" + +import { cn } from "@/shared/utils" + +const Select = SelectPrimitive.Root + +const SelectGroup = SelectPrimitive.Group + +const SelectValue = SelectPrimitive.Value + +const SelectTrigger = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + {children} + + + + +)) +SelectTrigger.displayName = SelectPrimitive.Trigger.displayName + +const SelectContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, position = "popper", ...props }, ref) => ( + + + + {children} + + + +)) +SelectContent.displayName = SelectPrimitive.Content.displayName + +const SelectLabel = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SelectLabel.displayName = SelectPrimitive.Label.displayName + +const SelectItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + + + + + + + {children} + +)) +SelectItem.displayName = SelectPrimitive.Item.displayName + +const SelectSeparator = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SelectSeparator.displayName = SelectPrimitive.Separator.displayName + +export { + Select, + SelectGroup, + SelectValue, + SelectTrigger, + SelectContent, + SelectLabel, + SelectItem, + SelectSeparator, +} diff --git a/src/shared/model/day.ts b/src/shared/model/day.ts new file mode 100644 index 0000000..d20c0c6 --- /dev/null +++ b/src/shared/model/day.ts @@ -0,0 +1,7 @@ +import { Lesson } from '@/shared/model/lesson' + +export type Day = { + date: Date + weekNumber: number + lessons: Lesson[] +} \ No newline at end of file diff --git a/src/shared/model/lesson.ts b/src/shared/model/lesson.ts new file mode 100644 index 0000000..97dc9c8 --- /dev/null +++ b/src/shared/model/lesson.ts @@ -0,0 +1,22 @@ +export type Lesson = { + isChange?: boolean + time: { + start: string + end: string + hint?: string + } + type: string + subject: string + teacher: string + place: { + address: string + classroom: number + } + topic?: string + resources: { + type: 'link' + title: string + url: string + }[] + homework: string +} \ No newline at end of file diff --git a/src/widgets/schedule/day.tsx b/src/widgets/schedule/day.tsx new file mode 100644 index 0000000..f3dd3f2 --- /dev/null +++ b/src/widgets/schedule/day.tsx @@ -0,0 +1,9 @@ +import type { Day as DayType } from '@/shared/model/day' + +export function Day({ day }: { + day: DayType +}) { + return ( +

+ ) +} \ No newline at end of file diff --git a/src/widgets/schedule/index.tsx b/src/widgets/schedule/index.tsx new file mode 100644 index 0000000..1027fbf --- /dev/null +++ b/src/widgets/schedule/index.tsx @@ -0,0 +1,15 @@ +import type { Day as DayType } from '@/shared/model/day' +import { Day } from '@/widgets/schedule/day' + +export function Schedule({ days }: { + days: DayType[] +}) { + + return ( +
+ {days.map((day, i) => ( + + ))} +
+ ) +} diff --git a/src/widgets/schedule/lesson.tsx b/src/widgets/schedule/lesson.tsx new file mode 100644 index 0000000..6084057 --- /dev/null +++ b/src/widgets/schedule/lesson.tsx @@ -0,0 +1,57 @@ +import { Button } from '@/shadcn/ui/button' +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from '@/shadcn/ui/card' +import { Input } from '@/shadcn/ui/input' +import { Label } from '@/shadcn/ui/label' +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/shadcn/ui/select' + +export function Lesson() { + return ( + + + Create project + Deploy your new project in one-click. + + +
+
+
+ + +
+
+ + +
+
+
+
+ + + + +
+ ) +} \ No newline at end of file