diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33400caf..797aa093 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,26 +44,7 @@ jobs: - name: 🦺 Check Format and Lint id: static - run: pnpm run turbo format:check lint:report - continue-on-error: true - - - name: 💍 Merge lint reports - run: | - shopt -s globstar - jq -s '[.[]]|flatten' ./**/lint-results/*.json &> eslint_report.json - - - name: 👸 Annotate Code Linting Results - uses: ataylorme/eslint-annotate-action@v2 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - report-json: "eslint_report.json" - continue-on-error: true - - - name: ☁️ Upload ESLint report - uses: actions/upload-artifact@v4 - with: - name: eslint_report.json - path: eslint_report.json + run: pnpm run check continue-on-error: true - name: 📦 Build Packages @@ -118,6 +99,6 @@ jobs: flags: storage-react-query fail_ci_if_error: false - - name: ⚠️ Check for error + - name: Check for error if: steps.static.outcome != 'success' || steps.build.outcome != 'success' || steps.test.outcome != 'success' run: exit 1 diff --git a/README.md b/README.md index a827df05..9a734701 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,6 @@ The cache helpers are split up into reusable libraries. These are not meant for direct usage. -- `eslint-config-custom`: `eslint` configurations - `jest-presets`: `jest` presets - `postgrest-core`: shared logic for [postgrest-js](https://github.com/supabase/postgrest-js) - `storage-core`: shared logic for [storage-js](https://github.com/supabase/storage-js) operations diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..40481a46 --- /dev/null +++ b/biome.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", + "organizeImports": { + "enabled": true + }, + "files": { + "ignore": ["**/.next", "node_modules"] + }, + "linter": { + "enabled": false + }, + "formatter": { + "indentStyle": "space", + "indentWidth": 2, + "lineWidth": 80 + }, + "javascript": { + "formatter": { + "quoteStyle": "single", + "jsxQuoteStyle": "double" + } + } +} diff --git a/docs/next.config.js b/docs/next.config.js index e97fcb52..a41c1344 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -3,9 +3,9 @@ const nextConfig = { reactStrictMode: true, }; -const withNextra = require("nextra")({ - theme: "nextra-theme-docs", - themeConfig: "./theme.config.jsx", +const withNextra = require('nextra')({ + theme: 'nextra-theme-docs', + themeConfig: './theme.config.jsx', }); module.exports = withNextra(nextConfig); diff --git a/docs/package.json b/docs/package.json index 4cf4feca..de41db45 100644 --- a/docs/package.json +++ b/docs/package.json @@ -6,28 +6,23 @@ "dev": "next dev --port 3002", "build": "next build", "start": "next start", - "clean": "rm -rf .turbo && rm -rf lint-results && rm -rf .nyc_output && rm -rf node_modules && rm -rf dist", - "lint": "next lint", - "typecheck": "tsc --pretty --noEmit", - "format:write": "prettier --write \"pages/**/*.{ts,tsx,mdx}\"", - "format:check": "prettier --check \"pages/**/*.{ts,tsx,mdx}\"" + "clean": "rm -rf .turbo && rm -rf .nyc_output && rm -rf node_modules && rm -rf dist", + "typecheck": "tsc --pretty --noEmit" }, "dependencies": { - "@types/node": "^20.0.0", - "@types/react": "18.2.0", - "@types/react-dom": "^18.0.7", "@vercel/analytics": "^1.0.0", - "eslint": "8.54.0", - "eslint-config-next": "14.2.0", "next": "14.2.0", "nextra": "2.13.2", "nextra-theme-docs": "2.13.2", "react": "18.2.0", - "react-dom": "18.2.0", - "typescript": "5.4.2" + "react-dom": "18.2.0" }, "devDependencies": { "autoprefixer": "^10.4.13", + "typescript": "5.4.2", + "@types/node": "^20.0.0", + "@types/react": "18.2.0", + "@types/react-dom": "^18.0.7", "postcss": "^8.4.14", "tailwindcss": "3.4.0" } diff --git a/docs/pages/_app.tsx b/docs/pages/_app.tsx index ea2fc7ac..ca949b2a 100644 --- a/docs/pages/_app.tsx +++ b/docs/pages/_app.tsx @@ -1,5 +1,5 @@ -import type { AppProps } from "next/app"; -import { Analytics } from "@vercel/analytics/react"; +import { Analytics } from '@vercel/analytics/react'; +import type { AppProps } from 'next/app'; function MyApp({ Component, pageProps }: AppProps) { return ( diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js index 948e5125..070618b3 100644 --- a/docs/tailwind.config.js +++ b/docs/tailwind.config.js @@ -1,12 +1,12 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: [ - "./app/**/*.{js,ts,jsx,tsx}", - "./pages/**/*.{js,ts,jsx,tsx,md,mdx}", - "./components/**/*.{js,ts,jsx,tsx}", - ], - theme: { - extend: {}, - }, - plugins: [], + content: [ + './app/**/*.{js,ts,jsx,tsx}', + './pages/**/*.{js,ts,jsx,tsx,md,mdx}', + './components/**/*.{js,ts,jsx,tsx}', + ], + theme: { + extend: {}, + }, + plugins: [], }; diff --git a/docs/theme.config.jsx b/docs/theme.config.jsx index 2761d750..803cd2b9 100644 --- a/docs/theme.config.jsx +++ b/docs/theme.config.jsx @@ -1,9 +1,9 @@ -import { useRouter } from "next/router"; +import { useRouter } from 'next/router'; export default { logo: Supabase Cache Helpers, project: { - link: "https://github.com/psteinroe/supabase-cache-helpers", + link: 'https://github.com/psteinroe/supabase-cache-helpers', }, head: ( <> @@ -33,17 +33,17 @@ export default { ), docsRepositoryBase: - "https://github.com/psteinroe/supabase-cache-helpers/blob/core/docs", + 'https://github.com/psteinroe/supabase-cache-helpers/blob/core/docs', useNextSeoProps() { const { asPath } = useRouter(); - if (asPath !== "/") { + if (asPath !== '/') { return { - titleTemplate: "%s – Supabase Cache Helpers", + titleTemplate: '%s – Supabase Cache Helpers', }; } }, banner: { - key: "v1.0-release", + key: 'v1.0-release', text: ( 🎉 We are hiring! You want to work on a larger-scale Supabase project? @@ -54,7 +54,7 @@ export default { footer: { text: ( - MIT {new Date().getFullYear()} ©{" "} + MIT {new Date().getFullYear()} ©{' '} = ({ children }) => (
{children}
-) +); export type ContactCardProps = { contact: Pick< - Database["public"]["Tables"]["contact"]["Row"], - "id" | "username" | "continent" - > - onClick: () => void -} + Database['public']['Tables']['contact']['Row'], + 'id' | 'username' | 'continent' + >; + onClick: () => void; +}; export const ContactCard: FC = ({ contact, onClick }) => { - const supabase = useSupabaseClient() + const supabase = useSupabaseClient(); const { data: avatarUrl } = useFileUrl( - supabase.storage.from("contact_avatars"), + supabase.storage.from('contact_avatars'), contact.id, - "public", - { ensureExistence: true } - ) + 'public', + { + ensureExistence: true, + }, + ); return (
@@ -44,5 +46,5 @@ export const ContactCard: FC = ({ contact, onClick }) => {
- ) -} + ); +}; diff --git a/examples/react-query/components/contact/upsert-contact.modal.tsx b/examples/react-query/components/contact/upsert-contact.modal.tsx index 058c14c1..b2089d93 100644 --- a/examples/react-query/components/contact/upsert-contact.modal.tsx +++ b/examples/react-query/components/contact/upsert-contact.modal.tsx @@ -1,14 +1,14 @@ -import { FC, FormEventHandler, useCallback, useEffect } from "react" -import { useUpsertMutation } from "@supabase-cache-helpers/postgrest-react-query" -import { useSupabaseClient } from "@supabase/auth-helpers-react" -import { Loader2 } from "lucide-react" -import { Controller, useForm } from "react-hook-form" -import { v4 as uuid } from "uuid" -import { z } from "zod" +import { useUpsertMutation } from '@supabase-cache-helpers/postgrest-react-query'; +import { useSupabaseClient } from '@supabase/auth-helpers-react'; +import { Loader2 } from 'lucide-react'; +import { type FC, type FormEventHandler, useCallback, useEffect } from 'react'; +import { Controller, useForm } from 'react-hook-form'; +import { v4 as uuid } from 'uuid'; +import { z } from 'zod'; -import { Database } from "@/types/database" -import { ContinentSelect } from "../continent/continent-select" -import { Button } from "../ui/button" +import type { Database } from '@/types/database'; +import { ContinentSelect } from '../continent/continent-select'; +import { Button } from '../ui/button'; import { Dialog, DialogContent, @@ -16,72 +16,74 @@ import { DialogFooter, DialogHeader, DialogTitle, -} from "../ui/dialog" -import { Input } from "../ui/input" -import { Label } from "../ui/label" +} from '../ui/dialog'; +import { Input } from '../ui/input'; +import { Label } from '../ui/label'; export const continentEnumSchema = z.enum([ - "AF", - "AS", - "EU", - "NA", - "SA", - "OC", - "AN", -]) + 'AF', + 'AS', + 'EU', + 'NA', + 'SA', + 'OC', + 'AN', +]); const upsertContactSchema = z.object({ id: z.string().optional(), username: z.string(), continent: continentEnumSchema, -}) +}); -export type UpsertContactFormData = z.infer +export type UpsertContactFormData = z.infer; export type UpsertContactModalProps = { - contact?: UpsertContactFormData | null - open: boolean - onClose: () => void -} + contact?: UpsertContactFormData | null; + open: boolean; + onClose: () => void; +}; export const UpsertContactModal: FC = ({ contact, open, onClose, }) => { - const supabase = useSupabaseClient() + const supabase = useSupabaseClient(); const { mutateAsync: upsert, isPending } = useUpsertMutation( - supabase.from("contact"), - ["id"], + supabase.from('contact'), + ['id'], null, - { onSuccess: onClose } - ) + { + onSuccess: onClose, + }, + ); const { register, handleSubmit, control, reset } = useForm({ - defaultValues: { id: undefined, username: "@psteinroe", continent: "EU" }, - }) + defaultValues: { id: undefined, username: '@psteinroe', continent: 'EU' }, + }); useEffect(() => { - if (contact) reset(contact) - }, [contact, reset]) + if (contact) reset(contact); + }, [contact, reset]); const onSubmitHandler = useCallback>( (e) => { handleSubmit(async (data) => { - await upsert([{ ...data, id: data.id ?? uuid() }]) - })(e) + await upsert([{ ...data, id: data.id ?? uuid() }]); + })(e); }, - [handleSubmit, upsert] - ) + [handleSubmit, upsert], + ); const onOpenChangeHandler = useCallback( (open: boolean) => { - if (open === false) onClose() + if (open === false) onClose(); }, - [onClose] - ) + [onClose], + ); return ( @@ -101,7 +103,7 @@ export const UpsertContactModal: FC = ({
@@ -113,7 +115,7 @@ export const UpsertContactModal: FC = ({ name="continent" render={({ field }) => ( field.onChange(v), @@ -127,12 +129,12 @@ export const UpsertContactModal: FC = ({
- ) -} + ); +}; diff --git a/examples/react-query/components/continent/continent-select.tsx b/examples/react-query/components/continent/continent-select.tsx index 00f88360..0bdac4ac 100644 --- a/examples/react-query/components/continent/continent-select.tsx +++ b/examples/react-query/components/continent/continent-select.tsx @@ -1,39 +1,39 @@ -import { FC } from "react" -import * as SelectPrimitive from "@radix-ui/react-select" -import { useQuery } from "@supabase-cache-helpers/postgrest-react-query" -import { useSupabaseClient } from "@supabase/auth-helpers-react" +import type * as SelectPrimitive from '@radix-ui/react-select'; +import { useQuery } from '@supabase-cache-helpers/postgrest-react-query'; +import { useSupabaseClient } from '@supabase/auth-helpers-react'; +import type { FC } from 'react'; -import { Database } from "@/types/database" -import { cn } from "@/lib/utils" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "@/components/ui/select" +} from '@/components/ui/select'; +import { cn } from '@/lib/utils'; +import type { Database } from '@/types/database'; export type ContinentSelectProps = { - containerProps?: SelectPrimitive.SelectProps - triggerProps?: SelectPrimitive.SelectTriggerProps -} + containerProps?: SelectPrimitive.SelectProps; + triggerProps?: SelectPrimitive.SelectTriggerProps; +}; export const ContinentSelect: FC = ({ containerProps, triggerProps, }) => { - const supabase = useSupabaseClient() + const supabase = useSupabaseClient(); const { data, isLoading } = useQuery( - supabase.from("continent").select("code,name") - ) + supabase.from('continent').select('code,name'), + ); - const { disabled, ...props } = containerProps + const { disabled, ...props } = containerProps; return ( - ) -} + ); +}; diff --git a/examples/react-query/components/icons.tsx b/examples/react-query/components/icons.tsx index 3096c11c..23d0261b 100644 --- a/examples/react-query/components/icons.tsx +++ b/examples/react-query/components/icons.tsx @@ -1,13 +1,13 @@ import { Laptop, - LucideProps, + type Icon as LucideIcon, + type LucideProps, Moon, SunMedium, Twitter, - type Icon as LucideIcon, -} from "lucide-react" +} from 'lucide-react'; -export type Icon = LucideIcon +export type Icon = LucideIcon; export const Icons = { sun: SunMedium, @@ -30,4 +30,4 @@ export const Icons = { > ), -} +}; diff --git a/examples/react-query/components/layout.tsx b/examples/react-query/components/layout.tsx index 8e4c3d6c..a4ba94d2 100644 --- a/examples/react-query/components/layout.tsx +++ b/examples/react-query/components/layout.tsx @@ -1,27 +1,27 @@ -import { useSubscriptionQuery } from "@supabase-cache-helpers/postgrest-react-query" -import { useSupabaseClient } from "@supabase/auth-helpers-react" +import { useSubscriptionQuery } from '@supabase-cache-helpers/postgrest-react-query'; +import { useSupabaseClient } from '@supabase/auth-helpers-react'; -import { Database } from "@/types/database" -import { SiteHeader } from "@/components/site-header" +import { SiteHeader } from '@/components/site-header'; +import type { Database } from '@/types/database'; interface LayoutProps { - children: React.ReactNode + children: React.ReactNode; } export function Layout({ children }: LayoutProps) { - const supabase = useSupabaseClient() + const supabase = useSupabaseClient(); useSubscriptionQuery( supabase, - "contacts", - { event: "*", table: "contact", schema: "public" }, - ["id"] - ) + 'contacts', + { event: '*', table: 'contact', schema: 'public' }, + ['id'], + ); return ( <>
{children}
- ) + ); } diff --git a/examples/react-query/components/main-nav.tsx b/examples/react-query/components/main-nav.tsx index 42263b9b..1a2e4f1b 100644 --- a/examples/react-query/components/main-nav.tsx +++ b/examples/react-query/components/main-nav.tsx @@ -1,11 +1,8 @@ -import * as React from "react" -import Link from "next/link" +import Link from 'next/link'; +import * as React from 'react'; -import { NavItem } from "@/types/nav" -import { siteConfig } from "@/config/site" -import { cn } from "@/lib/utils" -import { Icons } from "@/components/icons" -import { Button } from "@/components/ui/button" +import { Icons } from '@/components/icons'; +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, @@ -13,10 +10,13 @@ import { DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu" +} from '@/components/ui/dropdown-menu'; +import { siteConfig } from '@/config/site'; +import { cn } from '@/lib/utils'; +import type { NavItem } from '@/types/nav'; interface MainNavProps { - items?: NavItem[] + items?: NavItem[]; } export function MainNav({ items }: MainNavProps) { @@ -36,13 +36,13 @@ export function MainNav({ items }: MainNavProps) { key={index} href={item.href} className={cn( - "flex items-center text-lg font-semibold text-slate-600 hover:text-slate-900 dark:text-slate-100 sm:text-sm", - item.disabled && "cursor-not-allowed opacity-80" + 'flex items-center text-lg font-semibold text-slate-600 hover:text-slate-900 dark:text-slate-100 sm:text-sm', + item.disabled && 'cursor-not-allowed opacity-80', )} > {item.title} - ) + ), )} ) : null} @@ -52,7 +52,7 @@ export function MainNav({ items }: MainNavProps) { variant="ghost" className="-ml-4 text-base hover:bg-transparent focus:ring-0 md:hidden" > - {" "} + {' '} Menu @@ -73,10 +73,10 @@ export function MainNav({ items }: MainNavProps) { {item.title} - ) + ), )} - ) + ); } diff --git a/examples/react-query/components/site-header.tsx b/examples/react-query/components/site-header.tsx index 5469b004..ae62a0c2 100644 --- a/examples/react-query/components/site-header.tsx +++ b/examples/react-query/components/site-header.tsx @@ -1,10 +1,10 @@ -import Link from "next/link" +import Link from 'next/link'; -import { siteConfig } from "@/config/site" -import { Icons } from "@/components/icons" -import { MainNav } from "@/components/main-nav" -import { ThemeToggle } from "@/components/theme-toggle" -import { buttonVariants } from "@/components/ui/button" +import { Icons } from '@/components/icons'; +import { MainNav } from '@/components/main-nav'; +import { ThemeToggle } from '@/components/theme-toggle'; +import { buttonVariants } from '@/components/ui/button'; +import { siteConfig } from '@/config/site'; export function SiteHeader() { return ( @@ -20,9 +20,9 @@ export function SiteHeader() { >
@@ -36,9 +36,9 @@ export function SiteHeader() { >
@@ -50,5 +50,5 @@ export function SiteHeader() {
- ) + ); } diff --git a/examples/react-query/components/theme-toggle.tsx b/examples/react-query/components/theme-toggle.tsx index 9c5ae634..87606c4f 100644 --- a/examples/react-query/components/theme-toggle.tsx +++ b/examples/react-query/components/theme-toggle.tsx @@ -1,17 +1,17 @@ -import * as React from "react" -import { useTheme } from "next-themes" +import { useTheme } from 'next-themes'; +import * as React from 'react'; -import { Icons } from "@/components/icons" -import { Button } from "@/components/ui/button" +import { Icons } from '@/components/icons'; +import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu" +} from '@/components/ui/dropdown-menu'; export function ThemeToggle() { - const { setTheme } = useTheme() + const { setTheme } = useTheme(); return ( @@ -23,19 +23,19 @@ export function ThemeToggle() { - setTheme("light")}> + setTheme('light')}> Light - setTheme("dark")}> + setTheme('dark')}> Dark - setTheme("system")}> + setTheme('system')}> System - ) + ); } diff --git a/examples/react-query/components/typography/code.tsx b/examples/react-query/components/typography/code.tsx index 2c4953cf..ff237e25 100644 --- a/examples/react-query/components/typography/code.tsx +++ b/examples/react-query/components/typography/code.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export const Code: FC< DetailedHTMLProps, HTMLElement> @@ -8,12 +8,12 @@ export const Code: FC< return ( {children} - ) -} + ); +}; diff --git a/examples/react-query/components/typography/h1.tsx b/examples/react-query/components/typography/h1.tsx index 2ab1ceef..ec643729 100644 --- a/examples/react-query/components/typography/h1.tsx +++ b/examples/react-query/components/typography/h1.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export const H1: FC< DetailedHTMLProps, HTMLHeadingElement> @@ -8,12 +8,12 @@ export const H1: FC< return (

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/h2.tsx b/examples/react-query/components/typography/h2.tsx index 543d0782..588a2bf2 100644 --- a/examples/react-query/components/typography/h2.tsx +++ b/examples/react-query/components/typography/h2.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export const H2: FC< DetailedHTMLProps, HTMLHeadingElement> @@ -8,12 +8,12 @@ export const H2: FC< return (

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/h3.tsx b/examples/react-query/components/typography/h3.tsx index ed751703..aa2a2f67 100644 --- a/examples/react-query/components/typography/h3.tsx +++ b/examples/react-query/components/typography/h3.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export const H3: FC< DetailedHTMLProps, HTMLHeadingElement> @@ -8,12 +8,12 @@ export const H3: FC< return (

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/h4.tsx b/examples/react-query/components/typography/h4.tsx index 54d94307..2a132747 100644 --- a/examples/react-query/components/typography/h4.tsx +++ b/examples/react-query/components/typography/h4.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export const H4: FC< DetailedHTMLProps, HTMLHeadingElement> @@ -8,12 +8,12 @@ export const H4: FC< return (

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/p.tsx b/examples/react-query/components/typography/p.tsx index a6cd70c2..b1ea972b 100644 --- a/examples/react-query/components/typography/p.tsx +++ b/examples/react-query/components/typography/p.tsx @@ -1,16 +1,16 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export const P: FC< DetailedHTMLProps, HTMLParagraphElement> > = ({ className, children, ...props }) => { return (

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/small.tsx b/examples/react-query/components/typography/small.tsx index b21e0046..f78a4f4d 100644 --- a/examples/react-query/components/typography/small.tsx +++ b/examples/react-query/components/typography/small.tsx @@ -1,16 +1,16 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export const Small: FC< DetailedHTMLProps, HTMLElement> > = ({ className, children, ...props }) => { return ( {children} - ) -} + ); +}; diff --git a/examples/react-query/components/typography/subtle.tsx b/examples/react-query/components/typography/subtle.tsx index 17455843..3df4f3bd 100644 --- a/examples/react-query/components/typography/subtle.tsx +++ b/examples/react-query/components/typography/subtle.tsx @@ -1,16 +1,16 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export const Subtle: FC< DetailedHTMLProps, HTMLParagraphElement> > = ({ className, children, ...props }) => { return (

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/ui/accordion.tsx b/examples/react-query/components/ui/accordion.tsx index 80c278bb..8b113d2e 100644 --- a/examples/react-query/components/ui/accordion.tsx +++ b/examples/react-query/components/ui/accordion.tsx @@ -1,12 +1,12 @@ -"use client" +'use client'; -import * as React from "react" -import * as AccordionPrimitive from "@radix-ui/react-accordion" -import { ChevronDown } from "lucide-react" +import * as AccordionPrimitive from '@radix-ui/react-accordion'; +import { ChevronDown } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const Accordion = AccordionPrimitive.Root +const Accordion = AccordionPrimitive.Root; const AccordionItem = React.forwardRef< React.ElementRef, @@ -15,13 +15,13 @@ const AccordionItem = React.forwardRef< -)) -AccordionItem.displayName = "AccordionItem" +)); +AccordionItem.displayName = 'AccordionItem'; const AccordionTrigger = React.forwardRef< React.ElementRef, @@ -31,8 +31,8 @@ const AccordionTrigger = React.forwardRef< svg]:rotate-180", - className + 'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180', + className, )} {...props} > @@ -40,8 +40,8 @@ const AccordionTrigger = React.forwardRef< -)) -AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName +)); +AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName; const AccordionContent = React.forwardRef< React.ElementRef, @@ -50,14 +50,14 @@ const AccordionContent = React.forwardRef<
{children}
-)) -AccordionContent.displayName = AccordionPrimitive.Content.displayName +)); +AccordionContent.displayName = AccordionPrimitive.Content.displayName; -export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }; diff --git a/examples/react-query/components/ui/alert-dialog.tsx b/examples/react-query/components/ui/alert-dialog.tsx index 909dd744..adbc5cc4 100644 --- a/examples/react-query/components/ui/alert-dialog.tsx +++ b/examples/react-query/components/ui/alert-dialog.tsx @@ -1,13 +1,13 @@ -"use client" +'use client'; -import * as React from "react" -import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" +import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const AlertDialog = AlertDialogPrimitive.Root +const AlertDialog = AlertDialogPrimitive.Root; -const AlertDialogTrigger = AlertDialogPrimitive.Trigger +const AlertDialogTrigger = AlertDialogPrimitive.Trigger; const AlertDialogPortal = ({ className, @@ -19,8 +19,8 @@ const AlertDialogPortal = ({ {children} -) -AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName +); +AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName; const AlertDialogOverlay = React.forwardRef< React.ElementRef, @@ -28,14 +28,14 @@ const AlertDialogOverlay = React.forwardRef< >(({ className, children, ...props }, ref) => ( -)) -AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName +)); +AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName; const AlertDialogContent = React.forwardRef< React.ElementRef, @@ -46,15 +46,15 @@ const AlertDialogContent = React.forwardRef< -)) -AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName +)); +AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName; const AlertDialogHeader = ({ className, @@ -62,13 +62,13 @@ const AlertDialogHeader = ({ }: React.HTMLAttributes) => (
-) -AlertDialogHeader.displayName = "AlertDialogHeader" +); +AlertDialogHeader.displayName = 'AlertDialogHeader'; const AlertDialogFooter = ({ className, @@ -76,13 +76,13 @@ const AlertDialogFooter = ({ }: React.HTMLAttributes) => (
-) -AlertDialogFooter.displayName = "AlertDialogFooter" +); +AlertDialogFooter.displayName = 'AlertDialogFooter'; const AlertDialogTitle = React.forwardRef< React.ElementRef, @@ -91,14 +91,14 @@ const AlertDialogTitle = React.forwardRef< -)) -AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName +)); +AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName; const AlertDialogDescription = React.forwardRef< React.ElementRef, @@ -106,12 +106,12 @@ const AlertDialogDescription = React.forwardRef< >(({ className, ...props }, ref) => ( -)) +)); AlertDialogDescription.displayName = - AlertDialogPrimitive.Description.displayName + AlertDialogPrimitive.Description.displayName; const AlertDialogAction = React.forwardRef< React.ElementRef, @@ -120,13 +120,13 @@ const AlertDialogAction = React.forwardRef< -)) -AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName +)); +AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName; const AlertDialogCancel = React.forwardRef< React.ElementRef, @@ -135,13 +135,13 @@ const AlertDialogCancel = React.forwardRef< -)) -AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName +)); +AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName; export { AlertDialog, @@ -153,4 +153,4 @@ export { AlertDialogDescription, AlertDialogAction, AlertDialogCancel, -} +}; diff --git a/examples/react-query/components/ui/aspect-ratio.tsx b/examples/react-query/components/ui/aspect-ratio.tsx index d6a5226f..aaabffbc 100644 --- a/examples/react-query/components/ui/aspect-ratio.tsx +++ b/examples/react-query/components/ui/aspect-ratio.tsx @@ -1,7 +1,7 @@ -"use client" +'use client'; -import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" +import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio'; -const AspectRatio = AspectRatioPrimitive.Root +const AspectRatio = AspectRatioPrimitive.Root; -export { AspectRatio } +export { AspectRatio }; diff --git a/examples/react-query/components/ui/avatar.tsx b/examples/react-query/components/ui/avatar.tsx index f06eb326..336bbdd9 100644 --- a/examples/react-query/components/ui/avatar.tsx +++ b/examples/react-query/components/ui/avatar.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as AvatarPrimitive from "@radix-ui/react-avatar" +import * as AvatarPrimitive from '@radix-ui/react-avatar'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const Avatar = React.forwardRef< React.ElementRef, @@ -12,13 +12,13 @@ const Avatar = React.forwardRef< -)) -Avatar.displayName = AvatarPrimitive.Root.displayName +)); +Avatar.displayName = AvatarPrimitive.Root.displayName; const AvatarImage = React.forwardRef< React.ElementRef, @@ -26,11 +26,11 @@ const AvatarImage = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -AvatarImage.displayName = AvatarPrimitive.Image.displayName +)); +AvatarImage.displayName = AvatarPrimitive.Image.displayName; const AvatarFallback = React.forwardRef< React.ElementRef, @@ -39,12 +39,12 @@ const AvatarFallback = React.forwardRef< -)) -AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName +)); +AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName; -export { Avatar, AvatarImage, AvatarFallback } +export { Avatar, AvatarImage, AvatarFallback }; diff --git a/examples/react-query/components/ui/button.tsx b/examples/react-query/components/ui/button.tsx index 69e03618..12cbb088 100644 --- a/examples/react-query/components/ui/button.tsx +++ b/examples/react-query/components/ui/button.tsx @@ -1,37 +1,37 @@ -import * as React from "react" -import { cva, VariantProps } from "class-variance-authority" +import { type VariantProps, cva } from 'class-variance-authority'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const buttonVariants = cva( - "active:scale-95 inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 dark:hover:bg-slate-800 dark:hover:text-slate-100 disabled:opacity-50 dark:focus:ring-slate-400 disabled:pointer-events-none dark:focus:ring-offset-slate-900 data-[state=open]:bg-slate-100 dark:data-[state=open]:bg-slate-800", + 'active:scale-95 inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 dark:hover:bg-slate-800 dark:hover:text-slate-100 disabled:opacity-50 dark:focus:ring-slate-400 disabled:pointer-events-none dark:focus:ring-offset-slate-900 data-[state=open]:bg-slate-100 dark:data-[state=open]:bg-slate-800', { variants: { variant: { default: - "bg-slate-900 text-white hover:bg-slate-700 dark:bg-slate-50 dark:text-slate-900", + 'bg-slate-900 text-white hover:bg-slate-700 dark:bg-slate-50 dark:text-slate-900', destructive: - "bg-red-500 text-white hover:bg-red-600 dark:hover:bg-red-600", + 'bg-red-500 text-white hover:bg-red-600 dark:hover:bg-red-600', outline: - "bg-transparent border border-slate-200 hover:bg-slate-100 dark:border-slate-700 dark:text-slate-100", + 'bg-transparent border border-slate-200 hover:bg-slate-100 dark:border-slate-700 dark:text-slate-100', subtle: - "bg-slate-100 text-slate-900 hover:bg-slate-200 dark:bg-slate-700 dark:text-slate-100", + 'bg-slate-100 text-slate-900 hover:bg-slate-200 dark:bg-slate-700 dark:text-slate-100', ghost: - "bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 dark:text-slate-100 dark:hover:text-slate-100 data-[state=open]:bg-transparent dark:data-[state=open]:bg-transparent", - link: "bg-transparent dark:bg-transparent underline-offset-4 hover:underline text-slate-900 dark:text-slate-100 hover:bg-transparent dark:hover:bg-transparent", + 'bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 dark:text-slate-100 dark:hover:text-slate-100 data-[state=open]:bg-transparent dark:data-[state=open]:bg-transparent', + link: 'bg-transparent dark:bg-transparent underline-offset-4 hover:underline text-slate-900 dark:text-slate-100 hover:bg-transparent dark:hover:bg-transparent', }, size: { - default: "h-10 py-2 px-4", - sm: "h-9 px-2 rounded-md", - lg: "h-11 px-8 rounded-md", + default: 'h-10 py-2 px-4', + sm: 'h-9 px-2 rounded-md', + lg: 'h-11 px-8 rounded-md', }, }, defaultVariants: { - variant: "default", - size: "default", + variant: 'default', + size: 'default', }, - } -) + }, +); export interface ButtonProps extends React.ButtonHTMLAttributes, @@ -45,9 +45,9 @@ const Button = React.forwardRef( ref={ref} {...props} /> - ) - } -) -Button.displayName = "Button" + ); + }, +); +Button.displayName = 'Button'; -export { Button, buttonVariants } +export { Button, buttonVariants }; diff --git a/examples/react-query/components/ui/checkbox.tsx b/examples/react-query/components/ui/checkbox.tsx index 3d395ea7..c6020a2f 100644 --- a/examples/react-query/components/ui/checkbox.tsx +++ b/examples/react-query/components/ui/checkbox.tsx @@ -1,10 +1,10 @@ -"use client" +'use client'; -import * as React from "react" -import * as CheckboxPrimitive from "@radix-ui/react-checkbox" -import { Check } from "lucide-react" +import * as CheckboxPrimitive from '@radix-ui/react-checkbox'; +import { Check } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const Checkbox = React.forwardRef< React.ElementRef, @@ -13,18 +13,18 @@ const Checkbox = React.forwardRef< -)) -Checkbox.displayName = CheckboxPrimitive.Root.displayName +)); +Checkbox.displayName = CheckboxPrimitive.Root.displayName; -export { Checkbox } +export { Checkbox }; diff --git a/examples/react-query/components/ui/collapsible.tsx b/examples/react-query/components/ui/collapsible.tsx index 9fa48946..86ab87d8 100644 --- a/examples/react-query/components/ui/collapsible.tsx +++ b/examples/react-query/components/ui/collapsible.tsx @@ -1,11 +1,11 @@ -"use client" +'use client'; -import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" +import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'; -const Collapsible = CollapsiblePrimitive.Root +const Collapsible = CollapsiblePrimitive.Root; -const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger +const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; -const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent +const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent; -export { Collapsible, CollapsibleTrigger, CollapsibleContent } +export { Collapsible, CollapsibleTrigger, CollapsibleContent }; diff --git a/examples/react-query/components/ui/command.tsx b/examples/react-query/components/ui/command.tsx index fc6a1040..ca0d721a 100644 --- a/examples/react-query/components/ui/command.tsx +++ b/examples/react-query/components/ui/command.tsx @@ -1,12 +1,12 @@ -"use client" +'use client'; -import * as React from "react" -import { DialogProps } from "@radix-ui/react-dialog" -import { Command as CommandPrimitive, useCommandState } from "cmdk" -import { ChevronsUpDown, Search } from "lucide-react" +import type { DialogProps } from '@radix-ui/react-dialog'; +import { Command as CommandPrimitive, useCommandState } from 'cmdk'; +import { ChevronsUpDown, Search } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" -import { Dialog, DialogContent } from "@/components/ui/dialog" +import { Dialog, DialogContent } from '@/components/ui/dialog'; +import { cn } from '@/lib/utils'; const Command = React.forwardRef< React.ElementRef, @@ -15,13 +15,13 @@ const Command = React.forwardRef< -)) -Command.displayName = CommandPrimitive.displayName +)); +Command.displayName = CommandPrimitive.displayName; interface CommandDialogProps extends DialogProps {} @@ -34,8 +34,8 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => { - ) -} + ); +}; const CommandInput = React.forwardRef< React.ElementRef, @@ -49,15 +49,15 @@ const CommandInput = React.forwardRef<
-)) +)); -CommandInput.displayName = CommandPrimitive.Input.displayName +CommandInput.displayName = CommandPrimitive.Input.displayName; const CommandList = React.forwardRef< React.ElementRef, @@ -65,12 +65,12 @@ const CommandList = React.forwardRef< >(({ className, ...props }, ref) => ( -)) +)); -CommandList.displayName = CommandPrimitive.List.displayName +CommandList.displayName = CommandPrimitive.List.displayName; const CommandEmpty = React.forwardRef< React.ElementRef, @@ -81,9 +81,9 @@ const CommandEmpty = React.forwardRef< className="py-6 text-center text-sm" {...props} /> -)) +)); -CommandEmpty.displayName = CommandPrimitive.Empty.displayName +CommandEmpty.displayName = CommandPrimitive.Empty.displayName; const CommandGroup = React.forwardRef< React.ElementRef, @@ -92,14 +92,14 @@ const CommandGroup = React.forwardRef< -)) +)); -CommandGroup.displayName = CommandPrimitive.Group.displayName +CommandGroup.displayName = CommandPrimitive.Group.displayName; const CommandSeparator = React.forwardRef< React.ElementRef, @@ -107,11 +107,11 @@ const CommandSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -CommandSeparator.displayName = CommandPrimitive.Separator.displayName +)); +CommandSeparator.displayName = CommandPrimitive.Separator.displayName; const CommandItem = React.forwardRef< React.ElementRef, @@ -120,14 +120,14 @@ const CommandItem = React.forwardRef< -)) +)); -CommandItem.displayName = CommandPrimitive.Item.displayName +CommandItem.displayName = CommandPrimitive.Item.displayName; const CommandShortcut = ({ className, @@ -136,14 +136,14 @@ const CommandShortcut = ({ return ( - ) -} -CommandShortcut.displayName = "CommandShortcut" + ); +}; +CommandShortcut.displayName = 'CommandShortcut'; export { Command, @@ -155,4 +155,4 @@ export { CommandItem, CommandShortcut, CommandSeparator, -} +}; diff --git a/examples/react-query/components/ui/context-menu.tsx b/examples/react-query/components/ui/context-menu.tsx index e20fbb3d..cb8a5241 100644 --- a/examples/react-query/components/ui/context-menu.tsx +++ b/examples/react-query/components/ui/context-menu.tsx @@ -1,43 +1,43 @@ -"use client" +'use client'; -import * as React from "react" -import * as ContextMenuPrimitive from "@radix-ui/react-context-menu" -import { Check, ChevronRight, Circle } from "lucide-react" +import * as ContextMenuPrimitive from '@radix-ui/react-context-menu'; +import { Check, ChevronRight, Circle } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const ContextMenu = ContextMenuPrimitive.Root +const ContextMenu = ContextMenuPrimitive.Root; -const ContextMenuTrigger = ContextMenuPrimitive.Trigger +const ContextMenuTrigger = ContextMenuPrimitive.Trigger; -const ContextMenuGroup = ContextMenuPrimitive.Group +const ContextMenuGroup = ContextMenuPrimitive.Group; -const ContextMenuPortal = ContextMenuPrimitive.Portal +const ContextMenuPortal = ContextMenuPrimitive.Portal; -const ContextMenuSub = ContextMenuPrimitive.Sub +const ContextMenuSub = ContextMenuPrimitive.Sub; -const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup +const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup; const ContextMenuSubTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, children, ...props }, ref) => ( {children} -)) -ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName +)); +ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName; const ContextMenuSubContent = React.forwardRef< React.ElementRef, @@ -46,13 +46,13 @@ const ContextMenuSubContent = React.forwardRef< -)) -ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName +)); +ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName; const ContextMenuContent = React.forwardRef< React.ElementRef, @@ -62,32 +62,32 @@ const ContextMenuContent = React.forwardRef< -)) -ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName +)); +ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName; const ContextMenuItem = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName +)); +ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName; const ContextMenuCheckboxItem = React.forwardRef< React.ElementRef, @@ -96,8 +96,8 @@ const ContextMenuCheckboxItem = React.forwardRef< {children} -)) +)); ContextMenuCheckboxItem.displayName = - ContextMenuPrimitive.CheckboxItem.displayName + ContextMenuPrimitive.CheckboxItem.displayName; const ContextMenuRadioItem = React.forwardRef< React.ElementRef, @@ -120,8 +120,8 @@ const ContextMenuRadioItem = React.forwardRef< @@ -132,26 +132,26 @@ const ContextMenuRadioItem = React.forwardRef< {children} -)) -ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName +)); +ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName; const ContextMenuLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName +)); +ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName; const ContextMenuSeparator = React.forwardRef< React.ElementRef, @@ -159,11 +159,11 @@ const ContextMenuSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName +)); +ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName; const ContextMenuShortcut = ({ className, @@ -172,14 +172,14 @@ const ContextMenuShortcut = ({ return ( - ) -} -ContextMenuShortcut.displayName = "ContextMenuShortcut" + ); +}; +ContextMenuShortcut.displayName = 'ContextMenuShortcut'; export { ContextMenu, @@ -197,4 +197,4 @@ export { ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, -} +}; diff --git a/examples/react-query/components/ui/dialog.tsx b/examples/react-query/components/ui/dialog.tsx index 89047e5f..6b72fd87 100644 --- a/examples/react-query/components/ui/dialog.tsx +++ b/examples/react-query/components/ui/dialog.tsx @@ -1,14 +1,14 @@ -"use client" +'use client'; -import * as React from "react" -import * as DialogPrimitive from "@radix-ui/react-dialog" -import { X } from "lucide-react" +import * as DialogPrimitive from '@radix-ui/react-dialog'; +import { X } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const Dialog = DialogPrimitive.Root +const Dialog = DialogPrimitive.Root; -const DialogTrigger = DialogPrimitive.Trigger +const DialogTrigger = DialogPrimitive.Trigger; const DialogPortal = ({ className, @@ -20,8 +20,8 @@ const DialogPortal = ({ {children}
-) -DialogPortal.displayName = DialogPrimitive.Portal.displayName +); +DialogPortal.displayName = DialogPrimitive.Portal.displayName; const DialogOverlay = React.forwardRef< React.ElementRef, @@ -29,14 +29,14 @@ const DialogOverlay = React.forwardRef< >(({ className, children, ...props }, ref) => ( -)) -DialogOverlay.displayName = DialogPrimitive.Overlay.displayName +)); +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; const DialogContent = React.forwardRef< React.ElementRef, @@ -47,9 +47,9 @@ const DialogContent = React.forwardRef< @@ -60,8 +60,8 @@ const DialogContent = React.forwardRef< -)) -DialogContent.displayName = DialogPrimitive.Content.displayName +)); +DialogContent.displayName = DialogPrimitive.Content.displayName; const DialogHeader = ({ className, @@ -69,13 +69,13 @@ const DialogHeader = ({ }: React.HTMLAttributes) => (
-) -DialogHeader.displayName = "DialogHeader" +); +DialogHeader.displayName = 'DialogHeader'; const DialogFooter = ({ className, @@ -83,13 +83,13 @@ const DialogFooter = ({ }: React.HTMLAttributes) => (
-) -DialogFooter.displayName = "DialogFooter" +); +DialogFooter.displayName = 'DialogFooter'; const DialogTitle = React.forwardRef< React.ElementRef, @@ -98,14 +98,14 @@ const DialogTitle = React.forwardRef< -)) -DialogTitle.displayName = DialogPrimitive.Title.displayName +)); +DialogTitle.displayName = DialogPrimitive.Title.displayName; const DialogDescription = React.forwardRef< React.ElementRef, @@ -113,11 +113,11 @@ const DialogDescription = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -DialogDescription.displayName = DialogPrimitive.Description.displayName +)); +DialogDescription.displayName = DialogPrimitive.Description.displayName; export { Dialog, @@ -127,4 +127,4 @@ export { DialogFooter, DialogTitle, DialogDescription, -} +}; diff --git a/examples/react-query/components/ui/dropdown-menu.tsx b/examples/react-query/components/ui/dropdown-menu.tsx index 03cba5d8..fbc30fee 100644 --- a/examples/react-query/components/ui/dropdown-menu.tsx +++ b/examples/react-query/components/ui/dropdown-menu.tsx @@ -1,44 +1,44 @@ -"use client" +'use client'; -import * as React from "react" -import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu" -import { Check, ChevronRight, Circle } from "lucide-react" +import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; +import { Check, ChevronRight, Circle } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const DropdownMenu = DropdownMenuPrimitive.Root +const DropdownMenu = DropdownMenuPrimitive.Root; -const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger +const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; -const DropdownMenuGroup = DropdownMenuPrimitive.Group +const DropdownMenuGroup = DropdownMenuPrimitive.Group; -const DropdownMenuPortal = DropdownMenuPrimitive.Portal +const DropdownMenuPortal = DropdownMenuPrimitive.Portal; -const DropdownMenuSub = DropdownMenuPrimitive.Sub +const DropdownMenuSub = DropdownMenuPrimitive.Sub; -const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup +const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup; const DropdownMenuSubTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, children, ...props }, ref) => ( {children} -)) +)); DropdownMenuSubTrigger.displayName = - DropdownMenuPrimitive.SubTrigger.displayName + DropdownMenuPrimitive.SubTrigger.displayName; const DropdownMenuSubContent = React.forwardRef< React.ElementRef, @@ -47,14 +47,14 @@ const DropdownMenuSubContent = React.forwardRef< -)) +)); DropdownMenuSubContent.displayName = - DropdownMenuPrimitive.SubContent.displayName + DropdownMenuPrimitive.SubContent.displayName; const DropdownMenuContent = React.forwardRef< React.ElementRef, @@ -65,32 +65,32 @@ const DropdownMenuContent = React.forwardRef< ref={ref} sideOffset={sideOffset} className={cn( - "z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 text-slate-700 shadow-md animate-in data-[side=right]:slide-in-from-left-2 data-[side=left]:slide-in-from-right-2 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400", - className + 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 text-slate-700 shadow-md animate-in data-[side=right]:slide-in-from-left-2 data-[side=left]:slide-in-from-right-2 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400', + className, )} {...props} /> -)) -DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName +)); +DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; const DropdownMenuItem = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName +)); +DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; const DropdownMenuCheckboxItem = React.forwardRef< React.ElementRef, @@ -99,8 +99,8 @@ const DropdownMenuCheckboxItem = React.forwardRef< {children} -)) +)); DropdownMenuCheckboxItem.displayName = - DropdownMenuPrimitive.CheckboxItem.displayName + DropdownMenuPrimitive.CheckboxItem.displayName; const DropdownMenuRadioItem = React.forwardRef< React.ElementRef, @@ -123,8 +123,8 @@ const DropdownMenuRadioItem = React.forwardRef< @@ -135,26 +135,26 @@ const DropdownMenuRadioItem = React.forwardRef< {children} -)) -DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName +)); +DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; const DropdownMenuLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName +)); +DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; const DropdownMenuSeparator = React.forwardRef< React.ElementRef, @@ -162,11 +162,11 @@ const DropdownMenuSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName +)); +DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; const DropdownMenuShortcut = ({ className, @@ -175,14 +175,14 @@ const DropdownMenuShortcut = ({ return ( - ) -} -DropdownMenuShortcut.displayName = "DropdownMenuShortcut" + ); +}; +DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'; export { DropdownMenu, @@ -200,4 +200,4 @@ export { DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, -} +}; diff --git a/examples/react-query/components/ui/hover-card.tsx b/examples/react-query/components/ui/hover-card.tsx index 5086a533..eb43054a 100644 --- a/examples/react-query/components/ui/hover-card.tsx +++ b/examples/react-query/components/ui/hover-card.tsx @@ -1,29 +1,29 @@ -"use client" +'use client'; -import * as React from "react" -import * as HoverCardPrimitive from "@radix-ui/react-hover-card" +import * as HoverCardPrimitive from '@radix-ui/react-hover-card'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const HoverCard = HoverCardPrimitive.Root +const HoverCard = HoverCardPrimitive.Root; -const HoverCardTrigger = HoverCardPrimitive.Trigger +const HoverCardTrigger = HoverCardPrimitive.Trigger; const HoverCardContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( +>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => ( -)) -HoverCardContent.displayName = HoverCardPrimitive.Content.displayName +)); +HoverCardContent.displayName = HoverCardPrimitive.Content.displayName; -export { HoverCard, HoverCardTrigger, HoverCardContent } +export { HoverCard, HoverCardTrigger, HoverCardContent }; diff --git a/examples/react-query/components/ui/input.tsx b/examples/react-query/components/ui/input.tsx index c574137e..5f62be95 100644 --- a/examples/react-query/components/ui/input.tsx +++ b/examples/react-query/components/ui/input.tsx @@ -1,6 +1,6 @@ -import * as React from "react" +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export interface InputProps extends React.InputHTMLAttributes {} @@ -10,15 +10,15 @@ const Input = React.forwardRef( return ( - ) - } -) -Input.displayName = "Input" + ); + }, +); +Input.displayName = 'Input'; -export { Input } +export { Input }; diff --git a/examples/react-query/components/ui/label.tsx b/examples/react-query/components/ui/label.tsx index 5ee146d9..95a8cc79 100644 --- a/examples/react-query/components/ui/label.tsx +++ b/examples/react-query/components/ui/label.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as LabelPrimitive from "@radix-ui/react-label" +import * as LabelPrimitive from '@radix-ui/react-label'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const Label = React.forwardRef< React.ElementRef, @@ -12,12 +12,12 @@ const Label = React.forwardRef< -)) -Label.displayName = LabelPrimitive.Root.displayName +)); +Label.displayName = LabelPrimitive.Root.displayName; -export { Label } +export { Label }; diff --git a/examples/react-query/components/ui/menubar.tsx b/examples/react-query/components/ui/menubar.tsx index 1a828bf6..14a6b491 100644 --- a/examples/react-query/components/ui/menubar.tsx +++ b/examples/react-query/components/ui/menubar.tsx @@ -1,20 +1,20 @@ -"use client" +'use client'; -import * as React from "react" -import * as MenubarPrimitive from "@radix-ui/react-menubar" -import { Check, ChevronRight, Circle } from "lucide-react" +import * as MenubarPrimitive from '@radix-ui/react-menubar'; +import { Check, ChevronRight, Circle } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const MenubarMenu = MenubarPrimitive.Menu +const MenubarMenu = MenubarPrimitive.Menu; -const MenubarGroup = MenubarPrimitive.Group +const MenubarGroup = MenubarPrimitive.Group; -const MenubarPortal = MenubarPrimitive.Portal +const MenubarPortal = MenubarPrimitive.Portal; -const MenubarSub = MenubarPrimitive.Sub +const MenubarSub = MenubarPrimitive.Sub; -const MenubarRadioGroup = MenubarPrimitive.RadioGroup +const MenubarRadioGroup = MenubarPrimitive.RadioGroup; const Menubar = React.forwardRef< React.ElementRef, @@ -23,13 +23,13 @@ const Menubar = React.forwardRef< -)) -Menubar.displayName = MenubarPrimitive.Root.displayName +)); +Menubar.displayName = MenubarPrimitive.Root.displayName; const MenubarTrigger = React.forwardRef< React.ElementRef, @@ -38,34 +38,34 @@ const MenubarTrigger = React.forwardRef< -)) -MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName +)); +MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName; const MenubarSubTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, children, ...props }, ref) => ( {children} -)) -MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName +)); +MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName; const MenubarSubContent = React.forwardRef< React.ElementRef, @@ -74,21 +74,21 @@ const MenubarSubContent = React.forwardRef< -)) -MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName +)); +MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName; const MenubarContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >( ( - { className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, - ref + { className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, + ref, ) => ( - ) -) -MenubarContent.displayName = MenubarPrimitive.Content.displayName + ), +); +MenubarContent.displayName = MenubarPrimitive.Content.displayName; const MenubarItem = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -MenubarItem.displayName = MenubarPrimitive.Item.displayName +)); +MenubarItem.displayName = MenubarPrimitive.Item.displayName; const MenubarCheckboxItem = React.forwardRef< React.ElementRef, @@ -132,8 +132,8 @@ const MenubarCheckboxItem = React.forwardRef< {children} -)) -MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName +)); +MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName; const MenubarRadioItem = React.forwardRef< React.ElementRef, @@ -155,8 +155,8 @@ const MenubarRadioItem = React.forwardRef< @@ -167,26 +167,26 @@ const MenubarRadioItem = React.forwardRef< {children} -)) -MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName +)); +MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName; const MenubarLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -MenubarLabel.displayName = MenubarPrimitive.Label.displayName +)); +MenubarLabel.displayName = MenubarPrimitive.Label.displayName; const MenubarSeparator = React.forwardRef< React.ElementRef, @@ -194,11 +194,11 @@ const MenubarSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName +)); +MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName; const MenubarShortcut = ({ className, @@ -207,14 +207,14 @@ const MenubarShortcut = ({ return ( - ) -} -MenubarShortcut.displayname = "MenubarShortcut" + ); +}; +MenubarShortcut.displayname = 'MenubarShortcut'; export { Menubar, @@ -233,4 +233,4 @@ export { MenubarGroup, MenubarSub, MenubarShortcut, -} +}; diff --git a/examples/react-query/components/ui/navigation-menu.tsx b/examples/react-query/components/ui/navigation-menu.tsx index d72885be..93c4dfd0 100644 --- a/examples/react-query/components/ui/navigation-menu.tsx +++ b/examples/react-query/components/ui/navigation-menu.tsx @@ -1,9 +1,9 @@ -import * as React from "react" -import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu" -import { cva } from "class-variance-authority" -import { ChevronDown } from "lucide-react" +import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'; +import { cva } from 'class-variance-authority'; +import { ChevronDown } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const NavigationMenu = React.forwardRef< React.ElementRef, @@ -12,16 +12,16 @@ const NavigationMenu = React.forwardRef< {children} -)) -NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName +)); +NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName; const NavigationMenuList = React.forwardRef< React.ElementRef, @@ -30,19 +30,19 @@ const NavigationMenuList = React.forwardRef< -)) -NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName +)); +NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName; -const NavigationMenuItem = NavigationMenuPrimitive.Item +const NavigationMenuItem = NavigationMenuPrimitive.Item; const navigationMenuTriggerStyle = cva( - "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:bg-slate-100 disabled:opacity-50 dark:focus:bg-slate-800 disabled:pointer-events-none bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 dark:text-slate-100 dark:hover:text-slate-100 data-[state=open]:bg-slate-50 dark:data-[state=open]:bg-slate-800 data-[active]:bg-slate-50 dark:data-[active]:bg-slate-800 h-10 py-2 px-4 group w-max" -) + 'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:bg-slate-100 disabled:opacity-50 dark:focus:bg-slate-800 disabled:pointer-events-none bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 dark:text-slate-100 dark:hover:text-slate-100 data-[state=open]:bg-slate-50 dark:data-[state=open]:bg-slate-800 data-[active]:bg-slate-50 dark:data-[active]:bg-slate-800 h-10 py-2 px-4 group w-max', +); const NavigationMenuTrigger = React.forwardRef< React.ElementRef, @@ -50,17 +50,17 @@ const NavigationMenuTrigger = React.forwardRef< >(({ className, children, ...props }, ref) => ( - {children}{" "} + {children}{' '} -)) -NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName +)); +NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName; const NavigationMenuContent = React.forwardRef< React.ElementRef, @@ -69,33 +69,33 @@ const NavigationMenuContent = React.forwardRef< -)) -NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName +)); +NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName; -const NavigationMenuLink = NavigationMenuPrimitive.Link +const NavigationMenuLink = NavigationMenuPrimitive.Link; const NavigationMenuViewport = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( -
+
-)) +)); NavigationMenuViewport.displayName = - NavigationMenuPrimitive.Viewport.displayName + NavigationMenuPrimitive.Viewport.displayName; const NavigationMenuIndicator = React.forwardRef< React.ElementRef, @@ -104,16 +104,16 @@ const NavigationMenuIndicator = React.forwardRef<
-)) +)); NavigationMenuIndicator.displayName = - NavigationMenuPrimitive.Indicator.displayName + NavigationMenuPrimitive.Indicator.displayName; export { navigationMenuTriggerStyle, @@ -125,4 +125,4 @@ export { NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, -} +}; diff --git a/examples/react-query/components/ui/popover.tsx b/examples/react-query/components/ui/popover.tsx index e1f1328b..11ffbe9f 100644 --- a/examples/react-query/components/ui/popover.tsx +++ b/examples/react-query/components/ui/popover.tsx @@ -1,31 +1,31 @@ -"use client" +'use client'; -import * as React from "react" -import * as PopoverPrimitive from "@radix-ui/react-popover" +import * as PopoverPrimitive from '@radix-ui/react-popover'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const Popover = PopoverPrimitive.Root +const Popover = PopoverPrimitive.Root; -const PopoverTrigger = PopoverPrimitive.Trigger +const PopoverTrigger = PopoverPrimitive.Trigger; const PopoverContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( +>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => ( -)) -PopoverContent.displayName = PopoverPrimitive.Content.displayName +)); +PopoverContent.displayName = PopoverPrimitive.Content.displayName; -export { Popover, PopoverTrigger, PopoverContent } +export { Popover, PopoverTrigger, PopoverContent }; diff --git a/examples/react-query/components/ui/progress.tsx b/examples/react-query/components/ui/progress.tsx index 9edfb4b7..db5ea226 100644 --- a/examples/react-query/components/ui/progress.tsx +++ b/examples/react-query/components/ui/progress.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as ProgressPrimitive from "@radix-ui/react-progress" +import * as ProgressPrimitive from '@radix-ui/react-progress'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const Progress = React.forwardRef< React.ElementRef, @@ -12,8 +12,8 @@ const Progress = React.forwardRef< @@ -22,7 +22,7 @@ const Progress = React.forwardRef< style={{ transform: `translateX(-${100 - (value || 0)}%)` }} /> -)) -Progress.displayName = ProgressPrimitive.Root.displayName +)); +Progress.displayName = ProgressPrimitive.Root.displayName; -export { Progress } +export { Progress }; diff --git a/examples/react-query/components/ui/radio-group.tsx b/examples/react-query/components/ui/radio-group.tsx index 6c15b1fc..7ae8d9f1 100644 --- a/examples/react-query/components/ui/radio-group.tsx +++ b/examples/react-query/components/ui/radio-group.tsx @@ -1,10 +1,10 @@ -"use client" +'use client'; -import * as React from "react" -import * as RadioGroupPrimitive from "@radix-ui/react-radio-group" -import { Circle } from "lucide-react" +import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'; +import { Circle } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const RadioGroup = React.forwardRef< React.ElementRef, @@ -12,13 +12,13 @@ const RadioGroup = React.forwardRef< >(({ className, ...props }, ref) => { return ( - ) -}) -RadioGroup.displayName = RadioGroupPrimitive.Root.displayName + ); +}); +RadioGroup.displayName = RadioGroupPrimitive.Root.displayName; const RadioGroupItem = React.forwardRef< React.ElementRef, @@ -28,8 +28,8 @@ const RadioGroupItem = React.forwardRef< @@ -37,8 +37,8 @@ const RadioGroupItem = React.forwardRef< - ) -}) -RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName + ); +}); +RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName; -export { RadioGroup, RadioGroupItem } +export { RadioGroup, RadioGroupItem }; diff --git a/examples/react-query/components/ui/scroll-area.tsx b/examples/react-query/components/ui/scroll-area.tsx index 9e926115..6f5ff7ca 100644 --- a/examples/react-query/components/ui/scroll-area.tsx +++ b/examples/react-query/components/ui/scroll-area.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area" +import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const ScrollArea = React.forwardRef< React.ElementRef, @@ -11,7 +11,7 @@ const ScrollArea = React.forwardRef< >(({ className, children, ...props }, ref) => ( @@ -20,29 +20,29 @@ const ScrollArea = React.forwardRef< -)) -ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName +)); +ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName; const ScrollBar = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, orientation = "vertical", ...props }, ref) => ( +>(({ className, orientation = 'vertical', ...props }, ref) => ( -)) -ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName +)); +ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName; -export { ScrollArea, ScrollBar } +export { ScrollArea, ScrollBar }; diff --git a/examples/react-query/components/ui/select.tsx b/examples/react-query/components/ui/select.tsx index d41fea3a..36ebe78b 100644 --- a/examples/react-query/components/ui/select.tsx +++ b/examples/react-query/components/ui/select.tsx @@ -1,16 +1,16 @@ -"use client" +'use client'; -import * as React from "react" -import * as SelectPrimitive from "@radix-ui/react-select" -import { Check, ChevronDown } from "lucide-react" +import * as SelectPrimitive from '@radix-ui/react-select'; +import { Check, ChevronDown } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const Select = SelectPrimitive.Root +const Select = SelectPrimitive.Root; -const SelectGroup = SelectPrimitive.Group +const SelectGroup = SelectPrimitive.Group; -const SelectValue = SelectPrimitive.Value +const SelectValue = SelectPrimitive.Value; const SelectTrigger = React.forwardRef< React.ElementRef, @@ -19,16 +19,16 @@ const SelectTrigger = React.forwardRef< {children} -)) -SelectTrigger.displayName = SelectPrimitive.Trigger.displayName +)); +SelectTrigger.displayName = SelectPrimitive.Trigger.displayName; const SelectContent = React.forwardRef< React.ElementRef, @@ -38,8 +38,8 @@ const SelectContent = React.forwardRef< @@ -48,8 +48,8 @@ const SelectContent = React.forwardRef< -)) -SelectContent.displayName = SelectPrimitive.Content.displayName +)); +SelectContent.displayName = SelectPrimitive.Content.displayName; const SelectLabel = React.forwardRef< React.ElementRef, @@ -58,13 +58,13 @@ const SelectLabel = React.forwardRef< -)) -SelectLabel.displayName = SelectPrimitive.Label.displayName +)); +SelectLabel.displayName = SelectPrimitive.Label.displayName; const SelectItem = React.forwardRef< React.ElementRef, @@ -73,8 +73,8 @@ const SelectItem = React.forwardRef< @@ -86,8 +86,8 @@ const SelectItem = React.forwardRef< {children} -)) -SelectItem.displayName = SelectPrimitive.Item.displayName +)); +SelectItem.displayName = SelectPrimitive.Item.displayName; const SelectSeparator = React.forwardRef< React.ElementRef, @@ -95,11 +95,11 @@ const SelectSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -SelectSeparator.displayName = SelectPrimitive.Separator.displayName +)); +SelectSeparator.displayName = SelectPrimitive.Separator.displayName; export { Select, @@ -110,4 +110,4 @@ export { SelectLabel, SelectItem, SelectSeparator, -} +}; diff --git a/examples/react-query/components/ui/separator.tsx b/examples/react-query/components/ui/separator.tsx index 0ae7e3d4..bf2824ee 100644 --- a/examples/react-query/components/ui/separator.tsx +++ b/examples/react-query/components/ui/separator.tsx @@ -1,31 +1,31 @@ -"use client" +'use client'; -import * as React from "react" -import * as SeparatorPrimitive from "@radix-ui/react-separator" +import * as SeparatorPrimitive from '@radix-ui/react-separator'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const Separator = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >( ( - { className, orientation = "horizontal", decorative = true, ...props }, - ref + { className, orientation = 'horizontal', decorative = true, ...props }, + ref, ) => ( - ) -) -Separator.displayName = SeparatorPrimitive.Root.displayName + ), +); +Separator.displayName = SeparatorPrimitive.Root.displayName; -export { Separator } +export { Separator }; diff --git a/examples/react-query/components/ui/sheet.tsx b/examples/react-query/components/ui/sheet.tsx index 72136e48..0b3dc15d 100644 --- a/examples/react-query/components/ui/sheet.tsx +++ b/examples/react-query/components/ui/sheet.tsx @@ -1,27 +1,27 @@ -"use client" +'use client'; -import * as React from "react" -import * as SheetPrimitive from "@radix-ui/react-dialog" -import { cva, VariantProps } from "class-variance-authority" -import { X } from "lucide-react" +import * as SheetPrimitive from '@radix-ui/react-dialog'; +import { type VariantProps, cva } from 'class-variance-authority'; +import { X } from 'lucide-react'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const Sheet = SheetPrimitive.Root +const Sheet = SheetPrimitive.Root; -const SheetTrigger = SheetPrimitive.Trigger +const SheetTrigger = SheetPrimitive.Trigger; -const portalVariants = cva("fixed inset-0 z-50 flex", { +const portalVariants = cva('fixed inset-0 z-50 flex', { variants: { position: { - top: "items-start", - bottom: "items-end", - left: "justify-start", - right: "justify-end", + top: 'items-start', + bottom: 'items-end', + left: 'justify-start', + right: 'justify-end', }, }, - defaultVariants: { position: "right" }, -}) + defaultVariants: { position: 'right' }, +}); interface SheetPortalProps extends SheetPrimitive.DialogPortalProps, @@ -36,8 +36,8 @@ const SheetPortal = ({
{children}
-) -SheetPortal.displayName = SheetPrimitive.Portal.displayName +); +SheetPortal.displayName = SheetPrimitive.Portal.displayName; const SheetOverlay = React.forwardRef< React.ElementRef, @@ -45,102 +45,102 @@ const SheetOverlay = React.forwardRef< >(({ className, children, ...props }, ref) => ( -)) -SheetOverlay.displayName = SheetPrimitive.Overlay.displayName +)); +SheetOverlay.displayName = SheetPrimitive.Overlay.displayName; const sheetVariants = cva( - "fixed z-50 scale-100 gap-4 bg-white p-6 opacity-100 dark:bg-slate-900", + 'fixed z-50 scale-100 gap-4 bg-white p-6 opacity-100 dark:bg-slate-900', { variants: { position: { - top: "animate-in slide-in-from-top w-full duration-300", - bottom: "animate-in slide-in-from-bottom w-full duration-300", - left: "animate-in slide-in-from-left h-full duration-300", - right: "animate-in slide-in-from-right h-full duration-300", + top: 'animate-in slide-in-from-top w-full duration-300', + bottom: 'animate-in slide-in-from-bottom w-full duration-300', + left: 'animate-in slide-in-from-left h-full duration-300', + right: 'animate-in slide-in-from-right h-full duration-300', }, size: { - content: "", - default: "", - sm: "", - lg: "", - xl: "", - full: "", + content: '', + default: '', + sm: '', + lg: '', + xl: '', + full: '', }, }, compoundVariants: [ { - position: ["top", "bottom"], - size: "content", - class: "max-h-screen", + position: ['top', 'bottom'], + size: 'content', + class: 'max-h-screen', }, { - position: ["top", "bottom"], - size: "default", - class: "h-1/3", + position: ['top', 'bottom'], + size: 'default', + class: 'h-1/3', }, { - position: ["top", "bottom"], - size: "sm", - class: "h-1/4", + position: ['top', 'bottom'], + size: 'sm', + class: 'h-1/4', }, { - position: ["top", "bottom"], - size: "lg", - class: "h-1/2", + position: ['top', 'bottom'], + size: 'lg', + class: 'h-1/2', }, { - position: ["top", "bottom"], - size: "xl", - class: "h-5/6", + position: ['top', 'bottom'], + size: 'xl', + class: 'h-5/6', }, { - position: ["top", "bottom"], - size: "full", - class: "h-screen", + position: ['top', 'bottom'], + size: 'full', + class: 'h-screen', }, { - position: ["right", "left"], - size: "content", - class: "max-w-screen", + position: ['right', 'left'], + size: 'content', + class: 'max-w-screen', }, { - position: ["right", "left"], - size: "default", - class: "w-1/3", + position: ['right', 'left'], + size: 'default', + class: 'w-1/3', }, { - position: ["right", "left"], - size: "sm", - class: "w-1/4", + position: ['right', 'left'], + size: 'sm', + class: 'w-1/4', }, { - position: ["right", "left"], - size: "lg", - class: "w-1/2", + position: ['right', 'left'], + size: 'lg', + class: 'w-1/2', }, { - position: ["right", "left"], - size: "xl", - class: "w-5/6", + position: ['right', 'left'], + size: 'xl', + class: 'w-5/6', }, { - position: ["right", "left"], - size: "full", - class: "w-screen", + position: ['right', 'left'], + size: 'full', + class: 'w-screen', }, ], defaultVariants: { - position: "right", - size: "default", + position: 'right', + size: 'default', }, - } -) + }, +); export interface DialogContentProps extends React.ComponentPropsWithoutRef, @@ -164,8 +164,8 @@ const SheetContent = React.forwardRef< -)) -SheetContent.displayName = SheetPrimitive.Content.displayName +)); +SheetContent.displayName = SheetPrimitive.Content.displayName; const SheetHeader = ({ className, @@ -173,13 +173,13 @@ const SheetHeader = ({ }: React.HTMLAttributes) => (
-) -SheetHeader.displayName = "SheetHeader" +); +SheetHeader.displayName = 'SheetHeader'; const SheetFooter = ({ className, @@ -187,13 +187,13 @@ const SheetFooter = ({ }: React.HTMLAttributes) => (
-) -SheetFooter.displayName = "SheetFooter" +); +SheetFooter.displayName = 'SheetFooter'; const SheetTitle = React.forwardRef< React.ElementRef, @@ -202,14 +202,14 @@ const SheetTitle = React.forwardRef< -)) -SheetTitle.displayName = SheetPrimitive.Title.displayName +)); +SheetTitle.displayName = SheetPrimitive.Title.displayName; const SheetDescription = React.forwardRef< React.ElementRef, @@ -217,11 +217,11 @@ const SheetDescription = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -SheetDescription.displayName = SheetPrimitive.Description.displayName +)); +SheetDescription.displayName = SheetPrimitive.Description.displayName; export { Sheet, @@ -231,4 +231,4 @@ export { SheetFooter, SheetTitle, SheetDescription, -} +}; diff --git a/examples/react-query/components/ui/slider.tsx b/examples/react-query/components/ui/slider.tsx index d80363bf..8296843e 100644 --- a/examples/react-query/components/ui/slider.tsx +++ b/examples/react-query/components/ui/slider.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as SliderPrimitive from "@radix-ui/react-slider" +import * as SliderPrimitive from '@radix-ui/react-slider'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const Slider = React.forwardRef< React.ElementRef, @@ -12,8 +12,8 @@ const Slider = React.forwardRef< @@ -22,7 +22,7 @@ const Slider = React.forwardRef< -)) -Slider.displayName = SliderPrimitive.Root.displayName +)); +Slider.displayName = SliderPrimitive.Root.displayName; -export { Slider } +export { Slider }; diff --git a/examples/react-query/components/ui/switch.tsx b/examples/react-query/components/ui/switch.tsx index 3191c441..7ece354b 100644 --- a/examples/react-query/components/ui/switch.tsx +++ b/examples/react-query/components/ui/switch.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as SwitchPrimitives from "@radix-ui/react-switch" +import * as SwitchPrimitives from '@radix-ui/react-switch'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const Switch = React.forwardRef< React.ElementRef, @@ -11,19 +11,19 @@ const Switch = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -Switch.displayName = SwitchPrimitives.Root.displayName +)); +Switch.displayName = SwitchPrimitives.Root.displayName; -export { Switch } +export { Switch }; diff --git a/examples/react-query/components/ui/tabs.tsx b/examples/react-query/components/ui/tabs.tsx index cc8f7e5e..58441a30 100644 --- a/examples/react-query/components/ui/tabs.tsx +++ b/examples/react-query/components/ui/tabs.tsx @@ -1,11 +1,11 @@ -"use client" +'use client'; -import * as React from "react" -import * as TabsPrimitive from "@radix-ui/react-tabs" +import * as TabsPrimitive from '@radix-ui/react-tabs'; +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const Tabs = TabsPrimitive.Root +const Tabs = TabsPrimitive.Root; const TabsList = React.forwardRef< React.ElementRef, @@ -14,13 +14,13 @@ const TabsList = React.forwardRef< -)) -TabsList.displayName = TabsPrimitive.List.displayName +)); +TabsList.displayName = TabsPrimitive.List.displayName; const TabsTrigger = React.forwardRef< React.ElementRef, @@ -28,14 +28,14 @@ const TabsTrigger = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -TabsTrigger.displayName = TabsPrimitive.Trigger.displayName +)); +TabsTrigger.displayName = TabsPrimitive.Trigger.displayName; const TabsContent = React.forwardRef< React.ElementRef, @@ -43,13 +43,13 @@ const TabsContent = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -TabsContent.displayName = TabsPrimitive.Content.displayName +)); +TabsContent.displayName = TabsPrimitive.Content.displayName; -export { Tabs, TabsList, TabsTrigger, TabsContent } +export { Tabs, TabsList, TabsTrigger, TabsContent }; diff --git a/examples/react-query/components/ui/textarea.tsx b/examples/react-query/components/ui/textarea.tsx index da25dcf3..87901d32 100644 --- a/examples/react-query/components/ui/textarea.tsx +++ b/examples/react-query/components/ui/textarea.tsx @@ -1,6 +1,6 @@ -import * as React from "react" +import * as React from 'react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; export interface TextareaProps extends React.TextareaHTMLAttributes {} @@ -10,15 +10,15 @@ const Textarea = React.forwardRef( return (