mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(): remove ionic-vanilla and move it into core.
This commit is contained in:
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
18
packages/core/demos/test/index.html
Normal file
18
packages/core/demos/test/index.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html dir="ltr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Ionic Slides Basic</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
<script src="/dist/ionic.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<ion-app>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Item Icons</ion-label>
|
||||||
|
<ion-icon name="heart" slot="end"></ion-icon>
|
||||||
|
<ion-icon name="star" slot="start"></ion-icon>
|
||||||
|
</ion-item>
|
||||||
|
</ion-app>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -4,9 +4,9 @@
|
|||||||
"description": "Base components for Ionic",
|
"description": "Base components for Ionic",
|
||||||
"main": "dist/manifest.json",
|
"main": "dist/manifest.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run clean && npm run copy.vendor && stencil collection",
|
"build": "npm run copy.vendor && stencil build --prod",
|
||||||
"clean": "rm -Rf ./dist",
|
"dev": "npm run copy.vendor && stencil build --watch --debug",
|
||||||
"copy.vendor": "mkdir -p ./dist/vendor && cp -Rf ./src/vendor ./dist",
|
"copy.vendor": "mkdir -p ./collection/vendor && cp -Rf ./src/vendor ./collection",
|
||||||
"link.stencil": "npm link @stencil/core",
|
"link.stencil": "npm link @stencil/core",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
|
21
packages/core/src/components/badge/badge.spec.tsx.save
Normal file
21
packages/core/src/components/badge/badge.spec.tsx.save
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { componentTest } from '@stencil/core';
|
||||||
|
|
||||||
|
const mount = componentTest.mount;
|
||||||
|
|
||||||
|
describe('<ion-badge />', () => {
|
||||||
|
it('contains a slot', () => {
|
||||||
|
const wrapper = mount(<ion-badge></ion-badge>);
|
||||||
|
expect(wrapper.find('slot')).to.have.length(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('renders slot components as direct children', () => {
|
||||||
|
const wrapper = mount(
|
||||||
|
<ion-badge>
|
||||||
|
<span>5</span> Why hello there
|
||||||
|
</ion-badge>
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(wrapper.contains(<span>5</span>, 'Why', 'hello', 'there')).to.equal(true);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
179
packages/core/src/components/icon/test/items.html
Normal file
179
packages/core/src/components/icon/test/items.html
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html dir="ltr">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Ionic</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
<script src="/dist/ionic.js"></script>
|
||||||
|
<style>
|
||||||
|
profile-modal {
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<ion-app>
|
||||||
|
|
||||||
|
<ion-page>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-header>
|
||||||
|
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-title>Icons</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
|
||||||
|
<ion-list>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon id="dynamicColor" name="home" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
dynamicColor name="home"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="home" is-active="true" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="home" is-active="true"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon id="dynamicProp" is-active="false" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
dynamicProp is-active="false"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon id="dynamicAttr" is-active="false" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
dynamicAttr is-active="false"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="md-home" is-active="true" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="md-home" is-active="true"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="ios-home" is-active="true" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="ios-home" is-active="true"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="ios-home" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="ios-home"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="ios-home-outline" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="ios-home-outline"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="ios-home-outline" is-active="false" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="ios-home-outline" is-active="false"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="md-home" color="primary" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="md-home"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="logo-twitter" color="secondary" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="logo-twitter"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon ios="logo-apple" md="logo-android" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
ios="logo-apple" md="logo-android"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon ios="md-color-filter" md="ios-color-filter" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
ios="md-color-filter" md="ios-color-filter"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon ios="md-color-filter" md="ios-color-filter" is-active="false" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
ios="md-color-filter" md="ios-color-filter" is-active="false"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="null"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-icon name="home" hidden="true" slot="start"></ion-icon>
|
||||||
|
<code>
|
||||||
|
name="home" hidden="true"
|
||||||
|
</code>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
</ion-list>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var dynamicColor = document.getElementById('dynamicColor');
|
||||||
|
var dynamicProp = document.getElementById('dynamicProp');
|
||||||
|
var dynamicAttr = document.getElementById('dynamicAttr');
|
||||||
|
|
||||||
|
dynamicColor.setAttribute('color', 'danger');
|
||||||
|
|
||||||
|
let interval = setInterval(function () {
|
||||||
|
if (dynamicProp.name === 'home') {
|
||||||
|
dynamicProp.name = 'ios-home';
|
||||||
|
dynamicAttr.setAttribute('name', 'ios-home');
|
||||||
|
} else if (dynamicProp.name === 'ios-home') {
|
||||||
|
dynamicProp.name = 'md-home';
|
||||||
|
dynamicAttr.setAttribute('name', 'md-home');
|
||||||
|
} else {
|
||||||
|
dynamicProp.name = 'home';
|
||||||
|
dynamicAttr.setAttribute('name', 'home');
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
clearInterval(interval);
|
||||||
|
}, 4000);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</ion-content>
|
||||||
|
</ion-page>
|
||||||
|
</ion-app>
|
||||||
|
</body>
|
||||||
|
</html>
|
70
packages/core/src/components/item/test/basic.html
Normal file
70
packages/core/src/components/item/test/basic.html
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html dir="ltr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Ionic Slides Basic</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
<script src="/dist/ionic.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<ion-app>
|
||||||
|
<ion-header>
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-title>Button Icons</ion-title>
|
||||||
|
<ion-buttons slot="end">
|
||||||
|
<ion-button color="secondary">
|
||||||
|
Default
|
||||||
|
<ion-icon name="star" slot="end"></ion-icon>
|
||||||
|
</ion-button>
|
||||||
|
<ion-button color="secondary">
|
||||||
|
<ion-icon slot="icon-only" name="home"></ion-icon>
|
||||||
|
</ion-button>
|
||||||
|
</ion-buttons>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Item Icons</ion-label>
|
||||||
|
<ion-icon name="heart" slot="end"></ion-icon>
|
||||||
|
<ion-icon name="star" slot="start"></ion-icon>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Item No Size Button</ion-label>
|
||||||
|
<ion-button slot="start"><ion-icon name="heart" slot="end"></ion-icon>Start Button</ion-button>
|
||||||
|
<ion-button slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Item Outline Button</ion-label>
|
||||||
|
<ion-button outline slot="start"><ion-icon name="heart" slot="end"></ion-icon>Start Button</ion-button>
|
||||||
|
<ion-button outline slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Item Large Button</ion-label>
|
||||||
|
<ion-button large slot="start"><ion-icon name="star" slot="end"></ion-icon>Start Button</ion-button>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Item Large Button</ion-label>
|
||||||
|
<ion-button large slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Item Small Button</ion-label>
|
||||||
|
<ion-button small slot="start"><ion-icon name="star" slot="end"></ion-icon>Start Button</ion-button>
|
||||||
|
<ion-button small slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Item Default Button</ion-label>
|
||||||
|
<ion-button default slot="start"><ion-icon name="star" slot="end"></ion-icon>Start Button</ion-button>
|
||||||
|
<ion-button default slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
</ion-content>
|
||||||
|
</ion-app>
|
||||||
|
</body>
|
||||||
|
</html>
|
33
packages/core/src/components/slides/test/basic.html
Normal file
33
packages/core/src/components/slides/test/basic.html
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html dir="ltr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Ionic Slides Basic</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
<script src="/dist/ionic.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<ion-slides style="background: black"
|
||||||
|
(ionSlideWillChange)="onSlideWillChange($event)"
|
||||||
|
(ionSlideDidChange)="onSlideDidChange($event)"
|
||||||
|
(ionSlideDrag)="onSlideDrag($event)"
|
||||||
|
pager="true"
|
||||||
|
effect="flip">
|
||||||
|
|
||||||
|
<ion-slide style="background: red; color: white;">
|
||||||
|
<h1>Slide 1</h1>
|
||||||
|
</ion-slide>
|
||||||
|
|
||||||
|
<ion-slide style="background: white; color: blue;">
|
||||||
|
<h1>Slide 2</h1>
|
||||||
|
</ion-slide>
|
||||||
|
|
||||||
|
<ion-slide style="background: blue; color: white;">
|
||||||
|
<h1>Slide 3</h1>
|
||||||
|
</ion-slide>
|
||||||
|
|
||||||
|
</ion-slides>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,6 +1,9 @@
|
|||||||
exports.config = {
|
exports.config = {
|
||||||
|
namespace: 'ionic',
|
||||||
src: 'src',
|
src: 'src',
|
||||||
dest: 'dist',
|
dest: 'dist',
|
||||||
|
collection: true,
|
||||||
|
collectionDest: 'collection',
|
||||||
bundles: [
|
bundles: [
|
||||||
{ components: ['ion-app', 'ion-content', 'ion-footer', 'ion-header', 'ion-navbar', 'ion-page', 'ion-title', 'ion-toolbar'] },
|
{ components: ['ion-app', 'ion-content', 'ion-footer', 'ion-header', 'ion-navbar', 'ion-page', 'ion-title', 'ion-toolbar'] },
|
||||||
{ components: ['ion-avatar', 'ion-badge', 'ion-thumbnail'] },
|
{ components: ['ion-avatar', 'ion-badge', 'ion-thumbnail'] },
|
||||||
@ -15,5 +18,6 @@ exports.config = {
|
|||||||
{ components: ['ion-slides', 'ion-slide'] },
|
{ components: ['ion-slides', 'ion-slide'] },
|
||||||
{ components: ['ion-spinner'] },
|
{ components: ['ion-spinner'] },
|
||||||
{ components: ['ion-toggle'] }
|
{ components: ['ion-toggle'] }
|
||||||
]
|
],
|
||||||
|
preamble: '(C) Ionic Vanilla https://ionicframework.com - MIT License'
|
||||||
};
|
};
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@ionic/vanilla",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"description": "Base components for Ionic",
|
|
||||||
"main": "dist/index.js",
|
|
||||||
"scripts": {
|
|
||||||
"build": "npm run clean && npm run prod",
|
|
||||||
"clean": "rm -Rf ./dist",
|
|
||||||
"dev": "stencil build",
|
|
||||||
"link.stencil": "npm link @stencil/core",
|
|
||||||
"prod": "stencil build --prod",
|
|
||||||
"test": "jest"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/ionic-team/ionic.git"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@ionic/core": "0.0.1"
|
|
||||||
},
|
|
||||||
"devDependencies":{
|
|
||||||
"@stencil/core": "0.0.1"
|
|
||||||
},
|
|
||||||
"author": "Ionic Team",
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/ionic-team/ionic/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/ionic-team/ionic#readme"
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
exports.config = {
|
|
||||||
namespace: 'Ionic',
|
|
||||||
dest: 'dist',
|
|
||||||
collections: [
|
|
||||||
'@ionic/core'
|
|
||||||
],
|
|
||||||
preamble: '(C) Ionic Vanilla https://ionicframework.com - MIT License'
|
|
||||||
};
|
|
Reference in New Issue
Block a user