mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(build): rename ionic directory to src and update all references in the build process.
This commit is contained in:
19
src/components/chip/chip.ios.scss
Normal file
19
src/components/chip/chip.ios.scss
Normal file
@@ -0,0 +1,19 @@
|
||||
@import "./chip";
|
||||
|
||||
// iOS Chip
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Generate iOS Chip Colors
|
||||
// --------------------------------------------------
|
||||
|
||||
@each $color-name, $color-base, $color-contrast in get-colors($colors-ios) {
|
||||
|
||||
ion-chip {
|
||||
ion-icon[#{$color-name}] {
|
||||
color: $color-contrast;
|
||||
background-color: $color-base;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
19
src/components/chip/chip.md.scss
Normal file
19
src/components/chip/chip.md.scss
Normal file
@@ -0,0 +1,19 @@
|
||||
@import "./chip";
|
||||
|
||||
// Material Design Chip
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Generate Material Design Chip Colors
|
||||
// --------------------------------------------------
|
||||
|
||||
@each $color-name, $color-base, $color-contrast in get-colors($colors-md) {
|
||||
|
||||
ion-chip {
|
||||
ion-icon[#{$color-name}] {
|
||||
color: $color-contrast;
|
||||
background-color: $color-base;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
87
src/components/chip/chip.scss
Normal file
87
src/components/chip/chip.scss
Normal file
@@ -0,0 +1,87 @@
|
||||
@import "../../globals.core";
|
||||
|
||||
// Chip
|
||||
// --------------------------------------------------
|
||||
|
||||
$chip-background-color: rgba(0, 0, 0, .12) !default;
|
||||
$chip-font-size: 13px !default;
|
||||
$chip-height: 32px !default;
|
||||
$chip-border-radius: 16px !default;
|
||||
$chip-padding: 0 12px !default;
|
||||
$chip-margin: 2px 0 !default;
|
||||
|
||||
$chip-label-color: rgba(0, 0, 0, .87) !default;
|
||||
$chip-icon-color: rgba(0, 0, 0, .87) !default;
|
||||
|
||||
ion-chip {
|
||||
display: inline-flex;
|
||||
|
||||
align-self: center;
|
||||
|
||||
margin: $chip-margin;
|
||||
padding: $chip-padding;
|
||||
|
||||
height: $chip-height;
|
||||
|
||||
border-radius: $chip-border-radius;
|
||||
font-size: $chip-font-size;
|
||||
font-weight: normal;
|
||||
line-height: $chip-height;
|
||||
background: $chip-background-color;
|
||||
|
||||
vertical-align: middle;
|
||||
|
||||
box-sizing: border-box;
|
||||
|
||||
ion-label {
|
||||
margin: 0;
|
||||
|
||||
color: $chip-label-color;
|
||||
}
|
||||
|
||||
> ion-icon,
|
||||
> ion-avatar {
|
||||
margin-left: -12px;
|
||||
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
|
||||
border-radius: 50%;
|
||||
font-size: 18px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
color: $chip-icon-color;
|
||||
vertical-align: top;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
+ ion-label {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
ion-avatar {
|
||||
min-width: 32px;
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.button {
|
||||
margin: 0;
|
||||
margin-right: -4px;
|
||||
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
ion-icon[name="close-circle"] {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
19
src/components/chip/chip.wp.scss
Normal file
19
src/components/chip/chip.wp.scss
Normal file
@@ -0,0 +1,19 @@
|
||||
@import "./chip";
|
||||
|
||||
// Windows Chip
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Generate Windows Chip Colors
|
||||
// --------------------------------------------------
|
||||
|
||||
@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
|
||||
|
||||
ion-chip {
|
||||
ion-icon[#{$color-name}] {
|
||||
color: $color-contrast;
|
||||
background-color: $color-base;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
10
src/components/chip/test/basic/index.ts
Normal file
10
src/components/chip/test/basic/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import {App, IonicApp} from '../../../../../ionic';
|
||||
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EApp {
|
||||
constructor(app: IonicApp) {
|
||||
}
|
||||
}
|
||||
18
src/components/chip/test/basic/main.html
Normal file
18
src/components/chip/test/basic/main.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<ion-toolbar>
|
||||
<ion-title>Chips With Text</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-content padding style="text-align:center">
|
||||
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-label>Default</ion-label>
|
||||
</ion-chip>
|
||||
</p>
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-label>Another Longer Text</ion-label>
|
||||
</ion-chip>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
14
src/components/chip/test/delete/index.ts
Normal file
14
src/components/chip/test/delete/index.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import {App, IonicApp} from '../../../../../ionic';
|
||||
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EApp {
|
||||
constructor(app: IonicApp) {
|
||||
}
|
||||
|
||||
deleteClicked() {
|
||||
console.log('deleteClicked');
|
||||
}
|
||||
}
|
||||
38
src/components/chip/test/delete/main.html
Normal file
38
src/components/chip/test/delete/main.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<ion-toolbar>
|
||||
<ion-title>Chips With Delete</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-content padding style="text-align:center">
|
||||
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-label>Default</ion-label>
|
||||
<button clear dark (click)="deleteClicked()">
|
||||
<ion-icon name="close-circle"></ion-icon>
|
||||
</button>
|
||||
</ion-chip>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-icon name="pin" primary></ion-icon>
|
||||
<ion-label>Primary</ion-label>
|
||||
<button clear dark (click)="deleteClicked()">
|
||||
<ion-icon name="close-circle"></ion-icon>
|
||||
</button>
|
||||
</ion-chip>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-avatar>
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAAAAAAALAAAAAABAAEAAAICTAEAOw==">
|
||||
</ion-avatar>
|
||||
<ion-label>Default</ion-label>
|
||||
<button clear dark (click)="deleteClicked()">
|
||||
<ion-icon name="close-circle"></ion-icon>
|
||||
</button>
|
||||
</ion-chip>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
10
src/components/chip/test/icon/index.ts
Normal file
10
src/components/chip/test/icon/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import {App, IonicApp} from '../../../../../ionic';
|
||||
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EApp {
|
||||
constructor(app: IonicApp) {
|
||||
}
|
||||
}
|
||||
44
src/components/chip/test/icon/main.html
Normal file
44
src/components/chip/test/icon/main.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<ion-toolbar>
|
||||
<ion-title>Chips With Icon</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-content padding style="text-align:center">
|
||||
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-icon name="pin"></ion-icon>
|
||||
<ion-label>Default</ion-label>
|
||||
</ion-chip>
|
||||
</p>
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-icon name="pin" primary></ion-icon>
|
||||
<ion-label>Primary</ion-label>
|
||||
</ion-chip>
|
||||
</p>
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-icon name="pin" secondary></ion-icon>
|
||||
<ion-label>Secondary</ion-label>
|
||||
</ion-chip>
|
||||
</p>
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-icon name="pin" danger></ion-icon>
|
||||
<ion-label>Danger</ion-label>
|
||||
</ion-chip>
|
||||
</p>
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-icon name="pin" light></ion-icon>
|
||||
<ion-label>Light</ion-label>
|
||||
</ion-chip>
|
||||
</p>
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-icon name="pin" dark></ion-icon>
|
||||
<ion-label>Dark</ion-label>
|
||||
</ion-chip>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
10
src/components/chip/test/image/index.ts
Normal file
10
src/components/chip/test/image/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import {App, IonicApp} from '../../../../../ionic';
|
||||
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EApp {
|
||||
constructor(app: IonicApp) {
|
||||
}
|
||||
}
|
||||
16
src/components/chip/test/image/main.html
Normal file
16
src/components/chip/test/image/main.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<ion-toolbar>
|
||||
<ion-title>Chips With Image</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-content padding style="text-align:center">
|
||||
|
||||
<p>
|
||||
<ion-chip>
|
||||
<ion-avatar>
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAAAAAAALAAAAAABAAEAAAICTAEAOw==">
|
||||
</ion-avatar>
|
||||
<ion-label>Default</ion-label>
|
||||
</ion-chip>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
Reference in New Issue
Block a user