From b09a8bfb4f68d1b4bfa1e68630789454986ec493 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Thu, 28 Sep 2017 18:11:44 +0200 Subject: [PATCH 1/4] [docs] build --- pages/api/linear-progress.md | 2 +- pages/api/typography.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/api/linear-progress.md b/pages/api/linear-progress.md index ed09f3ebff72c9..8eb3f7b8b91a88 100644 --- a/pages/api/linear-progress.md +++ b/pages/api/linear-progress.md @@ -10,7 +10,7 @@ | classes | Object | | Useful to extend the style applied to components. | | color | union: 'primary'
 'accent'
| 'primary' | The color of the component. It's using the theme palette when that makes sense. | | mode | union: 'determinate'
 'indeterminate'
 'buffer'
 'query'
| 'indeterminate' | The mode of show your progress, indeterminate for when there is no value for progress. | -| value | number | 0 | The value of progress, only works in determinate and buffer mode. Value between 0 and 100. | +| value | number | | The value of progress, only works in determinate and buffer mode. Value between 0 and 100. | | valueBuffer | number | | The value of buffer, only works in buffer mode. Value between 0 and 100. | Any other properties supplied will be [spread to the root element](/customization/api#spread). diff --git a/pages/api/typography.md b/pages/api/typography.md index 1acb78bed1045a..e0af6f3c1379ba 100644 --- a/pages/api/typography.md +++ b/pages/api/typography.md @@ -10,7 +10,7 @@ | align | union: 'inherit', 'left', 'center', 'right', 'justify'
| 'inherit' | | | children | Node | | | | classes | Object | | Useful to extend the style applied to components. | -| color | union: 'inherit'
 'secondary'
 'accent'
 'default'
| 'default' | The color of the component. It's using the theme palette when that makes sense. | +| color | union: 'inherit', 'primary', 'secondary', 'accent', 'default'
| 'default' | The color of the component. It's using the theme palette when that makes sense. | | component | ElementType | | The component used for the root node. Either a string to use a DOM element or a component. By default we map the type to a good default headline component. | | gutterBottom | boolean | false | If `true`, the text will have a bottom margin. | | headlineMapping | signature | { display4: 'h1', display3: 'h1', display2: 'h1', display1: 'h1', headline: 'h1', title: 'h2', subheading: 'h3', body2: 'aside', body1: 'p',} | We are empirically mapping the type property to a range of different DOM element type. For instance, h1 to h6. If you wish to change that mapping, you can provide your own. Alternatively, you can use the `component` property. | @@ -44,6 +44,7 @@ This property accepts the following keys: - `gutterBottom` - `paragraph` - `colorInherit` +- `colorPrimary` - `colorSecondary` - `colorAccent` From bdca12918695d65ba1cccc26fac57dedc0579bd1 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Thu, 28 Sep 2017 18:13:03 +0200 Subject: [PATCH 2/4] [Drawer] Mark `type` prop as optional --- pages/api/drawer.md | 2 +- src/Drawer/Drawer.d.ts | 2 +- src/Drawer/Drawer.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/api/drawer.md b/pages/api/drawer.md index cea8b56d58fec6..a86f7104c4380c 100644 --- a/pages/api/drawer.md +++ b/pages/api/drawer.md @@ -18,7 +18,7 @@ | onRequestClose | Function | | Callback fired when the component requests to be closed.

**Signature:**
`function(event: object) => void`
*event:* The event source of the callback | | open | boolean | false | If `true`, the drawer is open. | | theme * | Object | | | -| type * | union: 'permanent'
 'persistent'
 'temporary'
| 'temporary' | The type of drawer. | +| type | union: 'permanent'
 'persistent'
 'temporary'
| 'temporary' | The type of drawer. | Any other properties supplied will be [spread to the root element](/customization/api#spread). diff --git a/src/Drawer/Drawer.d.ts b/src/Drawer/Drawer.d.ts index 1674ef0adde81a..d38e4696948706 100644 --- a/src/Drawer/Drawer.d.ts +++ b/src/Drawer/Drawer.d.ts @@ -12,7 +12,7 @@ export interface DrawerProps extends ModalProps { open?: boolean; SlideProps?: SlideProps & StyledComponentProps; theme?: Theme; - type: 'permanent' | 'persistent' | 'temporary'; + type?: 'permanent' | 'persistent' | 'temporary'; } declare const Drawer: StyledComponent; diff --git a/src/Drawer/Drawer.js b/src/Drawer/Drawer.js index 3c7fe5219e9b70..28a572e5fd24cf 100644 --- a/src/Drawer/Drawer.js +++ b/src/Drawer/Drawer.js @@ -142,7 +142,7 @@ export type Props = { /** * The type of drawer. */ - type: Type, + type?: Type, }; type State = { From 9da7a476544ac5eb960f8452b642a608edfada06 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Thu, 28 Sep 2017 18:16:30 +0200 Subject: [PATCH 3/4] [Popover] Mark `anchorOrigin` and `transformOrigin` props as optional --- pages/api/popover.md | 4 ++-- src/Popover/Popover.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/api/popover.md b/pages/api/popover.md index c62c2c9f0d9a94..757fdedaf50804 100644 --- a/pages/api/popover.md +++ b/pages/api/popover.md @@ -9,7 +9,7 @@ |:-----|:-----|:--------|:------------| | PaperProps | Object | | Properties applied to the `Paper` element. | | anchorEl | Object | | This is the DOM element that will be used to set the position of the popover. | -| anchorOrigin * | signature | { vertical: 'top', horizontal: 'left',} | This is the point on the anchor where the popover's `anchorEl` will attach to.
Options: vertical: [top, center, bottom]; horizontal: [left, center, right]. | +| anchorOrigin | signature | { vertical: 'top', horizontal: 'left',} | This is the point on the anchor where the popover's `anchorEl` will attach to.
Options: vertical: [top, center, bottom]; horizontal: [left, center, right]. | | children * | Node | | The content of the component. | | classes | Object | | Useful to extend the style applied to components. | | elevation | number | 8 | The elevation of the popover. | @@ -25,7 +25,7 @@ | onExiting | TransitionCallback | | Callback fired when the component is exiting | | onRequestClose | Function | | Callback fired when the component requests to be closed.

**Signature:**
`function(event: object) => void`
*event:* The event source of the callback | | open | boolean | false | If `true`, the popover is visible. | -| transformOrigin * | signature | { vertical: 'top', horizontal: 'left',} | This is the point on the popover which will attach to the anchor's origin.
Options: vertical: [top, center, bottom, x(px)]; horizontal: [left, center, right, x(px)]. | +| transformOrigin | signature | { vertical: 'top', horizontal: 'left',} | This is the point on the popover which will attach to the anchor's origin.
Options: vertical: [top, center, bottom, x(px)]; horizontal: [left, center, right, x(px)]. | | transitionDuration | union: number
 'auto'
| 'auto' | Set to 'auto' to automatically calculate transition time based on height | Any other properties supplied will be [spread to the root element](/customization/api#spread). diff --git a/src/Popover/Popover.js b/src/Popover/Popover.js index 2a085abdbfb4c2..9fb60004858cf0 100644 --- a/src/Popover/Popover.js +++ b/src/Popover/Popover.js @@ -96,7 +96,7 @@ export type Props = { * vertical: [top, center, bottom]; * horizontal: [left, center, right]. */ - anchorOrigin: Origin, + anchorOrigin?: Origin, /** * The content of the component. */ @@ -183,7 +183,7 @@ export type Props = { * vertical: [top, center, bottom, x(px)]; * horizontal: [left, center, right, x(px)]. */ - transformOrigin: Origin, + transformOrigin?: Origin, /** * Set to 'auto' to automatically calculate transition time based on height */ From 3559a83fdc0d61ee3070f73de0226585a0df6a61 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Thu, 28 Sep 2017 18:49:51 +0200 Subject: [PATCH 4/4] fix flow errors --- src/Popover/Popover.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Popover/Popover.js b/src/Popover/Popover.js index 9fb60004858cf0..4c09e5f3b22294 100644 --- a/src/Popover/Popover.js +++ b/src/Popover/Popover.js @@ -80,6 +80,8 @@ type Origin = { type DefaultProps = { classes: Object, + anchorOrigin: Origin, + transformOrigin: Origin, }; export type Props = {