initial commit

This commit is contained in:
Andrew
2015-03-17 16:19:16 -05:00
parent fc5025b88c
commit df34a33736
41 changed files with 124 additions and 4 deletions

View File

@ -1,6 +1,5 @@
# ionic2
Ionic2 WIP Repo
it's a thing #### Build
Learn it - JSCS
- JSHint (or TypeScript variant)

View File

0
scripts/ci/placeholder Normal file
View File

0
scripts/docs/placeholder Normal file
View File

0
scripts/test/placeholder Normal file
View File

View File

View File

View File

8
src/components/ion.js Normal file
View File

@ -0,0 +1,8 @@
class Ion {
assign(...args) {
for (let obj of args) {
//...extend this
}
}
}

View File

View File

@ -0,0 +1,20 @@
import {TabbarConfig} from '/components/tabbar/tabbar';
import {Draggable} from '/behaviors/draggable';
TabbarConfig.platform('android')
.template(require('./android-template.html'))
.mixin(function(tabbar) {
Draggable(tabbar);
tabbarInstance.setAsHeader();
tabbar.assign({
onDragStart() {},
onDrag() {},
onDragEnd() {}
});
});
/*
<ion-tabs config-platform-android />
*/

View File

@ -0,0 +1,8 @@
.tabbar.with-inkbar {
.inkbar {
bottom: 0;
height: 3px;
color: yellow;
}
}

View File

@ -0,0 +1,3 @@
class Tabbar extends Ion {
}

View File

View File

0
src/history.js Normal file
View File

3
src/index.js Normal file
View File

@ -0,0 +1,3 @@
/*
* export everything here
*/

9
src/old/button/built.js Normal file
View File

@ -0,0 +1,9 @@
import {ButtonConfig} from './button-config';
import {AndroidButton} from './mixins/android/android-button';
import {LargeButton} from './mixins/android-button';
ButtonConfig.platform('android').mixin(AndroidButton);
ButtonConfig.media('lg').mixin(DesktopButton);
ButtonConfig.when('popBehavior').mixin(PopButton);

22
src/old/button/button.js Normal file
View File

@ -0,0 +1,22 @@
import { Component } from 'angular';
import { ButtonGroup } from '../components/button-group';
import { androidButton} from './platforms/android/android-button';
import { blockButton } from './block-button';
@Component({
selector: 'ion-button',
bind: {
isBlockButton: 'isBlockButton'
}
})
export class Button extends IonicComponent {
/* A button checks for a parent buttonGroup */
constructor(@Parent(ButtonGroup) buttonGroup) {
this.buttonGroup = buttonGroup;
super();
}
onPress() {
}
}
export var ButtonConfig = new IonicConfig('button');

View File

View File

View File

@ -0,0 +1,14 @@
import { ButtonConfig } from '/components/button';
ButtonConfig.platform('android')
.mixin(androidButtonMixin)
.className('button-android'); // This is the default
export default function androidButtonMixin(buttonInstance) {
Pannable(buttonInstance);
return {
onPanStart() {},
onPan() {},
onPanEnd() {}
};
}

View File

@ -0,0 +1,3 @@
.button.button-android {
border-radius: 5px;
}

View File

@ -0,0 +1,25 @@
import { ButtonConfig } from '/components/button';
ButtonConfig.decorator('popButton')
.mixin(popButtonMixin)
.className('button-pop');
function popButtonMixin(buttonInstance) {
return {
onRelease() {
alert('pop!');
}
};
}
/*
//instance config
<button [config]="{popButton: true}" />
<button config-pop-button />
import ButtonConfig
ButtonConfig.set({ popButton: true })
ButtonConfig.platform('lg').set({ popButton: true })
*/

View File

@ -0,0 +1,6 @@
.button.button-pop {
box-shadow: 0 9px 0 black;
&:active {
transform: translate3d(0, 2px, 0);
}
}

0
src/platform.js Normal file
View File