Skip to content

Commit 43e9cb8

Browse files
committed
convert docs to markdown
1 parent 15b1178 commit 43e9cb8

29 files changed

+2344
-1135
lines changed

docs/components/EditableExample.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ function scopedEval(code, mountNode) {
1919
return (new Function( "with(this) { " + code + "}")).call(context);
2020
}
2121

22+
config.plugins = []
23+
2224
module.exports = React.createClass({
2325

2426
propTypes: {

docs/components/PageMixin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ module.exports = function(prefix){
2323

2424
getChildContext() {
2525
return { prefix };
26-
},
27-
26+
}
2827
}
2928
}
3029

docs/components/PropHeader.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ var ApiPropHeader = React.createClass({
1616
, controllable
1717
, ...props } = this.props;
1818

19+
var id = this.context.prefix + children.replace(' ', '_')
1920

2021
return (
21-
<h3 className='prop-header' id={`/${this.context.prefix + children.replace(' ', '_')}`}>
22+
<h3 className='prop-header' id={`/${id}`}>
23+
<a href={'#/' + id }>
2224
{ children }
2325
{ type &&
2426
<small>
@@ -31,6 +33,7 @@ var ApiPropHeader = React.createClass({
3133
{ controllable &&
3234
<strong>{`controllable (${handler}, ${defaultKey(children)})`}</strong>
3335
}
36+
</a>
3437
</h3>
3538
);
3639
}

docs/components/docs.jsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ var React = require('react')
1010

1111
, Affix = require('../bootstrap').Affix
1212
, Navbar = require('./topnavbar.jsx')
13-
, GettingStarted = require('./pages/GettingStarted.jsx')
14-
, DropdownList = require('./pages/DropdownList.jsx')
15-
, ComboBox = require('./pages/ComboBox.jsx')
16-
, MultiSelect = require('./pages/MultSelect.jsx')
13+
, GettingStarted = require('./pages/GettingStarted.md')
14+
, DropdownList = require('./pages/DropdownList.api.md')
15+
, ComboBox = require('./pages/ComboBox.api.md')
16+
, MultiSelect = require('./pages/Multiselect.api.md')
1717
, SelectList = require('./pages/SelectList.jsx')
18-
, Calendar = require('./pages/Calendar.jsx')
19-
, DatePicker = require('./pages/DateTimePicker.jsx')
20-
, NumberPicker = require('./pages/NumberPicker.jsx')
18+
, Calendar = require('./pages/Calendar.api.md')
19+
, DatePicker = require('./pages/DateTimePicker.api.md')
20+
, NumberPicker = require('./pages/NumberPicker.api.md')
2121
, Migration = require('./pages/Migration.jsx')
2222
, Advanced = require('./pages/Advanced.jsx')
23-
, Locale = require('./pages/i18n.jsx');
24-
23+
, Locale = require('./pages/i18n.MD');
2524

2625
require('../vendor/codemirror.css')
2726
require('../vendor/neo.css')
@@ -66,16 +65,16 @@ var Docs = React.createClass({
6665
<Link to='/getting-started'>Getting Started</Link>
6766
<ul className='nav'>
6867
<li><Link to='/getting-started/install'>Install</Link></li>
69-
<li><Link to='/getting-started/deps'>External Dependencies</Link></li>
7068
<li><Link to='/getting-started/browser'>Older Browser Support</Link></li>
7169
<li><Link to='/getting-started/access'>Accessibility</Link></li>
72-
<li><Link to='/getting-started/style'>Styling</Link></li>
7370
<li><Link to='/getting-started/configuration'>Configuration</Link></li>
71+
<li><Link to='/getting-started/style'>Theming</Link></li>
72+
7473
</ul>
7574
</li>
7675
<li><Link to='dropdown-list'>Dropdown List</Link></li>
7776
<li><Link to='combobox' href='#combobox'>Combobox</Link></li>
78-
<li><Link to='number-picker' href='#number-picker'>Number Picker</Link></li>
77+
<li><Link to='numberpicker' href='#number-picker'>Number Picker</Link></li>
7978
<li><Link to='multiselect' href='#multiselect'>Multiselect</Link></li>
8079
<li><Link to='selectlist'>SelectList</Link></li>
8180
<li><Link to='calendar'>Calendar</Link></li>
@@ -157,7 +156,7 @@ var routes = (
157156
<Route name="datetime-picker" handler={DatePicker}>
158157
<Route path=':topic' handler={DatePicker}/>
159158
</Route>
160-
<Route name="number-picker" handler={NumberPicker}>
159+
<Route name="numberpicker" handler={NumberPicker}>
161160
<Route path=':topic' handler={NumberPicker}/>
162161
</Route>
163162

docs/components/pages/Calendar.api.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
### value?{ type: 'Date?', handler: "onChange", controllable: true }
2+
3+
The current selected date, should be a Date object or null.
4+
5+
<EditableExample codeText={require('../examples/valuePicker')(widgetName, ['new Date()'])}/>
6+
7+
### onChange?{ type: 'Function( Date? date )' }
8+
9+
Change event Handler that is called when the value is changed. The handler is called with the Date object
10+
11+
<EditableExample codeText={require('../examples/onChangePicker')(widgetName, ['new Date()'])}/>
12+
13+
### min?{ type: 'Date' }
14+
15+
The minimum date that the Calendar can navigate from.
16+
17+
18+
### max?{ type: 'Date' }
19+
20+
The maximum date that the Calendar can navigate to.
21+
22+
### footer?{ type: 'Boolean', default: 'false' }
23+
24+
Show or hide the Calendar footer.
25+
26+
<EditableExample codeText={require('../examples/prop')(widgetName, 'footer', 'true')}/>
27+
28+
### initialView?{ type: 'Enum', default: '"month"' }
29+
30+
The starting and lowest level view the calendar can navigate down to.
31+
32+
Acceptable values are:
33+
`"month"` `"year"` `"decade"` `"century"`
34+
35+
<EditableExample codeText={require('../examples/prop')(widgetName, 'initialView', '"year"')}/>
36+
37+
### finalView?{ type: 'Enum', default: '"century"' }
38+
39+
The highest level view the calendar can navigate up to. This value should be higher
40+
than `initialView`
41+
42+
Acceptable values are: `"month"` `"year"` `"decade"` `"century"`
43+
44+
<EditableExample codeText={require('../examples/prop')(widgetName, 'finalView', '"year"')}/>
45+
46+
### headerFormat?{ type: 'String | Function(Date? date)', default: "'MMMM yyyy'" }
47+
48+
A formatter for the header button of the month view
49+
50+
<EditableExample codeText={require('../examples/prop')(widgetName, 'headerFormat', '"MMM yy"')}/>
51+
52+
### footerFormat?{ type: 'String | Function(Date? date)', default: "'D'" }
53+
54+
A formatter for the Calendar footer, formats Today's Date as a string.
55+
56+
<EditableExample codeText={require('../examples/prop')(widgetName, { footerFormat: "\"'today is:' dddd\"", footer: true })}/>
57+
58+
### dayFormat?{ type: 'String | Function(Number dayOfTheWeek)', default: "Function()" }
59+
60+
A formatter calendar days of the week, the default formats each day as a Narrow name: "Mo", "Tu", etc.
61+
62+
<EditableExample codeText={require('../examples/prop')(
63+
widgetName, { dayFormat: "day => ['M', 'T','W','Th', 'F', '!', '!'][day]" })}/>
64+
65+
### dateFormat?{ type: 'String | Function(Date? date)', default: "'dd'" }
66+
67+
A formatter for day of the month
68+
<EditableExample codeText={require('../examples/prop')(
69+
widgetName, { dateFormat: "dt => dt.getDate()", footer: true })}/>
70+
71+
### monthFormat?{ type: 'String | Function(Date? date)', default: "'MMM'" }
72+
73+
A formatter for month name.
74+
75+
<EditableExample codeText={require('../examples/prop')(
76+
widgetName, { monthFormat: "'MMMM'", initialView: "'year'" })}/>
77+
78+
### yearFormat?{ type: 'String | Function(Date? date)', default: "'YYYY'" }
79+
80+
A formatter for the year.
81+
82+
<EditableExample codeText={require('../examples/prop')(
83+
widgetName, { yearFormat: "'yy'", initialView: "'decade'" })}/>
84+
85+
### decadeFormat?{ type: 'String | Function(Date? date)', default: "Function()" }
86+
87+
A formatter for decade, the default formats the first and last year of the decade like: 2000 - 2009.
88+
89+
### centuryFormat?{ type: 'String | Function(Date? date)', default: "Function()" }
90+
91+
A formatter for century, the default formats the first and last year of the century like: 1900 - 1999.
92+
93+
94+
### isRtl?{ type: 'Boolean', default: "false" }
95+
96+
mark whether the widget should render right-to-left. This property can also be implicitly passed to the widget through
97+
a `childContext` prop (`isRtl`) this allows higher level application components to specify the direction.
98+
99+
100+
### messages?{ type: 'Object' }
101+
102+
Object hash containing display text and/or text for screen readers. Use the `messages` object to
103+
localize widget text and increase accessibility.
104+
105+
106+
### messages.moveBack?{ type: 'String', default: '"navigate back"' }
107+
108+
title and screen reader text for the left arrow button
109+
110+
111+
### messages.moveForward?{ type: 'String', default: '"navigate forward"' }
112+
113+
title and screen reader text for the right arrow button
114+
115+
## Keyboard Navigation
116+
117+
- <kbd>ctrl + down arrow</kbd> navigate to next view
118+
- <kbd>ctrl + up arrow</kbd> navigate to previous view
119+
- <kbd>ctrl + left arrow</kbd> navigate to previous: month, year, decade, century
120+
- <kbd>ctrl + right arrow</kbd> navigate to next: month, year, decade, century
121+
- <kbd>left arrow</kbd> move focus to previous date
122+
- <kbd>right arrow</kbd> move focus to next date
123+
- <kbd>up arrow</kbd> move focus up within view
124+
- <kbd>down arrow</kbd> move focus down within view

0 commit comments

Comments
 (0)