mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 04:19:20 +00:00
chore: cleanup
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
"complexity": {
|
||||
"noUselessSwitchCase": "warn",
|
||||
"noUselessTypeConstraint": "warn"
|
||||
},
|
||||
"correctness": {
|
||||
"noUnusedImports": "warn"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
|
||||
@@ -2,13 +2,7 @@
|
||||
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -35,9 +29,7 @@ import {
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import {
|
||||
client,
|
||||
organization,
|
||||
useActiveOrganization,
|
||||
useListOrganizations,
|
||||
useSession,
|
||||
} from "@/lib/auth-client";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import type { Metadata } from "next";
|
||||
import localFont from "next/font/local";
|
||||
import "./globals.css";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
|
||||
@@ -2,12 +2,10 @@ import { Metadata } from "next";
|
||||
import { auth } from "@/lib/auth";
|
||||
import { headers } from "next/headers";
|
||||
import { ArrowLeftRight, ArrowUpRight, Mail, Users } from "lucide-react";
|
||||
import { Card, CardContent, CardFooter } from "@/components/ui/card";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Logo } from "@/components/logo";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { ConsentBtns } from "./concet-buttons";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
|
||||
@@ -15,8 +15,7 @@ import {
|
||||
CommandList,
|
||||
CommandSeparator,
|
||||
} from "@/components/ui/command";
|
||||
import { ChevronDown, LogOutIcon, PlusCircle } from "lucide-react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { ChevronDown, PlusCircle } from "lucide-react";
|
||||
import { Session } from "@/lib/auth-types";
|
||||
import { client, useSession } from "@/lib/auth-client";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
@@ -14,12 +14,8 @@ import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { PasswordInput } from "@/components/ui/password-input";
|
||||
import { signIn } from "@/lib/auth-client";
|
||||
import {
|
||||
DiscordLogoIcon,
|
||||
GitHubLogoIcon,
|
||||
TwitterLogoIcon,
|
||||
} from "@radix-ui/react-icons";
|
||||
import { Key, Loader2, TwitchIcon } from "lucide-react";
|
||||
import { DiscordLogoIcon, GitHubLogoIcon } from "@radix-ui/react-icons";
|
||||
import { Key, Loader2 } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
|
||||
@@ -14,7 +14,7 @@ import { Label } from "@/components/ui/label";
|
||||
import { PasswordInput } from "@/components/ui/password-input";
|
||||
import { DiscordLogoIcon, GitHubLogoIcon } from "@radix-ui/react-icons";
|
||||
import { useState } from "react";
|
||||
import { client, signIn, signUp } from "@/lib/auth-client";
|
||||
import { signIn, signUp } from "@/lib/auth-client";
|
||||
import Image from "next/image";
|
||||
import { Loader2, X } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
||||
import { type ThemeProviderProps } from "next-themes/dist/types";
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import { Moon, Sun } from "lucide-react";
|
||||
import { useTheme } from "next-themes";
|
||||
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
import * as React from "react";
|
||||
import * as RechartsPrimitive from "recharts";
|
||||
import {
|
||||
NameType,
|
||||
Payload,
|
||||
ValueType,
|
||||
} from "recharts/types/component/DefaultTooltipContent";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
oAuthProxy,
|
||||
openAPI,
|
||||
oidcProvider,
|
||||
createAuthMiddleware,
|
||||
} from "better-auth/plugins";
|
||||
import { reactInvitationEmail } from "./email/invitation";
|
||||
import { LibsqlDialect } from "@libsql/kysely-libsql";
|
||||
@@ -110,7 +109,7 @@ export const auth = betterAuth({
|
||||
plugins: [
|
||||
organization({
|
||||
async sendInvitationEmail(data) {
|
||||
const res = await resend.emails.send({
|
||||
await resend.emails.send({
|
||||
from,
|
||||
to: data.email,
|
||||
subject: "You've been invited to join an organization",
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
Text,
|
||||
Tailwind,
|
||||
} from "@react-email/components";
|
||||
import * as React from "react";
|
||||
|
||||
interface BetterAuthInviteUserEmailProps {
|
||||
username?: string;
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
Tailwind,
|
||||
Section,
|
||||
} from "@react-email/components";
|
||||
import * as React from "react";
|
||||
|
||||
interface BetterAuthResetPasswordEmailProps {
|
||||
username?: string;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { createAuthClient } from "better-auth/client";
|
||||
|
||||
await fetch("http://localhost:4000/api/auth/sign-up/email", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
|
||||
@@ -2,7 +2,6 @@ import Link from "next/link";
|
||||
import { useId } from "react";
|
||||
|
||||
import clsx from "clsx";
|
||||
import { Logo } from "@/components/logo";
|
||||
import { DiscordLogoIcon } from "@radix-ui/react-icons";
|
||||
|
||||
function BookIcon(props: React.ComponentPropsWithoutRef<"svg">) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { source, openapi } from "@/app/source";
|
||||
import { source } from "@/app/source";
|
||||
import { DocsPage, DocsBody, DocsTitle } from "fumadocs-ui/page";
|
||||
import { notFound } from "next/navigation";
|
||||
import { absoluteUrl } from "@/lib/utils";
|
||||
|
||||
@@ -7,7 +7,6 @@ import { GeistMono } from "geist/font/mono";
|
||||
import { GeistSans } from "geist/font/sans";
|
||||
import { baseUrl, createMetadata } from "@/lib/metadata";
|
||||
import Loglib from "@loglib/tracker/react";
|
||||
import { BetaNotice } from "@/components/banner";
|
||||
|
||||
export const metadata = createMetadata({
|
||||
title: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { docs, meta, changelog as _changelog } from "@/.source";
|
||||
import { docs, meta } from "@/.source";
|
||||
import { createMDXSource } from "fumadocs-mdx";
|
||||
import { loader } from "fumadocs-core/source";
|
||||
import { createOpenAPI } from "fumadocs-openapi/server";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import React from "react";
|
||||
|
||||
export const ShipText = () => {
|
||||
const voxels = [
|
||||
// V
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { useId } from "react";
|
||||
|
||||
export function Features() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { Highlight, themes } from "prism-react-renderer";
|
||||
import { useState } from "react";
|
||||
import { Highlight } from "prism-react-renderer";
|
||||
import { Check, Copy } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import theme from "./theme";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { X } from "lucide-react";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { TabBar } from "./tab-bar";
|
||||
import { CodeEditor } from "./code-editor";
|
||||
import { useAtom } from "jotai";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { CodeTab } from "./code-tabs";
|
||||
|
||||
interface File {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ChevronLeft, Copy, Mail, Moon, PlusIcon, Sun } from "lucide-react";
|
||||
import { Moon, PlusIcon, Sun } from "lucide-react";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -28,8 +28,6 @@ import { useAtom } from "jotai";
|
||||
import { optionsAtom } from "./store";
|
||||
import { useTheme } from "next-themes";
|
||||
import { ScrollArea } from "../ui/scroll-area";
|
||||
import { Button } from "../ui/button";
|
||||
import Link from "next/link";
|
||||
const frameworks = [
|
||||
{
|
||||
title: "Next.js",
|
||||
|
||||
@@ -12,10 +12,8 @@ import {
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Key, Loader2 } from "lucide-react";
|
||||
import { Key } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { useAtom } from "jotai";
|
||||
import { optionsAtom } from "./store";
|
||||
import { socialProviders } from "./social-provider";
|
||||
|
||||
@@ -14,7 +14,6 @@ import { Label } from "@/components/ui/label";
|
||||
import { useState } from "react";
|
||||
import Image from "next/image";
|
||||
import { Loader2, X } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
export function SignUp() {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"use client";
|
||||
import React from "react";
|
||||
|
||||
import {
|
||||
Globe2Icon,
|
||||
|
||||
@@ -11,7 +11,6 @@ import { Highlight, themes } from "prism-react-renderer";
|
||||
import { AnimatePresence, motion, MotionConfig } from "framer-motion";
|
||||
import { Builder } from "../builder";
|
||||
import { Spotlight } from "./spotlight";
|
||||
import { DropdownMenu, DropdownMenuTrigger } from "../ui/dropdown-menu";
|
||||
import { GradientBG } from "./gradient-bg";
|
||||
|
||||
const tabs: { name: "auth.ts" | "client.ts"; code: string }[] = [
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type SpotlightProps = {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -8,8 +7,7 @@ import {
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { CircleDot, Key, Link } from "lucide-react";
|
||||
import { Label } from "../ui/label";
|
||||
import { Key, Link } from "lucide-react";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import Link from "next/link";
|
||||
import { ThemeToggle } from "@/components/theme-toggler";
|
||||
import { NavbarMobile, NavbarMobileBtn } from "./nav-mobile";
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
"use client";
|
||||
import { Menu, Sun, X } from "lucide-react";
|
||||
import { Menu } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import {
|
||||
Fragment,
|
||||
createContext,
|
||||
useContext,
|
||||
useEffect,
|
||||
useState,
|
||||
} from "react";
|
||||
import { Fragment, createContext, useContext, useState } from "react";
|
||||
import {
|
||||
Accordion,
|
||||
AccordionContent,
|
||||
@@ -16,7 +10,7 @@ import {
|
||||
} from "@/components/ui/accordion";
|
||||
import { AnimatePresence, FadeIn } from "@/components/ui/fade-in";
|
||||
import { contents, examples } from "./sidebar-content";
|
||||
import { MobileThemeToggle, ThemeToggle } from "./theme-toggler";
|
||||
import { MobileThemeToggle } from "./theme-toggler";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
interface NavbarMobileContextProps {
|
||||
|
||||
@@ -17,10 +17,6 @@ import {
|
||||
} from "./ui/select";
|
||||
import { loglib } from "@loglib/tracker";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { GitHubIcon } from "@/app/changelogs/_components/icons";
|
||||
import Link from "next/link";
|
||||
import { Button } from "./ui/button";
|
||||
import { Separator } from "./ui/separator";
|
||||
|
||||
export default function ArticleLayout() {
|
||||
const [currentOpen, setCurrentOpen] = useState<number>(0);
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import {
|
||||
Chrome,
|
||||
CircleHelp,
|
||||
Key,
|
||||
LucideAArrowDown,
|
||||
LucideIcon,
|
||||
Mail,
|
||||
Mailbox,
|
||||
MailboxIcon,
|
||||
Mails,
|
||||
Phone,
|
||||
ScanFace,
|
||||
ShieldCheck,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { Moon, MoonIcon, Sun } from "lucide-react";
|
||||
import { Moon, Sun } from "lucide-react";
|
||||
import { useTheme } from "next-themes";
|
||||
import * as React from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
import * as React from "react";
|
||||
import * as RechartsPrimitive from "recharts";
|
||||
import {
|
||||
NameType,
|
||||
Payload,
|
||||
ValueType,
|
||||
} from "recharts/types/component/DefaultTooltipContent";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"use client";
|
||||
import React, { useId, useMemo } from "react";
|
||||
import { useId } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import Particles, { initParticlesEngine } from "@tsparticles/react";
|
||||
import type { Container, SingleOrMultiple } from "@tsparticles/engine";
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
defineCollections,
|
||||
defineDocs,
|
||||
getDefaultMDXOptions,
|
||||
} from "fumadocs-mdx/config";
|
||||
import { defineCollections, defineDocs } from "fumadocs-mdx/config";
|
||||
import { defineConfig } from "fumadocs-mdx/config";
|
||||
import { remarkInstall } from "fumadocs-docgen";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { TextField, TextFieldLabel, TextFieldRoot } from "./ui/textfield";
|
||||
import { Button } from "./ui/button";
|
||||
import { Checkbox, CheckboxControl, CheckboxLabel } from "./ui/checkbox";
|
||||
import { passkeyActions, signIn } from "@/libs/auth-client";
|
||||
import { signIn } from "@/libs/auth-client";
|
||||
import { createSignal } from "solid-js";
|
||||
|
||||
export function SignInCard() {
|
||||
|
||||
@@ -8,8 +8,7 @@ import {
|
||||
} from "@/components/ui/card";
|
||||
import { TextField, TextFieldLabel, TextFieldRoot } from "./ui/textfield";
|
||||
import { Button } from "./ui/button";
|
||||
import { Checkbox, CheckboxControl, CheckboxLabel } from "./ui/checkbox";
|
||||
import { signIn, signUp } from "@/libs/auth-client";
|
||||
import { signUp } from "@/libs/auth-client";
|
||||
import { createSignal } from "solid-js";
|
||||
import { convertImageToBase64 } from "@/libs/utils";
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "./ui/card";
|
||||
@@ -12,7 +11,6 @@ import {
|
||||
OTPField,
|
||||
OTPFieldGroup,
|
||||
OTPFieldInput,
|
||||
OTPFieldSeparator,
|
||||
OTPFieldSlot,
|
||||
} from "./ui/otp-field";
|
||||
import { twoFactorActions } from "@/libs/auth-client";
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
import { UserCard } from "@/components/user-card";
|
||||
import RootLayout from "@/layouts/root-layout.astro";
|
||||
import { auth } from "@/auth";
|
||||
|
||||
const activeSessions = await auth.api
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
import RootLayout from "@/layouts/root-layout.astro";
|
||||
---
|
||||
|
||||
<RootLayout>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
import RootLayout from "@/layouts/root-layout.astro";
|
||||
import { SignInCard } from "../components/sign-in";
|
||||
---
|
||||
|
||||
<RootLayout>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
import RootLayout from "@/layouts/root-layout.astro";
|
||||
import { SignUpCard } from "../components/sign-up";
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
import RootLayout from "@/layouts/root-layout.astro";
|
||||
import { TwoFactorComponent } from "@/components/two-factor";
|
||||
---
|
||||
|
||||
<RootLayout>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
---
|
||||
import RootLayout from "@/layouts/root-layout.astro";
|
||||
import { TwoFactorEmail } from "@/components/two-factor";
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { authClient } from "@/auth/auth-client";
|
||||
|
||||
import { Button } from "./ui/button";
|
||||
|
||||
export const Home = ({
|
||||
setPage,
|
||||
}: {
|
||||
|
||||
@@ -6,15 +6,13 @@ import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Key, Loader2 } from "lucide-react";
|
||||
import { Loader2 } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { toast } from "sonner";
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Slot, Stack } from "expo-router";
|
||||
import { Slot } from "expo-router";
|
||||
import "../global.css";
|
||||
import { SafeAreaProvider } from "react-native-safe-area-context";
|
||||
import { ImageBackground, View } from "react-native";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
AccordionRoot,
|
||||
type AccordionRootEmits,
|
||||
type AccordionRootProps,
|
||||
useForwardPropsEmits,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import { AccordionContent, type AccordionContentProps } from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type AccordionContentProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
AccordionContentProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import {
|
||||
AccordionItem,
|
||||
type AccordionItemProps,
|
||||
useForwardProps,
|
||||
} from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type AccordionItemProps, useForwardProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
AccordionItemProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import {
|
||||
AccordionHeader,
|
||||
AccordionTrigger,
|
||||
type AccordionTriggerProps,
|
||||
} from "radix-vue";
|
||||
import { ChevronDownIcon } from "@radix-icons/vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type AccordionTriggerProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
AccordionTriggerProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import {
|
||||
type AlertDialogEmits,
|
||||
type AlertDialogProps,
|
||||
AlertDialogRoot,
|
||||
useForwardPropsEmits,
|
||||
} from "radix-vue";
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import { AlertDialogAction, type AlertDialogActionProps } from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { buttonVariants } from "@/components/ui/button";
|
||||
import { type AlertDialogActionProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
AlertDialogActionProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import { AlertDialogCancel, type AlertDialogCancelProps } from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { buttonVariants } from "@/components/ui/button";
|
||||
import { type AlertDialogCancelProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
AlertDialogCancelProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import {
|
||||
AlertDialogContent,
|
||||
type AlertDialogContentEmits,
|
||||
type AlertDialogContentProps,
|
||||
AlertDialogOverlay,
|
||||
AlertDialogPortal,
|
||||
useForwardPropsEmits,
|
||||
} from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<
|
||||
AlertDialogContentProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import {
|
||||
AlertDialogDescription,
|
||||
type AlertDialogDescriptionProps,
|
||||
} from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type AlertDialogDescriptionProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
AlertDialogDescriptionProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import { AlertDialogTitle, type AlertDialogTitleProps } from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type AlertDialogTitleProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
AlertDialogTitleProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { AlertDialogTrigger, type AlertDialogTriggerProps } from "radix-vue";
|
||||
import { type AlertDialogTriggerProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<AlertDialogTriggerProps>();
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { type AlertVariants, alertVariants } from ".";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type AlertVariants } from ".";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { AspectRatio, type AspectRatioProps } from "radix-vue";
|
||||
import { type AspectRatioProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<AspectRatioProps>();
|
||||
</script>
|
||||
|
||||
@@ -4,14 +4,12 @@ import type { ZodAny, z } from "zod";
|
||||
import { toTypedSchema } from "@vee-validate/zod";
|
||||
import type { FormContext, GenericObject } from "vee-validate";
|
||||
import {
|
||||
type ZodObjectOrWrapped,
|
||||
getBaseSchema,
|
||||
getBaseType,
|
||||
getDefaultValueInZodStack,
|
||||
getObjectFormSchema,
|
||||
} from "./utils";
|
||||
import type { Config, ConfigItem, Dependency, Shape } from "./interface";
|
||||
import AutoFormField from "./AutoFormField.vue";
|
||||
import { provideDependencies } from "./dependencies";
|
||||
import { Form } from "@/components/ui/form";
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<script setup lang="ts" generic="U extends ZodAny">
|
||||
import type { ZodAny } from "zod";
|
||||
import { computed } from "vue";
|
||||
import type { Config, ConfigItem, Shape } from "./interface";
|
||||
import { DEFAULT_ZOD_HANDLERS, INPUT_COMPONENTS } from "./constant";
|
||||
import useDependencies from "./dependencies";
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -1,21 +1,9 @@
|
||||
<script setup lang="ts" generic="T extends z.ZodAny">
|
||||
import * as z from "zod";
|
||||
import { computed, provide } from "vue";
|
||||
import { PlusIcon, TrashIcon } from "lucide-vue-next";
|
||||
import { FieldArray, FieldContextKey, useField } from "vee-validate";
|
||||
import type { Config, ConfigItem } from "./interface";
|
||||
import { beautifyObjectName, getBaseType } from "./utils";
|
||||
import AutoFormField from "./AutoFormField.vue";
|
||||
import AutoFormLabel from "./AutoFormLabel.vue";
|
||||
import {
|
||||
Accordion,
|
||||
AccordionContent,
|
||||
AccordionItem,
|
||||
AccordionTrigger,
|
||||
} from "@/components/ui/accordion";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import { FormItem, FormMessage } from "@/components/ui/form";
|
||||
import { FieldContextKey, useField } from "vee-validate";
|
||||
import type { Config } from "./interface";
|
||||
import { getBaseType } from "./utils";
|
||||
|
||||
const props = defineProps<{
|
||||
fieldName: string;
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { beautifyObjectName } from "./utils";
|
||||
import type { FieldProps } from "./interface";
|
||||
import AutoFormLabel from "./AutoFormLabel.vue";
|
||||
import {
|
||||
FormControl,
|
||||
FormDescription,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
|
||||
|
||||
@@ -1,25 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { DateFormatter, getLocalTimeZone } from "@internationalized/date";
|
||||
import { CalendarIcon } from "@radix-icons/vue";
|
||||
import { beautifyObjectName } from "./utils";
|
||||
import AutoFormLabel from "./AutoFormLabel.vue";
|
||||
import { DateFormatter } from "@internationalized/date";
|
||||
import type { FieldProps } from "./interface";
|
||||
import {
|
||||
FormControl,
|
||||
FormDescription,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
|
||||
import { Calendar } from "@/components/ui/calendar";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Popover,
|
||||
PopoverContent,
|
||||
PopoverTrigger,
|
||||
} from "@/components/ui/popover";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
defineProps<FieldProps>();
|
||||
|
||||
|
||||
@@ -1,23 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import AutoFormLabel from "./AutoFormLabel.vue";
|
||||
import { beautifyObjectName } from "./utils";
|
||||
import type { FieldProps } from "./interface";
|
||||
import {
|
||||
FormControl,
|
||||
FormDescription,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
|
||||
|
||||
defineProps<
|
||||
FieldProps & {
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { TrashIcon } from "@radix-icons/vue";
|
||||
import { beautifyObjectName } from "./utils";
|
||||
import type { FieldProps } from "./interface";
|
||||
import AutoFormLabel from "./AutoFormLabel.vue";
|
||||
import {
|
||||
FormControl,
|
||||
FormDescription,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
defineProps<FieldProps>();
|
||||
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import AutoFormLabel from "./AutoFormLabel.vue";
|
||||
import { beautifyObjectName } from "./utils";
|
||||
import type { FieldProps } from "./interface";
|
||||
import {
|
||||
FormControl,
|
||||
FormDescription,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import AutoFormLabel from "./AutoFormLabel.vue";
|
||||
import { beautifyObjectName } from "./utils";
|
||||
import type { FieldProps } from "./interface";
|
||||
import {
|
||||
FormControl,
|
||||
FormDescription,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import { Input } from "@/components/ui/input";
|
||||
|
||||
defineOptions({
|
||||
inheritAttrs: false,
|
||||
|
||||
@@ -1,23 +1,9 @@
|
||||
<script setup lang="ts" generic="T extends ZodRawShape">
|
||||
import type { ZodAny, ZodObject, ZodRawShape } from "zod";
|
||||
import type { ZodAny, ZodObject } from "zod";
|
||||
import { computed, provide } from "vue";
|
||||
import { FieldContextKey, useField } from "vee-validate";
|
||||
import AutoFormField from "./AutoFormField.vue";
|
||||
import type { Config, ConfigItem, Shape } from "./interface";
|
||||
import {
|
||||
beautifyObjectName,
|
||||
getBaseSchema,
|
||||
getBaseType,
|
||||
getDefaultValueInZodStack,
|
||||
} from "./utils";
|
||||
import AutoFormLabel from "./AutoFormLabel.vue";
|
||||
import {
|
||||
Accordion,
|
||||
AccordionContent,
|
||||
AccordionItem,
|
||||
AccordionTrigger,
|
||||
} from "@/components/ui/accordion";
|
||||
import { FormItem } from "@/components/ui/form";
|
||||
import type { Config, Shape } from "./interface";
|
||||
import { getBaseSchema, getBaseType, getDefaultValueInZodStack } from "./utils";
|
||||
|
||||
const props = defineProps<{
|
||||
fieldName: string;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import { FormLabel } from "@/components/ui/form";
|
||||
|
||||
defineProps<{
|
||||
required?: boolean;
|
||||
}>();
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { AvatarRoot } from "radix-vue";
|
||||
import { type AvatarVariants, avatarVariant } from ".";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type AvatarVariants } from ".";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { AvatarFallback, type AvatarFallbackProps } from "radix-vue";
|
||||
import { type AvatarFallbackProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<AvatarFallbackProps>();
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { AvatarImage, type AvatarImageProps } from "radix-vue";
|
||||
import { type AvatarImageProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<AvatarImageProps>();
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { type BadgeVariants, badgeVariants } from ".";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type BadgeVariants } from ".";
|
||||
|
||||
const props = defineProps<{
|
||||
variant?: BadgeVariants["variant"];
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { DotsHorizontalIcon } from "@radix-icons/vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { Primitive, type PrimitiveProps } from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type PrimitiveProps } from "radix-vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<PrimitiveProps & { class?: HTMLAttributes["class"] }>(),
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { ChevronRightIcon } from "@radix-icons/vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<{
|
||||
class?: HTMLAttributes["class"];
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { Primitive, type PrimitiveProps } from "radix-vue";
|
||||
import { type ButtonVariants, buttonVariants } from ".";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type PrimitiveProps } from "radix-vue";
|
||||
import { type ButtonVariants } from ".";
|
||||
|
||||
interface Props extends PrimitiveProps {
|
||||
variant?: ButtonVariants["variant"];
|
||||
|
||||
@@ -1,25 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import {
|
||||
CalendarRoot,
|
||||
type CalendarRootEmits,
|
||||
type CalendarRootProps,
|
||||
useForwardPropsEmits,
|
||||
} from "radix-vue";
|
||||
import {
|
||||
CalendarCell,
|
||||
CalendarCellTrigger,
|
||||
CalendarGrid,
|
||||
CalendarGridBody,
|
||||
CalendarGridHead,
|
||||
CalendarGridRow,
|
||||
CalendarHeadCell,
|
||||
CalendarHeader,
|
||||
CalendarHeading,
|
||||
CalendarNextButton,
|
||||
CalendarPrevButton,
|
||||
} from ".";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps<
|
||||
CalendarRootProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import {
|
||||
CalendarCell,
|
||||
type CalendarCellProps,
|
||||
useForwardProps,
|
||||
} from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type CalendarCellProps, useForwardProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
CalendarCellProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import {
|
||||
CalendarCellTrigger,
|
||||
type CalendarCellTriggerProps,
|
||||
useForwardProps,
|
||||
} from "radix-vue";
|
||||
import { buttonVariants } from "@/components/ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type CalendarCellTriggerProps, useForwardProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
CalendarCellTriggerProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import {
|
||||
CalendarGrid,
|
||||
type CalendarGridProps,
|
||||
useForwardProps,
|
||||
} from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type CalendarGridProps, useForwardProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
CalendarGridProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { CalendarGridBody, type CalendarGridBodyProps } from "radix-vue";
|
||||
import { type CalendarGridBodyProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<CalendarGridBodyProps>();
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { CalendarGridHead, type CalendarGridHeadProps } from "radix-vue";
|
||||
import { type CalendarGridHeadProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
CalendarGridHeadProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { type HTMLAttributes, computed } from "vue";
|
||||
import {
|
||||
CalendarGridRow,
|
||||
type CalendarGridRowProps,
|
||||
useForwardProps,
|
||||
} from "radix-vue";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type CalendarGridRowProps, useForwardProps } from "radix-vue";
|
||||
|
||||
const props = defineProps<
|
||||
CalendarGridRowProps & { class?: HTMLAttributes["class"] }
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user