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
1 change: 1 addition & 0 deletions components/atom/button/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const CLASS = 'sui-AtomButton'
export const DESIGNS = {
SOLID: 'solid',
OUTLINE: 'outline',
OUTLINE_ANIMATED: 'outline-animated',
FLAT: 'flat',
LINK: 'link'
}
Expand Down
25 changes: 23 additions & 2 deletions components/atom/button/src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $base-class: '.sui-AtomButton';
position: absolute;
}

&#{$base-class}--link:not(#{$base-class}--solid):not(#{$base-class}--outline):not(#{$base-class}--flat) {
&#{$base-class}--link:not(#{$base-class}--solid):not(#{$base-class}--outline):not(#{$base-class}--outline-animated):not(#{$base-class}--flat) {
background: transparent;
user-select: text;
border: none;
Expand Down Expand Up @@ -119,6 +119,7 @@ $base-class: '.sui-AtomButton';
}

&#{$base-class}--outline,
&#{$base-class}--outline-animated,
&#{$base-class}--flat {
$bgc-atom-button-focused: color-variation($color, 4) !default;
$bgc-atom-button-focused-invert: color-variation($color, -1) !default;
Expand Down Expand Up @@ -150,7 +151,7 @@ $base-class: '.sui-AtomButton';
}
}

&#{$base-class}--link:not(#{$base-class}--solid):not(#{$base-class}--outline):not(#{$base-class}--flat) {
&#{$base-class}--link:not(#{$base-class}--solid):not(#{$base-class}--outline):not(#{$base-class}--outline-animated):not(#{$base-class}--flat) {
$c-atom-button-focused: color-variation($color, -1) !default;
$c-atom-button-link-focused: $c-atom-button-focused !default;
$c-atom-button-focused-invert: color-variation($color-invert, -1) !default;
Expand All @@ -171,7 +172,27 @@ $base-class: '.sui-AtomButton';
}
}

&--outline-animated {
border: 0;

&::before {
content: '';
inset: 0;
position: absolute;
border-radius: inherit;
padding: $p-xs;
background: $bg-atom-button-design-outline-animated;
mask: $msk-atom-button-design-outline-animated;
mask-composite: exclude;

// TODO Test animation proposal. Should be added to variables if accepted.
background-size: 300% 300%;
animation: flow 4s ease-in-out infinite;
}
}

&--outline,
&--outline-animated,
&--negative {
background: none;
}
Expand Down
22 changes: 22 additions & 0 deletions components/atom/button/src/styles/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ $bgc-atom-button: $c-primary !default;
$bgc-atom-button-light: color-variation($bgc-atom-button, 4) !default;
$bgc-atom-button-dark: color-variation($bgc-atom-button, -1) !default;
$bgc-atom-button-light-contrast: color-variation($bgc-atom-button, 3) !default;
$bg-atom-button-design-outline-animated: linear-gradient(
180deg,
color-variation($bgc-atom-button, -1),
color-variation($bgc-atom-button, -2)
) !default;
$msk-atom-button-design-outline-animated: linear-gradient($c-white 0 0) content-box, linear-gradient($c-white 0 0) !default;
$bdrs-atom-button-design-outline-animated: 999px !default;

$sz-atom-button-small: $p-base * 4 !default;
$fz-atom-button-small: $fz-s !default;
Expand Down Expand Up @@ -152,3 +159,18 @@ $td-atom-button-link: none !default;
@mixin button-circular($size) {
border-radius: #{$size * 0.5};
}

@keyframes flow {
0% {
background-position: 0% 0%;
filter: hue-rotate(0deg);
}
50% {
background-position: 200% 100%;
filter: hue-rotate(30deg);
}
100% {
background-position: 0% 0%;
filter: hue-rotate(0deg);
}
}
3 changes: 2 additions & 1 deletion components/atom/button/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,14 @@ describe(json.name, () => {
const expected = {
SOLID: 'solid',
OUTLINE: 'outline',
OUTLINE_ANIMATED: 'outline-animated',
FLAT: 'flat',
LINK: 'link'
}

// When
const {atomButtonDesigns: actual} = library
const {SOLID, OUTLINE, FLAT, LINK, ...others} = actual
const {SOLID, OUTLINE, OUTLINE_ANIMATED, FLAT, LINK, ...others} = actual

// Then
expect(Object.keys(others).length).to.equal(0)
Expand Down
3 changes: 2 additions & 1 deletion components/molecule/buttonGroup/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,14 @@ describe(json.name, () => {
const expected = {
SOLID: 'solid',
OUTLINE: 'outline',
OUTLINE_ANIMATED: 'outline-animated',
FLAT: 'flat',
LINK: 'link'
}

// When
const {moleculeButtonGroupDesigns: actual} = library
const {SOLID, OUTLINE, FLAT, LINK, ...others} = actual
const {SOLID, OUTLINE, FLAT, LINK, OUTLINE_ANIMATED, ...others} = actual

// Then
expect(Object.keys(others).length).to.equal(0)
Expand Down
3 changes: 2 additions & 1 deletion components/molecule/pagination/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,14 @@ describe(json.name, () => {
const expected = {
SOLID: 'solid',
OUTLINE: 'outline',
OUTLINE_ANIMATED: 'outline-animated',
FLAT: 'flat',
LINK: 'link'
}

// When
const {moleculePaginationDesigns: actual} = library
const {SOLID, OUTLINE, FLAT, LINK, ...others} = actual
const {SOLID, OUTLINE, FLAT, LINK, OUTLINE_ANIMATED, ...others} = actual

// Then
expect(Object.keys(others).length).to.equal(0)
Expand Down
Loading