Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
eab1a99
feat(button): adding animation to button, fixing focus and borders
notandrew Jul 26, 2019
386dc58
reverting non-animation changes to be used in another PR
notandrew Jul 29, 2019
6cf961e
updating sitevars
notandrew Jul 29, 2019
2a56177
Merge branch 'master' into feat/button-animation
notandrew Jul 29, 2019
65d6677
Merge branch 'master' into feat/button-animation
notandrew Jul 30, 2019
2704dc9
updating changelog
notandrew Jul 30, 2019
cabf059
Merge branch 'master' into feat/button-animation
alinais Jul 31, 2019
590b14f
Merge branch 'master' into feat/button-animation
alinais Aug 6, 2019
d6d5c40
Update CHANGELOG.md
alinais Aug 12, 2019
2ac1696
Update CHANGELOG.md
alinais Aug 12, 2019
404e76c
Merge branch 'master' into feat/button-animation
notandrew Aug 13, 2019
973bb34
fixing merge
notandrew Aug 13, 2019
5035914
updating the scale
notandrew Aug 13, 2019
847534a
merge
notandrew Aug 21, 2019
c07f06f
reducing time on button animation
notandrew Aug 21, 2019
a694811
Merge branch 'master' into feat/button-animation
notandrew Sep 12, 2019
c7669e2
updating changelog
notandrew Sep 12, 2019
1eef057
adding translateZ value
notandrew Sep 13, 2019
e0fe8f5
Merge branch 'master' into feat/button-animation
notandrew Sep 13, 2019
82b2da5
adding animation helper (but needs more work)
notandrew Sep 19, 2019
c9dd938
Merge branch 'master' into feat/button-animation
notandrew Sep 19, 2019
4217d00
Merge branch 'feat/button-animation' of https://github.com/stardust-u…
notandrew Sep 19, 2019
3ddcf0b
Merge branch 'master' into feat/button-animation
notandrew Sep 20, 2019
7433f50
updating animation
notandrew Sep 23, 2019
0fd858f
Merge branch 'master' into feat/button-animation
notandrew Sep 23, 2019
2ddb96c
updating animation
notandrew Sep 23, 2019
34ce3e1
updating scale name
notandrew Sep 23, 2019
8dba45b
Merge branch 'master' into feat/button-animation
notandrew Sep 24, 2019
6ee2b00
Merge branch 'master' into feat/button-animation
notandrew Sep 24, 2019
cee0db2
updating changelog
notandrew Sep 24, 2019
fcf928a
removing extra property
notandrew Sep 25, 2019
e25d037
disabling disabled buttons from animating
notandrew Sep 25, 2019
70fea42
fixing merge
notandrew Sep 25, 2019
393e7c1
removing bad merge artifact
notandrew Sep 26, 2019
f133aab
Merge branch 'master' into feat/button-animation
notandrew Oct 10, 2019
3c8a5b7
Merge branch 'master' into feat/button-animation
notandrew Oct 11, 2019
8903439
Merge branch 'master' into feat/button-animation
notandrew Oct 16, 2019
a22e2ea
Merge branch 'master' into feat/button-animation
notandrew Oct 24, 2019
416517d
updating the changelog
notandrew Oct 24, 2019
1480c23
Merge branch 'master' into feat/button-animation
notandrew Oct 25, 2019
e4ad0c4
fixing merge
notandrew Oct 29, 2019
be28201
updating changelog
notandrew Oct 30, 2019
d683ecf
fixing primary buttons
notandrew Oct 30, 2019
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

### Features
- Add bounce animation to button clicks in Teams theme @notandrew ([#1724](https://github.com/stardust-ui/react/pull/1724))

<!--------------------------------[ v0.40.2 ]------------------------------- -->
## [v0.40.2](https://github.com/stardust-ui/react/tree/v0.40.2) (2019-10-30)
[Compare changes](https://github.com/stardust-ui/react/compare/v0.40.1...v0.40.2)
Expand Down
14 changes: 14 additions & 0 deletions packages/react/src/themes/teams/animations/scale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ const scaleAnimations = {
timingFunction: easeIn,
fillMode: 'forwards',
},
scaleDownSoft: {
keyframe: {
'0%': {
transform: 'scale(1)',
},
'100%': {
transform: 'scale(.96)',
},
},
duration: '100ms',
timingFunction: 'cubic-bezier(.78, 0, .22, 1)',
fillMode: 'both',
},

// Bounce in w/ fade --Useful for explicity grabbing the users attention.
bounceEnterFast: {
keyframe: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as _ from 'lodash'
import { pxToRem } from '../../../../lib'
import { pxToRem, createAnimationStyles } from '../../../../lib'
import { ComponentSlotStylesPrepared, ICSSInJSStyle } from '../../../types'
import Loader from '../../../../components/Loader/Loader'
import { ButtonProps } from '../../../../components/Button/Button'
Expand All @@ -8,7 +8,8 @@ import getBorderFocusStyles from '../../getBorderFocusStyles'
import getIconFillOrOutlineStyles from '../../getIconFillOrOutlineStyles'

const buttonStyles: ComponentSlotStylesPrepared<ButtonProps, ButtonVariables> = {
root: ({ props: p, variables: v, theme: { siteVariables } }): ICSSInJSStyle => {
root: ({ props: p, variables: v, theme }): ICSSInJSStyle => {
const { siteVariables } = theme
const { borderWidth } = siteVariables

const borderFocusStyles = getBorderFocusStyles({
Expand Down Expand Up @@ -55,6 +56,7 @@ const buttonStyles: ComponentSlotStylesPrepared<ButtonProps, ButtonVariables> =
},

':active': {
...createAnimationStyles('scaleDownSoft', theme),
color: v.colorActive,
backgroundColor: v.backgroundColorActive,
borderColor: v.borderColorActive,
Expand Down Expand Up @@ -131,6 +133,7 @@ const buttonStyles: ComponentSlotStylesPrepared<ButtonProps, ButtonVariables> =
boxShadow: v.primaryBoxShadow,

':active': {
...createAnimationStyles('scaleDownSoft', theme),
backgroundColor: v.primaryBackgroundColorActive,
boxShadow: 'none',
},
Expand All @@ -154,6 +157,7 @@ const buttonStyles: ComponentSlotStylesPrepared<ButtonProps, ButtonVariables> =
cursor: 'default',
color: v.colorDisabled,
boxShadow: 'none',
pointerEvents: 'none',
':hover': {
color: v.colorDisabled,
},
Expand Down