scss, module, nextjs, hydration fixes

This commit is contained in:
Max Peintner
2024-11-25 10:59:28 +01:00
parent b48c25f7cd
commit 76e9fea4e4
8 changed files with 16 additions and 21 deletions

View File

@@ -36,7 +36,6 @@ const secureHeaders = [
const nextConfig = {
reactStrictMode: true, // Recommended for the `pages` directory, default in `app`.
swcMinify: true,
experimental: {
dynamicIO: true,
},

View File

@@ -88,11 +88,5 @@
"ts-proto": "^2.2.7",
"typescript": "^5.6.3",
"zitadel-tailwind-config": "workspace:*"
},
"pnpm": {
"overrides": {
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
}
}
}

View File

@@ -1,4 +1,5 @@
"use client";
import { CheckCircleIcon } from "@heroicons/react/24/solid";
import { clsx } from "clsx";
import {
@@ -64,6 +65,7 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
{label} {required && "*"}
</span>
<input
suppressHydrationWarning
ref={ref}
className={styles(!!error, !!disabled)}
defaultValue={defaultValue}

View File

@@ -1,5 +1,5 @@
// include styles from the ui package
@import "./vars.scss";
@use "./vars.scss";
@tailwind base;
@tailwind components;

View File

@@ -1,4 +1,4 @@
const sharedConfig = require("zitadel-tailwind-config/tailwind.config.mjs");
import sharedConfig from "zitadel-tailwind-config/tailwind.config.mjs";
let colors = {
background: { light: { contrast: {} }, dark: { contrast: {} } },

View File

@@ -27,7 +27,9 @@
},
"pnpm": {
"overrides": {
"@typescript-eslint/parser": "^7.9.0"
"@typescript-eslint/parser": "^7.9.0",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
}
},
"devDependencies": {

View File

@@ -1,12 +1,8 @@
const colors = require("tailwindcss/colors");
import colors from "tailwindcss/colors";
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx}",
"./page/**/*.{js,ts,jsx,tsx}",
"./ui/**/*.{js,ts,jsx,tsx}",
],
export default {
content: ["./app/**/*.{js,ts,jsx,tsx}", "./page/**/*.{js,ts,jsx,tsx}", "./ui/**/*.{js,ts,jsx,tsx}"],
future: {
hoverOnlyWhenSupported: true,
},
@@ -48,10 +44,10 @@ module.exports = {
},
backgroundImage: ({ theme }) => ({
"dark-vc-border-gradient": `radial-gradient(at left top, ${theme(
"colors.gray.800"
"colors.gray.800",
)}, 50px, ${theme("colors.gray.800")} 50%)`,
"vc-border-gradient": `radial-gradient(at left top, ${theme(
"colors.gray.200"
"colors.gray.200",
)}, 50px, ${theme("colors.gray.300")} 50%)`,
}),
keyframes: ({ theme }) => ({

6
pnpm-lock.yaml generated
View File

@@ -6,6 +6,8 @@ settings:
overrides:
'@typescript-eslint/parser': ^7.9.0
'@types/react': npm:types-react@19.0.0-rc.1
'@types/react-dom': npm:types-react-dom@19.0.0-rc.1
importers:
@@ -1508,8 +1510,8 @@ packages:
engines: {node: '>=18'}
peerDependencies:
'@testing-library/dom': ^10.0.0
'@types/react': ^18.0.0
'@types/react-dom': ^18.0.0
'@types/react': npm:types-react@19.0.0-rc.1
'@types/react-dom': npm:types-react-dom@19.0.0-rc.1
react: ^18.0.0
react-dom: ^18.0.0
peerDependenciesMeta: