Skip to content

Commit fccdb33

Browse files
authored
Merge pull request #68 from oyvindberg/material-ui-0.15
Material ui 0.15
2 parents 5b0444e + 9598666 commit fccdb33

File tree

168 files changed

+2768
-2160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+2768
-2160
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ project/plugins/project/
3131
assets/
3232
node_modules/
3333
/core/docs
34+
.DS_Store

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Adding types to javascript is a lot of guesswork, and we're certain to have gott
1515
### Wrappers for javascript components:
1616
These components require you to provide javascript yourself.
1717

18-
- Material-ui 0.14.4
18+
- Material-ui 0.15.2
1919
- Elemental-ui 0.5.4
2020
- Google maps (downloads js directly from google)
2121
- React GeomIcon (react-geomicons: 2.0.4)
@@ -79,9 +79,9 @@ Sbt does not by itself understand these module systems, so unless you're prepare
7979
Add these dependencies to you sbt build file
8080
```scala
8181
libraryDependencies ++= Seq(
82-
"com.github.japgolly.scalajs-react" %%% "core" % "0.10.4",
83-
"com.github.japgolly.scalajs-react" %%% "extra" % "0.10.4",
84-
"com.github.chandu0101.scalajs-react-components" %%% "core" % "0.4.1"
82+
"com.github.japgolly.scalajs-react" %%% "core" % "0.11.1",
83+
"com.github.japgolly.scalajs-react" %%% "extra" % "0.11.1",
84+
"com.github.chandu0101.scalajs-react-components" %%% "core" % "0.5.0"
8585
)
8686
```
8787

core/src/main/scala/chandu0101/scalajs/react/components/helpers.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import scala.scalajs.js
1111
import scala.scalajs.js.JSON
1212

