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

Commit c29a088

Browse files
authored
Merge pull request #110 from madou/docz-1
chore: updates docz to v1, cleans up deps
2 parents 3e9766f + 8922c74 commit c29a088

43 files changed

Lines changed: 3513 additions & 2376 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doczrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ module.exports = {
66
typescript: true,
77
dest: '/docs',
88
codeSandbox: false,
9+
notUseSpecifiers: true,
10+
filterComponents: files => files.filter(filepath => /([^d]\.tsx?)$/.test(filepath)),
911
themeConfig: {
1012
colors: {
1113
primary: '#468cee',

package.json

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,14 @@
2828
"devDependencies": {
2929
"@types/enzyme": "^3.1.13",
3030
"@types/jest": "^23.3.2",
31-
"@types/react": "^16.4.13",
31+
"@types/react": "^16.8.17",
3232
"@types/react-body-classname": "^1.1.5",
33-
"@types/react-dom": "^16.0.7",
33+
"@types/react-dom": "^16.8.4",
3434
"@types/react-router-dom": "^4.3.1",
35-
"@types/sinon": "^5.0.2",
36-
"@types/storybook-addon-jsx": "^5.3.1",
37-
"@types/storybook__addon-links": "^3.3.2",
38-
"@types/storybook__addon-notes": "^3.3.3",
3935
"@types/storybook__react": "^3.0.9",
40-
"babel-core": "^6.26.3",
41-
"css-loader": "^1.0.0",
42-
"docz": "^0.13.7",
43-
"docz-theme-default": "^0.13.7",
36+
"@types/styled-components": "^4.1.14",
37+
"docz": "^1.2.0",
38+
"docz-theme-default": "^1.2.0",
4439
"enzyme": "^3.6.0",
4540
"enzyme-adapter-react-16": "^1.5.0",
4641
"enzyme-matchers": "^6.0.4",
@@ -55,18 +50,10 @@
5550
"jest": "^23.5.0",
5651
"jest-enzyme": "^6.0.4",
5752
"lerna": "^3.3.0",
58-
"sinon": "^6.2.0",
59-
"storybook-addon-jsx": "^5.4.0",
6053
"ts-jest": "^23.1.4",
6154
"ts-loader": "^5.0.0",
62-
"tslint-config-airbnb": "^5.11.0",
63-
"tslint-react": "^3.6.0",
6455
"typescript": "^3.1.1",
65-
"typescript-eslint-parser": "^18.0.0",
66-
"webpack": "^4.17.2",
67-
"webpack-dev-server": "^3.1.8",
68-
"webpack-merge": "^4.1.4",
69-
"yarn-tools": "^0.4.1"
56+
"typescript-eslint-parser": "^18.0.0"
7057
},
7158
"resolutions": {
7259
"ansi-styles": "^3.2.0"

packages/yubaba-common/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
"build": "rm -rf dist && tsc -p ./tsconfig.json"
1212
},
1313
"dependencies": {
14-
"@material-ui/core": "^3.1.0",
14+
"@material-ui/core": "^3.9.3",
1515
"@material-ui/icons": "^3.0.2"
1616
},
1717
"peerDependencies": {
1818
"react": "^16.4.x",
1919
"react-dom": "^16.4.x",
20-
"styled-components": "^3.4.5"
20+
"styled-components": "^4.2.0"
2121
}
2222
}

packages/yubaba-common/src/Toggler.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface State {
1818
export default class Toggler extends React.Component<Props, State> {
1919
static defaultProps = {
2020
interval: false,
21-
intervalMs: 2000,
21+
intervalMs: 1500,
2222
onIntervalSet: () => {},
2323
};
2424

packages/yubaba-common/src/createMoveExamples/index.tsx

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
1616
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
1717
<Animation>
1818
{({ ref, ...props }) => (
19-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
19+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
2020
)}
2121
</Animation>
2222
</Baba>
@@ -25,7 +25,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
2525
<Animation>
2626
{({ ref, ...props }) => (
2727
<Styled.ListItemFloatingRight
28-
innerRef={ref}
28+
ref={ref}
2929
onClick={() => toggle()}
3030
alternate={options.useDistinctEnd}
3131
{...props}
@@ -48,7 +48,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
4848
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
4949
<Animation>
5050
{({ ref, ...props }) => (
51-
<Styled.RelativeListItem innerRef={ref} onClick={() => toggle()} {...props} />
51+
<Styled.RelativeListItem ref={ref} onClick={() => toggle()} {...props} />
5252
)}
5353
</Animation>
5454
</Baba>
@@ -57,7 +57,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
5757
<Animation>
5858
{({ ref, ...props }) => (
5959
<Styled.AbsoluteListItem
60-
innerRef={ref}
60+
ref={ref}
6161
onClick={() => toggle()}
6262
alternate={options.useDistinctEnd}
6363
{...props}
@@ -81,7 +81,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
8181
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
8282
<Animation>
8383
{({ ref, ...props }) => (
84-
<Styled.RelativeListItem innerRef={ref} onClick={() => toggle()} {...props} />
84+
<Styled.RelativeListItem ref={ref} onClick={() => toggle()} {...props} />
8585
)}
8686
</Animation>
8787
</Baba>
@@ -90,7 +90,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
9090
<Animation>
9191
{({ ref, ...props }) => (
9292
<Styled.FixedListItem
93-
innerRef={ref}
93+
ref={ref}
9494
onClick={() => toggle()}
9595
alternate={options.useDistinctEnd}
9696
{...props}
@@ -113,7 +113,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
113113
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
114114
<Animation>
115115
{({ ref, ...props }) => (
116-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
116+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
117117
)}
118118
</Animation>
119119
</Baba>
@@ -123,7 +123,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
123123
{({ ref, ...props }) => (
124124
<Styled.ListItemFloatingRight
125125
margin={100}
126-
innerRef={ref}
126+
ref={ref}
127127
onClick={() => toggle()}
128128
alternate={options.useDistinctEnd}
129129
{...props}
@@ -145,7 +145,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
145145
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
146146
<Animation>
147147
{({ ref, ...props }) => (
148-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
148+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
149149
)}
150150
</Animation>
151151
</Baba>
@@ -155,7 +155,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
155155
{({ ref, ...props }) => (
156156
<Styled.ListItemFloatingRight
157157
size={2}
158-
innerRef={ref}
158+
ref={ref}
159159
onClick={() => toggle()}
160160
alternate={options.useDistinctEnd}
161161
{...props}
@@ -177,7 +177,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
177177
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
178178
<Animation>
179179
{({ ref, ...props }) => (
180-
<Styled.ListItem margin={20} innerRef={ref} onClick={() => toggle()} {...props} />
180+
<Styled.ListItem margin={20} ref={ref} onClick={() => toggle()} {...props} />
181181
)}
182182
</Animation>
183183
</Baba>
@@ -187,7 +187,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
187187
{({ ref, ...props }) => (
188188
<Styled.ListItemFloatingRight
189189
size={2}
190-
innerRef={ref}
190+
ref={ref}
191191
margin={50}
192192
onClick={() => toggle()}
193193
alternate={options.useDistinctEnd}
@@ -210,7 +210,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
210210
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
211211
<Animation>
212212
{({ ref, ...props }) => (
213-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
213+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
214214
)}
215215
</Animation>
216216
</Baba>
@@ -220,7 +220,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
220220
{({ ref, ...props }) => (
221221
<Styled.ListItemFloatingRight
222222
width={2}
223-
innerRef={ref}
223+
ref={ref}
224224
onClick={() => toggle()}
225225
alternate={options.useDistinctEnd}
226226
{...props}
@@ -242,7 +242,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
242242
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
243243
<Animation>
244244
{({ ref, ...props }) => (
245-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
245+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
246246
)}
247247
</Animation>
248248
</Baba>
@@ -251,7 +251,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
251251
<Animation>
252252
{({ ref, ...props }) => (
253253
<Styled.ListItemFloatingRight
254-
innerRef={ref}
254+
ref={ref}
255255
onClick={() => toggle()}
256256
alternate={options.useDistinctEnd}
257257
borderRadius="50%"
@@ -276,7 +276,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
276276
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
277277
<Animation>
278278
{({ ref, ...props }) => (
279-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
279+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
280280
)}
281281
</Animation>
282282
</Baba>
@@ -286,7 +286,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
286286
<Animation>
287287
{({ ref, ...props }) => (
288288
<Styled.ListItemFloatingRight
289-
innerRef={ref}
289+
ref={ref}
290290
onClick={() => toggle()}
291291
alternate={options.useDistinctEnd}
292292
{...props}
@@ -308,7 +308,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
308308
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
309309
<Animation>
310310
{({ ref, ...props }) => (
311-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
311+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
312312
)}
313313
</Animation>
314314
</Baba>
@@ -319,7 +319,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
319319
<Animation>
320320
{({ ref, ...props }) => (
321321
<Styled.ListItemFloatingRight
322-
innerRef={ref}
322+
ref={ref}
323323
onClick={() => toggle()}
324324
alternate={options.useDistinctEnd}
325325
{...props}
@@ -342,7 +342,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
342342
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
343343
<Animation>
344344
{({ ref, ...props }) => (
345-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
345+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
346346
)}
347347
</Animation>
348348
</Baba>
@@ -352,7 +352,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
352352
<Animation>
353353
{({ ref, ...props }) => (
354354
<Styled.ListItemFillSpace
355-
innerRef={ref}
355+
ref={ref}
356356
onClick={() => toggle()}
357357
alternate={options.useDistinctEnd}
358358
{...props}
@@ -377,7 +377,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
377377
<Baba name={`${options.namePrefix}-anim`} key={`${options.namePrefix}-1`}>
378378
<Animation>
379379
{({ ref, ...props }) => (
380-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
380+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
381381
)}
382382
</Animation>
383383
</Baba>
@@ -387,7 +387,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
387387
<Animation>
388388
{({ ref, ...props }) => (
389389
<Styled.ListItemFloatingRight
390-
innerRef={ref}
390+
ref={ref}
391391
onClick={() => toggle()}
392392
alternate={options.useDistinctEnd}
393393
{...props}
@@ -409,7 +409,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
409409
<Animation>
410410
{({ ref, style, ...props }) => (
411411
<Styled.ListItem
412-
innerRef={ref}
412+
ref={ref}
413413
onClick={() => toggle()}
414414
// !! CURRENT LIMITATION ALERT !!
415415
// Consumers need to set their own opacity depending if it's shown or not.
@@ -425,7 +425,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
425425
<Animation>
426426
{({ ref, ...props }) => (
427427
<Styled.ListItemFloatingRight
428-
innerRef={ref}
428+
ref={ref}
429429
onClick={() => toggle()}
430430
alternate={options.useDistinctEnd}
431431
{...props}
@@ -447,7 +447,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
447447
<Baba name={`${options.namePrefix}-default`}>
448448
<Animation>
449449
{({ ref, ...props }) => (
450-
<Styled.ListItem innerRef={ref} onClick={() => toggle()} {...props} />
450+
<Styled.ListItem ref={ref} onClick={() => toggle()} {...props} />
451451
)}
452452
</Animation>
453453
</Baba>
@@ -457,7 +457,7 @@ export const createMoveExamples = (options: { useDistinctEnd: boolean; namePrefi
457457
<Animation>
458458
{({ ref, style, ...props }) => (
459459
<Styled.ListItemFloatingRight
460-
innerRef={ref}
460+
ref={ref}
461461
onClick={() => toggle()}
462462
alternate={options.useDistinctEnd}
463463
// !! CURRENT LIMITATION ALERT !!

packages/yubaba/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
"jest-enzyme": "^6.0.4",
4646
"material-ui": "^0.20.2",
4747
"polished": "^2.0.3",
48-
"react": "^16.5.2",
48+
"react": "^16.8.6",
4949
"react-body-classname": "^1.2.0",
50-
"react-dom": "^16.5.2",
50+
"react-dom": "^16.8.6",
5151
"react-router-dom": "^4.3.1",
5252
"react-select": "^2.4.2",
5353
"size-limit": "^0.21.0",
54-
"styled-components": "^3.4.5",
54+
"styled-components": "^4.2.0",
5555
"yubaba-common": "^2.3.0"
5656
}
5757
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Baba
33
route: /baba
44
---
55

6-
import { Playground, PropsTable } from 'docz';
6+
import { Playground, Props } from 'docz';
77
import Baba from '../index';
88

99
# Baba
@@ -28,4 +28,4 @@ const ListItem = ({ index }) => (
2828

2929
## Props
3030

31-
<PropsTable of={Baba} />
31+
<Props of={Baba} />

0 commit comments

Comments
 (0)