Compare commits

...
45 Commits
Author SHA1 Message Date
Sean Perkins cafe8e6541 chore: exclude playwright test infra and test svg assets from collection output (#1143) 2022-11-08 14:33:56 -05:00
Sean Perkins 66858926cc fix(icon): icons will load when content security policies are enabled (#1141) 2022-11-08 13:45:01 -05:00
Amanda Johnston c37b691dd5 fix(): flip-rtl works if dir="rtl" is set on icon directly (#1142) 2022-11-08 10:11:26 -06:00
Vinay Harwani 0e3ba9922c chore(readme): update cdn url version in readme (#1112)
resolves #1093
2022-10-14 14:30:02 -04:00
Liam DeBeasi 36992fc01b chore(ci): e2e tests are run on CI (#1126) 2022-10-14 13:50:00 -04:00
Liam DeBeasi 5f2aab6cbe chore(ci): add update screenshots stub (#1125) 2022-09-30 16:38:13 -04:00
Liam DeBeasi fd90487afc test(icon): add playwright (#1124) 2022-09-30 16:36:12 -04:00
Liam DeBeasi 06b9b1fc59 chore(typescript): resolve errors (#1122) 2022-09-30 16:03:11 -04:00
Liam DeBeasi 0dfccdf016 chore(ci): run build on CI (#1121) 2022-09-30 15:23:48 -04:00
Brandy Carney 69e0817503 chore(github): remove duplicate labels key (#1119) 2022-09-29 16:15:04 -04:00
Brandy Carney 19629000ca chore(github): add ionitron issue bot for labeling (#1115) 2022-09-27 11:39:48 -04:00
Liam DeBeasi d13cd3333c chore(github): add issue templates (#1106) 2022-09-21 11:29:16 -04:00
Liam DeBeasi 20c396d8d7 merge release-6.0.3
6.0.3
2022-08-26 08:15:08 -05:00
Liam DeBeasi b6903a0ad8 6.0.3 2022-08-26 09:13:41 -04:00
Marco D'Auria 8d898d7170 fix(icon): sanitizer checks attribute name instead of value (#1087)
resolves #1088
2022-08-26 09:10:58 -04:00
Liam DeBeasi 7dd69094d1 merge release-6.0.2
6.0.2
2022-05-31 17:18:32 -04:00
Liam DeBeasi e79e5cd235 6.0.2 2022-05-31 17:17:27 -04:00
Liam DeBeasi 86a051ca63 merge release-6.0.1 2022-05-31 17:16:42 -04:00
Liam DeBeasi 28d0338ee0 fix(): improve compatibility with vite (#1066) 2022-05-31 17:14:57 -04:00
Liam DeBeasi 3ec9271e83 fix(icon): using icon in ssr environment no longer errors on HTMLElement (#1035) 2022-01-19 14:47:20 -05:00
Liam DeBeasi 19dd66469c merge release-6.0.0
6.0.0
2021-11-11 16:26:58 -05:00
Liam DeBeasi 43d61fe909 6.0.0 2021-11-08 16:29:59 -05:00
Liam DeBeasi 1038a7f682 fix(icon): avoid type collisions with ariaLabel and ariaHidden (#1014) 2021-11-08 16:26:01 -05:00
Liam DeBeasi 947091adf7 chore(): add install loader script 2021-11-02 17:22:18 +00:00
Liam DeBeasi 728aa746a0 merge release-5.5.4
5.5.4
2021-11-02 13:10:35 -04:00
Liam DeBeasi 32da247bc1 5.5.4 2021-11-02 13:08:44 -04:00
Liam DeBeasi f21bb0f097 chore(): update ionicons to stencil 2.10 (#1015) 2021-11-02 12:27:22 -04:00
Liam DeBeasi e6a5af1a96 merge release-5.5.3
5.5.3
2021-08-03 09:21:16 -04:00
Liam DeBeasi 36a0c6b103 5.5.3 2021-08-03 09:18:39 -04:00
Damian Tarnawsky e63653cbe1 fix(): reflect name property as attribute (#981)
resolves #975
2021-08-03 09:13:45 -04:00
Liam DeBeasi 4ca8139f77 5.5.2 (#983) 2021-06-17 10:12:16 -04:00
Liam DeBeasi 24caaad7d9 fix(build): add old ionicons.js file (#982) 2021-06-17 09:51:50 -04:00
Liam DeBeasi 8c2a507fcf 5.5.1 2021-03-22 14:11:16 -04:00
Liam DeBeasi c76f2a2556 fix(): adding aria-hidden no longer disables automatic rtl switching (#954) 2021-03-22 14:09:03 -04:00
Rafael Kraut 0d7f507677 chore: add tag "globe" to earth (#919) 2021-02-09 16:14:09 -06:00
Adam Bradley b3155d9603 5.5.0 2021-02-09 16:04:52 -06:00
Adam Bradley 9139a01e18 5.5.0-1 2021-02-02 09:46:20 -06:00
Adam Bradley 0541db0f28 chore: add "components/" to package json files 2021-02-02 09:45:34 -06:00
Adam Bradley 200678a619 5.5.0-0 2021-02-01 15:36:05 -06:00
Adam Bradley 66556ea45c feat(custom-elements): export ionicons/components
Also provide ionicons as a custom element which can be defined using `customElements.define()`

```
import { IonIcon } from "ionicons/components/ion-icon";
customElements.define("ion-icon", IonIcon);
```

The custom element build works the same as the lazy load build, and is also able to lazy load svgs on demand, either by giving it an exact url in the `src` attribute `<ion-icon src="./path/to/airplane.svg"></ion-icon>`, or by providing the name of the ionicon to load `<ion-icon name="airplane"></ion-icon>`.

If using the `name` attribute, you'll also need to set where to find the svg directory using `setAssetPath()`

```
import { setAssetPath } from "ionicons/components";
setAssetPath(location.href);
```
2021-02-01 15:28:33 -06:00
Adam Bradley b1c23f8dee 5.4.0 2021-01-26 12:18:27 -06:00
Adam Bradley 81f2fc1a84 feat: add new icons 2021-01-26 12:17:36 -06:00
Kevin Ports 1543daa010 5.3.0 2021-01-04 16:11:54 -06:00
Kevin Ports 500d15fec0 Add Microsoft logo 2021-01-04 14:59:33 -06:00
Adam Bradley a30dfb2886 update readme 2020-10-07 16:43:33 -05:00
76 changed files with 16195 additions and 2647 deletions
+32
View File
@@ -0,0 +1,32 @@
name: 🐛 Bug Report
description: Report a bug in the ion-icon component. Incorrect icons should use the "Incorrect Icon" template instead.
labels: ["triage"]
title: "bug: "
body:
- type: textarea
attributes:
label: Current Behavior
description: A clear description of what the bug is and how it manifests.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
description: Please explain the steps required to duplicate this issue.
validations:
required: true
- type: input
attributes:
label: Code Reproduction URL
description: Please provide an application with the minimum code required to reproduce the issue. This is the best way to ensure this issue is triaged quickly. Issues without a code reproduction may be closed if the Ionic Team cannot reproduce the issue you are reporting.
placeholder: https://github.com/...
- type: textarea
attributes:
label: Additional Information
description: List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc.
@@ -0,0 +1,23 @@
name: 💡 Feature Request
description: Suggest a new feature for the ion-icon component. Icon requests should use the "Icon Request" template instead.
labels: ["triage"]
title: "feat: "
body:
- type: textarea
attributes:
label: Describe Problem
description: A clear and concise description of what the problem is. Ex. I am always frustrated when [...]
validations:
required: true
- type: textarea
attributes:
label: Describe Preferred Solution
description: A clear and concise description of what you want to happen.
- type: textarea
attributes:
label: Describe Alternatives
description: A clear and concise description of any alternative solutions or features you have considered.
- type: textarea
attributes:
label: Additional Information
description: Add any other context or screenshots about the feature request here.
+19
View File
@@ -0,0 +1,19 @@
name: 🚀 Icon Request
description: Request a new icon
labels: ["triage"]
title: "icon request: "
body:
- type: textarea
attributes:
label: Describe the Icon
description: A clear and concise description of the icon you would like added.
validations:
required: true
- type: textarea
attributes:
label: Links to Examples
description: Add links to any examples of the icon in other libraries that you like.
- type: textarea
attributes:
label: Additional Information
description: Add any other context about the icon request here.
+17
View File
@@ -0,0 +1,17 @@
name: 😒 Incorrect Icon
description: Report an incorrect icon
labels: ["triage"]
title: "incorrect icon: "
body:
- type: textarea
attributes:
label: Describe the Issue
description: A clear description of what is wrong with the icon. Please include any relevant screenshots.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear description of what the icon should look like. Please include any relevant screenshots.
validations:
required: true
+93
View File
@@ -0,0 +1,93 @@
triage:
label: triage
dryRun: false
closeAndLock:
labels:
- label: 'ionitron: support'
message: >
Thanks for the issue! This issue appears to be a support request. We use this issue tracker exclusively for
bug reports and feature requests. Please use our [forum](https://forum.ionicframework.com/) for help or
questions about Ionicons.
Thank you for using Ionicons!
- label: 'ionitron: missing template'
message: >
Thanks for the issue! It appears that you have not filled out the provided issue template. We use this issue
template in order to gather more information and further assist you. Please create a new issue and ensure the
template is fully filled out.
Thank you for using Ionicons!
close: true
lock: true
dryRun: false
comment:
labels:
- label: "help wanted"
message: >
This issue has been labeled as `help wanted`. This label is added to issues
that we believe would be good for contributors.
If you'd like to work on this issue, please comment here letting us know that
you would like to submit a pull request for it. This helps us to keep track of
the pull request and make sure there isn't duplicated effort.
For a guide on how to create a pull request and test this project locally to see
your changes, see our [contributing documentation](https://github.com/ionic-team/ionicons/blob/main/.github/CONTRIBUTING.md#creating-a-pull-request).
Thank you!
- label: 'ionitron: needs reproduction'
message: >
Thanks for the issue! This issue has been labeled as `needs reproduction`. This label is added to issues that
need a code reproduction.
Please reproduce this issue and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a
reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was
not enough for our team to reproduce the issue.
dryRun: false
noReply:
days: 14
maxIssuesPerRun: 100
label: "needs: reply"
responseLabel: triage
exemptProjects: true
exemptMilestones: true
message: >
Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still
an issue with the latest version of Ionicons, please create a new issue and ensure the
template is fully filled out.
Thank you for using Ionicons!
close: true
lock: true
dryRun: false
noReproduction:
days: 14
maxIssuesPerRun: 100
label: "ionitron: needs reproduction"
responseLabel: triage
exemptProjects: true
exemptMilestones: true
message: >
Thanks for the issue! This issue is being closed due to the lack of a code reproduction. If this is still
an issue with the latest version of Ionicons, please create a new issue and ensure the
template is fully filled out.
Thank you for using Ionicons!
close: true
lock: true
dryRun: false
@@ -0,0 +1,34 @@
name: 'Build Ionicons'
description: 'Build Ionicons'
runs:
using: 'composite'
steps:
- uses: actions/checkout@v3
with:
# Checkout the latest commit in this branch
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v3
- name: Cache Node Modules
uses: actions/cache@v3
env:
cache-name: node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }}-v1
- name: Install Dependencies
run: npm install
shell: bash
- name: Build
run: npm run build
shell: bash
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionicons-build
output: IoniconsBuild.zip
paths: dist components icons www
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionicons-src
output: IoniconsSrc.zip
paths: src
@@ -0,0 +1,19 @@
name: 'Archive Download'
description: 'Downloads and decompresses an archive from a previous job'
inputs:
path:
description: 'Input archive name'
filename:
description: 'Input file name'
name:
description: 'Archive name'
runs:
using: 'composite'
steps:
- uses: actions/download-artifact@v2
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
- name: Exract Archive
run: unzip -q -o ${{ inputs.path }}/${{ inputs.filename }}
shell: bash
@@ -0,0 +1,86 @@
name: 'Test E2E'
description: 'Test E2E'
inputs:
shard:
description: 'Playwright Test Shard (ex: 2)'
totalShards:
description: 'Playwright total number of test shards (ex: 4)'
update:
description: 'Whether or not to update the reference snapshots'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v3
- name: Cache Node Modules
uses: actions/cache@v3
env:
cache-name: node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }}-v1
- uses: ./.github/workflows/actions/download-archive
with:
name: ionicons-build
path: .
filename: IoniconsBuild.zip
- uses: ./.github/workflows/actions/download-archive
with:
name: ionicons-src
path: .
filename: IoniconsSrc.zip
- name: Install Playwright Dependencies
run: npx playwright install && npx playwright install-deps
shell: bash
- name: Test
if: inputs.update != 'true'
run: npx playwright test --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
shell: bash
- name: Test and Update
id: test-and-update
if: inputs.update == 'true'
# Keep track of the files that were
# changed so they can be correctly restored
# in the combine step.
# To do this, we move only the changed files
# to a separate directory, while preserving the
# directory structure of the source.
# When, we create and archive of these results
# so that the combine step can simply
# unzip and move the changed files into place.
# We have extra logic added so that job runners
# that do not have any new screenshots do not create
# an unnecessary .zip.
run: |
npx playwright test --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots
git add src/\*.png --force
mkdir updated-screenshots
echo 'made dir'
rsync -R --progress $(git diff --name-only --cached) updated-screenshots
echo 'copied images'
if [ -d updated-screenshots ]; then
echo "::set-output name=hasUpdatedScreenshots::$(echo 'true')"
cd updated-screenshots
ls
zip -q -r ../UpdatedScreenshots-${{ inputs.shard }}-${{ inputs.totalShards }}.zip ./
fi
shell: bash
- name: Archive Updated Screenshots
if: inputs.update == 'true' && steps.test-and-update.outputs.hasUpdatedScreenshots == 'true'
uses: actions/upload-artifact@v3
with:
name: updated-screenshots-${{ inputs.shard }}-${{ inputs.totalShards }}
path: UpdatedScreenshots-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
- name: Archive Test Results
# The always() ensures that this step
# runs even if the previous step fails.
# We want the test results to be archived
# even if the test fails in the previous
# step, otherwise there would be no way
# to debug these tests.
if: always()
uses: ./.github/workflows/actions/upload-archive
with:
name: test-results-${{ inputs.shard }}-${{ inputs.totalShards }}
output: TestResults-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
paths: playwright-report
@@ -0,0 +1,22 @@
name: 'Test Spec'
description: 'Test Spec'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v3
- name: Cache Node Modules
uses: actions/cache@v3
env:
cache-name: node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }}-v1
- uses: ./.github/workflows/actions/download-archive
with:
name: ionicons-build
path: .
filename: IoniconsBuild.zip
- name: Test
run: npm run test.spec -- --ci
shell: bash
@@ -0,0 +1,38 @@
name: 'Update Reference Screenshots'
description: 'Update Reference Screenshots'
on:
workflow_dispatch:
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v3
- uses: actions/download-artifact@v3
with:
path: ./artifacts
- name: Extract Archives
# This finds all .zip files in the ./artifacts
# directory, including nested directories.
# It then unzips every .zip to the root directory
run: |
find . -type f -name 'UpdatedScreenshots-*.zip' -exec unzip -q -o -d ../ {} \;
shell: bash
working-directory: ./artifacts
- name: Push Screenshots
# Configure user as Ionitron
# and push only the changed .png snapshots
# to the remote branch.
# Screenshots are in .gitignore
# to prevent local screenshots from getting
# pushed to Git. As a result, we need --force
# here so that CI generated screenshots can
# get added to git. Screenshot ground truths
# should only be added via this CI process.
run: |
git config user.name ionitron
git config user.email hi@ionicframework.com
git add src/\*.png --force
git commit -m "chore(): add updated snapshots"
git push
shell: bash
@@ -0,0 +1,19 @@
name: 'Archive Upload'
description: 'Compresses and uploads an archive to be reused across jobs'
inputs:
paths:
description: 'Paths to files or directories to archive'
output:
description: 'Output file name'
name:
description: 'Archive name'
runs:
using: 'composite'
steps:
- name: Create Archive
run: zip -q -r ${{ inputs.output }} ${{ inputs.paths }}
shell: bash
- uses: actions/upload-artifact@v2
with:
name: ${{ inputs.name }}
path: ${{ inputs.output }}
+71
View File
@@ -0,0 +1,71 @@
name: 'Ionicons Build'
on:
pull_request:
branches: [ '**' ]
# When pushing a new commit we should
# cancel the previous test run to not
# consume more runners than we need to.
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Checkout the latest commit in this branch
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/workflows/actions/build-core
test-spec:
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-spec
test-e2e:
strategy:
# This ensures that all screenshot shard
# failures are reported so the dev can
# review everything at once.
fail-fast: false
matrix:
# Divide the tests into n buckets
# and run those buckets in parallel.
# To increase the number of shards,
# add new items to the shard array
# and change the value of totalShards
# to be the length of the shard array.
shard: [1, 2, 3]
totalShards: [3]
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-e2e
with:
shard: ${{ matrix.shard }}
totalShards: ${{ matrix.totalShards }}
# Screenshots are required to pass
# in order for the branch to be merge
# eligible. However, the screenshot tests
# are run on n runners where n can change
# over time. The verify-screenshots step allows
# us to have a required status check for screenshot
# results without having to manually add each
# matrix run in the branch protection rules
# Source: https://github.community/t/status-check-for-a-matrix-jobs/127354
verify-e2e:
if: ${{ always() }}
needs: test-e2e
runs-on: ubuntu-latest
steps:
- name: Check build matrix status
if: ${{ needs.test-e2e.result != 'success' }}
run: exit 1
+52
View File
@@ -0,0 +1,52 @@
name: 'Update Reference Screenshots'
on:
workflow_dispatch:
jobs:
build-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/build-core
test-e2e:
strategy:
# This ensures that all screenshot shard
# failures are reported so the dev can
# review everything at once.
fail-fast: false
matrix:
# Divide the tests into n buckets
# and run those buckets in parallel.
# To increase the number of shards,
# add new items to the shard array
# and change the value of totalShards
# to be the length of the shard array.
shard: [1, 2, 3]
totalShards: [3]
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-e2e
with:
shard: ${{ matrix.shard }}
totalShards: ${{ matrix.totalShards }}
update: true
update-reference-screenshots:
runs-on: ubuntu-latest
needs: [test-e2e]
steps:
- uses: actions/checkout@v2
# Normally, we could just push with the
# default GITHUB_TOKEN, but that will
# not cause the build workflow
# to re-run. We use Ionitron's
# Personal Access Token instead
# to allow for this build workflow
# to run when the screenshots are pushed.
with:
token: ${{ secrets.IONITRON_TOKEN }}
- uses: ./.github/workflows/actions/update-reference-screenshots
+7 -1
View File
@@ -10,11 +10,17 @@ log.txt
.idea/
.versions/
.vscode/
/components/
node_modules/
tmp/
dist/
icons/
.DS_Store
scripts/*.js
!scripts/install-loader.js
www/
www/
/test-results/
/playwright-report/
/playwright/.cache/
/src/**/*-snapshots
+14747 -2554
View File
File diff suppressed because it is too large Load Diff
+22 -15
View File
@@ -1,13 +1,14 @@
{
"name": "ionicons",
"version": "5.2.3",
"version": "6.0.3",
"description": "Premium icons for Ionic.",
"files": [
"components/",
"dist/",
"icons/"
],
"module": "dist/index.mjs",
"main": "dist/index.js",
"main": "./dist/index.cjs.js",
"module": "./dist/index.js",
"types": "dist/types/index.d.ts",
"unpkg": "dist/ionicons.js",
"collection": "dist/collection/collection-manifest.json",
@@ -18,21 +19,28 @@
"build.component": "stencil build",
"collection.copy": "node scripts/collection-copy.js",
"start": "stencil build --dev --watch --serve",
"test": "stencil test --spec",
"test": "npm run test.spec",
"test.spec": "stencil test --spec",
"release": "np --no-2fa",
"version": "npm run build"
},
"dependencies": {
"@stencil/core": "^2.18.0"
},
"devDependencies": {
"@stencil/core": "^1.15.0",
"@types/fs-extra": "^9.0.1",
"@types/jest": "^26.0.14",
"@types/node": "^14.11.5",
"@playwright/test": "^1.26.1",
"@types/fs-extra": "^9.0.6",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.22",
"@types/svgo": "^1.3.3",
"fs-extra": "9.0.1",
"jest": "^26.5.2",
"jest-cli": "^26.5.2",
"np": "^6.5.0",
"svgo": "1.3.2"
"fs-extra": "^9.1.0",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
"np": "^7.2.0",
"serve": "^14.0.1",
"puppeteer": "^10.4.0",
"svgo": "1.3.2",
"typescript": "^4.1.3"
},
"keywords": [
"icon pack",
@@ -67,6 +75,5 @@
"license": "MIT",
"sideEffects": [
"icons/imports/"
],
"dependencies": {}
]
}
+97
View File
@@ -0,0 +1,97 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices, expect } from '@playwright/test';
const projects = [
{
/**
* This is really just desktop Firefox
* but with a mobile viewport.
*/
name: 'Mobile Firefox',
use: {
browserName: 'firefox',
/**
* This is the Pixel 5 configuration.
* We can't use devices['Pixel 5']
* because the "isMobile" option is
* not supported on Firefox.
*/
viewport: {
width: 393,
height: 727
},
screen: {
width: 393,
height: 851
}
},
},
{
name: 'Mobile Chrome',
use: {
browserName: 'chromium',
...devices['Pixel 5']
}
},
{
name: 'Mobile Safari',
use: {
browserName: 'webkit',
...devices['iPhone 12']
}
}
];
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testMatch: '*.e2e.ts',
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 5000,
toMatchSnapshot: {
/**
* Increases the maximum allowed pixel difference to account
* for slight browser rendering inconsistencies.
*/
maxDiffPixelRatio: 0.02
}
},
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',
/**
* All failed tests should create
* a trace file for easier debugging.
*
* See https://playwright.dev/docs/trace-viewer
*/
trace: 'retain-on-failure',
baseURL: 'http://localhost:3333',
},
/* Configure projects for major browsers */
projects: projects,
webServer: {
command: 'serve www -p 3333',
port: 3333,
reuseExistingServer: !process.env.CI
}
};
export default config;
+4 -3
View File
@@ -1,6 +1,6 @@
# Ionicons
[Ionicons](http://ionicons.com/) is a completely open-source icon set with 1,100+ icons crafted for web, iOS, Android, and desktop apps. Ionicons was built for [Ionic Framework](https://ionicframework.com/), so icons have both Material Design and iOS versions.
[Ionicons](http://ionicons.com/) is a completely open-source icon set with 1,300 icons crafted for web, iOS, Android, and desktop apps. Ionicons was built for [Ionic Framework](https://ionicframework.com/), so icons have both Material Design and iOS versions.
Note: All brand icons are trademarks of their respective owners. The use of these trademarks does not indicate endorsement of the trademark holder by Ionic, nor vice versa.
@@ -26,7 +26,7 @@ Also note that only visible icons are loaded, and icons which are "below the fol
If you're using [Ionic Framework](https://ionicframework.com/), Ionicons is packaged by default, so no installation is necessary. Want to use Ionicons without Ionic Framework? Place the following `<script>` near the end of your page, right before the closing </body> tag, to enable them.
```html
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
<script src="https://unpkg.com/ionicons@latest/dist/ionicons.js"></script>
```
### Basic usage
@@ -103,7 +103,7 @@ ion-icon {
## Migrating from v4
See the [changelog](https://github.com/ionic-team/ionicons/blob/master/CHANGELOG.md#500-2020-01-15) for a list of icon deletions/renames.
See the [5.0 release notes](https://github.com/ionic-team/ionicons/releases/tag/5.0.0) for a list of icon deletions/renames.
## License
@@ -118,3 +118,4 @@ Ionicons is licensed under the [MIT license](http://opensource.org/licenses/MIT)
* [Ionic Forum](https://forum.ionicframework.com/)
* [Stencil](https://stenciljs.com/)
* [Stencil Worldwide Slack](https://stencil-worldwide.slack.com)
* [Capacitor](https://capacitorjs.com/)
+1 -1
View File
@@ -1,5 +1,5 @@
import fs from 'fs-extra';
import { join, basename } from 'path';
import { join } from 'path';
import Svgo from 'svgo';
async function build(rootDir: string) {
+32 -2
View File
@@ -1,7 +1,6 @@
import fs from 'fs-extra';
import { join } from 'path';
async function collectionCopy(rootDir: string) {
// move optimized svgs to correct collection location
const optimizedSrc = join(rootDir, 'dist', 'ionicons', 'svg');
@@ -10,6 +9,37 @@ async function collectionCopy(rootDir: string) {
// we don't to copy the src svgs to collection
await fs.remove(join(rootDir, 'dist', 'collection', 'svg'));
// We don't want to copy the test svg assets to collection
await fs.remove(join(rootDir, 'dist', 'collection', 'components', 'test'));
const cePackageDir = join(rootDir, 'components');
const cePackageJsonPath = join(cePackageDir, 'package.json');
const ceCjsPath = join(cePackageDir, 'index.cjs.js');
const emptyCjs = `/*empty cjs*/`;
await fs.writeFile(ceCjsPath, emptyCjs);
const cePackageJson = {
name: 'ionicons/components',
description: 'Ionicons custom element.',
main: './index.cjs.js',
module: './index.js',
types: './index.d.ts',
private: true,
};
await fs.writeFile(cePackageJsonPath, JSON.stringify(cePackageJson, null, 2));
/**
* TODO: Remove this in Ionicons v6.0
* Stencil 2 removed the legacy loader,
* but that is what Ionicons users were using
* to load Ionicons from a CDN. The lines
* below will add in a legacy loader for users
* to use so there is no breaking change in usage.
*/
const installLoaderSrc = join(rootDir, 'scripts', 'install-loader.js');
const installLoaderDest = join(rootDir, 'dist', 'ionicons.js');
await fs.copyFile(installLoaderSrc, installLoaderDest)
// this is temporary!!!!
// removing the `type` from the d.ts export
@@ -23,4 +53,4 @@ async function collectionCopy(rootDir: string) {
await fs.writeFile(typesDist, types);
}
collectionCopy(join(__dirname, '..'));
collectionCopy(join(__dirname, '..'));
+30
View File
@@ -0,0 +1,30 @@
(function(doc){
var scriptElm = doc.scripts[doc.scripts.length - 1];
var warn = ['[ionicons] Deprecated script, please remove: ' + scriptElm.outerHTML];
warn.push('To improve performance it is recommended to set the differential scripts in the head as follows:')
var parts = scriptElm.src.split('/');
parts.pop();
parts.push('ionicons');
var url = parts.join('/');
var scriptElm = doc.createElement('script');
scriptElm.setAttribute('type', 'module');
scriptElm.src = url + '/ionicons.esm.js';
warn.push(scriptElm.outerHTML);
scriptElm.setAttribute('data-stencil-namespace', 'ionicons');
doc.head.appendChild(scriptElm);
scriptElm = doc.createElement('script');
scriptElm.setAttribute('nomodule', '');
scriptElm.src = url + '/ionicons.js';
warn.push(scriptElm.outerHTML);
scriptElm.setAttribute('data-stencil-namespace', 'ionicons');
doc.head.appendChild(scriptElm)
console.warn(warn.join('\n'));
})(document);
-16
View File
@@ -7,14 +7,6 @@
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
export namespace Components {
interface IonIcon {
/**
* Set the icon to hidden, respectively `true`, to remove it from the accessibility tree.
*/
"ariaHidden"?: string;
/**
* Specifies the label to use for accessibility. Defaults to the icon name.
*/
"ariaLabel"?: string;
/**
* The color to use for the background of the item.
*/
@@ -75,14 +67,6 @@ declare global {
}
declare namespace LocalJSX {
interface IonIcon {
/**
* Set the icon to hidden, respectively `true`, to remove it from the accessibility tree.
*/
"ariaHidden"?: string;
/**
* Specifies the label to use for accessibility. Defaults to the icon name.
*/
"ariaLabel"?: string;
/**
* The color to use for the background of the item.
*/
+55 -23
View File
@@ -1,20 +1,25 @@
import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';
import { getSvgContent, ioniconContent } from './request';
import { getName, getUrl } from './utils';
import { getName, getUrl, inheritAttributes, isRTL } from './utils';
let parser: DOMParser;
@Component({
tag: 'ion-icon',
assetsDir: 'svg',
assetsDirs: ['svg'],
styleUrl: 'icon.css',
shadow: true,
})
export class Icon {
private io?: IntersectionObserver;
private iconName: string | null = null;
private inheritedAttributes: { [k: string]: any } = {};
@Element() el!: HTMLElement;
@State() private svgContent?: string;
@State() private isVisible = false;
@State() private ariaLabel?: string;
/**
* The mode determines which platform styles to use.
@@ -26,16 +31,6 @@ export class Icon {
*/
@Prop() color?: string;
/**
* Specifies the label to use for accessibility. Defaults to the icon name.
*/
@Prop({ mutable: true, reflectToAttr: true }) ariaLabel?: string;
/**
* Set the icon to hidden, respectively `true`, to remove it from the accessibility tree.
*/
@Prop({ reflect: true }) ariaHidden?: string;
/**
* Specifies which icon to use on `ios` mode.
*/
@@ -54,7 +49,7 @@ export class Icon {
/**
* Specifies which icon to use from the built-in set of icons.
*/
@Prop() name?: string;
@Prop({ reflect: true }) name?: string;
/**
* Specifies the exact `src` of an SVG file to use.
@@ -87,6 +82,10 @@ export class Icon {
* @default true
*/
@Prop() sanitize = true;
componentWillLoad() {
this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);
}
connectedCallback() {
// purposely do not return the promise here because loading
@@ -125,17 +124,39 @@ export class Icon {
cb();
}
}
private hasAriaHidden = () => {
const { el } = this;
return el.hasAttribute('aria-hidden') && el.getAttribute('aria-hidden') === 'true';
}
@Watch('name')
@Watch('src')
@Watch('icon')
loadIcon() {
if (Build.isBrowser && this.isVisible) {
if (!parser) {
/**
* Create an instance of the DOM parser. This creates a single
* parser instance for the entire app, which is more efficient.
*/
parser = new DOMParser();
}
const url = getUrl(this);
if (url) {
if (ioniconContent.has(url)) {
// sync if it's already loaded
this.svgContent = ioniconContent.get(url);
} else if (url.startsWith('data:')) {
const doc = parser.parseFromString(url, 'text/html');
const svgEl = doc.body.querySelector('svg');
if (svgEl !== null) {
this.svgContent = svgEl.outerHTML;
} else {
this.svgContent = '';
}
} else {
// async if it hasn't been loaded
getSvgContent(url, this.sanitize).then(() => (this.svgContent = ioniconContent.get(url)));
@@ -143,33 +164,44 @@ export class Icon {
}
}
if (!this.ariaLabel && this.ariaHidden !== 'true') {
const label = getName(this.name, this.icon, this.mode, this.ios, this.md);
// user did not provide a label
// come up with the label based on the icon name
if (label) {
this.ariaLabel = label.replace(/\-/g, ' ');
}
const label = this.iconName = getName(this.name, this.icon, this.mode, this.ios, this.md);
/**
* Come up with a default label
* in case user does not provide their own.
*/
if (label) {
this.ariaLabel = label.replace(/\-/g, ' ');
}
}
render() {
const { iconName, ariaLabel, el, inheritedAttributes } = this;
const mode = this.mode || 'md';
const flipRtl =
this.flipRtl ||
(this.ariaLabel &&
(this.ariaLabel.indexOf('arrow') > -1 || this.ariaLabel.indexOf('chevron') > -1) &&
(iconName &&
(iconName.indexOf('arrow') > -1 || iconName.indexOf('chevron') > -1) &&
this.flipRtl !== false);
/**
* Only set the aria-label if a) we have generated
* one for the icon and if aria-hidden is not set to "true".
* If developer wants to set their own aria-label, then
* inheritedAttributes down below will override whatever
* default label we have set.
*/
return (
<Host
aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null}
role="img"
class={{
[mode]: true,
...createColorClasses(this.color),
[`icon-${this.size}`]: !!this.size,
'flip-rtl': !!flipRtl && (this.el.ownerDocument as Document).dir === 'rtl',
'flip-rtl': !!flipRtl && isRTL(el),
}}
{...inheritedAttributes}
>
{Build.isBrowser && this.svgContent ? (
<div class="icon-inner" innerHTML={this.svgContent}></div>
+13 -15
View File
@@ -7,21 +7,19 @@
## 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` |
| `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` |
| Property | Attribute | Description | Type | Default |
| ---------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | -------------- |
| `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` |
----------------------------------------------
+13
View File
@@ -0,0 +1,13 @@
import { expect } from '@playwright/test';
import { test } from '@utils/test/playwright';
test.describe('icon: basic', () => {
test('should not have visual regressions', async ({ page }) => {
await page.goto(`/`);
// Wait for all SVGs to be lazily loaded before taking screenshots
await page.waitForLoadState('networkidle');
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(`icon-diff.png`);
});
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

+106
View File
@@ -29,4 +29,110 @@ describe('icon', () => {
</ion-icon>
`);
});
it('renders rtl with aria-hidden', async () => {
const { root } = await newSpecPage({
components: [Icon],
direction: 'rtl',
html: `<ion-icon name="chevron-forward" aria-hidden="true"></ion-icon>`,
});
expect(root).toEqualHtml(`
<ion-icon class="md flip-rtl" name="chevron-forward" role="img" aria-hidden="true">
<mock:shadow-root>
<div class="icon-inner"></div>
</mock:shadow-root>
</ion-icon>
`);
});
it('renders default aria-label', async () => {
const { root } = await newSpecPage({
components: [Icon],
html: `<ion-icon name="chevron-forward"></ion-icon>`,
});
expect(root).toEqualHtml(`
<ion-icon class="md" name="chevron-forward" role="img" aria-label="chevron forward">
<mock:shadow-root>
<div class="icon-inner"></div>
</mock:shadow-root>
</ion-icon>
`);
});
it('renders custom aria-label', async () => {
const { root } = await newSpecPage({
components: [Icon],
html: `<ion-icon name="chevron-forward" aria-label="custom label"></ion-icon>`,
});
expect(root).toEqualHtml(`
<ion-icon class="md" name="chevron-forward" role="img" aria-label="custom label">
<mock:shadow-root>
<div class="icon-inner"></div>
</mock:shadow-root>
</ion-icon>
`);
});
it('renders custom label after changing source', async () => {
const page = await newSpecPage({
components: [Icon],
html: `<ion-icon name="chevron-forward" aria-label="custom label"></ion-icon>`,
});
const icon = page.root;
expect(icon).toEqualHtml(`
<ion-icon class="md" name="chevron-forward" role="img" aria-label="custom label">
<mock:shadow-root>
<div class="icon-inner"></div>
</mock:shadow-root>
</ion-icon>
`);
if (icon) {
icon.name = 'trash';
}
await page.waitForChanges();
expect(icon).toEqualHtml(`
<ion-icon class="md" name="trash" role="img" aria-label="custom label">
<mock:shadow-root>
<div class="icon-inner"></div>
</mock:shadow-root>
</ion-icon>
`);
});
it('renders default label after changing source', async () => {
const page = await newSpecPage({
components: [Icon],
html: `<ion-icon name="chevron-forward"></ion-icon>`,
});
const icon = page.root;
expect(icon).toEqualHtml(`
<ion-icon class="md" name="chevron-forward" role="img" aria-label="chevron forward">
<mock:shadow-root>
<div class="icon-inner"></div>
</mock:shadow-root>
</ion-icon>
`);
if (icon) {
icon.name = 'trash';
}
await page.waitForChanges();
expect(icon).toEqualHtml(`
<ion-icon class="md" name="trash" role="img" aria-label="trash">
<mock:shadow-root>
<div class="icon-inner"></div>
</mock:shadow-root>
</ion-icon>
`);
});
});
+2 -2
View File
@@ -7,7 +7,7 @@ describe('isValid', () => {
const el = {
nodeType: 1,
nodeName: 'svg',
attributes: [{ value: 'onload' }],
attributes: [{ name: 'onload' }],
childNodes: []
} as any;
expect(isValid(el)).toBe(false);
@@ -17,7 +17,7 @@ describe('isValid', () => {
const el = {
nodeType: 1,
nodeName: 'svg',
attributes: [{ value: 'OnClIcK' }],
attributes: [{ name: 'OnClIcK' }],
childNodes: []
} as any;
expect(isValid(el)).toBe(false);
+41 -1
View File
@@ -113,4 +113,44 @@ export const isSrc = (str: string) => str.length > 0 && /(\/|\.)/.test(str);
export const isStr = (val: any): val is string => typeof val === 'string';
export const toLower = (val: string) => val.toLowerCase();
export const toLower = (val: string) => val.toLowerCase();
/**
* Elements inside of web components sometimes need to inherit global attributes
* set on the host. For example, the inner input in `ion-input` should inherit
* the `title` attribute that developers set directly on `ion-input`. This
* helper function should be called in componentWillLoad and assigned to a variable
* that is later used in the render function.
*
* This does not need to be reactive as changing attributes on the host element
* does not trigger a re-render.
*/
export const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => {
const attributeObject: { [k: string]: any } = {};
attributes.forEach(attr => {
if (el.hasAttribute(attr)) {
const value = el.getAttribute(attr);
if (value !== null) {
attributeObject[attr] = el.getAttribute(attr);
}
el.removeAttribute(attr);
}
});
return attributeObject;
}
/**
* Returns `true` if the document or host element
* has a `dir` set to `rtl`. The host value will always
* take priority over the root document value.
*/
export const isRTL = (hostEl?: Pick<HTMLElement, 'dir'>) => {
if (hostEl) {
if (hostEl.dir !== '') {
return hostEl.dir.toLowerCase() === 'rtl';
}
}
return document?.dir.toLowerCase() === 'rtl';
};
+2 -2
View File
@@ -34,8 +34,8 @@ export const isValid = (elm: HTMLElement) => {
}
for (let i = 0; i < elm.attributes.length; i++) {
const val = elm.attributes[i].value;
if (isStr(val) && val.toLowerCase().indexOf('on') === 0) {
const name = elm.attributes[i].name;
if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {
return false;
}
}
+15
View File
@@ -0,0 +1,15 @@
import { expect } from '@playwright/test';
import { test } from '../../../utils/test/playwright';
test.describe('icon: csp', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/test/csp');
});
test('should load svg', async ({ page }) => {
const svg = page.locator('ion-icon#icon-usage svg');
await expect(svg).toBeVisible();
});
});
+54
View File
@@ -0,0 +1,54 @@
<!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" />
<meta http-equiv="Content-Security-Policy"
content="default-src 'none'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com/*; img-src 'self'; connect-src 'self'; font-src https://fonts.gstatic.com/*'">
<title>IonIcon - Content Security Policy</title>
<script type="module" src="../../build/ionicons.esm.js"></script>
<script nomodule src="../../build/ionicons.js"></script>
<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;
}
h2 {
margin: 15px 0 5px;
font-size: 18px;
}
.custom {
stroke: red;
fill: goldenrod;
color: black;
}
</style>
</head>
<body>
<h1>Ionicons - Test </h1>
<h2>Default</h2>
<ion-icon src="/assets/chat.svg"></ion-icon>
<ion-icon name="add"></ion-icon>
<ion-icon id="icon-usage"
icon="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Watch</title><rect x='136' y='136' width='240' height='240' rx='8' ry='8'/><path d='M384 96h-48V16H176v80h-48a32 32 0 00-32 32v256a32 32 0 0032 32h48v80h160v-80h48a32 32 0 0032-32V128a32 32 0 00-32-32zm8 272a24 24 0 01-24 24H144a24 24 0 01-24-24V144a24 24 0 0124-24h224a24 24 0 0124 24z'/></svg>">
</ion-icon>
<ion-icon class="custom"
icon="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Watch</title><rect x='136' y='136' width='240' height='240' rx='8' ry='8'/><path d='M384 96h-48V16H176v80h-48a32 32 0 00-32 32v256a32 32 0 0032 32h48v80h160v-80h48a32 32 0 0032-32V128a32 32 0 00-32-32zm8 272a24 24 0 01-24 24H144a24 24 0 01-24-24V144a24 24 0 0124-24h224a24 24 0 0124 24z'/></svg>">
</ion-icon>
</body>
</html>
+231 -1
View File
@@ -894,6 +894,26 @@
"sharp"
]
},
{
"name": "balloon",
"tags": [
"balloon"
]
},
{
"name": "balloon-outline",
"tags": [
"balloon",
"outline"
]
},
{
"name": "balloon-sharp",
"tags": [
"balloon",
"sharp"
]
},
{
"name": "ban",
"tags": [
@@ -1441,6 +1461,29 @@
"sharp"
]
},
{
"name": "bowling-ball",
"tags": [
"ball",
"bowling"
]
},
{
"name": "bowling-ball-outline",
"tags": [
"ball",
"bowling",
"outline"
]
},
{
"name": "bowling-ball-sharp",
"tags": [
"ball",
"bowling",
"sharp"
]
},
{
"name": "briefcase",
"tags": [
@@ -1706,6 +1749,29 @@
"sharp"
]
},
{
"name": "calendar-number",
"tags": [
"calendar",
"number"
]
},
{
"name": "calendar-number-outline",
"tags": [
"calendar",
"number",
"outline"
]
},
{
"name": "calendar-number-sharp",
"tags": [
"calendar",
"number",
"sharp"
]
},
{
"name": "calendar-outline",
"tags": [
@@ -3439,6 +3505,26 @@
"sharp"
]
},
{
"name": "diamond",
"tags": [
"diamond"
]
},
{
"name": "diamond-outline",
"tags": [
"diamond",
"outline"
]
},
{
"name": "diamond-sharp",
"tags": [
"diamond",
"sharp"
]
},
{
"name": "dice",
"tags": [
@@ -3666,13 +3752,15 @@
{
"name": "earth",
"tags": [
"earth"
"earth",
"globe"
]
},
{
"name": "earth-outline",
"tags": [
"earth",
"globe",
"outline"
]
},
@@ -3680,6 +3768,7 @@
"name": "earth-sharp",
"tags": [
"earth",
"globe",
"sharp"
]
},
@@ -4517,6 +4606,26 @@
"soccer"
]
},
{
"name": "footsteps",
"tags": [
"footsteps"
]
},
{
"name": "footsteps-outline",
"tags": [
"footsteps",
"outline"
]
},
{
"name": "footsteps-sharp",
"tags": [
"footsteps",
"sharp"
]
},
{
"name": "funnel",
"tags": [
@@ -5265,6 +5374,29 @@
"sharp"
]
},
{
"name": "id-card",
"tags": [
"card",
"id"
]
},
{
"name": "id-card-outline",
"tags": [
"card",
"id",
"outline"
]
},
{
"name": "id-card-sharp",
"tags": [
"card",
"id",
"sharp"
]
},
{
"name": "image",
"tags": [
@@ -5871,6 +6003,14 @@
"logo"
]
},
{
"name": "logo-apple-ar",
"tags": [
"apple",
"ar",
"logo"
]
},
{
"name": "logo-behance",
"tags": [
@@ -6146,6 +6286,13 @@
"medium"
]
},
{
"name": "logo-microsoft",
"tags": [
"logo",
"microsoft"
]
},
{
"name": "logo-no-smoking",
"tags": [
@@ -8277,6 +8424,26 @@
"sharp"
]
},
{
"name": "prism",
"tags": [
"prism"
]
},
{
"name": "prism-outline",
"tags": [
"outline",
"prism"
]
},
{
"name": "prism-sharp",
"tags": [
"prism",
"sharp"
]
},
{
"name": "pulse",
"tags": [
@@ -9043,6 +9210,26 @@
"sharp"
]
},
{
"name": "scale",
"tags": [
"scale"
]
},
{
"name": "scale-outline",
"tags": [
"outline",
"scale"
]
},
{
"name": "scale-sharp",
"tags": [
"scale",
"sharp"
]
},
{
"name": "scan",
"tags": [
@@ -9322,6 +9509,29 @@
"shield"
]
},
{
"name": "shield-half",
"tags": [
"half",
"shield"
]
},
{
"name": "shield-half-outline",
"tags": [
"half",
"outline",
"shield"
]
},
{
"name": "shield-half-sharp",
"tags": [
"half",
"sharp",
"shield"
]
},
{
"name": "shield-outline",
"tags": [
@@ -9421,6 +9631,26 @@
"snow"
]
},
{
"name": "sparkles",
"tags": [
"sparkles"
]
},
{
"name": "sparkles-outline",
"tags": [
"outline",
"sparkles"
]
},
{
"name": "sparkles-sharp",
"tags": [
"sharp",
"sparkles"
]
},
{
"name": "speedometer",
"tags": [
+6
View File
@@ -124,6 +124,12 @@
<ion-icon name="chevron-down" flip-rtl="false"></ion-icon>
<ion-icon name="chevron-back" flip-rtl="false"></ion-icon>
<h2>Auto Flip, RTL on components</h2>
<ion-icon name="arrow-up" dir="rtl" flip-rtl></ion-icon>
<ion-icon name="arrow-forward" dir="rtl" flip-rtl></ion-icon>
<ion-icon name="arrow-down" dir="rtl" flip-rtl></ion-icon>
<ion-icon name="arrow-back" dir="rtl" flip-rtl></ion-icon>
<h2>Sanitized (shouldn't show)</h2>
<ion-icon src="./assets/sanitize.svg"></ion-icon>
+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M414.11,153.82C429.66,264.4,345.85,357.09,282.54,366s-169.48-57.5-185-167.68a159.82,159.82,0,1,1,316.53-44.49Z" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="32"/><path d="M236.06,308.05c-32.83-13-67.08-43.1-82.27-85.46" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/><path d="M367.7,495.78c-32.83-13-63.31-40.06-78.5-82.41" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/><polygon points="266.71 368.21 257.54 417.82 320.85 408.92 298.36 363.76 266.71 368.21" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>

After

Width:  |  Height:  |  Size: 745 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M391,307.27c32.75-46.35,46.59-101.63,39-155.68h0C416.47,55.59,327.38-11.54,231.38,2S68.24,104.53,81.73,200.53c7.57,53.89,36.12,103.16,80.37,138.74,26.91,21.64,57.59,36.1,86.05,41.33l-8.36,45.23a8,8,0,0,0,9,9.38L279,431c15.9,35.87,41.65,60.48,78.41,75l14.88,5.88,11.77-29.75-14.88-5.89c-26.35-10.42-44.48-26.16-57-49.92l21.84-3.07a8,8,0,0,0,6.05-11.49l-20.49-41.16C345.56,357.73,371.07,335.42,391,307.27ZM230.18,322.93c-41.26-16.32-76.3-52.7-91.45-94.94l-5.4-15.06,30.12-10.8,5.4,15.06c14.5,40.44,47.27,65.77,73.1,76l14.88,5.88-11.77,29.76Z"/></svg>

After

Width:  |  Height:  |  Size: 630 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M391,307.27c32.75-46.35,46.59-101.63,39-155.68A175.82,175.82,0,0,0,231.38,2c-96,13.49-163.14,102.58-149.65,198.58,7.57,53.89,36.12,103.16,80.37,138.74C186.68,359,214.41,372.82,240.72,379a8,8,0,0,1,6,9.22l-4.87,26.38a16.29,16.29,0,0,0,1.48,10.57,16,16,0,0,0,14.2,8.61,15.21,15.21,0,0,0,2.23-.16l17.81-2.5a2,2,0,0,1,2.09,1.14c16.72,36.31,45.46,63.85,82.15,78.36a16,16,0,0,0,21-9.65c2.83-8.18-1.64-17.07-9.68-20.28a118.57,118.57,0,0,1-59.3-51.88,2,2,0,0,1,1.45-3l7.4-1a16.54,16.54,0,0,0,10.08-5.23,16,16,0,0,0,2.39-17.8l-12.06-24.23A8,8,0,0,1,326.35,367C349.94,353.83,372.8,333,391,307.27Zm-154.9,16.78a16,16,0,0,1-5.88-1.12c-41.26-16.32-76.3-52.7-91.45-94.94a16,16,0,1,1,30.12-10.8c14.5,40.44,47.27,65.77,73.1,76a16,16,0,0,1-5.89,30.88Z"/></svg>

After

Width:  |  Height:  |  Size: 825 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="208" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="32"/><circle cx="288" cy="200" r="24"/><circle cx="296" cy="128" r="24"/><circle cx="360" cy="168" r="24"/></svg>

After

Width:  |  Height:  |  Size: 283 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M414.39,97.61A224,224,0,1,0,97.61,414.39,224,224,0,1,0,414.39,97.61ZM286,230a28,28,0,1,1,28-28A28,28,0,0,1,286,230Zm8-76a28,28,0,1,1,28-28A28,28,0,0,1,294,154Zm68,44a28,28,0,1,1,28-28A28,28,0,0,1,362,198Z"/></svg>

After

Width:  |  Height:  |  Size: 295 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M414.39,97.61A224,224,0,1,0,97.61,414.39,224,224,0,1,0,414.39,97.61ZM288,224a24,24,0,1,1,24-24A24,24,0,0,1,288,224Zm8-72a24,24,0,1,1,24-24A24,24,0,0,1,296,152Zm64,40a24,24,0,1,1,24-24A24,24,0,0,1,360,192Z"/></svg>

After

Width:  |  Height:  |  Size: 295 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><rect x="48" y="80" width="416" height="384" rx="48" fill="none" stroke="#000" stroke-linejoin="round" stroke-width="32"/><line x1="128" y1="48" x2="128" y2="80" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="384" y1="48" x2="384" y2="80" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="464" y1="160" x2="48" y2="160" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><polyline points="304 260 347.42 228 352 228 352 396" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M191.87,306.63c9.11,0,25.79-4.28,36.72-15.47a37.9,37.9,0,0,0,11.13-27.26c0-26.12-22.59-39.9-47.89-39.9-21.4,0-33.52,11.61-37.85,18.93" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M149,374.16c4.88,8.27,19.71,25.84,43.88,25.84,28.59,0,52.12-15.94,52.12-43.82,0-12.62-3.66-24-11.58-32.07-12.36-12.64-31.25-17.48-41.55-17.48" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M32,456a24,24,0,0,0,24,24H456a24,24,0,0,0,24-24V176H32ZM342.17,212H368V412H336V256.29l-35.39,26.08-19-25.76ZM222,335.3c-8.54-8.74-22.75-12.67-30.11-12.67h-16v-32h16c4.85,0,17.41-2.6,25.28-10.65a22,22,0,0,0,6.57-16.08c0-23.23-28.63-23.9-31.89-23.9-17.34,0-23.8,10.61-24.07,11.06l-8.13,13.78-27.56-16.27,8.14-13.77c7.64-13,25.22-26.8,51.62-26.8,16.44,0,31.76,4.77,43.13,13.42,13.39,10.2,20.76,25.28,20.76,42.48A54,54,0,0,1,240,302.35c-1.15,1.18-2.36,2.28-3.59,3.35a66.18,66.18,0,0,1,8.42,7.23c10.56,10.8,16.14,25.75,16.14,43.25,0,18.06-7.61,34-21.42,44.92-12.17,9.61-28.75,14.9-46.7,14.9-27.87,0-48.48-18.16-57.66-33.7l-8.13-13.78,27.56-16.27L162.78,366c1.08,1.84,11.15,18,30.1,18,16.66,0,36.12-7.29,36.12-27.82C229,349.93,227.78,341.23,222,335.3Z"/><path d="M456,64H400.08V32h-48V64H159.92V32h-48V64H56A23.8,23.8,0,0,0,32,87.77V144H480V87.77A23.8,23.8,0,0,0,456,64Z"/></svg>

After

Width:  |  Height:  |  Size: 955 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M416,64H400V48.45c0-8.61-6.62-16-15.23-16.43A16,16,0,0,0,368,48V64H144V48.45c0-8.61-6.62-16-15.23-16.43A16,16,0,0,0,112,48V64H96a64,64,0,0,0-64,64v12a4,4,0,0,0,4,4H476a4,4,0,0,0,4-4V128A64,64,0,0,0,416,64Z"/><path d="M476,176H36a4,4,0,0,0-4,4V416a64,64,0,0,0,64,64H416a64,64,0,0,0,64-64V180A4,4,0,0,0,476,176ZM239.58,401.1c-12.17,9.61-28.75,14.9-46.7,14.9-27.87,0-48.48-18.16-57.66-33.7A16,16,0,0,1,162.78,366c1.08,1.84,11.15,18,30.1,18,16.66,0,36.12-7.29,36.12-27.82,0-6.25-1.22-14.95-7-20.88-8.54-8.74-22.75-12.67-30.11-12.67a16,16,0,0,1,0-32c4.85,0,17.41-2.6,25.28-10.65a22,22,0,0,0,6.57-16.08c0-23.23-28.63-23.9-31.89-23.9-17.34,0-23.8,10.61-24.07,11.06a16,16,0,1,1-27.55-16.26c7.64-13,25.22-26.8,51.62-26.8,16.44,0,31.76,4.77,43.13,13.42,13.39,10.2,20.76,25.28,20.76,42.48A54,54,0,0,1,240,302.35c-1.15,1.18-2.36,2.28-3.59,3.35a66.18,66.18,0,0,1,8.42,7.23c10.56,10.8,16.14,25.75,16.14,43.25C261,374.24,253.39,390.19,239.58,401.1ZM368,396a16,16,0,0,1-32,0V256.29l-22.51,16.59a16,16,0,1,1-19-25.76l43.42-32a16,16,0,0,1,9.49-3.12H352a16,16,0,0,1,16,16Z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M35.42,188.21,243.17,457.67a16.17,16.17,0,0,0,25.66,0L476.58,188.21a16.52,16.52,0,0,0,.95-18.75L407.06,55.71A16.22,16.22,0,0,0,393.27,48H118.73a16.22,16.22,0,0,0-13.79,7.71L34.47,169.46A16.52,16.52,0,0,0,35.42,188.21Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="48" y1="176" x2="464" y2="176" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><polyline points="400 64 352 176 256 48" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><polyline points="112 64 160 176 256 48" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="256" y1="448" x2="160" y2="176" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="256" y1="448" x2="352" y2="176" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><polygon points="396.31 32 264 32 348.19 144.26 396.31 32"/><polygon points="115.69 32 163.81 144.26 248 32 115.69 32"/><polygon points="256 74.67 192 160 320 160 256 74.67"/><polygon points="422.95 51.06 376.26 160 488 160 422.95 51.06"/><polygon points="89.05 51.06 23 160 135.74 160 89.05 51.06"/><polygon points="146.68 192 24 192 246.8 480 247.33 480 146.68 192"/><polygon points="365.32 192 264.67 480 265.2 480 488 192 365.32 192"/><polygon points="329.39 192 182.61 192 256 400 329.39 192"/></svg>

After

Width:  |  Height:  |  Size: 578 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M121.72,32A4,4,0,0,0,118,37.56l2.3,5.43L161,137.89a4,4,0,0,0,6.88.82L243,38.4a4,4,0,0,0-3.2-6.4Z"/><path d="M419.93,58.06l-41.28,96.37a4,4,0,0,0,3.68,5.57h101a4,4,0,0,0,3.4-6.11L427,57.53A4,4,0,0,0,419.93,58.06Z"/><path d="M85,57.57,25.29,153.89a4,4,0,0,0,3.4,6.11h101a4,4,0,0,0,3.67-5.58L92,58.1A4,4,0,0,0,85,57.57Z"/><path d="M393.27,32H267.82a1.94,1.94,0,0,0-1.56,3.11l79.92,106.46a1.94,1.94,0,0,0,3.34-.4L391.6,43,395,34.66A1.92,1.92,0,0,0,393.3,32Z"/><path d="M239,448,149.57,194.51A3.78,3.78,0,0,0,146,192H25.7a3.72,3.72,0,0,0-2.95,6l216,279.81a5.06,5.06,0,0,0,6.39,1.37h0a5,5,0,0,0,2.39-6.08Z"/><path d="M486.3,192H366a3.75,3.75,0,0,0-3.54,2.51L264.26,472.67a5.21,5.21,0,0,0,2.42,6.31h0a5.22,5.22,0,0,0,6.61-1.39L489.25,198h0A3.72,3.72,0,0,0,486.3,192Z"/><path d="M259.2,78.93l56,74.67A4,4,0,0,1,312,160H200a4,4,0,0,1-3.2-6.4l56-74.67A4,4,0,0,1,259.2,78.93Zm-7,310.31L184.5,197.33a4,4,0,0,1,3.77-5.33H323.73a4,4,0,0,1,3.77,5.33L259.77,389.24A4,4,0,0,1,252.23,389.24Z"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M200,246.84c8.81,58.62-7.33,90.67-52.91,97.41-50.65,7.49-71.52-26.44-80.33-85.06-11.85-78.88,16-127.94,55.71-131.1C158.61,125.22,191.18,188.23,200,246.84Z" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="32"/><path d="M223.65,409.53c3.13,33.28-14.86,64.34-42,69.66-27.4,5.36-58.71-16.37-65.09-49.19s17.75-34.56,47.32-40.21S219.87,369.39,223.65,409.53Z" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="32"/><path d="M312,150.83c-8.81,58.62,7.33,90.67,52.9,97.41,50.66,7.49,71.52-26.44,80.33-85.06,11.86-78.89-16-128.22-55.7-131.1C353.13,29.44,320.82,92.21,312,150.83Z" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="32"/><path d="M288.35,313.53c-3.13,33.27,14.86,64.34,42,69.66,27.4,5.36,58.71-16.37,65.09-49.19s-17.75-34.56-47.32-40.22S292.13,273.38,288.35,313.53Z" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="32"/></svg>

After

Width:  |  Height:  |  Size: 968 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M130.54,358.31c-12.83,1.88-33.95,5.38-48-10.56S56.34,293.32,51,258.92c-7.88-50.7-.06-93.43,22-120.31,13-15.83,30.06-25,49.34-26.46,16.51-1.27,41.18,5.19,65,43.19,14.92,23.81,26.27,55.44,31.14,86.77h0c5.88,37.82,11.61,78.18-8.44,92.65-11.31,8.17-19.43,11-38.62,15.57C155.64,354.08,143.38,356.42,130.54,358.31Z"/><path d="M107.72,390.84l108.89-22.46c9.2-1.9,16.58,3.16,20,18.32,11.22,49.76-4.86,109.3-55.22,109.3-47.69,0-79.47-54.36-84.66-83.58C94.36,399.17,97.74,392.89,107.72,390.84Z"/><path d="M340.59,254.34c-19.19-4.55-27.31-7.4-38.62-15.57-20.05-14.47-14.32-54.83-8.44-92.65h0c4.87-31.33,16.22-63,31.14-86.77,23.8-38,48.47-44.46,65-43.19C408.93,17.63,426,26.78,439,42.61c22.08,26.88,29.9,69.61,22,120.31-5.35,34.4-17.46,72.76-31.59,88.83s-35.13,12.44-48,10.56S356.36,258.08,340.59,254.34Z"/><path d="M404.28,294.84,295.39,272.38c-9.2-1.9-16.58,3.16-20,18.32C264.18,340.46,280.26,400,330.62,400c47.69,0,79.47-54.36,84.66-83.58C417.64,303.17,414.26,296.89,404.28,294.84Z"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M133.83,361.27c-22.61,0-41-8.17-54.79-24.39S56.2,296.59,50.93,261.57c-7.76-51.61-.06-95.11,21.68-122.48,12.8-16.12,29.6-25.44,48.58-26.94,16.25-1.3,40.54,5.29,64,44,14.69,24.24,25.86,56.44,30.65,88.34h0c5.79,38.51,1.48,66.86-13.18,86.65-11.64,15.72-29.54,25.46-53.21,29A106.46,106.46,0,0,1,133.83,361.27Z"/><path d="M173,496c-13.21,0-26.6-4.23-38.66-12.36a79.79,79.79,0,0,1-33.52-50.6c-2.85-14.66-1.14-26.31,5.22-35.64,10.33-15.15,28.87-18.56,48.49-22.18,2.07-.38,4.17-.76,6.3-1.17,4.52-.86,9.14-2,13.62-3.11,16.78-4.14,34.14-8.43,48.47,1.75,9.59,6.8,15,18.36,16.62,35.32h0c1.84,19.57-2.36,39.1-11.83,55-10.19,17.11-25.47,28.42-43,31.86A61,61,0,0,1,173,496Z"/><path d="M378.17,265.27a106.69,106.69,0,0,1-15.6-1.2c-23.66-3.5-41.56-13.25-53.2-29-14.66-19.79-19-48.13-13.18-86.65,4.79-31.93,15.93-64.1,30.55-88.25,23.34-38.57,47.66-45.26,64-44.08,18.92,1.38,35.69,10.57,48.51,26.6,21.89,27.37,29.65,71,21.86,122.84-5.27,35-14.2,58.95-28.11,75.31S400.78,265.27,378.17,265.27Z"/><path d="M339,400a61,61,0,0,1-11.68-1.13c-17.56-3.44-32.84-14.75-43-31.86-9.47-15.9-13.67-35.43-11.83-55h0c1.6-17,7-28.52,16.62-35.33,14.33-10.17,31.69-5.89,48.47-1.74,4.48,1.1,9.1,2.24,13.62,3.11l6.29,1.17c19.63,3.61,38.17,7,48.5,22.17,6.36,9.33,8.07,21,5.22,35.64a79.78,79.78,0,0,1-33.52,50.61C365.56,395.78,352.17,400,339,400Z"/></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><rect x="96" y="32" width="320" height="448" rx="48" fill="none" stroke="#000" stroke-linejoin="round" stroke-width="32"/><line x1="208" y1="80" x2="304" y2="80" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M333.48,284.51A39.65,39.65,0,0,0,304,272c-11.6,0-22.09,4.41-29.54,12.43s-11.2,19.12-10.34,31C265.83,338.91,283.72,358,304,358s38.14-19.09,39.87-42.55C344.75,303.67,341.05,292.68,333.48,284.51Z"/><path d="M371.69,448H236.31a12.05,12.05,0,0,1-9.31-4.17,13,13,0,0,1-2.76-10.92c3.25-17.56,13.38-32.31,29.3-42.66C267.68,381.06,285.6,376,304,376s36.32,5.06,50.46,14.25c15.92,10.35,26.05,25.1,29.3,42.66A13,13,0,0,1,381,443.83,12.05,12.05,0,0,1,371.69,448Z"/></svg>

After

Width:  |  Height:  |  Size: 794 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M408,16H104A24,24,0,0,0,80,40V472a24,24,0,0,0,24,24H408a24,24,0,0,0,24-24V40A24,24,0,0,0,408,16ZM346.9,312.77a43,43,0,1,1-40.71-40.71A43,43,0,0,1,346.9,312.77ZM192,64H320V96H192ZM384,448H224V423.4c0-32.72,53.27-49.21,80-49.21s80,16.49,80,49.21Z"/></svg>

After

Width:  |  Height:  |  Size: 335 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M368,16H144A64.07,64.07,0,0,0,80,80V432a64.07,64.07,0,0,0,64,64H368a64.07,64.07,0,0,0,64-64V80A64.07,64.07,0,0,0,368,16ZM333.48,284.51c7.57,8.17,11.27,19.16,10.39,30.94C342.14,338.91,324.25,358,304,358s-38.17-19.09-39.88-42.55c-.86-11.9,2.81-22.91,10.34-31S292.4,272,304,272A39.65,39.65,0,0,1,333.48,284.51ZM192,80a16,16,0,0,1,16-16h96a16,16,0,0,1,0,32H208A16,16,0,0,1,192,80ZM381,443.83a12.05,12.05,0,0,1-9.31,4.17H236.31a12.05,12.05,0,0,1-9.31-4.17,13,13,0,0,1-2.76-10.92c3.25-17.56,13.38-32.31,29.3-42.66C267.68,381.06,285.6,376,304,376s36.32,5.06,50.46,14.25c15.92,10.35,26.05,25.1,29.3,42.66A13,13,0,0,1,381,443.83Z"/></svg>

After

Width:  |  Height:  |  Size: 711 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><polyline points="201.14 64 256 32 310.86 64" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="256" y1="32" x2="256" y2="112" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/><polyline points="310.86 448 256 480 201.14 448" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="256" y1="480" x2="256" y2="400" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/><polyline points="64 207.51 64 144 117.15 112.49" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="64" y1="144" x2="131.29" y2="184" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/><polyline points="448 304.49 448 368 394.85 399.51" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="448" y1="368" x2="380.71" y2="328" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/><polyline points="117.15 400 64 368 64 304.49" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="64" y1="368" x2="130.64" y2="328" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/><polyline points="394.85 112.49 448 144 448 207.51" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="448" y1="144" x2="380.71" y2="184" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/><polyline points="256 320 256 256 310.86 224" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/><line x1="256" y1="256" x2="201.14" y2="224" fill="none" stroke="#000" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M31.87,30.58H244.7V243.39H31.87Z"/><path d="M266.89,30.58H479.7V243.39H266.89Z"/><path d="M31.87,265.61H244.7v212.8H31.87Z"/><path d="M266.89,265.61H479.7v212.8H266.89Z"/></svg>

After

Width:  |  Height:  |  Size: 259 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M229.73,45.88,37.53,327.79a31.79,31.79,0,0,0,11.31,46L241,476.26a31.77,31.77,0,0,0,29.92,0l192.2-102.51a31.79,31.79,0,0,0,11.31-46L282.27,45.88A31.8,31.8,0,0,0,229.73,45.88Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><line x1="256" y1="32" x2="256" y2="480" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>

After

Width:  |  Height:  |  Size: 488 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256,16,16,352,256,496,496,352Zm-20,96.82V437.35L73.73,340Z"/></svg>

After

Width:  |  Height:  |  Size: 150 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M487.83,319.44,295.63,36.88a48,48,0,0,0-79.26,0L24.17,319.44A47.1,47.1,0,0,0,41.1,387.57L233.3,490.32a48.05,48.05,0,0,0,45.4,0L470.9,387.57a47.1,47.1,0,0,0,16.93-68.13Zm-431.26,41a16.12,16.12,0,0,1-8-10.38,16.8,16.8,0,0,1,2.37-13.62L232.66,69.26c2.18-3.21,7.34-1.72,7.34,2.13v374c0,5.9-6.54,9.63-11.87,6.78Z"/></svg>

After

Width:  |  Height:  |  Size: 398 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><rect x="48" y="48" width="416" height="416" rx="96" fill="none" stroke="#000" stroke-linejoin="round" stroke-width="32"/><path d="M388.94,151.56c-24.46-22.28-68.72-51.4-132.94-51.4s-108.48,29.12-132.94,51.4A34.66,34.66,0,0,0,120,199.64l33.32,39.21a26.07,26.07,0,0,0,33.6,5.21c15.92-9.83,40.91-21.64,69.1-21.64s53.18,11.81,69.1,21.64a26.07,26.07,0,0,0,33.6-5.21L392,199.64A34.66,34.66,0,0,0,388.94,151.56Z" fill="none" stroke="#000" stroke-linejoin="round" stroke-width="32"/></svg>

After

Width:  |  Height:  |  Size: 555 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M432,32H80A48.05,48.05,0,0,0,32,80V432a48.05,48.05,0,0,0,48,48H432a48.05,48.05,0,0,0,48-48V80A48.05,48.05,0,0,0,432,32ZM415.29,197l-52.46,61.73a27.83,27.83,0,0,1-37.65,4.62c-13-9.29-39.27-24.89-69.18-24.89s-56.18,15.6-69.18,24.89a27.84,27.84,0,0,1-37.65-4.62L96.71,197A32.12,32.12,0,0,1,97.13,155c18.93-21.31,72.3-70.87,158.87-70.87S395.94,133.72,414.87,155h0A32.12,32.12,0,0,1,415.29,197Z"/></svg>

After

Width:  |  Height:  |  Size: 480 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M368,32H144A112.12,112.12,0,0,0,32,144V368A112.12,112.12,0,0,0,144,480H368A112.12,112.12,0,0,0,480,368V144A112.12,112.12,0,0,0,368,32Zm36.21,178-33.32,39.21A41.76,41.76,0,0,1,339,264.05a42.32,42.32,0,0,1-22.29-6.38c-14.22-8.78-36.3-19.25-60.69-19.25s-46.47,10.47-60.69,19.25a41.86,41.86,0,0,1-54.2-8.46L107.79,210a50.48,50.48,0,0,1,4.49-70.27C140.12,114.38,187.65,84.16,256,84.16s115.88,30.22,143.72,55.57A50.48,50.48,0,0,1,404.21,210Z"/></svg>

After

Width:  |  Height:  |  Size: 526 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M463.1,112.37C373.68,96.33,336.71,84.45,256,48,175.29,84.45,138.32,96.33,48.9,112.37,32.7,369.13,240.58,457.79,256,464,271.42,457.79,479.3,369.13,463.1,112.37Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M256,48C175.29,84.45,138.32,96.33,48.9,112.37,32.7,369.13,240.58,457.79,256,464Z"/></svg>

After

Width:  |  Height:  |  Size: 433 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256,32C174,69.06,121.38,86.46,32,96c0,77.59,5.27,133.36,25.29,184.51a348.86,348.86,0,0,0,71.43,112.41C178.32,445.58,232.89,473.32,256,480c23.11-6.68,77.68-34.42,127.28-87.08a348.86,348.86,0,0,0,71.43-112.41C474.73,229.36,480,173.59,480,96,390.62,86.46,338,69.06,256,32ZM417.47,265.93a309.18,309.18,0,0,1-63.31,99.56C316,406,276.65,428.31,256,437.36V75.8c38.75,17,68.73,28.3,97.93,36.89a613.12,613.12,0,0,0,85.6,18.52C437.81,191.43,431.17,230.9,417.47,265.93Z"/></svg>

After

Width:  |  Height:  |  Size: 550 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M48.9,112.37C138.32,96.33,175.29,84.45,256,48c80.71,36.45,117.68,48.33,207.1,64.37C479.3,369.13,271.42,457.79,256,464,240.58,457.79,32.7,369.13,48.9,112.37Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M256,48c80.71,36.45,117.68,48.33,207.1,64.37C479.3,369.13,271.42,457.79,256,464Z"/></svg>

After

Width:  |  Height:  |  Size: 430 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M259.92,262.91,216.4,149.77a9,9,0,0,0-16.8,0L156.08,262.91a9,9,0,0,1-5.17,5.17L37.77,311.6a9,9,0,0,0,0,16.8l113.14,43.52a9,9,0,0,1,5.17,5.17L199.6,490.23a9,9,0,0,0,16.8,0l43.52-113.14a9,9,0,0,1,5.17-5.17L378.23,328.4a9,9,0,0,0,0-16.8L265.09,268.08A9,9,0,0,1,259.92,262.91Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><polygon points="108 68 88 16 68 68 16 88 68 108 88 160 108 108 160 88 108 68" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><polygon points="426.67 117.33 400 48 373.33 117.33 304 144 373.33 170.67 400 240 426.67 170.67 496 144 426.67 117.33" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>

After

Width:  |  Height:  |  Size: 836 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M208,512,155.62,372.38,16,320l139.62-52.38L208,128l52.38,139.62L400,320,260.38,372.38Z"/><path d="M88,176,64.43,111.57,0,88,64.43,64.43,88,0l23.57,64.43L176,88l-64.43,23.57Z"/><path d="M400,256l-31.11-80.89L288,144l80.89-31.11L400,32l31.11,80.89L512,144l-80.89,31.11Z"/></svg>

After

Width:  |  Height:  |  Size: 358 B

+1
View File
@@ -0,0 +1 @@
<svg id="icons" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M208,512a24.84,24.84,0,0,1-23.34-16l-39.84-103.6a16.06,16.06,0,0,0-9.19-9.19L32,343.34a25,25,0,0,1,0-46.68l103.6-39.84a16.06,16.06,0,0,0,9.19-9.19L184.66,144a25,25,0,0,1,46.68,0l39.84,103.6a16.06,16.06,0,0,0,9.19,9.19l103,39.63A25.49,25.49,0,0,1,400,320.52a24.82,24.82,0,0,1-16,22.82l-103.6,39.84a16.06,16.06,0,0,0-9.19,9.19L231.34,496A24.84,24.84,0,0,1,208,512Zm66.85-254.84h0Z"/><path d="M88,176a14.67,14.67,0,0,1-13.69-9.4L57.45,122.76a7.28,7.28,0,0,0-4.21-4.21L9.4,101.69a14.67,14.67,0,0,1,0-27.38L53.24,57.45a7.31,7.31,0,0,0,4.21-4.21L74.16,9.79A15,15,0,0,1,86.23.11,14.67,14.67,0,0,1,101.69,9.4l16.86,43.84a7.31,7.31,0,0,0,4.21,4.21L166.6,74.31a14.67,14.67,0,0,1,0,27.38l-43.84,16.86a7.28,7.28,0,0,0-4.21,4.21L101.69,166.6A14.67,14.67,0,0,1,88,176Z"/><path d="M400,256a16,16,0,0,1-14.93-10.26l-22.84-59.37a8,8,0,0,0-4.6-4.6l-59.37-22.84a16,16,0,0,1,0-29.86l59.37-22.84a8,8,0,0,0,4.6-4.6L384.9,42.68a16.45,16.45,0,0,1,13.17-10.57,16,16,0,0,1,16.86,10.15l22.84,59.37a8,8,0,0,0,4.6,4.6l59.37,22.84a16,16,0,0,1,0,29.86l-59.37,22.84a8,8,0,0,0-4.6,4.6l-22.84,59.37A16,16,0,0,1,400,256Z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+2
View File
@@ -0,0 +1,2 @@
export * from './playwright-page';
export * from './playwright-declarations';
@@ -0,0 +1,18 @@
import type { Page, TestInfo } from '@playwright/test';
/**
* This is an extended version of Playwright's
* page.goto method. In addition to performing
* the normal page.goto work, this code also
* automatically waits for the Stencil components
* to be hydrated before proceeding with the test.
*/
export const goto = async (page: Page, url: string, options: any, _: TestInfo, originalFn: typeof page.goto) => {
const result = await Promise.all([
page.waitForFunction(() => (window as any).testAppLoaded === true, { timeout: 4750 }),
originalFn(url, options),
]);
return result[1];
};
@@ -0,0 +1 @@
export * from './goto';
@@ -0,0 +1,57 @@
import type { Page, Response } from '@playwright/test';
export interface E2EPage extends Page {
/**
* Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
* last redirect.
*
* The method will throw an error if:
* - there's an SSL error (e.g. in case of self-signed certificates).
* - target URL is invalid.
* - the `timeout` is exceeded during navigation.
* - the remote server does not respond or is unreachable.
* - the main resource failed to load.
*
* The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not
* Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling
* [response.status()](https://playwright.dev/docs/api/class-response#response-status).
*
* > NOTE: The method either throws an error or returns a main resource response. The only exceptions are navigation to
* `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.
* > NOTE: Headless mode doesn't support navigation to a PDF document. See the
* [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).
*
* Shortcut for main frame's [frame.goto(url[, options])](https://playwright.dev/docs/api/class-frame#frame-goto)
* @param url URL to navigate page to. The url should include scheme, e.g. `https://`. When a `baseURL` via the context options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
*/
goto: (
url: string,
options?: {
/**
* Referer header value. If provided it will take preference over the referer header value set by
* [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers).
*/
referer?: string;
/**
* Maximum operation time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be
* changed by using the
* [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
* [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
* [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
* or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
*/
timeout?: number;
/**
* When to consider operation succeeded, defaults to `load`. Events can be either:
* - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
* - `'load'` - consider operation to be finished when the `load` event is fired.
* - `'networkidle'` - consider operation to be finished when there are no network connections for at least `500` ms.
* - `'commit'` - consider operation to be finished when network response is received and the document started loading.
*/
waitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
}
) => Promise<null | Response>;
}
@@ -0,0 +1,57 @@
import type {
PlaywrightTestArgs,
PlaywrightTestOptions,
PlaywrightWorkerArgs,
PlaywrightWorkerOptions,
TestInfo,
} from '@playwright/test';
import { test as base } from '@playwright/test';
import {
goto as goToPage,
} from './page/utils';
import type { E2EPage } from './playwright-declarations';
type CustomTestArgs = PlaywrightTestArgs &
PlaywrightTestOptions &
PlaywrightWorkerArgs &
PlaywrightWorkerOptions & {
page: E2EPage;
};
type CustomFixtures = {
page: E2EPage;
};
/**
* Extends the base `page` test figure within Playwright.
* @param page The page to extend.
* @param testInfo The test info.
* @returns The modified playwright page with extended functionality.
*/
export async function extendPageFixture(page: E2EPage, testInfo: TestInfo) {
const originalGoto = page.goto.bind(page);
/**
* Adds a global flag on the window that the test suite
* can use to determine when it is safe to execute tests
* on hydrated Stencil components.
*/
await page.addInitScript(`
(function() {
window.addEventListener('appload', () => {
window.testAppLoaded = true;
});
})();`);
// Overridden Playwright methods
page.goto = (url: string, options) => goToPage(page, url, options, testInfo, originalGoto);
return page;
}
export const test = base.extend<CustomFixtures>({
page: async ({ page }: CustomTestArgs, use: (r: E2EPage) => Promise<void>, testInfo: TestInfo) => {
page = await extendPageFixture(page, testInfo);
await use(page);
},
});
+13
View File
@@ -2,11 +2,16 @@ import { Config } from '@stencil/core';
export const config: Config = {
namespace: 'ionicons',
buildEs5: 'prod',
outputTargets: [
{
type: 'dist',
empty: false,
},
{
type: 'dist-custom-elements',
dir: './components',
},
{
type: 'docs-readme',
},
@@ -17,6 +22,14 @@ export const config: Config = {
src: './components/test/*.svg',
dest: './assets/',
},
{
src: './svg/*.svg',
dest: './build/svg/',
},
{
src: './components/test/',
dest: './test/',
}
],
empty: false,
serviceWorker: false,
+8 -11
View File
@@ -1,26 +1,23 @@
{
"compilerOptions": {
"baseUrl": ".",
"strict": true,
"allowSyntheticDefaultImports": true,
"allowUnreachableCode": false,
"declaration": false,
"experimentalDecorators": true,
"lib": [
"dom",
"es2017"
],
"lib": ["dom", "es2017"],
"moduleResolution": "node",
"module": "esnext",
"target": "es2017",
"noUnusedLocals": true,
"noUnusedParameters": true,
"jsx": "react",
"jsxFactory": "h"
"jsxFactory": "h",
"paths": {
"@utils/*": ["src/utils/*"]
}
},
"include": [
"src"
],
"exclude": [
"node_modules"
]
"include": ["src"],
"exclude": ["node_modules", "src/utils/test"]
}
+4
View File
@@ -0,0 +1,4 @@
{
"extends": "tsconfig.json",
"exclude": ["node_modules"]
}