Componente login

This commit is contained in:
Juan Ferrer Toribio 2016-11-03 15:36:33 +01:00
parent 11102f0d5d
commit 8d147f0c5f
9 changed files with 36 additions and 14 deletions

View File

@ -1,3 +1,4 @@
<input type="checkbox" class="*[className]*" *[enabled]* >
<span class="mdl-checkbox__label"> *[text]*</span>
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="*[name]*">
<input type="checkbox" name="*[name]*" id="*[name]*" class="*[className]*" *[enabled]*>
<span class="mdl-checkbox__label">*[label]*</span>
</label>

View File

@ -5,7 +5,7 @@ import template from './check.mt.html';
const _NAME = 'check';
const DEFAULT_TEXT = 'check';
const DEFAULT_CLASS = 'mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect';
const DEFAULT_CLASS = 'mdl-checkbox__input';
export const NAME = util.getFactoryName(_NAME + constant.MATERIAL_DESIGN_FRAMEWORK);
@ -13,8 +13,9 @@ export function factory() {
return {
template: template,
default: {
text: DEFAULT_TEXT,
label: DEFAULT_TEXT,
enabled: 'true',
id: 'checkboxId',
className: DEFAULT_CLASS
}
}

View File

@ -25,3 +25,15 @@ export {NAME as TEXTFIELDBT,factory as textfieldbt} from './textfield/textfield.
export {NAME as LABEL,directive as LabelDirective} from './label/label'
export {NAME as LABELMT,factory as labelmt} from './label/label.mt'
export {NAME as LABELBT,factory as labelbt} from './label/label.bt'
export {NAME as PASSWORD,directive as PasswordDirective} from './password/password'
export {NAME as PASSWORDMT,factory as passwordmt} from './password/password.mt'
export {NAME as SUBMIT,directive as SubmitDirective} from './submit/submit'
export {NAME as SUBMITMT,factory as submitmt} from './submit/submit.mt'
export {NAME as SNACKBAR,directive as SnackbarDirective} from './snackbar/snackbar'
export {NAME as SNACKBARMT,factory as snackbarmt} from './snackbar/snackbar.mt'
export {NAME as SPINNER,directive as SpinnerDirective} from './spinner/spinner'
export {NAME as SPINNERMT,factory as spinnermt} from './spinner/spinner.mt'
export {NAME as LOGIN, COMPONENT as LOGIN_COMPONENT} from './login/login';

View File

@ -1,4 +1,4 @@
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="*[className]*" type="*[type]*" *[enabled]*>
<label class="mdl-textfield__label">*[text]*</label>
</div>
<input class="*[className]*" type="*[type]*" name="*[name]*" *[enabled]*>
<label class="mdl-textfield__label">*[label]*</label>
</div>

View File

@ -4,7 +4,7 @@ import * as constant from '../constants';
import template from './textfield.mt.html';
const _NAME = 'textfield';
const DEFAULT_TEXT = 'text';
const DEFAULT_LABEL = 'text';
const DEFAULT_CLASS = 'mdl-textfield__input';
const DEFAULT_TYPE = 'text';
@ -14,7 +14,8 @@ export function factory() {
return {
template: template,
default: {
text: DEFAULT_TEXT,
label: DEFAULT_LABEL,
name: 'textfield',
enabled: 'enabled',
className: DEFAULT_CLASS,
type: DEFAULT_TYPE

View File

@ -35,6 +35,7 @@ export function getProviderName(name){
export function getTemplateName(componentName,frameworkName){
return componentName + '.' + frameworkName + '.' + '.html'
}
export function getVendorDependencies(vendors){
let dependencies = [];
Object.keys(vendors).forEach((vendor)=>{
@ -44,4 +45,4 @@ export function getVendorDependencies(vendors){
}
});
return dependencies;
}
}

View File

@ -1,6 +1,7 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Salix</title>
</head>
<body>

View File

@ -31,8 +31,10 @@
"gulp-insert": "^0.5.0",
"gulp-wrap": "^0.13.0",
"json-loader": "^0.5.4",
"node-sass": "^3.11.0",
"pre-commit": "^1.1.3",
"raw-loader": "*",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.1",
"webpack": "*",
"webpack-dev-server": "*"

View File

@ -22,15 +22,18 @@ module.exports =
query: {
presets: ['es2015']
}
}, {
},{
test: /\.html$/,
loader: 'raw'
}, {
},{
test: /\.json$/,
loader: 'json'
}, {
},{
test: /\.css$/,
loader: 'style!css'
},{
test: /\.scss$/,
loader: 'style!css!sass'
}
]
},