-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpanda.config.ts
More file actions
135 lines (116 loc) · 2.86 KB
/
Copy pathpanda.config.ts
File metadata and controls
135 lines (116 loc) · 2.86 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
import { defineConfig } from '@pandacss/dev'
import assert from 'node:assert'
import { animationStyles } from '#theme/animation-styles.ts'
import { blue } from '#theme/colors/blue'
import { green } from '#theme/colors/green.ts'
import { indigo } from '#theme/colors/indigo'
import { olive } from '#theme/colors/olive.ts'
import { orange } from '#theme/colors/orange.ts'
import { purple } from '#theme/colors/purple'
import { red } from '#theme/colors/red.ts'
import { conditions } from '#theme/conditions.ts'
import { globalCss } from '#theme/global-css.ts'
import { keyframes } from '#theme/keyframes.ts'
import { layerStyles } from '#theme/layer-styles.ts'
import { slotRecipes, recipes } from '#theme/recipes'
import { textStyles } from '#theme/text-styles.ts'
import { colors } from '#theme/tokens/colors.ts'
import { durations } from '#theme/tokens/durations.ts'
import { shadows } from '#theme/tokens/shadows.ts'
import { zIndex } from '#theme/tokens/z-index.ts'
const outdir = process.env['PANDA_OUTDIR']
assert(outdir, 'PANDA_OUTDIR env var is not set')
export default defineConfig({
jsxFramework: 'react',
// Whether to use css reset
preflight: true,
// Where to look for your css declarations
include: ['./src/**/*.{js,jsx,ts,tsx}'],
// Files to exclude
exclude: [],
// Useful for theme customization
theme: {
extend: {
animationStyles: animationStyles,
recipes: recipes,
slotRecipes: slotRecipes,
keyframes: keyframes,
layerStyles: layerStyles,
textStyles: textStyles,
tokens: {
colors: colors,
durations: durations,
zIndex: zIndex,
},
semanticTokens: {
colors: {
fg: {
default: {
value: {
_light: '{colors.gray.12}',
_dark: '{colors.gray.12}',
},
},
muted: {
value: {
_light: '{colors.gray.11}',
_dark: '{colors.gray.11}',
},
},
subtle: {
value: {
_light: '{colors.gray.10}',
_dark: '{colors.gray.10}',
},
},
},
border: {
value: {
_light: '{colors.gray.4}',
_dark: '{colors.gray.4}',
},
},
error: {
value: {
_light: '{colors.red.9}',
_dark: '{colors.red.9}',
},
},
orange: orange,
gray: olive,
red: red,
green: green,
blue: blue,
indigo: indigo,
purple: purple,
},
shadows: shadows,
radii: {
l1: {
value: '{radii.xs}',
},
l2: {
value: '{radii.sm}',
},
l3: {
value: '{radii.md}',
},
},
},
},
},
outdir: outdir,
globalCss: globalCss,
conditions: conditions,
plugins: [
{
name: 'Remove Panda Preset Colors',
hooks: {
'preset:resolved': ({ utils, preset, name }) =>
name === '@pandacss/preset-panda'
? utils.omit(preset, ['theme.tokens.colors', 'theme.semanticTokens.colors'])
: preset,
},
},
],
})