-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
4,889 additions
and
746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# private | ||
.private/ | ||
|
||
# generated | ||
/lib/generated/ | ||
|
||
# env | ||
*.env | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "packages/pandacss-preset-material-tokens"] | ||
path = packages/pandacss-preset-material-tokens | ||
url = https://github.com/canoypa/pandacss-preset-material-tokens |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule pandacss-preset-material-tokens
added at
ebb33c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import { defineConfig } from '@pandacss/dev' | ||
import Color from 'color' | ||
import { presetMaterialTokens } from 'pandacss-preset-material-tokens' | ||
|
||
export default defineConfig({ | ||
// The output directory for your css system | ||
outdir: 'lib/generated/pandacss', | ||
|
||
// Where to look for your css declarations | ||
include: ['./src/**/*.{ts,tsx}'], | ||
// Files to exclude | ||
exclude: [], | ||
|
||
// Whether to use css reset | ||
preflight: true, | ||
|
||
// Useful for theme customization | ||
theme: { | ||
extend: { | ||
tokens: { | ||
fonts: { | ||
comfortaa: { value: 'var(--font-comfortaa)' }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
||
conditions: { | ||
extend: { | ||
groupHorizontal: '.group:is([data-orientation=horizontal]) &', | ||
groupVertical: '.group:is([data-orientation=vertical]) &', | ||
}, | ||
}, | ||
|
||
globalCss: { | ||
body: { | ||
backgroundColor: 'dark.surface', | ||
color: 'dark.on-surface', | ||
fill: 'dark.on-surface', | ||
}, | ||
':focus-visible': { | ||
outlineWidth: 2, | ||
outlineStyle: 'solid', | ||
outlineColor: 'dark.primary', | ||
outlineOffset: 2, | ||
}, | ||
}, | ||
|
||
utilities: { | ||
extend: { | ||
backgroundWithAlpha_EXPERIMENTAL: { | ||
property: 'backgroundColor', | ||
className: 'background-with-alpha-experimental', | ||
values: { type: 'string' }, | ||
transform: (value, { token }) => { | ||
if (!/.+\/.+/.test(value)) return {} | ||
|
||
const [color, opacity] = value.split('/') | ||
|
||
const colorToken = token.raw(`colors.${color}`)?.value ?? color | ||
const opacityToken = token.raw(`opacity.${opacity}`)?.value ?? opacity | ||
|
||
const colorValue = colorToken | ||
const opacityValue = !isNaN(Number(opacityToken)) | ||
? Number(opacityToken) | ||
: 1 | ||
|
||
return { | ||
backgroundColor: Color(colorValue) | ||
.alpha(opacityValue) | ||
.rgb() | ||
.toString(), | ||
} | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
||
presets: [ | ||
presetMaterialTokens({ | ||
sourceColor: 0x8282f4, | ||
customColors: [ | ||
{ name: 'info', value: 0x42a5f5, blend: true }, | ||
{ name: 'warning', value: 0xffee58, blend: true }, | ||
{ name: 'success', value: 0x66bb6a, blend: true }, | ||
], | ||
}), | ||
], | ||
}) |
Oops, something went wrong.