Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f16c5fb13d | ||
|
|
a134c76d50 | ||
|
|
6753d715e2 | ||
|
|
c3722987c5 | ||
|
|
7f96d8c725 | ||
|
|
7666f2d97a | ||
|
|
b73bb075fd | ||
|
|
486ae96765 | ||
|
|
eca4c14f05 | ||
|
|
3dbc0c8263 | ||
|
|
81edbf2387 |
@@ -1,149 +0,0 @@
|
||||
# [5.2.0](https://github.com/ionic-team/ionicons/compare/v5.1.2...v5.2.0) (2020-10-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **icons:** added new icons ([9de2a07](https://github.com/ionic-team/ionicons/commit/9de2a0760e347f6de8ca84c7329df8975ee26199))
|
||||
* **currentColor:** update dist/svg output to use currentColor ([98fa89e](https://github.com/ionic-team/ionicons/commit/98fa89ea5731f546f2bc88f53818a3f304d4195a)), closes [#784](https://github.com/ionic-team/ionicons/issues/784) [#805](https://github.com/ionic-team/ionicons/issues/805)
|
||||
* **cheatsheet:** link dist/svg to cheatsheet icons ([eef7397](https://github.com/ionic-team/ionicons/commit/eef739789fd963ec355c4b50c1e006d1a25f664a))
|
||||
* supports aria-hidden ([#869](https://github.com/ionic-team/ionicons/issues/869)) ([01b0de6](https://github.com/ionic-team/ionicons/commit/01b0de6e80e92df0ec6ab9217fc18d45962b03b6))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **src:** fixed source svg inlined styles ([0f77aaf](https://github.com/ionic-team/ionicons/commit/0f77aaf2db57d4f989da6e85fcfbe552a0fbd0b2))
|
||||
* ariaHidden documentation source ([#871](https://github.com/ionic-team/ionicons/issues/871)) ([502d1f7](https://github.com/ionic-team/ionicons/commit/502d1f7077bb377f9939e254754c4753284bea01))
|
||||
* **search:** add login and logout search terms ([#853](https://github.com/ionic-team/ionicons/issues/853)) ([1069d8b](https://github.com/ionic-team/ionicons/commit/1069d8b4ab2b134fa6952373a78862fcb8f8d28e))
|
||||
|
||||
|
||||
|
||||
## [5.1.2](https://github.com/ionic-team/ionicons/compare/v5.1.1...v5.1.2) (2020-06-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **types:** temporary fix for projects using older typescript versions ([3aed6ee](https://github.com/ionic-team/ionicons/commit/3aed6eee317a5de367416e7529028a650e2617d3))
|
||||
|
||||
|
||||
|
||||
## [5.1.1](https://github.com/ionic-team/ionicons/compare/v5.1.0...v5.1.1) (2020-06-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **types:** add "type" to type exports so it's not added to the transpiled js file ([3a2ab6e](https://github.com/ionic-team/ionicons/commit/3a2ab6ec277234e49adfe7ed35ce1fb9d5fe7133))
|
||||
|
||||
|
||||
|
||||
# [5.1.0](https://github.com/ionic-team/ionicons/compare/5.0.0...5.1.0) (2020-06-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add behance ([14fd26b](https://github.com/ionic-team/ionicons/commit/14fd26b38f7d4c4628f75fa65bc3247abb152ab8))
|
||||
* add docker ([91fa34e](https://github.com/ionic-team/ionicons/commit/91fa34ebc7b21eb013b19499ce5b73a1b67b4542))
|
||||
* add gitlab ([fa8d76e](https://github.com/ionic-team/ionicons/commit/fa8d76e20c3bbc138a5976edb0465aa8da34a5f3))
|
||||
* add medium ([8983749](https://github.com/ionic-team/ionicons/commit/89837496004a1102156a4554cfff66623c5c98f2))
|
||||
* add paypal ([1b07d10](https://github.com/ionic-team/ionicons/commit/1b07d10212b602b532e887409623370b4df9b96d))
|
||||
* add soundcloud ([7ce073d](https://github.com/ionic-team/ionicons/commit/7ce073d3fe4e3ec10cd28cac15de63215433100e))
|
||||
* add tiktok ([73526e4](https://github.com/ionic-team/ionicons/commit/73526e40b8095d692679405ecb39500f9bf5d343))
|
||||
* add venmo ([922f433](https://github.com/ionic-team/ionicons/commit/922f43387be72c69780f29eb95081c77c91b2c5b))
|
||||
* update edge ([f61e47c](https://github.com/ionic-team/ionicons/commit/f61e47c698f10e31ee804984b64c4166284a441f))
|
||||
* update facebook ([2e7fe14](https://github.com/ionic-team/ionicons/commit/2e7fe1431528c053621515e8f8d57eb8194b0c5b))
|
||||
* update firebase ([63c9ee0](https://github.com/ionic-team/ionicons/commit/63c9ee02a51bb6a2e2528c05a427cfb85e7c27be))
|
||||
|
||||
|
||||
|
||||
## [5.0.1](https://github.com/ionic-team/ionicons/compare/v5.0.0...v5.0.1) (2020-03-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fixes for ssr support ([51a431e](https://github.com/ionic-team/ionicons/commit/51a431e6adc8f1f60902350ee07e76303dc72d3f))
|
||||
|
||||
|
||||
|
||||
# [5.0.0](https://github.com/ionic-team/ionicons/releases) (2020-02-06)
|
||||
|
||||
It's here! Please enjoy 🎈
|
||||
|
||||
### What's new
|
||||
* Top to bottom re-draw of every icon to better match the latest iOS and Material platform styles.
|
||||
* Plenty of additions to help you get icons you need for your project.
|
||||
* Instead of platform specific variants for each icon we are providing appearance variants (filled, outline, and sharp) for each icon.
|
||||
* Using appearance variants:
|
||||
```html
|
||||
<ion-icon name="heart"></ion-icon> <!--filled variant-->
|
||||
<ion-icon name="heart-outline"></ion-icon> <!--outline variant-->
|
||||
<ion-icon name="heart-sharp"></ion-icon> <!--sharp variant-->
|
||||
```
|
||||
* There will no longer be auto-switching for platform specificity when using Ionicons in an Ionic Framework app. If you'd like to switch icon styles based on the platform in Ionic use the `md` and `ios` attributes and provide the platform specific icon/variant name.
|
||||
```html
|
||||
<ion-icon ios="heart-outline" md="heart-sharp"></ion-icon>
|
||||
```
|
||||
* Adjust the stroke weight via CSS for icons that use the outline variant.
|
||||
|
||||
### BREAKING CHANGES
|
||||
The table below outlines icons that were removed or renamed.
|
||||
|
||||
| Icon Name | | Status | Notes |
|
||||
| -----------------------------| ------------| ------------| ----------------------------------------------------------------------|
|
||||
| add-circle | :x: | deleted | re-added as "circled" icon |
|
||||
| alert | :pencil2: | renamed | renamed to "alert-circle" |
|
||||
| appstore | :x: | deleted | added as google play & apple app store logos |
|
||||
| arrow-dropdown-circle | :pencil2: | renamed | `md` version added as "caret-down-circle", `ios` version added as "chevron-down-circle" |
|
||||
| arrow-dropdown | :pencil2: | renamed | `md` version added as "caret-down", `ios` version added as "chevron-down-circle-outline" |
|
||||
| arrow-dropleft-circle | :pencil2: | renamed | `md` version added as "caret-back-circle", `ios` version added as "chevron-back-circle" |
|
||||
| arrow-dropleft | :pencil2: | renamed | `md` version added as "caret-back", `ios` version added as "chevron-back-circle-outline" |
|
||||
| arrow-dropright-circle | :pencil2: | renamed | `md` version added as "caret-forward-circle", `ios` version added as "chevron-forward-circle" |
|
||||
| arrow-dropright | :pencil2: | renamed | `md` version added as "caret-forward", `ios` version added as "chevron-forward-circle-outline" |
|
||||
| arrow-dropup-circle | :pencil2: | renamed | `md` version added as "caret-up-circle", `ios` version added as "chevron-up-circle" |
|
||||
| arrow-dropup | :pencil2: | renamed | `md` version added as "caret-up", `ios` version added as "chevron-up-circle-outline" |
|
||||
| arrow-round-back | :x: | deleted | becomes "arrow-back" |
|
||||
| arrow-round-down | :x: | deleted | becomes "arrow-down" |
|
||||
| arrow-round-forward | :x: | deleted | becomes "arrow-forward" |
|
||||
| arrow-round-up | :x: | deleted | becomes "arrow-up" |
|
||||
| at | :pencil2: | renamed | becomes "at-circle" |
|
||||
| bowtie | :x: | deleted | |
|
||||
| chatboxes | :pencil2: | renamed | renamed to "chatbox" |
|
||||
| clock | :x: | deleted | |
|
||||
| contact | :pencil2: | renamed | renamed to "person-circle" |
|
||||
| contacts | :pencil2: | renamed | renamed to "people-circle" |
|
||||
| done-all | :pencil2: | renamed | renamed to "checkmark-done" |
|
||||
| fastforward | :pencil2: | renamed | renamed to "play-forward" |
|
||||
| filing | :pencil2: | renamed | renamed to "file-tray" |
|
||||
| logo-freebsd-devil | :x: | deleted | |
|
||||
| logo-game-controller-a | :x: | deleted | |
|
||||
| logo-game-controller-b | :x: | deleted | added as "game-controller" |
|
||||
| logo-googleplus | :x: | deleted | |
|
||||
| hand | :x: | deleted | split into "hand-left" and "hand-right" |
|
||||
| heart-empty | :pencil2: | renamed | renamed to "heart-outline" |
|
||||
| jet | :x: | deleted | use "airplane" |
|
||||
| list-box | :x: | deleted | |
|
||||
| lock | :pencil2: | renamed | renamed to "lock-closed" |
|
||||
| microphone | :x: | deleted | |
|
||||
| model-s | :x: | deleted | added as "car-sport" |
|
||||
| more | :x: | deleted | use "ellipsis-horizontal" for `ios` and "ellipsis-vertical" for `md` |
|
||||
| notifications-outline | :x: | deleted | exists as circled version |
|
||||
| outlet | :x: | deleted | |
|
||||
| paper | :pencil2: | renamed | renamed to "newspaper" |
|
||||
| logo-polymer | :x: | deleted | |
|
||||
| pie | :pencil2: | renamed | renamed to "pie-chart" |
|
||||
| photos | :x: | deleted | use "image" or "images" |
|
||||
| qr-scanner | :pencil2: | renamed | renamed to "qr-code" |
|
||||
| quote | :x: | deleted | |
|
||||
| redo | :pencil2: | renamed | renamed to "arrow-redo" |
|
||||
| reorder | :x: | deleted | added as "reorder-two", "reorder-three", "reorder-four" |
|
||||
| return-left | :pencil2: | renamed | renamed to "return-down-back" |
|
||||
| return-right | :pencil2: | renamed | renamed to "return-down-forward" |
|
||||
| rewind | :pencil2: | renamed | renamed to "play-back" |
|
||||
| reverse-camera | :pencil2: | renamed | renamed to "camera-reverse" |
|
||||
| share-alt | :x: | deleted | |
|
||||
| skip-backward | :pencil2: | renamed | renamed to "play-skip-back" |
|
||||
| skip-forward | :pencil2: | renamed | renamed to "play-skip-forward" |
|
||||
| stats | :pencil2: | renamed | renamed to "stats-chart" |
|
||||
| swap | :x: | deleted | use "swap-horizontal" or "swap-vertical" |
|
||||
| switch | :pencil2: | renamed | renamed to "toggle" |
|
||||
| text | :pencil2: | renamed | renamed to "chatbox-ellipses" |
|
||||
| undo | :pencil2: | renamed | renamed to "arrow-undo" |
|
||||
| unlock | :pencil2: | renamed | renamed to "lock-open" |
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionicons",
|
||||
"version": "5.2.0",
|
||||
"version": "5.2.3",
|
||||
"description": "Premium icons for Ionic.",
|
||||
"files": [
|
||||
"dist/",
|
||||
@@ -18,27 +18,20 @@
|
||||
"build.component": "stencil build",
|
||||
"collection.copy": "node scripts/collection-copy.js",
|
||||
"start": "stencil build --dev --watch --serve",
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
||||
"release.prepare": "node scripts/release.js --any-branch",
|
||||
"release": "node scripts/release.js --publish --any-branch",
|
||||
"test": "stencil test --spec"
|
||||
"test": "stencil test --spec",
|
||||
"release": "np --no-2fa",
|
||||
"version": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@stencil/core": "^1.15.0",
|
||||
"@types/execa": "^2.0.0",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
"@types/inquirer": "^7.3.1",
|
||||
"@types/jest": "^26.0.14",
|
||||
"@types/listr": "^0.14.2",
|
||||
"@types/node": "^14.11.2",
|
||||
"@types/node": "^14.11.5",
|
||||
"@types/svgo": "^1.3.3",
|
||||
"conventional-changelog-cli": "^2.1.0",
|
||||
"execa": "^4.0.3",
|
||||
"fs-extra": "9.0.1",
|
||||
"inquirer": "^7.3.3",
|
||||
"jest": "26.5.0",
|
||||
"jest-cli": "26.5.0",
|
||||
"listr": "^0.14.3",
|
||||
"jest": "^26.5.2",
|
||||
"jest-cli": "^26.5.2",
|
||||
"np": "^6.5.0",
|
||||
"svgo": "1.3.2"
|
||||
},
|
||||
"keywords": [
|
||||
@@ -74,5 +67,6 @@
|
||||
"license": "MIT",
|
||||
"sideEffects": [
|
||||
"icons/imports/"
|
||||
]
|
||||
],
|
||||
"dependencies": {}
|
||||
}
|
||||
|
||||
@@ -69,11 +69,6 @@ async function optimizeSvgs(srcSvgData: SvgData[]) {
|
||||
},
|
||||
},
|
||||
} as any,
|
||||
{
|
||||
addClassesToSVGElement: {
|
||||
className: ['ionicon'],
|
||||
},
|
||||
},
|
||||
{
|
||||
removeStyleElement: true,
|
||||
},
|
||||
|
||||
@@ -1,285 +0,0 @@
|
||||
import fs from 'fs-extra';
|
||||
import {join} from 'path';
|
||||
import execa from 'execa';
|
||||
import inquirer from 'inquirer';
|
||||
import Listr, { ListrTask } from 'listr';
|
||||
import semver from 'semver';
|
||||
|
||||
|
||||
const rootDir = join(__dirname, '..');
|
||||
const packageJsonPath = join(rootDir, 'package.json');
|
||||
const packageLockJsonPath = join(rootDir, 'package-lock.json');
|
||||
|
||||
const cmdArgs = process.argv.slice(2);
|
||||
const isPublishRelease = cmdArgs.includes('--publish');
|
||||
const isDryRun = cmdArgs.includes('--dry-run');
|
||||
const isAnyBranch = cmdArgs.includes('--any-branch');
|
||||
const isYolo = cmdArgs.includes('--yolo');
|
||||
|
||||
function runTasks(newVersion: string, releaseTag: string, isPublishRelease: boolean) {
|
||||
const pkg = readPkg();
|
||||
const tasks: ListrTask[] = [];
|
||||
|
||||
tasks.push(
|
||||
{
|
||||
title: 'Check current branch',
|
||||
task: () => execa('git', ['symbolic-ref', '--short', 'HEAD']).then(({stdout}) => {
|
||||
if (stdout !== 'master') {
|
||||
if (isAnyBranch) {
|
||||
console.log(`Not on "master" branch, currently on "${stdout}".`);
|
||||
} else {
|
||||
throw new Error(`Not on "master" branch, currently on "${stdout}". Use --any-branch to publish anyway.`);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
title: 'Check local working tree',
|
||||
task: () => execa('git', ['status', '--porcelain']).then(({stdout}) => {
|
||||
if (stdout !== '') {
|
||||
if (isYolo) {
|
||||
console.log('Unclean working tree.');
|
||||
} else {
|
||||
throw new Error('Unclean working tree. Commit or stash changes first.');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
title: 'Check remote history',
|
||||
task: () => execa('git', ['rev-list', '--count', '--left-only', '@{u}...HEAD']).then(({stdout}) => {
|
||||
if (stdout !== '0') {
|
||||
if (isAnyBranch) {
|
||||
console.log('Remote history differs.');
|
||||
} else {
|
||||
throw new Error('Remote history differs. Please pull changes.');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
if (!isPublishRelease) {
|
||||
tasks.push(
|
||||
{
|
||||
title: `Set package.json version to ${newVersion}`,
|
||||
task: () => {
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
||||
packageJson.version = newVersion;
|
||||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
|
||||
|
||||
const packageLockJson = JSON.parse(fs.readFileSync(packageLockJsonPath, 'utf8'));
|
||||
packageLockJson.version = newVersion;
|
||||
fs.writeFileSync(packageLockJsonPath, JSON.stringify(packageLockJson, null, 2) + '\n');
|
||||
}
|
||||
},
|
||||
{
|
||||
title: `Build`,
|
||||
task: () => execa('npm', ['run', 'build'], { cwd: rootDir })
|
||||
},
|
||||
{
|
||||
title: 'Run tests',
|
||||
task: () => execa('npm', ['test'], { cwd: rootDir })
|
||||
},
|
||||
{
|
||||
title: `Generate Changelog`,
|
||||
task: () => execa('npm', ['run', 'changelog'], { cwd: rootDir }),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (isPublishRelease) {
|
||||
tasks.push(
|
||||
{
|
||||
title: `Publish ionicons ${newVersion} (${releaseTag})`,
|
||||
task: () => {
|
||||
const args = ['publish'].concat(releaseTag ? ['--tag', releaseTag] : []);
|
||||
if (isDryRun) {
|
||||
console.log('[dry-run] npm', args.join(' '));
|
||||
} else {
|
||||
return execa('npm', args, { cwd: rootDir });
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Tagging the latest commit',
|
||||
task: () => {
|
||||
const args = ['tag', `v${newVersion}`];
|
||||
if (isDryRun) {
|
||||
console.log('[dry-run] git', args.join(' '));
|
||||
} else {
|
||||
return execa('git', args, { cwd: rootDir });
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Pushing to Github',
|
||||
task: () => {
|
||||
const args = ['push', '--follow-tags'];
|
||||
if (isDryRun) {
|
||||
console.log('[dry-run] git', args.join(' '));
|
||||
} else {
|
||||
return execa('git', args, { cwd: rootDir });
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const listr = new Listr(tasks);
|
||||
|
||||
listr.run()
|
||||
.then(() => {
|
||||
if (isPublishRelease) {
|
||||
console.log(`\n ${pkg.name} ${newVersion} published!! 🎉\n`);
|
||||
} else {
|
||||
console.log(`\n ${pkg.name} ${newVersion} prepared, check the diffs and commit 🕵️\n`);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async function prepareUI() {
|
||||
const pkg = readPkg();
|
||||
const oldVersion = pkg.version;
|
||||
|
||||
console.log(`\nPrepare to publish ${pkg.name} (currently ${oldVersion}) ${isDryRun ? '[dry-run]' : ''}\n`);
|
||||
|
||||
const prompts = [
|
||||
{
|
||||
type: 'list',
|
||||
name: 'version',
|
||||
message: 'Select semver increment or specify new version',
|
||||
pageSize: SEMVER_INCREMENTS.length + 2,
|
||||
choices: SEMVER_INCREMENTS
|
||||
.map(inc => ({
|
||||
name: `${inc} ${prettyVersionDiff(oldVersion, inc)}`,
|
||||
value: inc
|
||||
})),
|
||||
filter: (input: any) => isValidVersionInput(input) ? getNewVersion(oldVersion, input) : input
|
||||
},
|
||||
{
|
||||
type: 'confirm',
|
||||
name: 'confirm',
|
||||
message: (answers: any) => {
|
||||
return `Prepare release ${answers.version}. Continue?`;
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
await inquirer
|
||||
.prompt(prompts)
|
||||
.then(answers => {
|
||||
if (answers.confirm){
|
||||
const newVersion = answers.version;
|
||||
return runTasks(newVersion, null, false);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async function publishUI() {
|
||||
const pkg = readPkg();
|
||||
|
||||
console.log(`\nPublish ${pkg.name} ${pkg.version} ${isDryRun ? '[dry-run]' : ''}\n`);
|
||||
|
||||
const prompts = [
|
||||
{
|
||||
type: 'list',
|
||||
name: 'tag',
|
||||
message: 'How should this release version be tagged in npm?',
|
||||
choices: () => execa('npm', ['view', '--json', pkg.name, 'dist-tags'])
|
||||
.then(({stdout}) => {
|
||||
return Object.keys(JSON.parse(stdout))
|
||||
.map(tag => {
|
||||
return {
|
||||
name: tag,
|
||||
value: tag
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
{
|
||||
type: 'confirm',
|
||||
name: 'confirm',
|
||||
message: (answers: any) => {
|
||||
return `Will publish ${pkg.name} ${pkg.version} and tag this release as "${answers.tag}". Continue?`;
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
await inquirer
|
||||
.prompt(prompts)
|
||||
.then(answers => {
|
||||
if (answers.confirm){
|
||||
return runTasks(pkg.version, answers.tag, true);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const SEMVER_INCREMENTS = ['patch', 'minor', 'major', 'prepatch', 'preminor', 'premajor', 'prerelease'];
|
||||
const PRERELEASE_VERSIONS = ['prepatch', 'preminor', 'premajor', 'prerelease'];
|
||||
|
||||
const isValidVersion = (input: string) => Boolean(semver.valid(input));
|
||||
|
||||
const isValidVersionInput = (input: string) => SEMVER_INCREMENTS.indexOf(input) !== -1 || isValidVersion(input);
|
||||
|
||||
const isPrereleaseVersion = (version: string) => PRERELEASE_VERSIONS.indexOf(version) !== -1 || Boolean(semver.prerelease(version));
|
||||
|
||||
function getNewVersion(oldVersion: string, input: any): string {
|
||||
if (!isValidVersionInput(input)) {
|
||||
throw new Error(`Version should be either ${SEMVER_INCREMENTS.join(', ')} or a valid semver version.`);
|
||||
}
|
||||
|
||||
return SEMVER_INCREMENTS.indexOf(input) === -1 ? input : semver.inc(oldVersion, input);
|
||||
};
|
||||
|
||||
const readPkg = (): any => JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
||||
|
||||
function prettyVersionDiff(oldVersion: any, inc: any) {
|
||||
const newVersion = getNewVersion(oldVersion, inc).split('.');
|
||||
oldVersion = oldVersion.split('.');
|
||||
let firstVersionChange = false;
|
||||
const output = [];
|
||||
|
||||
for (let i = 0; i < newVersion.length; i++) {
|
||||
if ((newVersion[i] !== oldVersion[i] && !firstVersionChange)) {
|
||||
output.push(newVersion[i]);
|
||||
firstVersionChange = true;
|
||||
} else if (newVersion[i].indexOf('-') >= 1) {
|
||||
let preVersion = [];
|
||||
preVersion = newVersion[i].split('-');
|
||||
output.push(`${preVersion[0]}-${preVersion[1]}`);
|
||||
} else {
|
||||
output.push(newVersion[i]);
|
||||
}
|
||||
}
|
||||
return output.join('.');
|
||||
}
|
||||
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
if (isPublishRelease) {
|
||||
await publishUI();
|
||||
} else {
|
||||
await prepareUI();
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
@@ -47,6 +47,11 @@ export namespace Components {
|
||||
* Specifies which icon to use from the built-in set of icons.
|
||||
*/
|
||||
"name"?: string;
|
||||
/**
|
||||
* When set to `false`, SVG content that is HTTP fetched will not be checked if the response SVG content has any `<script>` elements, or any attributes that start with `on`, such as `onclick`.
|
||||
* @default true
|
||||
*/
|
||||
"sanitize": boolean;
|
||||
/**
|
||||
* The size of the icon. Available options are: `"small"` and `"large"`.
|
||||
*/
|
||||
@@ -110,6 +115,11 @@ declare namespace LocalJSX {
|
||||
* Specifies which icon to use from the built-in set of icons.
|
||||
*/
|
||||
"name"?: string;
|
||||
/**
|
||||
* When set to `false`, SVG content that is HTTP fetched will not be checked if the response SVG content has any `<script>` elements, or any attributes that start with `on`, such as `onclick`.
|
||||
* @default true
|
||||
*/
|
||||
"sanitize"?: boolean;
|
||||
/**
|
||||
* The size of the icon. Available options are: `"small"` and `"large"`.
|
||||
*/
|
||||
|
||||
@@ -2,12 +2,11 @@ import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil
|
||||
import { getSvgContent, ioniconContent } from './request';
|
||||
import { getName, getUrl } from './utils';
|
||||
|
||||
|
||||
@Component({
|
||||
tag: 'ion-icon',
|
||||
assetsDir: 'svg',
|
||||
styleUrl: 'icon.css',
|
||||
shadow: true
|
||||
shadow: true,
|
||||
})
|
||||
export class Icon {
|
||||
private io?: IntersectionObserver;
|
||||
@@ -35,7 +34,7 @@ export class Icon {
|
||||
/**
|
||||
* Set the icon to hidden, respectively `true`, to remove it from the accessibility tree.
|
||||
*/
|
||||
@Prop({reflect: true}) ariaHidden?: string;
|
||||
@Prop({ reflect: true }) ariaHidden?: string;
|
||||
|
||||
/**
|
||||
* Specifies which icon to use on `ios` mode.
|
||||
@@ -81,6 +80,14 @@ export class Icon {
|
||||
*/
|
||||
@Prop() lazy = false;
|
||||
|
||||
/**
|
||||
* When set to `false`, SVG content that is HTTP fetched will not be checked
|
||||
* if the response SVG content has any `<script>` elements, or any attributes
|
||||
* that start with `on`, such as `onclick`.
|
||||
* @default true
|
||||
*/
|
||||
@Prop() sanitize = true;
|
||||
|
||||
connectedCallback() {
|
||||
// purposely do not return the promise here because loading
|
||||
// the svg file should not hold up loading the app
|
||||
@@ -100,16 +107,18 @@ export class Icon {
|
||||
|
||||
private waitUntilVisible(el: HTMLElement, rootMargin: string, cb: () => void) {
|
||||
if (Build.isBrowser && this.lazy && typeof window !== 'undefined' && (window as any).IntersectionObserver) {
|
||||
const io = this.io = new (window as any).IntersectionObserver((data: IntersectionObserverEntry[]) => {
|
||||
if (data[0].isIntersecting) {
|
||||
io.disconnect();
|
||||
this.io = undefined;
|
||||
cb();
|
||||
}
|
||||
}, { rootMargin });
|
||||
const io = (this.io = new (window as any).IntersectionObserver(
|
||||
(data: IntersectionObserverEntry[]) => {
|
||||
if (data[0].isIntersecting) {
|
||||
io.disconnect();
|
||||
this.io = undefined;
|
||||
cb();
|
||||
}
|
||||
},
|
||||
{ rootMargin },
|
||||
));
|
||||
|
||||
io.observe(el);
|
||||
|
||||
} else {
|
||||
// browser doesn't support IntersectionObserver
|
||||
// so just fallback to always show it
|
||||
@@ -117,7 +126,6 @@ export class Icon {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Watch('name')
|
||||
@Watch('src')
|
||||
@Watch('icon')
|
||||
@@ -130,7 +138,7 @@ export class Icon {
|
||||
this.svgContent = ioniconContent.get(url);
|
||||
} else {
|
||||
// async if it hasn't been loaded
|
||||
getSvgContent(url).then(() => this.svgContent = ioniconContent.get(url));
|
||||
getSvgContent(url, this.sanitize).then(() => (this.svgContent = ioniconContent.get(url)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,31 +155,40 @@ export class Icon {
|
||||
|
||||
render() {
|
||||
const mode = this.mode || 'md';
|
||||
const flipRtl = this.flipRtl || (this.ariaLabel && (this.ariaLabel.indexOf('arrow') > -1 || this.ariaLabel.indexOf('chevron') > -1) && this.flipRtl !== false);
|
||||
const flipRtl =
|
||||
this.flipRtl ||
|
||||
(this.ariaLabel &&
|
||||
(this.ariaLabel.indexOf('arrow') > -1 || this.ariaLabel.indexOf('chevron') > -1) &&
|
||||
this.flipRtl !== false);
|
||||
|
||||
return (
|
||||
<Host role="img" class={{
|
||||
[mode]: true,
|
||||
...createColorClasses(this.color),
|
||||
[`icon-${this.size}`]: !!this.size,
|
||||
'flip-rtl': !!flipRtl && (this.el.ownerDocument as Document).dir === 'rtl'
|
||||
}}>{(
|
||||
(Build.isBrowser && this.svgContent)
|
||||
? <div class="icon-inner" innerHTML={this.svgContent}></div>
|
||||
: <div class="icon-inner"></div>
|
||||
<Host
|
||||
role="img"
|
||||
class={{
|
||||
[mode]: true,
|
||||
...createColorClasses(this.color),
|
||||
[`icon-${this.size}`]: !!this.size,
|
||||
'flip-rtl': !!flipRtl && (this.el.ownerDocument as Document).dir === 'rtl',
|
||||
}}
|
||||
>
|
||||
{Build.isBrowser && this.svgContent ? (
|
||||
<div class="icon-inner" innerHTML={this.svgContent}></div>
|
||||
) : (
|
||||
<div class="icon-inner"></div>
|
||||
)}
|
||||
</Host>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getIonMode = () => (Build.isBrowser && typeof document !== 'undefined' && document.documentElement.getAttribute('mode')) || 'md';
|
||||
|
||||
const getIonMode = () =>
|
||||
(Build.isBrowser && typeof document !== 'undefined' && document.documentElement.getAttribute('mode')) || 'md';
|
||||
|
||||
const createColorClasses = (color: string | undefined) => {
|
||||
return (color) ? {
|
||||
'ion-color': true,
|
||||
[`ion-color-${color}`]: true
|
||||
} : null;
|
||||
return color
|
||||
? {
|
||||
'ion-color': true,
|
||||
[`ion-color-${color}`]: true,
|
||||
}
|
||||
: null;
|
||||
};
|
||||
|
||||
@@ -7,20 +7,21 @@
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Attribute | Description | Type | Default |
|
||||
| ------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | -------------- |
|
||||
| `ariaHidden` | `aria-hidden` | Set the icon to hidden, respectively `true`, to remove it from the accessibility tree. | `string \| undefined` | `undefined` |
|
||||
| `ariaLabel` | `aria-label` | Specifies the label to use for accessibility. Defaults to the icon name. | `string \| undefined` | `undefined` |
|
||||
| `color` | `color` | The color to use for the background of the item. | `string \| undefined` | `undefined` |
|
||||
| `flipRtl` | `flip-rtl` | Specifies whether the icon should horizontally flip when `dir` is `"rtl"`. | `boolean \| undefined` | `undefined` |
|
||||
| `icon` | `icon` | A combination of both `name` and `src`. If a `src` url is detected it will set the `src` property. Otherwise it assumes it's a built-in named SVG and set the `name` property. | `any` | `undefined` |
|
||||
| `ios` | `ios` | Specifies which icon to use on `ios` mode. | `string \| undefined` | `undefined` |
|
||||
| `lazy` | `lazy` | If enabled, ion-icon will be loaded lazily when it's visible in the viewport. Default, `false`. | `boolean` | `false` |
|
||||
| `md` | `md` | Specifies which icon to use on `md` mode. | `string \| undefined` | `undefined` |
|
||||
| `mode` | `mode` | The mode determines which platform styles to use. | `string` | `getIonMode()` |
|
||||
| `name` | `name` | Specifies which icon to use from the built-in set of icons. | `string \| undefined` | `undefined` |
|
||||
| `size` | `size` | The size of the icon. Available options are: `"small"` and `"large"`. | `string \| undefined` | `undefined` |
|
||||
| `src` | `src` | Specifies the exact `src` of an SVG file to use. | `string \| undefined` | `undefined` |
|
||||
| Property | Attribute | Description | Type | Default |
|
||||
| ------------ | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | -------------- |
|
||||
| `ariaHidden` | `aria-hidden` | Set the icon to hidden, respectively `true`, to remove it from the accessibility tree. | `string \| undefined` | `undefined` |
|
||||
| `ariaLabel` | `aria-label` | Specifies the label to use for accessibility. Defaults to the icon name. | `string \| undefined` | `undefined` |
|
||||
| `color` | `color` | The color to use for the background of the item. | `string \| undefined` | `undefined` |
|
||||
| `flipRtl` | `flip-rtl` | Specifies whether the icon should horizontally flip when `dir` is `"rtl"`. | `boolean \| undefined` | `undefined` |
|
||||
| `icon` | `icon` | A combination of both `name` and `src`. If a `src` url is detected it will set the `src` property. Otherwise it assumes it's a built-in named SVG and set the `name` property. | `any` | `undefined` |
|
||||
| `ios` | `ios` | Specifies which icon to use on `ios` mode. | `string \| undefined` | `undefined` |
|
||||
| `lazy` | `lazy` | If enabled, ion-icon will be loaded lazily when it's visible in the viewport. Default, `false`. | `boolean` | `false` |
|
||||
| `md` | `md` | Specifies which icon to use on `md` mode. | `string \| undefined` | `undefined` |
|
||||
| `mode` | `mode` | The mode determines which platform styles to use. | `string` | `getIonMode()` |
|
||||
| `name` | `name` | Specifies which icon to use from the built-in set of icons. | `string \| undefined` | `undefined` |
|
||||
| `sanitize` | `sanitize` | When set to `false`, SVG content that is HTTP fetched will not be checked if the response SVG content has any `<script>` elements, or any attributes that start with `on`, such as `onclick`. | `boolean` | `true` |
|
||||
| `size` | `size` | The size of the icon. Available options are: `"small"` and `"large"`. | `string \| undefined` | `undefined` |
|
||||
| `src` | `src` | Specifies the exact `src` of an SVG file to use. | `string \| undefined` | `undefined` |
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
import { validateContent } from './validate';
|
||||
|
||||
|
||||
export const ioniconContent = new Map<string, string>();
|
||||
const requests = new Map<string, Promise<any>>();
|
||||
|
||||
|
||||
export const getSvgContent = (url: string) => {
|
||||
export const getSvgContent = (url: string, sanitize: boolean) => {
|
||||
// see if we already have a request for this url
|
||||
let req = requests.get(url);
|
||||
|
||||
if (!req) {
|
||||
if (typeof fetch !== 'undefined') {
|
||||
if (typeof fetch !== 'undefined' && typeof document !== 'undefined') {
|
||||
// we don't already have a request
|
||||
req = fetch(url).then(rsp => {
|
||||
req = fetch(url).then((rsp) => {
|
||||
if (rsp.ok) {
|
||||
return rsp.text().then(svgContent => {
|
||||
ioniconContent.set(url, validateContent(svgContent));
|
||||
return rsp.text().then((svgContent) => {
|
||||
if (svgContent && sanitize !== false) {
|
||||
svgContent = validateContent(svgContent);
|
||||
}
|
||||
ioniconContent.set(url, svgContent || '');
|
||||
});
|
||||
}
|
||||
ioniconContent.set(url, '');
|
||||
|
||||
@@ -1,36 +1,32 @@
|
||||
import { isStr } from './utils';
|
||||
|
||||
export const validateContent = (svgContent: string) => {
|
||||
const div = document.createElement('div');
|
||||
div.innerHTML = svgContent;
|
||||
|
||||
export const validateContent = (svgContent: string | null) => {
|
||||
if (svgContent && typeof document !== 'undefined') {
|
||||
const div = document.createElement('div');
|
||||
div.innerHTML = svgContent;
|
||||
|
||||
// setup this way to ensure it works on our buddy IE
|
||||
for (let i = div.childNodes.length - 1; i >= 0; i--) {
|
||||
if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {
|
||||
div.removeChild(div.childNodes[i]);
|
||||
}
|
||||
// setup this way to ensure it works on our buddy IE
|
||||
for (let i = div.childNodes.length - 1; i >= 0; i--) {
|
||||
if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {
|
||||
div.removeChild(div.childNodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// must only have 1 root element
|
||||
const svgElm = div.firstElementChild;
|
||||
if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {
|
||||
const svgClass = svgElm.getAttribute('class') || '';
|
||||
svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());
|
||||
// must only have 1 root element
|
||||
const svgElm = div.firstElementChild;
|
||||
if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {
|
||||
const svgClass = svgElm.getAttribute('class') || '';
|
||||
svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());
|
||||
|
||||
// root element must be an svg
|
||||
// lets double check we've got valid elements
|
||||
// do not allow scripts
|
||||
if (isValid(svgElm as any)) {
|
||||
return div.innerHTML;
|
||||
}
|
||||
// root element must be an svg
|
||||
// lets double check we've got valid elements
|
||||
// do not allow scripts
|
||||
if (isValid(svgElm as any)) {
|
||||
return div.innerHTML;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
|
||||
export const isValid = (elm: HTMLElement) => {
|
||||
if (elm.nodeType === 1) {
|
||||
if (elm.nodeName.toLowerCase() === 'script') {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><script>alert('got ya')</script><path d="M0 0h24v24H0z" fill="none"/><path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"/></svg>
|
||||
|
After Width: | Height: | Size: 544 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><script>alert('got ya')</script><path d="M0 0h24v24H0z" fill="none"/><path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"/></svg>
|
||||
|
After Width: | Height: | Size: 544 B |
@@ -1,157 +1,161 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en" mode="ios">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
|
||||
<title>Ionicons Icon Component</title>
|
||||
<script type="module" src="/build/ionicons.esm.js"></script>
|
||||
<script nomodule src="/build/ionicons.js"></script>
|
||||
</head>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
|
||||
<title>Ionicons Icon Component</title>
|
||||
<script type="module" src="/build/ionicons.esm.js"></script>
|
||||
<script nomodule src="/build/ionicons.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ionicons</h1>
|
||||
|
||||
<body>
|
||||
<h2>Default</h2>
|
||||
<ion-icon name="cellular"></ion-icon>
|
||||
<ion-icon name="at"></ion-icon>
|
||||
<ion-icon name="call"></ion-icon>
|
||||
<ion-icon name="football"></ion-icon>
|
||||
<ion-icon name="analytics"></ion-icon>
|
||||
<ion-icon name="grid"></ion-icon>
|
||||
<ion-icon name="funnel"></ion-icon>
|
||||
<ion-icon name="watch"></ion-icon>
|
||||
<ion-icon name="add-circle-outline"></ion-icon>
|
||||
|
||||
<h1>Ionicons</h1>
|
||||
<h2>Mode from html ios mode attribute</h2>
|
||||
<ion-icon md="logo-android" ios="logo-apple"></ion-icon>
|
||||
<ion-icon md="logo-android" ios="logo-apple"></ion-icon>
|
||||
|
||||
<h2>Default</h2>
|
||||
<ion-icon name="cellular"></ion-icon>
|
||||
<ion-icon name="at"></ion-icon>
|
||||
<ion-icon name="call"></ion-icon>
|
||||
<ion-icon name="football"></ion-icon>
|
||||
<ion-icon name="analytics"></ion-icon>
|
||||
<ion-icon name="grid"></ion-icon>
|
||||
<ion-icon name="funnel"></ion-icon>
|
||||
<ion-icon name="watch"></ion-icon>
|
||||
<ion-icon name="add-circle-outline"></ion-icon>
|
||||
<h2>Mode set on icon</h2>
|
||||
<ion-icon mode="ios" md="logo-android" ios="logo-apple"></ion-icon>
|
||||
<ion-icon mode="md" md="logo-android" ios="logo-apple"></ion-icon>
|
||||
|
||||
<h2>Mode from html ios mode attribute</h2>
|
||||
<ion-icon md="logo-android" ios="logo-apple"></ion-icon>
|
||||
<ion-icon md="logo-android" ios="logo-apple"></ion-icon>
|
||||
<h2>Colors</h2>
|
||||
<ion-icon color="primary" name="cellular"></ion-icon>
|
||||
<ion-icon color="secondary" name="at"></ion-icon>
|
||||
<ion-icon color="tertiary" name="call"></ion-icon>
|
||||
<ion-icon color="success" name="football"></ion-icon>
|
||||
<ion-icon color="warning" name="analytics"></ion-icon>
|
||||
<ion-icon color="danger" name="grid"></ion-icon>
|
||||
<ion-icon color="light" name="funnel"></ion-icon>
|
||||
<ion-icon color="medium" name="watch"></ion-icon>
|
||||
<ion-icon color="dark" name="toggle"></ion-icon>
|
||||
|
||||
<h2>Mode set on icon</h2>
|
||||
<ion-icon mode="ios" md="logo-android" ios="logo-apple"></ion-icon>
|
||||
<ion-icon mode="md" md="logo-android" ios="logo-apple"></ion-icon>
|
||||
<h2>Stroke width</h2>
|
||||
<ion-icon name="heart-outline" style="--ionicon-stroke-width: 8px"></ion-icon>
|
||||
|
||||
<h2>Colors</h2>
|
||||
<ion-icon color="primary" name="cellular"></ion-icon>
|
||||
<ion-icon color="secondary" name="at"></ion-icon>
|
||||
<ion-icon color="tertiary" name="call"></ion-icon>
|
||||
<ion-icon color="success" name="football"></ion-icon>
|
||||
<ion-icon color="warning" name="analytics"></ion-icon>
|
||||
<ion-icon color="danger" name="grid"></ion-icon>
|
||||
<ion-icon color="light" name="funnel"></ion-icon>
|
||||
<ion-icon color="medium" name="watch"></ion-icon>
|
||||
<ion-icon color="dark" name="toggle"></ion-icon>
|
||||
<h2>Font size</h2>
|
||||
<ion-icon name="book" style="font-size: 50px"></ion-icon>
|
||||
<ion-icon src="./assets/bug_report.svg" style="font-size: 50px"></ion-icon>
|
||||
|
||||
<h2>Stroke width</h2>
|
||||
<ion-icon name="heart-outline" style="--ionicon-stroke-width: 8px;"></ion-icon>
|
||||
<h2>Custom SVGs</h2>
|
||||
<ion-icon src="./assets/bug_report.svg"></ion-icon>
|
||||
<ion-icon src="./assets/chat.svg"></ion-icon>
|
||||
<ion-icon src="./assets/commute.svg"></ion-icon>
|
||||
<ion-icon src="./assets/copyright.svg"></ion-icon>
|
||||
<ion-icon src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon src="./assets/lock_open.svg"></ion-icon>
|
||||
<ion-icon src="./assets/toll.svg"></ion-icon>
|
||||
<ion-icon src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon src="./assets/work_outline.svg"></ion-icon>
|
||||
|
||||
<h2>Font size</h2>
|
||||
<ion-icon name="book" style="font-size: 50px;"></ion-icon>
|
||||
<ion-icon src="./assets/bug_report.svg" style="font-size: 50px;"></ion-icon>
|
||||
<h2>Custom SVGs: colors</h2>
|
||||
<ion-icon color="primary" src="./assets/bug_report.svg"></ion-icon>
|
||||
<ion-icon color="secondary" src="./assets/chat.svg"></ion-icon>
|
||||
<ion-icon color="tertiary" src="./assets/commute.svg"></ion-icon>
|
||||
<ion-icon color="success" src="./assets/copyright.svg"></ion-icon>
|
||||
<ion-icon color="warning" src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon color="danger" src="./assets/lock_open.svg"></ion-icon>
|
||||
<ion-icon color="light" src="./assets/toll.svg"></ion-icon>
|
||||
<ion-icon color="medium" src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon color="dark" src="./assets/work_outline.svg"></ion-icon>
|
||||
|
||||
<h2>Custom SVGs</h2>
|
||||
<ion-icon src="./assets/bug_report.svg"></ion-icon>
|
||||
<ion-icon src="./assets/chat.svg"></ion-icon>
|
||||
<ion-icon src="./assets/commute.svg"></ion-icon>
|
||||
<ion-icon src="./assets/copyright.svg"></ion-icon>
|
||||
<ion-icon src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon src="./assets/lock_open.svg"></ion-icon>
|
||||
<ion-icon src="./assets/toll.svg"></ion-icon>
|
||||
<ion-icon src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon src="./assets/work_outline.svg"></ion-icon>
|
||||
<h2>Custom CSS</h2>
|
||||
<ion-icon class="custom" name="grid"></ion-icon>
|
||||
<ion-icon class="custom" name="funnel"></ion-icon>
|
||||
<ion-icon class="custom" name="watch"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-react"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-javascript"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-angular"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/work_outline.svg"></ion-icon>
|
||||
|
||||
<h2>Custom SVGs: colors</h2>
|
||||
<ion-icon color="primary" src="./assets/bug_report.svg"></ion-icon>
|
||||
<ion-icon color="secondary" src="./assets/chat.svg"></ion-icon>
|
||||
<ion-icon color="tertiary" src="./assets/commute.svg"></ion-icon>
|
||||
<ion-icon color="success" src="./assets/copyright.svg"></ion-icon>
|
||||
<ion-icon color="warning" src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon color="danger" src="./assets/lock_open.svg"></ion-icon>
|
||||
<ion-icon color="light" src="./assets/toll.svg"></ion-icon>
|
||||
<ion-icon color="medium" src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon color="dark" src="./assets/work_outline.svg"></ion-icon>
|
||||
<h2>Aria</h2>
|
||||
<ion-icon name="cellular"></ion-icon>
|
||||
<ion-icon name="cellular" aria-label="Mobile data"></ion-icon>
|
||||
<ion-icon name="cellular" aria-hidden="true"></ion-icon>
|
||||
|
||||
<h2>Custom CSS</h2>
|
||||
<ion-icon class="custom" name="grid"></ion-icon>
|
||||
<ion-icon class="custom" name="funnel"></ion-icon>
|
||||
<ion-icon class="custom" name="watch"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-react"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-javascript"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-angular"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/work_outline.svg"></ion-icon>
|
||||
<h1>RTL</h1>
|
||||
|
||||
<h2>Aria</h2>
|
||||
<ion-icon name="cellular"></ion-icon>
|
||||
<ion-icon name="cellular" aria-label="Mobile data"></ion-icon>
|
||||
<ion-icon name="cellular" aria-hidden="true"></ion-icon>
|
||||
<h2>Default: Non-arrows</h2>
|
||||
<ion-icon name="cut"></ion-icon>
|
||||
<ion-icon name="call"></ion-icon>
|
||||
<ion-icon name="checkbox"></ion-icon>
|
||||
<ion-icon name="brush"></ion-icon>
|
||||
|
||||
<h1>RTL</h1>
|
||||
<h2>Flip: Non-arrows</h2>
|
||||
<ion-icon name="cut" flip-rtl></ion-icon>
|
||||
<ion-icon name="call" flip-rtl></ion-icon>
|
||||
<ion-icon name="checkbox" flip-rtl></ion-icon>
|
||||
<ion-icon name="brush" flip-rtl></ion-icon>
|
||||
|
||||
<h2>Default: Non-arrows</h2>
|
||||
<ion-icon name="cut"></ion-icon>
|
||||
<ion-icon name="call"></ion-icon>
|
||||
<ion-icon name="checkbox"></ion-icon>
|
||||
<ion-icon name="brush"></ion-icon>
|
||||
<h2>Auto Flip: arrows</h2>
|
||||
<ion-icon name="arrow-up"></ion-icon>
|
||||
<ion-icon name="arrow-forward"></ion-icon>
|
||||
<ion-icon name="arrow-down"></ion-icon>
|
||||
<ion-icon name="arrow-back"></ion-icon>
|
||||
|
||||
<h2>Flip: Non-arrows</h2>
|
||||
<ion-icon name="cut" flip-rtl></ion-icon>
|
||||
<ion-icon name="call" flip-rtl></ion-icon>
|
||||
<ion-icon name="checkbox" flip-rtl></ion-icon>
|
||||
<ion-icon name="brush" flip-rtl></ion-icon>
|
||||
<h2>Un-flip: arrows</h2>
|
||||
<ion-icon name="arrow-up" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-forward" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-down" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-back" flip-rtl="false"></ion-icon>
|
||||
|
||||
<h2>Auto Flip: arrows</h2>
|
||||
<ion-icon name="arrow-up"></ion-icon>
|
||||
<ion-icon name="arrow-forward"></ion-icon>
|
||||
<ion-icon name="arrow-down"></ion-icon>
|
||||
<ion-icon name="arrow-back"></ion-icon>
|
||||
<h2>Auto Flip: chevrons</h2>
|
||||
<ion-icon name="chevron-up"></ion-icon>
|
||||
<ion-icon name="chevron-forward"></ion-icon>
|
||||
<ion-icon name="chevron-down"></ion-icon>
|
||||
<ion-icon name="chevron-back"></ion-icon>
|
||||
|
||||
<h2>Un-flip: arrows</h2>
|
||||
<ion-icon name="arrow-up" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-forward" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-down" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-back" flip-rtl="false"></ion-icon>
|
||||
<h2>Un-flip: chevrons</h2>
|
||||
<ion-icon name="chevron-up" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="chevron-forward" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="chevron-down" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="chevron-back" flip-rtl="false"></ion-icon>
|
||||
|
||||
<h2>Auto Flip: chevrons</h2>
|
||||
<ion-icon name="chevron-up"></ion-icon>
|
||||
<ion-icon name="chevron-forward"></ion-icon>
|
||||
<ion-icon name="chevron-down"></ion-icon>
|
||||
<ion-icon name="chevron-back"></ion-icon>
|
||||
<h2>Sanitized (shouldn't show)</h2>
|
||||
<ion-icon src="./assets/sanitize.svg"></ion-icon>
|
||||
|
||||
<h2>Un-flip: chevrons</h2>
|
||||
<ion-icon name="chevron-up" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="chevron-forward" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="chevron-down" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="chevron-back" flip-rtl="false"></ion-icon>
|
||||
<h2>Not Sanitized (should show)</h2>
|
||||
<ion-icon sanitize="false" src="./assets/no-sanitize.svg"></ion-icon>
|
||||
|
||||
<p>
|
||||
<a href="./cheatsheet.html">Cheatsheet</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="./cheatsheet.html">Cheatsheet</a>
|
||||
</p>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
font-size: 32px;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
font-size: 32px;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 15px 0 5px;
|
||||
font-size: 25px;
|
||||
}
|
||||
h1 {
|
||||
margin: 15px 0 5px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 15px 0 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
h2 {
|
||||
margin: 15px 0 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.custom {
|
||||
stroke: red;
|
||||
fill: blue;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
.custom {
|
||||
stroke: red;
|
||||
fill: blue;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M208 352H144C118.539 352 94.1212 341.886 76.1178 323.882C58.1143 305.879 48 281.461 48 256C48 230.539 58.1143 206.121 76.1178 188.118C94.1212 170.114 118.539 160 144 160H208" stroke="black" stroke-width="36" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M304 160H368C393.461 160 417.879 170.114 435.882 188.118C453.886 206.121 464 230.539 464 256C464 281.461 453.886 305.879 435.882 323.882C417.879 341.886 393.461 352 368 352H304" stroke="black" stroke-width="36" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M208,352H144a96,96,0,0,1,0-192h64" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="36"/><path d="M304,160h64a96,96,0,0,1,0,192H304" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="36"/></svg>
|
||||
|
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 351 B |
@@ -1,4 +1 @@
|
||||
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M200.66 352H144C118.539 352 94.1212 341.886 76.1178 323.882C58.1143 305.879 48 281.461 48 256C48 230.539 58.1143 206.121 76.1178 188.118C94.1212 170.114 118.539 160 144 160H199.41" stroke="black" stroke-width="48" stroke-linecap="square" stroke-linejoin="round"/>
|
||||
<path d="M312.59 160H368C393.461 160 417.879 170.114 435.882 188.118C453.886 206.121 464 230.539 464 256C464 281.461 453.886 305.879 435.882 323.882C417.879 341.886 393.461 352 368 352H311.34" stroke="black" stroke-width="48" stroke-linecap="square" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M200.66,352H144a96,96,0,0,1,0-192h55.41" fill="none" stroke="#000" stroke-linecap="square" stroke-linejoin="round" stroke-width="48"/><path d="M312.59,160H368a96,96,0,0,1,0,192H311.34" fill="none" stroke="#000" stroke-linecap="square" stroke-linejoin="round" stroke-width="48"/></svg>
|
||||
|
Before Width: | Height: | Size: 656 B After Width: | Height: | Size: 366 B |
@@ -1,4 +1 @@
|
||||
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M200.66 352H144C118.539 352 94.1212 341.886 76.1178 323.882C58.1143 305.879 48 281.461 48 256C48 230.539 58.1143 206.121 76.1178 188.118C94.1212 170.114 118.539 160 144 160H199.41" stroke="black" stroke-width="48" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M312.59 160H368C393.461 160 417.879 170.114 435.882 188.118C453.886 206.121 464 230.539 464 256C464 281.461 453.886 305.879 435.882 323.882C417.879 341.886 393.461 352 368 352H311.34" stroke="black" stroke-width="48" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M200.66,352H144a96,96,0,0,1,0-192h55.41" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="48"/><path d="M312.59,160H368a96,96,0,0,1,0,192H311.34" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="48"/></svg>
|
||||
|
Before Width: | Height: | Size: 654 B After Width: | Height: | Size: 364 B |