mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
initial commit
This commit is contained in:
@ -1,6 +1,5 @@
|
|||||||
# ionic2
|
|
||||||
Ionic2 WIP Repo
|
|
||||||
|
|
||||||
it's a thing
|
#### Build
|
||||||
|
|
||||||
Learn it
|
- JSCS
|
||||||
|
- JSHint (or TypeScript variant)
|
||||||
|
0
scripts/build/placeholder
Normal file
0
scripts/build/placeholder
Normal file
0
scripts/ci/placeholder
Normal file
0
scripts/ci/placeholder
Normal file
0
scripts/docs/placeholder
Normal file
0
scripts/docs/placeholder
Normal file
0
scripts/test/placeholder
Normal file
0
scripts/test/placeholder
Normal file
0
src/components/control/button/button.js
Normal file
0
src/components/control/button/button.js
Normal file
0
src/components/control/button/button.scss
Normal file
0
src/components/control/button/button.scss
Normal file
0
src/components/control/button/button.spec.js
Normal file
0
src/components/control/button/button.spec.js
Normal file
0
src/components/control/control.js
Normal file
0
src/components/control/control.js
Normal file
0
src/components/control/control.spec.js
Normal file
0
src/components/control/control.spec.js
Normal file
8
src/components/ion.js
Normal file
8
src/components/ion.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
class Ion {
|
||||||
|
assign(...args) {
|
||||||
|
for (let obj of args) {
|
||||||
|
//...extend this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
0
src/components/ion.spec.js
Normal file
0
src/components/ion.spec.js
Normal file
20
src/components/tabbar/mixins/android/android-tabbar.js
Normal file
20
src/components/tabbar/mixins/android/android-tabbar.js
Normal 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 />
|
||||||
|
*/
|
8
src/components/tabbar/mixins/android/android-tabbar.scss
Normal file
8
src/components/tabbar/mixins/android/android-tabbar.scss
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.tabbar.with-inkbar {
|
||||||
|
|
||||||
|
.inkbar {
|
||||||
|
bottom: 0;
|
||||||
|
height: 3px;
|
||||||
|
color: yellow;
|
||||||
|
}
|
||||||
|
}
|
0
src/components/tabbar/mixins/placement/placement.js
Normal file
0
src/components/tabbar/mixins/placement/placement.js
Normal file
3
src/components/tabbar/tabbar.js
Normal file
3
src/components/tabbar/tabbar.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
class Tabbar extends Ion {
|
||||||
|
}
|
0
src/components/tabbar/tabbar.scss
Normal file
0
src/components/tabbar/tabbar.scss
Normal file
0
src/components/tabbar/tabbar.spec.js
Normal file
0
src/components/tabbar/tabbar.spec.js
Normal file
0
src/history.js
Normal file
0
src/history.js
Normal file
3
src/index.js
Normal file
3
src/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/*
|
||||||
|
* export everything here
|
||||||
|
*/
|
9
src/old/button/built.js
Normal file
9
src/old/button/built.js
Normal 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
22
src/old/button/button.js
Normal 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');
|
||||||
|
|
0
src/old/button/button.scss
Normal file
0
src/old/button/button.scss
Normal file
0
src/old/button/button.spec.js
Normal file
0
src/old/button/button.spec.js
Normal file
0
src/old/button/examples/inline-button/index.html
Normal file
0
src/old/button/examples/inline-button/index.html
Normal file
0
src/old/button/examples/inline-button/style.scss
Normal file
0
src/old/button/examples/inline-button/style.scss
Normal file
14
src/old/button/mixins/android/android-button.js
Normal file
14
src/old/button/mixins/android/android-button.js
Normal 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() {}
|
||||||
|
};
|
||||||
|
}
|
3
src/old/button/mixins/android/android-button.scss
Normal file
3
src/old/button/mixins/android/android-button.scss
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.button.button-android {
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
25
src/old/button/mixins/pop/pop-button.js
Normal file
25
src/old/button/mixins/pop/pop-button.js
Normal 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 })
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
6
src/old/button/mixins/pop/pop-button.scss
Normal file
6
src/old/button/mixins/pop/pop-button.scss
Normal 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
0
src/platform.js
Normal file
Reference in New Issue
Block a user