Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cafe8e6541 | ||
|
|
66858926cc | ||
|
|
c37b691dd5 | ||
|
|
0e3ba9922c | ||
|
|
36992fc01b | ||
|
|
5f2aab6cbe | ||
|
|
fd90487afc | ||
|
|
06b9b1fc59 | ||
|
|
0dfccdf016 | ||
|
|
69e0817503 | ||
|
|
19629000ca | ||
|
|
d13cd3333c | ||
|
|
20c396d8d7 | ||
|
|
b6903a0ad8 | ||
|
|
8d898d7170 | ||
|
|
7dd69094d1 | ||
|
|
e79e5cd235 | ||
|
|
86a051ca63 | ||
|
|
28d0338ee0 | ||
|
|
3ec9271e83 | ||
|
|
19dd66469c | ||
|
|
43d61fe909 | ||
|
|
1038a7f682 | ||
|
|
947091adf7 | ||
|
|
728aa746a0 | ||
|
|
32da247bc1 | ||
|
|
f21bb0f097 | ||
|
|
e6a5af1a96 | ||
|
|
36a0c6b103 | ||
|
|
e63653cbe1 | ||
|
|
4ca8139f77 | ||
|
|
24caaad7d9 | ||
|
|
8c2a507fcf | ||
|
|
c76f2a2556 | ||
|
|
0d7f507677 | ||
|
|
b3155d9603 | ||
|
|
9139a01e18 | ||
|
|
0541db0f28 | ||
|
|
200678a619 | ||
|
|
66556ea45c | ||
|
|
b1c23f8dee | ||
|
|
81f2fc1a84 | ||
|
|
1543daa010 | ||
|
|
500d15fec0 | ||
|
|
a30dfb2886 | ||
|
|
f16c5fb13d | ||
|
|
a134c76d50 | ||
|
|
6753d715e2 | ||
|
|
c3722987c5 | ||
|
|
7f96d8c725 | ||
|
|
7666f2d97a | ||
|
|
b73bb075fd | ||
|
|
486ae96765 | ||
|
|
eca4c14f05 | ||
|
|
3dbc0c8263 | ||
|
|
81edbf2387 | ||
|
|
cb0b2124ec | ||
|
|
eef739789f | ||
|
|
98fa89ea57 | ||
|
|
107c075d88 | ||
|
|
2f3effb33f | ||
|
|
c580023063 | ||
|
|
0f77aaf2db | ||
|
|
cc7291248f | ||
|
|
81d9ff1995 | ||
|
|
71c7d80e54 | ||
|
|
95cd90d790 | ||
|
|
c0fb92b87f | ||
|
|
9de2a0760e | ||
|
|
38efaa1e8f | ||
|
|
502d1f7077 | ||
|
|
01b0de6e80 | ||
|
|
7d8e33e12c | ||
|
|
1069d8b4ab | ||
|
|
9992cc07a3 | ||
|
|
3aed6eee31 | ||
|
|
c470b85c34 | ||
|
|
3a2ab6ec27 | ||
|
|
63eee58f89 | ||
|
|
0642e2112b | ||
|
|
e6973d0c55 | ||
|
|
7668a3cf62 | ||
|
|
cfddc2e642 | ||
|
|
1cef0acb10 | ||
|
|
c5e4047206 | ||
|
|
63c9ee02a5 | ||
|
|
2e7fe14315 | ||
|
|
f61e47c698 | ||
|
|
922f43387b | ||
|
|
73526e40b8 | ||
|
|
7ce073d3fe | ||
|
|
1b07d10212 | ||
|
|
8983749600 | ||
|
|
fa8d76e20c | ||
|
|
91fa34ebc7 | ||
|
|
14fd26b38f | ||
|
|
2301be8f6c | ||
|
|
94cf9b52b6 | ||
|
|
00e7012192 | ||
|
|
2204753a37 | ||
|
|
cd791f735c | ||
|
|
b9c65a794d | ||
|
|
b16eed45a3 | ||
|
|
ed44918e29 | ||
|
|
51a431e6ad | ||
|
|
dab04ff606 | ||
|
|
1c6540e770 | ||
|
|
02eabdf6c5 | ||
|
|
5a2e8e9bf4 | ||
|
|
5c8f2468be | ||
|
|
0d757ad96a | ||
|
|
e80b5acb0c | ||
|
|
41bf08cee2 | ||
|
|
3c3ce88192 | ||
|
|
8c0f457f23 | ||
|
|
bc14bfea99 | ||
|
|
8af821f5b8 | ||
|
|
32cb024b42 | ||
|
|
c386872443 | ||
|
|
4c95d03958 | ||
|
|
8a54bf0a71 | ||
|
|
159ceef81e | ||
|
|
c9068ed4c0 | ||
|
|
acab74d2b9 | ||
|
|
3d7ed854c7 | ||
|
|
46afd68218 | ||
|
|
6342807b26 | ||
|
|
03f5914ecf | ||
|
|
f97439c703 | ||
|
|
352c80b8b6 | ||
|
|
cecdb9c0cd | ||
|
|
052f07b103 | ||
|
|
5f31f277db | ||
|
|
793288593c | ||
|
|
bc637cc951 | ||
|
|
993a314eb6 | ||
|
|
5b7fc526bc | ||
|
|
dfb62b67e0 | ||
|
|
b85a855b7e | ||
|
|
57abf83ec5 | ||
|
|
a9eba9ddb4 | ||
|
|
1286103494 | ||
|
|
b9cd35bf20 | ||
|
|
cc15712e03 | ||
|
|
8afeb4c6c9 | ||
|
|
ccb3e41441 | ||
|
|
b74a92328c | ||
|
|
b01be99602 | ||
|
|
279de8512c | ||
|
|
6f1b29a40a | ||
|
|
a76a78c568 | ||
|
|
2207229f25 | ||
|
|
eaee160c88 | ||
|
|
b4c51b089a | ||
|
|
db473aeb45 | ||
|
|
ce43527435 | ||
|
|
174d2ec88d | ||
|
|
7152cfd6c2 | ||
|
|
9e254846f5 | ||
|
|
a1142adfe5 | ||
|
|
2d0f3aa119 | ||
|
|
587e450cdf | ||
|
|
e48b0305d5 | ||
|
|
ecd4406c42 | ||
|
|
fa1c145f94 | ||
|
|
062ca67692 | ||
|
|
0615f89ef8 | ||
|
|
67c8bf0565 | ||
|
|
f0d22ccc26 | ||
|
|
65e1cfabfe | ||
|
|
ac4fbbf247 | ||
|
|
1be0c8eb21 |
@@ -35,8 +35,9 @@ Please see our [Contributor Code of Conduct](./CODE_OF_CONDUCT.md) for informati
|
||||
3. Clone your fork.
|
||||
4. Create a new branch from master for your change.
|
||||
5. Run `npm install` from the root directory to install dependencies for this package.
|
||||
6. [Modify the Icon Component](#modifying-components) if desired.
|
||||
7. Or, modify and [preview the site](#preview-site).
|
||||
6. Run `npm run build` to perform a first time build.
|
||||
7. [Modify the Icon Component](#modifying-components) if desired.
|
||||
8. Or, modify and [preview the site](#preview-site).
|
||||
|
||||
|
||||
#### Modifying Components
|
||||
@@ -48,19 +49,7 @@ Please see our [Contributor Code of Conduct](./CODE_OF_CONDUCT.md) for informati
|
||||
#### Preview Component Changes
|
||||
|
||||
1. Run `npm start` from the root directory to start a local version of the icon test.
|
||||
2. In the browser, navigate to `/src/components` to view the example test.
|
||||
3. Modify this test as needed in the `src/components.index.html` file.
|
||||
|
||||
#### Preview Site
|
||||
|
||||
1. Run `npm run dev` from the root directory to start a local version of the ionicons site.
|
||||
2. A browser will open with a local version of the ionicons docs.
|
||||
|
||||
|
||||
#### Lint Changes
|
||||
|
||||
1. Run `npm run lint.ts` to lint the TypeScript.
|
||||
2. If there are lint errors, run `npm run lint.ts.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
|
||||
2. Modify the icon test as needed in the `index.html` file.
|
||||
|
||||
|
||||
<!-- #### Building Changes
|
||||
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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 }}
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -8,13 +8,19 @@ log.txt
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
.idea/
|
||||
.sass-cache/
|
||||
.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
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"arrowParens": "always",
|
||||
"bracketSpacing": true,
|
||||
"jsxBracketSameLine": false,
|
||||
"jsxSingleQuote": false,
|
||||
"quoteProps": "consistent",
|
||||
"printWidth": 120,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "all",
|
||||
"useTabs": false
|
||||
}
|
||||
@@ -1,66 +1,58 @@
|
||||
{
|
||||
"name": "ionicons",
|
||||
"version": "4.6.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",
|
||||
"collection:main": "dist/collection/index.js",
|
||||
"scripts": {
|
||||
"build": "npm run lint.ts && npm run build.data && npm run build.icon && npm run generate && npm run build.css && npm run copy.tasks && npm run test",
|
||||
"build.css": "node scripts/build-css.js",
|
||||
"build.data": "node scripts/data.js",
|
||||
"build.icon": "stencil build",
|
||||
"copy.tasks": "node scripts/copy-tasks.js",
|
||||
"dev": "npm run start.docs",
|
||||
"mode.comparison": "node scripts/mode-comparison.js",
|
||||
"generate": "python scripts/generate.py",
|
||||
"lint.ts": "tslint --project .",
|
||||
"lint.ts.fix": "tslint --project . --fix",
|
||||
"start": "npm run start.icon",
|
||||
"start.icon": "stencil build --dev --watch --serve",
|
||||
"release.prepare": "npm run build",
|
||||
"release": "np --any-branch --yolo",
|
||||
"version": "npm run build",
|
||||
"release.dev": "np --any-branch --yolo --tag=dev",
|
||||
"test": "stencil test --spec"
|
||||
"build": "tsc -p scripts/tsconfig.json && npm run build.files && npm run build.component && npm run collection.copy",
|
||||
"build.files": "node scripts/build.js",
|
||||
"build.component": "stencil build",
|
||||
"collection.copy": "node scripts/collection-copy.js",
|
||||
"start": "stencil build --dev --watch --serve",
|
||||
"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.3.0",
|
||||
"@stencil/sass": "^1.0.1",
|
||||
"@types/highlight.js": "^9.12.3",
|
||||
"@types/jest": "24.0.13",
|
||||
"@types/puppeteer": "1.12.4",
|
||||
"archiver": "^3.0.0",
|
||||
"fs-extra": "8.1.0",
|
||||
"highlight.js": "^9.15.8",
|
||||
"jest": "24.8.0",
|
||||
"jest-cli": "24.8.0",
|
||||
"np": "5.0.3",
|
||||
"pixelmatch": "4.0.2",
|
||||
"puppeteer": "1.7.0",
|
||||
"sass": "^1.20.3",
|
||||
"svgo": "1.2.2",
|
||||
"tslint": "^5.17.0",
|
||||
"tslint-ionic-rules": "0.0.21",
|
||||
"workbox-build": "4.3.1"
|
||||
"@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.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": [
|
||||
"ionicons",
|
||||
"icon pack",
|
||||
"ionic",
|
||||
"icon",
|
||||
"svg",
|
||||
"font",
|
||||
"mobile",
|
||||
"web component",
|
||||
"component",
|
||||
"custom element"
|
||||
"custom element",
|
||||
"material design",
|
||||
"ios"
|
||||
],
|
||||
"homepage": "http://ionicons.com/",
|
||||
"author": {
|
||||
|
||||
@@ -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;
|
||||
@@ -1,12 +1,8 @@
|
||||
# Ionicons
|
||||
|
||||
### [Announcing Ionicons v4!](https://blog.ionicframework.com/announcing-ionicons-v4/)
|
||||
[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.
|
||||
|
||||
[Ionicons](http://ionicons.com/) is a completely open-source icon set with 700+ 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. When used with Ionic, the `ion-icon` component will automatically use the correct version based on your platform. Additionally, when used outside of Ionic, both `ios` and `md` platforms can be chosen by the application.
|
||||
|
||||
Note: All brand icons are trademarks of their respective owners. The use of these trademarks does not indicate endorsement of the trademark holder by Drifty, nor vice versa.
|
||||
|
||||
Visit [ionicons.com](http://ionicons.com) and check out the search feature, which has keywords identifying common icon names and styles. For example, if you search for “arrow” we call up every icon that could possibly be used as an arrow.
|
||||
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.
|
||||
|
||||
We intend for this icon pack to be used with [Ionic](http://ionicframework.com/), but it’s by no means limited to it. Use them wherever you see fit, personal or commercial. They are free to use and licensed under [MIT](http://opensource.org/licenses/MIT).
|
||||
|
||||
@@ -30,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@4.2.2/dist/ionicons.js"></script>
|
||||
<script src="https://unpkg.com/ionicons@latest/dist/ionicons.js"></script>
|
||||
```
|
||||
|
||||
### Basic usage
|
||||
@@ -41,38 +37,31 @@ To use a built-in icon from the Ionicons package, populate the `name` attribute
|
||||
<ion-icon name="heart"></ion-icon>
|
||||
```
|
||||
|
||||
### Custom icons
|
||||
|
||||
To use a custom SVG, provide its url in the `src` attribute to request the external SVG file. The `src` attribute works the same as `<img src="...">` in that the url must be accessible from the webpage that's making a request for the image. Additionally, the external file can only be a valid svg and does not allow scripts or events within the svg element.
|
||||
|
||||
```html
|
||||
<ion-icon src="/path/to/external/file.svg"></ion-icon>
|
||||
```
|
||||
|
||||
### Platform specific icons
|
||||
|
||||
Many icons have both Material Design and iOS versions to provide Platform Continuity for users.
|
||||
|
||||
Platform Continuity means that by default, ionicons running on iOS (Apple products such as iPhone and iPad) will display `ios` styled icons. Alternatively, ionicons running on devices with Material Design theme (commonly seen on Android devices) will see the `md` styled icons.
|
||||
|
||||
### Platform Continuity Within Ionic Apps
|
||||
|
||||
Ionic will automatically use the correct version based on the platform. Note that this feature will only automatically kick-in for Ionic apps. When being used outside of an Ionic app, please see the "Outside Ionic App" section below.
|
||||
|
||||
To specify the icon for each platform, use the `md` and `ios` attributes and provide the platform specific icon name.
|
||||
## Variants
|
||||
Each app icon in Ionicons has a `filled`, `outline` and `sharp` variant. These different variants are provided to make your app feel native to a variety of platforms. The filled variant uses the default name without a suffix. Note: Logo icons do not have outline or sharp variants.
|
||||
|
||||
```html
|
||||
<ion-icon ios="ios-heart" md="md-heart"></ion-icon>
|
||||
<ion-icon name="heart"></ion-icon> <!--filled-->
|
||||
<ion-icon name="heart-outline"></ion-icon> <!--outline-->
|
||||
<ion-icon name="heart-sharp"></ion-icon> <!--sharp-->
|
||||
```
|
||||
|
||||
### Platform Continuity Outside Ionic Apps
|
||||
|
||||
When using Ionicons without the Ionic Framework, the icon will default to the Material Design icon style. To specify the non-default icon style, add a platform prefix to the `name` attribute.
|
||||
### Platform specificity
|
||||
When using icons in Ionic Framework you can specify different icons per platform. Use the `md` and `ios` attributes and provide the platform specific icon/variant name.
|
||||
|
||||
```html
|
||||
<ion-icon name="ios-heart"></ion-icon>
|
||||
<ion-icon name="md-heart"></ion-icon>
|
||||
<ion-icon ios="heart-outline" md="heart-sharp"></ion-icon>
|
||||
```
|
||||
|
||||
### Icon sizes
|
||||
## Size
|
||||
|
||||
To specify the icon size, you can use the size attribute for our pre-defined font sizes.
|
||||
|
||||
@@ -89,42 +78,32 @@ ion-icon {
|
||||
}
|
||||
```
|
||||
|
||||
## Color
|
||||
|
||||
## Using the Font Icon
|
||||
Specify the icon color by applying the `color` CSS property on the `ion-icon` component.
|
||||
|
||||
The font icon is compatible with previous versions of Ionicons. If you're using Ionicons for the first time we strongly recommend using the `ion-icon` web component instead.
|
||||
|
||||
An advantage to the font icon file is that all of the icons are in one file. A disadvantage to the font icon file is that all of the icons are in one file. Additionally, large font files have a negative impact on a webpage's time to first paint.
|
||||
|
||||
In most cases it may be better to request a small number of svgs using the web component method. A bonus with the web component is that it uses Intersection Observer to only request icons which are viewable by the users (icons above the fold). However, if a webpage has to show many icons at once (such as this website's homepage which is showing 700+ icons on one page), the font icon may be a better choice.
|
||||
|
||||
### Installation
|
||||
|
||||
To embed the Ionicons font icon, copy this code into the `<head>` of the HTML document.
|
||||
|
||||
```html
|
||||
<link href="https://unpkg.com/ionicons@4.2.2/dist/css/ionicons.min.css" rel="stylesheet">
|
||||
```css
|
||||
ion-icon {
|
||||
color: blue;
|
||||
}
|
||||
```
|
||||
|
||||
### Basic usage
|
||||
|
||||
Use the icon index to look up the name of the icon you want to use. The icon's CSS class name will be prefixed with ion-, followed by the platform attribute md-, ios- or logo- and completed wth the icon name.
|
||||
## Stroke width
|
||||
When using an `outline` icon variant it is possible to adjust the stroke width, for improved visual balance relative to the icon's size or relative to the width of adjacent text. You can set a specific size by applying the `--ionicon-stroke-width` CSS custom property to the `ion-icon` component. The default value is 32px.
|
||||
|
||||
```html
|
||||
<i class="ion-md-heart"></i>
|
||||
<i class="ion-ios-heart"></i>
|
||||
|
||||
<i class="ion-md-heart-dislike"></i>
|
||||
<i class="ion-ios-heart-dislike"></i>
|
||||
|
||||
|
||||
<i class="ion-md-cellular"></i>
|
||||
<i class="ion-ios-cellular"></i>
|
||||
|
||||
<i class="ion-logo-facebook"></i>
|
||||
<i class="ion-logo-windows"></i>
|
||||
<ion-icon name="heart-outline"></ion-icon>
|
||||
```
|
||||
|
||||
```css
|
||||
ion-icon {
|
||||
--ionicon-stroke-width: 16px;
|
||||
}
|
||||
```
|
||||
|
||||
## Migrating from v4
|
||||
|
||||
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
|
||||
|
||||
@@ -139,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,51 +0,0 @@
|
||||
var sass = require('sass');
|
||||
var fs = require('fs-extra');
|
||||
var path = require('path');
|
||||
|
||||
var distScssDir = path.join(__dirname, '..', 'dist', 'scss');
|
||||
var distCssDir = path.join(__dirname, '..', 'dist', 'css');
|
||||
|
||||
fs.emptyDirSync(distCssDir);
|
||||
|
||||
generateCss('ionicons');
|
||||
generateCss('ionicons-core');
|
||||
|
||||
function generateCss(fileName) {
|
||||
var input = path.join(distScssDir, fileName + '.scss');
|
||||
var output = path.join(distCssDir, fileName + '.css');
|
||||
var outputMin = path.join(distCssDir, fileName + '.min.css');
|
||||
|
||||
var opts = {
|
||||
file: input,
|
||||
outputStyle: 'expanded'
|
||||
};
|
||||
|
||||
sass.render(opts, (err, result) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
fs.writeFile(output, result.css.toString(), { encoding: 'utf-8' }, (err) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
var optsMin = {
|
||||
file: input,
|
||||
outputStyle: 'compressed'
|
||||
};
|
||||
|
||||
sass.render(optsMin, (err, result) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
fs.writeFile(outputMin, result.css.toString(), { encoding: 'utf-8' }, (err) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,591 @@
|
||||
import fs from 'fs-extra';
|
||||
import { join } from 'path';
|
||||
import Svgo from 'svgo';
|
||||
|
||||
async function build(rootDir: string) {
|
||||
try {
|
||||
const pkgJsonPath = join(rootDir, 'package.json');
|
||||
const srcDir = join(rootDir, 'src');
|
||||
const srcSvgDir = join(srcDir, 'svg');
|
||||
const iconDir = join(rootDir, 'icons');
|
||||
const distDir = join(rootDir, 'dist');
|
||||
const distIoniconsDir = join(distDir, 'ionicons');
|
||||
const distSvgDir = join(distDir, 'svg');
|
||||
|
||||
await Promise.all([fs.emptyDir(iconDir), fs.emptyDir(distDir)]);
|
||||
await fs.emptyDir(distSvgDir), await fs.emptyDir(distIoniconsDir);
|
||||
|
||||
const pkgData = await fs.readJson(pkgJsonPath);
|
||||
const version = pkgData.version as string;
|
||||
|
||||
const srcSvgData = await getSvgs(srcSvgDir, distSvgDir, distIoniconsDir);
|
||||
|
||||
await optimizeSvgs(srcSvgData);
|
||||
|
||||
await Promise.all([
|
||||
createDataJson(version, srcDir, distDir, srcSvgData),
|
||||
createIconPackage(version, iconDir, srcSvgData),
|
||||
]);
|
||||
|
||||
const svgSymbolsContent = await createSvgSymbols(version, distDir, srcSvgData);
|
||||
|
||||
await createCheatsheet(version, rootDir, distDir, svgSymbolsContent, srcSvgData);
|
||||
|
||||
await copyToTesting(rootDir, distDir, srcSvgData);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
async function optimizeSvgs(srcSvgData: SvgData[]) {
|
||||
// https://github.com/svg/svgo
|
||||
const optimizePass = new Svgo({});
|
||||
const webComponentPass = new Svgo({
|
||||
full: true,
|
||||
plugins: [
|
||||
{
|
||||
addFillNoneCss: {
|
||||
type: 'perItem',
|
||||
fn: (item, params) => {
|
||||
if (!Array.isArray(params.attrs)) {
|
||||
params.attrs = [params.attrs];
|
||||
}
|
||||
if (item.isElem()) {
|
||||
item.eachAttr((attr) => {
|
||||
if (attr.name === 'fill') {
|
||||
if (attr.value === 'none') {
|
||||
item.class.add('ionicon-fill-none');
|
||||
}
|
||||
item.removeAttr('fill');
|
||||
} else if (attr.name === 'stroke') {
|
||||
item.removeAttr('stroke');
|
||||
} else if (attr.name === 'stroke-width' && attr.value === '32') {
|
||||
item.removeAttr('stroke-width');
|
||||
item.class.add('ionicon-stroke-width');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
} as any,
|
||||
{
|
||||
removeStyleElement: true,
|
||||
},
|
||||
{
|
||||
removeScriptElement: true,
|
||||
},
|
||||
{
|
||||
removeDimensions: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const sourcePass = new Svgo({
|
||||
full: true,
|
||||
plugins: [
|
||||
{
|
||||
addFillNoneCss: {
|
||||
type: 'perItem',
|
||||
fn: (item, params) => {
|
||||
if (!Array.isArray(params.attrs)) {
|
||||
params.attrs = [params.attrs];
|
||||
}
|
||||
if (item.isElem()) {
|
||||
item.eachAttr((attr) => {
|
||||
if (attr.name === 'stroke' || attr.name === 'fill') {
|
||||
if (attr.value === '#000') {
|
||||
item.addAttr({
|
||||
name: attr.name,
|
||||
value: 'currentColor',
|
||||
prefix: '',
|
||||
local: attr.name,
|
||||
});
|
||||
} else if (attr.value !== 'none') {
|
||||
throw new Error(`invalid "${attr.name}" value: ${attr.value}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
} as any,
|
||||
{
|
||||
removeStyleElement: true,
|
||||
},
|
||||
{
|
||||
removeScriptElement: true,
|
||||
},
|
||||
{
|
||||
removeDimensions: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const validatePass = new Svgo({
|
||||
full: true,
|
||||
plugins: [
|
||||
{
|
||||
addFillNoneCss: {
|
||||
type: 'perItem',
|
||||
fn: (item, params) => {
|
||||
if (!Array.isArray(params.attrs)) {
|
||||
params.attrs = [params.attrs];
|
||||
}
|
||||
if (item.isElem()) {
|
||||
item.eachAttr((attr) => {
|
||||
if (attr.name === 'style') {
|
||||
throw new Error('Inline style attributed detected');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (item.isElem('style')) {
|
||||
throw new Error('Inline style element detected');
|
||||
}
|
||||
},
|
||||
},
|
||||
} as any,
|
||||
],
|
||||
});
|
||||
|
||||
await Promise.all(
|
||||
srcSvgData.map(async (svgData) => {
|
||||
return optimizeSvg(optimizePass, webComponentPass, sourcePass, validatePass, svgData);
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
async function optimizeSvg(
|
||||
optimizePass: Svgo,
|
||||
webComponentPass: Svgo,
|
||||
sourcePass: Svgo,
|
||||
validatePass: Svgo,
|
||||
svgData: SvgData,
|
||||
) {
|
||||
const srcSvgContent = await fs.readFile(svgData.srcFilePath, 'utf8');
|
||||
|
||||
const optimizedSvg = await optimizePass.optimize(srcSvgContent, { path: svgData.srcFilePath });
|
||||
|
||||
const optimizedCode = optimizedSvg.data.replace(
|
||||
/<svg (.*?)>/,
|
||||
`<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><title>${svgData.title}</title>`,
|
||||
);
|
||||
|
||||
const webComponentSvg = await webComponentPass.optimize(optimizedCode, { path: svgData.srcFilePath });
|
||||
const sourceSvg = await sourcePass.optimize(optimizedCode, { path: svgData.srcFilePath });
|
||||
|
||||
svgData.optimizedSvgContent = webComponentSvg.data;
|
||||
|
||||
try {
|
||||
await validatePass.optimize(svgData.optimizedSvgContent, { path: svgData.srcFilePath });
|
||||
} catch (e) {
|
||||
console.error(`${e.message}: ${svgData.srcFilePath}`);
|
||||
}
|
||||
|
||||
await fs.writeFile(svgData.optimizedFilePath, svgData.optimizedSvgContent);
|
||||
await fs.writeFile(svgData.distSvgFilePath, sourceSvg.data);
|
||||
}
|
||||
|
||||
async function copyToTesting(rootDir: string, distDir: string, srcSvgData: SvgData[]) {
|
||||
const testDir = join(rootDir, 'www');
|
||||
const testBuildDir = join(testDir, 'build');
|
||||
const testSvgDir = join(testBuildDir, 'svg');
|
||||
await fs.ensureDir(testSvgDir);
|
||||
|
||||
await Promise.all(
|
||||
srcSvgData.map(async (svgData) => {
|
||||
const testSvgFilePath = join(testSvgDir, svgData.fileName);
|
||||
await fs.writeFile(testSvgFilePath, svgData.optimizedSvgContent);
|
||||
}),
|
||||
);
|
||||
|
||||
const distCheatsheetFilePath = join(distDir, 'cheatsheet.html');
|
||||
const testCheatsheetFilePath = join(testDir, 'cheatsheet.html');
|
||||
await fs.copyFile(distCheatsheetFilePath, testCheatsheetFilePath);
|
||||
}
|
||||
|
||||
async function createSvgSymbols(version: string, distDir: string, srcSvgData: SvgData[]) {
|
||||
srcSvgData = srcSvgData.sort((a, b) => {
|
||||
if (a.iconName < b.iconName) return -1;
|
||||
if (a.iconName > b.iconName) return 1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
const symbolsSvgFilePath = join(distDir, 'ionicons.symbols.svg');
|
||||
|
||||
const lines = [
|
||||
`<svg data-ionicons="${version}" style="display:none">`,
|
||||
`<style>`,
|
||||
`.ionicon {`,
|
||||
` fill: currentColor;`,
|
||||
` stroke: currentColor;`,
|
||||
`}`,
|
||||
`.ionicon-fill-none {`,
|
||||
` fill: none;`,
|
||||
`}`,
|
||||
`.ionicon-stroke-width {`,
|
||||
` stroke-width: 32px;`,
|
||||
`}`,
|
||||
`</style>`,
|
||||
];
|
||||
|
||||
srcSvgData.forEach((svgData) => {
|
||||
const svg = svgData.optimizedSvgContent
|
||||
.replace(`<svg xmlns="http://www.w3.org/2000/svg"`, `<symbol id="${svgData.iconName}"`)
|
||||
.replace(`</svg>`, `</symbol>`);
|
||||
lines.push(svg);
|
||||
});
|
||||
|
||||
lines.push(`</svg>`, ``);
|
||||
|
||||
const content = lines.join('\n');
|
||||
|
||||
await fs.writeFile(symbolsSvgFilePath, content);
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
async function createCheatsheet(
|
||||
version: string,
|
||||
rootDir: string,
|
||||
distDir: string,
|
||||
svgSymbolsContent: string,
|
||||
srcSvgData: SvgData[],
|
||||
) {
|
||||
const CheatsheetTmpFilePath = join(rootDir, 'scripts', 'cheatsheet-template.html');
|
||||
const distCheatsheetFilePath = join(distDir, 'cheatsheet.html');
|
||||
|
||||
const c = srcSvgData.map(
|
||||
(svgData) => `<a href="./svg/${svgData.fileName}"><svg><use href="#${svgData.iconName}" xlink:href="#${svgData.iconName}"/></svg></a>`,
|
||||
);
|
||||
|
||||
c.push(svgSymbolsContent);
|
||||
|
||||
const html = (await fs.readFile(CheatsheetTmpFilePath, 'utf8'))
|
||||
.replace(/{{version}}/g, version)
|
||||
.replace(/{{count}}/g, srcSvgData.length.toString())
|
||||
.replace(/{{content}}/g, c.join('\n'));
|
||||
|
||||
await fs.writeFile(distCheatsheetFilePath, html);
|
||||
}
|
||||
|
||||
async function getSvgs(srcSvgDir: string, distSvgDir: string, distIoniconsDir: string): Promise<SvgData[]> {
|
||||
const optimizedSvgDir = join(distIoniconsDir, 'svg');
|
||||
await fs.emptyDir(optimizedSvgDir);
|
||||
|
||||
const svgFiles = (await fs.readdir(srcSvgDir)).filter((fileName) => {
|
||||
return !fileName.startsWith('.') && fileName.endsWith('.svg');
|
||||
});
|
||||
|
||||
const svgData = await Promise.all(
|
||||
svgFiles.map(async (fileName) => {
|
||||
// fileName: airplane-outline.svg
|
||||
|
||||
if (fileName.toLowerCase() !== fileName) {
|
||||
throw new Error(`svg filename "${fileName}" must be all lowercase`);
|
||||
}
|
||||
|
||||
// srcFilePath: /src/svg/airplane-outline.svg
|
||||
const srcFilePath = join(srcSvgDir, fileName);
|
||||
|
||||
// srcFilePath: /src/svg/airplane-outline.svg
|
||||
const distSvgFilePath = join(distSvgDir, fileName);
|
||||
|
||||
// optimizedFilePath: /dist/ionicons/svg/airplane-outline.svg
|
||||
const optimizedFilePath = join(optimizedSvgDir, fileName);
|
||||
|
||||
const dotSplit = fileName.split('.');
|
||||
if (dotSplit.length > 2) {
|
||||
throw new Error(`svg filename "${fileName}" cannot contain more than one period`);
|
||||
}
|
||||
|
||||
// iconName: airplane-outline
|
||||
const iconName = dotSplit[0];
|
||||
|
||||
if (reservedKeywords.has(iconName)) {
|
||||
throw new Error(`svg icon name "${iconName}" is a reserved JavaScript keyword`);
|
||||
}
|
||||
|
||||
// fileNameMjs: airplane-outline.mjs
|
||||
const fileNameMjs = iconName + '.mjs';
|
||||
|
||||
// fileNameCjs: airplane-outline.mjs
|
||||
const fileNameCjs = iconName + '.js';
|
||||
|
||||
// exportName: airplaneOutline
|
||||
const exportName = camelize(iconName);
|
||||
|
||||
const title = toTitleCase(
|
||||
fileName.replace('.svg', '').replace('-outline', '').replace('-sharp', '').replace(/-/g, ' '),
|
||||
);
|
||||
|
||||
return {
|
||||
fileName,
|
||||
title,
|
||||
srcFilePath,
|
||||
distSvgFilePath,
|
||||
srcSvgContent: await fs.readFile(srcFilePath, 'utf8'),
|
||||
optimizedFilePath,
|
||||
optimizedSvgContent: null,
|
||||
iconName,
|
||||
fileNameMjs,
|
||||
fileNameCjs,
|
||||
exportName,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
return svgData.sort((a, b) => {
|
||||
if (a.exportName < b.exportName) return -1;
|
||||
if (a.exportName > b.exportName) return 1;
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
async function createIconPackage(version: string, iconDir: string, srcSvgData: SvgData[]) {
|
||||
const iconPkgJsonFilePath = join(iconDir, 'package.json');
|
||||
|
||||
await Promise.all([
|
||||
createEsmIcons(version, iconDir, srcSvgData),
|
||||
createCjsIcons(version, iconDir, srcSvgData),
|
||||
createDtsIcons(version, iconDir, srcSvgData),
|
||||
]);
|
||||
|
||||
const iconPkgJson = {
|
||||
name: 'ionicons/icons',
|
||||
version,
|
||||
module: 'index.mjs',
|
||||
main: 'index.js',
|
||||
typings: 'index.d.ts',
|
||||
private: true,
|
||||
};
|
||||
|
||||
const jsonStr = JSON.stringify(iconPkgJson, null, 2) + '\n';
|
||||
await fs.writeFile(iconPkgJsonFilePath, jsonStr);
|
||||
}
|
||||
|
||||
async function createEsmIcons(version: string, iconDir: string, srcSvgData: SvgData[]) {
|
||||
const iconEsmFilePath = join(iconDir, 'index.mjs');
|
||||
|
||||
const o = [`/* Ionicons v${version}, ES Modules */`, ``];
|
||||
|
||||
srcSvgData.forEach((svgData) => {
|
||||
o.push(`export const ${svgData.exportName} = ${getDataUrl(svgData)}`);
|
||||
});
|
||||
|
||||
await fs.writeFile(iconEsmFilePath, o.join('\n') + '\n');
|
||||
}
|
||||
|
||||
async function createCjsIcons(version: string, iconDir: string, srcSvgData: SvgData[]) {
|
||||
const iconCjsFilePath = join(iconDir, 'index.js');
|
||||
|
||||
const o = [`/* Ionicons v${version}, CommonJS */`, ``];
|
||||
|
||||
srcSvgData.forEach((svgData) => {
|
||||
o.push(`exports.${svgData.exportName} = ${getDataUrl(svgData)}`);
|
||||
});
|
||||
|
||||
await fs.writeFile(iconCjsFilePath, o.join('\n') + '\n');
|
||||
}
|
||||
|
||||
async function createDtsIcons(version: string, iconDir: string, srcSvgData: SvgData[]) {
|
||||
const iconDtsFilePath = join(iconDir, 'index.d.ts');
|
||||
|
||||
const o = [`/* Ionicons v${version}, Types */`, ``];
|
||||
|
||||
srcSvgData.forEach((svgData) => {
|
||||
o.push(`export declare var ${svgData.exportName}: string;`);
|
||||
});
|
||||
|
||||
await fs.writeFile(iconDtsFilePath, o.join('\n') + '\n');
|
||||
}
|
||||
|
||||
function getDataUrl(svgData: SvgData) {
|
||||
let svg = svgData.optimizedSvgContent;
|
||||
if (svg.includes(`'`)) {
|
||||
throw new Error(`oh no! no single quotes allowed! ${svgData.fileName}`);
|
||||
}
|
||||
if (svg.includes(`\n`) || svg.includes(`\r`)) {
|
||||
throw new Error(`oh no! no new lines allowed! ${svgData.fileName}`);
|
||||
}
|
||||
svg = svg.replace(/"/g, "'");
|
||||
return `"data:image/svg+xml;utf8,${svg}"`;
|
||||
}
|
||||
|
||||
async function createDataJson(version: string, srcDir: string, distDir: string, srcSvgData: SvgData[]) {
|
||||
const srcDataJsonPath = join(srcDir, 'data.json');
|
||||
const distDataJsonPath = join(distDir, 'ionicons.json');
|
||||
|
||||
let data: JsonData;
|
||||
|
||||
try {
|
||||
data = await fs.readJson(srcDataJsonPath);
|
||||
} catch (e) {
|
||||
data = {} as any;
|
||||
}
|
||||
|
||||
data.icons = data.icons || [];
|
||||
|
||||
// add new icons
|
||||
srcSvgData.forEach((svgData) => {
|
||||
if (!data.icons.some((i) => i.name === svgData.iconName)) {
|
||||
data.icons.push({
|
||||
name: svgData.iconName,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// remove dead icons
|
||||
data.icons = data.icons.filter((dataIcon) => {
|
||||
return srcSvgData.some((svgData) => dataIcon.name === svgData.iconName);
|
||||
});
|
||||
|
||||
// sort
|
||||
data.icons = data.icons.sort((a, b) => {
|
||||
if (a.name < b.name) return -1;
|
||||
if (a.name > b.name) return 1;
|
||||
return 0;
|
||||
});
|
||||
data.icons.forEach((icon) => {
|
||||
icon.tags = icon.tags || icon.name.split('-');
|
||||
icon.tags = icon.tags.sort();
|
||||
});
|
||||
|
||||
const srcJsonStr = JSON.stringify(data, null, 2) + '\n';
|
||||
await fs.writeFile(srcDataJsonPath, srcJsonStr);
|
||||
|
||||
const distJsonData = {
|
||||
name: 'ionicons',
|
||||
version,
|
||||
icons: data.icons,
|
||||
};
|
||||
const distJsonStr = JSON.stringify(distJsonData, null, 2) + '\n';
|
||||
await fs.writeFile(distDataJsonPath, distJsonStr);
|
||||
}
|
||||
|
||||
function camelize(text: string) {
|
||||
let words = text.split(/[-_]/g); // ok one simple regexp.
|
||||
return words[0].toLowerCase() + words.slice(1).map(upFirst).join('');
|
||||
}
|
||||
|
||||
function upFirst(word: string) {
|
||||
return word[0].toUpperCase() + word.toLowerCase().slice(1);
|
||||
}
|
||||
|
||||
interface SvgData {
|
||||
/**
|
||||
* airplane-outline.svg
|
||||
*/
|
||||
fileName: string;
|
||||
|
||||
/**
|
||||
* airplane
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* /src/svg/airplane-outline.svg
|
||||
*/
|
||||
srcFilePath: string;
|
||||
|
||||
/**
|
||||
* /dist/ionicons/svg/airplane-outline.svg
|
||||
*/
|
||||
optimizedFilePath: string;
|
||||
|
||||
/**
|
||||
* /dist/svg/airplane-outline.svg
|
||||
*/
|
||||
distSvgFilePath: string;
|
||||
|
||||
optimizedSvgContent: string;
|
||||
|
||||
/**
|
||||
* airplane-outline
|
||||
*/
|
||||
iconName: string;
|
||||
|
||||
/**
|
||||
* airplane-outline.mjs
|
||||
*/
|
||||
fileNameMjs: string;
|
||||
|
||||
/**
|
||||
* airplane-outline.js
|
||||
*/
|
||||
fileNameCjs: string;
|
||||
|
||||
/**
|
||||
* airplaneOutline
|
||||
*/
|
||||
exportName: string;
|
||||
}
|
||||
|
||||
interface JsonData {
|
||||
icons: { name: string; tags?: string[] }[];
|
||||
version?: string;
|
||||
}
|
||||
|
||||
function toTitleCase(str: string) {
|
||||
const s = str.trim().toLowerCase().split(' ');
|
||||
for (var i = 0; i < s.length; i++) {
|
||||
s[i] = s[i].charAt(0).toUpperCase() + s[i].slice(1);
|
||||
}
|
||||
return s.join(' ');
|
||||
}
|
||||
|
||||
// https://mathiasbynens.be/notes/reserved-keywords
|
||||
const reservedKeywords = new Set([
|
||||
'do',
|
||||
'if',
|
||||
'in',
|
||||
'for',
|
||||
'let',
|
||||
'new',
|
||||
'try',
|
||||
'var',
|
||||
'case',
|
||||
'else',
|
||||
'enum',
|
||||
'eval',
|
||||
'null',
|
||||
'this',
|
||||
'true',
|
||||
'void',
|
||||
'with',
|
||||
'await',
|
||||
'break',
|
||||
'catch',
|
||||
'class',
|
||||
'const',
|
||||
'false',
|
||||
'super',
|
||||
'throw',
|
||||
'while',
|
||||
'yield',
|
||||
'delete',
|
||||
'export',
|
||||
'import',
|
||||
'public',
|
||||
'return',
|
||||
'static',
|
||||
'switch',
|
||||
'typeof',
|
||||
'default',
|
||||
'extends',
|
||||
'finally',
|
||||
'package',
|
||||
'private',
|
||||
'continue',
|
||||
'debugger',
|
||||
'function',
|
||||
'arguments',
|
||||
'interface',
|
||||
'protected',
|
||||
'implements',
|
||||
'instanceof',
|
||||
'constructor',
|
||||
]);
|
||||
|
||||
// let's do this
|
||||
build(join(__dirname, '..'));
|
||||
@@ -0,0 +1,41 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Ionicons {{version}} Cheatsheet</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
background: #fff;
|
||||
}
|
||||
h1 {
|
||||
margin: 0;
|
||||
}
|
||||
.options {
|
||||
padding: 15px 0 20px 0;
|
||||
}
|
||||
label {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
font-size: 12px;
|
||||
}
|
||||
svg {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ionicons {{version}} Cheatsheet</h1>
|
||||
<h3>{{count}} icons</h3>
|
||||
|
||||
{{content}}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,56 @@
|
||||
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');
|
||||
const collectionDest = join(rootDir, 'dist', 'collection', 'components', 'icon', 'svg');
|
||||
await fs.copy(optimizedSrc, collectionDest);
|
||||
|
||||
// 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
|
||||
// to make it easier for users migrating between
|
||||
// of older versions of angular and typescript
|
||||
// to the newer verisons, where the `type` keyword
|
||||
// is used. This is a megahack, no doubt.
|
||||
const typesDist = join(rootDir, 'dist', 'types', 'index.d.ts');
|
||||
let types = await fs.readFile(typesDist, 'utf8');
|
||||
types = types.replace('export type', 'export');
|
||||
await fs.writeFile(typesDist, types);
|
||||
}
|
||||
|
||||
collectionCopy(join(__dirname, '..'));
|
||||
@@ -1,22 +0,0 @@
|
||||
console.log('Copy files');
|
||||
|
||||
var fs = require('fs-extra');
|
||||
var path = require('path');
|
||||
|
||||
var optimizedSvgsDir = path.join(__dirname, '..', 'dist', 'svg');
|
||||
var componentSvgsDir = path.join(__dirname, '..', 'dist', 'ionicons', 'svg');
|
||||
var collectionSvgsDir = path.join(__dirname, '..', 'dist', 'collection', 'icon', 'svg');
|
||||
var docsSvgsDir = path.join(__dirname, '..', 'docs', 'ionicons', 'svg');
|
||||
var docsFontsDir = path.join(__dirname, '..', 'docs', 'fonts');
|
||||
var distFontsDir = path.join(__dirname, '..', 'dist', 'fonts');
|
||||
|
||||
fs.emptyDirSync(componentSvgsDir);
|
||||
fs.emptyDirSync(collectionSvgsDir);
|
||||
fs.emptyDirSync(docsSvgsDir);
|
||||
fs.emptyDirSync(distFontsDir);
|
||||
|
||||
fs.copySync(optimizedSvgsDir, collectionSvgsDir);
|
||||
fs.copySync(optimizedSvgsDir, docsSvgsDir);
|
||||
fs.moveSync(optimizedSvgsDir, componentSvgsDir, {overwrite: true});
|
||||
|
||||
fs.copySync(docsFontsDir, distFontsDir);
|
||||
@@ -1,207 +0,0 @@
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT_DIR = path.join(__dirname, '..');
|
||||
const SRC_DIR = path.join(ROOT_DIR, 'src');
|
||||
const SRC_SVG_DIR = path.join(SRC_DIR, 'svg');
|
||||
const PKG_JSON = path.join(ROOT_DIR, 'package.json');
|
||||
const SRC_JSON = path.join(SRC_DIR, 'data.json');
|
||||
const DST_DIR = path.join(ROOT_DIR, 'dist');
|
||||
const DST_JSON = path.join(DST_DIR, 'ionicons', 'data.json');
|
||||
|
||||
const DST_ICONS_DIR = path.join(ROOT_DIR, 'icons');
|
||||
const DST_ICONS_PKGJSON = path.join(DST_ICONS_DIR, 'package.json');
|
||||
const DST_ICONS_ESM = path.join(DST_ICONS_DIR, 'index.mjs');
|
||||
const DST_ICONS_CJS = path.join(DST_ICONS_DIR, 'index.js');
|
||||
const DST_ICONS_DTS = path.join(DST_ICONS_DIR, 'index.d.ts');
|
||||
|
||||
const DST_ICONS_IMPORTS_DIR = path.join(DST_ICONS_DIR, 'imports');
|
||||
|
||||
|
||||
fs.emptyDirSync(DST_ICONS_DIR);
|
||||
fs.emptyDirSync(DST_ICONS_IMPORTS_DIR);
|
||||
|
||||
console.log('checking icon data: ' + SRC_JSON);
|
||||
|
||||
let srcData = fs.readJsonSync(SRC_JSON);
|
||||
let svgFiles = fs.readdirSync(SRC_SVG_DIR);
|
||||
let pkgData = fs.readJsonSync(PKG_JSON);
|
||||
srcData['version'] = pkgData.version;
|
||||
|
||||
svgFiles = svgFiles.filter(f => f.indexOf('.svg') > -1).sort();
|
||||
svgFiles.forEach(svgFile => {
|
||||
let iconName = svgFile.split('.')[0];
|
||||
|
||||
let icon = srcData.icons.find(i => i.icons.indexOf(iconName) > -1);
|
||||
if (!icon) {
|
||||
console.log('icon data missing for: ' + svgFile);
|
||||
}
|
||||
});
|
||||
|
||||
srcData.icons.forEach(i => {
|
||||
if (i.tags.length === 0) {
|
||||
console.log('icon data missing search tags for: ' + i.icons);
|
||||
}
|
||||
|
||||
i.icons.forEach(iconName => {
|
||||
let svgFile = iconName + '.svg';
|
||||
|
||||
let f = svgFiles.find(f => f === svgFile);
|
||||
if (!f) {
|
||||
console.log('icon data contains "' + iconName + '", but the file "' + path.join(SRC_SVG_DIR, svgFile) + '" doesn\'t exist');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const jsonContent = JSON.stringify(srcData);
|
||||
fs.writeFileSync(DST_JSON, jsonContent);
|
||||
|
||||
|
||||
function upFirst(word) {
|
||||
return word[0].toUpperCase() + word.toLowerCase().slice(1);
|
||||
}
|
||||
|
||||
function camelize(text) {
|
||||
let words = text.split(/[-_]/g); // ok one simple regexp.
|
||||
return words[0].toLowerCase() + words.slice(1).map(upFirst).join('');
|
||||
}
|
||||
|
||||
|
||||
const moduleData = {};
|
||||
const esmIndex = [
|
||||
`/* Ionicons, ES Modules */`, ``
|
||||
];
|
||||
const cjsIndex = [
|
||||
`/* Ionicons, CommonJS */`, ``
|
||||
];
|
||||
const dtsIndex = [
|
||||
`/* Ionicons, Types */`, ``
|
||||
];
|
||||
|
||||
svgFiles.forEach(fileName => {
|
||||
// fileName: ios-add-circle-outline.svg
|
||||
|
||||
// ios-add-circle-outline
|
||||
// logo-apple
|
||||
const modeName = fileName.split('.')[0];
|
||||
|
||||
// ['ios', 'add', 'circle', 'outline']
|
||||
// ['logo', 'apple']
|
||||
const modeNameSplit = modeName.split('-');
|
||||
|
||||
// ios, md, logo
|
||||
const mode = modeNameSplit[0];
|
||||
|
||||
const isLogo = (mode === 'logo');
|
||||
|
||||
// add-circle-outline
|
||||
// logo-apple
|
||||
const commonName = isLogo ? modeName : (modeNameSplit.slice(1).join('-'));
|
||||
|
||||
// iosAddCircleOutlineSvg
|
||||
// logoAppleSvg
|
||||
const modeImportName = camelize(modeName) + 'Svg';
|
||||
|
||||
// addCircleOutline
|
||||
// logoApple
|
||||
let exportCommonName = camelize(commonName);
|
||||
if (exportCommonName === 'switch') {
|
||||
exportCommonName = 'switcher';
|
||||
}
|
||||
|
||||
let commonIconData = moduleData[exportCommonName];
|
||||
|
||||
if (!commonIconData) {
|
||||
commonIconData = {
|
||||
fileName,
|
||||
exportCommonName,
|
||||
commonName,
|
||||
modes: {}
|
||||
};
|
||||
moduleData[exportCommonName] = commonIconData;
|
||||
|
||||
esmIndex.push(`import ${exportCommonName} from './imports/${commonName}.mjs';`);
|
||||
}
|
||||
|
||||
commonIconData.modes[mode] = {
|
||||
mode,
|
||||
modeName,
|
||||
modeImportName,
|
||||
fileName
|
||||
};
|
||||
});
|
||||
|
||||
esmIndex.push(``);
|
||||
|
||||
|
||||
const sortedKeys = Object.keys(moduleData).sort();
|
||||
|
||||
sortedKeys.forEach(key => {
|
||||
const d = moduleData[key];
|
||||
const esmFilePath = path.join(DST_ICONS_IMPORTS_DIR, d.commonName + '.mjs');
|
||||
const cjsFilePath = path.join(DST_ICONS_IMPORTS_DIR, d.commonName + '.js');
|
||||
const esm = [];
|
||||
const cjs = [];
|
||||
|
||||
const modes = Object.keys(d.modes).sort();
|
||||
|
||||
if (modes.length > 1) {
|
||||
for (let i = 0; i < modes.length; i++) {
|
||||
const mode = modes[i];
|
||||
esm.push(`import ${mode} from '../../dist/ionicons/svg/${d.modes[mode].fileName}';`);
|
||||
}
|
||||
|
||||
esm.push(``);
|
||||
esm.push(`export default /*#__PURE__*/ {`);
|
||||
|
||||
cjs.push(`module.exports = /*#__PURE__*/ {`);
|
||||
|
||||
dtsIndex.push(`export declare var ${d.exportCommonName}: {`);
|
||||
|
||||
for (let i = 0; i < modes.length; i++) {
|
||||
const mode = modes[i];
|
||||
const suffix = i < modes.length - 1 ? ',' : '';
|
||||
|
||||
esm.push(` ${mode}: ${mode}${suffix}`);
|
||||
|
||||
cjs.push(` ${mode}: require('../../dist/ionicons/svg/${d.modes[mode].fileName}')${suffix}`);
|
||||
|
||||
dtsIndex.push(` ${mode}: string;`);
|
||||
}
|
||||
|
||||
esm.push(`};`);
|
||||
cjs.push(`};`);
|
||||
dtsIndex.push(`};`);
|
||||
|
||||
} else {
|
||||
esm.push(`import icon from '../../dist/ionicons/svg/${d.fileName}'`);
|
||||
esm.push(``);
|
||||
esm.push(`export default /*#__PURE__*/ icon;`);
|
||||
|
||||
cjs.push(`module.exports = /*#__PURE__*/ require('../../dist/ionicons/svg/${d.fileName}');`);
|
||||
|
||||
dtsIndex.push(`export declare var ${d.exportCommonName}: string;`);
|
||||
}
|
||||
|
||||
esmIndex.push(`export { ${d.exportCommonName} }`);
|
||||
|
||||
cjsIndex.push(`exports.${d.exportCommonName} = /*#__PURE__*/ require('./imports/${d.commonName}.js');`);
|
||||
|
||||
fs.writeFileSync(esmFilePath, esm.join('\n'));
|
||||
fs.writeFileSync(cjsFilePath, cjs.join('\n'));
|
||||
});
|
||||
|
||||
fs.writeFileSync(DST_ICONS_ESM, esmIndex.join('\n') + '\n');
|
||||
fs.writeFileSync(DST_ICONS_CJS, cjsIndex.join('\n') + '\n');
|
||||
fs.writeFileSync(DST_ICONS_DTS, dtsIndex.join('\n') + '\n');
|
||||
|
||||
fs.writeFileSync(DST_ICONS_PKGJSON, JSON.stringify({
|
||||
"name": "ionicons/icons",
|
||||
"module": "index.mjs",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"sideEffects": [
|
||||
"imports/"
|
||||
],
|
||||
"private": true
|
||||
}, null, 2));
|
||||
@@ -1,466 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is font utility code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Mozilla Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2009
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# John Daggett <jdaggett@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK ***** */
|
||||
|
||||
# eotlitetool.py - create EOT version of OpenType font for use with IE
|
||||
#
|
||||
# Usage: eotlitetool.py [-o output-filename] font1 [font2 ...]
|
||||
#
|
||||
|
||||
# OpenType file structure
|
||||
# http://www.microsoft.com/typography/otspec/otff.htm
|
||||
#
|
||||
# Types:
|
||||
#
|
||||
# BYTE 8-bit unsigned integer.
|
||||
# CHAR 8-bit signed integer.
|
||||
# USHORT 16-bit unsigned integer.
|
||||
# SHORT 16-bit signed integer.
|
||||
# ULONG 32-bit unsigned integer.
|
||||
# Fixed 32-bit signed fixed-point number (16.16)
|
||||
# LONGDATETIME Date represented in number of seconds since 12:00 midnight, January 1, 1904. The value is represented as a signed 64-bit integer.
|
||||
#
|
||||
# SFNT Header
|
||||
#
|
||||
# Fixed sfnt version // 0x00010000 for version 1.0.
|
||||
# USHORT numTables // Number of tables.
|
||||
# USHORT searchRange // (Maximum power of 2 <= numTables) x 16.
|
||||
# USHORT entrySelector // Log2(maximum power of 2 <= numTables).
|
||||
# USHORT rangeShift // NumTables x 16-searchRange.
|
||||
#
|
||||
# Table Directory
|
||||
#
|
||||
# ULONG tag // 4-byte identifier.
|
||||
# ULONG checkSum // CheckSum for this table.
|
||||
# ULONG offset // Offset from beginning of TrueType font file.
|
||||
# ULONG length // Length of this table.
|
||||
#
|
||||
# OS/2 Table (Version 4)
|
||||
#
|
||||
# USHORT version // 0x0004
|
||||
# SHORT xAvgCharWidth
|
||||
# USHORT usWeightClass
|
||||
# USHORT usWidthClass
|
||||
# USHORT fsType
|
||||
# SHORT ySubscriptXSize
|
||||
# SHORT ySubscriptYSize
|
||||
# SHORT ySubscriptXOffset
|
||||
# SHORT ySubscriptYOffset
|
||||
# SHORT ySuperscriptXSize
|
||||
# SHORT ySuperscriptYSize
|
||||
# SHORT ySuperscriptXOffset
|
||||
# SHORT ySuperscriptYOffset
|
||||
# SHORT yStrikeoutSize
|
||||
# SHORT yStrikeoutPosition
|
||||
# SHORT sFamilyClass
|
||||
# BYTE panose[10]
|
||||
# ULONG ulUnicodeRange1 // Bits 0-31
|
||||
# ULONG ulUnicodeRange2 // Bits 32-63
|
||||
# ULONG ulUnicodeRange3 // Bits 64-95
|
||||
# ULONG ulUnicodeRange4 // Bits 96-127
|
||||
# CHAR achVendID[4]
|
||||
# USHORT fsSelection
|
||||
# USHORT usFirstCharIndex
|
||||
# USHORT usLastCharIndex
|
||||
# SHORT sTypoAscender
|
||||
# SHORT sTypoDescender
|
||||
# SHORT sTypoLineGap
|
||||
# USHORT usWinAscent
|
||||
# USHORT usWinDescent
|
||||
# ULONG ulCodePageRange1 // Bits 0-31
|
||||
# ULONG ulCodePageRange2 // Bits 32-63
|
||||
# SHORT sxHeight
|
||||
# SHORT sCapHeight
|
||||
# USHORT usDefaultChar
|
||||
# USHORT usBreakChar
|
||||
# USHORT usMaxContext
|
||||
#
|
||||
#
|
||||
# The Naming Table is organized as follows:
|
||||
#
|
||||
# [name table header]
|
||||
# [name records]
|
||||
# [string data]
|
||||
#
|
||||
# Name Table Header
|
||||
#
|
||||
# USHORT format // Format selector (=0).
|
||||
# USHORT count // Number of name records.
|
||||
# USHORT stringOffset // Offset to start of string storage (from start of table).
|
||||
#
|
||||
# Name Record
|
||||
#
|
||||
# USHORT platformID // Platform ID.
|
||||
# USHORT encodingID // Platform-specific encoding ID.
|
||||
# USHORT languageID // Language ID.
|
||||
# USHORT nameID // Name ID.
|
||||
# USHORT length // String length (in bytes).
|
||||
# USHORT offset // String offset from start of storage area (in bytes).
|
||||
#
|
||||
# head Table
|
||||
#
|
||||
# Fixed tableVersion // Table version number 0x00010000 for version 1.0.
|
||||
# Fixed fontRevision // Set by font manufacturer.
|
||||
# ULONG checkSumAdjustment // To compute: set it to 0, sum the entire font as ULONG, then store 0xB1B0AFBA - sum.
|
||||
# ULONG magicNumber // Set to 0x5F0F3CF5.
|
||||
# USHORT flags
|
||||
# USHORT unitsPerEm // Valid range is from 16 to 16384. This value should be a power of 2 for fonts that have TrueType outlines.
|
||||
# LONGDATETIME created // Number of seconds since 12:00 midnight, January 1, 1904. 64-bit integer
|
||||
# LONGDATETIME modified // Number of seconds since 12:00 midnight, January 1, 1904. 64-bit integer
|
||||
# SHORT xMin // For all glyph bounding boxes.
|
||||
# SHORT yMin
|
||||
# SHORT xMax
|
||||
# SHORT yMax
|
||||
# USHORT macStyle
|
||||
# USHORT lowestRecPPEM // Smallest readable size in pixels.
|
||||
# SHORT fontDirectionHint
|
||||
# SHORT indexToLocFormat // 0 for short offsets, 1 for long.
|
||||
# SHORT glyphDataFormat // 0 for current format.
|
||||
#
|
||||
#
|
||||
#
|
||||
# Embedded OpenType (EOT) file format
|
||||
# http://www.w3.org/Submission/EOT/
|
||||
#
|
||||
# EOT version 0x00020001
|
||||
#
|
||||
# An EOT font consists of a header with the original OpenType font
|
||||
# appended at the end. Most of the data in the EOT header is simply a
|
||||
# copy of data from specific tables within the font data. The exceptions
|
||||
# are the 'Flags' field and the root string name field. The root string
|
||||
# is a set of names indicating domains for which the font data can be
|
||||
# used. A null root string implies the font data can be used anywhere.
|
||||
# The EOT header is in little-endian byte order but the font data remains
|
||||
# in big-endian order as specified by the OpenType spec.
|
||||
#
|
||||
# Overall structure:
|
||||
#
|
||||
# [EOT header]
|
||||
# [EOT name records]
|
||||
# [font data]
|
||||
#
|
||||
# EOT header
|
||||
#
|
||||
# ULONG eotSize // Total structure length in bytes (including string and font data)
|
||||
# ULONG fontDataSize // Length of the OpenType font (FontData) in bytes
|
||||
# ULONG version // Version number of this format - 0x00020001
|
||||
# ULONG flags // Processing Flags (0 == no special processing)
|
||||
# BYTE fontPANOSE[10] // OS/2 Table panose
|
||||
# BYTE charset // DEFAULT_CHARSET (0x01)
|
||||
# BYTE italic // 0x01 if ITALIC in OS/2 Table fsSelection is set, 0 otherwise
|
||||
# ULONG weight // OS/2 Table usWeightClass
|
||||
# USHORT fsType // OS/2 Table fsType (specifies embedding permission flags)
|
||||
# USHORT magicNumber // Magic number for EOT file - 0x504C.
|
||||
# ULONG unicodeRange1 // OS/2 Table ulUnicodeRange1
|
||||
# ULONG unicodeRange2 // OS/2 Table ulUnicodeRange2
|
||||
# ULONG unicodeRange3 // OS/2 Table ulUnicodeRange3
|
||||
# ULONG unicodeRange4 // OS/2 Table ulUnicodeRange4
|
||||
# ULONG codePageRange1 // OS/2 Table ulCodePageRange1
|
||||
# ULONG codePageRange2 // OS/2 Table ulCodePageRange2
|
||||
# ULONG checkSumAdjustment // head Table CheckSumAdjustment
|
||||
# ULONG reserved[4] // Reserved - must be 0
|
||||
# USHORT padding1 // Padding - must be 0
|
||||
#
|
||||
# EOT name records
|
||||
#
|
||||
# USHORT FamilyNameSize // Font family name size in bytes
|
||||
# BYTE FamilyName[FamilyNameSize] // Font family name (name ID = 1), little-endian UTF-16
|
||||
# USHORT Padding2 // Padding - must be 0
|
||||
#
|
||||
# USHORT StyleNameSize // Style name size in bytes
|
||||
# BYTE StyleName[StyleNameSize] // Style name (name ID = 2), little-endian UTF-16
|
||||
# USHORT Padding3 // Padding - must be 0
|
||||
#
|
||||
# USHORT VersionNameSize // Version name size in bytes
|
||||
# bytes VersionName[VersionNameSize] // Version name (name ID = 5), little-endian UTF-16
|
||||
# USHORT Padding4 // Padding - must be 0
|
||||
#
|
||||
# USHORT FullNameSize // Full name size in bytes
|
||||
# BYTE FullName[FullNameSize] // Full name (name ID = 4), little-endian UTF-16
|
||||
# USHORT Padding5 // Padding - must be 0
|
||||
#
|
||||
# USHORT RootStringSize // Root string size in bytes
|
||||
# BYTE RootString[RootStringSize] // Root string, little-endian UTF-16
|
||||
|
||||
|
||||
|
||||
import optparse
|
||||
import struct
|
||||
|
||||
class FontError(Exception):
|
||||
"""Error related to font handling"""
|
||||
pass
|
||||
|
||||
def multichar(str):
|
||||
vals = struct.unpack('4B', str[:4])
|
||||
return (vals[0] << 24) + (vals[1] << 16) + (vals[2] << 8) + vals[3]
|
||||
|
||||
def multicharval(v):
|
||||
return struct.pack('4B', (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF)
|
||||
|
||||
class EOT:
|
||||
EOT_VERSION = 0x00020001
|
||||
EOT_MAGIC_NUMBER = 0x504c
|
||||
EOT_DEFAULT_CHARSET = 0x01
|
||||
EOT_FAMILY_NAME_INDEX = 0 # order of names in variable portion of EOT header
|
||||
EOT_STYLE_NAME_INDEX = 1
|
||||
EOT_VERSION_NAME_INDEX = 2
|
||||
EOT_FULL_NAME_INDEX = 3
|
||||
EOT_NUM_NAMES = 4
|
||||
|
||||
EOT_HEADER_PACK = '<4L10B2BL2H7L18x'
|
||||
|
||||
class OpenType:
|
||||
SFNT_CFF = multichar('OTTO') # Postscript CFF SFNT version
|
||||
SFNT_TRUE = 0x10000 # Standard TrueType version
|
||||
SFNT_APPLE = multichar('true') # Apple TrueType version
|
||||
|
||||
SFNT_UNPACK = '>I4H'
|
||||
TABLE_DIR_UNPACK = '>4I'
|
||||
|
||||
TABLE_HEAD = multichar('head') # TrueType table tags
|
||||
TABLE_NAME = multichar('name')
|
||||
TABLE_OS2 = multichar('OS/2')
|
||||
TABLE_GLYF = multichar('glyf')
|
||||
TABLE_CFF = multichar('CFF ')
|
||||
|
||||
OS2_FSSELECTION_ITALIC = 0x1
|
||||
OS2_UNPACK = '>4xH2xH22x10B4L4xH14x2L'
|
||||
|
||||
HEAD_UNPACK = '>8xL'
|
||||
|
||||
NAME_RECORD_UNPACK = '>6H'
|
||||
NAME_ID_FAMILY = 1
|
||||
NAME_ID_STYLE = 2
|
||||
NAME_ID_UNIQUE = 3
|
||||
NAME_ID_FULL = 4
|
||||
NAME_ID_VERSION = 5
|
||||
NAME_ID_POSTSCRIPT = 6
|
||||
PLATFORM_ID_UNICODE = 0 # Mac OS uses this typically
|
||||
PLATFORM_ID_MICROSOFT = 3
|
||||
ENCODING_ID_MICROSOFT_UNICODEBMP = 1 # with Microsoft platformID BMP-only Unicode encoding
|
||||
LANG_ID_MICROSOFT_EN_US = 0x0409 # with Microsoft platformID EN US lang code
|
||||
|
||||
def eotname(ttf):
|
||||
i = ttf.rfind('.')
|
||||
if i != -1:
|
||||
ttf = ttf[:i]
|
||||
return ttf + '.eotlite'
|
||||
|
||||
def readfont(f):
|
||||
data = open(f, 'rb').read()
|
||||
return data
|
||||
|
||||
def get_table_directory(data):
|
||||
"""read the SFNT header and table directory"""
|
||||
datalen = len(data)
|
||||
sfntsize = struct.calcsize(OpenType.SFNT_UNPACK)
|
||||
if sfntsize > datalen:
|
||||
raise FontError, 'truncated font data'
|
||||
sfntvers, numTables = struct.unpack(OpenType.SFNT_UNPACK, data[:sfntsize])[:2]
|
||||
if sfntvers != OpenType.SFNT_CFF and sfntvers != OpenType.SFNT_TRUE:
|
||||
raise FontError, 'invalid font type';
|
||||
|
||||
font = {}
|
||||
font['version'] = sfntvers
|
||||
font['numTables'] = numTables
|
||||
|
||||
# create set of offsets, lengths for tables
|
||||
table_dir_size = struct.calcsize(OpenType.TABLE_DIR_UNPACK)
|
||||
if sfntsize + table_dir_size * numTables > datalen:
|
||||
raise FontError, 'truncated font data, table directory extends past end of data'
|
||||
table_dir = {}
|
||||
for i in range(0, numTables):
|
||||
start = sfntsize + i * table_dir_size
|
||||
end = start + table_dir_size
|
||||
tag, check, bongo, dirlen = struct.unpack(OpenType.TABLE_DIR_UNPACK, data[start:end])
|
||||
table_dir[tag] = {'offset': bongo, 'length': dirlen, 'checksum': check}
|
||||
|
||||
font['tableDir'] = table_dir
|
||||
|
||||
return font
|
||||
|
||||
def get_name_records(nametable):
|
||||
"""reads through the name records within name table"""
|
||||
name = {}
|
||||
# read the header
|
||||
headersize = 6
|
||||
count, strOffset = struct.unpack('>2H', nametable[2:6])
|
||||
namerecsize = struct.calcsize(OpenType.NAME_RECORD_UNPACK)
|
||||
if count * namerecsize + headersize > len(nametable):
|
||||
raise FontError, 'names exceed size of name table'
|
||||
name['count'] = count
|
||||
name['strOffset'] = strOffset
|
||||
|
||||
# read through the name records
|
||||
namerecs = {}
|
||||
for i in range(0, count):
|
||||
start = headersize + i * namerecsize
|
||||
end = start + namerecsize
|
||||
platformID, encodingID, languageID, nameID, namelen, offset = struct.unpack(OpenType.NAME_RECORD_UNPACK, nametable[start:end])
|
||||
if platformID != OpenType.PLATFORM_ID_MICROSOFT or \
|
||||
encodingID != OpenType.ENCODING_ID_MICROSOFT_UNICODEBMP or \
|
||||
languageID != OpenType.LANG_ID_MICROSOFT_EN_US:
|
||||
continue
|
||||
namerecs[nameID] = {'offset': offset, 'length': namelen}
|
||||
|
||||
name['namerecords'] = namerecs
|
||||
return name
|
||||
|
||||
def make_eot_name_headers(fontdata, nameTableDir):
|
||||
"""extracts names from the name table and generates the names header portion of the EOT header"""
|
||||
nameoffset = nameTableDir['offset']
|
||||
namelen = nameTableDir['length']
|
||||
name = get_name_records(fontdata[nameoffset : nameoffset + namelen])
|
||||
namestroffset = name['strOffset']
|
||||
namerecs = name['namerecords']
|
||||
|
||||
eotnames = (OpenType.NAME_ID_FAMILY, OpenType.NAME_ID_STYLE, OpenType.NAME_ID_VERSION, OpenType.NAME_ID_FULL)
|
||||
nameheaders = []
|
||||
for nameid in eotnames:
|
||||
if nameid in namerecs:
|
||||
namerecord = namerecs[nameid]
|
||||
noffset = namerecord['offset']
|
||||
nlen = namerecord['length']
|
||||
nformat = '%dH' % (nlen / 2) # length is in number of bytes
|
||||
start = nameoffset + namestroffset + noffset
|
||||
end = start + nlen
|
||||
nstr = struct.unpack('>' + nformat, fontdata[start:end])
|
||||
nameheaders.append(struct.pack('<H' + nformat + '2x', nlen, *nstr))
|
||||
else:
|
||||
nameheaders.append(struct.pack('4x')) # len = 0, padding = 0
|
||||
|
||||
return ''.join(nameheaders)
|
||||
|
||||
# just return a null-string (len = 0)
|
||||
def make_root_string():
|
||||
return struct.pack('2x')
|
||||
|
||||
def make_eot_header(fontdata):
|
||||
"""given ttf font data produce an EOT header"""
|
||||
fontDataSize = len(fontdata)
|
||||
font = get_table_directory(fontdata)
|
||||
|
||||
# toss out .otf fonts, t2embed library doesn't support these
|
||||
tableDir = font['tableDir']
|
||||
|
||||
# check for required tables
|
||||
required = (OpenType.TABLE_HEAD, OpenType.TABLE_NAME, OpenType.TABLE_OS2)
|
||||
for table in required:
|
||||
if not (table in tableDir):
|
||||
raise FontError, 'missing required table ' + multicharval(table)
|
||||
|
||||
# read name strings
|
||||
|
||||
# pull out data from individual tables to construct fixed header portion
|
||||
# need to calculate eotSize before packing
|
||||
version = EOT.EOT_VERSION
|
||||
flags = 0
|
||||
charset = EOT.EOT_DEFAULT_CHARSET
|
||||
magicNumber = EOT.EOT_MAGIC_NUMBER
|
||||
|
||||
# read values from OS/2 table
|
||||
os2Dir = tableDir[OpenType.TABLE_OS2]
|
||||
os2offset = os2Dir['offset']
|
||||
os2size = struct.calcsize(OpenType.OS2_UNPACK)
|
||||
|
||||
if os2size > os2Dir['length']:
|
||||
raise FontError, 'OS/2 table invalid length'
|
||||
|
||||
os2fields = struct.unpack(OpenType.OS2_UNPACK, fontdata[os2offset : os2offset + os2size])
|
||||
|
||||
panose = []
|
||||
urange = []
|
||||
codepage = []
|
||||
|
||||
weight, fsType = os2fields[:2]
|
||||
panose[:10] = os2fields[2:12]
|
||||
urange[:4] = os2fields[12:16]
|
||||
fsSelection = os2fields[16]
|
||||
codepage[:2] = os2fields[17:19]
|
||||
|
||||
italic = fsSelection & OpenType.OS2_FSSELECTION_ITALIC
|
||||
|
||||
# read in values from head table
|
||||
headDir = tableDir[OpenType.TABLE_HEAD]
|
||||
headoffset = headDir['offset']
|
||||
headsize = struct.calcsize(OpenType.HEAD_UNPACK)
|
||||
|
||||
if headsize > headDir['length']:
|
||||
raise FontError, 'head table invalid length'
|
||||
|
||||
headfields = struct.unpack(OpenType.HEAD_UNPACK, fontdata[headoffset : headoffset + headsize])
|
||||
checkSumAdjustment = headfields[0]
|
||||
|
||||
# make name headers
|
||||
nameheaders = make_eot_name_headers(fontdata, tableDir[OpenType.TABLE_NAME])
|
||||
rootstring = make_root_string()
|
||||
|
||||
# calculate the total eot size
|
||||
eotSize = struct.calcsize(EOT.EOT_HEADER_PACK) + len(nameheaders) + len(rootstring) + fontDataSize
|
||||
fixed = struct.pack(EOT.EOT_HEADER_PACK,
|
||||
*([eotSize, fontDataSize, version, flags] + panose + [charset, italic] +
|
||||
[weight, fsType, magicNumber] + urange + codepage + [checkSumAdjustment]))
|
||||
|
||||
return ''.join((fixed, nameheaders, rootstring))
|
||||
|
||||
|
||||
def write_eot_font(eot, header, data):
|
||||
open(eot,'wb').write(''.join((header, data)))
|
||||
return
|
||||
|
||||
def main():
|
||||
|
||||
# deal with options
|
||||
p = optparse.OptionParser()
|
||||
p.add_option('--output', '-o', default="world")
|
||||
options, args = p.parse_args()
|
||||
|
||||
# iterate over font files
|
||||
for f in args:
|
||||
data = readfont(f)
|
||||
if len(data) == 0:
|
||||
print 'Error reading %s' % f
|
||||
else:
|
||||
eot = eotname(f)
|
||||
header = make_eot_header(data)
|
||||
write_eot_font(eot, header, data)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
# Font generation script from FontCustom
|
||||
# https://github.com/FontCustom/fontcustom/
|
||||
# http://fontcustom.com/
|
||||
|
||||
import fontforge
|
||||
import os, errno
|
||||
import md5
|
||||
import subprocess
|
||||
import tempfile
|
||||
import json
|
||||
import copy
|
||||
|
||||
SCRIPTS_FONT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
INPUT_SVG_DIR = os.path.join(SCRIPTS_FONT_DIR, '..', '..', 'src', 'svg')
|
||||
OUTPUT_FONT_DIR = os.path.join(SCRIPTS_FONT_DIR, '..', '..', 'docs', 'fonts')
|
||||
OUTPUT_IONICONS_FONT_DIR = os.path.join(OUTPUT_FONT_DIR, 'ionicons')
|
||||
MANIFEST_PATH = os.path.join(SCRIPTS_FONT_DIR, '..', 'manifest.json')
|
||||
AUTO_WIDTH = True
|
||||
KERNING = 15
|
||||
|
||||
cp = 0xf100
|
||||
m = md5.new()
|
||||
|
||||
f = fontforge.font()
|
||||
f.encoding = 'UnicodeFull'
|
||||
f.design_size = 16
|
||||
f.em = 512
|
||||
f.ascent = 448
|
||||
f.descent = 64
|
||||
|
||||
manifest_file = open(MANIFEST_PATH, 'r')
|
||||
manifest_data = json.loads(manifest_file.read())
|
||||
manifest_file.close()
|
||||
print "Load Manifest, Icons: %s" % ( len(manifest_data['icons']) )
|
||||
|
||||
try:
|
||||
os.makedirs(OUTPUT_FONT_DIR)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
try:
|
||||
os.makedirs(OUTPUT_IONICONS_FONT_DIR)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
# ensure each icon is actually used in the manifest
|
||||
clean_manifest_data = copy.deepcopy(manifest_data)
|
||||
clean_manifest_data['icons'] = []
|
||||
for ionicon in manifest_data['icons']:
|
||||
svg_path = os.path.join(INPUT_SVG_DIR, '%s.svg' % (ionicon['name']))
|
||||
if os.path.isfile(svg_path):
|
||||
clean_manifest_data['icons'].append({
|
||||
"code": ionicon['code'],
|
||||
"name": ionicon['name']
|
||||
})
|
||||
else:
|
||||
print 'removed from manifest: %s' % (ionicon['name'])
|
||||
|
||||
manifest_data = copy.deepcopy(clean_manifest_data)
|
||||
|
||||
font_name = manifest_data['name']
|
||||
m.update(font_name + ';')
|
||||
m.update(manifest_data['prefix'] + ';')
|
||||
|
||||
for dirname, dirnames, filenames in os.walk(INPUT_SVG_DIR):
|
||||
for filename in filenames:
|
||||
name, ext = os.path.splitext(filename)
|
||||
filePath = os.path.join(dirname, filename)
|
||||
size = os.path.getsize(filePath)
|
||||
|
||||
if ext in ['.svg', '.eps']:
|
||||
|
||||
# see if this file is already in the manifest
|
||||
chr_code = None
|
||||
for ionicon in manifest_data['icons']:
|
||||
if ionicon['name'] == name:
|
||||
chr_code = ionicon['code']
|
||||
break
|
||||
|
||||
if chr_code is None:
|
||||
# this is a new src icon
|
||||
print 'New Icon: \n - %s' % (name)
|
||||
|
||||
while True:
|
||||
chr_code = '0x%x' % (cp)
|
||||
already_exists = False
|
||||
for ionicon in manifest_data['icons']:
|
||||
if ionicon.get('code') == chr_code:
|
||||
already_exists = True
|
||||
cp += 1
|
||||
chr_code = '0x%x' % (cp)
|
||||
continue
|
||||
if not already_exists:
|
||||
break
|
||||
|
||||
print ' - %s' % chr_code
|
||||
manifest_data['icons'].append({
|
||||
'name': name,
|
||||
'code': chr_code
|
||||
})
|
||||
|
||||
if ext in ['.svg']:
|
||||
# hack removal of <switch> </switch> tags
|
||||
svgfile = open(filePath, 'r+')
|
||||
tmpsvgfile = tempfile.NamedTemporaryFile(suffix=ext, delete=False)
|
||||
svgtext = svgfile.read()
|
||||
svgfile.seek(0)
|
||||
|
||||
# replace the <switch> </switch> tags with 'nothing'
|
||||
svgtext = svgtext.replace('<switch>', '')
|
||||
svgtext = svgtext.replace('</switch>', '')
|
||||
|
||||
tmpsvgfile.file.write(svgtext)
|
||||
|
||||
svgfile.close()
|
||||
tmpsvgfile.file.close()
|
||||
|
||||
filePath = tmpsvgfile.name
|
||||
# end hack
|
||||
|
||||
m.update(name + str(size) + ';')
|
||||
glyph = f.createChar( int(chr_code, 16) )
|
||||
glyph.importOutlines(filePath)
|
||||
|
||||
# if we created a temporary file, let's clean it up
|
||||
if tmpsvgfile:
|
||||
os.unlink(tmpsvgfile.name)
|
||||
|
||||
# set glyph size explicitly or automatically depending on autowidth
|
||||
if AUTO_WIDTH:
|
||||
glyph.left_side_bearing = glyph.right_side_bearing = 0
|
||||
glyph.round()
|
||||
|
||||
# resize glyphs if autowidth is enabled
|
||||
if AUTO_WIDTH:
|
||||
f.autoWidth(0, 0, 512)
|
||||
|
||||
fontfile = '%s/ionicons' % (OUTPUT_FONT_DIR)
|
||||
|
||||
f.fontname = font_name
|
||||
f.familyname = font_name
|
||||
f.fullname = font_name
|
||||
|
||||
print 'Generate TTF Font File'
|
||||
f.generate(fontfile + '.ttf')
|
||||
|
||||
print 'Generate SVG Font File'
|
||||
f.generate(fontfile + '.svg')
|
||||
|
||||
# Fix SVG header for webkit
|
||||
# from: https://github.com/fontello/font-builder/blob/master/bin/fontconvert.py
|
||||
svgfile = open(fontfile + '.svg', 'r+')
|
||||
svgtext = svgfile.read()
|
||||
svgfile.seek(0)
|
||||
svgfile.write(svgtext.replace('''<svg>''', '''<svg xmlns="http://www.w3.org/2000/svg">'''))
|
||||
svgfile.close()
|
||||
|
||||
scriptPath = os.path.dirname(os.path.realpath(__file__))
|
||||
try:
|
||||
subprocess.Popen([scriptPath + '/sfnt2woff', fontfile + '.ttf'], stdout=subprocess.PIPE)
|
||||
except OSError:
|
||||
# If the local version of sfnt2woff fails (i.e., on Linux), try to use the
|
||||
# global version. This allows us to avoid forcing OS X users to compile
|
||||
# sfnt2woff from source, simplifying install.
|
||||
subprocess.call(['sfnt2woff', fontfile + '.ttf'])
|
||||
|
||||
# eotlitetool.py script to generate IE7-compatible .eot fonts
|
||||
print 'Generate EOT Font File'
|
||||
subprocess.call('python ' + scriptPath + '/eotlitetool.py ' + fontfile + '.ttf -o ' + fontfile + '.eot', shell=True)
|
||||
subprocess.call('mv ' + fontfile + '.eotlite ' + fontfile + '.eot', shell=True)
|
||||
|
||||
print 'Hint TTF file'
|
||||
subprocess.call('ttfautohint -s -f -n ' + fontfile + '.ttf ' + fontfile + '-hinted.ttf > /dev/null 2>&1 && mv ' + fontfile + '-hinted.ttf ' + fontfile + '.ttf', shell=True)
|
||||
|
||||
print 'Generate WOFF2 Font File'
|
||||
subprocess.call('woff2_compress ' + fontfile + '.ttf', shell=True)
|
||||
|
||||
manifest_data['icons'] = sorted(manifest_data['icons'], key=lambda k: k['name'])
|
||||
|
||||
print "Save Manifest, Icons: %s" % ( len(manifest_data['icons']) )
|
||||
f = open(MANIFEST_PATH, 'w')
|
||||
f.write( json.dumps(manifest_data, indent=2, separators=(',', ': ')) )
|
||||
f.close()
|
||||
@@ -1,295 +0,0 @@
|
||||
from subprocess import call
|
||||
import os, errno
|
||||
import shutil
|
||||
import subprocess
|
||||
import json
|
||||
import codecs
|
||||
from collections import OrderedDict
|
||||
import hashlib
|
||||
|
||||
|
||||
SCRIPTS_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
ROOT_PATH = os.path.join(SCRIPTS_PATH, '..')
|
||||
SRC_PATH = os.path.join(ROOT_PATH, 'src')
|
||||
DIST_PATH = os.path.join(ROOT_PATH, 'dist')
|
||||
SVGO_CONFIG_PATH = os.path.join(ROOT_PATH, '.svgo.yml')
|
||||
INPUT_SVG_DIR = os.path.join(SRC_PATH, 'svg')
|
||||
OUTPUT_SVG_DIR = os.path.join(DIST_PATH, 'svg')
|
||||
DATA_PATH = os.path.join(DIST_PATH, 'data')
|
||||
FONTS_DOCS_PATH = os.path.join(ROOT_PATH, 'docs', 'fonts')
|
||||
CSS_FOLDER_PATH = os.path.join(DIST_PATH, 'css')
|
||||
INPUT_SCSS_FOLDER_PATH = os.path.join(SRC_PATH, 'scss')
|
||||
OUTPUT_SCSS_FOLDER_PATH = os.path.join(DIST_PATH, 'scss')
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
os.makedirs(DIST_PATH)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
try:
|
||||
os.makedirs(OUTPUT_SVG_DIR)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
if requires_update():
|
||||
generate_font_files()
|
||||
|
||||
data = get_build_data()
|
||||
|
||||
rename_svg_glyph_names(data)
|
||||
generate_scss(data)
|
||||
generate_svg_files()
|
||||
generate_cheatsheet(data)
|
||||
|
||||
if requires_update():
|
||||
generate_docs_designer_pack_zip()
|
||||
|
||||
|
||||
def requires_update():
|
||||
m = hashlib.sha256()
|
||||
|
||||
for filename in os.listdir(INPUT_SVG_DIR):
|
||||
filename = os.path.join(INPUT_SVG_DIR, filename)
|
||||
with open(filename, 'rb') as inputfile:
|
||||
data = inputfile.read()
|
||||
m.update(data)
|
||||
|
||||
current_hash = m.hexdigest()
|
||||
|
||||
manifest_path = os.path.join(SCRIPTS_PATH, 'manifest.json')
|
||||
|
||||
f = codecs.open(manifest_path, 'r', 'utf-8')
|
||||
data = json.loads(f.read())
|
||||
last_hash = data.get('hash')
|
||||
f.close()
|
||||
|
||||
fonts_folder_exists = os.path.exists(FONTS_DOCS_PATH)
|
||||
|
||||
print 'old hash: %s' % (last_hash)
|
||||
print 'new hash: %s' % (current_hash)
|
||||
print 'fonts folder exists: %s' % (fonts_folder_exists)
|
||||
|
||||
if last_hash != current_hash or (not fonts_folder_exists):
|
||||
print "Generating fonts..."
|
||||
data['hash'] = current_hash
|
||||
|
||||
with open(manifest_path, 'w') as outfile:
|
||||
json.dump(data, outfile)
|
||||
|
||||
return True
|
||||
|
||||
print "SVGs unchanged, skip generating fonts"
|
||||
return False
|
||||
|
||||
|
||||
def generate_font_files():
|
||||
print "Generate Fonts"
|
||||
cmd = "fontforge -script %s/font/generate_font.py" % (SCRIPTS_PATH)
|
||||
call(cmd, shell=True)
|
||||
|
||||
|
||||
def generate_docs_designer_pack_zip():
|
||||
print "Generate Docs Designer Pack Zip"
|
||||
cmd = "node %s/build-zip.js" % (SCRIPTS_PATH)
|
||||
call(cmd, shell=True)
|
||||
|
||||
|
||||
def generate_svg_files():
|
||||
print "Generate SVG Files"
|
||||
shutil.rmtree(OUTPUT_SVG_DIR)
|
||||
if not os.path.exists(OUTPUT_SVG_DIR):
|
||||
os.makedirs(OUTPUT_SVG_DIR)
|
||||
|
||||
cmd = 'svgo -f %s -o %s --config=%s' % (INPUT_SVG_DIR, OUTPUT_SVG_DIR, SVGO_CONFIG_PATH)
|
||||
cwd = os.path.join(os.path.dirname(__file__), '../node_modules/svgo/bin')
|
||||
subprocess.call([cmd], shell=True, cwd=cwd)
|
||||
|
||||
for filename in os.listdir(OUTPUT_SVG_DIR):
|
||||
svg_path = os.path.join(OUTPUT_SVG_DIR, filename)
|
||||
svg_read_file = open(svg_path, 'r')
|
||||
svg_text = svg_read_file.read()
|
||||
|
||||
svg_text = svg_text.replace(' width="512px"', '')
|
||||
svg_text = svg_text.replace(' width="512"', '')
|
||||
svg_text = svg_text.replace(' height="512px"', '')
|
||||
svg_text = svg_text.replace(' height="512"', '')
|
||||
|
||||
if 'viewBox="0 0 512 512"' not in svg_text:
|
||||
svg_text = svg_text.replace('xmlns="http://www.w3.org/2000/svg"', 'xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"')
|
||||
|
||||
svg_write_file = open(svg_path, 'w')
|
||||
svg_write_file.write(svg_text)
|
||||
svg_write_file.close()
|
||||
|
||||
|
||||
def rename_svg_glyph_names(data):
|
||||
# hacky and slow (but safe) way to rename glyph-name attributes
|
||||
svg_path = os.path.join(FONTS_DOCS_PATH, 'ionicons.svg')
|
||||
svg_file = codecs.open(svg_path, 'r+', 'utf-8')
|
||||
svg_text = svg_file.read()
|
||||
svg_file.seek(0)
|
||||
|
||||
for ionicon in data['icons']:
|
||||
# uniF2CA
|
||||
org_name = 'uni%s' % (ionicon['code'].replace('0x', '').upper())
|
||||
ion_name = 'ion-%s' % (ionicon['name'])
|
||||
svg_text = svg_text.replace(org_name, ion_name)
|
||||
|
||||
svg_file.write(svg_text)
|
||||
svg_file.close()
|
||||
|
||||
|
||||
def generate_scss(data):
|
||||
try:
|
||||
os.makedirs(OUTPUT_SCSS_FOLDER_PATH)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
print "Generate SCSS"
|
||||
font_name = data['name']
|
||||
font_version = data['version']
|
||||
css_prefix = data['prefix']
|
||||
|
||||
ionicons_core_file_path_input = os.path.join(INPUT_SCSS_FOLDER_PATH, 'ionicons-core.scss')
|
||||
ionicons_core_file_path_output = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons-core.scss')
|
||||
shutil.copyfile(ionicons_core_file_path_input, ionicons_core_file_path_output)
|
||||
|
||||
ionicons_scc_file_path_input = os.path.join(INPUT_SCSS_FOLDER_PATH, 'ionicons.scss')
|
||||
ionicons_scc_file_path_output = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons.scss')
|
||||
shutil.copyfile(ionicons_scc_file_path_input, ionicons_scc_file_path_output)
|
||||
|
||||
variables_file_path_input = os.path.join(INPUT_SCSS_FOLDER_PATH, 'ionicons-variables.scss')
|
||||
variables_file_path = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons-variables.scss')
|
||||
shutil.copyfile(variables_file_path_input, variables_file_path)
|
||||
|
||||
common_file_path = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons-common.scss')
|
||||
icons_file_path = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons-icons.scss')
|
||||
|
||||
|
||||
d = []
|
||||
d.append('@charset "UTF-8";')
|
||||
d.append('// Ionicons Variables')
|
||||
d.append('// --------------------------\n')
|
||||
d.append('$ionicons-font-path: "../fonts" !default;')
|
||||
d.append('$ionicons-font-family: "%s" !default;' % (font_name) )
|
||||
d.append('$ionicons-version: "%s" !default;' % (font_version) )
|
||||
|
||||
f = codecs.open(variables_file_path, 'w', 'utf-8')
|
||||
f.write( u'\n'.join(d) )
|
||||
f.close()
|
||||
|
||||
d = []
|
||||
d.append('@charset "UTF-8";')
|
||||
d.append('// Ionicons Common CSS')
|
||||
d.append('// --------------------------\n')
|
||||
|
||||
group = [ '.%s' % (data['name'].lower()) ]
|
||||
for ionicon in data['icons']:
|
||||
group.append('.%s%s:before' % (css_prefix, ionicon['name']) )
|
||||
|
||||
d.append( ',\n'.join(group) )
|
||||
|
||||
d.append('{')
|
||||
d.append(' @extend .ion;')
|
||||
d.append('}')
|
||||
|
||||
f = codecs.open(common_file_path, 'w', 'utf-8')
|
||||
f.write( '\n'.join(d) )
|
||||
f.close()
|
||||
|
||||
d = []
|
||||
d.append('@charset "UTF-8";')
|
||||
d.append('// Ionicons Icon Font CSS')
|
||||
d.append('// --------------------------\n')
|
||||
|
||||
for ionicon in data['icons']:
|
||||
chr_code = ionicon['code'].replace('0x', '\\')
|
||||
d.append('.%s%s:before { content: "%s"; }' % (css_prefix, ionicon['name'], chr_code) )
|
||||
|
||||
f = codecs.open(icons_file_path, 'w', 'utf-8')
|
||||
f.write( '\n'.join(d) )
|
||||
f.close()
|
||||
|
||||
|
||||
def generate_cheatsheet(data):
|
||||
print "Generate Cheatsheet"
|
||||
|
||||
cheatsheet_file_path = os.path.join(DIST_PATH, 'cheatsheet.html')
|
||||
template_path = os.path.join(SRC_PATH, 'cheatsheet', 'template.html')
|
||||
icon_row_path = os.path.join(SRC_PATH, 'cheatsheet', 'icon-row.html')
|
||||
|
||||
f = codecs.open(template_path, 'r', 'utf-8')
|
||||
template_html = f.read()
|
||||
f.close()
|
||||
|
||||
f = codecs.open(icon_row_path, 'r', 'utf-8')
|
||||
icon_row_template = f.read()
|
||||
f.close()
|
||||
|
||||
content = []
|
||||
icon_names = []
|
||||
|
||||
for ionicon in data['icons']:
|
||||
name = ""
|
||||
if ionicon['name'].startswith('ios-'):
|
||||
name = ionicon['name'][4:]
|
||||
|
||||
elif ionicon['name'].startswith('md-'):
|
||||
name = ionicon['name'][3:]
|
||||
|
||||
if name not in icon_names:
|
||||
icon_names.append(name)
|
||||
|
||||
icon_names.sort()
|
||||
|
||||
for icon_name in icon_names:
|
||||
if icon_name != "":
|
||||
item_row = icon_row_template.replace('{{name}}', icon_name)
|
||||
item_row = item_row.replace('{{prefix}}', data['prefix'])
|
||||
|
||||
content.append(item_row)
|
||||
|
||||
template_html = template_html.replace("{{title}}", 'Cheatsheet')
|
||||
template_html = template_html.replace("{{font_name}}", data["name"])
|
||||
template_html = template_html.replace("{{font_version}}", data["version"])
|
||||
template_html = template_html.replace("{{icon_count}}", str(len(icon_names)) )
|
||||
template_html = template_html.replace("{{content}}", '\n'.join(content) )
|
||||
|
||||
f = codecs.open(cheatsheet_file_path, 'w', 'utf-8')
|
||||
f.write(template_html)
|
||||
f.close()
|
||||
|
||||
|
||||
def get_build_data():
|
||||
manifest_path = os.path.join(SCRIPTS_PATH, 'manifest.json')
|
||||
|
||||
f = codecs.open(manifest_path, 'r', 'utf-8')
|
||||
data = json.loads(f.read())
|
||||
f.close()
|
||||
|
||||
package_json_path = os.path.join(ROOT_PATH, 'package.json')
|
||||
f = codecs.open(package_json_path, 'r', 'utf-8')
|
||||
package_data = json.loads(f.read())
|
||||
f.close()
|
||||
|
||||
data['version'] = package_data['version']
|
||||
|
||||
return data
|
||||
|
||||
|
||||
def get_tag_data():
|
||||
tag_data_path = os.path.join(SCRIPTS_PATH, 'tags.json')
|
||||
|
||||
f = codecs.open(tag_data_path, 'r', 'utf-8')
|
||||
data = json.loads(f.read())
|
||||
f.close()
|
||||
return data
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -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);
|
||||
@@ -1,34 +1,41 @@
|
||||
# Build
|
||||
# Development and Build Scripts
|
||||
|
||||
## Updating Icons
|
||||
|
||||
The `src/svg` directory is the single source of truth for svgs. They should not already be optimized and can be the original svg export straight out of an svg editor. A build step before releasing will optimize the source svgs (remove comments, reduce the size, etc) and ensure they'll work within `ion-icon`.
|
||||
|
||||
|
||||
## Build Locally
|
||||
|
||||
After an svg has been updated, added or deleted from the `src/svg` directory, run:
|
||||
|
||||
npm run build
|
||||
|
||||
|
||||
# Data
|
||||
|
||||
Update the src/data.json file with each icon and search tags.
|
||||
The build command will optimize all of the icons and generate the files to be distributed. After the build command, all of the optimized svgs are saved in `dist/ionicons/svg`. Additionally the `dist` directory contains the distribution files for the `ion-icon` web component.
|
||||
|
||||
|
||||
# Cheatsheet
|
||||
## Svg Symbols Cheatsheet
|
||||
|
||||
docs/cheatsheet.html
|
||||
After a build, a new `www/cheatsheet.html` file will be created. This version uses svg symbols rather than `ion-icon`.
|
||||
|
||||
|
||||
## Install
|
||||
## ion-icon Component Preview
|
||||
|
||||
This repo already comes with all the files built and ready to go, but can also build the fonts from the source. Requires Python, FontForge, WOFF2, SVGO and Sass:
|
||||
To see the `ion-icon` component in action, run:
|
||||
|
||||
1) Install FontForge, which is the program that creates the font files from the SVG files:
|
||||
npm start
|
||||
|
||||
$ brew install fontforge ttfautohint
|
||||
|
||||
2) Install Google's WOFF2 font compressor
|
||||
## Release Steps
|
||||
|
||||
https://github.com/google/woff2
|
||||
npm run release.prepare
|
||||
|
||||
3) Add or subtract files from the `src/` folder you'd like to be apart of the build.
|
||||
The release script will ask what version to use. After the script completes, double check the `www/cheatsheet.html` to ensure everything is good to go.
|
||||
|
||||
4) Modify any settings in the `scripts/manifest.json` file. You can change the name of the font-family and CSS classname prefix.
|
||||
Next, update `CHANGELOG.md`, then commit and push your changes Github.
|
||||
|
||||
5) Run the build command:
|
||||
Next run:
|
||||
|
||||
npm run build
|
||||
npm run release
|
||||
|
||||
Triple check the version number is correct, and choose which tag this should be released as. If it's a pre-release, it should be `dev`.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
"module": "commonjs",
|
||||
"target": "es2017"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<tr class="mode-row">
|
||||
<td>
|
||||
{{name}}
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<ion-icon name="ios-{{name}}" lazy></ion-icon>
|
||||
</div>
|
||||
<td class="align-center">
|
||||
<ion-icon name="md-{{name}}" lazy></ion-icon>
|
||||
</div>
|
||||
</tr>
|
||||
@@ -1,143 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{font_name}} {{title}}</title>
|
||||
<style>
|
||||
* {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Eina Bold */
|
||||
@font-face {
|
||||
font-family: 'Eina';
|
||||
src: url('../assets/fonts/34E6DB_F_0.eot');
|
||||
src: url('../assets/fonts/34E6DB_F_0.eot?#iefix') format('embedded-opentype'),
|
||||
url('../assets/fonts/34E6DB_F_0.woff2') format('woff2'),
|
||||
url('../assets/fonts/34E6DB_F_0.woff') format('woff'),
|
||||
url('../assets/fonts/34E6DB_F_0.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
unicode-range: U+000-5FF;
|
||||
}
|
||||
|
||||
/* Eina Regular */
|
||||
@font-face {
|
||||
font-family: 'Eina';
|
||||
src: url('../assets/fonts/34E6DB_D_0.eot');
|
||||
src: url('../assets/fonts/34E6DB_D_0.eot?#iefix') format('embedded-opentype'),
|
||||
url('../assets/fonts/34E6DB_D_0.woff2') format('woff2'),
|
||||
url('../assets/fonts/34E6DB_D_0.woff') format('woff'),
|
||||
url('../assets/fonts/34E6DB_D_0.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
unicode-range: U+000-5FF;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: #444;
|
||||
font: 16px/1.5 'Eina', "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: #888;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover, a:focus { color: #000; }
|
||||
|
||||
header {
|
||||
overflow: hidden;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
float: left;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
main {
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
tr {
|
||||
padding: 0 0 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 4px;
|
||||
width: 33%;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
ion-icon {
|
||||
display: block;
|
||||
margin: 5px 0;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
footer {
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.heart {
|
||||
display: inline-block;
|
||||
padding-top: 4px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: red;
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script src="ionicons.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<header>
|
||||
<h1>{{font_name}} {{title}}, {{icon_count}} icons</h1>
|
||||
</header>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Icon Name
|
||||
</th>
|
||||
<th>
|
||||
iOS
|
||||
</th>
|
||||
<th>
|
||||
Material Design
|
||||
</th>
|
||||
</tr>
|
||||
{{content}}
|
||||
</table>
|
||||
<footer>
|
||||
Made with <ion-icon class="heart" name="md-heart"></ion-icon> by the <a href="http://ionicframework.com/">Ionic Team</a>
|
||||
</footer>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,127 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/**
|
||||
* This is an autogenerated file created by the Stencil compiler.
|
||||
* It contains typing information for all components that exist in this project.
|
||||
*/
|
||||
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
|
||||
export namespace Components {
|
||||
interface IonIcon {
|
||||
/**
|
||||
* The color to use for the background of the item.
|
||||
*/
|
||||
"color"?: string;
|
||||
/**
|
||||
* Specifies whether the icon should horizontally flip when `dir` is `"rtl"`.
|
||||
*/
|
||||
"flipRtl"?: boolean;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
"icon"?: any;
|
||||
/**
|
||||
* Specifies which icon to use on `ios` mode.
|
||||
*/
|
||||
"ios"?: string;
|
||||
/**
|
||||
* If enabled, ion-icon will be loaded lazily when it's visible in the viewport. Default, `false`.
|
||||
*/
|
||||
"lazy": boolean;
|
||||
/**
|
||||
* Specifies which icon to use on `md` mode.
|
||||
*/
|
||||
"md"?: string;
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
*/
|
||||
"mode": string;
|
||||
/**
|
||||
* 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"`.
|
||||
*/
|
||||
"size"?: string;
|
||||
/**
|
||||
* Specifies the exact `src` of an SVG file to use.
|
||||
*/
|
||||
"src"?: string;
|
||||
}
|
||||
}
|
||||
declare global {
|
||||
interface HTMLIonIconElement extends Components.IonIcon, HTMLStencilElement {
|
||||
}
|
||||
var HTMLIonIconElement: {
|
||||
prototype: HTMLIonIconElement;
|
||||
new (): HTMLIonIconElement;
|
||||
};
|
||||
interface HTMLElementTagNameMap {
|
||||
"ion-icon": HTMLIonIconElement;
|
||||
}
|
||||
}
|
||||
declare namespace LocalJSX {
|
||||
interface IonIcon {
|
||||
/**
|
||||
* The color to use for the background of the item.
|
||||
*/
|
||||
"color"?: string;
|
||||
/**
|
||||
* Specifies whether the icon should horizontally flip when `dir` is `"rtl"`.
|
||||
*/
|
||||
"flipRtl"?: boolean;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
"icon"?: any;
|
||||
/**
|
||||
* Specifies which icon to use on `ios` mode.
|
||||
*/
|
||||
"ios"?: string;
|
||||
/**
|
||||
* If enabled, ion-icon will be loaded lazily when it's visible in the viewport. Default, `false`.
|
||||
*/
|
||||
"lazy"?: boolean;
|
||||
/**
|
||||
* Specifies which icon to use on `md` mode.
|
||||
*/
|
||||
"md"?: string;
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
*/
|
||||
"mode"?: string;
|
||||
/**
|
||||
* 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"`.
|
||||
*/
|
||||
"size"?: string;
|
||||
/**
|
||||
* Specifies the exact `src` of an SVG file to use.
|
||||
*/
|
||||
"src"?: string;
|
||||
}
|
||||
interface IntrinsicElements {
|
||||
"ion-icon": IonIcon;
|
||||
}
|
||||
}
|
||||
export { LocalJSX as JSX };
|
||||
declare module "@stencil/core" {
|
||||
export namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
"ion-icon": LocalJSX.IonIcon & JSXBase.HTMLAttributes<HTMLIonIconElement>;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/**
|
||||
* This is an autogenerated file created by the Stencil compiler.
|
||||
* It contains typing information for all components that exist in this project.
|
||||
*/
|
||||
|
||||
|
||||
import { HTMLStencilElement, JSXBase } from '@stencil/core/internal';
|
||||
|
||||
|
||||
export namespace Components {
|
||||
interface IonIcon {
|
||||
/**
|
||||
* Specifies the label to use for accessibility. Defaults to the icon name.
|
||||
*/
|
||||
'ariaLabel'?: string;
|
||||
/**
|
||||
* The color to use for the background of the item.
|
||||
*/
|
||||
'color'?: string;
|
||||
/**
|
||||
* Specifies whether the icon should horizontally flip when `dir` is `"rtl"`.
|
||||
*/
|
||||
'flipRtl'?: boolean;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'icon'?: any;
|
||||
/**
|
||||
* Specifies which icon to use on `ios` mode.
|
||||
*/
|
||||
'ios'?: string;
|
||||
/**
|
||||
* If enabled, ion-icon will be loaded lazily when it's visible in the viewport. Default, `false`.
|
||||
*/
|
||||
'lazy': boolean;
|
||||
/**
|
||||
* Specifies which icon to use on `md` mode.
|
||||
*/
|
||||
'md'?: string;
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
*/
|
||||
'mode'?: "ios" | "md";
|
||||
/**
|
||||
* Specifies which icon to use from the built-in set of icons.
|
||||
*/
|
||||
'name'?: string;
|
||||
/**
|
||||
* The size of the icon. Available options are: `"small"` and `"large"`.
|
||||
*/
|
||||
'size'?: string;
|
||||
/**
|
||||
* Specifies the exact `src` of an SVG file to use.
|
||||
*/
|
||||
'src'?: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
|
||||
interface HTMLIonIconElement extends Components.IonIcon, HTMLStencilElement {}
|
||||
var HTMLIonIconElement: {
|
||||
prototype: HTMLIonIconElement;
|
||||
new (): HTMLIonIconElement;
|
||||
};
|
||||
interface HTMLElementTagNameMap {
|
||||
'ion-icon': HTMLIonIconElement;
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace LocalJSX {
|
||||
interface IonIcon extends JSXBase.HTMLAttributes<HTMLIonIconElement> {
|
||||
/**
|
||||
* Specifies the label to use for accessibility. Defaults to the icon name.
|
||||
*/
|
||||
'ariaLabel'?: string;
|
||||
/**
|
||||
* The color to use for the background of the item.
|
||||
*/
|
||||
'color'?: string;
|
||||
/**
|
||||
* Specifies whether the icon should horizontally flip when `dir` is `"rtl"`.
|
||||
*/
|
||||
'flipRtl'?: boolean;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'icon'?: any;
|
||||
/**
|
||||
* Specifies which icon to use on `ios` mode.
|
||||
*/
|
||||
'ios'?: string;
|
||||
/**
|
||||
* If enabled, ion-icon will be loaded lazily when it's visible in the viewport. Default, `false`.
|
||||
*/
|
||||
'lazy'?: boolean;
|
||||
/**
|
||||
* Specifies which icon to use on `md` mode.
|
||||
*/
|
||||
'md'?: string;
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
*/
|
||||
'mode'?: "ios" | "md";
|
||||
/**
|
||||
* Specifies which icon to use from the built-in set of icons.
|
||||
*/
|
||||
'name'?: string;
|
||||
/**
|
||||
* The size of the icon. Available options are: `"small"` and `"large"`.
|
||||
*/
|
||||
'size'?: string;
|
||||
/**
|
||||
* Specifies the exact `src` of an SVG file to use.
|
||||
*/
|
||||
'src'?: string;
|
||||
}
|
||||
|
||||
interface IntrinsicElements {
|
||||
'ion-icon': IonIcon;
|
||||
}
|
||||
}
|
||||
|
||||
export { LocalJSX as JSX };
|
||||
|
||||
|
||||
declare module "@stencil/core" {
|
||||
export namespace JSX {
|
||||
interface IntrinsicElements extends LocalJSX.IntrinsicElements {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import { setMode } from '@stencil/core';
|
||||
|
||||
export default () => {
|
||||
setMode((el: any) => el.tagName === 'ION-ICON' ? el.mode || el.getAttribute('mode') : null);
|
||||
};
|
||||
@@ -11,7 +11,21 @@
|
||||
box-sizing: content-box !important;
|
||||
}
|
||||
|
||||
:host .ionicon {
|
||||
stroke: currentColor;
|
||||
}
|
||||
|
||||
.ionicon-fill-none {
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.ionicon-stroke-width {
|
||||
stroke-width: 32px;
|
||||
stroke-width: var(--ionicon-stroke-width, 32px);
|
||||
}
|
||||
|
||||
.icon-inner,
|
||||
.ionicon,
|
||||
svg {
|
||||
display: block;
|
||||
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
import { Build, Component, Element, Host, Prop, State, Watch, getMode, h } from '@stencil/core';
|
||||
import { getSvgContent } from './request';
|
||||
import { getName, getUrl } from './utils';
|
||||
import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';
|
||||
import { getSvgContent, ioniconContent } from './request';
|
||||
import { getName, getUrl, inheritAttributes, isRTL } from './utils';
|
||||
|
||||
let parser: DOMParser;
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-icon',
|
||||
assetsDir: 'svg',
|
||||
assetsDirs: ['svg'],
|
||||
styleUrl: 'icon.css',
|
||||
shadow: true
|
||||
shadow: true,
|
||||
})
|
||||
export class Icon {
|
||||
private io?: IntersectionObserver;
|
||||
mode = getIonMode(this);
|
||||
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.
|
||||
*/
|
||||
@Prop({ mutable: true }) mode = getIonMode();
|
||||
|
||||
/**
|
||||
* The color to use for the background of the item.
|
||||
*/
|
||||
@Prop() color?: string;
|
||||
|
||||
/**
|
||||
* Specifies the label to use for accessibility. Defaults to the icon name.
|
||||
*/
|
||||
@Prop({ mutable: true, reflectToAttr: true }) ariaLabel?: string;
|
||||
|
||||
/**
|
||||
* Specifies which icon to use on `ios` mode.
|
||||
*/
|
||||
@@ -49,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.
|
||||
@@ -75,6 +75,18 @@ 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;
|
||||
|
||||
componentWillLoad() {
|
||||
this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
// purposely do not return the promise here because loading
|
||||
// the svg file should not hold up loading the app
|
||||
@@ -94,78 +106,121 @@ 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
|
||||
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) {
|
||||
getSvgContent(url)
|
||||
.then(svgContent => this.svgContent = svgContent);
|
||||
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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.ariaLabel) {
|
||||
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('ios-', '')
|
||||
.replace('md-', '')
|
||||
.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.flipRtl !== false);
|
||||
const flipRtl =
|
||||
this.flipRtl ||
|
||||
(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 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
|
||||
aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null}
|
||||
role="img"
|
||||
class={{
|
||||
[mode]: true,
|
||||
...createColorClasses(this.color),
|
||||
[`icon-${this.size}`]: !!this.size,
|
||||
'flip-rtl': !!flipRtl && isRTL(el),
|
||||
}}
|
||||
{...inheritedAttributes}
|
||||
>
|
||||
{Build.isBrowser && this.svgContent ? (
|
||||
<div class="icon-inner" innerHTML={this.svgContent}></div>
|
||||
) : (
|
||||
<div class="icon-inner"></div>
|
||||
)}
|
||||
</Host>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getIonMode = (ref: any) => {
|
||||
return getMode(ref) || 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,19 +7,19 @@
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Attribute | Description | Type | Default |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | ----------- |
|
||||
| `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. | `"ios" \| "md"` | `undefined` |
|
||||
| `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 |
|
||||
| ---------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | -------------- |
|
||||
| `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,25 +1,34 @@
|
||||
import { validateContent } from './validate';
|
||||
|
||||
export const ioniconContent = new Map<string, string>();
|
||||
const requests = new Map<string, Promise<any>>();
|
||||
|
||||
const requests = new Map<string, Promise<string>>();
|
||||
|
||||
|
||||
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) {
|
||||
// we don't already have a request
|
||||
req = fetch(url).then(rsp => {
|
||||
if (rsp.status <= 299) {
|
||||
return rsp.text();
|
||||
}
|
||||
return Promise.resolve(null);
|
||||
if (typeof fetch !== 'undefined' && typeof document !== 'undefined') {
|
||||
// we don't already have a request
|
||||
req = fetch(url).then((rsp) => {
|
||||
if (rsp.ok) {
|
||||
return rsp.text().then((svgContent) => {
|
||||
if (svgContent && sanitize !== false) {
|
||||
svgContent = validateContent(svgContent);
|
||||
}
|
||||
ioniconContent.set(url, svgContent || '');
|
||||
});
|
||||
}
|
||||
ioniconContent.set(url, '');
|
||||
});
|
||||
|
||||
}).then(svgContent => validateContent(svgContent));
|
||||
|
||||
// cache for the same requests
|
||||
requests.set(url, req);
|
||||
// cache for the same requests
|
||||
requests.set(url, req);
|
||||
} else {
|
||||
// set to empty for ssr scenarios and resolve promise
|
||||
ioniconContent.set(url, '');
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
return req;
|
||||
|
||||
@@ -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`);
|
||||
});
|
||||
});
|
||||
|
After Width: | Height: | Size: 325 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 301 KiB |
@@ -0,0 +1,138 @@
|
||||
import { newSpecPage } from '@stencil/core/testing';
|
||||
import { Icon } from '../icon';
|
||||
|
||||
describe('icon', () => {
|
||||
it('renders', async () => {
|
||||
const { root } = await newSpecPage({
|
||||
components: [Icon],
|
||||
html: '<ion-icon></ion-icon>',
|
||||
});
|
||||
expect(root).toEqualHtml(`
|
||||
<ion-icon class="md" role="img">
|
||||
<mock:shadow-root>
|
||||
<div class="icon-inner"></div>
|
||||
</mock:shadow-root>
|
||||
</ion-icon>
|
||||
`);
|
||||
});
|
||||
|
||||
it('renders aria-hidden and no aria-label', async () => {
|
||||
const { root } = await newSpecPage({
|
||||
components: [Icon],
|
||||
html: `<ion-icon aria-hidden="true"></ion-icon>`,
|
||||
});
|
||||
expect(root).toEqualHtml(`
|
||||
<ion-icon class="md" role="img" aria-hidden="true">
|
||||
<mock:shadow-root>
|
||||
<div class="icon-inner"></div>
|
||||
</mock:shadow-root>
|
||||
</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>
|
||||
`);
|
||||
});
|
||||
});
|
||||
@@ -11,7 +11,7 @@ describe('getUrl', () => {
|
||||
|
||||
it('use icon prop, as name', () => {
|
||||
i.icon = 'some-name';
|
||||
expect(getUrl(i)).toBe('/svg/md-some-name.svg');
|
||||
expect(getUrl(i)).toBe('/svg/some-name.svg');
|
||||
});
|
||||
|
||||
it('use icon prop, as url', () => {
|
||||
@@ -19,60 +19,9 @@ describe('getUrl', () => {
|
||||
expect(getUrl(i)).toBe('./some.svg');
|
||||
});
|
||||
|
||||
it('use icon prop, as an object of modes, md default', () => {
|
||||
i.icon = {
|
||||
md: './md-imported.svg',
|
||||
ios: './ios-imported.svg'
|
||||
};
|
||||
expect(getUrl(i)).toBe('./md-imported.svg');
|
||||
});
|
||||
|
||||
it('use icon prop, as an object of modes, md mode', () => {
|
||||
i.mode = 'md';
|
||||
i.icon = {
|
||||
md: './md-imported.svg',
|
||||
ios: './ios-imported.svg'
|
||||
};
|
||||
expect(getUrl(i)).toBe('./md-imported.svg');
|
||||
});
|
||||
|
||||
it('use icon prop, as an object of modes, ios mode', () => {
|
||||
i.mode = 'ios';
|
||||
i.icon = {
|
||||
md: './md-imported.svg',
|
||||
ios: './ios-imported.svg'
|
||||
};
|
||||
expect(getUrl(i)).toBe('./ios-imported.svg');
|
||||
});
|
||||
|
||||
it('use name prop, set ios mode', () => {
|
||||
it('use name prop', () => {
|
||||
i.name = 'some-name';
|
||||
i.mode = 'ios';
|
||||
expect(getUrl(i)).toBe('/svg/ios-some-name.svg');
|
||||
});
|
||||
|
||||
it('use name prop, set md mode', () => {
|
||||
i.name = 'some-name';
|
||||
i.mode = 'md';
|
||||
expect(getUrl(i)).toBe('/svg/md-some-name.svg');
|
||||
});
|
||||
|
||||
it('use name prop, set undefined mode', () => {
|
||||
i.name = 'some-name';
|
||||
i.mode = undefined as any;
|
||||
expect(getUrl(i)).toBe('/svg/md-some-name.svg');
|
||||
});
|
||||
|
||||
it('use name prop, set unknown mode', () => {
|
||||
i.name = 'some-name';
|
||||
i.mode = 'somemode' as any;
|
||||
expect(getUrl(i)).toBe('/svg/md-some-name.svg');
|
||||
});
|
||||
|
||||
it('use name prop, default md mode', () => {
|
||||
i.name = 'some-name';
|
||||
i.icon = 'some-icon';
|
||||
expect(getUrl(i)).toBe('/svg/md-some-name.svg');
|
||||
expect(getUrl(i)).toBe('/svg/some-name.svg');
|
||||
});
|
||||
|
||||
it('use src prop', () => {
|
||||
@@ -120,14 +69,6 @@ describe('getName', () => {
|
||||
expect(getName('some/name', '', 'io', '', '')).toBe(null);
|
||||
});
|
||||
|
||||
it('use ios mode from mode property', () => {
|
||||
expect(getName('some-name', '', 'ios', '', '')).toBe('ios-some-name');
|
||||
});
|
||||
|
||||
it('use md mode from mode property', () => {
|
||||
expect(getName('some-name', '', 'md', '', '')).toBe('md-some-name');
|
||||
});
|
||||
|
||||
it('use ios mode prefixed', () => {
|
||||
expect(getName('ios-some-name', '', '', '', '')).toBe('ios-some-name');
|
||||
});
|
||||
@@ -136,14 +77,6 @@ describe('getName', () => {
|
||||
expect(getName('md-some-name', '', '', '', '')).toBe('md-some-name');
|
||||
});
|
||||
|
||||
it('always lowercase name and mode', () => {
|
||||
expect(getName('SOME-NAME', '', 'IOS', '', '')).toBe('ios-some-name');
|
||||
});
|
||||
|
||||
it('default md name w/out mode, ios or md', () => {
|
||||
expect(getName('some-name', '', '', '', '')).toBe('md-some-name');
|
||||
});
|
||||
|
||||
it('should not use name if no name, ios or md', () => {
|
||||
expect(getName(undefined, undefined, '', '', '')).toBe(null);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -5,19 +5,21 @@ import { Icon } from './icon';
|
||||
let CACHED_MAP: Map<string, string>;
|
||||
|
||||
export const getIconMap = (): Map<string, string> => {
|
||||
if (!CACHED_MAP) {
|
||||
const win = window as any;
|
||||
win.Ionicons = win.Ionicons || {};
|
||||
CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map();
|
||||
if (typeof window === 'undefined') {
|
||||
return new Map();
|
||||
} else {
|
||||
if (!CACHED_MAP) {
|
||||
const win = window as any;
|
||||
win.Ionicons = win.Ionicons || {};
|
||||
CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map();
|
||||
}
|
||||
return CACHED_MAP;
|
||||
}
|
||||
return CACHED_MAP;
|
||||
};
|
||||
|
||||
export const addIcons = (icons: {[name: string]: string }) => {
|
||||
export const addIcons = (icons: { [name: string]: string; }) => {
|
||||
const map = getIconMap();
|
||||
Object.keys(icons).forEach(name => {
|
||||
map.set(name, icons[name]);
|
||||
});
|
||||
Object.keys(icons).forEach(name => map.set(name, icons[name]));
|
||||
};
|
||||
|
||||
|
||||
@@ -48,58 +50,53 @@ export const getUrl = (i: Icon) => {
|
||||
};
|
||||
|
||||
|
||||
const getNamedUrl = (name: string) => {
|
||||
const url = getIconMap().get(name);
|
||||
const getNamedUrl = (iconName: string) => {
|
||||
const url = getIconMap().get(iconName);
|
||||
if (url) {
|
||||
return url;
|
||||
}
|
||||
return getAssetPath(`svg/${name}.svg`);
|
||||
return getAssetPath(`svg/${iconName}.svg`);
|
||||
};
|
||||
|
||||
|
||||
export const getName = (
|
||||
name: string | undefined,
|
||||
iconName: string | undefined,
|
||||
icon: string | undefined,
|
||||
mode: string | undefined,
|
||||
ios: string | undefined,
|
||||
md: string | undefined
|
||||
) => {
|
||||
// default to "md" if somehow the mode wasn't set
|
||||
mode = (mode && mode.toLowerCase()) === 'ios' ? 'ios' : 'md';
|
||||
mode = (mode && toLower(mode)) === 'ios' ? 'ios' : 'md';
|
||||
|
||||
// if an icon was passed in using the ios or md attributes
|
||||
// set the iconName to whatever was passed in
|
||||
if (ios && mode === 'ios') {
|
||||
name = ios.toLowerCase();
|
||||
iconName = toLower(ios);
|
||||
|
||||
} else if (md && mode === 'md') {
|
||||
name = md.toLowerCase();
|
||||
iconName = toLower(md);
|
||||
|
||||
} else {
|
||||
if (!name && icon && !isSrc(icon)) {
|
||||
name = icon;
|
||||
if (!iconName && icon && !isSrc(icon)) {
|
||||
iconName = icon;
|
||||
}
|
||||
if (isStr(name)) {
|
||||
name = name.toLowerCase();
|
||||
if (!/^md-|^ios-|^logo-/.test(name)) {
|
||||
// this does not have one of the defaults
|
||||
// so lets auto add in the mode prefix for them
|
||||
name = mode + '-' + name;
|
||||
}
|
||||
if (isStr(iconName)) {
|
||||
iconName = toLower(iconName);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isStr(name) || name.trim() === '') {
|
||||
if (!isStr(iconName) || iconName.trim() === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
// only allow alpha characters and dash
|
||||
const invalidChars = name.replace(/[a-z]|-|\d/gi, '');
|
||||
const invalidChars = iconName.replace(/[a-z]|-|\d/gi, '');
|
||||
if (invalidChars !== '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return name;
|
||||
return iconName;
|
||||
};
|
||||
|
||||
export const getSrc = (src: string | undefined) => {
|
||||
@@ -112,9 +109,48 @@ export const getSrc = (src: string | undefined) => {
|
||||
return null;
|
||||
};
|
||||
|
||||
export const isSrc = (str: string) => {
|
||||
return str.length > 0 && /(\/|\.)/.test(str);
|
||||
};
|
||||
|
||||
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();
|
||||
|
||||
/**
|
||||
* 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';
|
||||
};
|
||||
@@ -1,37 +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) {
|
||||
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') {
|
||||
svgElm.setAttribute('class', 's-ion-icon');
|
||||
// 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') {
|
||||
@@ -39,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,853 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en">
|
||||
|
||||
<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>
|
||||
|
||||
<h2>Mode: default (md)</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="switch"></ion-icon>
|
||||
|
||||
<h2>Mode: ios</h2>
|
||||
<ion-icon mode="ios" name="cellular"></ion-icon>
|
||||
<ion-icon mode="ios" name="at"></ion-icon>
|
||||
<ion-icon mode="ios" name="call"></ion-icon>
|
||||
<ion-icon mode="ios" name="football"></ion-icon>
|
||||
<ion-icon mode="ios" name="analytics"></ion-icon>
|
||||
<ion-icon mode="ios" name="grid"></ion-icon>
|
||||
<ion-icon mode="ios" name="funnel"></ion-icon>
|
||||
<ion-icon mode="ios" name="watch"></ion-icon>
|
||||
<ion-icon mode="ios" name="switch"></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="switch"></ion-icon>
|
||||
|
||||
<h2>Logos</h2>
|
||||
<ion-icon name="logo-ionic"></ion-icon>
|
||||
<ion-icon name="logo-github"></ion-icon>
|
||||
<ion-icon name="logo-instagram"></ion-icon>
|
||||
<ion-icon name="logo-android"></ion-icon>
|
||||
<ion-icon name="logo-javascript"></ion-icon>
|
||||
<ion-icon name="logo-npm"></ion-icon>
|
||||
<ion-icon name="logo-reddit"></ion-icon>
|
||||
<ion-icon name="logo-tux"></ion-icon>
|
||||
<ion-icon name="logo-buffer"></ion-icon>
|
||||
|
||||
<h2>Logos: colors</h2>
|
||||
<ion-icon color="primary" name="logo-ionic"></ion-icon>
|
||||
<ion-icon color="secondary" name="logo-github"></ion-icon>
|
||||
<ion-icon color="tertiary" name="logo-instagram"></ion-icon>
|
||||
<ion-icon color="success" name="logo-android"></ion-icon>
|
||||
<ion-icon color="warning" name="logo-javascript"></ion-icon>
|
||||
<ion-icon color="danger" name="logo-npm"></ion-icon>
|
||||
<ion-icon color="light" name="logo-reddit"></ion-icon>
|
||||
<ion-icon color="medium" name="logo-tux"></ion-icon>
|
||||
<ion-icon color="dark" name="logo-buffer"></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 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 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-reddit"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-javascript"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-npm"></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>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>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>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>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>Every Icon</h2>
|
||||
<ion-icon name="ios-add-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-add-circle"></ion-icon>
|
||||
<ion-icon name="ios-add"></ion-icon>
|
||||
<ion-icon name="ios-airplane"></ion-icon>
|
||||
<ion-icon name="ios-alarm"></ion-icon>
|
||||
<ion-icon name="ios-albums"></ion-icon>
|
||||
<ion-icon name="ios-alert"></ion-icon>
|
||||
<ion-icon name="ios-american-football"></ion-icon>
|
||||
<ion-icon name="ios-analytics"></ion-icon>
|
||||
<ion-icon name="ios-aperture"></ion-icon>
|
||||
<ion-icon name="ios-apps"></ion-icon>
|
||||
<ion-icon name="ios-appstore"></ion-icon>
|
||||
<ion-icon name="ios-archive"></ion-icon>
|
||||
<ion-icon name="ios-arrow-back"></ion-icon>
|
||||
<ion-icon name="ios-arrow-down"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropdown-circle"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropdown"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropleft-circle"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropleft"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropright-circle"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropright"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropup-circle"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropup"></ion-icon>
|
||||
<ion-icon name="ios-arrow-forward"></ion-icon>
|
||||
<ion-icon name="ios-arrow-round-back"></ion-icon>
|
||||
<ion-icon name="ios-arrow-round-down"></ion-icon>
|
||||
<ion-icon name="ios-arrow-round-forward"></ion-icon>
|
||||
<ion-icon name="ios-arrow-round-up"></ion-icon>
|
||||
<ion-icon name="ios-arrow-up"></ion-icon>
|
||||
<ion-icon name="ios-at"></ion-icon>
|
||||
<ion-icon name="ios-attach"></ion-icon>
|
||||
<ion-icon name="ios-backspace"></ion-icon>
|
||||
<ion-icon name="ios-barcode"></ion-icon>
|
||||
<ion-icon name="ios-baseball"></ion-icon>
|
||||
<ion-icon name="ios-basket"></ion-icon>
|
||||
<ion-icon name="ios-basketball"></ion-icon>
|
||||
<ion-icon name="ios-battery-charging"></ion-icon>
|
||||
<ion-icon name="ios-battery-dead"></ion-icon>
|
||||
<ion-icon name="ios-battery-full"></ion-icon>
|
||||
<ion-icon name="ios-beaker"></ion-icon>
|
||||
<ion-icon name="ios-bed"></ion-icon>
|
||||
<ion-icon name="ios-beer"></ion-icon>
|
||||
<ion-icon name="ios-bicycle"></ion-icon>
|
||||
<ion-icon name="ios-bluetooth"></ion-icon>
|
||||
<ion-icon name="ios-boat"></ion-icon>
|
||||
<ion-icon name="ios-body"></ion-icon>
|
||||
<ion-icon name="ios-bonfire"></ion-icon>
|
||||
<ion-icon name="ios-book"></ion-icon>
|
||||
<ion-icon name="ios-bookmark"></ion-icon>
|
||||
<ion-icon name="ios-bookmarks"></ion-icon>
|
||||
<ion-icon name="ios-bowtie"></ion-icon>
|
||||
<ion-icon name="ios-briefcase"></ion-icon>
|
||||
<ion-icon name="ios-browsers"></ion-icon>
|
||||
<ion-icon name="ios-brush"></ion-icon>
|
||||
<ion-icon name="ios-bug"></ion-icon>
|
||||
<ion-icon name="ios-build"></ion-icon>
|
||||
<ion-icon name="ios-bulb"></ion-icon>
|
||||
<ion-icon name="ios-bus"></ion-icon>
|
||||
<ion-icon name="ios-business"></ion-icon>
|
||||
<ion-icon name="ios-cafe"></ion-icon>
|
||||
<ion-icon name="ios-calculator"></ion-icon>
|
||||
<ion-icon name="ios-calendar"></ion-icon>
|
||||
<ion-icon name="ios-call"></ion-icon>
|
||||
<ion-icon name="ios-camera"></ion-icon>
|
||||
<ion-icon name="ios-car"></ion-icon>
|
||||
<ion-icon name="ios-card"></ion-icon>
|
||||
<ion-icon name="ios-cart"></ion-icon>
|
||||
<ion-icon name="ios-cash"></ion-icon>
|
||||
<ion-icon name="ios-cellular"></ion-icon>
|
||||
<ion-icon name="ios-chatboxes"></ion-icon>
|
||||
<ion-icon name="ios-chatbubbles"></ion-icon>
|
||||
<ion-icon name="ios-checkbox-outline"></ion-icon>
|
||||
<ion-icon name="ios-checkbox"></ion-icon>
|
||||
<ion-icon name="ios-checkmark-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-checkmark-circle"></ion-icon>
|
||||
<ion-icon name="ios-checkmark"></ion-icon>
|
||||
<ion-icon name="ios-clipboard"></ion-icon>
|
||||
<ion-icon name="ios-clock"></ion-icon>
|
||||
<ion-icon name="ios-close-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-close-circle"></ion-icon>
|
||||
<ion-icon name="ios-close"></ion-icon>
|
||||
<ion-icon name="ios-cloud-circle"></ion-icon>
|
||||
<ion-icon name="ios-cloud-done"></ion-icon>
|
||||
<ion-icon name="ios-cloud-download"></ion-icon>
|
||||
<ion-icon name="ios-cloud-outline"></ion-icon>
|
||||
<ion-icon name="ios-cloud-upload"></ion-icon>
|
||||
<ion-icon name="ios-cloud"></ion-icon>
|
||||
<ion-icon name="ios-cloudy-night"></ion-icon>
|
||||
<ion-icon name="ios-cloudy"></ion-icon>
|
||||
<ion-icon name="ios-code-download"></ion-icon>
|
||||
<ion-icon name="ios-code-working"></ion-icon>
|
||||
<ion-icon name="ios-code"></ion-icon>
|
||||
<ion-icon name="ios-cog"></ion-icon>
|
||||
<ion-icon name="ios-color-fill"></ion-icon>
|
||||
<ion-icon name="ios-color-filter"></ion-icon>
|
||||
<ion-icon name="ios-color-palette"></ion-icon>
|
||||
<ion-icon name="ios-color-wand"></ion-icon>
|
||||
<ion-icon name="ios-compass"></ion-icon>
|
||||
<ion-icon name="ios-construct"></ion-icon>
|
||||
<ion-icon name="ios-contact"></ion-icon>
|
||||
<ion-icon name="ios-contacts"></ion-icon>
|
||||
<ion-icon name="ios-contract"></ion-icon>
|
||||
<ion-icon name="ios-contrast"></ion-icon>
|
||||
<ion-icon name="ios-copy"></ion-icon>
|
||||
<ion-icon name="ios-create"></ion-icon>
|
||||
<ion-icon name="ios-crop"></ion-icon>
|
||||
<ion-icon name="ios-cube"></ion-icon>
|
||||
<ion-icon name="ios-cut"></ion-icon>
|
||||
<ion-icon name="ios-desktop"></ion-icon>
|
||||
<ion-icon name="ios-disc"></ion-icon>
|
||||
<ion-icon name="ios-document"></ion-icon>
|
||||
<ion-icon name="ios-done-all"></ion-icon>
|
||||
<ion-icon name="ios-download"></ion-icon>
|
||||
<ion-icon name="ios-easel"></ion-icon>
|
||||
<ion-icon name="ios-egg"></ion-icon>
|
||||
<ion-icon name="ios-exit"></ion-icon>
|
||||
<ion-icon name="ios-expand"></ion-icon>
|
||||
<ion-icon name="ios-eye-off"></ion-icon>
|
||||
<ion-icon name="ios-eye"></ion-icon>
|
||||
<ion-icon name="ios-fastforward"></ion-icon>
|
||||
<ion-icon name="ios-female"></ion-icon>
|
||||
<ion-icon name="ios-filing"></ion-icon>
|
||||
<ion-icon name="ios-film"></ion-icon>
|
||||
<ion-icon name="ios-finger-print"></ion-icon>
|
||||
<ion-icon name="ios-fitness"></ion-icon>
|
||||
<ion-icon name="ios-flag"></ion-icon>
|
||||
<ion-icon name="ios-flame"></ion-icon>
|
||||
<ion-icon name="ios-flash-off"></ion-icon>
|
||||
<ion-icon name="ios-flash"></ion-icon>
|
||||
<ion-icon name="ios-flashlight"></ion-icon>
|
||||
<ion-icon name="ios-flask"></ion-icon>
|
||||
<ion-icon name="ios-flower"></ion-icon>
|
||||
<ion-icon name="ios-folder-open"></ion-icon>
|
||||
<ion-icon name="ios-folder"></ion-icon>
|
||||
<ion-icon name="ios-football"></ion-icon>
|
||||
<ion-icon name="ios-funnel"></ion-icon>
|
||||
<ion-icon name="ios-gift"></ion-icon>
|
||||
<ion-icon name="ios-git-branch"></ion-icon>
|
||||
<ion-icon name="ios-git-commit"></ion-icon>
|
||||
<ion-icon name="ios-git-compare"></ion-icon>
|
||||
<ion-icon name="ios-git-merge"></ion-icon>
|
||||
<ion-icon name="ios-git-network"></ion-icon>
|
||||
<ion-icon name="ios-git-pull-request"></ion-icon>
|
||||
<ion-icon name="ios-glasses"></ion-icon>
|
||||
<ion-icon name="ios-globe"></ion-icon>
|
||||
<ion-icon name="ios-grid"></ion-icon>
|
||||
<ion-icon name="ios-hammer"></ion-icon>
|
||||
<ion-icon name="ios-hand"></ion-icon>
|
||||
<ion-icon name="ios-happy"></ion-icon>
|
||||
<ion-icon name="ios-headset"></ion-icon>
|
||||
<ion-icon name="ios-heart-dislike"></ion-icon>
|
||||
<ion-icon name="ios-heart-empty"></ion-icon>
|
||||
<ion-icon name="ios-heart-half"></ion-icon>
|
||||
<ion-icon name="ios-heart"></ion-icon>
|
||||
<ion-icon name="ios-help-buoy"></ion-icon>
|
||||
<ion-icon name="ios-help-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-help-circle"></ion-icon>
|
||||
<ion-icon name="ios-help"></ion-icon>
|
||||
<ion-icon name="ios-home"></ion-icon>
|
||||
<ion-icon name="ios-hourglass"></ion-icon>
|
||||
<ion-icon name="ios-ice-cream"></ion-icon>
|
||||
<ion-icon name="ios-image"></ion-icon>
|
||||
<ion-icon name="ios-images"></ion-icon>
|
||||
<ion-icon name="ios-infinite"></ion-icon>
|
||||
<ion-icon name="ios-information-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-information-circle"></ion-icon>
|
||||
<ion-icon name="ios-information"></ion-icon>
|
||||
<ion-icon name="ios-jet"></ion-icon>
|
||||
<ion-icon name="ios-journal"></ion-icon>
|
||||
<ion-icon name="ios-key"></ion-icon>
|
||||
<ion-icon name="ios-keypad"></ion-icon>
|
||||
<ion-icon name="ios-laptop"></ion-icon>
|
||||
<ion-icon name="ios-leaf"></ion-icon>
|
||||
<ion-icon name="ios-link"></ion-icon>
|
||||
<ion-icon name="ios-list-box"></ion-icon>
|
||||
<ion-icon name="ios-list"></ion-icon>
|
||||
<ion-icon name="ios-locate"></ion-icon>
|
||||
<ion-icon name="ios-lock"></ion-icon>
|
||||
<ion-icon name="ios-log-in"></ion-icon>
|
||||
<ion-icon name="ios-log-out"></ion-icon>
|
||||
<ion-icon name="ios-magnet"></ion-icon>
|
||||
<ion-icon name="ios-mail-open"></ion-icon>
|
||||
<ion-icon name="ios-mail-unread"></ion-icon>
|
||||
<ion-icon name="ios-mail"></ion-icon>
|
||||
<ion-icon name="ios-male"></ion-icon>
|
||||
<ion-icon name="ios-man"></ion-icon>
|
||||
<ion-icon name="ios-map"></ion-icon>
|
||||
<ion-icon name="ios-medal"></ion-icon>
|
||||
<ion-icon name="ios-medical"></ion-icon>
|
||||
<ion-icon name="ios-medkit"></ion-icon>
|
||||
<ion-icon name="ios-megaphone"></ion-icon>
|
||||
<ion-icon name="ios-menu"></ion-icon>
|
||||
<ion-icon name="ios-mic-off"></ion-icon>
|
||||
<ion-icon name="ios-mic"></ion-icon>
|
||||
<ion-icon name="ios-microphone"></ion-icon>
|
||||
<ion-icon name="ios-moon"></ion-icon>
|
||||
<ion-icon name="ios-more"></ion-icon>
|
||||
<ion-icon name="ios-move"></ion-icon>
|
||||
<ion-icon name="ios-musical-note"></ion-icon>
|
||||
<ion-icon name="ios-musical-notes"></ion-icon>
|
||||
<ion-icon name="ios-navigate"></ion-icon>
|
||||
<ion-icon name="ios-notifications-off"></ion-icon>
|
||||
<ion-icon name="ios-notifications-outline"></ion-icon>
|
||||
<ion-icon name="ios-notifications"></ion-icon>
|
||||
<ion-icon name="ios-nuclear"></ion-icon>
|
||||
<ion-icon name="ios-nutrition"></ion-icon>
|
||||
<ion-icon name="ios-open"></ion-icon>
|
||||
<ion-icon name="ios-options"></ion-icon>
|
||||
<ion-icon name="ios-outlet"></ion-icon>
|
||||
<ion-icon name="ios-paper-plane"></ion-icon>
|
||||
<ion-icon name="ios-paper"></ion-icon>
|
||||
<ion-icon name="ios-partly-sunny"></ion-icon>
|
||||
<ion-icon name="ios-pause"></ion-icon>
|
||||
<ion-icon name="ios-paw"></ion-icon>
|
||||
<ion-icon name="ios-people"></ion-icon>
|
||||
<ion-icon name="ios-person-add"></ion-icon>
|
||||
<ion-icon name="ios-person"></ion-icon>
|
||||
<ion-icon name="ios-phone-landscape"></ion-icon>
|
||||
<ion-icon name="ios-phone-portrait"></ion-icon>
|
||||
<ion-icon name="ios-photos"></ion-icon>
|
||||
<ion-icon name="ios-pie"></ion-icon>
|
||||
<ion-icon name="ios-pin"></ion-icon>
|
||||
<ion-icon name="ios-pint"></ion-icon>
|
||||
<ion-icon name="ios-pizza"></ion-icon>
|
||||
<ion-icon name="ios-planet"></ion-icon>
|
||||
<ion-icon name="ios-play-circle"></ion-icon>
|
||||
<ion-icon name="ios-play"></ion-icon>
|
||||
<ion-icon name="ios-podium"></ion-icon>
|
||||
<ion-icon name="ios-power"></ion-icon>
|
||||
<ion-icon name="ios-pricetag"></ion-icon>
|
||||
<ion-icon name="ios-pricetags"></ion-icon>
|
||||
<ion-icon name="ios-print"></ion-icon>
|
||||
<ion-icon name="ios-pulse"></ion-icon>
|
||||
<ion-icon name="ios-qr-scanner"></ion-icon>
|
||||
<ion-icon name="ios-quote"></ion-icon>
|
||||
<ion-icon name="ios-radio-button-off"></ion-icon>
|
||||
<ion-icon name="ios-radio-button-on"></ion-icon>
|
||||
<ion-icon name="ios-radio"></ion-icon>
|
||||
<ion-icon name="ios-rainy"></ion-icon>
|
||||
<ion-icon name="ios-recording"></ion-icon>
|
||||
<ion-icon name="ios-redo"></ion-icon>
|
||||
<ion-icon name="ios-refresh-circle"></ion-icon>
|
||||
<ion-icon name="ios-refresh"></ion-icon>
|
||||
<ion-icon name="ios-remove-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-remove-circle"></ion-icon>
|
||||
<ion-icon name="ios-remove"></ion-icon>
|
||||
<ion-icon name="ios-reorder"></ion-icon>
|
||||
<ion-icon name="ios-repeat"></ion-icon>
|
||||
<ion-icon name="ios-resize"></ion-icon>
|
||||
<ion-icon name="ios-restaurant"></ion-icon>
|
||||
<ion-icon name="ios-return-left"></ion-icon>
|
||||
<ion-icon name="ios-return-right"></ion-icon>
|
||||
<ion-icon name="ios-reverse-camera"></ion-icon>
|
||||
<ion-icon name="ios-rewind"></ion-icon>
|
||||
<ion-icon name="ios-ribbon"></ion-icon>
|
||||
<ion-icon name="ios-rocket"></ion-icon>
|
||||
<ion-icon name="ios-rose"></ion-icon>
|
||||
<ion-icon name="ios-sad"></ion-icon>
|
||||
<ion-icon name="ios-save"></ion-icon>
|
||||
<ion-icon name="ios-school"></ion-icon>
|
||||
<ion-icon name="ios-search"></ion-icon>
|
||||
<ion-icon name="ios-send"></ion-icon>
|
||||
<ion-icon name="ios-settings"></ion-icon>
|
||||
<ion-icon name="ios-share-alt"></ion-icon>
|
||||
<ion-icon name="ios-share"></ion-icon>
|
||||
<ion-icon name="ios-shirt"></ion-icon>
|
||||
<ion-icon name="ios-shuffle"></ion-icon>
|
||||
<ion-icon name="ios-skip-backward"></ion-icon>
|
||||
<ion-icon name="ios-skip-forward"></ion-icon>
|
||||
<ion-icon name="ios-snow"></ion-icon>
|
||||
<ion-icon name="ios-speedometer"></ion-icon>
|
||||
<ion-icon name="ios-square-outline"></ion-icon>
|
||||
<ion-icon name="ios-square"></ion-icon>
|
||||
<ion-icon name="ios-star-half"></ion-icon>
|
||||
<ion-icon name="ios-star-outline"></ion-icon>
|
||||
<ion-icon name="ios-star"></ion-icon>
|
||||
<ion-icon name="ios-stats"></ion-icon>
|
||||
<ion-icon name="ios-stopwatch"></ion-icon>
|
||||
<ion-icon name="ios-subway"></ion-icon>
|
||||
<ion-icon name="ios-sunny"></ion-icon>
|
||||
<ion-icon name="ios-swap"></ion-icon>
|
||||
<ion-icon name="ios-switch"></ion-icon>
|
||||
<ion-icon name="ios-sync"></ion-icon>
|
||||
<ion-icon name="ios-tablet-landscape"></ion-icon>
|
||||
<ion-icon name="ios-tablet-portrait"></ion-icon>
|
||||
<ion-icon name="ios-tennisball"></ion-icon>
|
||||
<ion-icon name="ios-text"></ion-icon>
|
||||
<ion-icon name="ios-thermometer"></ion-icon>
|
||||
<ion-icon name="ios-thumbs-down"></ion-icon>
|
||||
<ion-icon name="ios-thumbs-up"></ion-icon>
|
||||
<ion-icon name="ios-thunderstorm"></ion-icon>
|
||||
<ion-icon name="ios-time"></ion-icon>
|
||||
<ion-icon name="ios-timer"></ion-icon>
|
||||
<ion-icon name="ios-today"></ion-icon>
|
||||
<ion-icon name="ios-train"></ion-icon>
|
||||
<ion-icon name="ios-transgender"></ion-icon>
|
||||
<ion-icon name="ios-trash"></ion-icon>
|
||||
<ion-icon name="ios-trending-down"></ion-icon>
|
||||
<ion-icon name="ios-trending-up"></ion-icon>
|
||||
<ion-icon name="ios-trophy"></ion-icon>
|
||||
<ion-icon name="ios-tv"></ion-icon>
|
||||
<ion-icon name="ios-umbrella"></ion-icon>
|
||||
<ion-icon name="ios-undo"></ion-icon>
|
||||
<ion-icon name="ios-unlock"></ion-icon>
|
||||
<ion-icon name="ios-videocam"></ion-icon>
|
||||
<ion-icon name="ios-volume-high"></ion-icon>
|
||||
<ion-icon name="ios-volume-low"></ion-icon>
|
||||
<ion-icon name="ios-volume-mute"></ion-icon>
|
||||
<ion-icon name="ios-volume-off"></ion-icon>
|
||||
<ion-icon name="ios-walk"></ion-icon>
|
||||
<ion-icon name="ios-wallet"></ion-icon>
|
||||
<ion-icon name="ios-warning"></ion-icon>
|
||||
<ion-icon name="ios-watch"></ion-icon>
|
||||
<ion-icon name="ios-water"></ion-icon>
|
||||
<ion-icon name="ios-wifi"></ion-icon>
|
||||
<ion-icon name="ios-wine"></ion-icon>
|
||||
<ion-icon name="ios-woman"></ion-icon>
|
||||
<ion-icon name="logo-android"></ion-icon>
|
||||
<ion-icon name="logo-angular"></ion-icon>
|
||||
<ion-icon name="logo-apple"></ion-icon>
|
||||
<ion-icon name="logo-bitbucket"></ion-icon>
|
||||
<ion-icon name="logo-bitcoin"></ion-icon>
|
||||
<ion-icon name="logo-buffer"></ion-icon>
|
||||
<ion-icon name="logo-chrome"></ion-icon>
|
||||
<ion-icon name="logo-closed-captioning"></ion-icon>
|
||||
<ion-icon name="logo-codepen"></ion-icon>
|
||||
<ion-icon name="logo-css3"></ion-icon>
|
||||
<ion-icon name="logo-designernews"></ion-icon>
|
||||
<ion-icon name="logo-dribbble"></ion-icon>
|
||||
<ion-icon name="logo-dropbox"></ion-icon>
|
||||
<ion-icon name="logo-euro"></ion-icon>
|
||||
<ion-icon name="logo-facebook"></ion-icon>
|
||||
<ion-icon name="logo-flickr"></ion-icon>
|
||||
<ion-icon name="logo-foursquare"></ion-icon>
|
||||
<ion-icon name="logo-freebsd-devil"></ion-icon>
|
||||
<ion-icon name="logo-game-controller-a"></ion-icon>
|
||||
<ion-icon name="logo-game-controller-b"></ion-icon>
|
||||
<ion-icon name="logo-github"></ion-icon>
|
||||
<ion-icon name="logo-google"></ion-icon>
|
||||
<ion-icon name="logo-googleplus"></ion-icon>
|
||||
<ion-icon name="logo-hackernews"></ion-icon>
|
||||
<ion-icon name="logo-html5"></ion-icon>
|
||||
<ion-icon name="logo-instagram"></ion-icon>
|
||||
<ion-icon name="logo-ionic"></ion-icon>
|
||||
<ion-icon name="logo-ionitron"></ion-icon>
|
||||
<ion-icon name="logo-javascript"></ion-icon>
|
||||
<ion-icon name="logo-linkedin"></ion-icon>
|
||||
<ion-icon name="logo-markdown"></ion-icon>
|
||||
<ion-icon name="logo-model-s"></ion-icon>
|
||||
<ion-icon name="logo-no-smoking"></ion-icon>
|
||||
<ion-icon name="logo-nodejs"></ion-icon>
|
||||
<ion-icon name="logo-npm"></ion-icon>
|
||||
<ion-icon name="logo-octocat"></ion-icon>
|
||||
<ion-icon name="logo-pinterest"></ion-icon>
|
||||
<ion-icon name="logo-playstation"></ion-icon>
|
||||
<ion-icon name="logo-polymer"></ion-icon>
|
||||
<ion-icon name="logo-python"></ion-icon>
|
||||
<ion-icon name="logo-reddit"></ion-icon>
|
||||
<ion-icon name="logo-rss"></ion-icon>
|
||||
<ion-icon name="logo-sass"></ion-icon>
|
||||
<ion-icon name="logo-skype"></ion-icon>
|
||||
<ion-icon name="logo-slack"></ion-icon>
|
||||
<ion-icon name="logo-snapchat"></ion-icon>
|
||||
<ion-icon name="logo-steam"></ion-icon>
|
||||
<ion-icon name="logo-tumblr"></ion-icon>
|
||||
<ion-icon name="logo-tux"></ion-icon>
|
||||
<ion-icon name="logo-twitch"></ion-icon>
|
||||
<ion-icon name="logo-twitter"></ion-icon>
|
||||
<ion-icon name="logo-usd"></ion-icon>
|
||||
<ion-icon name="logo-vimeo"></ion-icon>
|
||||
<ion-icon name="logo-vk"></ion-icon>
|
||||
<ion-icon name="logo-whatsapp"></ion-icon>
|
||||
<ion-icon name="logo-windows"></ion-icon>
|
||||
<ion-icon name="logo-wordpress"></ion-icon>
|
||||
<ion-icon name="logo-xbox"></ion-icon>
|
||||
<ion-icon name="logo-xing"></ion-icon>
|
||||
<ion-icon name="logo-yahoo"></ion-icon>
|
||||
<ion-icon name="logo-yen"></ion-icon>
|
||||
<ion-icon name="logo-youtube"></ion-icon>
|
||||
<ion-icon name="md-add-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-add-circle"></ion-icon>
|
||||
<ion-icon name="md-add"></ion-icon>
|
||||
<ion-icon name="md-airplane"></ion-icon>
|
||||
<ion-icon name="md-alarm"></ion-icon>
|
||||
<ion-icon name="md-albums"></ion-icon>
|
||||
<ion-icon name="md-alert"></ion-icon>
|
||||
<ion-icon name="md-american-football"></ion-icon>
|
||||
<ion-icon name="md-analytics"></ion-icon>
|
||||
<ion-icon name="md-aperture"></ion-icon>
|
||||
<ion-icon name="md-apps"></ion-icon>
|
||||
<ion-icon name="md-appstore"></ion-icon>
|
||||
<ion-icon name="md-archive"></ion-icon>
|
||||
<ion-icon name="md-arrow-back"></ion-icon>
|
||||
<ion-icon name="md-arrow-down"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropdown-circle"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropdown"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropleft-circle"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropleft"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropright-circle"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropright"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropup-circle"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropup"></ion-icon>
|
||||
<ion-icon name="md-arrow-forward"></ion-icon>
|
||||
<ion-icon name="md-arrow-round-back"></ion-icon>
|
||||
<ion-icon name="md-arrow-round-down"></ion-icon>
|
||||
<ion-icon name="md-arrow-round-forward"></ion-icon>
|
||||
<ion-icon name="md-arrow-round-up"></ion-icon>
|
||||
<ion-icon name="md-arrow-up"></ion-icon>
|
||||
<ion-icon name="md-at"></ion-icon>
|
||||
<ion-icon name="md-attach"></ion-icon>
|
||||
<ion-icon name="md-backspace"></ion-icon>
|
||||
<ion-icon name="md-barcode"></ion-icon>
|
||||
<ion-icon name="md-baseball"></ion-icon>
|
||||
<ion-icon name="md-basket"></ion-icon>
|
||||
<ion-icon name="md-basketball"></ion-icon>
|
||||
<ion-icon name="md-battery-charging"></ion-icon>
|
||||
<ion-icon name="md-battery-dead"></ion-icon>
|
||||
<ion-icon name="md-battery-full"></ion-icon>
|
||||
<ion-icon name="md-beaker"></ion-icon>
|
||||
<ion-icon name="md-bed"></ion-icon>
|
||||
<ion-icon name="md-beer"></ion-icon>
|
||||
<ion-icon name="md-bicycle"></ion-icon>
|
||||
<ion-icon name="md-bluetooth"></ion-icon>
|
||||
<ion-icon name="md-boat"></ion-icon>
|
||||
<ion-icon name="md-body"></ion-icon>
|
||||
<ion-icon name="md-bonfire"></ion-icon>
|
||||
<ion-icon name="md-book"></ion-icon>
|
||||
<ion-icon name="md-bookmark"></ion-icon>
|
||||
<ion-icon name="md-bookmarks"></ion-icon>
|
||||
<ion-icon name="md-bowtie"></ion-icon>
|
||||
<ion-icon name="md-briefcase"></ion-icon>
|
||||
<ion-icon name="md-browsers"></ion-icon>
|
||||
<ion-icon name="md-brush"></ion-icon>
|
||||
<ion-icon name="md-bug"></ion-icon>
|
||||
<ion-icon name="md-build"></ion-icon>
|
||||
<ion-icon name="md-bulb"></ion-icon>
|
||||
<ion-icon name="md-bus"></ion-icon>
|
||||
<ion-icon name="md-business"></ion-icon>
|
||||
<ion-icon name="md-cafe"></ion-icon>
|
||||
<ion-icon name="md-calculator"></ion-icon>
|
||||
<ion-icon name="md-calendar"></ion-icon>
|
||||
<ion-icon name="md-call"></ion-icon>
|
||||
<ion-icon name="md-camera"></ion-icon>
|
||||
<ion-icon name="md-car"></ion-icon>
|
||||
<ion-icon name="md-card"></ion-icon>
|
||||
<ion-icon name="md-cart"></ion-icon>
|
||||
<ion-icon name="md-cash"></ion-icon>
|
||||
<ion-icon name="md-cellular"></ion-icon>
|
||||
<ion-icon name="md-chatboxes"></ion-icon>
|
||||
<ion-icon name="md-chatbubbles"></ion-icon>
|
||||
<ion-icon name="md-checkbox-outline"></ion-icon>
|
||||
<ion-icon name="md-checkbox"></ion-icon>
|
||||
<ion-icon name="md-checkmark-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-checkmark-circle"></ion-icon>
|
||||
<ion-icon name="md-checkmark"></ion-icon>
|
||||
<ion-icon name="md-clipboard"></ion-icon>
|
||||
<ion-icon name="md-clock"></ion-icon>
|
||||
<ion-icon name="md-close-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-close-circle"></ion-icon>
|
||||
<ion-icon name="md-close"></ion-icon>
|
||||
<ion-icon name="md-cloud-circle"></ion-icon>
|
||||
<ion-icon name="md-cloud-done"></ion-icon>
|
||||
<ion-icon name="md-cloud-download"></ion-icon>
|
||||
<ion-icon name="md-cloud-outline"></ion-icon>
|
||||
<ion-icon name="md-cloud-upload"></ion-icon>
|
||||
<ion-icon name="md-cloud"></ion-icon>
|
||||
<ion-icon name="md-cloudy-night"></ion-icon>
|
||||
<ion-icon name="md-cloudy"></ion-icon>
|
||||
<ion-icon name="md-code-download"></ion-icon>
|
||||
<ion-icon name="md-code-working"></ion-icon>
|
||||
<ion-icon name="md-code"></ion-icon>
|
||||
<ion-icon name="md-cog"></ion-icon>
|
||||
<ion-icon name="md-color-fill"></ion-icon>
|
||||
<ion-icon name="md-color-filter"></ion-icon>
|
||||
<ion-icon name="md-color-palette"></ion-icon>
|
||||
<ion-icon name="md-color-wand"></ion-icon>
|
||||
<ion-icon name="md-compass"></ion-icon>
|
||||
<ion-icon name="md-construct"></ion-icon>
|
||||
<ion-icon name="md-contact"></ion-icon>
|
||||
<ion-icon name="md-contacts"></ion-icon>
|
||||
<ion-icon name="md-contract"></ion-icon>
|
||||
<ion-icon name="md-contrast"></ion-icon>
|
||||
<ion-icon name="md-copy"></ion-icon>
|
||||
<ion-icon name="md-create"></ion-icon>
|
||||
<ion-icon name="md-crop"></ion-icon>
|
||||
<ion-icon name="md-cube"></ion-icon>
|
||||
<ion-icon name="md-cut"></ion-icon>
|
||||
<ion-icon name="md-desktop"></ion-icon>
|
||||
<ion-icon name="md-disc"></ion-icon>
|
||||
<ion-icon name="md-document"></ion-icon>
|
||||
<ion-icon name="md-done-all"></ion-icon>
|
||||
<ion-icon name="md-download"></ion-icon>
|
||||
<ion-icon name="md-easel"></ion-icon>
|
||||
<ion-icon name="md-egg"></ion-icon>
|
||||
<ion-icon name="md-exit"></ion-icon>
|
||||
<ion-icon name="md-expand"></ion-icon>
|
||||
<ion-icon name="md-eye-off"></ion-icon>
|
||||
<ion-icon name="md-eye"></ion-icon>
|
||||
<ion-icon name="md-fastforward"></ion-icon>
|
||||
<ion-icon name="md-female"></ion-icon>
|
||||
<ion-icon name="md-filing"></ion-icon>
|
||||
<ion-icon name="md-film"></ion-icon>
|
||||
<ion-icon name="md-finger-print"></ion-icon>
|
||||
<ion-icon name="md-fitness"></ion-icon>
|
||||
<ion-icon name="md-flag"></ion-icon>
|
||||
<ion-icon name="md-flame"></ion-icon>
|
||||
<ion-icon name="md-flash-off"></ion-icon>
|
||||
<ion-icon name="md-flash"></ion-icon>
|
||||
<ion-icon name="md-flashlight"></ion-icon>
|
||||
<ion-icon name="md-flask"></ion-icon>
|
||||
<ion-icon name="md-flower"></ion-icon>
|
||||
<ion-icon name="md-folder-open"></ion-icon>
|
||||
<ion-icon name="md-folder"></ion-icon>
|
||||
<ion-icon name="md-football"></ion-icon>
|
||||
<ion-icon name="md-funnel"></ion-icon>
|
||||
<ion-icon name="md-gift"></ion-icon>
|
||||
<ion-icon name="md-git-branch"></ion-icon>
|
||||
<ion-icon name="md-git-commit"></ion-icon>
|
||||
<ion-icon name="md-git-compare"></ion-icon>
|
||||
<ion-icon name="md-git-merge"></ion-icon>
|
||||
<ion-icon name="md-git-network"></ion-icon>
|
||||
<ion-icon name="md-git-pull-request"></ion-icon>
|
||||
<ion-icon name="md-glasses"></ion-icon>
|
||||
<ion-icon name="md-globe"></ion-icon>
|
||||
<ion-icon name="md-grid"></ion-icon>
|
||||
<ion-icon name="md-hammer"></ion-icon>
|
||||
<ion-icon name="md-hand"></ion-icon>
|
||||
<ion-icon name="md-happy"></ion-icon>
|
||||
<ion-icon name="md-headset"></ion-icon>
|
||||
<ion-icon name="md-heart-dislike"></ion-icon>
|
||||
<ion-icon name="md-heart-empty"></ion-icon>
|
||||
<ion-icon name="md-heart-half"></ion-icon>
|
||||
<ion-icon name="md-heart"></ion-icon>
|
||||
<ion-icon name="md-help-buoy"></ion-icon>
|
||||
<ion-icon name="md-help-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-help-circle"></ion-icon>
|
||||
<ion-icon name="md-help"></ion-icon>
|
||||
<ion-icon name="md-home"></ion-icon>
|
||||
<ion-icon name="md-hourglass"></ion-icon>
|
||||
<ion-icon name="md-ice-cream"></ion-icon>
|
||||
<ion-icon name="md-image"></ion-icon>
|
||||
<ion-icon name="md-images"></ion-icon>
|
||||
<ion-icon name="md-infinite"></ion-icon>
|
||||
<ion-icon name="md-information-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-information-circle"></ion-icon>
|
||||
<ion-icon name="md-information"></ion-icon>
|
||||
<ion-icon name="md-jet"></ion-icon>
|
||||
<ion-icon name="md-journal"></ion-icon>
|
||||
<ion-icon name="md-key"></ion-icon>
|
||||
<ion-icon name="md-keypad"></ion-icon>
|
||||
<ion-icon name="md-laptop"></ion-icon>
|
||||
<ion-icon name="md-leaf"></ion-icon>
|
||||
<ion-icon name="md-link"></ion-icon>
|
||||
<ion-icon name="md-list-box"></ion-icon>
|
||||
<ion-icon name="md-list"></ion-icon>
|
||||
<ion-icon name="md-locate"></ion-icon>
|
||||
<ion-icon name="md-lock"></ion-icon>
|
||||
<ion-icon name="md-log-in"></ion-icon>
|
||||
<ion-icon name="md-log-out"></ion-icon>
|
||||
<ion-icon name="md-magnet"></ion-icon>
|
||||
<ion-icon name="md-mail-open"></ion-icon>
|
||||
<ion-icon name="md-mail-unread"></ion-icon>
|
||||
<ion-icon name="md-mail"></ion-icon>
|
||||
<ion-icon name="md-male"></ion-icon>
|
||||
<ion-icon name="md-man"></ion-icon>
|
||||
<ion-icon name="md-map"></ion-icon>
|
||||
<ion-icon name="md-medal"></ion-icon>
|
||||
<ion-icon name="md-medical"></ion-icon>
|
||||
<ion-icon name="md-medkit"></ion-icon>
|
||||
<ion-icon name="md-megaphone"></ion-icon>
|
||||
<ion-icon name="md-menu"></ion-icon>
|
||||
<ion-icon name="md-mic-off"></ion-icon>
|
||||
<ion-icon name="md-mic"></ion-icon>
|
||||
<ion-icon name="md-microphone"></ion-icon>
|
||||
<ion-icon name="md-moon"></ion-icon>
|
||||
<ion-icon name="md-more"></ion-icon>
|
||||
<ion-icon name="md-move"></ion-icon>
|
||||
<ion-icon name="md-musical-note"></ion-icon>
|
||||
<ion-icon name="md-musical-notes"></ion-icon>
|
||||
<ion-icon name="md-navigate"></ion-icon>
|
||||
<ion-icon name="md-notifications-off"></ion-icon>
|
||||
<ion-icon name="md-notifications-outline"></ion-icon>
|
||||
<ion-icon name="md-notifications"></ion-icon>
|
||||
<ion-icon name="md-nuclear"></ion-icon>
|
||||
<ion-icon name="md-nutrition"></ion-icon>
|
||||
<ion-icon name="md-open"></ion-icon>
|
||||
<ion-icon name="md-options"></ion-icon>
|
||||
<ion-icon name="md-outlet"></ion-icon>
|
||||
<ion-icon name="md-paper-plane"></ion-icon>
|
||||
<ion-icon name="md-paper"></ion-icon>
|
||||
<ion-icon name="md-partly-sunny"></ion-icon>
|
||||
<ion-icon name="md-pause"></ion-icon>
|
||||
<ion-icon name="md-paw"></ion-icon>
|
||||
<ion-icon name="md-people"></ion-icon>
|
||||
<ion-icon name="md-person-add"></ion-icon>
|
||||
<ion-icon name="md-person"></ion-icon>
|
||||
<ion-icon name="md-phone-landscape"></ion-icon>
|
||||
<ion-icon name="md-phone-portrait"></ion-icon>
|
||||
<ion-icon name="md-photos"></ion-icon>
|
||||
<ion-icon name="md-pie"></ion-icon>
|
||||
<ion-icon name="md-pin"></ion-icon>
|
||||
<ion-icon name="md-pint"></ion-icon>
|
||||
<ion-icon name="md-pizza"></ion-icon>
|
||||
<ion-icon name="md-planet"></ion-icon>
|
||||
<ion-icon name="md-play-circle"></ion-icon>
|
||||
<ion-icon name="md-play"></ion-icon>
|
||||
<ion-icon name="md-podium"></ion-icon>
|
||||
<ion-icon name="md-power"></ion-icon>
|
||||
<ion-icon name="md-pricetag"></ion-icon>
|
||||
<ion-icon name="md-pricetags"></ion-icon>
|
||||
<ion-icon name="md-print"></ion-icon>
|
||||
<ion-icon name="md-pulse"></ion-icon>
|
||||
<ion-icon name="md-qr-scanner"></ion-icon>
|
||||
<ion-icon name="md-quote"></ion-icon>
|
||||
<ion-icon name="md-radio-button-off"></ion-icon>
|
||||
<ion-icon name="md-radio-button-on"></ion-icon>
|
||||
<ion-icon name="md-radio"></ion-icon>
|
||||
<ion-icon name="md-rainy"></ion-icon>
|
||||
<ion-icon name="md-recording"></ion-icon>
|
||||
<ion-icon name="md-redo"></ion-icon>
|
||||
<ion-icon name="md-refresh-circle"></ion-icon>
|
||||
<ion-icon name="md-refresh"></ion-icon>
|
||||
<ion-icon name="md-remove-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-remove-circle"></ion-icon>
|
||||
<ion-icon name="md-remove"></ion-icon>
|
||||
<ion-icon name="md-reorder"></ion-icon>
|
||||
<ion-icon name="md-repeat"></ion-icon>
|
||||
<ion-icon name="md-resize"></ion-icon>
|
||||
<ion-icon name="md-restaurant"></ion-icon>
|
||||
<ion-icon name="md-return-left"></ion-icon>
|
||||
<ion-icon name="md-return-right"></ion-icon>
|
||||
<ion-icon name="md-reverse-camera"></ion-icon>
|
||||
<ion-icon name="md-rewind"></ion-icon>
|
||||
<ion-icon name="md-ribbon"></ion-icon>
|
||||
<ion-icon name="md-rocket"></ion-icon>
|
||||
<ion-icon name="md-rose"></ion-icon>
|
||||
<ion-icon name="md-sad"></ion-icon>
|
||||
<ion-icon name="md-save"></ion-icon>
|
||||
<ion-icon name="md-school"></ion-icon>
|
||||
<ion-icon name="md-search"></ion-icon>
|
||||
<ion-icon name="md-send"></ion-icon>
|
||||
<ion-icon name="md-settings"></ion-icon>
|
||||
<ion-icon name="md-share-alt"></ion-icon>
|
||||
<ion-icon name="md-share"></ion-icon>
|
||||
<ion-icon name="md-shirt"></ion-icon>
|
||||
<ion-icon name="md-shuffle"></ion-icon>
|
||||
<ion-icon name="md-skip-backward"></ion-icon>
|
||||
<ion-icon name="md-skip-forward"></ion-icon>
|
||||
<ion-icon name="md-snow"></ion-icon>
|
||||
<ion-icon name="md-speedometer"></ion-icon>
|
||||
<ion-icon name="md-square-outline"></ion-icon>
|
||||
<ion-icon name="md-square"></ion-icon>
|
||||
<ion-icon name="md-star-half"></ion-icon>
|
||||
<ion-icon name="md-star-outline"></ion-icon>
|
||||
<ion-icon name="md-star"></ion-icon>
|
||||
<ion-icon name="md-stats"></ion-icon>
|
||||
<ion-icon name="md-stopwatch"></ion-icon>
|
||||
<ion-icon name="md-subway"></ion-icon>
|
||||
<ion-icon name="md-sunny"></ion-icon>
|
||||
<ion-icon name="md-swap"></ion-icon>
|
||||
<ion-icon name="md-switch"></ion-icon>
|
||||
<ion-icon name="md-sync"></ion-icon>
|
||||
<ion-icon name="md-tablet-landscape"></ion-icon>
|
||||
<ion-icon name="md-tablet-portrait"></ion-icon>
|
||||
<ion-icon name="md-tennisball"></ion-icon>
|
||||
<ion-icon name="md-text"></ion-icon>
|
||||
<ion-icon name="md-thermometer"></ion-icon>
|
||||
<ion-icon name="md-thumbs-down"></ion-icon>
|
||||
<ion-icon name="md-thumbs-up"></ion-icon>
|
||||
<ion-icon name="md-thunderstorm"></ion-icon>
|
||||
<ion-icon name="md-time"></ion-icon>
|
||||
<ion-icon name="md-timer"></ion-icon>
|
||||
<ion-icon name="md-today"></ion-icon>
|
||||
<ion-icon name="md-train"></ion-icon>
|
||||
<ion-icon name="md-transgender"></ion-icon>
|
||||
<ion-icon name="md-trash"></ion-icon>
|
||||
<ion-icon name="md-trending-down"></ion-icon>
|
||||
<ion-icon name="md-trending-up"></ion-icon>
|
||||
<ion-icon name="md-trophy"></ion-icon>
|
||||
<ion-icon name="md-tv"></ion-icon>
|
||||
<ion-icon name="md-umbrella"></ion-icon>
|
||||
<ion-icon name="md-undo"></ion-icon>
|
||||
<ion-icon name="md-unlock"></ion-icon>
|
||||
<ion-icon name="md-videocam"></ion-icon>
|
||||
<ion-icon name="md-volume-high"></ion-icon>
|
||||
<ion-icon name="md-volume-low"></ion-icon>
|
||||
<ion-icon name="md-volume-mute"></ion-icon>
|
||||
<ion-icon name="md-volume-off"></ion-icon>
|
||||
<ion-icon name="md-walk"></ion-icon>
|
||||
<ion-icon name="md-wallet"></ion-icon>
|
||||
<ion-icon name="md-warning"></ion-icon>
|
||||
<ion-icon name="md-watch"></ion-icon>
|
||||
<ion-icon name="md-water"></ion-icon>
|
||||
<ion-icon name="md-wifi"></ion-icon>
|
||||
<ion-icon name="md-wine"></ion-icon>
|
||||
<ion-icon name="md-woman"></ion-icon>
|
||||
|
||||
<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: blue;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,2 +0,0 @@
|
||||
export { addIcons } from './icon/utils';
|
||||
export * from './components';
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
});
|
||||
@@ -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>
|
||||
@@ -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 |
@@ -0,0 +1,167 @@
|
||||
<!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>
|
||||
|
||||
<body>
|
||||
<h1>Ionicons</h1>
|
||||
|
||||
<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 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>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>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>Stroke width</h2>
|
||||
<ion-icon name="heart-outline" style="--ionicon-stroke-width: 8px"></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</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 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 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>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>
|
||||
|
||||
<h1>RTL</h1>
|
||||
|
||||
<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>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>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>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: 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: 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, 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>
|
||||
|
||||
<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>
|
||||
|
||||
<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: blue;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,2 @@
|
||||
export { addIcons } from './components/icon/utils';
|
||||
export type { Components, JSX } from './components';
|
||||
@@ -1,14 +0,0 @@
|
||||
@import "ionicons-variables";
|
||||
/*!
|
||||
Ionicons, v#{$ionicons-version}
|
||||
Created by Ben Sperry for the Ionic Framework, http://ionicons.com/
|
||||
https://twitter.com/benjsperry https://twitter.com/ionicframework
|
||||
MIT License: https://github.com/driftyco/ionicons
|
||||
|
||||
Android-style icons originally built by Google’s
|
||||
Material Design Icons: https://github.com/google/material-design-icons
|
||||
used under CC BY http://creativecommons.org/licenses/by/4.0/
|
||||
Modified icons to fit ionicon’s grid from original.
|
||||
*/
|
||||
|
||||
@import "ionicons-icons";
|
||||
@@ -1,7 +0,0 @@
|
||||
@charset "UTF-8";
|
||||
// Ionicons Variables
|
||||
// --------------------------
|
||||
|
||||
$ionicons-font-path: "../fonts" !default;
|
||||
$ionicons-font-family: "Ionicons" !default;
|
||||
$ionicons-version: "4.0.0-0" !default;
|
||||
@@ -1,44 +0,0 @@
|
||||
@import "ionicons-variables";
|
||||
/*!
|
||||
Ionicons, v#{$ionicons-version}
|
||||
Created by Ben Sperry for the Ionic Framework, http://ionicons.com/
|
||||
https://twitter.com/benjsperry https://twitter.com/ionicframework
|
||||
MIT License: https://github.com/driftyco/ionicons
|
||||
|
||||
Android-style icons originally built by Google’s
|
||||
Material Design Icons: https://github.com/google/material-design-icons
|
||||
used under CC BY http://creativecommons.org/licenses/by/4.0/
|
||||
Modified icons to fit ionicon’s grid from original.
|
||||
*/
|
||||
|
||||
// Ionicons
|
||||
// --------------------------
|
||||
|
||||
@font-face {
|
||||
font-family: "Ionicons";
|
||||
src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}");
|
||||
src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}#iefix") format("embedded-opentype"),
|
||||
url("#{$ionicons-font-path}/ionicons.woff2?v=#{$ionicons-version}") format("woff2"),
|
||||
url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"),
|
||||
url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype"),
|
||||
url("#{$ionicons-font-path}/ionicons.svg?v=#{$ionicons-version}#Ionicons") format("svg");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.ion {
|
||||
display: inline-block;
|
||||
font-family: "Ionicons";
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
text-rendering: auto;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
@import "ionicons-common";
|
||||
@import "ionicons-icons";
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle fill="none" stroke="#000" stroke-linejoin="round" stroke-width="32" cx="256" cy="56" r="40"/><path fill="none" stroke="#000" stroke-linejoin="round" stroke-width="32" d="M204.23,274.44c2.9-18.06,4.2-35.52-.5-47.59-4-10.38-12.7-16.19-23.2-20.15L88,176.76c-12-4-23.21-10.7-24-23.94-1-17,14-28,29-24,0,0,88,31.14,163,31.14s162-31,162-31c18-5,30,9,30,23.79,0,14.21-11,19.21-24,23.94l-88,31.91c-8,3-21,9-26,18.18-6,10.75-5,29.53-2.1,47.59l5.9,29.63L351.21,467.9c2.8,13.15-6.3,25.44-19.4,27.74S308,489,304.12,476.28L266.56,360.35q-2.71-8.34-4.8-16.87L256,320l-5.3,21.65q-2.52,10.35-5.8,20.48L208,476.18c-4,12.85-14.5,21.75-27.6,19.46S158,480.05,160.94,467.9l37.39-163.83Z"/></svg>
|
||||
|
After Width: | Height: | Size: 744 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M448,112c-66.82,17.92-119.55,32-192,32S130.82,129.92,64,112L48,163c48,20.53,96.71,35.16,147.2,53.2L144,496l56.4,16L246,336h20l45.6,176L368,496,316.8,216.2C367.26,199.93,416,183.53,464,164Z"/><path d="M256,112a56,56,0,1,1,56-56A56.06,56.06,0,0,1,256,112Z"/></svg>
|
||||
|
After Width: | Height: | Size: 333 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256,112a56,56,0,1,1,56-56A56.06,56.06,0,0,1,256,112Z"/><path d="M432,112.8l-.45.12h0l-.42.13c-1,.28-2,.58-3,.89-18.61,5.46-108.93,30.92-172.56,30.92-59.13,0-141.28-22-167.56-29.47a73.79,73.79,0,0,0-8-2.58c-19-5-32,14.3-32,31.94,0,17.47,15.7,25.79,31.55,31.76v.28l95.22,29.74c9.73,3.73,12.33,7.54,13.6,10.84,4.13,10.59.83,31.56-.34,38.88l-5.8,45L150.05,477.44q-.15.72-.27,1.47l-.23,1.27h0c-2.32,16.15,9.54,31.82,32,31.82,19.6,0,28.25-13.53,32-31.94h0s28-157.57,42-157.57,42.84,157.57,42.84,157.57h0c3.75,18.41,12.4,31.94,32,31.94,22.52,0,34.38-15.74,32-31.94-.21-1.38-.46-2.74-.76-4.06L329,301.27l-5.79-45c-4.19-26.21-.82-34.87.32-36.9a1.09,1.09,0,0,0,.08-.15c1.08-2,6-6.48,17.48-10.79l89.28-31.21a16.9,16.9,0,0,0,1.62-.52c16-6,32-14.3,32-31.93S451,107.81,432,112.8Z"/></svg>
|
||||
|
After Width: | Height: | Size: 846 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M448,256c0-106-86-192-192-192S64,150,64,256s86,192,192,192S448,362,448,256Z" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><line x1="256" y1="176" x2="256" y2="336" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="336" y1="256" x2="176" y2="256" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 545 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M256,48C141.31,48,48,141.31,48,256s93.31,208,208,208,208-93.31,208-208S370.69,48,256,48Zm96,224H272v80H240V272H160V240h80V160h32v80h80Z"/></svg>
|
||||
|
After Width: | Height: | Size: 268 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M256,48C141.31,48,48,141.31,48,256s93.31,208,208,208,208-93.31,208-208S370.69,48,256,48Zm80,224H272v64a16,16,0,0,1-32,0V272H176a16,16,0,0,1,0-32h64V176a16,16,0,0,1,32,0v64h64a16,16,0,0,1,0,32Z"/></svg>
|
||||
|
After Width: | Height: | Size: 325 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><line x1="256" y1="112" x2="256" y2="400" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="400" y1="256" x2="112" y2="256" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 389 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><line x1="256" y1="112" x2="256" y2="400" style="fill:none;stroke:#000;stroke-linecap:square;stroke-linejoin:round;stroke-width:32px"/><line x1="400" y1="256" x2="112" y2="256" style="fill:none;stroke:#000;stroke-linecap:square;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 391 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><line x1="256" y1="112" x2="256" y2="400" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="400" y1="256" x2="112" y2="256" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 389 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M407.72,224c-3.4,0-14.79.1-18,.3l-64.9,1.7a1.83,1.83,0,0,1-1.69-.9L193.55,67.56A9,9,0,0,0,186.89,64H160l73,161a2.35,2.35,0,0,1-2.26,3.35l-121.69,1.8a8.06,8.06,0,0,1-6.6-3.1l-37-45c-3-3.9-8.62-6-13.51-6H33.08c-1.29,0-1.1,1.21-.75,2.43L52.17,249.9a16.3,16.3,0,0,1,0,11.9L32.31,333c-.59,1.95-.52,3,1.77,3H52c8.14,0,9.25-1.06,13.41-6.3l37.7-45.7a8.19,8.19,0,0,1,6.6-3.1l120.68,2.7a2.7,2.7,0,0,1,2.43,3.74L160,448h26.64a9,9,0,0,0,6.65-3.55L323.14,287c.39-.6,2-.9,2.69-.9l63.9,1.7c3.3.2,14.59.3,18,.3C452,288.1,480,275.93,480,256S452.12,224,407.72,224Z" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 770 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M407.72,208c-2.72,0-14.44.08-18.67.31l-57.77,1.52L198.06,48H135.25l74.59,164.61-97.31,1.44L68.25,160H16.14l20.61,94.18c.15.54.33,1.07.53,1.59a.26.26,0,0,1,0,.15,15.42,15.42,0,0,0-.53,1.58L15.86,352H67.64l45.45-55,96.77,2.17L135.24,464h63l133-161.75,57.77,1.54c4.29.23,16,.31,18.66.31,24.35,0,44.27-3.34,59.21-9.94C492.22,283,496,265.46,496,256,496,225.94,463,208,407.72,208Zm-71.29,87.9v0Z"/></svg>
|
||||
|
After Width: | Height: | Size: 522 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M186.62,464H160a16,16,0,0,1-14.57-22.6l64.46-142.25L113.1,297,77.8,339.77C71.07,348.23,65.7,352,52,352H34.08a17.66,17.66,0,0,1-14.7-7.06c-2.38-3.21-4.72-8.65-2.44-16.41l19.82-71c.15-.53.33-1.06.53-1.58a.38.38,0,0,0,0-.15,14.82,14.82,0,0,1-.53-1.59L16.92,182.76c-2.15-7.61.2-12.93,2.56-16.06a16.83,16.83,0,0,1,13.6-6.7H52c10.23,0,20.16,4.59,26,12l34.57,42.05,97.32-1.44-64.44-142A16,16,0,0,1,160,48h26.91a25,25,0,0,1,19.35,9.8l125.05,152,57.77-1.52c4.23-.23,15.95-.31,18.66-.31C463,208,496,225.94,496,256c0,9.46-3.78,27-29.07,38.16-14.93,6.6-34.85,9.94-59.21,9.94-2.68,0-14.37-.08-18.66-.31l-57.76-1.54-125.36,152A25,25,0,0,1,186.62,464Z"/></svg>
|
||||
|
After Width: | Height: | Size: 769 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M416.07,272a160,160,0,1,0-160,160A160,160,0,0,0,416.07,272Z" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><path d="M142.12,91.21A46.67,46.67,0,0,0,112,80l-2.79.08C83.66,81.62,64,104,64.07,131c0,13.21,4.66,19.37,10.88,27.23A4.55,4.55,0,0,0,78.19,160h.88a3.23,3.23,0,0,0,2.54-1.31L142.38,99a5.38,5.38,0,0,0,1.55-4A5.26,5.26,0,0,0,142.12,91.21Z" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><path d="M369.88,91.21A46.67,46.67,0,0,1,400,80l2.79.08C428.34,81.62,448,104,447.93,131c0,13.21-4.66,19.37-10.88,27.23a4.55,4.55,0,0,1-3.24,1.76h-.88a3.23,3.23,0,0,1-2.54-1.31L369.62,99a5.38,5.38,0,0,1-1.55-4A5.26,5.26,0,0,1,369.88,91.21Z" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><polyline points="256.07 160 256.07 272 176.07 272" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="416.07" y1="432" x2="376.07" y2="392" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="96.07" y1="432" x2="136.07" y2="392" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M403.79,64.11l-3.27-.1H400c-14.73,0-28.55,5.91-40.52,15S344,96,344,96l88,86s11.25-5.71,17.61-13.85,14.28-18.08,14.32-37.11C464,95.55,437.6,66.15,403.79,64.11Z"/><path d="M108.21,64.11l3.27-.1H112c14.73,0,28.55,5.91,40.52,15S168,96,168,96L80,182s-11.25-5.71-17.61-13.85S48.11,150.07,48.07,131C48,95.55,74.4,66.15,108.21,64.11Z"/><path d="M391.3,384.6a.06.06,0,0,1,0-.08C425,344,441,288.24,427,229.23c-13.64-57.52-72.67-115.69-130.34-128.66C182,74.79,80.07,161.71,80.07,272a175.15,175.15,0,0,0,40.78,112.52.06.06,0,0,1,0,.08L73,432a.06.06,0,0,0,0,.08L96,454.59a.06.06,0,0,0,.08,0l47.43-47.37a.06.06,0,0,1,.08,0,175.64,175.64,0,0,0,225.05,0,0,0,0,0,1,.07,0L416,454.59a.06.06,0,0,0,.08,0L440,432ZM272.07,288h-112A0,0,0,0,1,160,288v-31.9a0,0,0,0,1,.05-.05h80a0,0,0,0,0,0-.05V144h32Z"/></svg>
|
||||
|
After Width: | Height: | Size: 910 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M153.59,110.46A21.41,21.41,0,0,0,152.48,79h0A62.67,62.67,0,0,0,112,64l-3.27.09-.48,0C74.4,66.15,48,95.55,48.07,131c0,19,8,29.06,14.32,37.11a20.61,20.61,0,0,0,14.7,7.8c.26,0,.7.05,2,.05a19.06,19.06,0,0,0,13.75-5.89Z"/><path d="M403.79,64.11l-3.27-.1H400a62.67,62.67,0,0,0-40.52,15,21.41,21.41,0,0,0-1.11,31.44l60.77,59.65A19.06,19.06,0,0,0,432.93,176c1.28,0,1.72,0,2-.05a20.61,20.61,0,0,0,14.69-7.8c6.36-8.05,14.28-18.08,14.32-37.11C464,95.55,437.6,66.15,403.79,64.11Z"/><path d="M256.07,96c-97,0-176,78.95-176,176a175.23,175.23,0,0,0,40.81,112.56L84.76,420.69a16,16,0,1,0,22.63,22.62l36.12-36.12a175.63,175.63,0,0,0,225.12,0l36.13,36.12a16,16,0,1,0,22.63-22.62l-36.13-36.13A175.17,175.17,0,0,0,432.07,272C432.07,175,353.12,96,256.07,96Zm16,176a16,16,0,0,1-16,16h-80a16,16,0,0,1,0-32h64V160a16,16,0,0,1,32,0Z"/></svg>
|
||||
|
After Width: | Height: | Size: 940 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><rect x="64" y="176" width="384" height="256" rx="28.87" ry="28.87" style="fill:none;stroke:#000;stroke-linejoin:round;stroke-width:32px"/><line x1="144" y1="80" x2="368" y2="80" style="stroke:#000;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/><line x1="112" y1="128" x2="400" y2="128" style="stroke:#000;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 504 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><rect x="128" y="64" width="256" height="32"/><rect x="96" y="112" width="320" height="32"/><path d="M464,448H48V160H464Z"/></svg>
|
||||
|
After Width: | Height: | Size: 245 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M368,96H144a16,16,0,0,1,0-32H368a16,16,0,0,1,0,32Z"/><path d="M400,144H112a16,16,0,0,1,0-32H400a16,16,0,0,1,0,32Z"/><path d="M419.13,448H92.87A44.92,44.92,0,0,1,48,403.13V204.87A44.92,44.92,0,0,1,92.87,160H419.13A44.92,44.92,0,0,1,464,204.87V403.13A44.92,44.92,0,0,1,419.13,448Z"/></svg>
|
||||
|
After Width: | Height: | Size: 411 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M448,256c0-106-86-192-192-192S64,150,64,256s86,192,192,192S448,362,448,256Z" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><path d="M250.26,166.05,256,288l5.73-121.95a5.74,5.74,0,0,0-5.79-6h0A5.74,5.74,0,0,0,250.26,166.05Z" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><path d="M256,367.91a20,20,0,1,1,20-20A20,20,0,0,1,256,367.91Z"/></svg>
|
||||
|
After Width: | Height: | Size: 535 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><polygon points="240 304 272 304 278 144 234 144 240 304" style="fill:none"/><path d="M256,48C141.31,48,48,141.31,48,256s93.31,208,208,208,208-93.31,208-208S370.69,48,256,48Zm20,319.91H236v-40h40ZM272,304H240l-6-160h44Z"/></svg>
|
||||
|
After Width: | Height: | Size: 343 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M256,48C141.31,48,48,141.31,48,256s93.31,208,208,208,208-93.31,208-208S370.69,48,256,48Zm0,319.91a20,20,0,1,1,20-20A20,20,0,0,1,256,367.91Zm21.72-201.15-5.74,122a16,16,0,0,1-32,0l-5.74-121.94v-.05a21.74,21.74,0,1,1,43.44,0Z"/></svg>
|
||||
|
After Width: | Height: | Size: 356 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M256,80c-8.66,0-16.58,7.36-16,16l8,216a8,8,0,0,0,8,8h0a8,8,0,0,0,8-8l8-216C272.58,87.36,264.66,80,256,80Z" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><circle cx="256" cy="416" r="16" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 454 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><polygon points="240 80 248 320 264 320 272 80 240 80" style="fill:none;stroke:#000;stroke-linecap:square;stroke-miterlimit:10;stroke-width:32px"/><rect x="240" y="400" width="32" height="32" style="fill:none;stroke:#000;stroke-linecap:square;stroke-miterlimit:10;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 405 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M256,80c-8.66,0-16.58,7.36-16,16l8,216a8,8,0,0,0,8,8h0a8,8,0,0,0,8-8l8-216C272.58,87.36,264.66,80,256,80Z" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><circle cx="256" cy="416" r="16" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 454 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><ellipse cx="256" cy="256" rx="267.57" ry="173.44" transform="translate(-106.04 256) rotate(-45)" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="334.04" y1="177.96" x2="177.96" y2="334.04" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="278.3" y1="278.3" x2="233.7" y2="233.7" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="322.89" y1="233.7" x2="278.3" y2="189.11" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="456.68" y1="211.4" x2="300.6" y2="55.32" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="211.4" y1="456.68" x2="55.32" y2="300.6" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="233.7" y1="322.89" x2="189.11" y2="278.3" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M120.9,120.51c-44.75,44.56-67.29,101.05-78.64,145.9L244.57,467.85c45.05-11.3,101.78-33.74,146.53-78.3s67.29-101.05,78.64-145.91L267.43,42.21C222.38,53.51,165.65,76,120.9,120.51Zm259,257.83h0Zm-45-224.2,22.52,22.42-33.78,33.63,22.52,22.42L323.55,255,301,232.61,278.52,255,301,277.45l-22.51,22.42L256,277.45l-22.52,22.42L256,322.29l-22.52,22.42L211,322.29l-33.78,33.63L154.67,333.5l33.78-33.63-22.52-22.42L188.45,255,211,277.45,233.48,255,211,232.61l22.51-22.42L256,232.61l22.52-22.42L256,187.77l22.52-22.42L301,187.77Z"/><path d="M478.48,198.41C485.85,143.65,464,48.05,464,48.05S367.86,26.17,312.86,33.51c-2.54.33-5.21.72-8,1.14L477.33,206.36C477.76,203.6,478.14,200.94,478.48,198.41Z"/><path d="M33.52,311.65C26.15,366.41,48.05,464,48.05,464s60,16,99.86,16a391.92,391.92,0,0,0,51.23-3.45c2.54-.33,5.21-.72,8-1.15L34.67,303.7C34.24,306.46,33.86,309.12,33.52,311.65Z"/></svg>
|
||||
|
After Width: | Height: | Size: 997 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M122.06,122.06c-44.37,44.37-66.71,100.61-78,145.28L244.66,467.9c44.67-11.25,100.91-33.59,145.28-78s66.71-100.61,78-145.28L267.34,44.1C222.67,55.35,166.43,77.69,122.06,122.06ZM378.79,378.78h0ZM300.65,189,323,166.71A15.78,15.78,0,0,1,345.29,189L323,211.35l11.16,11.17a15.78,15.78,0,0,1-22.32,22.32l-11.16-11.16L278.32,256l11.16,11.16a15.78,15.78,0,1,1-22.32,22.32L256,278.32l-22.32,22.33,11.16,11.16a15.78,15.78,0,1,1-22.32,22.32L211.35,323,189,345.29A15.78,15.78,0,0,1,166.71,323L189,300.65l-11.16-11.17a15.78,15.78,0,0,1,22.32-22.32l11.16,11.16L233.68,256l-11.16-11.16a15.78,15.78,0,1,1,22.32-22.32L256,233.68l22.32-22.33-11.16-11.16a15.78,15.78,0,0,1,22.32-22.32Z"/><path d="M476.57,199.63c7.31-54.53,4-120.26-20-144.21s-89.68-27.3-144.21-20c-2.51.34-5.16.72-7.91,1.15l171,171C475.85,204.79,476.23,202.14,476.57,199.63Z"/><path d="M35.43,312.37c-7.31,54.53-4,120.26,20,144.21C72.17,473.33,109.34,480,148.84,480a387,387,0,0,0,50.79-3.43c2.51-.34,5.16-.72,7.91-1.15l-171-171C36.15,307.21,35.77,309.86,35.43,312.37Z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><line x1="344" y1="280" x2="432" y2="192" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="232" y1="216" x2="296" y2="280" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="80" y1="320" x2="184" y2="216" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><circle cx="456" cy="168" r="24" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><circle cx="320" cy="304" r="24" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><circle cx="208" cy="192" r="24" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><circle cx="56" cy="344" r="24" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 1021 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M450,128a46,46,0,0,0-44.11,59l-71.37,71.36a45.88,45.88,0,0,0-29,0l-52.91-52.91a46,46,0,1,0-89.12,0L75,293.88A46.08,46.08,0,1,0,106.11,325l87.37-87.36a45.85,45.85,0,0,0,29,0l52.92,52.92a46,46,0,1,0,89.12,0L437,218.12A46,46,0,1,0,450,128Z"/></svg>
|
||||
|
After Width: | Height: | Size: 369 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M456,128a40,40,0,0,0-37.23,54.6L334.6,266.77a39.86,39.86,0,0,0-29.2,0L245.23,206.6a40,40,0,1,0-74.46,0L70.6,306.77A40,40,0,1,0,93.23,329.4L193.4,229.23a39.86,39.86,0,0,0,29.2,0l60.17,60.17a40,40,0,1,0,74.46,0l84.17-84.17A40,40,0,1,0,456,128Z"/></svg>
|
||||
|
After Width: | Height: | Size: 374 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M448,256c0-106-86-192-192-192S64,150,64,256s86,192,192,192S448,362,448,256Z" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><line x1="360" y1="94.59" x2="360" y2="296" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="443.13" y1="212.87" x2="296" y2="360" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="417.41" y1="360" x2="216" y2="360" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="299.13" y1="443.13" x2="155.13" y2="299.13" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="152" y1="416" x2="152" y2="216" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="68.87" y1="299.13" x2="212.87" y2="155.13" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="94.59" y1="152" x2="288" y2="152" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="212.87" y1="68.87" x2="360" y2="216" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><polygon points="216 48 345.49 176.18 345.49 48 216 48"/><polygon points="181.47 58.38 80 134 256 134 181.47 58.38"/><polygon points="336 344 464 344 464 216 336 344"/><polygon points="454 182 378 80 378 256 454 182"/><polygon points="48 166 48 294 176 166 48 166"/><polygon points="330 454 432 378 256 378 330 454"/><polygon points="58 330 134 432 134 256 58 330"/><path d="M345.49,222.12l-55.55-55.46H222.06l-55.55,55.46v67.76l55.62,55.52c.44,0,.88-.06,1.33-.06h66.48l55.55-55.46Z"/><polygon points="165.98 336.09 166 464 294 464 165.98 336.09"/></svg>
|
||||
|
After Width: | Height: | Size: 669 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-a</title><path d="M250.54,129.17l-67.8-67.8A209.65,209.65,0,0,0,86.32,136h161.4A4,4,0,0,0,250.54,129.17Z"/><path d="M167.72,168H67.63A207.34,207.34,0,0,0,51.48,293.9L170.54,174.83A4,4,0,0,0,167.72,168Z"/><path d="M344,167.72V67.56A207.82,207.82,0,0,0,218.11,51.48L337.17,170.54A4,4,0,0,0,344,167.72Z"/><path d="M460.52,218.1,341.46,337.17a4,4,0,0,0,2.82,6.83H444.37a207.34,207.34,0,0,0,16.15-125.9Z"/><path d="M382.83,250.54l67.83-67.82A209.08,209.08,0,0,0,376,86.2V247.72A4,4,0,0,0,382.83,250.54Z"/><path d="M221.68,341.77a8,8,0,0,0,5.54,2.23h59.66a8,8,0,0,0,5.7-2.39l49.18-50a8,8,0,0,0,2.3-5.62L344,225.18a8,8,0,0,0-2.38-5.69l-50-49.25a8,8,0,0,0-5.63-2.3l-60.84.06a8,8,0,0,0-5.69,2.38l-49.25,50a8,8,0,0,0-2.3,5.63l.06,60.78a8,8,0,0,0,2.45,5.76Z"/><path d="M261.46,382.83l67.8,67.8A209.65,209.65,0,0,0,425.68,376H264.28A4,4,0,0,0,261.46,382.83Z"/><path d="M168,344.28V444.44a207.82,207.82,0,0,0,125.89,16.08L174.83,341.46A4,4,0,0,0,168,344.28Z"/><path d="M129.17,261.46,61.34,329.29A209.1,209.1,0,0,0,136,425.8V264.28A4,4,0,0,0,129.17,261.46Z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>ionicons-v5-h</title><rect x="64" y="64" width="80" height="80" rx="40" ry="40" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><rect x="216" y="64" width="80" height="80" rx="40" ry="40" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><rect x="368" y="64" width="80" height="80" rx="40" ry="40" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><rect x="64" y="216" width="80" height="80" rx="40" ry="40" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><rect x="216" y="216" width="80" height="80" rx="40" ry="40" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><rect x="368" y="216" width="80" height="80" rx="40" ry="40" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><rect x="64" y="368" width="80" height="80" rx="40" ry="40" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><rect x="216" y="368" width="80" height="80" rx="40" ry="40" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/><rect x="368" y="368" width="80" height="80" rx="40" ry="40" style="fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:32px"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |