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

Fixes #96

Merged
merged 10 commits into from
Jan 14, 2024
Merged
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
6 changes: 6 additions & 0 deletions src/stories/components/Widget.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ Shows a list of limits by each category, as well as progress and additional info
</button>
</div>
<div className="widget-content">
<div className="alert">
<span className="alert-icon">
<AlertIcon />
</span>
<span>You need 78.00 EUR more based on your balance and future expenses</span>
</div>
<ul className="budget-list">
<li className="budget-container">
<div className="budget">
Expand Down
73 changes: 70 additions & 3 deletions src/styles/abstracts/variables.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:root {
/* Primitive colors */
/* Deprecated colors */
--neutral-0: #e6e6e6;
--neutral-1: #cfcfcf;
--neutral-2: #b8b8b8;
Expand All @@ -10,6 +10,73 @@
--neutral-7: #454545;
--neutral-8: #2e2e2e;
--neutral-9: #171717;

/* Neutral */
--neutral-25: #f9f9f9;
--neutral-50: #f1f1f1;
--neutral-100: #e2e2e2;
--neutral-200: #ccc;
--neutral-300: #a5a5a5;
--neutral-400: #777;
--neutral-500: #4b4b4b;
--neutral-600: #2e2e2e;
--neutral-700: #1b1b1b;
--neutral-800: #111;
--neutral-900: #070707;

/* Red */
--red-25: #fef8f8;
--red-50: #fdeded;
--red-100: #fbdbdc;
--red-200: #f8bdbf;
--red-300: #f48688;
--red-400: #e22e38;
--red-500: #931a21;
--red-600: #5f0d12;
--red-700: #3d0508;
--red-800: #2a0304;
--red-900: #180102;

/* Green */
--green-25: #eafef1;
--green-50: #c7fdd9;
--green-100: #73fcad;
--green-200: #49e693;
--green-300: #39bc77;
--green-400: #278754;
--green-500: #155634;
--green-600: #0a351e;
--green-700: #042111;
--green-800: #021509;
--green-900: #010a04;

/* Yellow */
--yellow-25: #fff8f1;
--yellow-50: #ffeedb;
--yellow-100: #ffddb2;
--yellow-200: #ffc249;
--yellow-300: #d49c00;
--yellow-400: #997000;
--yellow-500: #624700;
--yellow-600: #3e2b00;
--yellow-700: #261900;
--yellow-800: #190f00;
--yellow-900: #0d0600;

/* Orange */
--orange-25: #fef8f6;
--orange-50: #fdeee9;
--orange-100: #fbdcd2;
--orange-200: #f8bfab;
--orange-300: #f58a4c;
--orange-400: #b4612d;
--orange-500: #743c1a;
--orange-600: #4a240d;
--orange-700: #2f1505;
--orange-800: #1f0c03;
--orange-900: #110501;

/* White & Black */
--white: #fff;
--black: #000;

Expand All @@ -34,15 +101,15 @@
/* Semantic Colors */

/* TODO: Add body-background color to primitive tokens */
--body-background: #f0f0f0;
--body-background: var(--neutral-50);
--text-primary: var(--neutral-9);
--text-secondary: var(--neutral-6);
--text-disabled: var(--neutral-3);
--focus-ring: var(--neutral-9);
}

