Skip to content

Commit

Permalink
Menu/Popover/IconMenu/Dialog Portal updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismcv committed Oct 27, 2015
1 parent aa7e541 commit 9884091
Show file tree
Hide file tree
Showing 28 changed files with 1,252 additions and 276 deletions.
2 changes: 2 additions & 0 deletions docs/src/app/app-routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const Lists = require('./components/pages/components/lists');
const Menus = require('./components/pages/components/menus');
const Paper = require('./components/pages/components/paper');
const Progress = require('./components/pages/components/progress');
const Popover = require('./components/pages/components/popover');
const RefreshIndicator = require('./components/pages/components/refresh-indicator');
const Sliders = require('./components/pages/components/sliders');
const Snackbar = require('./components/pages/components/snackbar');
Expand Down Expand Up @@ -90,6 +91,7 @@ const AppRoutes = (
<Route path="lists" component={Lists} />
<Route path="menus" component={Menus} />
<Route path="paper" component={Paper} />
<Route path="popover" component={Popover} />
<Route path="progress" component={Progress} />
<Route path="refresh-indicator" component={RefreshIndicator} />
<Route path="sliders" component={Sliders} />
Expand Down
1 change: 1 addition & 0 deletions docs/src/app/components/pages/components.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default class Components extends React.Component {
{ route: '/components/paper', text: 'Paper'},
{ route: '/components/progress', text: 'Progress'},
{ route: '/components/refresh-indicator', text: 'Refresh Indicator'},
{ route: '/components/popover', text: 'Popover'},
{ route: '/components/sliders', text: 'Sliders'},
{ route: '/components/switches', text: 'Switches'},
{ route: '/components/snackbar', text: 'Snackbar'},
Expand Down
3 changes: 3 additions & 0 deletions docs/src/app/components/pages/components/dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export default class DialogPage extends React.Component {
title="Dialog With Standard Actions"
actions={standardActions}
actionFocus="submit"
open={false}
modal={this.state.modal}>
The actions in this window are created from the json that&#39;s passed in.
</Dialog>
Expand All @@ -183,6 +184,7 @@ export default class DialogPage extends React.Component {
ref="customDialog"
title="Dialog With Custom Actions"
actions={customActions}
open={false}
modal={this.state.modal}>
The actions in this window were passed in as an array of react objects.
</Dialog>
Expand All @@ -197,6 +199,7 @@ export default class DialogPage extends React.Component {
title="Dialog With Scrollable Content"
actions={scrollableCustomActions}
modal={this.state.modal}
open={false}
autoDetectWindowHeight={true}
autoScrollBodyContent={true}>
<div style={{height: '1000px'}}>
Expand Down
196 changes: 182 additions & 14 deletions docs/src/app/components/pages/components/icon-menus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ export default class IconMenus extends React.Component {

<p>Menu with various open directions</p>
<div>
<IconMenu iconButtonElement={iconButtonElement}>
<IconMenu iconButtonElement={iconButtonElement}
anchorOrigin={{horizontal:'right', vertical:'top'}}
targetOrigin={{horizontal:'right', vertical:'top'}}
>
<MenuItem primaryText="Refresh" />
<MenuItem primaryText="Send feedback" />
<MenuItem primaryText="Settings" />
Expand All @@ -161,7 +164,8 @@ export default class IconMenus extends React.Component {

<IconMenu
iconButtonElement={iconButtonElement}
openDirection="bottom-right">
anchorOrigin={{horizontal:'left', vertical:'top'}}
targetOrigin={{horizontal:'left', vertical:'top'}}>
<MenuItem primaryText="Refresh" />
<MenuItem primaryText="Send feedback" />
<MenuItem primaryText="Settings" />
Expand All @@ -171,7 +175,8 @@ export default class IconMenus extends React.Component {

<IconMenu
iconButtonElement={iconButtonElement}
openDirection="top-left">
anchorOrigin={{horizontal:'right', vertical:'bottom'}}
targetOrigin={{horizontal:'right', vertical:'bottom'}}>
<MenuItem primaryText="Refresh" />
<MenuItem primaryText="Send feedback" />
<MenuItem primaryText="Settings" />
Expand All @@ -181,7 +186,9 @@ export default class IconMenus extends React.Component {

<IconMenu
iconButtonElement={iconButtonElement}
openDirection="top-right">
anchorOrigin={{horizontal:'left', vertical:'bottom'}}
targetOrigin={{horizontal:'left', vertical:'bottom'}}
>
<MenuItem primaryText="Refresh" />
<MenuItem primaryText="Send feedback" />
<MenuItem primaryText="Settings" />
Expand All @@ -195,7 +202,6 @@ export default class IconMenus extends React.Component {
<IconMenu
iconButtonElement={iconButtonElement}
onChange={this._handleIconMenuChange}
openDirection="bottom-right"
value={this.state.iconMenuValue}>
<MenuItem value="1" primaryText="Refresh" />
<MenuItem value="2" primaryText="Send feedback" />
Expand All @@ -219,7 +225,6 @@ export default class IconMenus extends React.Component {
iconButtonElement={filterButtonElement}
multiple={true}
onChange={this._handleIconMenuMultiChange}
openDirection="bottom-right"
value={this.state.iconMenuMultiValue}>
<MenuItem value="1" primaryText="Blu-ray" />
<MenuItem value="2" primaryText="Cassette" />
Expand All @@ -233,8 +238,7 @@ export default class IconMenus extends React.Component {
<p>Menu Item variations</p>
<div>
<IconMenu
iconButtonElement={iconButtonElement}
openDirection="bottom-right">
iconButtonElement={iconButtonElement}>
<MenuItem primaryText="Home" />
<MenuItem primaryText="Back" />
<MenuItem primaryText="Forward" disabled={true} />
Expand All @@ -245,8 +249,7 @@ export default class IconMenus extends React.Component {
</IconMenu>

<IconMenu
iconButtonElement={iconButtonElement}
openDirection="bottom-right">
iconButtonElement={iconButtonElement}>
<MenuItem primaryText="Preview" leftIcon={<RemoveRedEye />} />
<MenuItem primaryText="Share" leftIcon={<PersonAdd />} />
<MenuItem primaryText="Get link" leftIcon={<ContentLink />} />
Expand All @@ -263,7 +266,6 @@ export default class IconMenus extends React.Component {
<IconMenu
iconButtonElement={mapsButtonElement}
maxHeight={272}
openDirection="bottom-right"
valueLink={usStateValueLink}>
<MenuItem value="AL" primaryText="Alabama" />
<MenuItem value="AK" primaryText="Alaska" />
Expand Down Expand Up @@ -321,7 +323,6 @@ export default class IconMenus extends React.Component {
<IconMenu
iconButtonElement={mapsButtonElement}
maxHeight={272}
openDirection="bottom-left"
valueLink={usStateValueLink}>
<MenuItem value="AL" primaryText="Alabama" />
<MenuItem value="AK" primaryText="Alaska" />
Expand Down Expand Up @@ -379,7 +380,8 @@ export default class IconMenus extends React.Component {
<IconMenu
iconButtonElement={mapsButtonElement}
maxHeight={272}
openDirection="top-right"
anchorOrigin={{horizontal:'left', vertical:'bottom'}}
targetOrigin={{horizontal:'left', vertical:'top'}}
valueLink={usStateValueLink}>
<MenuItem value="AL" primaryText="Alabama" />
<MenuItem value="AK" primaryText="Alaska" />
Expand Down Expand Up @@ -437,7 +439,173 @@ export default class IconMenus extends React.Component {
<IconMenu
iconButtonElement={mapsButtonElement}
maxHeight={272}
openDirection="top-left"
valueLink={usStateValueLink}>
<MenuItem value="AL" primaryText="Alabama" />
<MenuItem value="AK" primaryText="Alaska" />
<MenuItem value="AZ" primaryText="Arizona" />
<MenuItem value="AR" primaryText="Arkansas" />
<MenuItem value="CA" primaryText="California" />
<MenuItem value="CO" primaryText="Colorado" />
<MenuItem value="CT" primaryText="Connecticut" />
<MenuItem value="DE" primaryText="Delaware" />
<MenuItem value="DC" primaryText="District Of Columbia" />
<MenuItem value="FL" primaryText="Florida" />
<MenuItem value="GA" primaryText="Georgia" />
<MenuItem value="HI" primaryText="Hawaii" />
<MenuItem value="ID" primaryText="Idaho" />
<MenuItem value="IL" primaryText="Illinois" />
<MenuItem value="IN" primaryText="Indiana" />
<MenuItem value="IA" primaryText="Iowa" />
<MenuItem value="KS" primaryText="Kansas" />
<MenuItem value="KY" primaryText="Kentucky" />
<MenuItem value="LA" primaryText="Louisiana" />
<MenuItem value="ME" primaryText="Maine" />
<MenuItem value="MD" primaryText="Maryland" />
<MenuItem value="MA" primaryText="Massachusetts" />
<MenuItem value="MI" primaryText="Michigan" />
<MenuItem value="MN" primaryText="Minnesota" />
<MenuItem value="MS" primaryText="Mississippi" />
<MenuItem value="MO" primaryText="Missouri" />
<MenuItem value="MT" primaryText="Montana" />
<MenuItem value="NE" primaryText="Nebraska" />
<MenuItem value="NV" primaryText="Nevada" />
<MenuItem value="NH" primaryText="New Hampshire" />
<MenuItem value="NJ" primaryText="New Jersey" />
<MenuItem value="NM" primaryText="New Mexico" />
<MenuItem value="NY" primaryText="New York" />
<MenuItem value="NC" primaryText="North Carolina" />
<MenuItem value="ND" primaryText="North Dakota" />
<MenuItem value="OH" primaryText="Ohio" />
<MenuItem value="OK" primaryText="Oklahoma" />
<MenuItem value="OR" primaryText="Oregon" />
<MenuItem value="PA" primaryText="Pennsylvania" />
<MenuItem value="RI" primaryText="Rhode Island" />
<MenuItem value="SC" primaryText="South Carolina" />
<MenuItem value="SD" primaryText="South Dakota" />
<MenuItem value="TN" primaryText="Tennessee" />
<MenuItem value="TX" primaryText="Texas" />
<MenuItem value="UT" primaryText="Utah" />
<MenuItem value="VT" primaryText="Vermont" />
<MenuItem value="VA" primaryText="Virginia" />
<MenuItem value="WA" primaryText="Washington" />
<MenuItem value="WV" primaryText="West Virginia" />
<MenuItem value="WI" primaryText="Wisconsin" />
<MenuItem value="WY" primaryText="Wyoming" />
</IconMenu>
<IconMenu
iconButtonElement={mapsButtonElement}
maxHeight={500}
valueLink={usStateValueLink}>
<MenuItem value="AL" primaryText="Alabama" />
<MenuItem value="AK" primaryText="Alaska" />
<MenuItem value="AZ" primaryText="Arizona" />
<MenuItem value="AR" primaryText="Arkansas" />
<MenuItem value="CA" primaryText="California" />
<MenuItem value="CO" primaryText="Colorado" />
<MenuItem value="CT" primaryText="Connecticut" />
<MenuItem value="DE" primaryText="Delaware" />
<MenuItem value="DC" primaryText="District Of Columbia" />
<MenuItem value="FL" primaryText="Florida" />
<MenuItem value="GA" primaryText="Georgia" />
<MenuItem value="HI" primaryText="Hawaii" />
<MenuItem value="ID" primaryText="Idaho" />
<MenuItem value="IL" primaryText="Illinois" />
<MenuItem value="IN" primaryText="Indiana" />
<MenuItem value="IA" primaryText="Iowa" />
<MenuItem value="KS" primaryText="Kansas" />
<MenuItem value="KY" primaryText="Kentucky" />
<MenuItem value="LA" primaryText="Louisiana" />
<MenuItem value="ME" primaryText="Maine" />
<MenuItem value="MD" primaryText="Maryland" />
<MenuItem value="MA" primaryText="Massachusetts" />
<MenuItem value="MI" primaryText="Michigan" />
<MenuItem value="MN" primaryText="Minnesota" />
<MenuItem value="MS" primaryText="Mississippi" />
<MenuItem value="MO" primaryText="Missouri" />
<MenuItem value="MT" primaryText="Montana" />
<MenuItem value="NE" primaryText="Nebraska" />
<MenuItem value="NV" primaryText="Nevada" />
<MenuItem value="NH" primaryText="New Hampshire" />
<MenuItem value="NJ" primaryText="New Jersey" />
<MenuItem value="NM" primaryText="New Mexico" />
<MenuItem value="NY" primaryText="New York" />
<MenuItem value="NC" primaryText="North Carolina" />
<MenuItem value="ND" primaryText="North Dakota" />
<MenuItem value="OH" primaryText="Ohio" />
<MenuItem value="OK" primaryText="Oklahoma" />
<MenuItem value="OR" primaryText="Oregon" />
<MenuItem value="PA" primaryText="Pennsylvania" />
<MenuItem value="RI" primaryText="Rhode Island" />
<MenuItem value="SC" primaryText="South Carolina" />
<MenuItem value="SD" primaryText="South Dakota" />
<MenuItem value="TN" primaryText="Tennessee" />
<MenuItem value="TX" primaryText="Texas" />
<MenuItem value="UT" primaryText="Utah" />
<MenuItem value="VT" primaryText="Vermont" />
<MenuItem value="VA" primaryText="Virginia" />
<MenuItem value="WA" primaryText="Washington" />
<MenuItem value="WV" primaryText="West Virginia" />
<MenuItem value="WI" primaryText="Wisconsin" />
<MenuItem value="WY" primaryText="Wyoming" />
</IconMenu>
<IconMenu
iconButtonElement={mapsButtonElement}
maxHeight={272}
valueLink={usStateValueLink}>
<MenuItem value="AL" primaryText="Alabama" />
<MenuItem value="AK" primaryText="Alaska" />
<MenuItem value="AZ" primaryText="Arizona" />
<MenuItem value="AR" primaryText="Arkansas" />
<MenuItem value="CA" primaryText="California" />
<MenuItem value="CO" primaryText="Colorado" />
<MenuItem value="CT" primaryText="Connecticut" />
<MenuItem value="DE" primaryText="Delaware" />
<MenuItem value="DC" primaryText="District Of Columbia" />
<MenuItem value="FL" primaryText="Florida" />
<MenuItem value="GA" primaryText="Georgia" />
<MenuItem value="HI" primaryText="Hawaii" />
<MenuItem value="ID" primaryText="Idaho" />
<MenuItem value="IL" primaryText="Illinois" />
<MenuItem value="IN" primaryText="Indiana" />
<MenuItem value="IA" primaryText="Iowa" />
<MenuItem value="KS" primaryText="Kansas" />
<MenuItem value="KY" primaryText="Kentucky" />
<MenuItem value="LA" primaryText="Louisiana" />
<MenuItem value="ME" primaryText="Maine" />
<MenuItem value="MD" primaryText="Maryland" />
<MenuItem value="MA" primaryText="Massachusetts" />
<MenuItem value="MI" primaryText="Michigan" />
<MenuItem value="MN" primaryText="Minnesota" />
<MenuItem value="MS" primaryText="Mississippi" />
<MenuItem value="MO" primaryText="Missouri" />
<MenuItem value="MT" primaryText="Montana" />
<MenuItem value="NE" primaryText="Nebraska" />
<MenuItem value="NV" primaryText="Nevada" />
<MenuItem value="NH" primaryText="New Hampshire" />
<MenuItem value="NJ" primaryText="New Jersey" />
<MenuItem value="NM" primaryText="New Mexico" />
<MenuItem value="NY" primaryText="New York" />
<MenuItem value="NC" primaryText="North Carolina" />
<MenuItem value="ND" primaryText="North Dakota" />
<MenuItem value="OH" primaryText="Ohio" />
<MenuItem value="OK" primaryText="Oklahoma" />
<MenuItem value="OR" primaryText="Oregon" />
<MenuItem value="PA" primaryText="Pennsylvania" />
<MenuItem value="RI" primaryText="Rhode Island" />
<MenuItem value="SC" primaryText="South Carolina" />
<MenuItem value="SD" primaryText="South Dakota" />
<MenuItem value="TN" primaryText="Tennessee" />
<MenuItem value="TX" primaryText="Texas" />
<MenuItem value="UT" primaryText="Utah" />
<MenuItem value="VT" primaryText="Vermont" />
<MenuItem value="VA" primaryText="Virginia" />
<MenuItem value="WA" primaryText="Washington" />
<MenuItem value="WV" primaryText="West Virginia" />
<MenuItem value="WI" primaryText="Wisconsin" />
<MenuItem value="WY" primaryText="Wyoming" />
</IconMenu>
<IconMenu
iconButtonElement={mapsButtonElement}
valueLink={usStateValueLink}>
<MenuItem value="AL" primaryText="Alabama" />
<MenuItem value="AK" primaryText="Alaska" />
Expand Down
13 changes: 12 additions & 1 deletion docs/src/app/components/pages/components/menus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,18 @@ export default class MenusPage extends React.Component {
<MenuItem primaryText="Single" insetChildren={true} />
<MenuItem primaryText="1.15" insetChildren={true} />
<MenuItem primaryText="Double" insetChildren={true} />
<MenuItem primaryText="Custom: 1.2" checked={true} rightIcon={<ArrowDropRight />} />
<MenuItem primaryText="Custom: 1.2" checked={true} rightIcon={<ArrowDropRight />} menuItems={[
<MenuItem primaryText="Show" rightIcon={<ArrowDropRight />} menuItems={[
<MenuItem primaryText="Show" />,
<MenuItem primaryText="Grid lines" checked={true} />,
<MenuItem primaryText="Page breaks" insetChildren={true} />,
<MenuItem primaryText="Rules" checked={true} />,
]}/>,
<MenuItem primaryText="Grid lines" checked={true} />,
<MenuItem primaryText="Page breaks" insetChildren={true} />,
<MenuItem primaryText="Rules" checked={true} />,
]}>
</MenuItem>
<MenuDivider />
<MenuItem primaryText="Add space before paragraph" />
<MenuItem primaryText="Add space after paragraph" />
Expand Down
Loading

0 comments on commit 9884091

Please sign in to comment.