From 64325867a578815c4b5b128a6d30e5141446e92e Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Fri, 3 Nov 2023 11:57:10 +0300 Subject: [PATCH] apps/web: add flowbite --- apps/web/.eslintrc.js | 3 + apps/web/.gitignore | 6 +- apps/web/README.md | 124 ++- apps/web/app/components/header.tsx | 77 ++ apps/web/app/components/sidebar.tsx | 26 + apps/web/app/context/FlowbiteContext.tsx | 10 + apps/web/app/context/SidebarContext.tsx | 76 ++ apps/web/app/favicon.ico | Bin 25931 -> 0 bytes apps/web/app/globals.css | 24 - apps/web/app/layout.tsx | 21 +- apps/web/app/page.tsx | 1239 ++++++++++++++++++++-- apps/web/app/theme.ts | 37 + apps/web/next.config.js | 14 +- apps/web/package.json | 13 +- apps/web/postcss.config.js | 4 +- apps/web/public/circles.svg | 17 - apps/web/public/favicon.png | Bin 0 -> 2528 bytes apps/web/public/next.svg | 1 - apps/web/public/turborepo.svg | 32 - apps/web/public/vercel.svg | 1 - apps/web/tailwind.config.js | 14 + apps/web/tailwind.config.ts | 20 - yarn.lock | 129 ++- 23 files changed, 1643 insertions(+), 245 deletions(-) create mode 100644 apps/web/app/components/header.tsx create mode 100644 apps/web/app/components/sidebar.tsx create mode 100644 apps/web/app/context/FlowbiteContext.tsx create mode 100644 apps/web/app/context/SidebarContext.tsx delete mode 100644 apps/web/app/favicon.ico create mode 100644 apps/web/app/theme.ts delete mode 100644 apps/web/public/circles.svg create mode 100644 apps/web/public/favicon.png delete mode 100644 apps/web/public/next.svg delete mode 100644 apps/web/public/turborepo.svg delete mode 100644 apps/web/public/vercel.svg create mode 100644 apps/web/tailwind.config.js delete mode 100644 apps/web/tailwind.config.ts 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 718d6fea4835ec2d246af9800eddb7ffb276240c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAd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6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m diff --git a/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 ( -
-
+ + ); +} + +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 0000000000000000000000000000000000000000..918fd4a0c7983607e245e17c57f6fe7f32c69f61 GIT binary patch literal 2528 zcmZ{mcTm$?7RP@e0zrDmvIdY|QV0kUF~LLwNbl?-B_t4mgph>#P=arFL8O~Ui}W5u zu+jxlgisWCR8fi`J^^VKIvaL&X5BZlbLZSMbH1PNx#gdG6YOj*i-{Z;0RTYE0*7(n zW$0WuP8*fu*M2~`b< zvSOqV*wORx?bQ2~jp_x@MR%*s)1wnRcfkRWx8GC-Mh?Cp>+MNd z@7ErO)TcI1#UET?T3uh%tkz|}R!D%zcDl#BF-4Q@?r2C$(hyAb%jw143x->e-*^3! zmpnc4+pR;d@w=LS(LHrDD6TKE|3_ou_ks5_XRsP+Q3-GpkY)~(%t7aAbpsc)jISj- zy?zp~-lW?_%V8H!QSxxp6AJ9JPfQHTdxYdAO7eC4Gjp3Z)JT;tqSfX=kk3s@^FbxF z5ybMaL4;~iX}(Bv6uH$iV`>JyU!-<&cjgRmQ*`{c{9n7?UR``ETEbi=lqhPex1!&4%NEN`LSuov|3q~%5B{K z^nTWL`N;g`>XQSVr$ji#kTsR0cYm<5&TUnZ)@ci?^N#Vbns~A9iY-U`h5_m5ecF_$ z&xS-}^9J`HOOu0pmJ1<`QA_wR13X zBMkYyt(P(LWY3_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-$z+k{JDJW{vaeI#1XC{GPuUyadW8mDgl75`>$_7* zotJNX*Ay?8Y5n|krEa5UAyIbTI&nSr=vG?&$|d$LXB^bgZE-*GFQL5y70nj}%@%{3 zs+!8(M)M#S$Lo~&&ht&`c72hZ2PLkfZf)PrDeph~Fk_aTjyh;u3Qtx;1lHQ$4veP! zw({38$7;Rk*48Btj&54X18@7VQt&xF?uhK1g#5fSb+E4K1f}WV2H%q(8$N4Q{dnGs ztVYMW(fxer1SCF`z)Jue3Ww`K;d*cbCl~?=gCPx!bf8cq6l$myOZ^{1FvX8VjQsxw z4BfboX8<3rK%)@p;Xa`RAb?H}p&=mC_@92sLo|lz^BnrT{h1b+AO7J03#<*M#@svZUs{c9I{*Lx literal 0 HcmV?d00001 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"