Skip to content

Commit

Permalink
feat: dev components
Browse files Browse the repository at this point in the history
  • Loading branch information
tblivet committed Aug 12, 2024
1 parent fcc39d9 commit d49a24b
Show file tree
Hide file tree
Showing 26 changed files with 847 additions and 164 deletions.
2 changes: 1 addition & 1 deletion css/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/styles.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions img/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/unfold_more.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/warning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions scss/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* Animations */
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
9 changes: 9 additions & 0 deletions scss/components/_alert.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@use "../variables" as *;

$e: ".alert";

#{$ua-prefix} {
#{$e} {
margin-block-end: 0;
}
}
11 changes: 1 addition & 10 deletions scss/components/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ $e: ".badge";

#{$ua-prefix} {
#{$e} {
--ua-badge-color: #1D1D1B;
--ua-badge-background-color: #D1DCFC;
all: unset;
padding: 0.125rem 0.5rem;
background-color: var(--ua-badge-background-color);
border-radius: 2rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--ua-badge-color);
line-height: 1.4;

}
}
87 changes: 87 additions & 0 deletions scss/components/_check-requirements.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
@use "../mixins" as *;
@use "../variables" as *;

$e: ".check-requirements";

#{$ua-prefix} {
#{$e} {
--ua-requirements-background-color: #f7f7f7;
--ua-requirements-loader-color: #1d1d1b;
--ua-requirements-loader-dot-color: #5C92AA;
background-color: var(--ua-requirements-background-color);
padding: 1rem;
margin-block-start: 0.5rem;

&__loader {
position: relative;
text-align: center;
width: 1.625rem;
height: 1.625rem;
margin-inline: auto;
margin-block-end: 1rem;
background:
linear-gradient(
var(--ua-requirements-background-color),
var(--ua-requirements-background-color)
)
padding-box,
conic-gradient(from 0, transparent, #78c4d8) border-box;
border-radius: 50em;
border: 0.1875rem solid transparent;
animation: rotate 1.5s linear infinite;

&:before {
content: "";
display: block;
width: 0.1875rem;
height: 0.1875rem;
background: #5C92AA;
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, -100%);
border-radius: 50%;
}
}

&__loader-title {
text-align: center;
font-size: 0.875rem;
line-height: 1.4;
font-weight: 700;
color: var(--ua-requirements-loader-color);
}

&__message {
margin-block-end: 1rem;
}

&__list {
margin-block-end: 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}

&__requirement {
font-size: 0.875rem;
line-height: 1.4;
padding-inline-start: 2rem;
background-size: 1.5rem 1.5rem;
background-position: left center;
background-repeat: no-repeat;

&--nok {
background-image: url("../img/close.svg");
}

&--warning {
background-image: url("../img/warning.svg");
}

&--ok {
background-image: url("../img/check.svg");
}
}
}
}
7 changes: 5 additions & 2 deletions scss/components/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@use "alert";
@use "badge";
@use "radio";
@use "radio-block";
@use "check-requirements";
@use "form";
@use "radio-card";
@use "typography";
Loading

0 comments on commit d49a24b

Please sign in to comment.