From f373c328ab4ed0e641a96275db633ca923bd2fdb Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Sun, 12 Nov 2023 16:28:35 -0600 Subject: [PATCH 1/2] start MUI rebuild --- frontend-mui/.eslintrc.json | 3 + frontend-mui/.gitignore | 37 + frontend-mui/README.md | 34 + frontend-mui/app/favicon.ico | Bin 0 -> 9762 bytes frontend-mui/app/globals.css | 3 + frontend-mui/app/layout.tsx | 115 + frontend-mui/app/page.tsx | 49 + frontend-mui/app/starred/page.tsx | 23 + frontend-mui/app/tasks/page.tsx | 23 + frontend-mui/components/MediaCard.tsx | 37 + .../components/ThemeRegistry/EmotionCache.tsx | 94 + .../ThemeRegistry/ThemeRegistry.tsx | 18 + .../components/ThemeRegistry/theme.ts | 30 + frontend-mui/next-env.d.ts | 5 + frontend-mui/next.config.js | 4 + frontend-mui/package-lock.json | 4513 +++++++++++++++++ frontend-mui/package.json | 32 + frontend-mui/postcss.config.js | 6 + frontend-mui/public/slack.png | Bin 0 -> 17473 bytes frontend-mui/tailwind.config.ts | 20 + frontend-mui/tsconfig.json | 27 + 21 files changed, 5073 insertions(+) create mode 100644 frontend-mui/.eslintrc.json create mode 100644 frontend-mui/.gitignore create mode 100644 frontend-mui/README.md create mode 100644 frontend-mui/app/favicon.ico create mode 100644 frontend-mui/app/globals.css create mode 100644 frontend-mui/app/layout.tsx create mode 100644 frontend-mui/app/page.tsx create mode 100644 frontend-mui/app/starred/page.tsx create mode 100644 frontend-mui/app/tasks/page.tsx create mode 100644 frontend-mui/components/MediaCard.tsx create mode 100644 frontend-mui/components/ThemeRegistry/EmotionCache.tsx create mode 100644 frontend-mui/components/ThemeRegistry/ThemeRegistry.tsx create mode 100644 frontend-mui/components/ThemeRegistry/theme.ts create mode 100644 frontend-mui/next-env.d.ts create mode 100644 frontend-mui/next.config.js create mode 100644 frontend-mui/package-lock.json create mode 100644 frontend-mui/package.json create mode 100644 frontend-mui/postcss.config.js create mode 100644 frontend-mui/public/slack.png create mode 100644 frontend-mui/tailwind.config.ts create mode 100644 frontend-mui/tsconfig.json diff --git a/frontend-mui/.eslintrc.json b/frontend-mui/.eslintrc.json new file mode 100644 index 00000000..bffb357a --- /dev/null +++ b/frontend-mui/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/frontend-mui/.gitignore b/frontend-mui/.gitignore new file mode 100644 index 00000000..88b6f0d9 --- /dev/null +++ b/frontend-mui/.gitignore @@ -0,0 +1,37 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo diff --git a/frontend-mui/README.md b/frontend-mui/README.md new file mode 100644 index 00000000..f4da3c4c --- /dev/null +++ b/frontend-mui/README.md @@ -0,0 +1,34 @@ +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). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +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. diff --git a/frontend-mui/app/favicon.ico b/frontend-mui/app/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d825cc0665e90a2c813ec59aa5ef568553c33571 GIT binary patch literal 9762 zcmbuERahK6u!a|Rio3hJOQEEfb74~|Ihw|{Qn65yx)ESa8Ut< z07C>gIsiN_90D%fTQ7hT0Dy-__$LGY*HF;_C`icY2#E0iWMQ2DWB?pI5&}Ft8q&Wx zNXQ6?aPTOo09-tL0zx7*T3)&j#3ZEj3`~4F!AVov2JWfz{~Rgc00@Bp!$n3xMMOgT z2m7ZA;sXAoA|N2ZBOsyuxAMOj5Rs5kaPa{6w5SAhguL{h+|c+w1Q!qq$!OUmHcVZ- zEdwwS;QmF9fD4cU;6g{Uv!$U-a5;LH8HN8Z!gq@mKQL#oVP@4MF; zw-=+887byHMXt;UjR(Pr!Ff*4UOlV2*ycBYLpo_c(~Jq8E5*|>(L7{E{k@27e?tHf zo8dZafu`hr=#j1I7}HfZl-<=9XNW3kGS5zW>vJu~9%} zj{+&DJ+ep62cY_AaJ1;U-FApnbU^hOMI#WFS`-!Vx!1Rc$#Z-~{oPN*u}suK@n&q(G*Ra@E53VV)8|6GG;AQ29-=$p8d&<7EcC9zd>VB(Tny?$ zj_ap8-hbxp zg40sG3C>@h=_F^toF)@z!RMq?=)O`KN^)3o0AN%iPeoF=wHg_= zo_E6_g{UY1jqZiWl+}_^m{?=Jq{Vs>LvNH2P=1q^ zjBZNA*^A*}RMq4@M~Soypkk5NwALQ^4lVU^^Vt>K5~oabH+J#M2SWHfBWw5jotDrN6@})<~|?aA+_pmB%XzTdF?z2G%P< zqQl0%#zz6TL%Eb~0d6}S$Q-QLXtS%>b`B$q*shEeS6x;t-LbVhjM4JZqP}=xrMDpR z1OJ4BqGef;vauNlz z64m1)vAG;q{K7Ek=r8RWCpJS79=kkWkycA5x|K5qS5hbla9U&$Q6@Q9si|F7z?l2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rW`qYLjVFz=np04fuo()j( zcRKdyINcQPJN1@6sAe1)`SkwTW*s{NhPYyM!D#_gT9J~Px@!5Qt%&GcyT$7W!#Fh* ze3x|7Yi$PEzDR97+S0ml_D`;s-^Ur(9Y9qXQe{=-Uzl*L8>+U^$e5+srB}*;czjqj ziw%^j_2{@R-u8!rRf25w%0K8r`e`73-Z#CygjKsh!62WnT^oiOgd<~)T-S6`ztlzt z5z{~2GvDWJBT?=ID0S#OeIIFeiKkrLA<2;m&;I4X!{JaO3{uKsQ+2_Qb!pyt48}_h zGXnGQse4x!e*4Rq{|4~(C4K{FjY|DxlGLzJ+$(tlG;1XW}vPAZu;%_WrY?p>sekEN4|Mg?{wY(b*nz(4Dl=XZvdmR)4%^pJmyl( zC9t`i?E+73r)MjxkoVlKPX5NPBn?o(jel7mXi$9g2HF0@xTJ>8v`0b`ee=7ffLHNfR&i8%1Wjq6+@(P1InK z@vaQ}hw}%hG~%!y2N1E8n0GN8-L|!t*!~oMnR(A{qq^3*q0hGtN)HSidF%^JVxk$T8PPd4`i z_D%cZc1OggBaHU2pF%w6@wgstGw6@6s(5@{Og?{UBwOEi!};PpV6clGwr@ z?ZRvHLzoL;m2JMqdwsjQwPta~=Xb{!A8Eh+$%53K$gGWr$69h;C)*Qjb2Ml;Rr~o@ zf#~wes#hxX_(!rv5Pz9i{`%I78Mz?J!tw@)9{J^Wf4 + + + + + + + hello there + + + + + + + {LINKS.map(({text, href, icon: Icon}) => ( + + + + + + + + + ))} + + + + {PLACEHOLDER_LINKS.map(({text, icon: Icon}) => ( + + + + + + + + + ))} + + + + {children} + + + + + + ); +} diff --git a/frontend-mui/app/page.tsx b/frontend-mui/app/page.tsx new file mode 100644 index 00000000..e5413731 --- /dev/null +++ b/frontend-mui/app/page.tsx @@ -0,0 +1,49 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import Grid from '@mui/material/Unstable_Grid2'; +import Drawer from '@mui/material/Drawer'; +import Typography from '@mui/material/Typography'; +import List from '@mui/material/List'; +import ListItem from '@mui/material/ListItem'; +import Alert from '@mui/material/Alert'; +import AlertTitle from '@mui/material/AlertTitle'; +import MediaCard from '@/components/MediaCard'; + +export default function HomePage() { + return ( + +
+ + Hello 👋 + This app uses the Next.js App Router and Material UI v5. + + + + + + + + + + + + + + + +
+
+ ); +} diff --git a/frontend-mui/app/starred/page.tsx b/frontend-mui/app/starred/page.tsx new file mode 100644 index 00000000..84fe92c4 --- /dev/null +++ b/frontend-mui/app/starred/page.tsx @@ -0,0 +1,23 @@ +import * as React from 'react'; +import Container from '@mui/material/Container'; +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; + +export default function StarredPage() { + return ( + + + + Starred Page + + + + ); +} diff --git a/frontend-mui/app/tasks/page.tsx b/frontend-mui/app/tasks/page.tsx new file mode 100644 index 00000000..c69bddae --- /dev/null +++ b/frontend-mui/app/tasks/page.tsx @@ -0,0 +1,23 @@ +import * as React from 'react'; +import Container from '@mui/material/Container'; +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; + +export default function TasksPage() { + return ( + + + + Tasks Page + + + + ); +} diff --git a/frontend-mui/components/MediaCard.tsx b/frontend-mui/components/MediaCard.tsx new file mode 100644 index 00000000..7ac16ddc --- /dev/null +++ b/frontend-mui/components/MediaCard.tsx @@ -0,0 +1,37 @@ +import * as React from 'react'; +import Image from 'next/image'; +import Card from '@mui/material/Card'; +import CardActions from '@mui/material/CardActions'; +import CardContent from '@mui/material/CardContent'; +import Button from '@mui/material/Button'; +import Typography from '@mui/material/Typography'; + +export default function MediaCard({ heading, text }: { heading: string; text: string }) { + return ( + + Random image + + + {heading} + + + {text} + + + + + + + + ); +} diff --git a/frontend-mui/components/ThemeRegistry/EmotionCache.tsx b/frontend-mui/components/ThemeRegistry/EmotionCache.tsx new file mode 100644 index 00000000..aca70850 --- /dev/null +++ b/frontend-mui/components/ThemeRegistry/EmotionCache.tsx @@ -0,0 +1,94 @@ +'use client'; +import * as React from 'react'; +import createCache from '@emotion/cache'; +import { useServerInsertedHTML } from 'next/navigation'; +import { CacheProvider as DefaultCacheProvider } from '@emotion/react'; +import type { EmotionCache, Options as OptionsOfCreateCache } from '@emotion/cache'; + +export type NextAppDirEmotionCacheProviderProps = { + /** This is the options passed to createCache() from 'import createCache from "@emotion/cache"' */ + options: Omit; + /** By default from 'import { CacheProvider } from "@emotion/react"' */ + CacheProvider?: (props: { + value: EmotionCache; + children: React.ReactNode; + }) => React.JSX.Element | null; + children: React.ReactNode; +}; + +// Adapted from https://github.com/garronej/tss-react/blob/main/src/next/appDir.tsx +export default function NextAppDirEmotionCacheProvider(props: NextAppDirEmotionCacheProviderProps) { + const { options, CacheProvider = DefaultCacheProvider, children } = props; + + const [registry] = React.useState(() => { + const cache = createCache(options); + cache.compat = true; + const prevInsert = cache.insert; + let inserted: { name: string; isGlobal: boolean }[] = []; + cache.insert = (...args) => { + const [selector, serialized] = args; + if (cache.inserted[serialized.name] === undefined) { + inserted.push({ + name: serialized.name, + isGlobal: !selector, + }); + } + return prevInsert(...args); + }; + const flush = () => { + const prevInserted = inserted; + inserted = []; + return prevInserted; + }; + return { cache, flush }; + }); + + useServerInsertedHTML(() => { + const inserted = registry.flush(); + if (inserted.length === 0) { + return null; + } + let styles = ''; + let dataEmotionAttribute = registry.cache.key; + + const globals: { + name: string; + style: string; + }[] = []; + + inserted.forEach(({ name, isGlobal }) => { + const style = registry.cache.inserted[name]; + + if (typeof style !== 'boolean') { + if (isGlobal) { + globals.push({ name, style }); + } else { + styles += style; + dataEmotionAttribute += ` ${name}`; + } + } + }); + + return ( + + {globals.map(({ name, style }) => ( +