);
}
diff --git a/apps/login/package.json b/apps/login/package.json
index fe8e78e9391..1ff9cbeb733 100644
--- a/apps/login/package.json
+++ b/apps/login/package.json
@@ -25,7 +25,6 @@
"@tailwindcss/forms": "0.5.3",
"clsx": "1.2.1",
"date-fns": "2.29.3",
- "dinero.js": "2.0.0-alpha.8",
"next": "13.2.3",
"nice-grpc": "2.0.1",
"react": "18.2.0",
diff --git a/apps/login/public/zitadel-logo-dark.svg b/apps/login/public/zitadel-logo-dark.svg
new file mode 100644
index 00000000000..95ff80187c5
--- /dev/null
+++ b/apps/login/public/zitadel-logo-dark.svg
@@ -0,0 +1,101 @@
+
+
+
diff --git a/apps/login/public/zitadel-logo-light.svg b/apps/login/public/zitadel-logo-light.svg
new file mode 100644
index 00000000000..7edc7489035
--- /dev/null
+++ b/apps/login/public/zitadel-logo-light.svg
@@ -0,0 +1,99 @@
+
+
+
diff --git a/apps/login/tailwind.config.js b/apps/login/tailwind.config.js
index fa2aee907e8..8d634124778 100644
--- a/apps/login/tailwind.config.js
+++ b/apps/login/tailwind.config.js
@@ -54,6 +54,10 @@ module.exports = {
800: "#000000",
900: "#000000",
},
+ light: {
+ 500: colors.white,
+ 600: colors.gray[50],
+ },
},
input: {
light: {
@@ -77,9 +81,12 @@ module.exports = {
},
},
backgroundImage: ({ theme }) => ({
- "vc-border-gradient": `radial-gradient(at left top, ${theme(
+ "dark-vc-border-gradient": `radial-gradient(at left top, ${theme(
"colors.gray.500"
)}, 50px, ${theme("colors.gray.800")} 50%)`,
+ "vc-border-gradient": `radial-gradient(at left top, ${theme(
+ "colors.gray.200"
+ )}, 50px, ${theme("colors.gray.300")} 50%)`,
}),
keyframes: ({ theme }) => ({
rerender: {
diff --git a/apps/login/ui/AddressBar.tsx b/apps/login/ui/AddressBar.tsx
index b74a30cb051..96de112f529 100644
--- a/apps/login/ui/AddressBar.tsx
+++ b/apps/login/ui/AddressBar.tsx
@@ -1,7 +1,7 @@
-'use client';
+"use client";
-import React from 'react';
-import { usePathname } from 'next/navigation';
+import React from "react";
+import { usePathname } from "next/navigation";
export function AddressBar() {
const pathname = usePathname();
@@ -30,7 +30,7 @@ export function AddressBar() {
<>
/
{pathname
- .split('/')
+ .split("/")
.slice(1)
.map((segment) => {
return (
@@ -38,7 +38,7 @@ export function AddressBar() {
{segment}
diff --git a/apps/login/ui/GlobalNav.tsx b/apps/login/ui/GlobalNav.tsx
index a9d3e2b81c0..9c73f048c0e 100644
--- a/apps/login/ui/GlobalNav.tsx
+++ b/apps/login/ui/GlobalNav.tsx
@@ -1,32 +1,32 @@
-'use client';
+"use client";
-import { demos, type Item } from '#/lib/demos';
-import '#/styles/globals.css';
-import { ZitadelLogo } from '#/ui/ZitadelLogo';
-import Link from 'next/link';
-import { useSelectedLayoutSegment } from 'next/navigation';
-import clsx from 'clsx';
-import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/solid';
-import { useState } from 'react';
+import { demos, type Item } from "#/lib/demos";
+import "#/styles/globals.css";
+import { ZitadelLogo } from "#/ui/ZitadelLogo";
+import Link from "next/link";
+import { useSelectedLayoutSegment } from "next/navigation";
+import clsx from "clsx";
+import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/solid";
+import { useState } from "react";
export function GlobalNav() {
const [isOpen, setIsOpen] = useState(false);
const close = () => setIsOpen(false);
return (
-
+
-
+
-
- Login Playground (WIP)
+
+ Login
@@ -46,8 +46,9 @@ export function GlobalNav() {
@@ -55,7 +56,7 @@ export function GlobalNav() {
{demos.map((section) => {
return (
-
+
@@ -88,11 +89,12 @@ function GlobalNavItem({
onClick={close}
href={`/${item.slug}`}
className={clsx(
- 'block rounded-md px-3 py-2 text-sm font-medium hover:text-gray-300',
+ "block rounded-md px-3 py-2 text-sm font-medium hover:text-black dark:hover:text-gray-300",
{
- 'text-gray-500 hover:bg-gray-800': !isActive,
- 'text-gray-200': isActive,
- },
+ "text-gray-500 dark:text-gray-500 hover:bg-gray-100 hover:dark:bg-gray-800":
+ !isActive,
+ "text-gray-800 dark:text-gray-200": isActive,
+ }
)}
>
{item.name}
diff --git a/apps/login/ui/IdentityProviders.tsx b/apps/login/ui/IdentityProviders.tsx
index 9fcd2f27b0b..3dedc04d4e6 100644
--- a/apps/login/ui/IdentityProviders.tsx
+++ b/apps/login/ui/IdentityProviders.tsx
@@ -1,9 +1,10 @@
-import { SignInWithGoogle } from "@zitadel/react";
+import { SignInWithGoogle, SignInWithGitlab } from "@zitadel/react";
export default function IdentityProviders() {
return (
-
+
+
);
}
diff --git a/apps/login/ui/VercelLogo.tsx b/apps/login/ui/VercelLogo.tsx
deleted file mode 100644
index 6550d288430..00000000000
--- a/apps/login/ui/VercelLogo.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-export function VercelLogo() {
- return (
-
- );
-}
diff --git a/apps/login/ui/ZitadelLogo.tsx b/apps/login/ui/ZitadelLogo.tsx
index c1a52405337..20c7e066bdd 100644
--- a/apps/login/ui/ZitadelLogo.tsx
+++ b/apps/login/ui/ZitadelLogo.tsx
@@ -1,14 +1,39 @@
-import { ZitadelLogoDark } from './ZitadelLogoDark';
-import { ZitadelLogoLight } from './ZitadelLogoLight';
+import Image from "next/image";
+import { ZitadelLogoDark } from "./ZitadelLogoDark";
+import { ZitadelLogoLight } from "./ZitadelLogoLight";
+type Props = {
+ height?: number;
+ width?: number;
+};
-export function ZitadelLogo() {
+export function ZitadelLogo({ height = 40, width = 147.5 }: Props) {
return (
<>
-
+ {/* */}
+
+
-
+
>
);
diff --git a/packages/zitadel-react/README.md b/packages/zitadel-react/README.md
new file mode 100644
index 00000000000..0d2b62c8d6d
--- /dev/null
+++ b/packages/zitadel-react/README.md
@@ -0,0 +1,39 @@
+# How to use
+
+### Install
+
+```sh
+npm install @zitadel/react
+```
+
+or
+
+```sh
+yarn add @zitadel/react
+```
+
+### Import styles file
+
+To get the styles, import them in `_app.tsx` or global styling file
+
+```
+import "@zitadel/react/styles.css";
+```
+
+### Setup Dark mode
+
+to set dark theme, wrap your components in a `ui-dark` class.
+
+### Use components
+
+```tsx
+import { SignInWithGoogle } from "@zitadel/react";
+
+export default function IdentityProviders() {
+ return (
+
+
+
+ );
+}
+```
diff --git a/packages/zitadel-react/src/components/SignInWithGitlab.tsx b/packages/zitadel-react/src/components/SignInWithGitlab.tsx
new file mode 100644
index 00000000000..6ac1313c9f7
--- /dev/null
+++ b/packages/zitadel-react/src/components/SignInWithGitlab.tsx
@@ -0,0 +1,41 @@
+import * as React from "react";
+
+export interface SignInWithGitlabProps {
+ children?: React.ReactNode;
+}
+
+export function SignInWithGitlab(props: SignInWithGitlabProps) {
+ return (
+
+
+
Sign in with Gitlab
+
+ );
+}
+
+SignInWithGitlab.displayName = "SignInWithGitlab";
diff --git a/packages/zitadel-react/src/components/SignInWithGoogle.tsx b/packages/zitadel-react/src/components/SignInWithGoogle.tsx
index d01b5ea8abb..c73d4b2183d 100644
--- a/packages/zitadel-react/src/components/SignInWithGoogle.tsx
+++ b/packages/zitadel-react/src/components/SignInWithGoogle.tsx
@@ -6,14 +6,49 @@ export interface SignInWithGoogleProps {
export function SignInWithGoogle(props: SignInWithGoogleProps) {
return (
-
-

+
);
diff --git a/packages/zitadel-react/src/index.tsx b/packages/zitadel-react/src/index.tsx
index a8e0fe8bee0..6bb124c0635 100644
--- a/packages/zitadel-react/src/index.tsx
+++ b/packages/zitadel-react/src/index.tsx
@@ -4,3 +4,8 @@ export {
SignInWithGoogle,
type SignInWithGoogleProps,
} from "./components/SignInWithGoogle";
+
+export {
+ SignInWithGitlab,
+ type SignInWithGitlabProps,
+} from "./components/SignInWithGitlab";
diff --git a/packages/zitadel-react/src/styles.css b/packages/zitadel-react/src/styles.css
index 6b6d4bc4be8..b5c61c95671 100644
--- a/packages/zitadel-react/src/styles.css
+++ b/packages/zitadel-react/src/styles.css
@@ -1,7 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
-
-.hello {
- color: yellow;
-}
diff --git a/packages/zitadel-react/tsup.config.ts b/packages/zitadel-react/tsup.config.ts
index edd820fd354..8a2f312e51e 100644
--- a/packages/zitadel-react/tsup.config.ts
+++ b/packages/zitadel-react/tsup.config.ts
@@ -4,7 +4,7 @@ export default defineConfig((options: Options) => ({
treeshake: true,
splitting: true,
publicDir: true,
- entry: ["src/**/*.{tsx,png,svg}"],
+ entry: ["src/**/*.tsx"],
format: ["esm"],
dts: true,
minify: true,
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8a11c99bbf2..5c1edec4265 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -36,7 +36,6 @@ importers:
clsx: 1.2.1
date-fns: 2.29.3
del-cli: 5.0.0
- dinero.js: 2.0.0-alpha.8
eslint-config-zitadel: workspace:*
grpc-tools: 1.11.3
lint-staged: 13.0.3
@@ -62,7 +61,6 @@ importers:
'@zitadel/server': link:../../packages/zitadel-server
clsx: 1.2.1
date-fns: 2.29.3
- dinero.js: 2.0.0-alpha.8
next: 13.2.3_z72xxk7vwlamvgqemvc4ptm4du
nice-grpc: 2.0.1
react: 18.2.0
@@ -1756,22 +1754,6 @@ packages:
prettier: 2.8.0
dev: true
- /@dinero.js/calculator-number/2.0.0-alpha.8:
- resolution: {integrity: sha512-/L+N7g5DjcS6wlMb2hcOXWBKW2TGiG+vZDZr9ow0nsHUTdwtMarL1bmBH9fGldHhH2XsxcrjN9H+036yeNzh3Q==}
- dependencies:
- '@dinero.js/core': 2.0.0-alpha.8
- dev: false
-
- /@dinero.js/core/2.0.0-alpha.8:
- resolution: {integrity: sha512-3jaw2j6J/SshlCZz5KhHkh8zP47HRmt9RpnjR0BJs2awpweVuZIyyX9qzGVUEVpml9IwzQ1U+YdXevhOxtcDgg==}
- dependencies:
- '@dinero.js/currencies': 2.0.0-alpha.8
- dev: false
-
- /@dinero.js/currencies/2.0.0-alpha.8:
- resolution: {integrity: sha512-zApiqtuuPwjiM9LJA5/kNcT48VSHRiz2/mktkXjIpfxrJKzthXybUAgEenExIH6dYhLDgVmsLQZtZFOsdYl0Ag==}
- dev: false
-
/@emotion/unitless/0.7.5:
resolution: {integrity: sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==}
dev: false
@@ -3100,14 +3082,6 @@ packages:
/didyoumean/1.2.2:
resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==}
- /dinero.js/2.0.0-alpha.8:
- resolution: {integrity: sha512-6bl+g6oh6iQ6vPR5Pd4qr7D+P5e51GYRUT3jl8HYqYeejYC5sd9OVTTbXC3WU7L25mAIbOm+diiTVz1rL4QLwg==}
- dependencies:
- '@dinero.js/calculator-number': 2.0.0-alpha.8
- '@dinero.js/core': 2.0.0-alpha.8
- '@dinero.js/currencies': 2.0.0-alpha.8
- dev: false
-
/dir-glob/3.0.1:
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
engines: {node: '>=8'}