Files
co-lite/solvway-admin-portal/tailwind.config.ts
T
ngqileandClaude Opus 5.5 5ee51d1913 chore: copy kept Tastefully modules and portals into Co-Lite
Backend modules from tastefully 8bd93d15: core-libs, core-session,
api-gateway, mobile-api, services-auth, services-system,
services-counter, services-member, services-log, services-email.
solvway-admin-portal from babyboo f64d096ea, solvway-customer-portal
from tastefully 8bd93d15. Copied as tracked files only.

Literal secrets replaced with environment placeholders:
- services-email: SMTP_PASSWORD, MAILGUN_API_KEY, SENDGRID_API_KEY,
  MAILJET_API_KEY, MAILJET_SECRET_KEY (optional, empty default)
- services-system: JUMIO_TOKEN, JUMIO_SECRET (optional)
- services-auth: USER_AUTH_API_SECRET (required); commented JWT secret removed
- core-libs: JWT_TOKEN default removed (required), XXL_JOB_TOKEN default
  removed, ipgeolocation key read from IPGEOLOCATION_API_KEY
- services-system EkycAppConfig: commented Jumio credentials removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
2026-11-26 15:55:45 +08:00

101 lines
3.2 KiB
TypeScript

import type { Config } from "tailwindcss";
// Wrap CSS variable values with color-mix so opacity modifiers (bg-primary/10, ring-ring/50, etc.)
// work in Tailwind 3.x. Without <alpha-value> the /N syntax produces nothing on bare var(--x).
const token = (name: string) => `color-mix(in srgb, var(--${name}) calc(<alpha-value> * 100%), transparent)`;
const config: Config = {
darkMode: "class",
content: [
"./app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
// Ported from src/styles/_variables.scss + tailwind.css (Tailwind 4
// @theme inline). Values are plain custom properties, wrapped with color-mix
// so opacity modifiers work.
colors: {
border: token("border"),
input: token("input"),
ring: token("ring"),
background: token("background"),
foreground: token("foreground"),
primary: {
DEFAULT: token("primary"),
foreground: token("primary-foreground"),
},
secondary: {
DEFAULT: token("secondary"),
foreground: token("secondary-foreground"),
},
destructive: {
DEFAULT: token("destructive"),
foreground: token("destructive-foreground"),
},
muted: {
DEFAULT: token("muted"),
foreground: token("muted-foreground"),
},
accent: {
DEFAULT: token("accent"),
foreground: token("accent-foreground"),
strong: token("accent-strong"),
},
popover: {
DEFAULT: token("popover"),
foreground: token("popover-foreground"),
},
card: {
DEFAULT: token("card"),
foreground: token("card-foreground"),
},
"table-head": {
DEFAULT: token("table-head"),
foreground: token("table-head-foreground"),
},
contrast: {
DEFAULT: token("contrast"),
foreground: token("contrast-foreground"),
soft: token("contrast-soft"),
},
positive: token("positive"),
negative: token("negative"),
warning: token("warning"),
chart: {
"1": token("chart-1"),
"2": token("chart-2"),
"3": token("chart-3"),
"4": token("chart-4"),
"5": token("chart-5"),
},
sidebar: {
DEFAULT: token("sidebar"),
foreground: token("sidebar-foreground"),
primary: token("sidebar-primary"),
"primary-foreground": token("sidebar-primary-foreground"),
accent: token("sidebar-accent"),
"accent-foreground": token("sidebar-accent-foreground"),
border: token("sidebar-border"),
ring: token("sidebar-ring"),
},
},
borderRadius: {
// Read through vars so a card can re-point them for what it holds (nested radius, globals.css).
sm: "var(--radius-sm)",
md: "var(--radius-md)",
lg: "var(--radius-lg)",
xl: "var(--radius-xl)",
table: "var(--table-radius)",
},
fontFamily: {
heading: ["var(--font-heading)"],
sans: ["var(--font-sans)"],
mono: ["var(--font-mono)"],
},
},
},
plugins: [],
};
export default config;