diff --git a/apps/login/src/ui/SetPasswordForm.tsx b/apps/login/src/components/set-password-form.tsx
similarity index 94%
rename from apps/login/src/ui/SetPasswordForm.tsx
rename to apps/login/src/components/set-password-form.tsx
index 84dce18a312..e2717192310 100644
--- a/apps/login/src/ui/SetPasswordForm.tsx
+++ b/apps/login/src/components/set-password-form.tsx
@@ -1,22 +1,22 @@
"use client";
-import { registerUser, RegisterUserResponse } from "@/lib/server/register";
import {
lowerCaseValidator,
numberValidator,
symbolValidator,
upperCaseValidator,
-} from "@/utils/validators";
+} from "@/helpers/validators";
+import { registerUser, RegisterUserResponse } from "@/lib/server/register";
import { PasswordComplexitySettings } from "@zitadel/proto/zitadel/settings/v2/password_settings_pb";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { FieldValues, useForm } from "react-hook-form";
-import Alert from "./Alert";
-import BackButton from "./BackButton";
-import { Button, ButtonVariants } from "./Button";
-import { TextInput } from "./Input";
-import PasswordComplexity from "./PasswordComplexity";
-import { Spinner } from "./Spinner";
+import { Alert } from "./alert";
+import { BackButton } from "./back-button";
+import { Button, ButtonVariants } from "./button";
+import { TextInput } from "./input";
+import { PasswordComplexity } from "./password-complexity";
+import { Spinner } from "./spinner";
type Inputs =
| {
@@ -34,7 +34,7 @@ type Props = {
authRequestId?: string;
};
-export default function SetPasswordForm({
+export function SetPasswordForm({
passwordComplexitySettings,
email,
firstname,
diff --git a/apps/login/src/ui/SignInWithIDP.tsx b/apps/login/src/components/sign-in-with-idp.tsx
similarity index 90%
rename from apps/login/src/ui/SignInWithIDP.tsx
rename to apps/login/src/components/sign-in-with-idp.tsx
index c279ee36046..df5b13afe4f 100644
--- a/apps/login/src/ui/SignInWithIDP.tsx
+++ b/apps/login/src/components/sign-in-with-idp.tsx
@@ -8,13 +8,13 @@ import {
} from "@zitadel/proto/zitadel/settings/v2/login_settings_pb";
import { useRouter } from "next/navigation";
import { ReactNode, useState } from "react";
-import Alert from "./Alert";
-import { SignInWithApple } from "./idps/SignInWithApple";
-import { SignInWithAzureAD } from "./idps/SignInWithAzureAD";
-import { SignInWithGeneric } from "./idps/SignInWithGeneric";
-import { SignInWithGithub } from "./idps/SignInWithGithub";
-import { SignInWithGitlab } from "./idps/SignInWithGitlab";
-import { SignInWithGoogle } from "./idps/SignInWithGoogle";
+import { Alert } from "./alert";
+import { SignInWithApple } from "./idps/sign-in-with-apple";
+import { SignInWithAzureAd } from "./idps/sign-in-with-azure-ad";
+import { SignInWithGeneric } from "./idps/sign-in-with-generic";
+import { SignInWithGithub } from "./idps/sign-in-with-github";
+import { SignInWithGitlab } from "./idps/sign-in-with-gitlab";
+import { SignInWithGoogle } from "./idps/sign-in-with-google";
export interface SignInWithIDPProps {
children?: ReactNode;
@@ -24,7 +24,7 @@ export interface SignInWithIDPProps {
organization?: string;
}
-export function SignInWithIDP({
+export function SignInWithIdp({
host,
identityProviders,
authRequestId,
@@ -130,13 +130,13 @@ export function SignInWithIDP({
);
case IdentityProviderType.AZURE_AD:
return (
-
navigateToAuthUrl(idp.id, IdentityProviderType.AZURE_AD)
}
- >
+ >
);
case IdentityProviderType.GOOGLE:
return (
@@ -185,4 +185,4 @@ export function SignInWithIDP({
);
}
-SignInWithIDP.displayName = "SignInWithIDP";
+SignInWithIdp.displayName = "SignInWithIDP";
diff --git a/apps/login/src/ui/SkeletonCard.tsx b/apps/login/src/components/skeleton-card.tsx
similarity index 95%
rename from apps/login/src/ui/SkeletonCard.tsx
rename to apps/login/src/components/skeleton-card.tsx
index fe40f40830c..80b3793e8f1 100644
--- a/apps/login/src/ui/SkeletonCard.tsx
+++ b/apps/login/src/components/skeleton-card.tsx
@@ -1,4 +1,4 @@
-import clsx from "clsx";
+import { clsx } from "clsx";
export const SkeletonCard = ({ isLoading }: { isLoading?: boolean }) => (
{
+export const ThemeWrapper = ({ children, branding }: Props) => {
useEffect(() => {
setTheme(document, branding);
}, []);
@@ -18,5 +18,3 @@ const ThemeWrapper = ({ children, branding }: Props) => {
return
{children}
;
};
-
-export default ThemeWrapper;
diff --git a/apps/login/src/ui/Theme.tsx b/apps/login/src/components/theme.tsx
similarity index 96%
rename from apps/login/src/ui/Theme.tsx
rename to apps/login/src/components/theme.tsx
index bea22025293..3d70f5ef5b9 100644
--- a/apps/login/src/ui/Theme.tsx
+++ b/apps/login/src/components/theme.tsx
@@ -4,7 +4,7 @@ import { MoonIcon, SunIcon } from "@heroicons/react/24/outline";
import { useTheme } from "next-themes";
import { useEffect, useState } from "react";
-function Theme() {
+export function Theme() {
const { resolvedTheme, setTheme } = useTheme();
const [mounted, setMounted] = useState
(false);
@@ -42,5 +42,3 @@ function Theme() {
);
}
-
-export default Theme;
diff --git a/apps/login/src/ui/TOTPRegister.tsx b/apps/login/src/components/totp-register.tsx
similarity index 94%
rename from apps/login/src/ui/TOTPRegister.tsx
rename to apps/login/src/components/totp-register.tsx
index ba66d73b573..7bcb697b222 100644
--- a/apps/login/src/ui/TOTPRegister.tsx
+++ b/apps/login/src/components/totp-register.tsx
@@ -5,11 +5,11 @@ import { useRouter } from "next/navigation";
import { QRCodeSVG } from "qrcode.react";
import { useState } from "react";
import { useForm } from "react-hook-form";
-import Alert from "./Alert";
-import { Button, ButtonVariants } from "./Button";
-import CopyToClipboard from "./CopyToClipboard";
-import { TextInput } from "./Input";
-import { Spinner } from "./Spinner";
+import { Alert } from "./alert";
+import { Button, ButtonVariants } from "./button";
+import { CopyToClipboard } from "./copy-to-clipboard";
+import { TextInput } from "./input";
+import { Spinner } from "./spinner";
type Inputs = {
code: string;
@@ -24,7 +24,7 @@ type Props = {
organization?: string;
checkAfter?: boolean;
};
-export default function TOTPRegister({
+export function TotpRegister({
uri,
secret,
loginName,
diff --git a/apps/login/src/ui/UserAvatar.tsx b/apps/login/src/components/user-avatar.tsx
similarity index 95%
rename from apps/login/src/ui/UserAvatar.tsx
rename to apps/login/src/components/user-avatar.tsx
index 7af6cc58b38..5875ca9d8f3 100644
--- a/apps/login/src/ui/UserAvatar.tsx
+++ b/apps/login/src/components/user-avatar.tsx
@@ -1,4 +1,4 @@
-import { Avatar } from "@/ui/Avatar";
+import { Avatar } from "@/components/avatar";
import { ChevronDownIcon } from "@heroicons/react/24/outline";
import Link from "next/link";
@@ -9,7 +9,7 @@ type Props = {
searchParams?: Record
;
};
-export default function UserAvatar({
+export function UserAvatar({
loginName,
displayName,
showDropdown,
diff --git a/apps/login/src/ui/UsernameForm.tsx b/apps/login/src/components/username-form.tsx
similarity index 93%
rename from apps/login/src/ui/UsernameForm.tsx
rename to apps/login/src/components/username-form.tsx
index 852d05f06b1..28469cd2018 100644
--- a/apps/login/src/ui/UsernameForm.tsx
+++ b/apps/login/src/components/username-form.tsx
@@ -4,11 +4,11 @@ import { sendLoginname } from "@/lib/server/loginname";
import { useRouter } from "next/navigation";
import { ReactNode, useEffect, useState } from "react";
import { useForm } from "react-hook-form";
-import Alert from "./Alert";
-import BackButton from "./BackButton";
-import { Button, ButtonVariants } from "./Button";
-import { TextInput } from "./Input";
-import { Spinner } from "./Spinner";
+import { Alert } from "./alert";
+import { BackButton } from "./back-button";
+import { Button, ButtonVariants } from "./button";
+import { TextInput } from "./input";
+import { Spinner } from "./spinner";
type Inputs = {
loginName: string;
@@ -23,7 +23,7 @@ type Props = {
children?: ReactNode;
};
-export default function UsernameForm({
+export function UsernameForm({
loginName,
authRequestId,
organization,
diff --git a/apps/login/src/ui/VerifyEmailForm.tsx b/apps/login/src/components/verify-email-form.tsx
similarity index 94%
rename from apps/login/src/ui/VerifyEmailForm.tsx
rename to apps/login/src/components/verify-email-form.tsx
index 7a55989e836..cbc66b1980c 100644
--- a/apps/login/src/ui/VerifyEmailForm.tsx
+++ b/apps/login/src/components/verify-email-form.tsx
@@ -1,14 +1,14 @@
"use client";
+import { Alert } from "@/components/alert";
import { resendVerifyEmail, verifyUserByEmail } from "@/lib/server/email";
-import Alert from "@/ui/Alert";
import { LoginSettings } from "@zitadel/proto/zitadel/settings/v2/login_settings_pb";
import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
-import { Button, ButtonVariants } from "./Button";
-import { TextInput } from "./Input";
-import { Spinner } from "./Spinner";
+import { Button, ButtonVariants } from "./button";
+import { TextInput } from "./input";
+import { Spinner } from "./spinner";
type Inputs = {
code: string;
@@ -25,7 +25,7 @@ type Props = {
loginSettings?: LoginSettings;
};
-export default function VerifyEmailForm({
+export function VerifyEmailForm({
userId,
loginName,
code,
diff --git a/apps/login/src/ui/ZitadelLogoDark.tsx b/apps/login/src/components/zitadel-logo-dark.tsx
similarity index 100%
rename from apps/login/src/ui/ZitadelLogoDark.tsx
rename to apps/login/src/components/zitadel-logo-dark.tsx
diff --git a/apps/login/src/ui/ZitadelLogoLight.tsx b/apps/login/src/components/zitadel-logo-light.tsx
similarity index 100%
rename from apps/login/src/ui/ZitadelLogoLight.tsx
rename to apps/login/src/components/zitadel-logo-light.tsx
diff --git a/apps/login/src/ui/ZitadelLogo.tsx b/apps/login/src/components/zitadel-logo.tsx
similarity index 100%
rename from apps/login/src/ui/ZitadelLogo.tsx
rename to apps/login/src/components/zitadel-logo.tsx
diff --git a/apps/login/src/utils/base64.ts b/apps/login/src/helpers/base64.ts
similarity index 100%
rename from apps/login/src/utils/base64.ts
rename to apps/login/src/helpers/base64.ts
diff --git a/apps/login/src/utils/colors.ts b/apps/login/src/helpers/colors.ts
similarity index 100%
rename from apps/login/src/utils/colors.ts
rename to apps/login/src/helpers/colors.ts
diff --git a/apps/login/src/utils/validators.ts b/apps/login/src/helpers/validators.ts
similarity index 100%
rename from apps/login/src/utils/validators.ts
rename to apps/login/src/helpers/validators.ts
diff --git a/packages/eslint-config-zitadel/index.js b/packages/eslint-config-zitadel/index.js
index c9523f13cde..6024e8d6351 100644
--- a/packages/eslint-config-zitadel/index.js
+++ b/packages/eslint-config-zitadel/index.js
@@ -3,9 +3,4 @@ module.exports = {
rules: {
"@next/next/no-html-link-for-pages": "off",
},
- parserOptions: {
- babelOptions: {
- presets: [require.resolve("next/babel")],
- },
- },
};