.dark-theme {
--body-background: var(--black);
--body-background: var(--neutral-900);
--text-primary: var(--white);
--text-secondary: var(--neutral-3);
--text-disabled: var(--neutral-3);
Expand Down
6 changes: 3 additions & 3 deletions src/styles/components/alert.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:root {
--alert-background: #a85122;
--alert-foreground: #fbf6ed;
--alert-background: var(--orange-400);
--alert-foreground: var(--white);
}

.alert {
display: flex;
gap: var(--space-6);
gap: var(--space-8);
align-items: flex-start;

padding: var(--space-6);
Expand Down
12 changes: 6 additions & 6 deletions src/styles/components/avatar.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
:root {
--avatar-background: var(--neutral-1);
--avatar-foreground: var(--neutral-9);
--avatar-border: var(--neutral-2);
--avatar-background: var(--neutral-100);
--avatar-foreground: var(--neutral-600);
--avatar-border: var(--neutral-200);
}

.dark-theme {
--avatar-background: var(--neutral-9);
--avatar-foreground: var(--neutral-1);
--avatar-border: var(--neutral-8);
--avatar-background: var(--neutral-700);
--avatar-foreground: var(--neutral-200);
--avatar-border: var(--neutral-600);
}

.avatar {
Expand Down
6 changes: 3 additions & 3 deletions src/styles/components/box.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
:root {
--box-background: var(--white);
--box-foreground: var(--neutral-7);
--box-foreground: var(--text-secondary);
--box-1-background: var(--neutral-0);
}

.dark-theme {
--box-background: var(--neutral-9);
--box-foreground: var(--neutral-3);
--box-background: var(--neutral-700);
--box-foreground: var(--text-secondary);
--box-1-background: var(--neutral-8);
}

Expand Down
38 changes: 24 additions & 14 deletions src/styles/components/budget.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
:root {
--progress-foreground: rgb(0 0 0 / 60%);
--progress-background: rgb(0 0 0 / 20%);
--budget-additional-list-background: var(--neutral-0);
--budget-additional-list-foreground: var(--neutral-7);
--budget-additional-list-foreground-highlighted: var(--neutral-9);
--progress-background: var(--neutral-100);
--progress-foreground: var(--neutral-500);
--budget-additional-list-background: var(--neutral-50);
--budget-additional-list-foreground: var(--text-secondary);
--budget-additional-list-foreground-highlighted: var(--text-primary);
}

.budget-progress-close {
--progress-background: var(--yellow-50);
--progress-foreground: var(--yellow-200);
}

.budget-progress-overspent {
--progress-background: var(--red-100);
--progress-foreground: var(--red-100);
}

.dark-theme {
--progress-foreground: rgb(255 255 255);
--progress-background: rgb(255 255 255 / 20%);
--budget-additional-list-background: rgb(0 0 0 / 30%);
--budget-additional-list-foreground: var(--neutral-3);
--budget-additional-list-foreground-highlighted: var(--neutral-0);
--budget-additional-list-background: var(--neutral-800);
--budget-additional-list-foreground: var(--text-secondary);
--budget-additional-list-foreground-highlighted: var(--text-primary);
}

.budget-progress-close {
--progress-foreground: rgb(245 195 67);
--progress-background: rgb(245 195 67 / 20%);
.dark-theme .budget-progress-close {
--progress-background: var(--yellow-600);
--progress-foreground: var(--yellow-200);
}

.budget-progress-overspent {
--progress-foreground: rgb(234 51 35);
--progress-background: rgb(234 51 35 / 20%);
.dark-theme .budget-progress-overspent {
--progress-background: var(--red-600);
--progress-foreground: var(--red-600);
}

.budget {
Expand Down
67 changes: 37 additions & 30 deletions src/styles/components/button.css
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
@import "../abstracts/variables.css";

:root {
--button-background: var(--neutral-9);
--button-foreground: var(--white);
--button-background-on-hover: var(--neutral-8);
--button-background-on-disabled: var(--neutral-1);
--button-foreground-on-disabled: var(--neutral-6);
--button-background: var(--neutral-900);
--button-foreground: var(--neutral-25);
--button-background-on-hover: var(--neutral-700);
--button-foreground-on-hover: var(--neutral-25);
--button-background-on-disabled: var(--neutral-100);
--button-foreground-on-disabled: var(--neutral-400);
}

.button-secondary {
--button-background: var(--neutral-1);
--button-foreground: var(--neutral-9);
--button-background-on-hover: var(--neutral-2);
--button-background-on-disabled: var(--neutral-8);
--button-foreground-on-disabled: var(--neutral-2);
--button-background: var(--neutral-100);
--button-foreground: var(--neutral-800);
--button-background-on-hover: var(--neutral-200);
--button-foreground-on-hover: var(--neutral-800);
--button-background-on-disabled: var(--neutral-100);
--button-foreground-on-disabled: var(--neutral-400);
}

.button-danger {
--button-background: #c60000;
--button-foreground: white;
--button-background-on-hover: #d90000;
--button-background-on-disabled: var(--neutral-8);
--button-foreground-on-disabled: var(--neutral-2);
--button-background: var(--red-500);
--button-foreground: var(--neutral-25);
--button-background-on-hover: var(--red-400);
--button-foreground-on-hover: var(--neutral-25);
--button-background-on-disabled: var(--neutral-100);
--button-foreground-on-disabled: var(--neutral-400);
}

.dark-theme {
--button-background: var(--white);
--button-foreground: var(--neutral-9);
--button-background-on-hover: var(--neutral-1);
--button-background-on-disabled: var(--neutral-8);
--button-foreground-on-disabled: var(--neutral-2);
--button-background: var(--neutral-25);
--button-foreground: var(--neutral-900);
--button-background-on-hover: var(--neutral-100);
--button-foreground-on-hover: var(--neutral-900);
--button-background-on-disabled: var(--neutral-600);
--button-foreground-on-disabled: var(--neutral-400);
}

.dark-theme .button-secondary {
--button-background: var(--neutral-8);
--button-foreground: var(--white);
--button-background-on-hover: var(--neutral-7);
--button-background-on-disabled: var(--neutral-1);
--button-foreground-on-disabled: var(--neutral-6);
--button-background: var(--neutral-600);
--button-foreground: var(--neutral-100);
--button-background-on-hover: var(--neutral-500);
--button-foreground-on-hover: var(--neutral-100);
--button-background-on-disabled: var(--neutral-600);
--button-foreground-on-disabled: var(--neutral-400);
}

.dark-theme .button-danger {
--button-background: #700;
--button-foreground: var(--white);
--button-background-on-hover: #9f0000;
--button-background-on-disabled: var(--neutral-1);
--button-foreground-on-disabled: var(--neutral-6);
--button-background: var(--red-500);
--button-foreground: var(--neutral-25);
--button-background-on-hover: var(--red-400);
--button-foreground-on-hover: var(--neutral-25);
--button-background-on-disabled: var(--neutral-600);
--button-foreground-on-disabled: var(--neutral-400);
}

/* Base button will always be a primary one */
Expand Down Expand Up @@ -76,6 +82,7 @@
.button:hover,
.button:active,
.button:focus {
color: var(--button-foreground-on-hover);
background: var(--button-background-on-hover);
}

Expand Down
16 changes: 8 additions & 8 deletions src/styles/components/emoji-circle.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
:root {
--emoji-circle-background: rgb(0 0 0 / 5%);
--emoji-circle-foreground: var(--neutral-3);
--emoji-circle-completed-background: #e9f7e9;
--emoji-circle-completed-foreground: #639863;
--emoji-circle-background: var(--neutral-50);
--emoji-circle-foreground: var(--text-secondary);
--emoji-circle-completed-background: var(--green-25);
--emoji-circle-completed-foreground: var(--green-500);
}

.dark-theme {
--emoji-circle-background: rgb(255 255 255 / 10%);
--emoji-circle-foreground: var(--neutral-6);
--emoji-circle-completed-background: #1d2c1d;
--emoji-circle-completed-foreground: #639863;
--emoji-circle-background: var(--neutral-600);
--emoji-circle-foreground: var(--text-secondary);
--emoji-circle-completed-background: var(--green-600);
--emoji-circle-completed-foreground: var(--green-300);
}

.emoji-circle,
Expand Down
14 changes: 7 additions & 7 deletions src/styles/components/icon-button.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@import "../abstracts/variables.css";

:root {
--icon-button-foreground: var(--neutral-6);
--icon-button-background-on-hover: var(--neutral-0);
--icon-button-foreground-on-hover: var(--neutral-9);
--icon-button-background-on-disabled: var(--neutral-3);
--icon-button-foreground: var(--neutral-500);
--icon-button-background-on-hover: var(--neutral-100);
--icon-button-foreground-on-hover: var(--black);
--icon-button-background-on-disabled: var(--neutral-300);
}

.dark-theme {
--icon-button-foreground: var(--neutral-3);
--icon-button-background-on-hover: var(--neutral-8);
--icon-button-foreground: var(--neutral-300);
--icon-button-background-on-hover: var(--neutral-600);
--icon-button-foreground-on-hover: var(--white);
--icon-button-background-on-disabled: var(--neutral-6);
--icon-button-background-on-disabled: var(--neutral-400);
}

.icon-button {
Expand Down
28 changes: 14 additions & 14 deletions src/styles/components/input.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
@import "../abstracts/variables.css";

:root {
--input-background: var(--white);
--input-foreground: var(--neutral-9);
--input-placeholder: var(--neutral-6);
--input-background-on-disabled: var(--neutral-0);
--input-foreground-on-disabled: var(--neutral-6);
--input-border: var(--neutral-0);
--input-border-on-disabled: var(--neutral-0);
--input-background: var(--neutral-50);
--input-foreground: var(--neutral-800);
--input-placeholder: var(--neutral-400);
--input-background-on-disabled: var(--neutral-100);
--input-foreground-on-disabled: var(--neutral-500);
--input-border: var(--neutral-200);
--input-border-on-disabled: var(--neutral-200);
}

.dark-theme {
--input-background: var(--black);
--input-foreground: var(--white);
--input-placeholder: var(--neutral-4);
--input-background-on-disabled: var(--neutral-9);
--input-foreground-on-disabled: var(--neutral-4);
--input-border: var(--neutral-7);
--input-border-on-disabled: var(--neutral-7);
--input-background: var(--neutral-900);
--input-foreground: var(--neutral-25);
--input-placeholder: var(--neutral-200);
--input-background-on-disabled: var(--neutral-700);
--input-foreground-on-disabled: var(--neutral-400);
--input-border: var(--neutral-600);
--input-border-on-disabled: var(--neutral-600);
}

.input {
Expand Down
Loading