-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d05f06e
Showing
22 changed files
with
221 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.json] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.hx] | ||
indent_style = tab | ||
indent_size = 4 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Rudy Ges | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# TODO: include enzyme and add tests | ||
-lib react:git:https://github.com/kLabz/haxe-react.git#next | ||
-D react_deprecated_refs | ||
|
||
-cp src | ||
# TODO: include files | ||
--js .build/test.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "material-ui", | ||
"description": "Material UI - React components that implement Google's Material Design", | ||
"version": "0.0.1", | ||
"releasenote": "TODO", | ||
"url": "https://gitlab.com/k-labz/haxe-oss/haxe-material-ui", | ||
"license": "MIT", | ||
"tags": [], | ||
"classPath": "src", | ||
"contributors": [ | ||
"klabz" | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package mui; | ||
|
||
@:genericBuild(mui.macro.Builder.buildStandardProps()) | ||
interface StandardProps<ClassKey:String> { | ||
@:optional var className:String; | ||
@:optional var style:Dynamic; // TODO: React.CSSProperties in ts.react | ||
@:optional var innerRef:react.ReactRef<Any>; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'AppBar') | ||
extern class AppBar extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'Button') | ||
extern class Button extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'CssBaseline') | ||
extern class CssBaseline extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'LinearProgress') | ||
extern class LinearProgress extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'List') | ||
extern class List extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'ListItem') | ||
extern class ListItem extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'ListItemText') | ||
extern class ListItemText extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'Paper') | ||
extern class Paper extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'Tab') | ||
extern class Tab extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
// TODO !! (temp) | ||
typedef TabsProps = { | ||
@:optional var className:String; | ||
@:optional var onChange:Dynamic->String->Void; | ||
var value:String; | ||
} | ||
|
||
@:jsRequire('@material-ui/core', 'Tabs') | ||
extern class Tabs extends ReactComponentOfProps<TabsProps> {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core', 'Toolbar') | ||
extern class Toolbar extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package mui.core; | ||
|
||
import mui.StandardProps; | ||
import react.ReactComponent; | ||
|
||
@:enum abstract TypographyClassKey(String) to String { | ||
var Root = "root"; | ||
var Display1 = "display1"; | ||
var Display2 = "display2"; | ||
var Display3 = "display3"; | ||
var Display4 = "display4"; | ||
// ... TODO | ||
} | ||
|
||
typedef TypographyProps = { | ||
> StandardProps<TypographyClassKey>, | ||
// ... TODO | ||
} | ||
|
||
@:jsRequire('@material-ui/core', 'Typography') | ||
extern class Typography extends ReactComponent {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package mui.core.styles; | ||
|
||
@:jsRequire('@material-ui/core/styles') | ||
extern class MuiTheme { | ||
public static function createMuiTheme(options:Dynamic):Dynamic; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mui.core.styles; | ||
|
||
import react.ReactComponent; | ||
|
||
@:jsRequire('@material-ui/core/styles', 'MuiThemeProvider') | ||
extern class MuiThemeProvider extends ReactComponent {} // TODO: props | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package mui.macro; | ||
|
||
import haxe.macro.Context; | ||
import haxe.macro.Expr; | ||
import ts.macro.RecordMacro; | ||
|
||
class Builder { | ||
public static function buildStandardProps():ComplexType { | ||
var fields = Context.getBuildFields(); | ||
var classesType:ComplexType; | ||
|
||
try { | ||
classesType = RecordMacro.buildRecord( | ||
Context.getLocalType(), | ||
macro :String, | ||
true | ||
); | ||
} catch (e:String) { | ||
trace('TODO: error message'); | ||
return null; | ||
} | ||
|
||
fields.push({ | ||
kind: FVar(classesType, null), | ||
name: "classes", | ||
pos: Context.currentPos() | ||
}); | ||
|
||
return TAnonymous(fields); | ||
} | ||
} |