mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
Merge branch 'master' into alpha38
Conflicts: ionic/config/decorators.ts
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/forms';
|
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/forms';
|
||||||
import {App, IonicApp, ActionSheet, NavController, NavParams} from 'ionic/ionic';
|
import {App, IonicApp, ActionSheet, NavController, NavParams} from 'ionic/ionic';
|
||||||
import {Modal, IonicView, IonicConfig, Events, Animation} from 'ionic/ionic';
|
import {Popup, Modal, IonicView, IonicConfig, Events, Animation} from 'ionic/ionic';
|
||||||
import {NavigationDetailsPage} from 'navigation';
|
import {NavigationDetailsPage} from 'navigation';
|
||||||
|
|
||||||
import {TabsPage} from 'tabs';
|
import {TabsPage} from 'tabs';
|
||||||
@ -20,12 +20,14 @@ export class MainPage {
|
|||||||
nav: NavController,
|
nav: NavController,
|
||||||
actionSheet: ActionSheet,
|
actionSheet: ActionSheet,
|
||||||
params: NavParams,
|
params: NavParams,
|
||||||
|
popup: Popup,
|
||||||
modal: Modal,
|
modal: Modal,
|
||||||
events: Events)
|
events: Events)
|
||||||
{
|
{
|
||||||
this.params = params;
|
this.params = params;
|
||||||
this.nav = nav;
|
this.nav = nav;
|
||||||
this.modal = modal;
|
this.modal = modal;
|
||||||
|
this.popup = popup;
|
||||||
this.actionSheet = actionSheet;
|
this.actionSheet = actionSheet;
|
||||||
this.navDetailsPage = NavigationDetailsPage;
|
this.navDetailsPage = NavigationDetailsPage;
|
||||||
this.demoModal = DemoModal;
|
this.demoModal = DemoModal;
|
||||||
@ -41,7 +43,8 @@ export class MainPage {
|
|||||||
zone.run(() => {
|
zone.run(() => {
|
||||||
if (e.data) {
|
if (e.data) {
|
||||||
var data = JSON.parse(e.data);
|
var data = JSON.parse(e.data);
|
||||||
this.component.title = helpers.toTitleCase(data.hash.replace('-', ' '));
|
this.component.title = helpers.toTitleCase(data.hash.replace(/-/g, ' '));
|
||||||
|
console.log(this.component.title);
|
||||||
if (this.component.title === 'Tabs') {
|
if (this.component.title === 'Tabs') {
|
||||||
this.nav.setRoot(TabsPage);
|
this.nav.setRoot(TabsPage);
|
||||||
}
|
}
|
||||||
@ -102,6 +105,15 @@ export class MainPage {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// **************************
|
||||||
|
// Popup
|
||||||
|
// **************************
|
||||||
|
showPopup() {
|
||||||
|
this.popup.alert("Popup Title").then(() => {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// **************************
|
// **************************
|
||||||
// Form
|
// Form
|
||||||
// **************************
|
// **************************
|
||||||
|
@ -123,32 +123,43 @@
|
|||||||
<button dark outline>Dark</button>
|
<button dark outline>Dark</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="outline-buttons" [ng-class]="{hidden: component.title !== 'Outline Buttons' }" class="section-padding">
|
<section id="round-buttons" [ng-class]="{hidden: component.title !== 'Round Buttons' }" class="section-padding">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<button outline>Default</button>
|
<button round>Default</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<button secondary outline>Secondary</button>
|
<button secondary round>Secondary</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<button danger outline>Danger</button>
|
<button danger round>Danger</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<button light outline>Light</button>
|
<button light round>Light</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<button dark outline>Dark</button>
|
<button dark round>Dark</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id="floating-action-buttons" [ng-class]="{hidden: component.title !== 'Floating Action Buttons' }" class="section-padding">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<button fab fab-top fab-right>
|
||||||
|
<icon add></icon>
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<section id="button-sizes" [ng-class]="{hidden: component.title !== 'Button Sizes' }" class="section-padding">
|
<section id="button-sizes" [ng-class]="{hidden: component.title !== 'Button Sizes' }" class="section-padding">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -173,6 +184,44 @@
|
|||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id="icon-buttons" [ng-class]="{hidden: component.title !== 'Icon Buttons' }" class="section-padding">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<button>
|
||||||
|
<icon home></icon>
|
||||||
|
Home
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<button secondary>
|
||||||
|
<icon people></icon>
|
||||||
|
Friends
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<button danger>
|
||||||
|
<icon close></icon>
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<button light>
|
||||||
|
<icon arrow-back></icon>
|
||||||
|
Back
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<button dark>
|
||||||
|
<icon hammer></icon>
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section id="cards" [ng-class]="{hidden: component.title !== 'Cards' }">
|
<section id="cards" [ng-class]="{hidden: component.title !== 'Cards' }">
|
||||||
|
|
||||||
@ -390,6 +439,12 @@
|
|||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id="popup" [ng-class]="{hidden: component.title !== 'Popups' }" class="section-padding">
|
||||||
|
<button block (click)="showPopup()">
|
||||||
|
Show Popup
|
||||||
|
</button>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id="slides" [ng-class]="{hidden: component.title !== 'Slides' }">
|
<section id="slides" [ng-class]="{hidden: component.title !== 'Slides' }">
|
||||||
|
|
||||||
<ion-slides id="slider" style="background-color: black" pager="true" zoom="false" index="1" loop="true">
|
<ion-slides id="slider" style="background-color: black" pager="true" zoom="false" index="1" loop="true">
|
||||||
|
@ -15,8 +15,8 @@ $search-bar-ios-input-height: 28px !default;
|
|||||||
$search-bar-ios-input-placeholder-color: #9D9D9D !default;
|
$search-bar-ios-input-placeholder-color: #9D9D9D !default;
|
||||||
$search-bar-ios-input-text-color: #000 !default;
|
$search-bar-ios-input-text-color: #000 !default;
|
||||||
$search-bar-ios-input-background-color: #FFFFFF !default;
|
$search-bar-ios-input-background-color: #FFFFFF !default;
|
||||||
$search-bar-ios-input-transition: all 0.3s cubic-bezier(.25, .45, .05, 1) !default;
|
$search-bar-ios-input-transition: all 0.3s linear !default;
|
||||||
|
//cubic-bezier(.25, .45, .05, 1)
|
||||||
$search-bar-ios-input-close-icon-color: #8F8E94 !default;
|
$search-bar-ios-input-close-icon-color: #8F8E94 !default;
|
||||||
$search-bar-ios-input-close-icon-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='" + $search-bar-ios-input-close-icon-color + "' d='M403.1,108.9c-81.2-81.2-212.9-81.2-294.2,0s-81.2,212.9,0,294.2c81.2,81.2,212.9,81.2,294.2,0S484.3,190.1,403.1,108.9z M352,340.2L340.2,352l-84.4-84.2l-84,83.8L160,339.8l84-83.8l-84-83.8l11.8-11.8l84,83.8l84.4-84.2l11.8,11.8L267.6,256L352,340.2z'/></svg>" !default;
|
$search-bar-ios-input-close-icon-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='" + $search-bar-ios-input-close-icon-color + "' d='M403.1,108.9c-81.2-81.2-212.9-81.2-294.2,0s-81.2,212.9,0,294.2c81.2,81.2,212.9,81.2,294.2,0S484.3,190.1,403.1,108.9z M352,340.2L340.2,352l-84.4-84.2l-84,83.8L160,339.8l84-83.8l-84-83.8l11.8-11.8l84,83.8l84.4-84.2l11.8,11.8L267.6,256L352,340.2z'/></svg>" !default;
|
||||||
$search-bar-ios-input-close-icon-size: 17px !default;
|
$search-bar-ios-input-close-icon-size: 17px !default;
|
||||||
@ -80,20 +80,28 @@ $search-bar-ios-input-close-icon-size: 17px !default;
|
|||||||
.search-bar-input-container.left-align {
|
.search-bar-input-container.left-align {
|
||||||
.search-bar-search-icon {
|
.search-bar-search-icon {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
transition: $search-bar-ios-input-transition;
|
|
||||||
}
|
}
|
||||||
.search-bar-input {
|
.search-bar-input {
|
||||||
padding-left: 28px;
|
padding-left: 28px;
|
||||||
transition: $search-bar-ios-input-transition;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-bar-cancel.left-align {
|
.search-bar-cancel {
|
||||||
@extend button[clear];
|
@extend button[clear];
|
||||||
display: block;
|
// transition: all 2s cubic-bezier(.25, .45, .05, 1);
|
||||||
|
transition: $search-bar-ios-input-transition;
|
||||||
|
transition-duration: 3s !important;
|
||||||
|
margin-right: calc(-100%);
|
||||||
|
// transform: translate3d(100px,0,0);
|
||||||
|
// max-width: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar-cancel.left-align {
|
||||||
|
max-width: initial;
|
||||||
|
margin-right: 0;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
min-height: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.hairlines .search-bar {
|
&.hairlines .search-bar {
|
||||||
|
@ -31,7 +31,3 @@ input[type="search"].search-bar-input {
|
|||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
@include appearance(none);
|
@include appearance(none);
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-bar-cancel {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
@ -25,10 +25,13 @@ import {ConfigComponent} from '../../config/decorators';
|
|||||||
'cancelText': 'Cancel',
|
'cancelText': 'Cancel',
|
||||||
'placeholder': 'Search',
|
'placeholder': 'Search',
|
||||||
'cancelAction': function() {
|
'cancelAction': function() {
|
||||||
|
// TODO user will override this if they pass a function
|
||||||
|
// need to allow user to call these
|
||||||
console.log('Default Cancel');
|
console.log('Default Cancel');
|
||||||
this.isFocused = false;
|
this.isFocused = false;
|
||||||
this.shouldLeftAlign = this.value.trim() != '';
|
this.shouldLeftAlign = this.value.trim() != '';
|
||||||
// TODO input blur
|
this.element = this.elementRef.nativeElement.querySelector('input');
|
||||||
|
this.element.blur();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -19,5 +19,6 @@ class IonicApp {
|
|||||||
}
|
}
|
||||||
myCancelAction = function() {
|
myCancelAction = function() {
|
||||||
console.log('myCancelAction');
|
console.log('myCancelAction');
|
||||||
|
alert("My custom action!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user