1313
object WithAsyncScript {
14-
case class Props(scripts: Set[String], toRender: ReactElement, loadingScreenOpt: js.UndefOr[Set[String] => ReactElement])
14+
class Props(val scripts: Set[String], _toRender: ReactElement, val loadingScreenOpt: js.UndefOr[Set[String] => ReactElement]){
15+
lazy val toRender = _toRender
16+
}
1517

1618
case class Backend($: BackendScope[Props, Set[String]]){
1719
def render(P: Props, loadedScripts: Set[String]) =
@@ -52,8 +54,8 @@ object WithAsyncScript {
5254
.componentWillMount($ => $.backend.load($.props, $.state))
5355
.build
5456

55-
def apply(scripts: String*)(e: ReactElement, loadingScreenOpt: js.UndefOr[Set[String] => ReactElement] = js.undefined) =
56-
component(Props(scripts.toSet, e, loadingScreenOpt))
57+
def apply(scripts: String*)(e: ReactElement, loadingScreenOpt: js.UndefOr[Set[String] => ReactElement] = js.undefined) =
58+
component(new Props(scripts.toSet, e, loadingScreenOpt))
5759
}
5860

5961

core/src/main/scala/chandu0101/scalajs/react/components/materialui/Mui.scala

Lines changed: 67 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -5,78 +5,71 @@ import scala.scalajs.js.annotation.JSName
55

66
@js.native @JSName("mui")
77
object Mui extends js.Object {
8-
val AppBar: js.Dynamic = js.native
9-
val AppCanvas: js.Dynamic = js.native
10-
val Avatar: js.Dynamic = js.native
11-
val AutoComplete: js.Dynamic = js.native
12-
val Badge: js.Dynamic = js.native
13-
val BeforeAfterWrapper: js.Dynamic = js.native
14-
val Card: js.Dynamic = js.native
15-
val CardActions: js.Dynamic = js.native
16-
val CardExpandable: js.Dynamic = js.native
17-
val CardHeader: js.Dynamic = js.native
18-
val CardMedia: js.Dynamic = js.native
19-
val CardText: js.Dynamic = js.native
20-
val CardTitle: js.Dynamic = js.native
21-
val Checkbox: js.Dynamic = js.native
22-
val CircleRipple: js.Dynamic = js.native
23-
val CircularProgress: js.Dynamic = js.native
24-
val ClearFix: js.Dynamic = js.native
25-
val DatePicker: js.Dynamic = js.native
26-
val DatePickerDialog: js.Dynamic = js.native
27-
val Dialog: js.Dynamic = js.native
28-
val Divider: js.Dynamic = js.native
29-
val DropDownIcon: js.Dynamic = js.native
30-
val DropDownMenu: js.Dynamic = js.native
31-
val EnhancedButton: js.Dynamic = js.native
32-
val FlatButton: js.Dynamic = js.native
33-
val FloatingActionButton: js.Dynamic = js.native
34-
val FocusRipple: js.Dynamic = js.native
35-
val FontIcon: js.Dynamic = js.native
36-
val GridList: js.Dynamic = js.native
37-
val GridTile: js.Dynamic = js.native
38-
val IconButton: js.Dynamic = js.native
39-
val IconMenu: js.Dynamic = js.native
40-
val LeftNav: js.Dynamic = js.native
41-
val LinearProgress: js.Dynamic = js.native
42-
val List: js.Dynamic = js.native
43-
val ListDivider: js.Dynamic = js.native
44-
val ListItem: js.Dynamic = js.native
45-
val Menu: js.Dynamic = js.native
46-
val MenuDivider: js.Dynamic = js.native
47-
val MenuItem: js.Dynamic = js.native
48-
val Mixins: js.Dynamic = js.native
49-
val Overlay: js.Dynamic = js.native
50-
val Paper: js.Dynamic = js.native
51-
val Popover: js.Dynamic = js.native
52-
val RadioButton: js.Dynamic = js.native
53-
val RadioButtonGroup: js.Dynamic = js.native
54-
val RaisedButton: js.Dynamic = js.native
55-
val RefreshIndicator: js.Dynamic = js.native
56-
val Ripples: js.Dynamic = js.native
57-
val SelectField: js.Dynamic = js.native
58-
val Slider: js.Dynamic = js.native
59-
val SvgIcons: MuiSvgIcons = js.native
60-
val Styles: MuiStyles = js.native
61-
val Snackbar: js.Dynamic = js.native
62-
val Tab: js.Dynamic = js.native
63-
val Tabs: js.Dynamic = js.native
64-
val Table: js.Dynamic = js.native
65-
val TableBody: js.Dynamic = js.native
66-
val TableFooter: js.Dynamic = js.native
67-
val TableHeader: js.Dynamic = js.native
68-
val TableHeaderColumn: js.Dynamic = js.native
69-
val TableRow: js.Dynamic = js.native
70-
val TableRowColumn: js.Dynamic = js.native
71-
val Toggle: js.Dynamic = js.native
72-
val TouchRipple: js.Dynamic = js.native
73-
val ThemeWrapper: js.Dynamic = js.native
74-
val TimePicker: js.Dynamic = js.native
75-
val TextField: js.Dynamic = js.native
76-
val Toolbar: js.Dynamic = js.native
77-
val ToolbarGroup: js.Dynamic = js.native
78-
val ToolbarSeparator: js.Dynamic = js.native
79-
val ToolbarTitle: js.Dynamic = js.native
80-
val Tooltip: js.Dynamic = js.native
81-
val Utils: MuiUtil = js.native
8+
val AppBar: js.Dynamic = js.native
9+
val Avatar: js.Dynamic = js.native
10+
val AutoComplete: js.Dynamic = js.native
11+
val Badge: js.Dynamic = js.native
12+
val Card: js.Dynamic = js.native
13+
val CardActions: js.Dynamic = js.native
14+
val CardExpandable: js.Dynamic = js.native
15+
val CardHeader: js.Dynamic = js.native
16+
val CardMedia: js.Dynamic = js.native
17+
val CardText: js.Dynamic = js.native
18+
val CardTitle: js.Dynamic = js.native
19+
val Checkbox: js.Dynamic = js.native
20+
val Chip: js.Dynamic = js.native
21+
val CircularProgress: js.Dynamic = js.native
22+
val DatePicker: js.Dynamic = js.native
23+
val Dialog: js.Dynamic = js.native
24+
val Divider: js.Dynamic = js.native
25+
val Drawer: js.Dynamic = js.native
26+
val DropDownMenu: js.Dynamic = js.native
27+
val FlatButton: js.Dynamic = js.native
28+
val FloatingActionButton: js.Dynamic = js.native
29+
val FontIcon: js.Dynamic = js.native
30+
val GridList: js.Dynamic = js.native
31+
val GridTile: js.Dynamic = js.native
32+
val IconButton: js.Dynamic = js.native
33+
val IconMenu: js.Dynamic = js.native
34+
val LinearProgress: js.Dynamic = js.native
35+
val List: js.Dynamic = js.native
36+
val ListItem: js.Dynamic = js.native
37+
val Menu: js.Dynamic = js.native
38+
val MenuItem: js.Dynamic = js.native
39+
val Paper: js.Dynamic = js.native
40+
val Popover: js.Dynamic = js.native
41+
val PopoverAnimationVertical: js.Dynamic = js.native
42+
val RadioButton: js.Dynamic = js.native
43+
val RadioButtonGroup: js.Dynamic = js.native
44+
val RaisedButton: js.Dynamic = js.native
45+
val RefreshIndicator: js.Dynamic = js.native
46+
val SelectField: js.Dynamic = js.native
47+
val Slider: js.Dynamic = js.native
48+
val SvgIcons: MuiSvgIcons = js.native
49+
val Step: js.Dynamic = js.native
50+
val StepButton: js.Dynamic = js.native
51+
val StepContent: js.Dynamic = js.native
52+
val StepLabel: js.Dynamic = js.native
53+
val Stepper: js.Dynamic = js.native
54+
val Styles: MuiStyles = js.native
55+
val Snackbar: js.Dynamic = js.native
56+
val Subheader: js.Dynamic = js.native
57+
val Tab: js.Dynamic = js.native
58+
val Tabs: js.Dynamic = js.native
59+
val Table: js.Dynamic = js.native
60+
val TableBody: js.Dynamic = js.native
61+
val TableFooter: js.Dynamic = js.native
62+
val TableHeader: js.Dynamic = js.native
63+
val TableHeaderColumn: js.Dynamic = js.native
64+
val TableRow: js.Dynamic = js.native
65+
val TableRowColumn: js.Dynamic = js.native
66+
val Toggle: js.Dynamic = js.native
67+
val ThemeWrapper: js.Dynamic = js.native
68+
val TimePicker: js.Dynamic = js.native
69+
val TextField: js.Dynamic = js.native
70+
val Toolbar: js.Dynamic = js.native
71+
val ToolbarGroup: js.Dynamic = js.native
72+
val ToolbarSeparator: js.Dynamic = js.native
73+
val ToolbarTitle: js.Dynamic = js.native
74+
val Utils: MuiUtil = js.native
8275
}

core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiAppBar.scala

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
package chandu0101.scalajs.react.components
22
package materialui
3-
43
import chandu0101.macros.tojs.JSMacro
54
import japgolly.scalajs.react._
65
import scala.scalajs.js
76
import scala.scalajs.js.`|`
8-
97
/**
108
* This file is generated - submit issues instead of PR against it
119
*/
12-
1310
case class MuiAppBar(
1411
key: js.UndefOr[String] = js.undefined,
1512
ref: js.UndefOr[String] = js.undefined,
1613
/* Applied to the app bar's root element.*/
1714
className: js.UndefOr[String] = js.undefined,
1815
/* The classname of the icon on the left of the app bar.
19-
If you are using a stylesheet for your icons, enter the class name for the icon to be used here.*/
16+
If you are using a stylesheet for your icons, enter the class name for the icon to be used here.*/
2017
iconClassNameLeft: js.UndefOr[String] = js.undefined,
2118
/* Similiar to the iconClassNameLeft prop except that
22-
it applies to the icon displayed on the right of the app bar.*/
19+
it applies to the icon displayed on the right of the app bar.*/
2320
iconClassNameRight: js.UndefOr[String] = js.undefined,
2421
/* The custom element to be displayed on the left side of the
25-
app bar such as an SvgIcon.*/
22+
app bar such as an SvgIcon.*/
2623
iconElementLeft: js.UndefOr[ReactElement] = js.undefined,
2724
/* Similiar to the iconElementLeft prop except that this element is displayed on the right of the app bar.*/
2825
iconElementRight: js.UndefOr[ReactElement] = js.undefined,
26+
/* Override the inline-styles of the element displayed on the left side of the app bar.*/
27+
iconStyleLeft: js.UndefOr[CssProperties] = js.undefined,
2928
/* Override the inline-styles of the element displayed on the right side of the app bar.*/
3029
iconStyleRight: js.UndefOr[CssProperties] = js.undefined,
3130
/* Callback function for when the left icon is selected via a touch tap.*/
@@ -35,7 +34,7 @@ app bar such as an SvgIcon.*/
3534
/* Callback function for when the title text is selected via a touch tap.*/
3635
onTitleTouchTap: js.UndefOr[ReactTouchEventH => Callback] = js.undefined,
3736
/* Determines whether or not to display the Menu icon next to the title.
38-
Setting this prop to false will hide the icon.*/
37+
Setting this prop to false will hide the icon.*/
3938
showMenuIconButton: js.UndefOr[Boolean] = js.undefined,
4039
/* Override the inline-styles of the root element.*/
4140
style: js.UndefOr[CssProperties] = js.undefined,
@@ -44,8 +43,18 @@ Setting this prop to false will hide the icon.*/
4443
/* Override the inline-styles of the app bar's title element.*/
4544
titleStyle: js.UndefOr[CssProperties] = js.undefined,
4645
/* The zDepth of the component.
47-
The shadow of the app bar is also dependent on this property.*/
48-
zDepth: js.UndefOr[ZDepth] = js.undefined){
46+
The shadow of the app bar is also dependent on this property.*/
47+
zDepth: js.UndefOr[ZDepth] = js.undefined,
48+
/* Set to true to generate a circlular paper container.
49+
(Passed on to Paper)*/
50+
circle: js.UndefOr[Boolean] = js.undefined,
51+
/* By default, the paper container will have a border radius.
52+
Set this to false to generate a container with sharp corners.
53+
(Passed on to Paper)*/
54+
rounded: js.UndefOr[Boolean] = js.undefined,
55+
/* Set to false to disable CSS transitions for the paper element.
56+
(Passed on to Paper)*/
57+
transitionEnabled: js.UndefOr[Boolean] = js.undefined){
4958
/**
5059
* @param children Can be used to render a tab inside an app bar for instance.
5160
*/

core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiAppCanvas.scala

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)