Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR-145] [FR-147] Implement Figma design #1

Open
wants to merge 4 commits into
base: rewrite
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"typescript": "5.1.6"
},
"devDependencies": {
"@pandacss/dev": "^0.11.1",
"@pandacss/dev": "^0.16.0",
"prettier": "^3.0.2"
}
}
108 changes: 108 additions & 0 deletions panda.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,65 @@ export default defineConfig({

jsxStyleProps: "none",

utilities: {
displayFlex: {
className: "flex",
values: ["column", "row", "start"],
transform(value) {
return {
display: "flex",
flexDirection: value,
};
},
},
paddingX: {
className: "padding-x",
values: "spacing",
transform(value: string) {
return {
paddingLeft: value,
paddingRight: value,
};
},
},
paddingY: {
className: "padding-y",
values: "spacing",
transform(value: string) {
return {
paddingTop: value,
paddingBottom: value,
};
},
},
inputBorder: {
className: "input-border",
values: { type: "boolean" },
transform(value: boolean, { token }) {
if (!value) return {};

return {
borderWidth: "1px",
borderColor: token("colors.borders.normal"),
borderStyle: "solid",
borderRadius: token("radii.input"),
outline: "none",
transition: `border-color ${token("durations.fast")}`,

"&:not([disabled])": {
"&:hover:not(:focus)": {
borderColor: token("colors.borders.hover"),
},

"&:focus": {
borderColor: token("colors.borders.focus"),
},
},
};
},
},
},

// Useful for theme customization
theme: {
extend: {
Expand All @@ -27,6 +86,22 @@ export default defineConfig({
lineHeight: "1.2",
},
},
button: {
description: "Button text",
value: {
fontSize: "sm",
lineHeight: "1.2",
fontWeight: "500",
},
},
medium: {
description: "Medium text",
value: {
fontSize: "md",
lineHeight: "1.2",
fontWeight: "500",
},
},
hero: {
description: "Hero text",
value: {
Expand All @@ -37,6 +112,15 @@ export default defineConfig({
},
},
tokens: {
durations: {
fast: { value: "150ms" },
normal: { value: "300ms" },
},
radii: {
input: {
value: "{radii.lg}",
},
},
spacing: {
paddingToMaxWidth: {
value: "3rem",
Expand All @@ -56,6 +140,30 @@ export default defineConfig({
},
},
colors: {
grey: {
200: { value: "#EEEEEE" },
},
buttons: {
primary: { value: "#7A97FF" },
danger: { value: "#FF6868" },
},
input: {
bg: {
value: "#fff",
},
placeholder: {
value: "#ACACAC",
},
},
borders: {
normal: { value: "#BCC5C0" },
hover: { value: "#707070" },
focus: { value: "black" },
},
text: {
primary: { value: "#343434" },
secondary: { value: "#535353" },
},
neutral: {
100: { value: "#F4F8F6" },
200: { value: "#D9DFDB" },
Expand Down
Loading