forms basic components

This commit is contained in:
nixa 2016-05-13 11:01:25 +03:00
parent b674d83552
commit fcd27874d2
12 changed files with 248 additions and 0 deletions

View file

@ -0,0 +1 @@
export * from './inputs.component';

View file

@ -0,0 +1,16 @@
import {Component, ViewEncapsulation} from '@angular/core';
import {BaCard} from '../../../../theme/components';
@Component({
selector: 'inputs',
encapsulation: ViewEncapsulation.None,
directives: [BaCard],
styles: [require('./inputs.scss')],
template: require('./inputs.html'),
})
export class Inputs {
constructor() {
}
}

View file

@ -0,0 +1 @@
hello

View file

@ -0,0 +1,30 @@
@import '../../../../theme/sass/conf/conf';
.show-grid div[class^=col-]{
padding: 10px;
box-sizing: border-box;
div {
color: $default-text;
text-align: center;
font-size: 18px;
background-color: $border-light;
padding: 12px 5px;
}
}
.grid-h{
margin-top: 10px;
margin-bottom: 0;
&:first-child{
margin-top: 0;
}
}
body.badmin-transparent {
.show-grid div[class^=col-]{
div {
color: $default;
background-color: rgba(255, 255, 255, 0.3);
}
}
}

View file

@ -0,0 +1 @@
export * from './layouts.component';

View file

@ -0,0 +1,19 @@
import {Component, ViewEncapsulation} from '@angular/core';
import {BaCard} from '../../../../theme/components';
@Component({
selector: 'layouts',
encapsulation: ViewEncapsulation.None,
directives: [BaCard],
styles: [require('./layouts.scss')],
template: require('./layouts.html'),
})
export class Layouts {
constructor() {
}
ngOnInit() {
}
}

View file

@ -0,0 +1 @@
hello

View file

@ -0,0 +1,123 @@
@import '../../../../theme/sass/conf/conf';
@mixin icon-hover($color) {
i:hover {
color: $color;
}
}
.icons-list {
& > div {
text-align: center;
margin-bottom: 32px;
}
i {
font-weight: $font-normal;
font-size: 18px;
cursor: pointer;
}
&.primary {
@include icon-hover($primary);
}
&.success {
@include icon-hover($success);
}
&.warning {
@include icon-hover($warning);
}
&.danger {
@include icon-hover($danger);
}
}
a.see-all-icons {
float: right;
}
.awesomeIcons {
height: 308px;
}
.kameleon-row {
display: inline-block;
min-width: 102px;
width: 20%;
.kameleon-icon {
padding: 0 10px;
img {
width: 81px;
}
}
}
@media (max-width: 750px) {
.kameleon-row {
width: 25%;
}
}
@media (max-width: 550px) {
.kameleon-row {
width: 33%;
}
}
@media (max-width: 430px) {
.kameleon-row {
width: 50%;
}
}
.kameleon-icon-tabs {
max-width: 84px;
img {
width: 100%;
min-width: 81px;
min-height: 81px;
}
}
.kameleon-icon {
text-align: center;
margin: 0 auto;
img {
width: 100%;
}
span {
display: block;
text-align: center;
white-space: nowrap;
}
}
@mixin setImgBg($color) {
img {
background: $color;
}
}
.with-round-bg {
margin-bottom: 6px;
img {
border-radius: 50%;
margin-bottom: 4px;
}
@include setImgBg($default);
&.success {
@include setImgBg($success);
}
&.danger {
@include setImgBg($danger);
}
&.warning {
@include setImgBg($warning);
}
&.info {
@include setImgBg($info);
}
&.primary {
@include setImgBg($primary);
}
}

View file

@ -0,0 +1,31 @@
import {Component} from '@angular/core';
import {RouteConfig} from '@angular/router-deprecated';
import {Inputs} from './components/inputs';
import {Layouts} from './components/layouts';
@Component({
selector: 'forms',
pipes: [],
providers: [],
styles: [],
template: `<router-outlet></router-outlet>`
})
@RouteConfig([
{
name: 'Inputs',
component: Inputs,
path: '/inputs',
useAsDefault: true
},
{
name: 'Layouts',
component: Layouts,
path: '/layouts',
}
])
export class Forms {
constructor() {
}
}

View file

@ -0,0 +1 @@
export * from './forms.component';

View file

@ -7,6 +7,7 @@ import {Dashboard} from './dashboard';
import {Ui} from './ui';
import {Maps} from './maps';
import {Charts} from './charts';
import {Forms} from './forms';
@Component({
selector: 'pages',
@ -45,6 +46,11 @@ import {Charts} from './charts';
component: Charts,
path: '/charts/...',
},
{
name: 'Forms',
component: Forms,
path: '/forms/...',
},
])
export class Pages {

View file

@ -82,6 +82,24 @@ export class SidebarService {
},
]
},
{
title: 'Form Elements',
name: 'Forms',
icon: 'ion-compose',
selected: false,
expanded: false,
order: 500,
subMenu: [
{
title: 'Form Inputs',
name: 'Inputs',
},
{
title: 'Form Elements',
name: 'Layouts',
},
]
},
{
title: 'Menu Level 1',
icon: 'ion-ios-more',