Skip to content
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
Binary file modified __snapshots__/alert--with-body-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/alert--with-body-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/alert--with-body-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/alert--without-body-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/alert--without-body-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/alert--without-body-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/button--button-groups-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/button--button-groups-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/button--button-groups-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/button--buttons-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/button--buttons-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/button--buttons-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/card--test-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/card--test-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/card--test-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/dropdown--dropdowns-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/dropdown--dropdowns-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/dropdown--dropdowns-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/input--disabled-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/input--disabled-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/input--disabled-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/input--mail-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/input--mail-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/input--mail-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/input--not-valid-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/input--not-valid-firefox.png
Binary file modified __snapshots__/input--not-valid-webkit.png
19 changes: 6 additions & 13 deletions src/components/alert/Alert.style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@

padding: .5rem;
margin-bottom: 1rem;
min-height: 1.5rem;


&__heading {
font-weight: 500;
}

&__header {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
Expand All @@ -30,24 +27,20 @@
}

&__icon {
@include box(false);
display: flex;
justify-content: center;
align-items: center;
text-align: center;
padding: .25rem;
color: color($white);
width: 1.25rem;
height: 1.25rem;
margin-right: .5rem;

> * {
width: 1rem;
height: 1rem;
width: 1.25rem;
height: 1.25rem;
}
}

&__dismissible {
@include box();

display: flex;
width: 1rem;
height: 1rem;
padding: .25rem;
Expand All @@ -67,7 +60,7 @@
@include box(false, $color);

.alert__icon {
@include box(false, $color);
color: color($color);
}

.alert__content {
Expand Down
19 changes: 7 additions & 12 deletions src/components/button/Button.style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
margin-bottom: 1rem;
width: fit-content;

&--disabled {
opacity: 50%;
pointer-events: none;
}
@include disabled;

&__icon + &__content {
margin-left: .5rem;
Expand All @@ -22,19 +19,17 @@
}

&__icon {
@include box(false);

display: inline-flex;
justify-content: center;
align-items: center;
width: 1rem;
height: 1rem;
padding: .25rem;
width: 1.25rem;
height: 1.25rem;
color: color($white);
cursor: pointer;

> * {
width: 1rem;
height: 1rem;
width: 1.25rem;
height: 1.25rem;
}
}
}
Expand All @@ -44,7 +39,7 @@
@include box(true, $color);

.button__icon {
@include box(false, $color);
color: color($color);
}

}
Expand Down
4 changes: 2 additions & 2 deletions src/components/card/Card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export const Test = () => {
</ListGroup>
<CardFooter>
<ButtonGroup>
<Button>
<Button variant={"secondary"}>
Button
</Button>
<Button>
<Button variant={"secondary"}>
Button
</Button>
</ButtonGroup>
Expand Down
4 changes: 1 addition & 3 deletions src/components/dropdown/Dropdown.style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@
border-top: 1px solid borderColor();
border-bottom: 1px solid borderColor();

@include hoverAndActiveContent {
background: rgba($color, .1);
}
@include background($color, true);

&:first-of-type {
border-top: none;
Expand Down
40 changes: 5 additions & 35 deletions src/components/input/Input.style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
margin-bottom: 0;
}

&--disabled {
pointer-events: none;
opacity: 50%;
}
@include disabled;

&__control {
display: flex;
Expand Down Expand Up @@ -48,21 +45,18 @@
}

&__icon {
@include box(false);

display: flex;
width: 1rem;
height: auto;
width: 1.25rem;
height: 1.25rem;
justify-content: center;
align-items: center;
aspect-ratio: 50/50;
padding: .25rem;
margin-left: .5rem;
pointer-events: none;

> * {
width: 1rem;
height: 1rem;
width: 1.25rem;
height: 1.25rem;
}

}
Expand Down Expand Up @@ -110,18 +104,6 @@

&--not-valid {

.input__control {
border-color: borderColor(false);

@include hoverAndActiveContent {
border-color: borderColor(true);
}

@include activeContent {
outline-color: $error;
}
}

.input__message {
display: block;
background: rgba($error, .1);
Expand All @@ -131,18 +113,6 @@

&--valid {

.input__control {
border-color: borderColor(false);

@include hoverAndActiveContent {
border-color: borderColor(true);
}

@include activeContent {
outline-color: $success;
}
}

.input__message {
display: block;
background: rgba($success, .1);
Expand Down
53 changes: 40 additions & 13 deletions src/styles/_helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,17 @@

@mixin box($active: true, $color: $secondary) {

background: rgba($color, 10%);
background: mix($bodyBg, $color, 90%);
@include border($active);
border-radius: $borderRadius;
color: rgba($white, .5);
font-family: Ubuntu, sans-serif;
font-size: $secondaryFontSize;
-webkit-backdrop-filter: blur($borderRadius * 2);
backdrop-filter: blur($borderRadius * 2);
border: 1px solid borderColor();
position: relative;

@if ($active == true) {
@include hoverAndActiveContent {
border: 1px solid borderColor(true);
}

@include activeContent {
outline: 1px solid $info;
outline-offset: 2px;
background: mix($bodyBg, if($color == $primary, $white, $color), if($color == $primary, 95%, 85%));
}
}
}
Expand All @@ -32,11 +25,45 @@
}

@mixin activeContent() {
&--active {
&:active, &--active {
@content
}
}

@function borderColor($hover: false) {
@return rgba($white, if($hover, 0.2, 0.1))
@function borderColor($interacted: false) {
@return rgba($white, if($interacted, .2, .1))
}

@mixin border($interact: true) {

border: 1px solid borderColor();

@if ($interact) {
&:active, &--active {
border: 1px solid borderColor(true);
}
}
}

@function color($color, $opacity: 0.5) {
@return rgba(if($color == $primary, $white, $color), $opacity)
}

@mixin background($color: $primary, $interact: true) {
background: mix($bodyBg, $color, 90%);

@if ($interact == true) {
&:hover, &:active, &--active {
background: mix($bodyBg, if($color == $primary, $white, $color), if($color == $primary, 95%, 85%));
}
}
}

@mixin disabled {

&--disabled {
opacity: 50%;
pointer-events: none;
}

}