+
@@ -90,9 +90,9 @@ function GlobalNavItem({
className={clsx(
"block rounded-md px-3 py-2 text-sm font-medium hover:text-black dark:hover:text-gray-300",
{
- "text-gray-500 dark:text-gray-500 hover:bg-gray-100 hover:dark:bg-gray-800":
+ "text-text-light-secondary dark:text-text-dark-secondary hover:text-text-light hover:dark:text-text-dark":
!isActive,
- "text-gray-800 dark:text-gray-200": isActive,
+ "text-primary-light-500 dark:text-primary-dark-500": isActive,
}
)}
>
diff --git a/apps/login/ui/LayoutProviders.tsx b/apps/login/ui/LayoutProviders.tsx
index 38e21823b9b..50b92cbb937 100644
--- a/apps/login/ui/LayoutProviders.tsx
+++ b/apps/login/ui/LayoutProviders.tsx
@@ -7,8 +7,8 @@ type Props = {
};
export function LayoutProviders({ children }: Props) {
- const { resolvedTheme } = useTheme();
- const isDark = resolvedTheme && resolvedTheme === "dark";
+ // const { resolvedTheme } = useTheme();
+ const isDark = false; //resolvedTheme && resolvedTheme === "dark";
// useEffect(() => {
// console.log("layoutproviders useeffect");
diff --git a/apps/login/utils/colors.ts b/apps/login/utils/colors.ts
index 39c142c08b4..675861bac8b 100644
--- a/apps/login/utils/colors.ts
+++ b/apps/login/utils/colors.ts
@@ -84,25 +84,34 @@ export function setTheme(document: any, policy?: LabelPolicyColors) {
const dark = computeMap(lP, true);
const light = computeMap(lP, false);
- console.log(dark, light);
+ setColorShades(dark.background, "background", "dark", document);
+ setColorShades(light.background, "background", "light", document);
- setColors(dark.background, "background", "dark", document);
- setColors(light.background, "background", "light", document);
+ setColorShades(dark.primary, "primary", "dark", document);
+ setColorShades(light.primary, "primary", "light", document);
- setColors(dark.primary, "primary", "dark", document);
- setColors(light.primary, "primary", "light", document);
+ setColorShades(dark.warn, "warn", "dark", document);
+ setColorShades(light.warn, "warn", "light", document);
- setColors(dark.text, "primary", "dark", document);
- setColors(light.text, "primary", "light", document);
+ // setColorShades(dark.text, "text", "dark", document);
+ // setColorShades(light.text, "text", "light", document);
- setColors(dark.link, "link", "dark", document);
- setColors(light.link, "link", "light", document);
+ // setColorShades(dark.link, "link", "dark", document);
+ // setColorShades(light.link, "link", "light", document);
- setColors(dark.warn, "warn", "dark", document);
- setColors(light.warn, "warn", "light", document);
+ setColorAlpha(dark.text, "text", "dark", document);
+ setColorAlpha(light.text, "text", "light", document);
+
+ setColorAlpha(dark.link, "link", "dark", document);
+ setColorAlpha(light.link, "link", "light", document);
}
-function setColors(map: Color[], type: string, theme: string, document: any) {
+function setColorShades(
+ map: Color[],
+ type: string,
+ theme: string,
+ document: any
+) {
map.forEach((color) => {
document.documentElement.style.setProperty(
`--theme-${theme}-${type}-${color.name}`,
@@ -115,6 +124,30 @@ function setColors(map: Color[], type: string, theme: string, document: any) {
});
}
+function setColorAlpha(
+ map: Color[],
+ type: string,
+ theme: string,
+ document: any
+) {
+ const color = map.find((color) => color.name === "500");
+
+ if (color) {
+ document.documentElement.style.setProperty(
+ `--theme-${theme}-${type}`,
+ color.hex
+ );
+ document.documentElement.style.setProperty(
+ `--theme-${theme}-${type}-contrast`,
+ color.contrastColor
+ );
+ document.documentElement.style.setProperty(
+ `--theme-${theme}-${type}-secondary`,
+ `${color.hex}80`
+ );
+ }
+}
+
function computeColors(hex: string): Color[] {
return [
getColorObject(tinycolor(hex).lighten(52), "50"),
diff --git a/packages/zitadel-react/src/components/SignInWithGitlab.tsx b/packages/zitadel-react/src/components/SignInWithGitlab.tsx
index 8e3d5afa529..9100d27f2f9 100644
--- a/packages/zitadel-react/src/components/SignInWithGitlab.tsx
+++ b/packages/zitadel-react/src/components/SignInWithGitlab.tsx
@@ -6,8 +6,8 @@ export interface SignInWithGitlabProps {
export function SignInWithGitlab(props: SignInWithGitlabProps) {
return (
-
-
+
+
-
Sign in with Gitlab
+
Sign in with Gitlab
);
}
diff --git a/packages/zitadel-react/src/components/SignInWithGoogle.tsx b/packages/zitadel-react/src/components/SignInWithGoogle.tsx
index 83368eb2b3c..a6e597149bb 100644
--- a/packages/zitadel-react/src/components/SignInWithGoogle.tsx
+++ b/packages/zitadel-react/src/components/SignInWithGoogle.tsx
@@ -6,8 +6,8 @@ export interface SignInWithGoogleProps {
export function SignInWithGoogle(props: SignInWithGoogleProps) {
return (
-
-
+
+
-
Sign in with Google
+
Sign in with Google
);
}
diff --git a/packages/zitadel-react/src/components/ZitadelUIProvider.tsx b/packages/zitadel-react/src/components/ZitadelUIProvider.tsx
index 2caa5a64474..f4838bb8218 100644
--- a/packages/zitadel-react/src/components/ZitadelUIProvider.tsx
+++ b/packages/zitadel-react/src/components/ZitadelUIProvider.tsx
@@ -4,5 +4,7 @@ export type ZitadelUIProps = {
};
export function ZitadelUIProvider({ dark, children }: ZitadelUIProps) {
- return
{children}
;
+ return (
+
{children}
+ );
}
diff --git a/packages/zitadel-react/tailwind.config.js b/packages/zitadel-react/tailwind.config.js
index 56f428d7fc4..db207600200 100644
--- a/packages/zitadel-react/tailwind.config.js
+++ b/packages/zitadel-react/tailwind.config.js
@@ -3,7 +3,7 @@ const sharedConfig = require("zitadel-tailwind-config/tailwind.config.js");
/** @type {import('tailwindcss').Config} */
module.exports = {
presets: [sharedConfig],
- prefix: "ui-",
+ prefix: "ztdl-",
darkMode: "class",
content: [`src/**/*.{js,ts,jsx,tsx}`],
};