Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #1550

Closed
wants to merge 8 commits into from
Closed

Release #1550

Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ npm-debug.log
build

# Exclude compiled files
lib
icon-builder/js
icon-builder/jsx

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Documentation site for material-ui",
"repository": {
"type": "git",
"url": "https://github.com/callemall/material-ui.git"
"url": "https://github.com/muthufmass/material-ui.git"
},
"scripts": {
"start": "gulp"
Expand Down
220 changes: 105 additions & 115 deletions docs/src/app/components/pages/components/text-fields.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,111 +46,110 @@ let TextFieldsPage = React.createClass({

render() {

let code =
'//In Line Hint Text\n' +
'<TextField\n' +
' hintText="Hint Text" />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' defaultValue="Default Value" />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' value={this.state.propValue}\n' +
' onChange={this._handleInputChange} />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' valueLink={this.linkState(\'valueLinkValue\')} />\n' +
'<TextField\n' +
' hintText="Hint Text (MultiLine)"\n' +
' multiLine={true} />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' errorText={this.state.errorText}\n' +
' onChange={this._handleErrorInputChange} />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' errorText={this.state.error2Text}\n' +
' onChange={this._handleError2InputChange}\n' +
' defaultValue="abc" />\n' +
'<TextField\n' +
' hintText="Disabled Hint Text"\n' +
' disabled={true} />\n' +
'<TextField\n' +
' hintText="Disabled Hint Text"\n' +
' disabled={true}\n' +
' defaultValue="Disabled With Value" />\n\n' +

'//Select Fields\n'+
'<SelectField\n'+
' value={this.state.selectValue}\n'+
' onChange={this._handleSelectValueChange.bind(null, "selectValue")}\n'+
' hintText="Hint Text"\n'+
' menuItems={menuItems} />\n'+
'<SelectField\n'+
' valueLink={this.linkState("selectValueLinkValue")}\n'+
' floatingLabelText="Select Field"\n'+
' valueMember="id"\n'+
' displayMember="name"\n'+
' menuItems={arbitraryArrayMenuItems} />\n'+
'<SelectField\n'+
' value={this.state.selectValue2}\n'+
' onChange={this._handleSelectValueChange.bind(null, "selectValue2")}\n'+
' menuItems={arbitraryArrayMenuItems} />\n\n'+
let code = `
//In Line Hint Text
<TextField
hintText="Hint Text" />
<TextField
hintText="Hint Text"
defaultValue="Default Value" />
<TextField
hintText="Hint Text"
value={this.state.propValue}
onChange={this._handleInputChange} />
<TextField
hintText="Hint Text"
valueLink={this.linkState('valueLinkValue')} />
<TextField
hintText="Hint Text (MultiLine)"
multiLine={true} />
<TextField
hintText="The hint text can be as long as you want, it will wrap."
multiLine={true} />
<TextField
hintText="Hint Text"
errorText="The error text can be as long as you want, it will wrap." />
<TextField
hintText="Hint Text"
errorText={this.state.errorText}
onChange={this._handleErrorInputChange} />
<TextField
hintText="Hint Text"
errorText={this.state.error2Text}
onChange={this._handleError2InputChange}
defaultValue="abc" />
<TextField
hintText="Disabled Hint Text"
disabled={true} />
<TextField
hintText="Disabled Hint Text"
disabled={true}
defaultValue="Disabled With Value" />

'//Floating Hint Text Labels\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' floatingLabelText="Floating Label Text" />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' defaultValue="Default Value"\n' +
' floatingLabelText="Floating Label Text" />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' floatingLabelText="Floating Label Text"\n' +
' value={this.state.floatingPropValue}\n' +
' onChange={this._handleFloatingInputChange} />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' floatingLabelText="Floating Label Text"\n' +
' valueLink={this.linkState(\'floatingValueLinkValue\')} />\n' +
'<TextField\n' +
' hintText="Hint Text (MultiLine)"\n' +
' floatingLabelText="Floating Label Text"\n' +
' multiLine={true} />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' errorText={this.state.floatingErrorText}\n' +
' floatingLabelText="Floating Label Text"\n' +
' onChange={this._handleFloatingErrorInputChange} />\n' +
'<TextField\n' +
' hintText="Hint Text"\n' +
' errorText={this.state.floatingError2Text}\n' +
' defaultValue="abc"\n' +
' floatingLabelText="Floating Label Text"\n' +
' onChange={this._handleFloating2ErrorInputChange} />\n' +
'<TextField\n' +
' hintText="Disabled Hint Text"\n' +
' disabled={true}\n' +
' floatingLabelText="Floating Label Text" />\n' +
'<TextField\n' +
' hintText="Disabled Hint Text"\n' +
' disabled={true}\n' +
' defaultValue="Disabled With Value"\n' +
' floatingLabelText="Floating Label Text" />\n'+
'<TextField\n' +
' hintText="Custom Child input (e.g. password)"\n' +
' defaultValue="Custom Child input (e.g. password)"\n' +
' floatingLabelText="Custom Child input (e.g. password)">\n' +
' <input type="password" />\n' +
'</TextField>\n'+
'<TextField\n' +
' hintText="Disabled Child input (e.g. password)"\n' +
' disabled={true}\n' +
' defaultValue="Custom Child input (e.g. password)"\n' +
' floatingLabelText="Custom Child input (e.g. password)">\n' +
' <input type="password" />\n' +
'</TextField>';
//Select Fields
<SelectField
value={this.state.selectValue}
onChange={this._handleSelectValueChange.bind(null, 'selectValue')}
hintText="Hint Text"
menuItems={menuItems} />
<SelectField
valueLink={this.linkState('selectValueLinkValue')}
floatingLabelText="Float Label Text"
valueMember="id"
displayMember="name"
menuItems={arbitraryArrayMenuItems} />
<SelectField
value={this.state.selectValue2}
onChange={this._handleSelectValueChange.bind(null, 'selectValue2')}
menuItems={arbitraryArrayMenuItems} />

//Floating Hint Text Labels
<TextField
hintText="Hint Text"
floatingLabelText="Floating Label Text" />
<TextField
hintText="Hint Text"
defaultValue="Default Value"
floatingLabelText="Floating Label Text" />
<TextField
hintText="Hint Text"
floatingLabelText="Floating Label Text"
value={this.state.floatingPropValue}
onChange={this._handleFloatingInputChange} />
<TextField
hintText="Hint Text"
floatingLabelText="Floating Label Text"
valueLink={this.linkState('floatingValueLinkValue')} />
<TextField
hintText="Hint Text (MultiLine)"
floatingLabelText="Floating Label Text"
multiLine={true} />
<TextField
hintText="Hint Text"
errorText={this.state.floatingErrorText}
floatingLabelText="Floating Label Text"
onChange={this._handleFloatingErrorInputChange} />
<TextField
hintText="Hint Text"
errorText={this.state.floatingError2Text}
defaultValue="abc"
floatingLabelText="Floating Label Text"
onChange={this._handleFloating2ErrorInputChange} />
<TextField
hintText="Disabled Hint Text"
disabled={true}
floatingLabelText="Floating Label Text" />
<TextField
hintText="Disabled Hint Text"
disabled={true}
defaultValue="Disabled With Value"
floatingLabelText="Floating Label Text" />
<TextField
hintText="Password Field"
floatingLabelText="Password"
type="password" />
`;

let desc = 'This component extends the current input element and will support all of its props and events. It supports ' +
'valueLink and can be controlled or uncontrolled.' ;
Expand Down Expand Up @@ -408,18 +407,9 @@ let TextFieldsPage = React.createClass({
defaultValue="Disabled With Value"
floatingLabelText="Floating Label Text" /><br/>
<TextField
hintText="Custom Child input (e.g. password)"
defaultValue="Custom Child input (e.g. password)"
floatingLabelText="Custom Child input (e.g. password)">
<input type="password" />
</TextField>
<TextField
hintText="Disabled Child input (e.g. password)"
disabled={true}
defaultValue="Custom Child input (e.g. password)"
floatingLabelText="Custom Child input (e.g. password)">
<input type="password" />
</TextField>
hintText="Password Field"
floatingLabelText="Password"
type="password" /><br/>
</div>
</ClearFix>
</ComponentDoc>
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Sample project that uses material-ui",
"repository": {
"type": "git",
"url": "https://github.com/callemall/material-ui.git"
"url": "https://github.com/muthufmass/material-ui.git"
},
"scripts": {
"start": "gulp"
Expand Down
4 changes: 4 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ gulp.task('eslint', function () {
// lint error, return the stream and pipe to failOnError last.
.pipe(eslint.failOnError());
});
gulp.task('pushtoDevApps',function(){
return gulp.src('lib/**')
.pipe(gulp.dest('/Users/muthaiahthiagarajan/Git/ccx/doctor-app/node_modules/material-ui/lib/'));
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "material-ui",
"author": "Call-em-all Engineering Team",
"author": "Call-em-all Engineering Team + Medlife Custom Theme Build",
"version": "0.10.1",
"description": "Material Design UI components built with React",
"main": "./lib",
Expand All @@ -20,11 +20,11 @@
],
"repository": {
"type": "git",
"url": "https://github.com/callemall/material-ui.git"
"url": "https://github.com/muthufmass/material-ui.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/callemall/material-ui/issues"
"url": "https://github.com/muthufmass/material-ui/issues"
},
"homepage": "http://material-ui.com/",
"dependencies": {
Expand Down
46 changes: 35 additions & 11 deletions src/avatar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,61 @@ let Avatar = React.createClass({
...other,
} = this.props;

const boxShadow = (style && style.boxShadow) ? style.boxShadow : '0 0 1px 0 rgba(0, 0, 0, 0.2) inset';
const borderRadius = (style && style.borderRadius) ? style.borderRadius : '50%';

let styles = {
root: {
height: src ? size - 2 : size,
width: src ? size - 2 : size,
height: size,
width: size,
userSelect: 'none',
backgroundColor: backgroundColor,
borderRadius: '50%',
border: src ? 'solid 1px' : 'none',
borderColor: this.context.muiTheme.palette.borderColor,
boxShadow: src ? null : boxShadow, // Doesn't apply above an img
borderRadius: borderRadius,
display: 'inline-block',

//Needed for img
position: 'relative',

//Needed for letter avatars
textAlign: 'center',
lineHeight: size + 'px',
fontSize: size / 2 + 4,
color: color,
},

iconStyles: {
margin: 8,
},
};

let mergedRootStyles = this.mergeAndPrefix(styles.root, style);

if (src) {
return <img {...other} src={src} style={mergedRootStyles} />;
const styleImg = {
height: size,
width: size,
borderRadius: borderRadius,
};

const styleImgShadow = {
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
boxShadow: boxShadow,
borderRadius: borderRadius,
};

return <div {...other} style={mergedRootStyles} >
<img src={src} style={styleImg} />
<div style={this.mergeAndPrefix(styleImgShadow)} />
</div>;
} else {
const styleIcon = {
margin: 8,
};

let iconElement = icon ? React.cloneElement(icon, {
color: color,
style: this.mergeStyles(styles.iconStyles, icon.props.style),
style: this.mergeStyles(styleIcon, icon.props.style),
}) : null;

return <div {...other} style={mergedRootStyles}>
Expand Down
1 change: 0 additions & 1 deletion src/circular-progress.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ let CircularProgress = React.createClass({
margin: "5px",
display: "inline-block",
transition: Transitions.create("transform", "20s", null, "linear"),
//webkitTransitionTimingFunction: "linear",
},
svg: {
height: size,
Expand Down
3 changes: 1 addition & 2 deletions src/dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ let Dialog = React.createClass({

show() {
this.refs.dialogOverlay.preventScrolling();
this.setState({ open: true });
this._onShow();
this.setState({ open: true }, this._onShow);
},

_getAction(actionJSON, key) {
Expand Down
Loading