chore: initial commit

I just realized i was using this without commiting it, so this is a very big commit
This commit is contained in:
2025-08-31 19:43:26 -06:00
commit 88be319334
19 changed files with 1301 additions and 0 deletions

51
src/index.ts Normal file
View File

@@ -0,0 +1,51 @@
import { definePreset } from '@pandacss/dev'
import generateColors from '@/colors/generateColors.js'
import generateNeutralColor from '@/colors/generateNeutralColor.js'
import buttonRecipe from '@/recipes/button.js'
import { detailsRecipe } from '@/recipes/details.js'
import inputRecipe from '@/recipes/input.js'
import type { BrandColor, ColorVariation, NeutralColor } from '@/types.js'
import generateSemanticColors from './colors/generateSemanticColors.js'
export type themeConfig = {
neutral?: NeutralColor
semanticColors?: Record<string, BrandColor>
colorVariation?: ColorVariation
}
const defaultConfig: Required<themeConfig> = {
neutral: 'slate',
colorVariation: { dark: false, p3: false, alpha: false },
semanticColors: { primary: 'teal' }
}
const srJuggernautPandaPreset = (config?: themeConfig) => {
const mergedConfig = { ...defaultConfig, ...config }
const colors = generateColors()
const neutral = generateNeutralColor(mergedConfig.neutral, mergedConfig.colorVariation)
const semanticColors = generateSemanticColors(mergedConfig.semanticColors, mergedConfig.colorVariation)
return definePreset({
name: 'srjuggernaut-panda-preset',
theme: {
recipes: {
button: buttonRecipe({ semanticColors: Object.keys(semanticColors) }),
details: detailsRecipe({ semanticColors: Object.keys(semanticColors) }),
input: inputRecipe
},
tokens: {
colors
},
semanticTokens: {
colors: {
neutral: neutral,
...semanticColors
}
}
}
})
}
export default srJuggernautPandaPreset
export { buttonVariants } from '@/recipes/button.js'
export { BrandColor, ColorVariation, NeutralColor } from '@/types.js'