Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…o yongxu/ac3137

Conflicts:
	src/auto-complete.jsx
fixed issue #3137, removed key from last commit and resolved conflicts

NOTE:
open should not be an state, need to be fixed in the future
  • Loading branch information
yongxu committed Feb 9, 2016
2 parents 7baccc6 + ea2001c commit 6dc1f04
Show file tree
Hide file tree
Showing 183 changed files with 2,941 additions and 4,806 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"presets": ["es2015", "stage-1", "react"],
"plugins": [
["transform-replace-object-assign", "simple-assign"],
"transform-dev-warning",
"add-module-exports"
],
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ rules:
# Errors
array-bracket-spacing: [2, never]
arrow-spacing: 2
arrow-parens: 2
block-spacing: [2, always]
brace-style: 2
comma-dangle: [2, always-multiline]
Expand Down Expand Up @@ -49,6 +50,7 @@ rules:
one-var: [2, never]
prefer-arrow-callback: 0 # Wishlist, one day
prefer-const: 0 # Wishlist, one day
prefer-template: 2
quotes: [2, single, avoid-escape]
semi: [2, always]
space-after-keywords: [2, always]
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## HEAD

##### Breaking Changes
- Remove the deprecated API of `0.14.x`. (#3108)
- [FloatingActionButton] Fix:className now set to root element(#2310)
- [RaisedButton] Fix:className now set to root element(#3122)

## 0.14.4
###### _Feb 02, 2016_

Expand Down
4 changes: 2 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The roadmap is a living document, and it is likely that priorities will change,
#### Breaking Changes

- [ ] Remove deprecated usage of JSON to generate children across the components.
- [ ] [[#3108](https://github.com/callemall/material-ui/pull/3108)] Remove deprecated components, methods & props.
- [x] [[#3108](https://github.com/callemall/material-ui/pull/3108)] Remove deprecated components, methods & props.
- [ ] [[#2957](https://github.com/callemall/material-ui/issues/2957)] Standardize callback signatures.
- [ ] [[#2980](https://github.com/callemall/material-ui/issues/2980)] [[#1839](https://github.com/callemall/material-ui/issues/1839)] Standardise Datepicker for ISO8601.

Expand Down Expand Up @@ -38,7 +38,7 @@ The roadmap is a living document, and it is likely that priorities will change,
- [ ] Documentation versioning.
- [ ] Add example on how to use [react-list](https://github.com/orgsync/react-list) for lists, menu items and table.
- [ ] [[#2635](https://github.com/callemall/material-ui/pull/2635)] Document the new theme calculation, and it's usage.
- [ ] [[#3096](https://github.com/callemall/material-ui/pull/3096)] Annotate callback props with @param tags.
- [ ] [[#3191](https://github.com/callemall/material-ui/issues/3191)] Improve component property documentation.

### Future

Expand Down
4 changes: 3 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"native:development": "node_modules/react-native/packager/packager.sh --reset-cache",
"android:setup-port": "adb reverse tcp:8081 tcp:8081"
},
"dependencies": {},
"dependencies": {
"react-title-component": "^1.0.1"
},
"devDependencies": {
"babel-eslint": "^4.1.6",
"babel-plugin-transform-react-constant-elements": "^6.3.13",
Expand Down
8 changes: 4 additions & 4 deletions docs/src/app/components/PropTypeDescription.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function generatePropType(type) {
return type.raw;

case 'enum':
const values = type.value.map(v => v.value).join('<br>&nbsp;');
const values = type.value.map((v) => v.value).join('<br>&nbsp;');
return `enum:<br>&nbsp;${values}<br>`;

default:
Expand All @@ -64,15 +64,15 @@ function generateDescription(required, description, type) {
// must be eliminated to prevent markdown mayhem.
const jsDocText = parsed.description.replace(/\n\n/g, '<br>').replace(/\n/g, ' ');

if (parsed.tags.some(tag => tag.title === 'ignore')) return null;
if (parsed.tags.some((tag) => tag.title === 'ignore')) return null;

let signature = '';

if (type.name === 'func' && parsed.tags.length > 0) {
signature += '<br><br>**Signature:**<br>`function(';
signature += parsed.tags.map(tag => `${tag.name}: ${tag.type.name}`).join(', ');
signature += parsed.tags.map((tag) => `${tag.name}: ${tag.type.name}`).join(', ');
signature += ') => void`<br>';
signature += parsed.tags.map(tag => `*${tag.name}:* ${tag.description}`).join('<br>');
signature += parsed.tags.map((tag) => `*${tag.name}:* ${tag.description}`).join('<br>');
}

return `${deprecated} ${jsDocText}${signature}`;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/components/app-left-nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const AppLeftNav = React.createClass({
cursor: 'pointer',
fontSize: 24,
color: Typography.textFullWhite,
lineHeight: Spacing.desktopKeylineIncrement + 'px',
lineHeight: `${Spacing.desktopKeylineIncrement}px`,
fontWeight: Typography.fontWeightLight,
backgroundColor: Colors.cyan500,
paddingLeft: Spacing.desktopGutter,
Expand Down
27 changes: 13 additions & 14 deletions docs/src/app/components/component-doc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,23 @@ const ComponentDoc = React.createClass({
let borderColor = this.context.muiTheme.rawTheme.palette.borderColor;
return {
desc: {
borderBottom: 'solid 1px ' + borderColor,
paddingTop: '8px',
paddingBottom: '40px',
marginBottom: '24px',
//mui-font-style-subhead-1
fontSize: '15px',
borderBottom: `solid 1px ${borderColor}`,
paddingTop: 8,
paddingBottom: 40,
marginBottom: 24,
fontSize: 15,
letterSpacing: '0',
lineHeight: '24px',
color: Typography.textDarkBlack,
},
ol: {
fontSize: '13px',
paddingLeft: '48px',
fontSize: 13,
paddingLeft: 48,
},
componentInfo: {
borderTop: 'solid 1px ' + borderColor,
paddingTop: '24px',
marginTop: '24px',
borderTop: `solid 1px ${borderColor}`,
paddingTop: 24,
marginTop: 24,
},
componentInfoWhenFirstChild: {
borderTop: 'none',
Expand All @@ -52,10 +51,10 @@ const ComponentDoc = React.createClass({
},
headline: {
//headline
fontSize: '24px',
fontSize: 24,
lineHeight: '32px',
paddingTop: '16px',
marginBottom: '12px',
paddingTop: 16,
marginBottom: 12,
letterSpacing: '0',
fontWeight: Typography.fontWeightNormal,
color: Typography.textDarkBlack,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/components/component-info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ComponentInfo = React.createClass({
desc: {
width: '100%',
paddingTop: 48,
borderBottom: 'solid 1px ' + borderColor,
borderBottom: `1px solid ${borderColor}`,
},
p: {
margin: '0',
Expand Down
14 changes: 7 additions & 7 deletions docs/src/app/components/full-width-section.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {ClearFix, Mixins, Styles} from 'material-ui';
let {StylePropable, StyleResizable} = Mixins;
let DesktopGutter = Styles.Spacing.desktopGutter;
const desktopGutter = Styles.Spacing.desktopGutter;

const FullWidthSection = React.createClass({

Expand All @@ -28,20 +28,20 @@ const FullWidthSection = React.createClass({
getStyles() {
return {
root: {
padding: DesktopGutter + 'px',
padding: desktopGutter,
boxSizing: 'border-box',
},
content: {
maxWidth: '1200px',
maxWidth: 1200,
margin: '0 auto',
},
rootWhenSmall: {
paddingTop: DesktopGutter * 2,
paddingBottom: DesktopGutter * 2,
paddingTop: desktopGutter * 2,
paddingBottom: desktopGutter * 2,
},
rootWhenLarge: {
paddingTop: DesktopGutter * 3,
paddingBottom: DesktopGutter * 3,
paddingTop: desktopGutter * 3,
paddingBottom: desktopGutter * 3,
},
};
},
Expand Down
13 changes: 5 additions & 8 deletions docs/src/app/components/master.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import React from 'react';
import Title from 'react-title-component';

import AppBar from 'material-ui/lib/app-bar';
import IconButton from 'material-ui/lib/icon-button';
import {Spacing} from 'material-ui/lib/styles';
import {
StylePropable,
StyleResizable,
} from 'material-ui/lib/mixins';
import {StylePropable, StyleResizable} from 'material-ui/lib/mixins';

import {
Colors,
getMuiTheme,
} from 'material-ui/lib/styles';
import {Colors, getMuiTheme} from 'material-ui/lib/styles';

import AppLeftNav from './app-left-nav';
import FullWidthSection from './full-width-section';
Expand Down Expand Up @@ -172,6 +168,7 @@ const Master = React.createClass({

return (
<div>
<Title render="Material-UI" />
<AppBar
onLeftIconButtonTouchTap={this.handleTouchTapLeftIconButton}
title={title}
Expand Down
3 changes: 3 additions & 0 deletions docs/src/app/components/pages/components/AppBar/Page.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react';
import Title from 'react-title-component';

import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
Expand All @@ -22,6 +24,7 @@ const descriptions = {

const AppBarPage = () => (
<div>
<Title render={(previousTitle) => `App Bar - ${previousTitle}`} />
<MarkdownElement text={appBarReadmeText} />
<CodeExample
code={appBarExampleIconCode}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ export default class AutoCompleteExampleSimple extends React.Component {
};
}

handleUpdateInput = (t) => {
handleUpdateInput = (value) => {
this.setState({
dataSource: [t, t + t, t + t + t],
dataSource: [
value,
value + value,
value + value + value,
],
});
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react';
import Title from 'react-title-component';

import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
Expand All @@ -22,6 +24,7 @@ const descriptions = {

const AutoCompletesPage = () => (
<div>
<Title render={(previousTitle) => `Auto Complete - ${previousTitle}`} />
<MarkdownElement text={autoCompleteReadmeText} />
<CodeExample
code={autoCompleteExampleSimpleCode}
Expand Down
3 changes: 3 additions & 0 deletions docs/src/app/components/pages/components/Avatar/Page.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react';
import Title from 'react-title-component';

import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
Expand All @@ -13,6 +15,7 @@ const description = 'Examples of `Avatar` using an image, [Font Icon](/#/compone

const AvatarsPage = () => (
<div>
<Title render={(previousTitle) => `Avatar - ${previousTitle}`} />
<MarkdownElement text={avatarReadmeText} />
<CodeExample
code={avatarExampleSimpleCode}
Expand Down
3 changes: 3 additions & 0 deletions docs/src/app/components/pages/components/Badge/Page.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react';
import Title from 'react-title-component';

import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
Expand All @@ -21,6 +23,7 @@ const descriptions = {

const BadgePage = () => (
<div>
<Title render={(previousTitle) => `Badge - ${previousTitle}`} />
<MarkdownElement text={badgeReadmeText} />
<CodeExample
title="Simple examples"
Expand Down
3 changes: 3 additions & 0 deletions docs/src/app/components/pages/components/Card/Page.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react';
import Title from 'react-title-component';

import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
Expand Down Expand Up @@ -26,6 +28,7 @@ const descriptions = {

const CardPage = () => (
<div>
<Title render={(previousTitle) => `Card - ${previousTitle}`} />
<MarkdownElement text={cardReadmeText} />
<CodeExample
title="Card components example"
Expand Down
3 changes: 3 additions & 0 deletions docs/src/app/components/pages/components/Checkbox/Page.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react';
import Title from 'react-title-component';

import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
Expand All @@ -15,6 +17,7 @@ const description = 'The second example is selected by default using the `defaul

const CheckboxPage = () => (
<div>
<Title render={(previousTitle) => `Checkbox - ${previousTitle}`} />
<MarkdownElement text={checkboxReadmeText} />
<CodeExample
title="Examples"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react';
import Title from 'react-title-component';

import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
Expand All @@ -18,6 +20,7 @@ const descriptions = {

const CircleProgressPage = () => (
<div>
<Title render={(previousTitle) => `Circular Progress - ${previousTitle}`} />
<MarkdownElement text={circleProgressReadmeText} />
<CodeExample
title="Indeterminate progress"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import DatePicker from 'material-ui/lib/date-picker/date-picker';

function disableWeekends(date) {
return date.getDay() === 0 || date.getDay() === 6;
}

function disableRandomDates() {
return Math.random() > 0.7;
}

const DatePickerExampleDisableDates = () => (
<div>
<DatePicker hintText="Weekends Disabled" shouldDisableDate={disableWeekends}/>
<DatePicker hintText="Random Dates Disabled" shouldDisableDate={disableRandomDates}/>
</div>
);

export default DatePickerExampleDisableDates;
Loading

0 comments on commit 6dc1f04

Please sign in to comment.