diff --git a/apps/web/.eslintrc.js b/apps/web/.eslintrc.js index a61df95..0370b88 100644 --- a/apps/web/.eslintrc.js +++ b/apps/web/.eslintrc.js @@ -5,4 +5,7 @@ module.exports = createConfig('next-typescript', { project: './tsconfig.json', tsconfigRootDir: __dirname, }, + rules: { + 'import/no-duplicates': 'off', + }, }); diff --git a/apps/web/.gitignore b/apps/web/.gitignore index 1437c53..55175ef 100644 --- a/apps/web/.gitignore +++ b/apps/web/.gitignore @@ -23,12 +23,10 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +.pnpm-debug.log* # local env files -.env.local -.env.development.local -.env.test.local -.env.production.local +.env*.local # vercel .vercel diff --git a/apps/web/README.md b/apps/web/README.md index 3d7b63a..64c6572 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -1,6 +1,34 @@ -## Getting Started +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). -First, run the development server: +Live demo: [https://flowbite-next-starter.vercel.app/](https://flowbite-next-starter.vercel.app/) + +It also includes: + +- [x] [`flowbite`](https://flowbite.com) +- [x] [`flowbite-react`](https://flowbite-react.com) +- [x] [`react-icons`](https://react-icons.github.io/react-icons) +- [x] [`tailwindcss`](https://tailwindcss.com) +- [x] Quality of life tools, like + - [x] [`eslint`](https://eslint.org) with some plugins + - [x] [`prettier`](https://prettier.io) + +## Getting started + +`Next.js` requires [`Node.js`](https://nodejs.org). + +If you don't already have `npm` and `yarn` available, make sure you set them up. + +```bash +npm i -g npm yarn +``` + +Install the dependencies: + +```bash +yarn install +``` + +Now you can run the development server: ```bash yarn dev @@ -8,21 +36,101 @@ yarn 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. +You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. -To create [API routes](https://nextjs.org/docs/app/building-your-application/routing/router-handlers) add an `api/` directory to the `app/` directory with a `route.ts` file. For individual endpoints, create a subfolder in the `api` directory, like `api/hello/route.ts` would map to [http://localhost:3000/api/hello](http://localhost:3000/api/hello). +## Add `flowbite-react` to `next` on your own -## Learn More +Follow these steps to add `flowbite-react` to a `next` project without cloning this repo. + +### Requirements + +- [x] [Node.js](https://nodejs.org/en/) + +### How-to + +#### Create a new `next` starter project: + +```sh +npx create-next-app@latest --typescript +cd my-app +``` + +#### Install `tailwindcss` and `flowbite-react`: + +```sh +npm install --save autoprefixer postcss tailwindcss flowbite flowbite-react +``` + +#### Create `postcss.config.js`: + +```js +module.exports = { + plugins: { + autoprefixer: {}, + tailwindcss: {}, + }, +}; +``` + +#### Create `tailwind.config.js`: + +```js +/** + * @type {import('@types/tailwindcss/tailwind-config').TailwindConfig} + */ +module.exports = { + content: [ + "./node_modules/flowbite-react/**/*.js", + "./pages/**/*.{ts,tsx}", + "./public/**/*.html", + ], + plugins: [require("flowbite/plugin")], + theme: {}, +}; +``` + +#### And replace the contents of `styles/globals.css` by: + +```css +@tailwind base; +@tailwind components; +@tailwind utilities; +``` + +#### Start using `flowbite-react`! + +```js +import { Alert } from "flowbite-react"; + +export default function MyPage() { + return Alert!; +} +``` + +## Outstanding issues + +- **Carousel**s don't seem to work with [`next/image`](https://nextjs.org/docs/api-reference/next/image), so a normal `` is required, which ESLint will warn about +- **Modal**s don't work on `next` on `react@18` because of an hydration mismatch + +## Learn more + +### About `next` 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/foundations/about-nextjs) - an interactive Next.js tutorial. +- [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 +### About `flowbite` -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js. +[Flowbite](https://flowbite.com) is an open source collection of UI components built with the utility classes from Tailwind CSS that you can use as a starting point when coding user interfaces and websites. + +In this repository, we setup [`flowbite-react`](https://flowbite-react.com) for you with examples of how to use the React components in `pages/index.tsx`. + +## 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/apps/web/app/components/header.tsx b/apps/web/app/components/header.tsx new file mode 100644 index 0000000..8addadc --- /dev/null +++ b/apps/web/app/components/header.tsx @@ -0,0 +1,77 @@ +import { useSidebarContext } from '../context/SidebarContext'; +import { DarkThemeToggle, Navbar } from 'flowbite-react'; +import Image from 'next/image'; + +function Header() { + const { isOpenOnSmallScreens, isPageWithSidebar, setOpenOnSmallScreens } = + useSidebarContext(); + + return ( +
+ + {isPageWithSidebar && ( + + )} + + Flowbite logo + + Flowbite + + +
+ + +
+ + + Home + + About + Services + Pricing + Contact + +
+
+ ); +} + +export default Header; diff --git a/apps/web/app/components/sidebar.tsx b/apps/web/app/components/sidebar.tsx new file mode 100644 index 0000000..da3b5e6 --- /dev/null +++ b/apps/web/app/components/sidebar.tsx @@ -0,0 +1,26 @@ +import { useSidebarContext } from '../context/SidebarContext'; +import classNames from 'classnames'; +import { Sidebar as FlowbiteSidebar } from 'flowbite-react'; +import type { FC, PropsWithChildren } from 'react'; + +const Sidebar: FC>> = function ({ + children, +}) { + const { isOpenOnSmallScreens: isSidebarOpenOnSmallScreens } = + useSidebarContext(); + + return ( +
+ {children} +
+ ); +}; + +export default Object.assign(Sidebar, { ...FlowbiteSidebar }); diff --git a/apps/web/app/context/FlowbiteContext.tsx b/apps/web/app/context/FlowbiteContext.tsx new file mode 100644 index 0000000..ff2ead6 --- /dev/null +++ b/apps/web/app/context/FlowbiteContext.tsx @@ -0,0 +1,10 @@ +'use client'; +import { flowbiteTheme as theme } from '../theme'; +import { Flowbite } from 'flowbite-react'; +import type { PropsWithChildren } from 'react'; + +function FlowbiteContext({ children }: PropsWithChildren) { + return {children}; +} + +export default FlowbiteContext; diff --git a/apps/web/app/context/SidebarContext.tsx b/apps/web/app/context/SidebarContext.tsx new file mode 100644 index 0000000..39ae7d3 --- /dev/null +++ b/apps/web/app/context/SidebarContext.tsx @@ -0,0 +1,76 @@ +'use client'; +import type { PropsWithChildren } from 'react'; +import { createContext, useContext, useEffect, useState } from 'react'; + +type SidebarContextProps = { + isOpenOnSmallScreens: boolean; + isPageWithSidebar: boolean; + // eslint-disable-next-line no-unused-vars + setOpenOnSmallScreens: (isOpen: boolean) => void; +}; + +const SidebarContext = createContext(undefined!); + +export function SidebarProvider({ + children, +}: PropsWithChildren>) { + const location = isBrowser() ? window.location.pathname : '/'; + const [isOpen, setOpen] = useState(false); + + // Close Sidebar on page change on mobile + useEffect(() => { + if (isSmallScreen()) { + setOpen(false); + } + }, [location]); + + // Close Sidebar on mobile tap inside main content + useEffect(() => { + function handleMobileTapInsideMain(event: MouseEvent) { + const main = document.querySelector('main'); + const isClickInsideMain = main?.contains(event.target as Node); + + if (isSmallScreen() && isClickInsideMain) { + setOpen(false); + } + } + + document.addEventListener('mousedown', handleMobileTapInsideMain); + + return () => { + document.removeEventListener('mousedown', handleMobileTapInsideMain); + }; + }, []); + + return ( + + {children} + + ); +} + +function isBrowser(): boolean { + return typeof window !== 'undefined'; +} + +function isSmallScreen(): boolean { + return isBrowser() && window.innerWidth < 768; +} + +export function useSidebarContext(): SidebarContextProps { + const context = useContext(SidebarContext) as SidebarContextProps | undefined; + + if (!context) { + throw new Error( + 'useSidebarContext should be used within the SidebarContext provider!', + ); + } + + return context; +} diff --git a/apps/web/app/favicon.ico b/apps/web/app/favicon.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/apps/web/app/favicon.ico and /dev/null differ diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css index fd81e88..b5c61c9 100644 --- a/apps/web/app/globals.css +++ b/apps/web/app/globals.css @@ -1,27 +1,3 @@ @tailwind base; @tailwind components; @tailwind utilities; - -:root { - --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; - --background-end-rgb: 255, 255, 255; -} - -@media (prefers-color-scheme: dark) { - :root { - --foreground-rgb: 255, 255, 255; - --background-start-rgb: 0, 0, 0; - --background-end-rgb: 0, 0, 0; - } -} - -body { - color: rgb(var(--foreground-rgb)); - background: linear-gradient( - to bottom, - transparent, - rgb(var(--background-end-rgb)) - ) - rgb(var(--background-start-rgb)); -} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index e23f9d4..7ae3923 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -1,22 +1,13 @@ import './globals.css'; -import type { Metadata } from 'next'; -import { Inter } from 'next/font/google'; +import FlowbiteContext from './context/FlowbiteContext'; +import type { PropsWithChildren } from 'react'; -const inter = Inter({ subsets: ['latin'] }); - -export const metadata: Metadata = { - description: 'Generated by create next app', - title: 'Create Next App', -}; - -export default function RootLayout({ - children, -}: { - readonly children: React.ReactNode; -}) { +export default function RootLayout({ children }: PropsWithChildren) { return ( - {children} + + {children} + ); } diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 29e9689..d7aab60 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -1,115 +1,1136 @@ -/* eslint-disable react/forbid-component-props */ -/* eslint-disable react/jsx-newline */ -import Image from 'next/image'; +'use client'; -export default function Home() { +import Header from './components/header'; +import Sidebar from './components/sidebar'; +import { SidebarProvider } from './context/SidebarContext'; +import { + Accordion, + Alert, + Avatar, + Badge, + Breadcrumb, + Button, + Card, + Carousel, + Checkbox, + Dropdown, + Footer, + Label, + ListGroup, + Modal, + Navbar, + Pagination, + Progress, + Rating, + Sidebar as FlowbiteSidebar, + Spinner, + Table, + Tabs, + TextInput, + Timeline, + Toast, + Tooltip, +} from 'flowbite-react'; +import Image from 'next/image'; +import { useState } from 'react'; +import { BiBuoy } from 'react-icons/bi'; +import { + BsDribbble, + BsFacebook, + BsGithub, + BsInstagram, + BsTwitter, +} from 'react-icons/bs'; +import { + HiAdjustments, + HiArrowNarrowRight, + HiArrowSmRight, + HiChartPie, + HiCheck, + HiClipboardList, + HiCloudDownload, + HiDatabase, + HiExclamation, + HiEye, + HiHome, + HiInbox, + HiOutlineAdjustments, + HiShoppingBag, + HiTable, + HiUser, + HiUserCircle, + HiViewBoards, + HiX, +} from 'react-icons/hi'; + +export default function Index(): JSX.Element { return ( -
-
-

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

-
+ + ); +} + +function ActualSidebar(): JSX.Element { + return ( + + + + + Dashboard + + + Kanban + + + Inbox + + + Users + + + Products + + + Sign In + + + Sign Up + + + + + Upgrade to Pro + + + Documentation + + + Help + + + + + ); +} + +function HomePage(): JSX.Element { + return ( +
+
+
+

+ Welcome to Flowbite on Next.js! +

+
+
+
+
+

Alert

+
+ +
+
+
+

+ Accordion +

+
+ +
+
+
+

+ Avatar +

+
+ +
+
+
+

+ Badges +

+
+ +
+
+
+

+ Breadcrumb +

+
+ +
+
+
+

+ Buttons +

+
+ +
+
+
+

+ Button group +

+
+ +
+
+
+

+ Card +

+
+ +
+
+
+

+ Carousel +

+
+ +
+
+
+

+ Dropdown +

+
+ +
+
+
+

+ Forms +

+
+ +
+
+
+

+ Footer +

+
+ +
+
+
+

+ List group +

+
+ +
+
+
+

+ Modal +

+
+ +
+
+
+

+ Navbars +

+
+ +
+
+
+

+ Pagination +

+
+ +
+
+
+

+ Progress +

+
+ +
+
+
+

+ Rating +

+
+ +
+
+
+

+ Sidebar +

+
+ +
+
+
+

+ Spinners +

+
+ +
+
+
+

+ Tables +

+
+
+ +
+
+
+
+

+ Tabs +

+
+ +
+
+
+

+ Timeline +

+
+ +
+
+
+

+ Toast +

+
+ +
+
+
+

+ Tooltips +

+
+ +
+
+ ); +} + +function AccordionExample(): JSX.Element { + return ( + + + What is Flowbite? + +

+ Flowbite is an open-source library of interactive components built + on top of Tailwind CSS including buttons, dropdowns, modals, + navbars, and more. +

+

+ Check out this guide to learn how to{' '} + + get started + {' '} + and start developing websites even faster with components on top of + Tailwind CSS. +

+
+
+ + Is there a Figma file available? + +

+ Flowbite is first conceptualized and designed using the Figma + software so everything you see in the library has a design + equivalent in our Figma file. +

+

+ Check out the{' '} + + Figma design system + {' '} + based on the utility classes from Tailwind CSS and components from + Flowbite. +

+
+
+ + + What are the differences between Flowbite and Tailwind UI? + + +

+ The main difference is that the core components from Flowbite are + open source under the MIT license, whereas Tailwind UI is a paid + product. Another difference is that Flowbite relies on smaller and + standalone components, whereas Tailwind UI offers sections of pages. +

+

+ However, we actually recommend using both Flowbite, Flowbite Pro, + and even Tailwind UI as there is no technical reason stopping you + from using the best of two worlds. +

+

+ Learn more about these technologies: +

+ +
+
+
+ ); +} + +function AlertsExample(): JSX.Element { + return ( + +
+ More info about this info alert goes here. This example text is + going to run a bit longer so that you can see how spacing within an + alert works with this kind of content. +
+
+ + +
+ + } + > +

+ This is a info alert +

+
+ ); +} + +function AvatarExample(): JSX.Element { + return ( + + ); +} + +function BadgesExample(): JSX.Element { + return ( +
+ + Info + + + Gray + + + Failure + + + Success + + + Warning + + + Indigo + + + Purple + + + Pink + +
+ ); +} + +function BreadcrumbExample(): JSX.Element { + return ( + + + Home + + Projects + Flowbite React + + ); +} + +function ButtonsExample(): JSX.Element { + return ( +
+ + + + + + + +
+ ); +} + +function ButtonGroupExample(): JSX.Element { + return ( + + + + + + ); +} + +function CardExample(): JSX.Element { + return ( +
+ +
+ Noteworthy technology acquisitions 2021 +
+

+ Here are the biggest enterprise technology acquisitions of 2021 so + far, in reverse chronological order. +

+
+
+ ); +} + +function CarouselExample(): JSX.Element { + return ( +
+ + {/* eslint-disable-next-line @next/next/no-img-element */} + ... + {/* eslint-disable-next-line @next/next/no-img-element */} + ... + {/* eslint-disable-next-line @next/next/no-img-element */} + ... + +
+ ); +} + +function DropdownExample(): JSX.Element { + return ( + + + Bonnie success + + name@flowbite.com + + + Dashboard + Settings + Earnings + + Sign out + + ); +} + +function FormsExample(): JSX.Element { + return ( +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ ); +} + +function FooterExample(): JSX.Element { + return ( +
+
+
+
+ +
+
+
+ + + Flowbite + Tailwind CSS + +
+
+ + + Github + Discord + +
+
+ + + Privacy Policy + Terms & Conditions + +
+
+
+ +
+ +
+ + + + + +
+
+
+
+ ); +} + +function ListGroupExample(): JSX.Element { + return ( +
+ + + Profile + + Settings + Messages + Download + +
+ ); +} + +function ModalExample(): JSX.Element { + const [isOpen, setOpen] = useState(false); + + return ( + <> + + setOpen(false)}> + Terms of Service + +
+

+ With less than a month to go before the European Union enacts new + consumer privacy laws for its citizens, companies around the world + are updating their terms of service agreements to comply. +

+

+ The European Union’s General Data Protection Regulation (G.D.P.R.) + goes into effect on May 25 and is meant to ensure a common set of + data rights in the European Union. It requires organizations to + notify users as soon as possible of high-risk data breaches that + could personally affect them. +

+
+
+ + + + +
+ + ); +} + +function NavbarsExample(): JSX.Element { + return ( + + + Flowbite logo + + Flowbite + + +
+ + } + > + + Bonnie Green + + name@flowbite.com + + + Dashboard + Settings + Earnings + + Sign out + + +
+ + + Home + + About + Services + Pricing + Contact + +
+ ); +} + +function PaginationExample(): JSX.Element { + const [currentPage, setCurrentPage] = useState(1); + + return ( +
+ setCurrentPage(page)} + showIcons + totalPages={1000} + /> +
+ ); +} + +function ProgressExample(): JSX.Element { + return ( + + ); +} + +function RatingExample(): JSX.Element { + return ( +
+ + + + + + +

+ 4.95 out of 5 +

+
+

+ 1,745 global ratings +

+ 5 star + 4 star + 3 star + 2 star + 1 star +
+ ); +} + +function SidebarExample(): JSX.Element { + const [isOpen, setOpen] = useState(false); + + function toggle() { + setOpen(!isOpen); + } + + return ( + <> + +
+ + + + + Dashboard + + + Kanban + + + Inbox + + + Users + + + Products + + + Sign In + + + Sign Up + + + + +
+ + ); +} + +function SpinnersExample(): JSX.Element { + return ( +
+ + + + + + +
+ ); +} + +function TablesExample(): JSX.Element { + return ( + + + Product name + Color + Category + Price + + Edit + + + + + + Apple MacBook Pro 17" + + Sliver + Laptop + $2999 + + + Edit + + + + + + Microsoft Surface Pro + + White + Laptop PC + $1999 + + + Edit + + + + + + Magic Mouse 2 + + Black + Accessories + $99 + + + Edit + + + + + + Google Pixel Phone + + Gray + Phone + $799 + + + Edit + + + + + + Apple Watch 5 + + failure + Wearables + $999 + + + Edit + + + + +
+ ); +} + +function TabsExample(): JSX.Element { + return ( + + + Profile content + + + Dashboard content + + + Settings content + + + Contacts content + + + Disabled content + + + ); +} + +function TimelineExample(): JSX.Element { + return ( + + + + + February 2022 + Application UI code in Tailwind CSS + + Get access to over 20+ pages including a dashboard layout, charts, + kanban board, calendar, and pre-order E-commerce & Marketing pages. + + + + + + + + March 2022 + Marketing UI design in Figma + + All of the pages and components are first designed in Figma and we + keep a parity between the two versions even as we update the + project. + + + + + + + April 2022 + E-Commerce UI code in Tailwind CSS + + Get started with dozens of web components and interactive elements + built on top of Tailwind CSS. + + + + + ); +} + +function ToastExample(): JSX.Element { + return ( +
+ +
+ +
+
Item moved successfully.
+ +
+ +
+ +
+
Item has been deleted.
+ +
+ +
+ +
+
+ Improve password difficulty. +
+ +
+
+ ); +} + +function TooltipsExample(): JSX.Element { + return ( +
+ + + + + + + + + + + + +
); } diff --git a/apps/web/app/theme.ts b/apps/web/app/theme.ts new file mode 100644 index 0000000..a910868 --- /dev/null +++ b/apps/web/app/theme.ts @@ -0,0 +1,37 @@ +import type { CustomFlowbiteTheme } from 'flowbite-react/lib/esm/components/Flowbite/FlowbiteTheme'; + +export const flowbiteTheme: CustomFlowbiteTheme = { + footer: { + base: 'flex flex-col', + brand: { + base: 'm-6 flex items-center', + }, + groupLink: { + base: 'flex flex-col flex-wrap text-gray-500 dark:text-white', + link: { + base: 'mb-4 last:mr-0 md:mr-6', + }, + }, + icon: { + base: 'text-gray-400 hover:text-gray-900 dark:hover:text-white', + }, + }, + modal: { + body: { + base: 'space-y-6 px-6 pb-4 sm:pb-6 lg:px-8 xl:pb-8', + }, + }, + sidebar: { + base: 'h-full bg-gray-50', + collapse: { + list: 'space-y-2 py-2 list-none', + }, + inner: + 'h-full overflow-y-auto overflow-x-hidden bg-white py-4 px-3 dark:bg-gray-800', + item: { + base: 'no-underline flex items-center rounded-lg p-2 text-lg font-normal text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700', + }, + itemGroup: + 'list-none border-t border-gray-200 pt-3 first:mt-0 first:border-t-0 first:pt-0 dark:border-gray-700', + }, +}; diff --git a/apps/web/next.config.js b/apps/web/next.config.js index fdda6aa..58ba07b 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -1,4 +1,14 @@ -module.exports = { +/** @type {import('next').NextConfig} */ +const nextConfig = { + images: { + remotePatterns: [ + { + hostname: 'flowbite.com', + }, + ], + }, reactStrictMode: true, - transpilePackages: ["ui"], + transpilePackages: ['ui'], }; + +module.exports = nextConfig; diff --git a/apps/web/package.json b/apps/web/package.json index 4c3b4cf..982dce0 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -9,17 +9,20 @@ "lint": "next lint" }, "dependencies": { + "flowbite": "^2.0.0", + "flowbite-react": "^0.6.4", "next": "^14.0.1", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "react": "18", + "react-dom": "18", + "react-icons": "^4.11.0", "ui": "*" }, "devDependencies": { "@types/node": "^20.8.10", - "@types/react": "^18.2.34", - "@types/react-dom": "^18.2.14", + "@types/react": "18", "@vchikalkin/eslint-config-awesome": "^1.1.5", - "autoprefixer": "^10.4.16", + "autoprefixer": "10.4.16", + "eslint": "^8.52.0", "postcss": "^8.4.31", "tailwindcss": "^3.3.5", "tsconfig": "*", diff --git a/apps/web/postcss.config.js b/apps/web/postcss.config.js index 33ad091..4df9d3b 100644 --- a/apps/web/postcss.config.js +++ b/apps/web/postcss.config.js @@ -1,6 +1,6 @@ module.exports = { plugins: { - tailwindcss: {}, autoprefixer: {}, + tailwindcss: {}, }, -} +}; diff --git a/apps/web/public/circles.svg b/apps/web/public/circles.svg deleted file mode 100644 index 6533be5..0000000 --- a/apps/web/public/circles.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/apps/web/public/favicon.png b/apps/web/public/favicon.png new file mode 100644 index 0000000..918fd4a Binary files /dev/null and b/apps/web/public/favicon.png differ diff --git a/apps/web/public/next.svg b/apps/web/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/apps/web/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/web/public/turborepo.svg b/apps/web/public/turborepo.svg deleted file mode 100644 index 2f9aa1f..0000000 --- a/apps/web/public/turborepo.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/web/public/vercel.svg b/apps/web/public/vercel.svg deleted file mode 100644 index d2f8422..0000000 --- a/apps/web/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/web/tailwind.config.js b/apps/web/tailwind.config.js new file mode 100644 index 0000000..cf57b5e --- /dev/null +++ b/apps/web/tailwind.config.js @@ -0,0 +1,14 @@ +/** + * @type {import('@types/tailwindcss/tailwind-config').TailwindConfig} + */ +module.exports = { + darkMode: 'media', + content: [ + '../../node_modules/flowbite/**/*.js', + '../../node_modules/flowbite-react/**/*.js', + './public/**/*.html', + './app/**/*.{ts,tsx}', + ], + plugins: [require('flowbite/plugin')], + theme: {}, +}; diff --git a/apps/web/tailwind.config.ts b/apps/web/tailwind.config.ts deleted file mode 100644 index c7ead80..0000000 --- a/apps/web/tailwind.config.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { Config } from 'tailwindcss' - -const config: Config = { - content: [ - './pages/**/*.{js,ts,jsx,tsx,mdx}', - './components/**/*.{js,ts,jsx,tsx,mdx}', - './app/**/*.{js,ts,jsx,tsx,mdx}', - ], - theme: { - extend: { - backgroundImage: { - 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', - 'gradient-conic': - 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', - }, - }, - }, - plugins: [], -} -export default config diff --git a/yarn.lock b/yarn.lock index 7e78a0f..aa80bd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -297,6 +297,42 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.52.0.tgz#78fe5f117840f69dc4a353adf9b9cd926353378c" integrity sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA== +"@floating-ui/core@^1.4.2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.0.tgz#5c05c60d5ae2d05101c3021c1a2a350ddc027f8c" + integrity sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg== + dependencies: + "@floating-ui/utils" "^0.1.3" + +"@floating-ui/dom@^1.5.1": + version "1.5.3" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.5.3.tgz#54e50efcb432c06c23cd33de2b575102005436fa" + integrity sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA== + dependencies: + "@floating-ui/core" "^1.4.2" + "@floating-ui/utils" "^0.1.3" + +"@floating-ui/react-dom@^2.0.1": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.0.2.tgz#fab244d64db08e6bed7be4b5fcce65315ef44d20" + integrity sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ== + dependencies: + "@floating-ui/dom" "^1.5.1" + +"@floating-ui/react@^0.24.3": + version "0.24.8" + resolved "https://registry.yarnpkg.com/@floating-ui/react/-/react-0.24.8.tgz#e079e2836990be3fce9665ab509360a5447251a1" + integrity sha512-AuYeDoaR8jtUlUXtZ1IJ/6jtBkGnSpJXbGNzokBL87VDJ8opMq1Bgrc0szhK482ReQY6KZsMoZCVSb4xwalkBA== + dependencies: + "@floating-ui/react-dom" "^2.0.1" + aria-hidden "^1.2.3" + tabbable "^6.0.1" + +"@floating-ui/utils@^0.1.3": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.1.6.tgz#22958c042e10b67463997bd6ea7115fe28cbcaf9" + integrity sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A== + "@graphql-eslint/eslint-plugin@^3.20.1": version "3.20.1" resolved "https://registry.yarnpkg.com/@graphql-eslint/eslint-plugin/-/eslint-plugin-3.20.1.tgz#5ae22ee54a5624b852a7cb5f52a103da6384c643" @@ -693,6 +729,11 @@ picocolors "^1.0.0" tslib "^2.6.0" +"@popperjs/core@^2.9.3": + version "2.11.8" + resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" + integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== + "@repeaterjs/repeater@3.0.4", "@repeaterjs/repeater@^3.0.4": version "3.0.4" resolved "https://registry.yarnpkg.com/@repeaterjs/repeater/-/repeater-3.0.4.tgz#a04d63f4d1bf5540a41b01a921c9a7fddc3bd1ca" @@ -825,7 +866,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.2.34": +"@types/react@*", "@types/react@18", "@types/react@^18.2.34": version "18.2.34" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.34.tgz#aed20f19473721ba328feb99d1ec3307ebc1a8dd" integrity sha512-U6eW/alrRk37FU/MS2RYMjx0Va2JGIVXELTODaTIYgvWGCV4Y4TfTUzG8DdmpDNIT0Xpj/R7GfyHOJJrDttcvg== @@ -1146,6 +1187,13 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +aria-hidden@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.3.tgz#14aeb7fb692bbb72d69bebfa47279c1fd725e954" + integrity sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ== + dependencies: + tslib "^2.0.0" + aria-query@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" @@ -1283,7 +1331,7 @@ asynciterator.prototype@^1.0.0: dependencies: has-symbols "^1.0.3" -autoprefixer@^10.4.16: +autoprefixer@10.4.16: version "10.4.16" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.16.tgz#fad1411024d8670880bdece3970aa72e3572feb8" integrity sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ== @@ -1535,6 +1583,11 @@ ci-info@^3.8.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== +classnames@^2.2.6: + version "2.3.2" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924" + integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw== + clean-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clean-regexp/-/clean-regexp-1.0.0.tgz#8df7c7aae51fd36874e8f8d05b9180bc11a3fed7" @@ -1697,6 +1750,11 @@ dataloader@^2.2.2: resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.2.2.tgz#216dc509b5abe39d43a9b9d97e6e5e473dfbe3e0" integrity sha512-8YnDaaf7N3k/q5HnTJVuzSyLETjoZjVmHc4AeKAzOvKHEFQKcn64OKBfzHYtE9zGjctNM7V9I0MfnUVLpi7M5g== +debounce@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" + integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== + debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -1845,6 +1903,11 @@ dset@^3.1.2: resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.3.tgz#c194147f159841148e8e34ca41f638556d9542d2" integrity sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ== +easy-bem@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/easy-bem/-/easy-bem-1.1.1.tgz#1bfcc10425498090bcfddc0f9c000aba91399e03" + integrity sha512-GJRqdiy2h+EXy6a8E6R+ubmqUM08BK0FWNq41k24fup6045biQ8NXxoXimiwegMQvFFV3t1emADdGNL1TlS61A== + electron-to-chromium@^1.4.535: version "1.4.574" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.574.tgz#6de04d7c6e244e5ffcae76d2e2a33b02cab66781" @@ -2445,7 +2508,7 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.48.0: +eslint@^8.48.0, eslint@^8.52.0: version "8.52.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.52.0.tgz#d0cd4a1fac06427a61ef9242b9353f36ea7062fc" integrity sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg== @@ -2696,6 +2759,33 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== +flowbite-react@^0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/flowbite-react/-/flowbite-react-0.6.4.tgz#84fddcde95f0df1bfe443eae1f402ac7f5ae1882" + integrity sha512-36mhawQRalOyq40ZLXesCTvcidYBO0vRFb672YSfflQHl5mENzB3o1SW6oGPpedmS/rWTlK+VBK7ia+1UYr+6w== + dependencies: + "@floating-ui/react" "^0.24.3" + flowbite "^1.6.6" + react-icons "^4.10.1" + react-indiana-drag-scroll "^2.2.0" + tailwind-merge "^1.13.2" + +flowbite@^1.6.6: + version "1.8.1" + resolved "https://registry.yarnpkg.com/flowbite/-/flowbite-1.8.1.tgz#a1f5fb039c4c275414a457089b4917a67e9153a5" + integrity sha512-lXTcO8a6dRTPFpINyOLcATCN/pK1Of/jY4PryklPllAiqH64tSDUsOdQpar3TO59ZXWwugm2e92oaqwH6X90Xg== + dependencies: + "@popperjs/core" "^2.9.3" + mini-svg-data-uri "^1.4.3" + +flowbite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/flowbite/-/flowbite-2.0.0.tgz#f149f63f4752722d888b1300a5f5071a6bf98b7d" + integrity sha512-gP/iC/WuznQ5XBzikhaSs4RDs49zrvoAdHbWMHSY3l7nVJX0xJz+dELIlLjh+czLdEVTMLxUjuARYYwCb5q34A== + dependencies: + "@popperjs/core" "^2.9.3" + mini-svg-data-uri "^1.4.3" + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -3815,6 +3905,11 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== +mini-svg-data-uri@^1.4.3: + version "1.4.4" + resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz#8ab0aabcdf8c29ad5693ca595af19dd2ead09939" + integrity sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg== + minimatch@4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.3.tgz#b4dcece1d674dee104bb0fb833ebb85a78cbbca6" @@ -4476,7 +4571,7 @@ rc@^1.0.1, rc@^1.1.6: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-dom@^18.2.0: +react-dom@18: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== @@ -4484,12 +4579,26 @@ react-dom@^18.2.0: loose-envify "^1.1.0" scheduler "^0.23.0" +react-icons@^4.10.1, react-icons@^4.11.0: + version "4.11.0" + resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.11.0.tgz#4b0e31c9bfc919608095cc429c4f1846f4d66c65" + integrity sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA== + +react-indiana-drag-scroll@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/react-indiana-drag-scroll/-/react-indiana-drag-scroll-2.2.0.tgz#657e14bbdf4888cc738e9fa8dc4384d76c348c0b" + integrity sha512-+W/3B2OQV0FrbdnsoIo4dww/xpH0MUQJz6ziQb7H+oBko3OCbXuzDFYnho6v6yhGrYDNWYPuFUewb89IONEl/A== + dependencies: + classnames "^2.2.6" + debounce "^1.2.0" + easy-bem "^1.1.1" + react-is@^16.13.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react@^18.2.0: +react@18, react@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== @@ -5094,6 +5203,16 @@ synckit@^0.8.5: "@pkgr/utils" "^2.3.1" tslib "^2.5.0" +tabbable@^6.0.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97" + integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew== + +tailwind-merge@^1.13.2: + version "1.14.0" + resolved "https://registry.yarnpkg.com/tailwind-merge/-/tailwind-merge-1.14.0.tgz#e677f55d864edc6794562c63f5001f45093cdb8b" + integrity sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ== + tailwindcss@^3.3.5: version "3.3.5" resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.3.5.tgz#22a59e2fbe0ecb6660809d9cc5f3976b077be3b8"