Skip to content
This repository was archived by the owner on Apr 14, 2020. It is now read-only.

Commit 039ef9a

Browse files
committed
feat(focal-conceal-move): renames to focal conceal move from conceal move
1 parent b283d09 commit 039ef9a

9 files changed

Lines changed: 36 additions & 28 deletions

File tree

packages/yubaba/src/FocalTarget/__docs__/docs.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ import FocalTarget from '../index';
1111

1212
Used to explicitly mark the focal element,
1313
only a handful of animations require this component to be used,
14-
for example [ConcealMove](/conceal-move).
14+
for example [FocalConcealMove](/focal-conceal-move).
1515

1616
> **Tip -** See [Moving using a focal target](/advanced-usage#moving-using-a-focal-target) for more information on how to use this component.
1717
1818
## Usage
1919

2020
```js
21-
import { FocalTarget, ConcealMove } from 'yubaba';
21+
import { FocalTarget, FocalConcealMove } from 'yubaba';
2222

2323
const ItemDetails = ({ title, recipients, body, index }) => (
2424
<Baba name={`item-${index}`}>
25-
<ConcealMove>
25+
<FocalConcealMove>
2626
{baba => (
2727
<div {...baba}>
2828
<FocalTarget>
@@ -37,7 +37,7 @@ const ItemDetails = ({ title, recipients, body, index }) => (
3737
{body}
3838
</div>
3939
)}
40-
</ConcealMove>
40+
</FocalConcealMove>
4141
</Baba>
4242
);
4343
```

packages/yubaba/src/__docs__/3-advanced-usage/EmailChain.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
import * as Styled from './styled';
2323
import { WrappedBaba as Baba } from '../../Baba';
2424
import FocalRevealMove from '../../animations/FocalRevealMove';
25-
import ConcealMove from '../../animations/ConcealMove';
25+
import FocalConcealMove from '../../animations/FocalConcealMove';
2626
import FocalTarget from '../../FocalTarget';
2727

2828
const EmailChain = () => {
@@ -68,7 +68,7 @@ const EmailChain = () => {
6868

6969
const screen = (props: any) => (
7070
<Baba name={`card-${props.index}`}>
71-
<ConcealMove>
71+
<FocalConcealMove>
7272
{baba => (
7373
<Styled.Screen
7474
innerRef={baba.ref}
@@ -110,7 +110,7 @@ const EmailChain = () => {
110110
</ListItem>
111111
</Styled.Screen>
112112
)}
113-
</ConcealMove>
113+
</FocalConcealMove>
114114
</Baba>
115115
);
116116

packages/yubaba/src/__docs__/3-advanced-usage/docs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { WrappedBaba as Baba } from '../../Baba';
3030
import { WrappedVisibilityManager as VisibilityManager } from '../../VisibilityManager';
3131
import CircleExpand from '../../animations/CircleExpand';
3232
import FocalRevealMove from '../../animations/FocalRevealMove';
33-
import ConcealMove from '../../animations/ConcealMove';
33+
import FocalConcealMove from '../../animations/FocalConcealMove';
3434
import FocalTarget from '../../FocalTarget';
3535
import Move from '../../animations/Move';
3636
import CircleShrink from '../../animations/CircleShrink';
@@ -211,7 +211,7 @@ used together can produce a really cool transition between states.
211211

212212
At times we want to move all content at once but have it originate from a focal point.
213213
The [FocalTarget](/focal-target) component exists to mark the focal element so animations who care can use it.
214-
Two examples of animations who can use it are [Move](/move), [ConcealMove](/conceal-move).
214+
Two examples of animations who can use it are [Move](/move), [FocalConcealMove](/focal-conceal-move).
215215

216216
<Playground>
217217
<Styled.Center>

packages/yubaba/src/animations/ConcealMove/__docs__/docs.mdx renamed to packages/yubaba/src/animations/FocalConcealMove/__docs__/docs.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
name: ConcealMove
3-
route: /conceal-move
2+
name: FocalConcealMove
3+
route: /focal-conceal-move
44
menu: Focal animations
55
---
66

@@ -20,14 +20,14 @@ import PlayButton from '@material-ui/icons/PlayArrow';
2020
import BackIcon from '@material-ui/icons/ArrowBack';
2121
import MoreVert from '@material-ui/icons/MoreVert';
2222
import { lighten } from 'polished';
23-
import ConcealMove from '../index';
23+
import FocalConcealMove from '../index';
2424
import Noop from '../../Noop';
2525
import Baba from '../../../Baba';
2626
import FocalTarget from '../../../FocalTarget';
2727
import * as Styled from './styled';
2828
import albumArt from './images/foster.jpg';
2929

30-
# ConcealMove
30+
# FocalConcealMove
3131

3232
Useful for transitioning from a child to a parent,
3333
will shrink from the container to the focal element.
@@ -36,15 +36,15 @@ Requires the use of the [FocalTarget](/focal-target) component to specify the fo
3636
## Usage
3737

3838
```js
39-
import Baba, { ConcealMove, FocalTarget } from 'yubaba';
39+
import Baba, { FocalConcealMove, FocalTarget } from 'yubaba';
4040
```
4141

4242
> **Tip -** Click the back button in the album art to conceal it.
4343
4444
<Playground>
4545
{() => {
4646
const revealingImage = ({ albumArt }) => (
47-
<Baba name="conceal-move">
47+
<Baba name="focal-conceal-move">
4848
{({ ref, style }) => (
4949
<Link to="/details">
5050
<Styled.BackgroundImage src={albumArt} style={style} innerRef={ref} />
@@ -73,8 +73,8 @@ import Baba, { ConcealMove, FocalTarget } from 'yubaba';
7373
);
7474

7575
const albumDetails = ({ color, albumArt, name, artist, songs }) => (
76-
<Baba name="conceal-move">
77-
<ConcealMove>
76+
<Baba name="focal-conceal-move">
77+
<FocalConcealMove>
7878
{(baba) => (
7979
<div {...baba}>
8080
<Styled.DetailsRoot color={color}>
@@ -147,7 +147,7 @@ import Baba, { ConcealMove, FocalTarget } from 'yubaba';
147147
</Styled.DetailsRoot>
148148
</div>
149149
)}
150-
</ConcealMove>
150+
</FocalConcealMove>
151151
</Baba>
152152
);
153153

@@ -200,7 +200,7 @@ import Baba, { ConcealMove, FocalTarget } from 'yubaba';
200200

201201
## Props
202202

203-
<PropsTable of={ConcealMove} />
203+
<PropsTable of={FocalConcealMove} />
204204

205205
## Troubleshooting
206206

packages/yubaba/src/animations/ConcealMove/__docs__/images/foster.jpg renamed to packages/yubaba/src/animations/FocalConcealMove/__docs__/images/foster.jpg

File renamed without changes.

packages/yubaba/src/animations/ConcealMove/__docs__/styled.tsx renamed to packages/yubaba/src/animations/FocalConcealMove/__docs__/styled.tsx

File renamed without changes.

packages/yubaba/src/animations/ConcealMove/index.tsx renamed to packages/yubaba/src/animations/FocalConcealMove/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { zIndexStack } from '../../lib/style';
1313
import { dynamic } from '../../lib/duration';
1414
import { Duration } from '../types';
1515

16-
export interface ConcealMoveProps extends CollectorChildrenProps {
16+
export interface FocalConcealMoveProps extends CollectorChildrenProps {
1717
/**
1818
* How long the animation should take over {duration}ms.
1919
*/
@@ -30,7 +30,7 @@ export interface ConcealMoveProps extends CollectorChildrenProps {
3030
timingFunction: string;
3131
}
3232

33-
export default class ConcealMove extends React.Component<ConcealMoveProps> {
33+
export default class FocalConcealMove extends React.Component<FocalConcealMoveProps> {
3434
static defaultProps = {
3535
duration: 'dynamic',
3636
timingFunction: standard(),

packages/yubaba/src/animations/ConcealMove/stories.tsx renamed to packages/yubaba/src/animations/FocalConcealMove/stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import styled from 'styled-components';
44
import { Toggler } from 'yubaba-common';
55
import Baba from '../../Baba';
66
import Target from '../../FocalTarget';
7-
import ConcealMove from './index';
7+
import FocalConcealMove from './index';
88

99
const Container = styled.div`
1010
margin: 100px auto;
@@ -76,7 +76,7 @@ const build = (width: number, height: number, orientation: Orientation) => (
7676
{({ shown, toggle }) => (
7777
<React.Fragment>
7878
{shown && (
79-
<Baba name={`conceal-move-${orientation}`}>
79+
<Baba name={`focal-conceal-move-${orientation}`}>
8080
{baba => (
8181
<ListItem
8282
onClick={() => toggle()}
@@ -91,8 +91,8 @@ const build = (width: number, height: number, orientation: Orientation) => (
9191
)}
9292

9393
{shown || (
94-
<Baba name={`conceal-move-${orientation}`}>
95-
<ConcealMove>
94+
<Baba name={`focal-conceal-move-${orientation}`}>
95+
<FocalConcealMove>
9696
{baba => (
9797
// We use a wrapper div here because the child centers it's children via flexbox.
9898
// Since it centers it with flexbox when we transition it around our assumptions change
@@ -112,15 +112,15 @@ const build = (width: number, height: number, orientation: Orientation) => (
112112
</TallListItem>
113113
</div>
114114
)}
115-
</ConcealMove>
115+
</FocalConcealMove>
116116
</Baba>
117117
)}
118118
</React.Fragment>
119119
)}
120120
</Toggler>
121121
);
122122

123-
storiesOf('yubaba/ConcealMove', module)
123+
storiesOf('yubaba/FocalConcealMove', module)
124124
.addDecorator(story => <Container>{story()}</Container>)
125125
.add('TargetHeight', () => build(200, 200, 'vertical'))
126126
.add('TargetWidth', () => build(200, 200, 'horizontal'))

packages/yubaba/src/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
export { WrappedBaba as default } from './Baba';
22

3+
/**
4+
* Nexst major version TODO
5+
* - Remove FocalMove
6+
* - Remove ConcealMove
7+
* - Remove BabaManager
8+
*/
9+
310
export { default as Wait } from './Wait';
411
export { default as Noop } from './animations/Noop';
512
export { default as CrossFadeMove } from './animations/CrossFadeMove';
@@ -10,7 +17,8 @@ export { default as CircleExpand } from './animations/CircleExpand';
1017
export { default as CircleShrink } from './animations/CircleShrink';
1118
export { default as FocalReveal } from './animations/FocalReveal';
1219
export { default as RevealMove, default as FocalRevealMove } from './animations/FocalRevealMove';
13-
export { default as ConcealMove } from './animations/ConcealMove';
20+
export { default as FocalConcealMove, default as ConcealMove } from './animations/FocalConcealMove';
21+
export { default as FocalFocalConcealMove } from './animations/FocalConcealMove';
1422
export { default as ReshapingContainer } from './animations/ReshapingContainer';
1523
export { default as RevealReshapingContainer } from './animations/RevealReshapingContainer';
1624
export { default as Reveal } from './animations/Reveal';

0 commit comments

Comments
 (0)