-
Notifications
You must be signed in to change notification settings - Fork 2
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
style: update loader tokens to pine #2056
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,14 @@ | |
/// @group sage | ||
//// | ||
|
||
$-loader-bar-bg-color: sage-color(grey, 500); | ||
$-loader-bar-height: rem(6px); | ||
$-loader-bar-bg-color: var(--pine-color-neutral); | ||
$-loader-bar-height: calc(var(--pine-dimension-2xs) * 1.5); // 4px * 1.5 = 6px | ||
$-loader-bar-speed: 1.2s; | ||
$-loader-bar-speed-delay: 0.5s; | ||
$-loader-bar-width: rem(300px); | ||
$-loader-spinner-size: rem(48px); | ||
$-loader-bar-width: calc(var(--pine-dimension-2xl) * 6.25); // 48px * 6.25 = 300px | ||
$-loader-spinner-size: var(--pine-dimension-2xl); | ||
$-loader-spinner-speed: 1.5s; | ||
$-loader-typing-size: rem(6px); | ||
$-loader-typing-size: calc(var(--pine-dimension-2xs) * 1.5); // 4px * 1.5 = 6px | ||
$-loader-lower-opacity: 0.4; | ||
|
||
.sage-loader { | ||
|
@@ -53,7 +53,7 @@ $-loader-lower-opacity: 0.4; | |
width: 100%; | ||
max-width: $-loader-bar-width; | ||
height: $-loader-bar-height; | ||
border-radius: sage-border(radius); | ||
border-radius: var(--pine-dimension-xs); | ||
background-color: $-loader-bar-bg-color; | ||
|
||
[dir="rtl"] & { | ||
|
@@ -65,41 +65,41 @@ $-loader-lower-opacity: 0.4; | |
&::before, | ||
&::after { | ||
content: ""; | ||
z-index: sage-z-index(default, 2); | ||
z-index: calc(var(--pine-dimension-none) + 2); // 0 + 2 = 2 | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 0; | ||
height: $-loader-bar-height; | ||
border-radius: sage-border(radius); | ||
border-radius: var(--pine-dimension-xs); | ||
} | ||
|
||
&::before { | ||
background-color: sage-color(primary, 300); | ||
background-color: var(--pine-color-accent); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. verified with design that this should become accent since primary does not exist as a pine semantic token |
||
animation: loader-bar $-loader-bar-speed linear infinite; | ||
} | ||
|
||
&::after { | ||
background-color: sage-color(primary, 300); | ||
background-color: var(--pine-color-accent); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. verified with design that this should become accent since primary does not exist as a pine semantic token |
||
animation: loader-bar $-loader-bar-speed $-loader-bar-speed-delay linear | ||
infinite; | ||
} | ||
} | ||
|
||
.sage-loader__spinner { | ||
width: sage-spacing(xl); | ||
height: sage-spacing(xl); | ||
width: var(--pine-dimension-2xl); | ||
height: var(--pine-dimension-2xl); | ||
animation: loader-rotate $-loader-spinner-speed linear infinite; | ||
} | ||
|
||
.sage-loader__spinner--loading-button { | ||
width: sage-spacing(sm); | ||
height: sage-spacing(sm); | ||
margin-inline-end: sage-spacing(xs); | ||
width: var(--pine-dimension-sm); | ||
height: var(--pine-dimension-sm); | ||
margin-inline-end: var(--pine-dimension-xs); | ||
} | ||
|
||
.sage-loader__spinner-path { | ||
stroke-width: 8px; | ||
stroke-width: var(--pine-dimension-xs); | ||
} | ||
|
||
.sage-loader__spinner-secondHalf { | ||
|
@@ -120,26 +120,26 @@ $-loader-lower-opacity: 0.4; | |
} | ||
|
||
.sage-loader__success { | ||
width: sage-spacing(xl); | ||
height: sage-spacing(xl); | ||
width: var(--pine-dimension-2xl); | ||
height: var(--pine-dimension-2xl); | ||
} | ||
|
||
.sage-loader__success-path { | ||
stroke-dasharray: 150, 200; | ||
stroke-linecap: round; | ||
stroke: sage-color(sage, 300); | ||
stroke: var(--pine-color-success-hover); | ||
} | ||
|
||
.sage-loader__success-check { | ||
transform: translate(76%, 84%); | ||
stroke-linecap: round; | ||
stroke-linejoin: round; | ||
stroke-miterlimit: 10; | ||
stroke: sage-color(sage, 300); | ||
stroke: var(--pine-color-success-hover) | ||
} | ||
|
||
.sage-loader__text { | ||
margin-block-start: sage-spacing(sm); | ||
margin-block-start: var(--pine-dimension-sm); | ||
} | ||
|
||
@keyframes loader-bar { | ||
|
@@ -173,20 +173,20 @@ $-loader-lower-opacity: 0.4; | |
.sage-loader__typing { | ||
display: flex; | ||
align-items: center; | ||
gap: sage-spacing(2xs); | ||
gap: var(--pine-dimension-2xs); | ||
position: relative; | ||
margin: 0 auto; | ||
padding: rem(15px) rem(20px); | ||
background-color: sage-color(grey, 150); | ||
padding: calc(var(--pine-dimension-xs) * 1.875) calc(var(--pine-dimension-xs) * 2.5); // 8px * 1.875 = 15px, 8px * 2.5 = 20px | ||
background-color: var(--pine-color-background-container-disabled); | ||
will-change: transform; | ||
border-radius: sage-border(radius-large); | ||
box-shadow: sage-shadow(sm); | ||
border-radius: var(--pine-dimension-sm); | ||
box-shadow: var(--pine-box-shadow); | ||
|
||
span { | ||
height: $-loader-typing-size; | ||
width: $-loader-typing-size; | ||
background-color: sage-color(grey, 500); | ||
border-radius: sage-border(radius-round); | ||
background-color: var(--pine-color-neutral); | ||
border-radius: var(--pine-border-radius-full); | ||
opacity: $-loader-lower-opacity; | ||
|
||
@for $i from 1 through 3 { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ export const Loader = ({ | |
</svg> | ||
)} | ||
{(type === LOADER_TYPES.SUCCESS) && ( | ||
<svg className="sage-loader__success" width="48" height="48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="21" fill="#0072EF" /><path fillRule="evenodd" clipRule="evenodd" d="M34.707 17.293a1 1 0 0 1 0 1.414l-13 13a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 1.414-1.414L21 29.586l12.293-12.293a1 1 0 0 1 1.414 0Z" fill="#fff" /></svg> | ||
<svg className="sage-loader__success" width="48" height="48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="21" fill="#6b62f2" /><path fillRule="evenodd" clipRule="evenodd" d="M34.707 17.293a1 1 0 0 1 0 1.414l-13 13a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 1.414-1.414L21 29.586l12.293-12.293a1 1 0 0 1 1.414 0Z" fill="#fff" /></svg> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. verified with design that this should become accent color in sage. there is no equivalent in pine. |
||
)} | ||
{(type === LOADER_TYPES.TYPING) && ( | ||
<div className="sage-loader__typing"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verified with design that this should become accent color in sage. there is no equivalent in pine.