mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Merge branch 'master' into alpha38
This commit is contained in:
@@ -12,9 +12,9 @@ import {dom} from 'ionic/util';
|
||||
* <ion-list>
|
||||
* <ion-item *ng-for="#item of items" (click)="itemTapped($event, item)">
|
||||
* {{item.title}}
|
||||
* <div class="item-note" item-right>
|
||||
* <ion-note item-right>
|
||||
* {{item.note}}
|
||||
* </div>
|
||||
* </ion-note>
|
||||
* </ion-item>
|
||||
* </ion-list>
|
||||
* ```
|
||||
|
||||
@@ -134,7 +134,7 @@ $item-ios-divider-padding: 5px 15px !default;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.item-note {
|
||||
ion-note {
|
||||
color: $item-ios-note-color;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ $item-md-divider-padding: 5px 15px !default;
|
||||
line-height: $item-md-body-text-line-height;
|
||||
}
|
||||
|
||||
.item-note {
|
||||
ion-note {
|
||||
color: $item-md-note-color;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,17 +16,17 @@
|
||||
<ion-item>
|
||||
<icon heart item-left></icon>
|
||||
Affection
|
||||
<div class="item-note" item-right>
|
||||
<ion-note item-right>
|
||||
Very Little
|
||||
</div>
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<icon home item-left></icon>
|
||||
Home
|
||||
<div class="item-note" item-right>
|
||||
<ion-note item-right>
|
||||
Where the heart is
|
||||
</div>
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
@@ -46,9 +46,9 @@
|
||||
<ion-item>
|
||||
<icon star item-left></icon>
|
||||
Star status
|
||||
<div class="item-note" item-right>
|
||||
<ion-note item-right>
|
||||
Super
|
||||
</div>
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
@@ -63,25 +63,25 @@
|
||||
<ion-item>
|
||||
<icon pizza item-left></icon>
|
||||
Pizza
|
||||
<div class="item-note" item-right>
|
||||
<ion-note item-right>
|
||||
Always
|
||||
</div>
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<icon beer item-left></icon>
|
||||
Beer
|
||||
<div class="item-note" item-right>
|
||||
<ion-note item-right>
|
||||
Yes Plz
|
||||
</div>
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<icon wine item-left></icon>
|
||||
Wine
|
||||
<div class="item-note" item-right>
|
||||
<ion-note item-right>
|
||||
All the time
|
||||
</div>
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
|
||||
@@ -85,10 +85,11 @@ export class Menu extends Ion {
|
||||
*/
|
||||
onInit() {
|
||||
super.onInit();
|
||||
this._cntEle = (this.content instanceof Node) ? this.content : this.content.getNativeElement();
|
||||
let content = this.content;
|
||||
this._cntEle = (content instanceof Node) ? content : content && content.getNativeElement && content.getNativeElement();
|
||||
|
||||
if (!this._cntEle) {
|
||||
return console.error('Menu: must have a [content] element to listen for drag events on. Example:\n\n<ion-menu [content]="content"></ion-menu>\n\n<ion-content #content></ion-content>');
|
||||
return console.error('Menu: must have a [content] element to listen for drag events on. Example:\n\n<ion-menu [content]="content"></ion-menu>\n\n<ion-nav #content></ion-nav>');
|
||||
}
|
||||
|
||||
if (!this.id) {
|
||||
|
||||
@@ -2,18 +2,20 @@
|
||||
// iOS Search Bar
|
||||
// --------------------------------------------------
|
||||
|
||||
$search-bar-ios-padding: 0 8px !default;
|
||||
$search-bar-ios-background-color: rgba(0, 0, 0, 0.2) !default;
|
||||
$search-bar-ios-border-color: rgba(0, 0, 0, 0.05) !default;
|
||||
$search-bar-ios-padding: 0 8px !default;
|
||||
$search-bar-ios-input-height: 28px !default;
|
||||
$search-bar-ios-input-text-color: #9D9D9D !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-min-height: 44px !default;
|
||||
|
||||
$search-bar-ios-input-search-icon-color: #767676 !default;
|
||||
$search-bar-ios-input-search-icon-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13'><path fill='" + $search-bar-ios-input-search-icon-color + "' d='M5,1c2.2,0,4,1.8,4,4S7.2,9,5,9S1,7.2,1,5S2.8,1,5,1 M5,0C2.2,0,0,2.2,0,5s2.2,5,5,5s5-2.2,5-5S7.8,0,5,0 L5,0z'/><line stroke='" + $search-bar-ios-input-search-icon-color + "' stroke-miterlimit='10' x1='12.6' y1='12.6' x2='8.2' y2='8.2'/></svg>" !default;
|
||||
$search-bar-ios-input-search-icon-size: 13px !default;
|
||||
|
||||
$search-bar-ios-input-height: 28px !default;
|
||||
$search-bar-ios-input-text-color: #9D9D9D !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-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-size: 17px !default;
|
||||
@@ -23,6 +25,7 @@ $search-bar-ios-input-close-icon-size: 17px !default;
|
||||
padding: $search-bar-ios-padding;
|
||||
background: $search-bar-ios-background-color;
|
||||
border-bottom: 1px solid $search-bar-ios-border-color;
|
||||
min-height: $search-bar-ios-min-height;
|
||||
}
|
||||
|
||||
.search-bar-search-icon {
|
||||
|
||||
71
ionic/components/search-bar/modes/md.scss
Normal file
71
ionic/components/search-bar/modes/md.scss
Normal file
@@ -0,0 +1,71 @@
|
||||
|
||||
// Material Design Search Bar
|
||||
// --------------------------------------------------
|
||||
|
||||
$search-bar-md-padding: 8px !default;
|
||||
$search-bar-md-background-color: inherit !default;
|
||||
|
||||
$search-bar-md-input-search-icon-color: #5B5B5B !default;
|
||||
$search-bar-md-input-search-icon-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='" + $search-bar-md-input-search-icon-color + "' d='M337.509,305.372h-17.501l-6.571-5.486c20.791-25.232,33.922-57.054,33.922-93.257C347.358,127.632,283.896,64,205.135,64C127.452,64,64,127.632,64,206.629s63.452,142.628,142.225,142.628c35.011,0,67.831-13.167,92.991-34.008l6.561,5.487v17.551L415.18,448L448,415.086L337.509,305.372z M206.225,305.372c-54.702,0-98.463-43.887-98.463-98.743c0-54.858,43.761-98.742,98.463-98.742c54.7,0,98.462,43.884,98.462,98.742C304.687,261.485,260.925,305.372,206.225,305.372z'/></svg>" !default;
|
||||
$search-bar-md-input-search-icon-size: 20px !default;
|
||||
|
||||
$search-bar-md-input-height: 28px !default;
|
||||
$search-bar-md-input-box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12) !default;
|
||||
$search-bar-md-input-placeholder-color: #AEAEAE !default;
|
||||
$search-bar-md-input-text-color: #141414 !default;
|
||||
$search-bar-md-input-background-color: #FFFFFF !default;
|
||||
$search-bar-md-input-border-radius: 2px !default;
|
||||
|
||||
$search-bar-md-input-close-icon-color: #5B5B5B !default;
|
||||
$search-bar-md-input-close-icon-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><polygon fill='" + $search-bar-md-input-close-icon-color + "' points='405,136.798 375.202,107 256,226.202 136.798,107 107,136.798 226.202,256 107,375.202 136.798,405 256,285.798 375.202,405 405,375.202 285.798,256'/></svg>" !default;
|
||||
$search-bar-md-input-close-icon-size: 22px !default;
|
||||
|
||||
|
||||
.search-bar {
|
||||
padding: $search-bar-md-padding;
|
||||
background: $search-bar-md-background-color;
|
||||
}
|
||||
|
||||
.search-bar-search-icon {
|
||||
width: $search-bar-md-input-search-icon-size + 1;
|
||||
height: $search-bar-md-input-search-icon-size + 1;
|
||||
|
||||
@include svg-background-image($search-bar-md-input-search-icon-svg);
|
||||
background-size: $search-bar-md-input-search-icon-size;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
left: 13px;
|
||||
top: 13px;
|
||||
}
|
||||
|
||||
.search-bar-input {
|
||||
padding: 8px 55px;
|
||||
|
||||
height: $search-bar-md-input-height;
|
||||
box-shadow: $search-bar-md-input-box-shadow;
|
||||
|
||||
font-size: 1.6rem;
|
||||
font-weight: 400;
|
||||
|
||||
border-radius: $search-bar-md-input-border-radius;
|
||||
color: $search-bar-md-input-text-color;
|
||||
background-color: $search-bar-md-input-background-color;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 8px center;
|
||||
|
||||
&::placeholder {
|
||||
color: $search-bar-md-input-placeholder-color;
|
||||
}
|
||||
}
|
||||
|
||||
.search-bar-close-icon {
|
||||
width: $search-bar-md-input-close-icon-size;
|
||||
height: $search-bar-md-input-close-icon-size;
|
||||
|
||||
@include svg-background-image($search-bar-md-input-close-icon-svg);
|
||||
background-size: $search-bar-md-input-close-icon-size;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
right: 13px;
|
||||
top: 13px;
|
||||
}
|
||||
@@ -2,15 +2,12 @@
|
||||
// Search Bar
|
||||
// --------------------------------------------------
|
||||
|
||||
$search-bar-min-height: 44px !default;
|
||||
|
||||
|
||||
.search-bar {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
min-height: $search-bar-min-height;
|
||||
}
|
||||
|
||||
.search-bar-icon {
|
||||
|
||||
@@ -6,7 +6,14 @@ import {IonicConfig} from '../../config/config';
|
||||
import {IonicComponent} from '../../config/decorators';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @name Search Bar
|
||||
* @description
|
||||
* The Search Bar service adds an input field which can be used to search or filter items.
|
||||
*
|
||||
* @usage
|
||||
* ```html
|
||||
* <ion-search-bar ng-control="searchQuery"></ion-search-bar>
|
||||
* ```
|
||||
*/
|
||||
@IonicComponent({
|
||||
selector: 'ion-search-bar',
|
||||
|
||||
@@ -7,14 +7,14 @@ it('should go to Tab1 Page2', function() {
|
||||
element(by.css('#goToTab1Page2')).click();
|
||||
});
|
||||
|
||||
it('should go back to Tab1 Page1', function() {
|
||||
element(by.css('#backToTab1Page1')).click();
|
||||
});
|
||||
|
||||
it('should go to Tab2 Page1', function() {
|
||||
element(by.css('.tab-button:nth-of-type(2)')).click();
|
||||
});
|
||||
|
||||
it('should go back to Tab1 Page2', function() {
|
||||
it('should go back to Tab1 Page1', function() {
|
||||
element(by.css('.tab-button:nth-of-type(1)')).click();
|
||||
});
|
||||
|
||||
it('should go back to Tab1 Page1', function() {
|
||||
element(by.css('#backToTab1Page1')).click();
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
<!-- Text -->
|
||||
<ion-tabs>
|
||||
<ion-tabs class="no-navbar">
|
||||
<ion-tab tab-title="Recents"></ion-tab>
|
||||
<ion-tab tab-title="Favorites"></ion-tab>
|
||||
<ion-tab tab-title="Settings"></ion-tab>
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
<!-- Icons -->
|
||||
<ion-tabs>
|
||||
<ion-tabs class="no-navbar">
|
||||
<ion-tab tab-icon="call"></ion-tab>
|
||||
<ion-tab tab-icon="heart"></ion-tab>
|
||||
<ion-tab tab-icon="settings"></ion-tab>
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
<!-- Icons on top of text -->
|
||||
<ion-tabs>
|
||||
<ion-tabs class="no-navbar">
|
||||
<ion-tab tab-title="Location" tab-icon="navigate"></ion-tab>
|
||||
<ion-tab tab-title="Favorites" tab-icon="star"></ion-tab>
|
||||
<ion-tab tab-title="Radio" tab-icon="musical-notes"></ion-tab>
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
<!-- Icons below text -->
|
||||
<ion-tabs tab-bar-icons="bottom">
|
||||
<ion-tabs tab-bar-icons="bottom" class="no-navbar">
|
||||
<ion-tab tab-title="Recents" tab-icon="call"></ion-tab>
|
||||
<ion-tab tab-title="Favorites" tab-icon="heart"></ion-tab>
|
||||
<ion-tab tab-title="Settings" tab-icon="settings"></ion-tab>
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
<!-- Icons right of text -->
|
||||
<ion-tabs tab-bar-icons="right">
|
||||
<ion-tabs tab-bar-icons="right" class="no-navbar">
|
||||
<ion-tab tab-title="Recents" tab-icon="call"></ion-tab>
|
||||
<ion-tab tab-title="Favorites" tab-icon="heart"></ion-tab>
|
||||
<ion-tab tab-title="Settings" tab-icon="settings"></ion-tab>
|
||||
@@ -40,21 +40,21 @@
|
||||
|
||||
|
||||
<!-- Icons left of text -->
|
||||
<ion-tabs tab-bar-icons="left">
|
||||
<ion-tabs tab-bar-icons="left" class="no-navbar">
|
||||
<ion-tab tab-title="Recents" tab-icon="call"></ion-tab>
|
||||
<ion-tab tab-title="Favorites" tab-icon="heart"></ion-tab>
|
||||
<ion-tab tab-title="Settings" tab-icon="settings"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
<!-- No icons -->
|
||||
<ion-tabs tab-bar-icons="hide">
|
||||
<ion-tabs tab-bar-icons="hide" class="no-navbar">
|
||||
<ion-tab tab-title="Recents" tab-icon="call"></ion-tab>
|
||||
<ion-tab tab-title="Favorites" tab-icon="heart"></ion-tab>
|
||||
<ion-tab tab-title="Settings" tab-icon="settings"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
<!-- No overflow text -->
|
||||
<ion-tabs>
|
||||
<ion-tabs class="no-navbar">
|
||||
<ion-tab tab-title="Indiana Jones and the Raiders of the Lost Ark"></ion-tab>
|
||||
<ion-tab tab-title="Indiana Jones and the Temple of Doom"></ion-tab>
|
||||
<ion-tab tab-title="Indiana Jones and the Last Crusade"></ion-tab>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"components/nav-bar/modes/md",
|
||||
"components/popup/modes/md",
|
||||
"components/radio/modes/md",
|
||||
"components/search-bar/modes/md",
|
||||
"components/switch/modes/md",
|
||||
"components/tabs/modes/md",
|
||||
"components/tap-click/ripple";
|
||||
|
||||
Reference in New Issue
Block a user