-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpanda.config.ts
More file actions
152 lines (149 loc) · 4.45 KB
/
panda.config.ts
File metadata and controls
152 lines (149 loc) · 4.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
import { defineConfig } from "@pandacss/dev";
export default defineConfig({
preflight: true,
include: ["./src/**/*.{js,jsx,ts,tsx}"],
// lib/ excluded intentionally — utility modules should not contain css()/cva() calls.
// If you need styles in a lib file, move it to components/ or add the path here.
exclude: ["./src/lib/**"],
jsxFramework: "react",
outdir: "styled-system",
// Dark mode via CSS class on <html> (toggled by src/lib/theme.ts)
conditions: {
dark: "[data-theme=dark] &",
},
theme: {
extend: {
keyframes: {
slideIn: {
from: { transform: "translateX(100%)", opacity: "0" },
to: { transform: "translateX(0)", opacity: "1" },
},
},
},
tokens: {
colors: {
background: { value: "#ffffff" },
surface: { value: "#f5f5f5" },
border: { value: "#b0b0b0" },
text: {
DEFAULT: { value: "#1a1a1a" },
muted: { value: "#666666" },
faded: { value: "#666666aa" },
},
primary: {
DEFAULT: { value: "#007bff" },
hover: { value: "#0056b3" },
},
success: { value: "#1a7a35" },
warning: { value: "#ffc107" },
danger: { value: "#dc3545" },
},
spacing: {
xs: { value: "0.25rem" },
sm: { value: "0.5rem" },
md: { value: "1rem" },
lg: { value: "1.5rem" },
xl: { value: "2rem" },
"2xl": { value: "3rem" },
},
fonts: {
body: {
value:
"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
},
mono: {
value: "ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace",
},
},
fontSizes: {
xs: { value: "0.75rem" },
sm: { value: "0.875rem" },
md: { value: "1rem" },
lg: { value: "1.25rem" },
xl: { value: "1.5rem" },
"2xl": { value: "2rem" },
},
fontWeights: {
normal: { value: "400" },
medium: { value: "500" },
semibold: { value: "600" },
bold: { value: "700" },
},
lineHeights: {
tight: { value: "1.25" },
normal: { value: "1.5" },
relaxed: { value: "1.75" },
},
radii: {
sm: { value: "4px" },
md: { value: "8px" },
lg: { value: "12px" },
full: { value: "9999px" },
},
shadows: {
sm: { value: "0 1px 2px rgba(0, 0, 0, 0.05)" },
md: { value: "0 2px 8px rgba(0, 0, 0, 0.1)" },
lg: { value: "0 4px 16px rgba(0, 0, 0, 0.15)" },
},
},
breakpoints: {
sm: "640px",
md: "768px",
lg: "1024px",
xl: "1280px",
"2xl": "1536px",
},
// Semantic tokens: adaptive colors that change between light and dark mode.
// bg, fg, stroke — layout colors (always adaptive)
// primary, success, warning, danger — status colors (adaptive, slightly brighter in dark mode)
// text.faded — de-emphasized text (adaptive, avoids hex+alpha for dark mode compatibility)
// Raw tokens (background, surface, border, text.*, etc.) stay constant and are used as base values.
semanticTokens: {
colors: {
bg: {
DEFAULT: {
value: { base: "{colors.background}", _dark: "#0a0a0a" },
},
surface: {
value: { base: "{colors.surface}", _dark: "#1a1a1a" },
},
},
fg: {
DEFAULT: {
value: { base: "{colors.text}", _dark: "#e5e5e5" },
},
muted: {
value: { base: "{colors.text.muted}", _dark: "#a0a0a0" },
},
},
stroke: {
value: { base: "{colors.border}", _dark: "#2a2a2a" },
},
// Interactive / status colors — adjusted for dark backgrounds
primary: {
DEFAULT: {
value: { base: "#007bff", _dark: "#3b9eff" },
},
hover: {
value: { base: "#0056b3", _dark: "#66b3ff" },
},
},
success: {
value: { base: "#1a7a35", _dark: "#34d058" },
},
warning: {
value: { base: "#ffc107", _dark: "#ffd33d" },
},
danger: {
value: { base: "#dc3545", _dark: "#f85149" },
},
"text.faded": {
value: { base: "#666666aa", _dark: "#808080" },
},
overlay: {
value: { base: "rgba(0, 0, 0, 0.5)", _dark: "rgba(0, 0, 0, 0.7)" },
},
},
},
},
});