Compare commits

...
458 Commits
Author SHA1 Message Date
Liam DeBeasi 5f3b70b10b merge release-7.2.2
Release 7.2.2
2023-12-13 10:44:15 -05:00
Liam DeBeasi 811a814ef9 chore: clean up 2023-12-13 09:41:34 -05:00
ionitron 54d5a17c13 chore(): update package lock files 2023-12-13 14:40:09 +00:00
ionitron fccc260627 v7.2.2 2023-12-13 14:40:04 +00:00
Liam DeBeasi d582e6208e fix(icon): add better warning when loading icons (#1297) 2023-11-06 16:28:38 -05:00
Sean Perkins 625d54fdad merge release-7.2.1
v7.2.1
2023-10-10 13:37:32 -04:00
Liam DeBeasi 841fb96543 remove duplicate entry 2023-10-10 13:21:53 -04:00
Sean Perkins 7f3aeb395a merge release-7.2.1
Release 7.2.1
2023-10-10 13:20:52 -04:00
ionitron 9dab13aef7 chore(): update package lock files 2023-10-10 17:10:51 +00:00
ionitron df6d6f8aeb v7.2.1 2023-10-10 17:10:45 +00:00
Sean Perkins 875bfd8300 fix(icon): font scales without host style (#1289) 2023-10-10 13:06:38 -04:00
Liam DeBeasi cb640b6208 chore(ci): ensure local version of lerna is used (#1288) 2023-10-10 10:42:07 -04:00
Liam DeBeasi 6a032e54cd merge release-7.2.0
Feature 7.2
2023-10-10 10:37:27 -04:00
Liam DeBeasi a3902ce3bb merge release-7.2.0
Release 7.2.0
2023-10-10 10:29:32 -04:00
Liam DeBeasi 8237f1ccaa chore: clean up 2023-10-10 10:23:57 -04:00
Liam DeBeasi 90bd5e911e v7.2.0 2023-10-10 10:20:54 -04:00
Liam DeBeasi 8297018cb5 fix(icon): mapping same icon does not warn (#1279) 2023-09-13 09:26:56 -04:00
Sean Perkins 0f8ade3867 chore(deps): upgrade to stencil 4 (#1257)
* chore(deps): upgrade to stencil 4

* chore: disable sourcemaps
2023-09-12 15:44:52 -04:00
Maria Hutt 7f7f346af4 fix(icon): verify the icon loads in the lifecycle (#1278)
Co-authored-by: sean-perkins <13732623+sean-perkins@users.noreply.github.com
>
2023-09-12 11:50:52 -07:00
Maria Hutt 1b7e8aac04 Merge pull request #1275 from ionic-team/feature-7.2-sync
chore: sync with main
2023-09-08 13:07:40 -07:00
Maria Hutt 8d36e66a21 Merge remote-tracking branch 'origin/main' into feature-7.2-sync 2023-09-08 12:25:30 -07:00
Maria Hutt 8369c36e88 chore(workflows): update node version to 18 (#1276) 2023-09-08 12:24:38 -07:00
Maria Hutt 2e5b6e0d31 Merge remote-tracking branch 'origin/main' into feature-7.2-sync 2023-09-08 11:55:52 -07:00
Maria Hutt 2752ad19b2 chore(print): add fax to tags (#1272) 2023-09-07 09:39:22 -07:00
Shawn Taylor b4e942b34f chore(CODEOWNERS): create codeowners file and add me (#1268) 2023-08-25 12:58:26 -04:00
Liam DeBeasi 1e33313473 feat: allow passing in only icon SVG data to addIcons (#1256) 2023-08-22 09:46:13 -04:00
Sean Perkins 45c04dda6c feat(icon): support for dynamic type (#1246) 2023-08-09 10:57:03 -04:00
Shawn Taylor b1235589bb chore(): remove unused files (#1232)
* Remove icon font

* Removed unused docs icons
2023-06-16 09:21:02 -04:00
André e2fbb3e5fb Edit open icon tags for better searchability (#716) 2023-06-02 12:00:26 -05:00
Liam DeBeasi 90aee31ff7 merge release-7.1.2
v7.1.2
2023-05-30 15:32:38 -04:00
Liam DeBeasi b3ddc6e77f chore: remove duplicate changelog entry 2023-05-30 15:22:17 -04:00
ionitron 871ad4b97a chore(): update package lock files 2023-05-30 19:21:57 +00:00
ionitron 24d92f8f1d v7.1.2 2023-05-30 19:21:52 +00:00
Liam DeBeasi 06fa4a528d fix(icon): add :dir fallback (#1223) 2023-05-30 15:17:36 -04:00
Liam DeBeasi 3992b01883 merge release-7.1.1
Release 7.1.1
2023-05-23 13:57:07 -04:00
Liam DeBeasi 909a6cf1c4 chore: remove duplicate changelog entry 2023-05-23 13:48:49 -04:00
ionitron cdd0623792 chore(): update package lock files 2023-05-23 17:46:20 +00:00
ionitron 0fd63998b9 v7.1.1 2023-05-23 17:46:14 +00:00
Shawn TaylorandLiam DeBeasi 7466383539 chore(): update dev dependencies (#1216)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-05-23 07:55:51 -04:00
Shawn Taylor 31ea9450b6 docs(): change link from slack to discord (#1217) 2023-05-20 09:24:45 -06:00
Shawn Taylorandionitron e70bf214b8 fix(icon): respond to changes of document dir (#1210)
* fix(icon): respond to changes of document dir

* Add snapshot for rtl

* Remove unused function

* Add tests

* CSS-only solution

* chore(): add updated snapshots

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2023-05-19 10:17:26 -04:00
Liam DeBeasi fb46c75128 chore(ci): update workflows for upcoming deprecations (#1209) 2023-05-03 08:34:27 -04:00
jaredcbaumandLiam DeBeasi 4b2ed58009 chore(readme): ionic slack -> discord (#1208)
* chore(readme): ionic slack -> discord

* chore(contributing): slack -> discord

* Update .github/CONTRIBUTING.md

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>

* Update readme.md

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-04-26 11:45:56 -06:00
Lars Mikkelsen c86778cc7b chore(ci): enable npm package provenance (#1206) 2023-04-24 15:19:50 -04:00
Sean Perkins 99bb8f64f6 merge release-7.1.0
v7.1.0
2023-03-23 14:52:07 -04:00
Sean Perkins 3691e75d77 chore: remove duplicate changelog diff 2023-03-23 13:10:41 -04:00
ionitron 3904e85e61 chore(): update package lock files 2023-03-23 15:49:23 +00:00
ionitron 4fcee649df v7.1.0 2023-03-23 15:49:18 +00:00
Sean Perkins e4bf096aaf Merge remote-tracking branch 'origin/feature-7.1' into release-7.1.0 2023-03-23 11:43:25 -04:00
Sean Perkins cdb0d80cde feat: chevron-expand and chevron-collapse icons (#1198) 2023-03-22 16:13:00 -04:00
Liam DeBeasi e358a4f418 merge feature-7.0
Feature 7.0
2023-03-07 13:07:44 -05:00
Liam DeBeasi 0f6c84f976 merge release-7.0.0
Release 7.0.0
2023-03-07 08:52:02 -05:00
Liam DeBeasi 63788874db chore(): add migration note 2023-03-07 08:51:36 -05:00
ionitron ac450cbd28 chore(): update package lock files 2023-03-07 13:49:51 +00:00
ionitron 2ffcb6a012 v7.0.0 2023-03-07 13:49:46 +00:00
Liam DeBeasi 998b9207f3 chore(): sync with main
chore(): sync with main
2023-03-07 08:47:10 -05:00
Liam DeBeasi c290bea476 chore(): sync with main 2023-03-07 08:42:57 -05:00
Brandy Carney f2ed84a256 docs(contributing): include a link to contribute to the ionicons site (#1183) 2023-03-03 11:32:27 -05:00
Liam DeBeasi 7f3f55c94e merge release-6.1.3
Release 6.1.3
2023-02-09 12:39:57 -05:00
Liam DeBeasi ffcf9f9034 chore(): cleanup changelog 2023-02-09 12:35:41 -05:00
ionitron 6116bc2627 chore(): update package lock files 2023-02-09 17:34:58 +00:00
ionitron b7c9bb024a v6.1.3 2023-02-09 17:34:54 +00:00
Sean Perkins 8c412f6748 fix: DomParser usage in SSR (#1180)
Resolves #1179
2023-02-09 12:30:17 -05:00
Liam DeBeasi 53ce49e929 merge release-6.1.2
Release 6.1.2
2023-02-08 09:20:16 -05:00
Liam DeBeasi b27268f7db fix changelog 2023-02-08 09:13:59 -05:00
ionitron 2c1b968bff chore(): update package lock files 2023-02-08 14:05:12 +00:00
ionitron 3342166f7f v6.1.2 2023-02-08 14:05:08 +00:00
Sean Perkins 72f09369de fix(icon): load base64 data urls (#1172) 2023-02-07 16:37:42 -05:00
Liam DeBeasi 6e7ff0defc merge release-6.1.1
Merge Release 6.1.1
2023-02-06 15:08:02 -05:00
Liam DeBeasi 193e7f565a Merge branch 'main' into release-6.1.1 2023-02-06 09:44:14 -05:00
Liam DeBeasi 65bcbb4777 fix(icon): md and ios properties are reactive (#1174)
resolves #802
2023-02-03 09:19:32 -05:00
Amanda Johnston 98975ec0f5 fix(icon): remove auto-generated aria-label (#1170) 2023-01-20 10:18:28 -06:00
ionitron 2e9b493a05 chore(): update package lock files 2023-01-18 13:41:57 +00:00
ionitron 8f1f7fe9f3 v6.1.1 2023-01-18 13:41:52 +00:00
jonz94 93b4fa449b fix(icon): remove <title> during build step (#1169)
resolves #1168
2023-01-18 08:39:28 -05:00
Liam DeBeasi ee16638d07 merge release-6.1.0
Release 6.1.0
2023-01-17 14:32:46 -05:00
ionitron 2e76547a79 chore(): update package lock files 2023-01-17 19:28:11 +00:00
ionitron d7b25e79aa v6.1.0 2023-01-17 19:28:04 +00:00
Liam DeBeasi e0efa5f28d fix(icon): remove default <title> (#1166)
resolves #838, resolves #1049, resolves #1082
2023-01-17 14:12:32 -05:00
Liam DeBeasi 1b98f9d99f chore(ci): add production release script (#1154) 2022-11-18 13:42:30 -05:00
Liam DeBeasi 3bb4ba919f chore(ci): add lerna (#1153) 2022-11-18 13:19:19 -05:00
Liam DeBeasi 9cf31324ff chore(ci): add release CI stub (#1151) 2022-11-18 13:00:46 -05:00
Liam DeBeasi 1af1b48afb chore(ci): do not tag release for dev builds (#1152) 2022-11-18 11:34:00 -05:00
Liam DeBeasi 86ef073aca chore(): add bump version script (#1150) 2022-11-18 10:56:20 -05:00
Liam DeBeasi 33193e3749 chore(ci): add dev build task (#1149) 2022-11-18 10:49:15 -05:00
Liam DeBeasi 9d2dc11e08 merge release-6.0.4
6.0.4
2022-11-08 14:44:07 -05:00
Liam DeBeasi 44da0e40c5 6.0.4 2022-11-08 14:36:33 -05:00
Sean Perkins cafe8e6541 chore: exclude playwright test infra and test svg assets from collection output (#1143) 2022-11-08 14:33:56 -05:00
Sean Perkins 66858926cc fix(icon): icons will load when content security policies are enabled (#1141) 2022-11-08 13:45:01 -05:00
Amanda Johnston c37b691dd5 fix(): flip-rtl works if dir="rtl" is set on icon directly (#1142) 2022-11-08 10:11:26 -06:00
Vinay Harwani 0e3ba9922c chore(readme): update cdn url version in readme (#1112)
resolves #1093
2022-10-14 14:30:02 -04:00
Liam DeBeasi 36992fc01b chore(ci): e2e tests are run on CI (#1126) 2022-10-14 13:50:00 -04:00
Liam DeBeasi 5f2aab6cbe chore(ci): add update screenshots stub (#1125) 2022-09-30 16:38:13 -04:00
Liam DeBeasi fd90487afc test(icon): add playwright (#1124) 2022-09-30 16:36:12 -04:00
Liam DeBeasi 06b9b1fc59 chore(typescript): resolve errors (#1122) 2022-09-30 16:03:11 -04:00
Liam DeBeasi 0dfccdf016 chore(ci): run build on CI (#1121) 2022-09-30 15:23:48 -04:00
Brandy Carney 69e0817503 chore(github): remove duplicate labels key (#1119) 2022-09-29 16:15:04 -04:00
Brandy Carney 19629000ca chore(github): add ionitron issue bot for labeling (#1115) 2022-09-27 11:39:48 -04:00
Liam DeBeasi d13cd3333c chore(github): add issue templates (#1106) 2022-09-21 11:29:16 -04:00
Liam DeBeasi 20c396d8d7 merge release-6.0.3
6.0.3
2022-08-26 08:15:08 -05:00
Liam DeBeasi b6903a0ad8 6.0.3 2022-08-26 09:13:41 -04:00
Marco D'Auria 8d898d7170 fix(icon): sanitizer checks attribute name instead of value (#1087)
resolves #1088
2022-08-26 09:10:58 -04:00
Liam DeBeasi 7dd69094d1 merge release-6.0.2
6.0.2
2022-05-31 17:18:32 -04:00
Liam DeBeasi e79e5cd235 6.0.2 2022-05-31 17:17:27 -04:00
Liam DeBeasi 86a051ca63 merge release-6.0.1 2022-05-31 17:16:42 -04:00
Liam DeBeasi 28d0338ee0 fix(): improve compatibility with vite (#1066) 2022-05-31 17:14:57 -04:00
Liam DeBeasi 3ec9271e83 fix(icon): using icon in ssr environment no longer errors on HTMLElement (#1035) 2022-01-19 14:47:20 -05:00
Liam DeBeasi 19dd66469c merge release-6.0.0
6.0.0
2021-11-11 16:26:58 -05:00
Liam DeBeasi 43d61fe909 6.0.0 2021-11-08 16:29:59 -05:00
Liam DeBeasi 1038a7f682 fix(icon): avoid type collisions with ariaLabel and ariaHidden (#1014) 2021-11-08 16:26:01 -05:00
Liam DeBeasi 947091adf7 chore(): add install loader script 2021-11-02 17:22:18 +00:00
Liam DeBeasi 728aa746a0 merge release-5.5.4
5.5.4
2021-11-02 13:10:35 -04:00
Liam DeBeasi 32da247bc1 5.5.4 2021-11-02 13:08:44 -04:00
Liam DeBeasi f21bb0f097 chore(): update ionicons to stencil 2.10 (#1015) 2021-11-02 12:27:22 -04:00
Liam DeBeasi e6a5af1a96 merge release-5.5.3
5.5.3
2021-08-03 09:21:16 -04:00
Liam DeBeasi 36a0c6b103 5.5.3 2021-08-03 09:18:39 -04:00
Damian Tarnawsky e63653cbe1 fix(): reflect name property as attribute (#981)
resolves #975
2021-08-03 09:13:45 -04:00
Liam DeBeasi 4ca8139f77 5.5.2 (#983) 2021-06-17 10:12:16 -04:00
Liam DeBeasi 24caaad7d9 fix(build): add old ionicons.js file (#982) 2021-06-17 09:51:50 -04:00
Liam DeBeasi 8c2a507fcf 5.5.1 2021-03-22 14:11:16 -04:00
Liam DeBeasi c76f2a2556 fix(): adding aria-hidden no longer disables automatic rtl switching (#954) 2021-03-22 14:09:03 -04:00
Rafael Kraut 0d7f507677 chore: add tag "globe" to earth (#919) 2021-02-09 16:14:09 -06:00
Adam Bradley b3155d9603 5.5.0 2021-02-09 16:04:52 -06:00
Adam Bradley 9139a01e18 5.5.0-1 2021-02-02 09:46:20 -06:00
Adam Bradley 0541db0f28 chore: add "components/" to package json files 2021-02-02 09:45:34 -06:00
Adam Bradley 200678a619 5.5.0-0 2021-02-01 15:36:05 -06:00
Adam Bradley 66556ea45c feat(custom-elements): export ionicons/components
Also provide ionicons as a custom element which can be defined using `customElements.define()`

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

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

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

```
import { setAssetPath } from "ionicons/components";
setAssetPath(location.href);
```
2021-02-01 15:28:33 -06:00
Adam Bradley b1c23f8dee 5.4.0 2021-01-26 12:18:27 -06:00
Adam Bradley 81f2fc1a84 feat: add new icons 2021-01-26 12:17:36 -06:00
Kevin Ports 1543daa010 5.3.0 2021-01-04 16:11:54 -06:00
Kevin Ports 500d15fec0 Add Microsoft logo 2021-01-04 14:59:33 -06:00
Adam Bradley a30dfb2886 update readme 2020-10-07 16:43:33 -05:00
Adam Bradley f16c5fb13d 5.2.3 2020-10-07 16:19:04 -05:00
Adam Bradley a134c76d50 update scripts 2020-10-07 16:16:53 -05:00
Adam Bradley 6753d715e2 using github releases for changelog instead 2020-10-07 14:38:17 -05:00
Adam Bradley c3722987c5 remove unused packages 2020-10-07 14:29:44 -05:00
Adam Bradley 7f96d8c725 5.2.2 2020-10-07 14:26:08 -05:00
Adam Bradley 7666f2d97a use np for release 2020-10-07 14:25:13 -05:00
Adam Bradley b73bb075fd update property docs 2020-10-07 14:24:56 -05:00
Ben 486ae96765 Fix unlink icons 2020-10-07 10:36:31 -05:00
Adam Bradley eca4c14f05 feat(sanitize): opt-out of sanitizing http fetch svg content 2020-10-07 09:03:20 -05:00
Adam Bradley 3dbc0c8263 5.2.1 2020-10-06 11:31:39 -05:00
Adam Bradley 81edbf2387 fix: remove double ionicon css class on svg 2020-10-06 11:28:47 -05:00
Adam Bradley cb0b2124ec 5.2.0 2020-10-06 11:20:57 -05:00
Adam Bradley eef739789f feat(cheatsheet): link dist/svg to cheatsheet icons 2020-10-06 11:18:24 -05:00
Adam Bradley 98fa89ea57 feat(currentColor): update dist/svg output to use currentColor
Closes #784 #805
2020-10-06 11:11:56 -05:00
Ben 107c075d88 Update color to black 2020-10-06 11:02:47 -05:00
Ben 2f3effb33f Fix outlines 2020-10-06 10:05:33 -05:00
Adam Bradley c580023063 chore: update script target 2020-10-06 09:33:28 -05:00
Adam Bradley 0f77aaf2db fix(src): fixed source svg inlined styles 2020-10-05 23:02:59 -05:00
nothingismagick cc7291248f chore(build): add 'constructor' to reservedKeywords (#760)
See this:
https://github.com/dotboris/vuejs-serverside-template-xss
2020-10-05 18:00:30 -05:00
Brad Mallow 81d9ff1995 docs: multiple people icon update name (#797) 2020-10-05 17:57:35 -05:00
Adam Bradley 71c7d80e54 chore: update dev deps 2020-10-05 16:40:09 -05:00
Tyler Holden 95cd90d790 docs(search): add "arrow" search term for caret icons (#858)
* Update: Add 'arrow' search term to caret icons

* Improve search termns for clipboard

* Added arrow search term to chevron
2020-10-05 16:30:25 -05:00
Simon c0fb92b87f docs: use and refer to stroke-width everywhere (#879) 2020-10-05 16:29:12 -05:00
Ben 9de2a0760e feat(icons): added new icons
New and modified icons update
2020-10-05 15:32:20 -05:00
Ben Sperry 38efaa1e8f Merge pull request #846 from whoacowboy/unlink-icon
Adding unlink icon
2020-09-29 13:13:26 -05:00
David Dal Busco 502d1f7077 fix: ariaHidden documentation source (#871) 2020-08-18 11:27:04 -05:00
David Dal Busco 01b0de6e80 feat: supports aria-hidden (#869) 2020-08-18 10:27:45 -05:00
Sander Muller 7d8e33e12c docs: Update renamed version of contacts to match the actual new icon name (#786) 2020-07-23 10:34:57 -05:00
Ken Sodemann 1069d8b4ab fix(search): add login and logout search terms (#853)
The current terms stop after "log" or you have to type just "in" or "out"
This allows the searcher to narrow to login or logout specifically if
they want to.
2020-06-28 19:26:48 -05:00
Adam Bradley 9992cc07a3 5.1.2 2020-06-25 17:34:04 -05:00
Adam Bradley 3aed6eee31 fix(types): temporary fix for projects using older typescript versions 2020-06-25 17:32:53 -05:00
Adam Bradley c470b85c34 5.1.1 2020-06-25 15:44:51 -05:00
Adam Bradley 3a2ab6ec27 fix(types): add "type" to type exports so it's not added to the transpile js file 2020-06-25 15:41:19 -05:00
Adam Bradley 63eee58f89 chore: update data ordering 2020-06-25 15:40:41 -05:00
Adam Bradley 0642e2112b chore: bump deps 2020-06-25 15:35:40 -05:00
Ben Sperry e6973d0c55 Merge pull request #849 from ionic-team/fix/exerciseIconTags
fix(tags): add exercise tag to icons
2020-06-24 10:08:50 -05:00
Ken Sodemann 7668a3cf62 fix(tags): add exercise tag to icons
While doing this PR, I also found and fixed an inconsistency with the
tags for female and woman. I made those consistent.
2020-06-24 06:31:23 -05:00
Perry Govier cfddc2e642 Update data.json (#847) 2020-06-23 14:51:09 -05:00
Adam Bradley 1cef0acb10 5.1.0 2020-06-23 14:41:54 -05:00
Adam Bradley c5e4047206 chore: update icon data 2020-06-23 14:20:23 -05:00
Adam Bradley 63c9ee02a5 feat: update firebase 2020-06-23 14:20:12 -05:00
Adam Bradley 2e7fe14315 feat: update facebook 2020-06-23 14:20:02 -05:00
Adam Bradley f61e47c698 feat: update edge 2020-06-23 14:19:53 -05:00
Adam Bradley 922f43387b feat: add venmo 2020-06-23 14:19:39 -05:00
Adam Bradley 73526e40b8 feat: add tiktok 2020-06-23 14:19:30 -05:00
Adam Bradley 7ce073d3fe feat: add soundcloud 2020-06-23 14:19:21 -05:00
Adam Bradley 1b07d10212 feat: add paypal 2020-06-23 14:19:12 -05:00
Adam Bradley 8983749600 feat: add medium 2020-06-23 14:19:04 -05:00
Adam Bradley fa8d76e20c feat: add gitlab 2020-06-23 14:18:54 -05:00
Adam Bradley 91fa34ebc7 feat: add docker 2020-06-23 14:18:11 -05:00
Adam Bradley 14fd26b38f feat: add behance 2020-06-23 14:18:01 -05:00
Adam Bradley 2301be8f6c chore: bump deps 2020-06-23 14:14:09 -05:00
Ben Sperry 94cf9b52b6 Merge pull request #845 from thomaschaaf/patch-1
Make it easier to find the empty circle
2020-06-23 11:10:57 -05:00
Thomas Schaaf 00e7012192 Make it easier to find the empty circle 2020-06-19 11:19:31 +02:00
James 2204753a37 Adding unlink icon 2020-06-14 09:13:13 -07:00
Adam Bradley cd791f735c chore: add prettier config 2020-05-18 16:08:09 -05:00
Adam Bradley b9c65a794d chore: bump deps and remove unused deps 2020-05-18 16:07:49 -05:00
Adam Bradley b16eed45a3 5.0.1 2020-03-05 10:38:39 -06:00
Adam Bradley ed44918e29 chore: bump to stencil 1.8.11 2020-03-05 10:36:10 -06:00
Ely Lucas 51a431e6ad fix: fixes for ssr support 2020-02-26 12:11:32 -07:00
Ely Lucas dab04ff606 chore: bump to stencil 1.8.10 2020-02-26 12:11:32 -07:00
Simon Hänisch 1c6540e770 docs: add info about breaking change of alert icon (#783) 2020-02-17 17:36:04 -06:00
Adam Bradley 02eabdf6c5 chore: update release script 2020-02-06 09:47:14 -06:00
Adam Bradley 5a2e8e9bf4 5.0.0 2020-02-06 09:44:26 -06:00
Adam Bradley 5c8f2468be chore: update package.json 2020-02-06 09:38:55 -06:00
Kevin Ports 0d757ad96a Fix changelog typo 2020-01-28 10:24:08 -06:00
Kevin Ports e80b5acb0c 5.0.0-17 2020-01-27 11:23:34 -06:00
Kevin Ports 41bf08cee2 Merge branch 'peterennis-patch-2' 2020-01-22 10:38:22 -06:00
Kevin Ports 3c3ce88192 Fix merge conflict 2020-01-22 10:38:07 -06:00
Kevin Ports 8c0f457f23 Correct the return-left/right changelog entry 2020-01-21 16:33:59 -06:00
Kevin Ports bc14bfea99 fix src svg typo causing incorrect female-outline to be built 2020-01-21 16:04:59 -06:00
peterennis 8af821f5b8 Update CHANGELOG.md
typo
2020-01-16 21:48:30 -08:00
Kevin Ports 32cb024b42 5.0.0-16 2020-01-16 15:32:46 -06:00
peterennis c386872443 Update CHANGELOG.md
typos
2020-01-15 16:43:42 -08:00
Kevin Ports 4c95d03958 Updates (#756)
* Rename mail-notification to mail-unread

* rename radio-on/off to radio-button-on/off

* Add missing checkmark-done svg

* Rebuild svg changes

* Update changelog and readme

* Update changelog
2020-01-15 14:36:49 -06:00
Adam Bradley 8a54bf0a71 chore(build): add package-lock 2020-01-03 12:22:06 -06:00
Kevin Ports 159ceef81e 5.0.0-15 2020-01-03 10:32:54 -06:00
Brandy Carney c9068ed4c0 chore(icon): build with latest stencil 2020-01-03 11:29:20 -05:00
Kevin Ports acab74d2b9 5.0.0-14 2020-01-02 17:10:02 -06:00
Kevin Ports 3d7ed854c7 Correct fill in default vertical and horizontal ellipses svg 2020-01-02 17:07:52 -06:00
Adam Bradley 46afd68218 5.0.0-13 2019-11-21 15:30:26 -06:00
Adam Bradley 6342807b26 refactor(icons): export ionicons/icons package as data urls 2019-11-21 15:25:53 -06:00
Liam DeBeasi 03f5914ecf 5.0.0-12 2019-11-19 15:45:26 -05:00
Liam DeBeasi f97439c703 chore(): fix toggle test (#742) 2019-11-19 15:38:58 -05:00
Liam DeBeasi 352c80b8b6 fix(icon): include chevron icons in flipRtl (#740)
* include new chevron in fliprtl'

* add test
2019-11-19 15:33:59 -05:00
Liam DeBeasi cecdb9c0cd fix(icon): apply correct class to svg (#739)
* fix font size

* fix(icon): apply display to svg instead of ionicon class
2019-11-19 15:23:55 -05:00
Liam DeBeasi 052f07b103 chore(): fix tests, update dependencies, update contributing guide (#741)
* fix outdated info

* update contributing guide

* Fix typo
2019-11-19 15:04:48 -05:00
Adam Bradley 5f31f277db 5.0.0-11 2019-10-18 10:31:27 -05:00
Adam Bradley 793288593c chore(stencil): bump stencil core 2019-10-18 10:24:15 -05:00
Adam Bradley bc637cc951 5.0.0-10 2019-10-17 14:26:26 -05:00
Adam Bradley 993a314eb6 fix(types): update package.json types 2019-10-17 14:24:40 -05:00
Adam Bradley 5b7fc526bc 5.0.0-9 2019-10-17 11:53:59 -05:00
Adam Bradley dfb62b67e0 fix(toggle): rename switch to toggle 2019-10-17 11:52:25 -05:00
Adam Bradley b85a855b7e chore: move validation pass 2019-10-16 09:26:34 -05:00
Adam Bradley 57abf83ec5 chore(validate): add svgo validation step 2019-10-15 15:17:42 -05:00
Adam Bradley a9eba9ddb4 5.0.0-8 2019-10-15 11:18:03 -05:00
Adam Bradley 1286103494 chore(collection): update dist/collection to use optimized svgs 2019-10-15 11:15:22 -05:00
Kevin Ports b9cd35bf20 5.0.0-7 2019-09-26 09:05:04 -05:00
Kevin Ports cc15712e03 Add two pass svg optimization 2019-09-26 08:59:59 -05:00
Kevin Ports 8afeb4c6c9 5.0.0-6 2019-09-25 17:22:11 -05:00
Kevin Ports ccb3e41441 Add descriptive title element to svg build 2019-09-25 17:19:35 -05:00
Kevin Ports b74a92328c Replace src svg with unoptimized exports 2019-09-25 16:12:22 -05:00
Kevin Ports b01be99602 5.0.0-5 2019-09-25 14:09:43 -05:00
Adam Bradley 279de8512c feat(svg): add source svgs to distribution 2019-09-25 13:58:07 -05:00
Kevin Ports 6f1b29a40a 5.0.0-4 2019-09-25 10:18:17 -05:00
Kevin Ports a76a78c568 Add css variable for stroke-width so it can be styled outside of shadow (#728)
* Add css variable for stroke width so it can be styled outside of shadow

* add fallback and default value for css var
2019-09-25 10:04:11 -05:00
Kevin Ports 2207229f25 Update changelog 2019-09-24 12:07:06 -05:00
Kevin Ports eaee160c88 Fix chatbubble ellipses variant naming error 2019-09-24 12:05:40 -05:00
Kevin Ports b4c51b089a Update changelog 2019-09-24 11:57:45 -05:00
Kevin Ports db473aeb45 Add duplicates for missing variants 2019-09-24 11:56:07 -05:00
Kevin Ports ce43527435 5.0.0-1 2019-09-23 13:24:57 -05:00
Kevin Ports 174d2ec88d new build 2019-09-23 13:20:31 -05:00
Kevin Ports 7152cfd6c2 Correct a few src svg filename issues 2019-09-23 13:17:05 -05:00
Adam Bradley 9e254846f5 chore: development readme 2019-09-18 12:54:52 -05:00
Adam Bradley a1142adfe5 5.0.0-0 2019-09-18 12:36:45 -05:00
Adam Bradley 2d0f3aa119 chore: rename data.json to ionicons.json 2019-09-18 12:28:10 -05:00
Adam Bradley 587e450cdf chore: remove unused scripts 2019-09-18 12:27:45 -05:00
Adam Bradley e48b0305d5 refactor(stroke-width): set stroke-width via css 2019-09-18 12:23:30 -05:00
Adam Bradley ecd4406c42 chore(build): update release script 2019-09-18 12:06:55 -05:00
Adam Bradley fa1c145f94 test: remove mode tests tests 2019-09-18 11:00:34 -05:00
Adam Bradley 062ca67692 refactor: port tag data 2019-09-17 14:57:26 -05:00
Adam Bradley 0615f89ef8 chore(cheatsheet): remove style toggle 2019-09-17 14:39:03 -05:00
Adam Bradley 67c8bf0565 refactor(toggle): rename switch to toggle 2019-09-17 14:33:34 -05:00
Adam Bradley f0d22ccc26 fix(color): fix fill and stroke currentColor 2019-09-17 14:19:13 -05:00
Adam Bradley 65e1cfabfe refactor: update build scripts 2019-09-17 12:55:13 -05:00
Adam Bradley ac4fbbf247 refactor: remove scss 2019-09-17 10:16:33 -05:00
Adam Bradley 1be0c8eb21 refactor: update v5 icons 2019-09-17 10:16:05 -05:00
Adam Bradley f57e4988b0 4.6.3 2019-08-20 22:22:30 -05:00
Simon Hänisch 0df64cf8b8 fix: default export a function in global script (#720) 2019-08-20 22:21:15 -05:00
Adam Bradley 444dc18700 4.6.2 2019-07-23 09:54:00 -05:00
Adam Bradley aacebf599d 4.6.2-0 2019-07-11 20:05:17 -05:00
Adam Bradley 8839341860 fix(package): no sideEffect exports 2019-07-11 20:02:48 -05:00
Manu Mtz.-Almeida 1557658d90 4.6.1 2019-06-28 22:57:07 +02:00
Manu Mtz.-Almeida 070faa8453 chore(): update deps 2019-06-28 22:56:40 +02:00
Brandy Carney 020dcf93b7 4.6.0 2019-06-28 10:58:38 -04:00
Manu Mtz.-Almeida 96e62cc26d 4.5.10-2 2019-06-25 20:45:27 +02:00
Manu Mtz.-Almeida c8b64b1e99 chore(): add version 2019-06-25 20:43:59 +02:00
Manu Mtz.-Almeida 0320bf2926 fix(): dont error 2019-06-25 20:43:13 +02:00
Manu Mtz.-Almeida 668aacae7e Merge branch 'remove-site' 2019-06-25 20:42:42 +02:00
Manu MA 8fee03af6d Delete CNAME 2019-06-25 20:35:05 +02:00
Manu Mtz.-Almeida ce43b6c4af refactor(): remove site 2019-06-20 21:34:59 +02:00
Ely Lucas 38c00319ce fix script build order 2019-06-20 11:13:55 -06:00
Manu Mtz.-Almeida c67103ae33 chore(): update site 2019-06-19 22:59:04 +02:00
Manu Mtz.-Almeida 30b2b9cdf5 4.5.10-1 2019-06-19 22:58:04 +02:00
Manu Mtz.-Almeida ced468a360 fix(): types generation 2019-06-19 22:56:56 +02:00
Adam Bradley 354195d163 4.5.10-0 2019-06-13 09:46:20 -05:00
Adam Bradley a3b73a5e3a var 2019-06-13 09:35:12 -05:00
Adam Bradley bb6b8c122e wip 2019-06-13 09:31:10 -05:00
Adam Bradley 3d036a08a3 chore: update stencil devDeps 2019-06-12 16:16:31 -05:00
Manu Mtz.-Almeida 1d5e097556 chore(): website deploy 2019-06-07 14:56:23 +02:00
Manu Mtz.-Almeida 94bc599203 4.5.9-1 2019-06-07 14:55:25 +02:00
Manu Mtz.-Almeida 55fcc4b9f2 fix(): mode support 2019-06-07 14:54:54 +02:00
Adam Bradley 9f77b8c7a2 4.5.9-0 2019-05-28 21:10:04 -05:00
Adam Bradley 6398aa0a11 refactor: stencil one updates 2019-05-28 21:07:42 -05:00
Brandy Carney 1c4399400f 4.5.8 2019-05-10 11:33:46 -04:00
Brandy Carney d1e210990f 4.5.8-0 2019-05-10 11:31:55 -04:00
Brandy Carney 8ac5362c7c 4.5.7 2019-05-10 11:23:55 -04:00
Brandy Carney 2542b5ac73 fix(icon): set fill on host element and remove stroke (#688)
- fixes the border box around custom icons

references ionic-team/ionic#16483
2019-05-10 11:20:31 -04:00
Brandy Carney 510232d6a1 fix(svg): remove hardcoded fills from icons (#689)
fixes #529
2019-05-10 11:06:30 -04:00
Brandy Carney 2466debdaa chore: add prepare script 2019-05-09 14:54:54 -04:00
Brandy Carney c4dd4a24aa chore: add dev release script 2019-05-09 14:41:56 -04:00
Brandy Carney a3ae03e507 4.5.6 2019-04-10 17:26:13 -04:00
Brandy Carney c14a19435c fix(icon): add mode class
references ionic-team/ionic#17608
2019-04-10 17:17:54 -04:00
perry 4c700e2beb fresh build 2019-03-11 11:47:04 -05:00
perry 373aad41d5 fresh docs build 2019-02-18 11:32:10 -06:00
perry 1326c53ae9 Updating stencil router to fix issue with turkish letters 2019-02-18 11:28:38 -06:00
Kevin Ports ce2a55406f Update site 2019-02-08 15:38:49 -06:00
Kevin Ports af5f4019d3 Actually fix link 2019-02-08 15:36:30 -06:00
Kevin Ports 81086f94bb Fix link to docs in v2 2019-02-08 15:34:51 -06:00
Manu Mtz.-Almeida 7baec40185 chore(): update website 2019-01-22 19:19:41 +01:00
Manu Mtz.-Almeida a41f237f74 4.5.5 2019-01-22 19:11:29 +01:00
Manu Mtz.-Almeida 9ca5040457 fix(rlt): use document.dir 2019-01-22 19:06:50 +01:00
Manu Mtz.-Almeida aae7600497 chore(): update website 2019-01-22 18:46:30 +01:00
Manu Mtz.-Almeida b847b3b9c0 4.5.4 2019-01-22 18:42:29 +01:00
Manu Mtz.-Almeida d8a17ea0db 4.5.3 2019-01-22 18:35:19 +01:00
Manu Mtz.-Almeida c9f08cd1c7 fix(aria): adds ariaLabel when using the icon prop 2019-01-22 18:34:38 +01:00
Brandy Carney 5611991490 4.5.2 2019-01-21 15:24:14 -05:00
Brandy Carney 7f24e5ebeb 4.5.2-0 2019-01-21 15:07:10 -05:00
Brandy Carney b4b6b75c0e chore(npm): update stencil 2019-01-21 14:48:34 -05:00
Brandy Carney 5c1c6e195f fix(icon): update to include rtl styles #656
- adds the ability to run npm start and launch the icon component locally
- adds a test for viewing the icon component locally
- updates the component css to include rtl styles
- updates contributing to include steps for this

references ionic-team/ionic#17012
2019-01-18 12:33:57 -05:00
Brandy Carney 12ccf40284 docs(readme): updaet to include more usage examples and remove icon class 2019-01-17 13:43:51 -05:00
Brandy Carney d6757c5228 docs(site): update the docs site 2019-01-17 13:09:57 -05:00
Brandy Carney 367d7f8b30 docs(icon-tags): edit icon tags for better searchability 2019-01-17 13:03:26 -05:00
Brandy Carney 6157a6123d fix(svg): remove st0 class styling
closes #576
2019-01-17 11:23:40 -05:00
Brandy Carney 7b3a8ae0bb docs(readme): move contributing and add code highlighting 2019-01-17 11:19:41 -05:00
Brandy Carney b2cb08e0f1 docs(github): update readme and add contributing and coc 2019-01-16 17:57:23 -05:00
Brandy Carney 50301e6afb fix(svg): remove the st0 classes and styles from the svgs
references #529
2019-01-14 14:43:46 -05:00
Daniel Spindelbauer 266411cdc4 Fixed GitHub spelling in nav bar (#641) 2019-01-11 01:51:38 +01:00
Katherine Yang 7e6c9d2106 docs(): add icon attribute to docs (#631) 2019-01-11 01:51:22 +01:00
Manu Mtz.-Almeida d7b0171f9a 4.5.1 2018-12-17 17:22:56 +01:00
Manu Mtz.-Almeida cef8b5e20e fix(icon): fix webpack import in legacy systems 2018-12-17 17:19:54 +01:00
pwespi 34c7f7c0ad docs(icon-tags): edit bed icon tags 2018-12-16 14:06:42 +01:00
pwespi f293988f4f docs(icon-tags): edit icon tags for better searchability 2018-12-16 14:02:33 +01:00
Manu Mtz.-Almeida 0ad2529e1d chore(): update website 2018-12-13 15:04:03 +01:00
Manu Mtz.-Almeida 437946f7f3 4.5.0 2018-12-13 14:52:53 +01:00
Manu Mtz.-Almeida b5edd7b8b2 chore(): update stencil 2018-12-13 14:52:16 +01:00
Manu Mtz.-Almeida 52ccef83d3 4.5.0-3 2018-12-12 23:15:39 +01:00
Manu Mtz.-Almeida 6b324459ee chore(): fix types 2018-12-12 23:14:35 +01:00
Manu Mtz.-Almeida 33e9d3a125 4.5.0-2 2018-12-12 23:03:24 +01:00
Manu Mtz.-Almeida 6020525ad2 chore(): update definitions 2018-12-12 23:02:15 +01:00
Manu Mtz.-Almeida b3a147bb89 4.5.0-1 2018-12-12 22:28:36 +01:00
Manu Mtz.-Almeida 03bea5cfb4 fix(map): global map 2018-12-12 22:28:01 +01:00
Manu Mtz.-Almeida 3b3e212517 4.5.0-0 2018-12-12 20:58:13 +01:00
Manu Mtz.-Almeida bf2f7059d1 feat(esm): add map loader 2018-12-12 20:56:24 +01:00
Manu Mtz.-Almeida 803641b5ef chore(): update website 2018-11-26 21:59:32 +01:00
Manu Mtz.-Almeida cb0f2b789f 4.4.8 2018-11-26 21:58:47 +01:00
Manu Mtz.-Almeida 696575a925 chore(): update stencil 2018-11-26 21:58:18 +01:00
Manu Mtz.-Almeida c96037ff3f fix(icon): make sure MD is always used by default 2018-11-26 21:58:10 +01:00
Manu Mtz.-Almeida 76f4f6d90b chore(): update website 2018-11-15 18:07:51 +01:00
Manu Mtz.-Almeida 76799e6d2a 4.4.7 2018-11-15 17:37:49 +01:00
Manu Mtz.-Almeida 685c09df15 fix(capacitor): accept 0 as valid status code 2018-11-15 17:37:21 +01:00
Cam Wiegert e8e8216f35 fix: remove unused size custom properties (#635)
This removes the use of two undocumented custom properties from the component styles.

- `--ion-icon-size-large`
- `--ion-icon-size-small`
2018-11-06 10:21:02 -06:00
Neil Kalman 5c9a238abf remove style tag from additional svgs 2018-10-21 14:49:56 +03:00
Neil Kalman 54dde87b47 remove inner style so that --ion-color-base will apply 2018-10-21 14:03:04 +03:00
Kevin Ports 92c579228e Add Ionic referral link to headline 2018-10-19 10:22:41 -05:00
Kevin Ports e080c27251 dev build should look for ts file not js stencil config file 2018-10-18 15:01:43 -05:00
Manu Mtz.-Almeida f3e720c129 chore(): update website 2018-10-14 11:20:19 -05:00
Manu Mtz.-Almeida b9e6dd787e chore(): update website 2018-10-14 11:11:36 -05:00
Manu Mtz.-Almeida d00a1db48e 4.4.6 2018-10-14 11:10:13 -05:00
Manu Mtz.-Almeida 500bd26e56 fix(): remove console log 2018-10-14 11:08:43 -05:00
Manu Mtz.-Almeida 73bc0a596a chore(): update website 2018-10-14 10:59:39 -05:00
Manu Mtz.-Almeida 02e6c71099 4.4.5 2018-10-14 10:58:45 -05:00
Manu Mtz.-Almeida 1445bbd4a9 fix(): scoped css race condition 2018-10-14 10:57:11 -05:00
Adam Bradley c0e2a0498b chore(deps): update node-sass 2018-10-12 13:18:05 -05:00
perry c493761abc docs version bump 2018-10-08 10:07:32 -05:00
perry 4c07e02372 FF bug with this stenicl version 2018-10-05 23:52:52 -05:00
Manu Mtz.-Almeida 354665f069 chore(): update website 2018-09-25 23:41:48 +02:00
Manu Mtz.-Almeida 43b4fff014 4.4.4 2018-09-25 23:36:58 +02:00
Manu Mtz.-Almeida c14505fb28 chore(): update to latest stencil 2018-09-25 23:36:30 +02:00
Manu Mtz.-Almeida 7f4291e460 fix(webpack): fix warning 2018-09-25 22:52:59 +02:00
Manu Mtz.-Almeida f8a367a1c8 4.4.3 2018-08-27 21:08:58 +02:00
Manu Mtz.-Almeida c1bcd61d5a chore(): update stencil 2018-08-27 21:08:27 +02:00
Manu Mtz.-Almeida 9a9aca0ae0 chore(): update website 2018-08-27 19:12:35 +02:00
Manu Mtz.-Almeida fad3fc4580 4.4.2 2018-08-27 19:11:27 +02:00
Manu Mtz.-Almeida 2c36419fd7 chore(): update to latest stencil 2018-08-27 19:10:42 +02:00
Manu Mtz.-Almeida 812b488515 fix(webpack): using file-loader api to bundle svgs in the right place 2018-08-23 19:16:50 +02:00
Manu Mtz.-Almeida bd3a98905f chore(): update website 2018-08-23 17:39:55 +02:00
Manu Mtz.-Almeida 3a226bac77 4.4.1 2018-08-23 17:37:01 +02:00
Manu Mtz.-Almeida 29f812aaaf chore(): update to latest stencil 2018-08-23 17:36:31 +02:00
Manu Mtz.-Almeida 7d3dd41f59 chore(): update website 2018-08-22 22:07:40 +02:00
Manu Mtz.-Almeida 422bda7983 4.4.0 2018-08-22 22:06:49 +02:00
Manu Mtz.-Almeida e7f12e3df4 feat(): generate index.js for webpack 2018-08-22 22:03:19 +02:00
Manu Mtz.-Almeida 28eb1260d5 chore(): update to latest stencil 2018-08-22 22:03:06 +02:00
Manu Mtz.-Almeida 9dc22085ee chore(): updated website 2018-08-02 02:29:17 +02:00
Manu Mtz.-Almeida 3d8457d5df 4.3.0 2018-08-02 02:27:53 +02:00
Manu Mtz.-Almeida c41d08a4fe fix(svg): new scoped css 2018-08-02 02:27:24 +02:00
Manu Mtz.-Almeida 0e737a1aa8 chore(): add tslint rules 2018-07-29 16:27:02 +02:00
Manu Mtz.-Almeida 7bb0d7b232 chore(): update website 2018-07-29 15:24:07 +02:00
Manu Mtz.-Almeida 29a6c8b996 4.2.6 2018-07-29 15:23:07 +02:00
Manu Mtz.-Almeida 0f4438f581 fix(css): fix color conflict 2018-07-29 15:22:31 +02:00
Manu Mtz.-Almeida 1c5211c47c chore(): update website 2018-07-24 01:19:16 +02:00
Manu Mtz.-Almeida b0b67d51dd 4.2.5 2018-07-24 01:17:28 +02:00
Manu Mtz.-Almeida 1c5942ad96 chore(): disable package-lock 2018-07-24 01:14:28 +02:00
Manu Mtz.-Almeida c635b65d75 feat(icon): lazy loading can be disabled 2018-07-24 01:13:44 +02:00
Manu Mtz.-Almeida a15a2f0f89 chore(): update site 2018-06-29 02:30:29 +02:00
Manu Mtz.-Almeida 1a80387c54 4.2.4 2018-06-29 02:25:34 +02:00
Manu Mtz.-Almeida bea74662db fix(icon): always lowercase name 2018-06-29 02:24:25 +02:00
Manu Mtz.-Almeida fcfe309839 chore(): update site 2018-06-29 01:40:26 +02:00
Manu Mtz.-Almeida 918c27f1fd 4.2.3 2018-06-29 00:14:20 +02:00
Manu Mtz.-Almeida 8f6706e1b4 chore(): update dependencies and site 2018-06-28 12:28:15 +02:00
Manu Mtz.-Almeida ab0f7cab07 feat(mode): base mode can be changed 2018-06-27 23:27:40 +02:00
Manu Mtz.-Almeida 4d16d6b5bb fix(icon): missing IntersectionObserver check 2018-06-26 22:17:04 +02:00
Adam Bradley 080520c272 4.2.2 2018-06-26 14:55:16 -05:00
Adam Bradley 3d1d7b1287 docs(): rebuild for 4.2.2 2018-06-26 14:53:19 -05:00
Manu MA 92bf42fc66 fix(size): :host does not have enough priority 2018-06-26 14:43:14 -05:00
Adam Bradley 38e75af977 4.2.1 2018-06-20 15:17:17 -05:00
Adam Bradley 978d7f0520 docs(): rebuild for 4.2.1 2018-06-20 15:14:50 -05:00
Manu MA 10ca108e3e fix(icon): scoped css 2018-06-20 15:06:52 -05:00
perry c6238c8a36 trying a new font path 2018-06-14 11:40:27 -05:00
perry 8bb5ff94c8 updating node-sass 2018-06-14 11:23:40 -05:00
Adam Bradley fec5d9b436 chore(): update data to 4.2.0 2018-06-14 09:05:18 -05:00
Adam Bradley 6f97fcc1b4 4.2.0 2018-06-14 09:03:48 -05:00
Adam Bradley 7c5116b1cb docs(): rebuild and update to 4.2.0 2018-06-14 09:00:36 -05:00
Manu MA fbd6f853f2 feat(): using shadow-dom 2018-06-14 08:48:15 -05:00
Kevin Ports 31127430b1 Rebuild docs site in prod mode 2018-05-21 15:49:36 -05:00
Adam Bradley b6849aa02d Update readme.md 2018-05-21 15:24:26 -05:00
Kevin Ports ffe501d0dc Rebuild docs site 2018-05-21 11:45:39 -05:00
Kevin Ports 9bc7938f97 Fix merge conflicts 2018-05-21 11:43:57 -05:00
Kevin Ports 61874d3b39 Cleanup 2018-05-21 11:41:00 -05:00
Kevin Ports fb6e291605 Fix logo icon type code snippet 2018-05-21 11:35:59 -05:00
Adam Bradley a73cef8b2f rebuild docs 2018-05-21 11:28:32 -05:00
Adam Bradley bd1f3c3ac6 4.1.2 2018-05-21 11:20:06 -05:00
Adam Bradley 012ed970ba update docs 2018-05-21 11:18:59 -05:00
Adam Bradley 1dce831baf update readme version 2018-05-21 11:17:01 -05:00
Adam Bradley c9a11ad2a3 fix(requests): do not use fetch keepalive due to chrome bug 2018-05-21 11:15:17 -05:00
Adam Bradley 1c88d96cc5 fix(package): fix stencil config script 2018-05-21 10:56:31 -05:00
Manu MA c3bfea5f59 fix(icon): css for custom icons 2018-05-21 10:20:43 -05:00
Kevin Ports 008e2f7b03 Fix broken copy script 2018-05-17 11:25:32 -05:00
Kevin Ports 62d54535fb Update footer links 2018-05-16 16:14:28 -05:00
Adam Bradley 08b5f4bb35 always lowercase mode and name props 2018-05-16 11:32:55 -05:00
Adam Bradley d705685298 publish 4.1.1 docs 2018-05-16 11:15:51 -05:00
Adam Bradley d1ac8c42ee add clean script 2018-05-16 11:15:28 -05:00
Adam Bradley d5ba02861e 4.1.1 2018-05-16 11:09:00 -05:00
Adam Bradley d982853a2e docs update 2018-05-16 11:08:00 -05:00
Adam Bradley fb6d42d137 publish docs update 2018-05-16 11:06:38 -05:00
Adam Bradley 067b24e63c add test for ios/md/mode attributes 2018-05-16 11:05:24 -05:00
Adam Bradley aa0a39cd64 update stencil 2018-05-16 10:56:14 -05:00
Adam Bradley f1671ec6d8 add unit tests 2018-05-16 10:53:38 -05:00
Adam Bradley 778b255877 fix ios/md attributes 2018-05-16 10:53:24 -05:00
Adam Bradley ed67d22986 update links 2018-05-16 10:52:52 -05:00
Adam Bradley 390c852c39 update docs 2018-05-16 10:43:41 -05:00
Adam Bradley 13de75de47 fix designerpack build 2018-05-16 09:43:12 -05:00
Adam Bradley a0a8897378 fix typo 2018-05-16 09:31:55 -05:00
Adam Bradley 380ec72221 update usage 2018-05-15 21:19:50 -05:00
Adam Bradley 9b4a4b954f update version 2018-05-15 21:04:16 -05:00
Adam Bradley 326c9dd81b use code blocks 2018-05-15 21:00:16 -05:00
Adam Bradley d2e6437909 4.1.0 2018-05-15 20:56:24 -05:00
Adam Bradley 9349388777 update usage 2018-05-15 20:55:33 -05:00
Adam Bradley 5747efba6b update custom svg 2018-05-15 20:46:16 -05:00
Adam Bradley c4db612a9d update font icon 2018-05-15 20:41:42 -05:00
Adam Bradley 7df2f7befd update usage 2018-05-15 20:23:20 -05:00
Adam Bradley 13ea94f9b5 update docs build 2018-05-15 17:12:40 -05:00
Adam Bradley 48b2e9b0e1 update scripts 2018-05-15 17:12:22 -05:00
Adam Bradley 8e38047d13 updated usage 2018-05-15 17:11:31 -05:00
Adam Bradley 1c2d8da629 feat(svg): fetch svg files 2018-05-15 17:09:24 -05:00
Adam Bradley 6b805f730d update tsconfig 2018-05-15 17:07:15 -05:00
Adam Bradley a0999bd081 remove plane 2018-05-15 17:06:55 -05:00
Kevin Ports 06f5d659d5 Update usage documentation 2018-05-14 14:00:16 -05:00
Kevin Ports 9a52be8470 Workaround github pages routes h and our history router 2018-05-10 14:50:27 -05:00
Kevin Ports 35140e77df Remove pre-render 2018-05-10 14:37:13 -05:00
Adam Bradley 69915ed0dd prerender homepage 2018-05-10 14:24:36 -05:00
Kevin Ports 6e2105337d Merge branch 'master' of github.com:ionic-team/ionicons 2018-05-10 14:10:35 -05:00
Kevin Ports 956429f1ad Rebuild assets for site 2018-05-10 14:10:29 -05:00
Adam Bradley 14d1506df8 Create CNAME 2018-05-10 14:04:59 -05:00
Kevin Ports 562c3c741c Merge branch 'master' of github.com:ionic-team/ionicons 2018-05-10 14:02:04 -05:00
Kevin Ports 17318fe08b Remove /docs from gitignore 2018-05-10 14:01:23 -05:00
2186 changed files with 41267 additions and 85944 deletions
+17
View File
@@ -0,0 +1,17 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# More details are here: https://help.github.com/articles/about-codeowners/
# The '*' pattern is global owners.
# Order is important. The last matching pattern has the most precedence.
# The folders are ordered as follows:
# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.
# Global Owner
* @mapsandapps
+11
View File
@@ -0,0 +1,11 @@
# Contributor Code of Conduct
As contributors and maintainers of the Ionicons project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities.
Communication through any of Ionic's channels (GitHub, Slack, Forum, IRC, mailing lists, Twitter, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the Ionicons project to do the same.
If any member of the community violates this code of conduct, the maintainers of the Ionicons project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate.
If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at [hi@ionicframework.com](mailto:hi@ionicframework.com).
+73
View File
@@ -0,0 +1,73 @@
# Contributing
Thanks for your interest in contributing to Ionicons! :tada:
## Contributing Etiquette
Please see our [Contributor Code of Conduct](./CODE_OF_CONDUCT.md) for information on our rules of conduct.
## Creating an Issue
* If you have a question about using Ionicons, please ask on the [Ionic Forum](http://forum.ionicframework.com/) or in the [Ionic Discord](https://ionic.link/discord).
* It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
* The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
* If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/ionic-team/ionicons/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
* Next, [create a new issue](https://github.com/ionic-team/ionicons/issues/new/choose) that thoroughly explains the problem.
## Creating a Pull Request
* We appreciate you taking the time to contribute! Before submitting a pull request, we ask that you please [create an issue](#creating-an-issue) that explains the bug or feature request and let us know that you plan on creating a pull request for it. If an issue already exists, please comment on that issue letting us know 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.
* Looking for an issue to fix? Make sure to look through our issues with the [help wanted](https://github.com/ionic-team/ionicons/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label!
### Setup
1. [Download the installer](https://nodejs.org/) for the LTS version of Node.js. This is the best way to also [install npm](https://blog.npmjs.org/post/85484771375/how-to-install-npm#_=_).
2. Fork this repository.
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. 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
1. Navigate to the `src/components/` directory and open the `icon` component to modify.
2. Make any changes to the icon component and then [preview the changes](#preview-component-changes).
#### Preview Component Changes
1. Run `npm start` from the root directory to start a local version of the icon test.
2. Modify the icon test as needed in the `index.html` file.
<!-- #### Building Changes
TODO -->
### Submit Pull Request
1. [Create a new pull request](https://github.com/ionic-team/ionicons/compare) with the `master` branch as the `base`. You may need to click on `compare across forks` to find your changes.
2. See the [Creating a pull request from a fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) GitHub help article for more information.
3. Please fill out the Pull Request template to the best of your ability and include any issues that are related.
## Updating Documentation
The documentation site for Ionicons is located in the [ionicons-site](https://github.com/ionic-team/ionicons-site) repository.
## License
By contributing your code to the ionic-team/ionicons GitHub Repository, you agree to license your contribution under the MIT license.
+32
View File
@@ -0,0 +1,32 @@
name: 🐛 Bug Report
description: Report a bug in the ion-icon component. Incorrect icons should use the "Incorrect Icon" template instead.
labels: ["triage"]
title: "bug: "
body:
- type: textarea
attributes:
label: Current Behavior
description: A clear description of what the bug is and how it manifests.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
description: Please explain the steps required to duplicate this issue.
validations:
required: true
- type: input
attributes:
label: Code Reproduction URL
description: Please provide an application with the minimum code required to reproduce the issue. This is the best way to ensure this issue is triaged quickly. Issues without a code reproduction may be closed if the Ionic Team cannot reproduce the issue you are reporting.
placeholder: https://github.com/...
- type: textarea
attributes:
label: Additional Information
description: List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc.
@@ -0,0 +1,23 @@
name: 💡 Feature Request
description: Suggest a new feature for the ion-icon component. Icon requests should use the "Icon Request" template instead.
labels: ["triage"]
title: "feat: "
body:
- type: textarea
attributes:
label: Describe Problem
description: A clear and concise description of what the problem is. Ex. I am always frustrated when [...]
validations:
required: true
- type: textarea
attributes:
label: Describe Preferred Solution
description: A clear and concise description of what you want to happen.
- type: textarea
attributes:
label: Describe Alternatives
description: A clear and concise description of any alternative solutions or features you have considered.
- type: textarea
attributes:
label: Additional Information
description: Add any other context or screenshots about the feature request here.
+19
View File
@@ -0,0 +1,19 @@
name: 🚀 Icon Request
description: Request a new icon
labels: ["triage"]
title: "icon request: "
body:
- type: textarea
attributes:
label: Describe the Icon
description: A clear and concise description of the icon you would like added.
validations:
required: true
- type: textarea
attributes:
label: Links to Examples
description: Add links to any examples of the icon in other libraries that you like.
- type: textarea
attributes:
label: Additional Information
description: Add any other context about the icon request here.
+17
View File
@@ -0,0 +1,17 @@
name: 😒 Incorrect Icon
description: Report an incorrect icon
labels: ["triage"]
title: "incorrect icon: "
body:
- type: textarea
attributes:
label: Describe the Issue
description: A clear description of what is wrong with the icon. Please include any relevant screenshots.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear description of what the icon should look like. Please include any relevant screenshots.
validations:
required: true
+93
View File
@@ -0,0 +1,93 @@
triage:
label: triage
dryRun: false
closeAndLock:
labels:
- label: 'ionitron: support'
message: >
Thanks for the issue! This issue appears to be a support request. We use this issue tracker exclusively for
bug reports and feature requests. Please use our [forum](https://forum.ionicframework.com/) for help or
questions about Ionicons.
Thank you for using Ionicons!
- label: 'ionitron: missing template'
message: >
Thanks for the issue! It appears that you have not filled out the provided issue template. We use this issue
template in order to gather more information and further assist you. Please create a new issue and ensure the
template is fully filled out.
Thank you for using Ionicons!
close: true
lock: true
dryRun: false
comment:
labels:
- label: "help wanted"
message: >
This issue has been labeled as `help wanted`. This label is added to issues
that we believe would be good for contributors.
If you'd like to work on this issue, please comment here letting us know that
you would like to submit a pull request for it. This helps us to keep track of
the pull request and make sure there isn't duplicated effort.
For a guide on how to create a pull request and test this project locally to see
your changes, see our [contributing documentation](https://github.com/ionic-team/ionicons/blob/main/.github/CONTRIBUTING.md#creating-a-pull-request).
Thank you!
- label: 'ionitron: needs reproduction'
message: >
Thanks for the issue! This issue has been labeled as `needs reproduction`. This label is added to issues that
need a code reproduction.
Please reproduce this issue and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a
reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was
not enough for our team to reproduce the issue.
dryRun: false
noReply:
days: 14
maxIssuesPerRun: 100
label: "needs: reply"
responseLabel: triage
exemptProjects: true
exemptMilestones: true
message: >
Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still
an issue with the latest version of Ionicons, please create a new issue and ensure the
template is fully filled out.
Thank you for using Ionicons!
close: true
lock: true
dryRun: false
noReproduction:
days: 14
maxIssuesPerRun: 100
label: "ionitron: needs reproduction"
responseLabel: triage
exemptProjects: true
exemptMilestones: true
message: >
Thanks for the issue! This issue is being closed due to the lack of a code reproduction. If this is still
an issue with the latest version of Ionicons, please create a new issue and ensure the
template is fully filled out.
Thank you for using Ionicons!
close: true
lock: true
dryRun: false
@@ -0,0 +1,34 @@
name: 'Build Ionicons'
description: 'Build Ionicons'
runs:
using: 'composite'
steps:
- uses: actions/checkout@v3
with:
# Checkout the latest commit in this branch
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v3
- name: Cache Node Modules
uses: actions/cache@v3
env:
cache-name: node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }}-v1
- name: Install Dependencies
run: npm install
shell: bash
- name: Build
run: npm run build
shell: bash
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionicons-build
output: IoniconsBuild.zip
paths: dist components icons www
- uses: ./.github/workflows/actions/upload-archive
with:
name: ionicons-src
output: IoniconsSrc.zip
paths: src
@@ -0,0 +1,19 @@
name: 'Archive Download'
description: 'Downloads and decompresses an archive from a previous job'
inputs:
path:
description: 'Input archive name'
filename:
description: 'Input file name'
name:
description: 'Archive name'
runs:
using: 'composite'
steps:
- uses: actions/download-artifact@v3
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
- name: Exract Archive
run: unzip -q -o ${{ inputs.path }}/${{ inputs.filename }}
shell: bash
@@ -0,0 +1,45 @@
name: 'Release'
description: 'Releases a package'
inputs:
version:
description: 'The type of version to release.'
tag:
description: 'The tag to publish to on NPM.'
working-directory:
description: 'The directory of the package.'
folder:
default: './'
description: 'A folder containing a package.json file.'
token:
description: 'The NPM authentication token required to publish.'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install latest npm
run: npm install -g npm@latest
shell: bash
- name: Install Dependencies
run: npm ci
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Update Version
run: npm version ${{ inputs.version }} --git-tag-version false
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Run Build
run: npm run build
shell: bash
working-directory: ${{ inputs.working-directory }}
- name: Prepare NPM Token
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
working-directory: ${{ inputs.working-directory }}
shell: bash
env:
NPM_TOKEN: ${{ inputs.token }}
- name: Publish to NPM
run: npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance
shell: bash
working-directory: ${{ inputs.working-directory }}
@@ -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 "hasUpdatedScreenshots=$(echo 'true')" >> $GITHUB_OUTPUT
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@v3
with:
name: ${{ inputs.name }}
path: ${{ inputs.output }}
+71
View File
@@ -0,0 +1,71 @@
name: 'Ionicons Build'
on:
pull_request:
branches: [ '**' ]
# When pushing a new commit we should
# cancel the previous test run to not
# consume more runners than we need to.
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Checkout the latest commit in this branch
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/workflows/actions/build-core
test-spec:
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-spec
test-e2e:
strategy:
# This ensures that all screenshot shard
# failures are reported so the dev can
# review everything at once.
fail-fast: false
matrix:
# Divide the tests into n buckets
# and run those buckets in parallel.
# To increase the number of shards,
# add new items to the shard array
# and change the value of totalShards
# to be the length of the shard array.
shard: [1, 2, 3]
totalShards: [3]
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-e2e
with:
shard: ${{ matrix.shard }}
totalShards: ${{ matrix.totalShards }}
# Screenshots are required to pass
# in order for the branch to be merge
# eligible. However, the screenshot tests
# are run on n runners where n can change
# over time. The verify-screenshots step allows
# us to have a required status check for screenshot
# results without having to manually add each
# matrix run in the branch protection rules
# Source: https://github.community/t/status-check-for-a-matrix-jobs/127354
verify-e2e:
if: ${{ always() }}
needs: test-e2e
runs-on: ubuntu-latest
steps:
- name: Check build matrix status
if: ${{ needs.test-e2e.result != 'success' }}
run: exit 1
+36
View File
@@ -0,0 +1,36 @@
name: 'Ionicons Dev Build'
on:
workflow_dispatch:
jobs:
create-dev-hash:
runs-on: ubuntu-latest
outputs:
dev-hash: ${{ steps.create-dev-hash.outputs.DEV_HASH }}
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: npm ci --no-package-lock
shell: bash
- id: create-dev-hash
name: Create Dev Hash
run: |
echo "DEV_HASH=$(node ./scripts/bump-version.js)-dev.1$(date +%s).1$(git log -1 --format=%H | cut -c 1-7)" >> $GITHUB_OUTPUT
shell: bash
release-ionicons:
needs: [create-dev-hash]
uses: ./.github/workflows/release-ionicons.yml
with:
tag: dev
version: ${{ needs.create-dev-hash.outputs.dev-hash }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
get-build:
name: Get your dev build!
runs-on: ubuntu-latest
needs: [create-dev-hash, release-ionicons]
steps:
- run: echo ${{ needs.create-dev-hash.outputs.dev-hash }}
+30
View File
@@ -0,0 +1,30 @@
name: 'Release Ionicons'
on:
workflow_call:
inputs:
version:
description: 'The type of version to release.'
type: string
required: true
tag:
description: 'The tag to publish to on NPM.'
type: string
required: true
secrets:
NPM_TOKEN:
required: true
jobs:
release-core:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/publish-npm
with:
tag: ${{ inputs.tag }}
version: ${{ inputs.version }}
working-directory: './'
token: ${{ secrets.NPM_TOKEN }}
+67
View File
@@ -0,0 +1,67 @@
name: 'Ionicons Production Release'
on:
workflow_dispatch:
inputs:
version:
required: true
type: choice
description: Which version should be published?
options:
- patch
- minor
- major
tag:
required: true
type: choice
description: Which npm tag should this be published to?
options:
- latest
jobs:
release-ionicons:
uses: ./.github/workflows/release-ionicons.yml
with:
tag: ${{ inputs.tag }}
version: ${{ inputs.version }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
finalize-release:
needs: [release-ionicons]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.IONITRON_TOKEN }}
fetch-depth: 0
- name: Configure Identity
# Commits from github-actions do not
# trigger other GitHub Actions. As a result,
# we publish releases from Ionitron instead
# so actions run when merging the release branch
# back into main.
run: |
git config user.name ionitron
git config user.email hi@ionicframework.com
shell: bash
# This ensures the local version of Lerna is installed
# and that we do not use the global Lerna version
- name: Install root dependencies
run: npm ci
shell: bash
- name: Create GitHub Release
run: npx lerna version ${{ inputs.version }} --yes --force-publish='*' --conventional-commits --create-release github
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
# Lerna does not automatically bump versions
# of Ionicons dependencies that have changed,
# so we do that here.
- name: Bump Package Lock
run: |
npx lerna exec "npm install --package-lock-only --legacy-peer-deps"
git add .
git commit -m "chore(): update package lock files"
git push
shell: bash
+52
View File
@@ -0,0 +1,52 @@
name: 'Update Reference Screenshots'
on:
workflow_dispatch:
jobs:
build-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/build-core
test-e2e:
strategy:
# This ensures that all screenshot shard
# failures are reported so the dev can
# review everything at once.
fail-fast: false
matrix:
# Divide the tests into n buckets
# and run those buckets in parallel.
# To increase the number of shards,
# add new items to the shard array
# and change the value of totalShards
# to be the length of the shard array.
shard: [1, 2, 3]
totalShards: [3]
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-e2e
with:
shard: ${{ matrix.shard }}
totalShards: ${{ matrix.totalShards }}
update: true
update-reference-screenshots:
runs-on: ubuntu-latest
needs: [test-e2e]
steps:
- uses: actions/checkout@v3
# 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
+10 -3
View File
@@ -8,12 +8,19 @@ log.txt
*.sublime-project
*.sublime-workspace
.idea/
.sass-cache/
.versions/
.vscode/
/components/
node_modules/
tmp/
dist/
docs/
icons/
.DS_Store
!/src/docs
scripts/*.js
!scripts/install-loader.js
www/
/test-results/
/playwright-report/
/playwright/.cache/
/src/**/*-snapshots
+13
View File
@@ -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
}
-5
View File
@@ -1,5 +0,0 @@
plugins:
- removeAttrs:
attrs:
- 'fill'
- 'stroke'
+151
View File
@@ -0,0 +1,151 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [7.2.2](https://github.com/ionic-team/ionicons/compare/v7.2.1...v7.2.2) (2023-12-13)
### Bug Fixes
* **icon:** add better warning when loading icons ([#1297](https://github.com/ionic-team/ionicons/issues/1297)) ([d582e62](https://github.com/ionic-team/ionicons/commit/d582e6208e626722e4350426a509a6870e90a0bc))
## [7.2.1](https://github.com/ionic-team/ionicons/compare/v7.2.0...v7.2.1) (2023-10-10)
### Bug Fixes
* **icon:** font scales without host style ([#1289](https://github.com/ionic-team/ionicons/issues/1289)) ([875bfd8](https://github.com/ionic-team/ionicons/commit/875bfd8300144c62e55a5a76dc2cff8cf1f01bfe))
# [7.2.0](https://github.com/ionic-team/ionicons/compare/v7.1.2...v7.2.0) (2023-10-10)
### Bug Fixes
* **icon:** mapping same icon does not warn ([#1279](https://github.com/ionic-team/ionicons/issues/1279)) ([8297018](https://github.com/ionic-team/ionicons/commit/8297018cb591f5e33a815ceb9e4e765271ecf5ad))
* **icon:** verify the icon loads in the lifecycle ([#1278](https://github.com/ionic-team/ionicons/issues/1278)) ([7f7f346](https://github.com/ionic-team/ionicons/commit/7f7f346af47f45531046e1d2f1a88f53acee77fa))
### Features
* allow passing in only icon SVG data to addIcons ([#1256](https://github.com/ionic-team/ionicons/issues/1256)) ([1e33313](https://github.com/ionic-team/ionicons/commit/1e3331347328c11a8b4c58c9200059bfd76b0e59))
* **icon:** support for dynamic type ([#1246](https://github.com/ionic-team/ionicons/issues/1246)) ([45c04dd](https://github.com/ionic-team/ionicons/commit/45c04dda6c905e535083b171cead374b1c993afa))
## [7.1.2](https://github.com/ionic-team/ionicons/compare/v7.1.1...v7.1.2) (2023-05-30)
### Bug Fixes
* **icon:** add :dir fallback ([#1223](https://github.com/ionic-team/ionicons/issues/1223)) ([06fa4a5](https://github.com/ionic-team/ionicons/commit/06fa4a528dd1906a5673ff6d80d22aef0f6e113b))
## [7.1.1](https://github.com/ionic-team/ionicons/compare/v7.1.0...v7.1.1) (2023-05-23)
### Bug Fixes
* **icon:** respond to changes of document dir ([#1210](https://github.com/ionic-team/ionicons/issues/1210)) ([e70bf21](https://github.com/ionic-team/ionicons/commit/e70bf214b82cd2187ea9394803283570d28ab28c))
# [7.1.0](https://github.com/ionic-team/ionicons/compare/v7.0.0...v7.1.0) (2023-03-23)
### Features
* chevron-expand and chevron-collapse icons ([#1198](https://github.com/ionic-team/ionicons/issues/1198)) ([cdb0d80](https://github.com/ionic-team/ionicons/commit/cdb0d80cde1dc5dd90fb2a1c3b4fa31d68294821))
# [7.0.0](https://github.com/ionic-team/ionicons/compare/v6.1.3...v7.0.0) (2023-03-07)
**Migration Note:** Developers should ensure that their `<ion-icon>` usages have either `aria-label` or `aria-hidden` to avoid accessibility issues. See https://ionic.io/ionicons/usage for more information.
### Bug Fixes
* **icon:** remove auto-generated aria-label ([#1170](https://github.com/ionic-team/ionicons/issues/1170)) ([98975ec](https://github.com/ionic-team/ionicons/commit/98975ec0f54b825c33f528683834a5e38298d598))
## [6.1.3](https://github.com/ionic-team/ionicons/compare/v6.1.2...v6.1.3) (2023-02-09)
### Bug Fixes
* DomParser usage in SSR ([#1180](https://github.com/ionic-team/ionicons/issues/1180)) ([8c412f6](https://github.com/ionic-team/ionicons/commit/8c412f67486d6cc9725de63f0c15b6c6cd8d47ce)), closes [#1179](https://github.com/ionic-team/ionicons/issues/1179)
## [6.1.2](https://github.com/ionic-team/ionicons/compare/v6.1.1...v6.1.2) (2023-02-08)
### Bug Fixes
* **icon:** load base64 data urls ([#1172](https://github.com/ionic-team/ionicons/issues/1172)) ([72f0936](https://github.com/ionic-team/ionicons/commit/72f09369de76b00697437f54d919782307843a87))
* **icon:** md and ios properties are reactive ([#1174](https://github.com/ionic-team/ionicons/issues/1174)) ([65bcbb4](https://github.com/ionic-team/ionicons/commit/65bcbb477734e33901a6f0c650d3f1f2c3084fca)), closes [#802](https://github.com/ionic-team/ionicons/issues/802)
## [6.1.1](https://github.com/ionic-team/ionicons/compare/v6.1.0...v6.1.1) (2023-01-18)
### Bug Fixes
* **icon:** remove <title> during build step ([#1169](https://github.com/ionic-team/ionicons/issues/1169)) ([93b4fa4](https://github.com/ionic-team/ionicons/commit/93b4fa449b0a072b24ef920fe73e1cb04d6f9b43)), closes [#1168](https://github.com/ionic-team/ionicons/issues/1168)
## [6.1.1](https://github.com/ionic-team/ionicons/compare/v6.1.0...v6.1.1) (2023-01-18)
### Bug Fixes
* **icon:** remove <title> during build step ([#1169](https://github.com/ionic-team/ionicons/issues/1169)) ([93b4fa4](https://github.com/ionic-team/ionicons/commit/93b4fa449b0a072b24ef920fe73e1cb04d6f9b43)), closes [#1168](https://github.com/ionic-team/ionicons/issues/1168)
# [6.1.0](https://github.com/ionic-team/ionicons/compare/v6.0.4...v6.1.0) (2023-01-17)
### Bug Fixes
* **icon:** remove default <title> ([#1166](https://github.com/ionic-team/ionicons/issues/1166)) ([e0efa5f](https://github.com/ionic-team/ionicons/commit/e0efa5f28d61adcaf2e1fa121f7e2f10cfad6d65)), closes [#838](https://github.com/ionic-team/ionicons/issues/838) [#1049](https://github.com/ionic-team/ionicons/issues/1049) [#1082](https://github.com/ionic-team/ionicons/issues/1082)
# [6.1.0](https://github.com/ionic-team/ionicons/compare/v6.0.4...v6.1.0) (2023-01-17)
### Bug Fixes
* **icon:** remove default <title> ([#1166](https://github.com/ionic-team/ionicons/issues/1166)) ([e0efa5f](https://github.com/ionic-team/ionicons/commit/e0efa5f28d61adcaf2e1fa121f7e2f10cfad6d65)), closes [#838](https://github.com/ionic-team/ionicons/issues/838) [#1049](https://github.com/ionic-team/ionicons/issues/1049) [#1082](https://github.com/ionic-team/ionicons/issues/1082)
+6
View File
@@ -0,0 +1,6 @@
{
"packages": [
"./"
],
"version": "7.2.2"
}
+27135 -6917
View File
File diff suppressed because it is too large Load Diff
+39 -34
View File
@@ -1,52 +1,57 @@
{
"name": "ionicons",
"version": "4.0.0",
"version": "7.2.2",
"description": "Premium icons for Ionic.",
"files": [
"dist/"
"components/",
"dist/",
"icons/"
],
"main": "dist/ionicons.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 build.icon && npm run generate && npm run svg-to-js && npm run png && npm run build.data && npm run build.css && npm run build.zip && npm run build.docs && npm run icon-copy",
"build.icon": "stencil build",
"build.docs": "stencil build --config src/docs/stencil.config.js",
"build.data": "node scripts/data.js",
"build.css": "node scripts/build-css.js",
"build.zip": "node scripts/build-zip.js",
"icon-copy": "node scripts/copy-svg-to-dist.js",
"mode.comparison": "node scripts/mode-comparison.js",
"dev": "npm run build && sd concurrent \"stencil build --dev --config src/docs/stencil.config.js --watch\" \"stencil-dev-server\" ",
"generate": "python scripts/generate.py",
"svg-to-js": "node scripts/svg-to-js.js",
"png": "node scripts/png.js",
"release": "npm run build && np --any-branch"
"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"
},
"dependencies": {
"@stencil/core": "^4.0.3"
},
"devDependencies": {
"@ionic/jpml": "latest",
"@stencil/core": "^0.8.2",
"@stencil/dev-server": "latest",
"@stencil/router": "^0.1.6",
"@stencil/sass": "0.0.3",
"@stencil/utils": "latest",
"fs-extra": "4.0.2",
"highlight.js": "^9.12.0",
"node-sass": "4.7.2",
"np": "2.17.0",
"svg2png": "4.1.1",
"svgo": "1.0.3"
"@playwright/test": "^1.33.0",
"@types/fs-extra": "^11.0.1",
"@types/jest": "^27.0.3",
"@types/node": "^20.2.1",
"@types/svgo": "^1.3.3",
"fs-extra": "^11.1.1",
"jest": "^27.0.3",
"jest-cli": "^27.0.3",
"lerna": "^6.6.2",
"puppeteer": "^20.2.1",
"semver": "^7.5.1",
"serve": "^14.2.0",
"svgo": "1.3.2",
"typescript": "^5.0.4"
},
"keywords": [
"ionicons",
"icon pack",
"ionic",
"icon",
"svg",
"font",
"mobile",
"web component",
"component",
"custom element"
"custom element",
"material design",
"ios"
],
"homepage": "http://ionicons.com/",
"author": {
@@ -67,7 +72,7 @@
"url": "https://github.com/ionic-team/ionicons/issues"
},
"license": "MIT",
"dependencies": {
"archiver": "^2.1.1"
}
"sideEffects": [
"icons/imports/"
]
}
+97
View File
@@ -0,0 +1,97 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices, expect } from '@playwright/test';
const projects = [
{
/**
* This is really just desktop Firefox
* but with a mobile viewport.
*/
name: 'Mobile Firefox',
use: {
browserName: 'firefox',
/**
* This is the Pixel 5 configuration.
* We can't use devices['Pixel 5']
* because the "isMobile" option is
* not supported on Firefox.
*/
viewport: {
width: 393,
height: 727
},
screen: {
width: 393,
height: 851
}
},
},
{
name: 'Mobile Chrome',
use: {
browserName: 'chromium',
...devices['Pixel 5']
}
},
{
name: 'Mobile Safari',
use: {
browserName: 'webkit',
...devices['iPhone 12']
}
}
];
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testMatch: '*.e2e.ts',
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 5000,
toMatchSnapshot: {
/**
* Increases the maximum allowed pixel difference to account
* for slight browser rendering inconsistencies.
*/
maxDiffPixelRatio: 0.02
}
},
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',
/**
* All failed tests should create
* a trace file for easier debugging.
*
* See https://playwright.dev/docs/trace-viewer
*/
trace: 'retain-on-failure',
baseURL: 'http://localhost:3333',
},
/* Configure projects for major browsers */
projects: projects,
webServer: {
command: 'serve www -p 3333',
port: 3333,
reuseExistingServer: !process.env.CI
}
};
export default config;
+110 -5
View File
@@ -1,15 +1,120 @@
# Ionicons
[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.
Premium icons for [Ionic](http://ionicframework.com/). Designed by [@benjsperry](https://twitter.com/benjsperry).
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).
## Contributing
Thanks for your interest in contributing! Read up on our guidelines for
[contributing](https://github.com/ionic-team/ionicons/blob/master/.github/CONTRIBUTING.md)
and then look through our issues with a [help wanted](https://github.com/ionic-team/ionicons/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
label.
## Using the Web Component
The Ionicons Web Component is an easy and performant way to use Ionicons in your app. The component will dynamically load an SVG for each icon, so your app is only requesting the icons that you need.
Also note that only visible icons are loaded, and icons which are "below the fold" and hidden from the user's view do not make fetch requests for the svg resource.
### Installation
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@latest/dist/ionicons.js"></script>
```
### Basic usage
To use a built-in icon from the Ionicons package, populate the `name` attribute on the ion-icon component:
```html
<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>
```
## 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 name="heart"></ion-icon> <!--filled-->
<ion-icon name="heart-outline"></ion-icon> <!--outline-->
<ion-icon name="heart-sharp"></ion-icon> <!--sharp-->
```
### 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 ios="heart-outline" md="heart-sharp"></ion-icon>
```
## Size
To specify the icon size, you can use the size attribute for our pre-defined font sizes.
```html
<ion-icon size="small"></ion-icon>
<ion-icon size="large"></ion-icon>
```
Or you can set a specific size by applying the `font-size` CSS property on the `ion-icon` component. It's recommended to use pixel sizes that are a multiple of 8 (8, 16, 32, 64, etc.)
```css
ion-icon {
font-size: 64px;
}
```
## Color
Specify the icon color by applying the `color` CSS property on the `ion-icon` component.
```css
ion-icon {
color: blue;
}
```
## 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
<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
Ionicons is licensed under the [MIT license](http://opensource.org/licenses/MIT).
## Related
* [Ionicons Homepage](http://ionicons.com/)
* [Ionic Framework](https://ionicframework.com/)
* [Ionic Discord](https://ionic.link/discord)
* [Ionic Forum](https://forum.ionicframework.com/)
* [Stencil](https://stenciljs.com/)
* [Capacitor](https://capacitorjs.com/)
-52
View File
@@ -1,52 +0,0 @@
var sass = require('node-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);
}
})
}
});
}
-21
View File
@@ -1,21 +0,0 @@
var fs = require('fs-extra');
var path = require('path');
var archiver = require('archiver');
var svgsDir = path.join(__dirname, '..', 'dist','svg');
var distzipDir = path.join(__dirname, '..', 'dist');
var archive = archiver('zip', {
zlib: { level: 9 }
});
var output = fs.createWriteStream(distzipDir + '/ionicons.designerpack.zip');
output.on('close', function() {
console.log('Svg zip archive created.');
});
archive.pipe(output);
archive.directory(svgsDir, false);
archive.on('error', function(err){
throw err;
});
archive.finalize();
+591
View File
@@ -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' || attr.value === 'currentColor') {
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">`,
);
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, '..'));
+10
View File
@@ -0,0 +1,10 @@
const semver = require('semver');
const getDevVersion = () => {
const originalVersion = require('../package.json').version;
const baseVersion = semver.inc(originalVersion, 'patch');
return baseVersion;
}
console.log(getDevVersion());
+41
View File
@@ -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>
+56
View File
@@ -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, '..'));
-11
View File
@@ -1,11 +0,0 @@
console.log('Copy optimized svg files to dist/ionicons/svg');
var fs = require('fs-extra');
var path = require('path');
var optimizedSvgsDir = path.join(__dirname, '..', 'dist', 'collection', 'icon', 'svg');
var componentSvgDir = path.join(__dirname, '..', 'dist', 'ionicons', 'svg');
fs.emptyDirSync(componentSvgDir);
fs.copy(optimizedSvgsDir, componentSvgDir);
-45
View File
@@ -1,45 +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');
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.filter(f => f.indexOf('.svg') > -1).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');
}
});
});
let content = JSON.stringify(srcData);
fs.writeFileSync(DST_JSON, content);
-466
View File
@@ -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()
-185
View File
@@ -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, '..', '..', 'dist', '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()
Binary file not shown.
-280
View File
@@ -1,280 +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_FOLDER_PATH = os.path.join(DIST_PATH, '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)
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()
if last_hash != current_hash or not os.path.exists(FONTS_FOLDER_PATH):
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_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_FOLDER_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()
+30
View File
@@ -0,0 +1,30 @@
(function(doc){
var scriptElm = doc.scripts[doc.scripts.length - 1];
var warn = ['[ionicons] Deprecated script, please remove: ' + scriptElm.outerHTML];
warn.push('To improve performance it is recommended to set the differential scripts in the head as follows:')
var parts = scriptElm.src.split('/');
parts.pop();
parts.push('ionicons');
var url = parts.join('/');
var scriptElm = doc.createElement('script');
scriptElm.setAttribute('type', 'module');
scriptElm.src = url + '/ionicons.esm.js';
warn.push(scriptElm.outerHTML);
scriptElm.setAttribute('data-stencil-namespace', 'ionicons');
doc.head.appendChild(scriptElm);
scriptElm = doc.createElement('script');
scriptElm.setAttribute('nomodule', '');
scriptElm.src = url + '/ionicons.js';
warn.push(scriptElm.outerHTML);
scriptElm.setAttribute('data-stencil-namespace', 'ionicons');
doc.head.appendChild(scriptElm)
console.warn(warn.join('\n'));
})(document);
File diff suppressed because it is too large Load Diff
-61
View File
@@ -1,61 +0,0 @@
const fs = require('fs-extra');
const path = require('path');
const svg2png = require('svg2png');
const crypto = require('crypto');
const ROOT_DIR = path.join(__dirname, '..');
const SRC_DIR = path.join(ROOT_DIR, 'src');
const TMP_DIR = path.join(ROOT_DIR, 'tmp');
const DIST_DIR = path.join(ROOT_DIR, 'dist');
const SVG_SRC_DIR = path.join(SRC_DIR, 'svg');
const PNG_DIST_DIR = path.join(DIST_DIR, 'png');
const SIZES = [64];
fs.ensureDirSync(DIST_DIR);
fs.ensureDirSync(TMP_DIR);
fs.emptyDirSync(PNG_DIST_DIR);
SIZES.forEach(size => {
const pngDir = path.join(PNG_DIST_DIR, size.toString());
fs.emptyDirSync(pngDir);
});
var svgFileNames = fs.readdirSync(SVG_SRC_DIR).filter(f => {
return f.split('.').pop() === 'svg';
});
svgFileNames.forEach(svgFileName => {
const svgFilePath = path.join(SVG_SRC_DIR, svgFileName);
const pngFileName = svgFileName.replace('.svg', '.png');
const sourceBuffer = fs.readFileSync(svgFilePath);
const hash = crypto.createHash('sha1')
.update(sourceBuffer.toString())
.digest('base64')
.replace(/\W/g, '');
SIZES.forEach(size => {
generatePng(pngFileName, sourceBuffer, hash, size);
});
});
function generatePng(pngFileName, sourceBuffer, hash, size) {
const cachedFilePath = path.join(TMP_DIR, hash + '.' + size + '.png');
const pngFilePath = path.join(PNG_DIST_DIR, size.toString(), pngFileName);
try {
const cachedFileContent = fs.readFileSync(cachedFilePath);
fs.writeFileSync(pngFilePath, cachedFileContent);
} catch (e) {
const outputBuffer = svg2png.sync(sourceBuffer, { width: size, height: size });
fs.writeFileSync(pngFilePath, outputBuffer);
fs.writeFileSync(cachedFilePath, outputBuffer);
console.log('converted to png', size, pngFileName);
}
}
+24 -17
View File
@@ -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`.
-30
View File
@@ -1,30 +0,0 @@
console.log('Build JPML files');
var jpml = require('@ionic/jpml');
var fs = require('fs-extra');
var path = require('path');
const OUT_DIR = [
path.join(__dirname, '..', 'dist', 'collection', 'icon', 'svg')
];
OUT_DIR.forEach(outDir => {
fs.emptyDirSync(outDir);
});
jpml.generate({
include: ['dist/svg/'],
outDir: OUT_DIR,
filter: function(path) {
return path.toLowerCase().split('.').pop() === 'svg';
},
fileName: function(path) {
return path.replace('.svg', '.js');
},
key: function(path) {
return path.replace('.svg', '');
},
wrapper: function(content, key) {
return "loadIonicon('" + content.replace(/'/g, "\\\'") + "','" + key + "');"
}
});
+7
View File
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"esModuleInterop": true,
"module": "commonjs",
"target": "es2017"
}
}
-11
View File
@@ -1,11 +0,0 @@
<tr class="mode-row">
<td>
{{name}}
</td>
<td class="align-center">
<ion-icon name="ios-{{name}}"></ion-icon>
</div>
<td class="align-center">
<ion-icon name="md-{{name}}"></ion-icon>
</div>
</tr>
-150
View File
@@ -1,150 +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;
min-height: 38px;
}
ion-icon svg {
width: 32px;
height: 32px;
}
footer {
color: #888;
font-size: 12px;
padding: 20px 0;
}
.heart {
display: inline-block;
}
.heart svg {
display: inline-block;
padding-top: 4px;
width: 18px;
height: 18px;
fill: red;
}
</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>
+127
View File
@@ -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>;
}
}
}
-105
View File
@@ -1,105 +0,0 @@
/**
* This is an autogenerated file created by the Stencil build process.
* It contains typing information for all components that exist in this project
* and imports for stencil collections that might be configured in your stencil.config.js file
*/
import '@stencil/core';
declare global {
namespace JSX {
interface Element {}
export interface IntrinsicElements {}
}
namespace JSXElements {}
interface HTMLStencilElement extends HTMLElement {
componentOnReady(): Promise<this>;
componentOnReady(done: (ele?: this) => void): void;
forceUpdate(): void;
}
interface HTMLAttributes {}
}
declare global {
namespace StencilComponents {
interface IonIcon {
/**
* Specifies the label to use for accessibility. Defaults to the icon name.
*/
'ariaLabel': string;
/**
* The color to use from your Sass `$colors` map. Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`. For more information, see [Theming your App](/docs/theming/theming-your-app).
*/
'color': string;
/**
* Specifies which icon to use on `ios` mode.
*/
'ios': string;
/**
* Specifies which icon to use on `md` mode.
*/
'md': string;
/**
* Specifies which icon to use. The appropriate icon will be used based on the mode. For more information, see [Ionicons](/docs/ionicons/).
*/
'name': string;
/**
* The size of the icon. Available options are: `"small"` and `"large"`.
*/
'size': string;
}
}
interface HTMLIonIconElement extends StencilComponents.IonIcon, HTMLStencilElement {}
var HTMLIonIconElement: {
prototype: HTMLIonIconElement;
new (): HTMLIonIconElement;
};
interface HTMLElementTagNameMap {
'ion-icon': HTMLIonIconElement;
}
interface ElementTagNameMap {
'ion-icon': HTMLIonIconElement;
}
namespace JSX {
interface IntrinsicElements {
'ion-icon': JSXElements.IonIconAttributes;
}
}
namespace JSXElements {
export interface IonIconAttributes extends HTMLAttributes {
/**
* Specifies the label to use for accessibility. Defaults to the icon name.
*/
'ariaLabel'?: string;
/**
* The color to use from your Sass `$colors` map. Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`. For more information, see [Theming your App](/docs/theming/theming-your-app).
*/
'color'?: string;
/**
* Specifies which icon to use on `ios` mode.
*/
'ios'?: string;
/**
* Specifies which icon to use on `md` mode.
*/
'md'?: string;
/**
* Specifies which icon to use. The appropriate icon will be used based on the mode. For more information, see [Ionicons](/docs/ionicons/).
*/
'name'?: string;
/**
* The size of the icon. Available options are: `"small"` and `"large"`.
*/
'size'?: string;
}
}
}
declare global { namespace JSX { interface StencilJSX {} } }
+98 -73
View File
@@ -1,119 +1,144 @@
ion-icon {
:host {
display: inline-block;
font-size: inherit;
}
ion-icon .icon-inner {
height: 1em;
width: 1em;
height: 1em;
contain: strict;
fill: currentColor;
box-sizing: content-box !important;
}
ion-icon svg {
fill: currentColor;
:host .ionicon {
stroke: currentColor;
}
.icon-small .icon-inner {
font-size: 18px;
.ionicon-fill-none {
fill: none;
}
.icon-large .icon-inner {
font-size: 32px;
.ionicon-stroke-width {
stroke-width: 32px;
stroke-width: var(--ionicon-stroke-width, 32px);
}
/* Set iOS Icon Colors */
/* ------------------- */
.icon-inner,
.ionicon,
svg {
display: block;
.icon-ios-primary svg {
fill: var(--ion-color-ios-primary, var(--ion-color-primary, #3880ff));
stroke: var(--ion-color-ios-primary, var(--ion-color-primary, #3880ff));
height: 100%;
width: 100%;
}
.icon-ios-secondary svg {
fill: var(--ion-color-ios-secondary, var(--ion-color-secondary, #0cd1e8));
stroke: var(--ion-color-ios-secondary, var(--ion-color-secondary, #0cd1e8));
/* Icon RTL
* -----------------------------------------------------------
*/
/**
* Safari <16.4 incorrectly reports
* that it supports :dir(rtl) when it does not.
* This @supports statement lets us target
* WebKit browsers to apply the RTL fallback.
* -webkit-named-image only exists on WebKit.
* For WebKit browsers that do support :dir(rtl)
* (i.e. Safari >= 16.4) then the :dir(rtl)
* code farther down on the page will take
* effect and override this fallback.
*/
@supports (background: -webkit-named-image(i)) {
:host(.icon-rtl) .icon-inner {
transform: scaleX(-1);
}
}
.icon-ios-tertiary svg {
fill: var(--ion-color-ios-tertiary, var(--ion-color-tertiary, #f4a942));
stroke: var(--ion-color-ios-tertiary, var(--ion-color-tertiary, #f4a942));
/**
* Fallback for browsers that support
* neither :host-context nor :dir.
* The icon will not react to dir
* changes, but it will at least
* respect the dir on component load.
*/
@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])) {
:host(.icon-rtl) .icon-inner {
transform: scaleX(-1);
}
}
.icon-ios-success svg {
fill: var(--ion-color-ios-success, var(--ion-color-success, #10dc60));
stroke: var(--ion-color-ios-success, var(--ion-color-success, #10dc60));
/* :host-context is supported in chromium; :dir is supported in safari & firefox */
:host(.flip-rtl):host-context([dir='rtl']) .icon-inner {
transform: scaleX(-1);
}
.icon-ios-warning svg {
fill: var(--ion-color-ios-warning, var(--ion-color-warning, #ffce00));
stroke: var(--ion-color-ios-warning, var(--ion-color-warning, #ffce00));
@supports selector(:dir(rtl)) {
:host(.flip-rtl:dir(rtl)) .icon-inner {
transform: scaleX(-1);
}
/**
* This is needed for WebKit otherwise the fallback
* will always cause the icon to be flipped if the document
* loads in RTL.
*/
:host(.flip-rtl:dir(ltr)) .icon-inner {
transform: scaleX(1);
}
}
.icon-ios-danger svg {
fill: var(--ion-color-ios-danger, var(--ion-color-danger, #f14141));
stroke: var(--ion-color-ios-danger, var(--ion-color-danger, #f14141));
/* Icon Sizes
* -----------------------------------------------------------
*/
:host(.icon-small) {
font-size: 1.125rem !important;
}
.icon-ios-light svg {
fill: var(--ion-color-ios-light, var(--ion-color-light, #f4f5f8));
stroke: var(--ion-color-ios-light, var(--ion-color-light, #f4f5f8));
:host(.icon-large) {
font-size: 2rem !important;
}
.icon-ios-medium svg {
fill: var(--ion-color-ios-medium, var(--ion-color-medium, #989aa2));
stroke: var(--ion-color-ios-medium, var(--ion-color-medium, #989aa2));
/* Icon Colors
* -----------------------------------------------------------
*/
:host(.ion-color) {
color: var(--ion-color-base) !important;
}
.icon-ios-dark svg {
fill: var(--ion-color-ios-dark, var(--ion-color-dark, #222428));
stroke: var(--ion-color-ios-dark, var(--ion-color-dark, #222428));
:host(.ion-color-primary) {
--ion-color-base: var(--ion-color-primary, #3880ff);
}
/* Set Material Design Icon Colors */
/* ------------------------------- */
.icon-md-primary svg {
fill: var(--ion-color-md-primary, var(--ion-color-primary, #3880ff));
stroke: var(--ion-color-md-primary, var(--ion-color-primary, #3880ff));
:host(.ion-color-secondary) {
--ion-color-base: var(--ion-color-secondary, #0cd1e8);
}
.icon-md-secondary svg {
fill: var(--ion-color-md-secondary, var(--ion-color-secondary, #0cd1e8));
stroke: var(--ion-color-md-secondary, var(--ion-color-secondary, #0cd1e8));
:host(.ion-color-tertiary) {
--ion-color-base: var(--ion-color-tertiary, #f4a942);
}
.icon-md-tertiary svg {
fill: var(--ion-color-md-tertiary, var(--ion-color-tertiary, #f4a942));
stroke: var(--ion-color-md-tertiary, var(--ion-color-tertiary, #f4a942));
:host(.ion-color-success) {
--ion-color-base: var(--ion-color-success, #10dc60);
}
.icon-md-success svg {
fill: var(--ion-color-md-success, var(--ion-color-success, #10dc60));
stroke: var(--ion-color-md-success, var(--ion-color-success, #10dc60));
:host(.ion-color-warning) {
--ion-color-base: var(--ion-color-warning, #ffce00);
}
.icon-md-warning svg {
fill: var(--ion-color-md-warning, var(--ion-color-warning, #ffce00));
stroke: var(--ion-color-md-warning, var(--ion-color-warning, #ffce00));
:host(.ion-color-danger) {
--ion-color-base: var(--ion-color-danger, #f14141);
}
.icon-md-danger svg {
fill: var(--ion-color-md-danger, var(--ion-color-danger, #f14141));
stroke: var(--ion-color-md-danger, var(--ion-color-danger, #f14141));
:host(.ion-color-light) {
--ion-color-base: var(--ion-color-light, #f4f5f8);
}
.icon-md-light svg {
fill: var(--ion-color-md-light, var(--ion-color-light, #f4f5f8));
stroke: var(--ion-color-md-light, var(--ion-color-light, #f4f5f8));
:host(.ion-color-medium) {
--ion-color-base: var(--ion-color-medium, #989aa2);
}
.icon-md-medium svg {
fill: var(--ion-color-md-medium, var(--ion-color-medium, #989aa2));
stroke: var(--ion-color-md-medium, var(--ion-color-medium, #989aa2));
}
.icon-md-dark svg {
fill: var(--ion-color-md-dark, var(--ion-color-dark, #222428));
stroke: var(--ion-color-md-dark, var(--ion-color-dark, #222428));
:host(.ion-color-dark) {
--ion-color-base: var(--ion-color-dark, #222428);
}
+153 -173
View File
@@ -1,223 +1,203 @@
import { Component, Prop, State } from '@stencil/core';
import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';
import { getSvgContent, ioniconContent } from './request';
import { getName, getUrl, inheritAttributes, isRTL } from './utils';
@Component({
tag: 'ion-icon',
host: {
theme: 'icon'
},
assetsDir: 'svg',
styleUrl: 'icon.css'
assetsDirs: ['svg'],
styleUrl: 'icon.css',
shadow: true,
})
export class Icon {
@State() private svgContent: string = null;
private io?: IntersectionObserver;
private iconName: string | null = null;
private inheritedAttributes: { [k: string]: any } = {};
private didLoadIcon = false;
@Prop({ context: 'isServer'}) private isServer: boolean;
@Element() el!: HTMLElement;
@Prop({ context: 'publicPath'}) private publicPath: string;
@Prop({ context: 'mode' }) mode: string;
@State() private svgContent?: string;
@State() private isVisible = false;
/**
* The color to use from your Sass `$colors` map.
* Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
* For more information, see [Theming your App](/docs/theming/theming-your-app).
* The mode determines which platform styles to use.
*/
@Prop() color: string;
@Prop({ mutable: true }) mode = getIonMode();
/**
* Specifies the label to use for accessibility. Defaults to the icon name.
* The color to use for the background of the item.
*/
@Prop() ariaLabel = '';
@Prop() color?: string;
/**
* Specifies which icon to use on `ios` mode.
*/
@Prop() ios = '';
@Prop() ios?: string;
/**
* Specifies which icon to use on `md` mode.
*/
@Prop() md = '';
@Prop() md?: string;
/**
* Specifies which icon to use. The appropriate icon will be used based on the mode.
* For more information, see [Ionicons](/docs/ionicons/).
* Specifies whether the icon should horizontally flip when `dir` is `"rtl"`.
*/
@Prop() name = '';
@Prop() flipRtl?: boolean;
/**
* Specifies which icon to use from the built-in set of icons.
*/
@Prop({ reflect: true }) name?: string;
/**
* Specifies the exact `src` of an SVG file to use.
*/
@Prop() src?: string;
/**
* 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.
*/
@Prop() icon?: any;
/**
* The size of the icon.
* Available options are: `"small"` and `"large"`.
*/
@Prop() size: string;
@Prop() size?: string;
/**
* If enabled, ion-icon will be loaded lazily when it's visible in the viewport.
* Default, `false`.
*/
@Prop() lazy = false;
private get iconName() {
let iconName = this.name.toLowerCase();
/**
* 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;
// default to "md" if somehow the mode wasn't set
const mode = this.mode || 'md';
// if an icon was passed in using the ios or md attributes
// set the iconName to whatever was passed in
if (this.ios && mode === 'ios') {
iconName = this.ios.toLowerCase();
} else if (this.md && mode === 'md') {
iconName = this.md.toLowerCase();
// this does not have one of the defaults
// so lets auto add in the mode prefix for them
} else if (iconName && !(/^md-|^ios-|^logo-/.test(iconName))) {
iconName = mode + '-' + iconName;
}
// only allow alpha characters and dash
const invalidChars = iconName.replace(/[a-z]|-|\d/g, '');
if (invalidChars !== '') {
console.error(`invalid characters in ion-icon name: ${invalidChars}`);
return null;
}
return iconName;
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
// only load the svg if it's visible
this.waitUntilVisible(this.el, '50px', () => {
this.isVisible = true;
this.loadIcon();
});
}
hostData() {
const attrs: {[attrName: string]: string} = {
'role': 'img'
};
componentDidLoad() {
/**
* Addresses an Angular issue where property values are assigned after the 'connectedCallback' but prior to the registration of watchers.
* This enhancement ensures the loading of an icon when the component has finished rendering and the icon has yet to apply the SVG data.
* This modification pertains to the usage of Angular's binding syntax:
* `<ion-icon [name]="myIconName"></ion-icon>`
*/
if (!this.didLoadIcon) {
this.loadIcon();
}
}
if (this.ariaLabel) {
// user provided label
attrs['aria-label'] = this.ariaLabel;
disconnectedCallback() {
if (this.io) {
this.io.disconnect();
this.io = undefined;
}
}
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 },
));
io.observe(el);
} else {
// come up with the label based on the icon name
const iconName = this.iconName;
if (iconName) {
attrs['aria-label'] =
iconName
.replace('ios-', '')
.replace('md-', '')
.replace('-outline', '')
.replace(/\-/g, ' ');
// browser doesn't support IntersectionObserver
// so just fallback to always show it
cb();
}
}
@Watch('name')
@Watch('src')
@Watch('icon')
@Watch('ios')
@Watch('md')
loadIcon() {
if (Build.isBrowser && this.isVisible) {
const url = getUrl(this);
if (url) {
if (ioniconContent.has(url)) {
// sync if it's already loaded
this.svgContent = ioniconContent.get(url);
} else {
// async if it hasn't been loaded
getSvgContent(url, this.sanitize).then(() => (this.svgContent = ioniconContent.get(url)));
}
this.didLoadIcon = true;
}
}
const iconClasses = {};
if (this.size) {
iconClasses[`icon-${this.size}`] = true;
}
return {
...attrs,
class: iconClasses
};
this.iconName = getName(this.name, this.icon, this.mode, this.ios, this.md);
}
render() {
if (this.isServer) {
return <div class="icon-inner">{/* ssr */}</div>;
}
const { flipRtl, iconName, inheritedAttributes, el } = this;
const mode = this.mode || 'md';
// we have designated that arrows & chevrons should automatically flip (unless flip-rtl is set to false) because "back" is left in ltr and right in rtl, and "forward" is the opposite
const shouldAutoFlip = iconName
? (iconName.includes('arrow') || iconName.includes('chevron')) && flipRtl !== false
: false;
// if shouldBeFlippable is true, the icon should change direction when `dir` changes
const shouldBeFlippable = flipRtl || shouldAutoFlip;
const iconName = this.iconName;
if (!iconName) {
// we don't have good data
return <div class="icon-inner">{/* invalid svg */}</div>;
}
const svgContent = svgContents[iconName];
if (svgContent === this.svgContent) {
// we've already loaded up this svg at one point
// and the svg content we've loaded and assigned checks out
// render this svg!!
return <div class="icon-inner" innerHTML={svgContent}></div>;
}
// haven't loaded this svg yet
// start the request
loadSvgContent(iconName, this.publicPath, loadedSvgContent => {
// we're finished loading the svg content!
// set to this.svgContent so we do another render
this.svgContent = loadedSvgContent;
});
// actively requesting the svg, so let's just render a div for now
return <div class="icon-inner">{/* loading svg */}</div>;
return (
<Host
role="img"
class={{
[mode]: true,
...createColorClasses(this.color),
[`icon-${this.size}`]: !!this.size,
'flip-rtl': shouldBeFlippable,
'icon-rtl': shouldBeFlippable && isRTL(el)
}}
{...inheritedAttributes}
>
{Build.isBrowser && this.svgContent ? (
<div class="icon-inner" innerHTML={this.svgContent}></div>
) : (
<div class="icon-inner"></div>
)}
</Host>
);
}
}
const getIonMode = () =>
(Build.isBrowser && typeof document !== 'undefined' && document.documentElement.getAttribute('mode')) || 'md';
function loadSvgContent(iconName: string, publicPath: string, callback: {(loadedSvgContent: string): void}) {
// static since all IonIcons use this same function and pointing at global/shared data
// passed in callback will have instance info
// add to the list of callbacks to fiure when this url is finished loading
(loadCallbacks[iconName] = loadCallbacks[iconName] || []).push(callback);
if (activeRequests[iconName]) {
// already requesting this icon, don't bother kicking off another
return;
}
// add this icons to our list of active requests
activeRequests[iconName] = true;
// kick off the request for the external svg file
// create a script element to add to the document.head
var scriptElm = document.createElement('script');
scriptElm.charset = 'utf-8';
scriptElm.async = true;
scriptElm.src = `${publicPath}svg/${iconName}.js`;
// create a fallback timeout if something goes wrong
var tmrId = setTimeout(onScriptComplete, 120000);
function onScriptComplete() {
clearTimeout(tmrId);
scriptElm.onerror = scriptElm.onload = null;
scriptElm.parentNode.removeChild(scriptElm);
// remove from our list of active requests
delete activeRequests[iconName];
}
// add script completed listener to this script element
scriptElm.onerror = scriptElm.onload = onScriptComplete;
// inject a script tag in the head
// kick off the actual request
document.head.appendChild(scriptElm);
}
const activeRequests: {[iconName: string]: boolean} = {};
const loadCallbacks: {[iconName: string]: {(loadedSvgContent: string): void}[]} = [] as any;
const svgContents: {[iconName: string]: string} = {};
// add a jsonp handler to the window
// as svg jsonp files are requested
// once they load they'll call this method
(window as any).loadIonicon = function loadIonicon(svgContent: string, iconName: string) {
// awesome, we've finished loading the svg file
// remove this url from the active requests
delete activeRequests[iconName];
svgContents[iconName] = svgContent
// find any callbacks waiting on this icon
const svgLoadCallbacks = loadCallbacks[iconName];
if (svgLoadCallbacks) {
// loop through all the callbacks that are waiting on the svg content
svgLoadCallbacks.forEach(cb => {
// fire off this callback which was provided by an instance
cb(svgContent);
});
delete loadCallbacks[iconName];
}
const createColorClasses = (color: string | undefined) => {
return color
? {
'ion-color': true,
[`ion-color-${color}`]: true,
}
: null;
};
+13 -93
View File
@@ -7,99 +7,19 @@
## Properties
#### ariaLabel
string
Specifies the label to use for accessibility. Defaults to the icon name.
#### color
string
The color to use from your Sass `$colors` map.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
For more information, see [Theming your App](/docs/theming/theming-your-app).
#### ios
string
Specifies which icon to use on `ios` mode.
#### md
string
Specifies which icon to use on `md` mode.
#### name
string
Specifies which icon to use. The appropriate icon will be used based on the mode.
For more information, see [Ionicons](/docs/ionicons/).
#### size
string
The size of the icon.
Available options are: `"small"` and `"large"`.
## Attributes
#### aria-label
string
Specifies the label to use for accessibility. Defaults to the icon name.
#### color
string
The color to use from your Sass `$colors` map.
Default options are: `"primary"`, `"secondary"`, `"danger"`, `"light"`, and `"dark"`.
For more information, see [Theming your App](/docs/theming/theming-your-app).
#### ios
string
Specifies which icon to use on `ios` mode.
#### md
string
Specifies which icon to use on `md` mode.
#### name
string
Specifies which icon to use. The appropriate icon will be used based on the mode.
For more information, see [Ionicons](/docs/ionicons/).
#### size
string
The size of the icon.
Available options are: `"small"` and `"large"`.
| 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` |
----------------------------------------------
+57
View File
@@ -0,0 +1,57 @@
import { isEncodedDataUrl, isSvgDataUrl, validateContent } from './validate';
export const ioniconContent = new Map<string, string>();
const requests = new Map<string, Promise<any>>();
let parser: DOMParser;
export const getSvgContent = (url: string, sanitize: boolean) => {
// see if we already have a request for this url
let req = requests.get(url);
if (!req) {
if (typeof fetch !== 'undefined' && typeof document !== 'undefined') {
/**
* If the url is a data url of an svg, then try to parse it
* with the DOMParser. This works with content security policies enabled.
*/
if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {
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 doc = parser.parseFromString(url, 'text/html');
const svg = doc.querySelector('svg');
if (svg) {
ioniconContent.set(url, svg.outerHTML);
}
return Promise.resolve();
} else {
// 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, '');
});
// 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;
};
+71
View File
@@ -0,0 +1,71 @@
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`);
});
test('some icons should flip when rtl', async ({ page }) => {
await page.goto(`/`);
const autoflip = page.locator('.auto-flip-chevrons [name=chevron-forward] .icon-inner');
const unflip = page.locator('.un-flip-chevrons [name=chevron-forward] .icon-inner');
await expect(autoflip).not.toHaveCSS('transform', /matrix\(-1/);
await expect(unflip).not.toHaveCSS('transform', /matrix\(-1/);
await page.evaluate(() => {
document.dir = 'rtl';
});
await expect(autoflip).toHaveCSS('transform', /matrix\(-1/);
await expect(unflip).not.toHaveCSS('transform', /matrix\(-1/);
// Wait for all SVGs to be lazily loaded before taking screenshots
await page.waitForLoadState('networkidle');
const rtlTests = page.locator('#rtl-tests');
await expect(rtlTests).toHaveScreenshot(`icon-rtl-diff.png`);
});
test('arrows should flip if dir changes on the element', async ({ page }) => {
await page.goto(`/`);
const autoflip = page.locator('.auto-flip-chevrons [name=chevron-forward] .icon-inner');
const unflip = page.locator('.un-flip-chevrons [name=chevron-forward] .icon-inner');
await expect(autoflip).not.toHaveCSS('transform', /matrix\(-1/);
await expect(unflip).not.toHaveCSS('transform', /matrix\(-1/);
const autoflipEl = await page.$('.auto-flip-chevrons [name=chevron-forward]');
const unflipEl = await page.$('.un-flip-chevrons [name=chevron-forward]');
await autoflipEl!.evaluate((node) => node.setAttribute('dir', 'rtl'));
await unflipEl!.evaluate((node) => node.setAttribute('dir', 'rtl'));
await expect(autoflip).toHaveCSS('transform', /matrix\(-1/);
await expect(unflip).not.toHaveCSS('transform', /matrix\(-1/);
});
test('icon should reassess flipping when name changes', async ({ page }) => {
await page.goto(`/`);
await page.evaluate(() => {
document.dir = 'rtl';
});
const iconLoc = page.locator('.auto-flip-chevrons ion-icon:nth-child(2)');
await expect(iconLoc).toHaveAttribute('name', 'chevron-forward');
await expect(iconLoc).toHaveClass(/flip-rtl/);
const iconEl = await page.$('.auto-flip-chevrons ion-icon:nth-child(2)');
await iconEl!.evaluate((node) => node.setAttribute('name', 'brush'));
await expect(iconLoc).toHaveAttribute('name', 'brush');
await expect(iconLoc).not.toHaveClass(/flip-rtl/);
});
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

+79
View File
@@ -0,0 +1,79 @@
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 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 icon-rtl" name="chevron-forward" role="img" aria-hidden="true">
<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="star" aria-label="custom label"></ion-icon>`,
});
expect(root).toEqualHtml(`
<ion-icon class="md" name="star" 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="flip-rtl 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>
`);
});
});
+163
View File
@@ -0,0 +1,163 @@
import { Icon } from '../icon';
import { addIcons, getIconMap, getName, getSrc, getUrl } from '../utils';
describe('getUrl', () => {
let i: Icon;
beforeEach(() => {
i = new Icon();
});
it('use icon prop, as name', () => {
i.icon = 'some-name';
expect(getUrl(i)).toBe('/svg/some-name.svg');
});
it('use icon prop, as url', () => {
i.icon = './some.svg';
expect(getUrl(i)).toBe('./some.svg');
});
it('use name prop', () => {
i.name = 'some-name';
expect(getUrl(i)).toBe('/svg/some-name.svg');
});
it('use src prop', () => {
i.src = './some.svg';
i.name = 'some-name';
i.icon = 'some-icon';
expect(getUrl(i)).toBe('./some.svg');
});
});
describe('getSrc', () => {
it('both . and /', () => {
expect(getSrc('./somefile.svg')).toBe('./somefile.svg');
});
it('url', () => {
expect(getSrc('https://ionicons/somefile.svg')).toBe('https://ionicons/somefile.svg');
});
it('just a .', () => {
expect(getSrc('somefile.svg')).toBe('somefile.svg');
});
it('just a /', () => {
expect(getSrc('/somesvg')).toBe('/somesvg');
});
it('no . or /', () => {
expect(getSrc('some-name')).toBe(null);
});
});
describe('getName', () => {
it('not allow special chars', () => {
expect(getName('some\\name', '', 'io', '', '')).toBe(null);
expect(getName('some$name', '', 'io', '', '')).toBe(null);
expect(getName('some:name', '', 'io', '', '')).toBe(null);
expect(getName('some.name', '', 'io', '', '')).toBe(null);
expect(getName('some/name', '', 'io', '', '')).toBe(null);
});
it('use ios mode prefixed', () => {
expect(getName('ios-some-name', '', '', '', '')).toBe('ios-some-name');
});
it('use md mode prefixed', () => {
expect(getName('md-some-name', '', '', '', '')).toBe('md-some-name');
});
it('should not use name if no name, ios or md', () => {
expect(getName(undefined, undefined, '', '', '')).toBe(null);
});
});
describe('addIcons', () => {
it('should add an svg to the icon cache', () => {
const testData = 'stubbed data';
expect(getIconMap().get('logo-ionic')).toEqual(undefined);
addIcons({ 'logo-ionic': 'stubbed data' });
expect(getIconMap().get('logo-ionic')).toEqual(testData);
});
it('should add kebab and camel case names to the icon cache', () => {
const logoIonitron = 'stubbed data';
expect(getIconMap().get('logo-ionitron')).toEqual(undefined);
expect(getIconMap().get('logoIonitron')).toEqual(undefined);
addIcons({ logoIonitron });
expect(getIconMap().get('logo-ionitron')).toEqual(logoIonitron);
expect(getIconMap().get('logoIonitron')).toEqual(logoIonitron);
});
it('should map to a name that does not match the svg', () => {
const logoIonitron = 'stubbed data';
expect(getIconMap().get('my-fun-icon')).toEqual(undefined);
addIcons({ 'my-fun-icon': logoIonitron });
expect(getIconMap().get('my-fun-icon')).toEqual(logoIonitron);
});
it('should map to an explicit camel case name', () => {
const logoIonitron = 'stubbed data';
expect(getIconMap().get('myCoolIcon')).toEqual(undefined);
addIcons({ 'myCoolIcon': logoIonitron });
expect(getIconMap().get('myCoolIcon')).toEqual(logoIonitron);
});
it('should not warn when mapping the same icon twice', () => {
const spy = jest.spyOn(console, 'warn');
const myIcon = 'my-icon';
expect(spy).not.toHaveBeenCalled();
addIcons({ myIcon });
expect(spy).not.toHaveBeenCalled();
addIcons({ myIcon });
expect(spy).not.toHaveBeenCalled();
});
it('should not overwrite icons', () => {
const spy = jest.spyOn(console, 'warn');
const logoA = 'logo a';
const logoB = 'logo b';
expect(spy).not.toHaveBeenCalled();
expect(getIconMap().get('logo-a')).toEqual(undefined);
addIcons({ 'logo-a': logoB, logoA });
expect(getIconMap().get('logo-a')).toEqual(logoB);
expect(getIconMap().get('logoA')).toEqual(logoA);
expect(spy).toHaveBeenCalled();
});
});
+73
View File
@@ -0,0 +1,73 @@
import { isEncodedDataUrl, isSvgDataUrl, isValid } from '../validate';
describe('isValid', () => {
it('invalid onload attr', () => {
const el = {
nodeType: 1,
nodeName: 'svg',
attributes: [{ name: 'onload' }],
childNodes: []
} as any;
expect(isValid(el)).toBe(false);
});
it('invalid onclick attr', () => {
const el = {
nodeType: 1,
nodeName: 'svg',
attributes: [{ name: 'OnClIcK' }],
childNodes: []
} as any;
expect(isValid(el)).toBe(false);
});
it('invalid child SCRIPT elm', () => {
const el = {
nodeType: 1, nodeName: 'svg', attributes: [], childNodes: [
{ nodeType: 1, nodeName: 'SCRIPT', attributes: [], childNodes: [] }
]
} as any;
expect(isValid(el)).toBe(false);
});
it('invalid script elm', () => {
const el = { nodeType: 1, nodeName: 'script', attributes: [], childNodes: [] } as any;
expect(isValid(el)).toBe(false);
});
it('is valid circle elm', () => {
const el = { nodeType: 1, nodeName: 'circle', attributes: [], childNodes: [] } as any;
expect(isValid(el)).toBe(true);
});
it('is valid SVG elm', () => {
const el = {
nodeType: 1, nodeName: 'SVG', attributes: [], childNodes: [
{ nodeType: 1, nodeName: 'line', attributes: [], childNodes: [] }
]
} as any;
expect(isValid(el)).toBe(true);
});
it('is valid text node', () => {
const el = { nodeType: 3, nodeName: '#text' } as any;
expect(isValid(el)).toBe(true);
});
});
it('isSvgDataUrl', () => {
expect(isSvgDataUrl('data:image/svg+xml;base64,xxx')).toBe(true);
expect(isSvgDataUrl('data:image/svg+xml;utf8,<svg></svg>')).toBe(true);
expect(isSvgDataUrl('https://example.com/icon.svg')).toBe(false);
expect(isSvgDataUrl('http://example.com/icon.svg')).toBe(false);
});
it('isEncodedDataUrl', () => {
expect(isEncodedDataUrl('data:image/svg+xml;base64,xxx')).toBe(false);
expect(isEncodedDataUrl('data:image/svg+xml;utf8,<svg></svg>')).toBe(true);
expect(isEncodedDataUrl('https://example.com/icon.svg')).toBe(false);
expect(isEncodedDataUrl('http://example.com/icon.svg')).toBe(false);
});
+200
View File
@@ -0,0 +1,200 @@
import { getAssetPath } from '@stencil/core';
import { Icon } from './icon';
let CACHED_MAP: Map<string, string>;
export const getIconMap = (): Map<string, string> => {
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;
}
};
export const addIcons = (icons: { [name: string]: string; }) => {
Object.keys(icons).forEach(name => {
addToIconMap(name, icons[name]);
/**
* Developers can also pass in the SVG object directly
* and Ionicons can map the object to a kebab case name.
* Example: addIcons({ addCircleOutline });
* This will create an "addCircleOutline" entry and
* an "add-circle-outline" entry.
* Usage: <ion-icon name="add-circle-outline"></ion-icon>
* Using name="addCircleOutline" is valid too, but the
* kebab case naming is preferred.
*/
const toKebabCase = name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
if (name !== toKebabCase) {
addToIconMap(toKebabCase, icons[name]);
}
});
};
const addToIconMap = (name: string, data: any) => {
const map = getIconMap();
const existingIcon = map.get(name);
if (existingIcon === undefined) {
map.set(name, data);
/**
* Importing and defining the same icon reference
* multiple times should not yield a warning.
*/
} else if (existingIcon !== data) {
console.warn(`[Ionicons Warning]: Multiple icons were mapped to name "${name}". Ensure that multiple icons are not mapped to the same icon name.`)
}
}
export const getUrl = (i: Icon) => {
let url = getSrc(i.src);
if (url) {
return url;
}
url = getName(i.name, i.icon, i.mode, i.ios, i.md);
if (url) {
return getNamedUrl(url, i);
}
if (i.icon) {
url = getSrc(i.icon);
if (url) {
return url;
}
url = getSrc(i.icon[i.mode]);
if (url) {
return url;
}
}
return null;
};
const getNamedUrl = (iconName: string, iconEl: Icon) => {
const url = getIconMap().get(iconName);
if (url) {
return url;
}
try {
return getAssetPath(`svg/${iconName}.svg`);
} catch(e) {
/**
* In the custom elements build version of ionicons, referencing an icon
* by name will throw an invalid URL error because the asset path is not defined.
* This catches that error and logs something that is more developer-friendly.
* We also include a reference to the ion-icon element so developers can
* figure out which instance of ion-icon needs to be updated.
*/
console.warn(`[Ionicons Warning]: Could not load icon with name "${iconName}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`, iconEl);
}
};
export const getName = (
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 && 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') {
iconName = toLower(ios);
} else if (md && mode === 'md') {
iconName = toLower(md);
} else {
if (!iconName && icon && !isSrc(icon)) {
iconName = icon;
}
if (isStr(iconName)) {
iconName = toLower(iconName);
}
}
if (!isStr(iconName) || iconName.trim() === '') {
return null;
}
// only allow alpha characters and dash
const invalidChars = iconName.replace(/[a-z]|-|\d/gi, '');
if (invalidChars !== '') {
return null;
}
return iconName;
};
export const getSrc = (src: string | undefined) => {
if (isStr(src)) {
src = src.trim();
if (isSrc(src)) {
return src;
}
}
return null;
};
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';
};
+53
View File
@@ -0,0 +1,53 @@
import { isStr } from './utils';
export const validateContent = (svgContent: string) => {
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]);
}
}
// 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;
}
}
return '';
};
export const isValid = (elm: HTMLElement) => {
if (elm.nodeType === 1) {
if (elm.nodeName.toLowerCase() === 'script') {
return false;
}
for (let i = 0; i < elm.attributes.length; i++) {
const name = elm.attributes[i].name;
if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {
return false;
}
}
for (let i = 0; i < elm.childNodes.length; i++) {
if (!isValid(elm.childNodes[i] as any)) {
return false;
}
}
}
return true;
};
export const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');
export const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;
-2
View File
@@ -1,2 +0,0 @@
export * from './components';
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><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: 512 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/></svg>

After

Width:  |  Height:  |  Size: 227 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 4H5C3.34 4 2 5.34 2 7v8c0 1.66 1.34 3 3 3l-1 1v1h1l2-2.03L9 18v-5H4V5.98L13 6v2h2V7c0-1.66-1.34-3-3-3zM5 14c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm15.57-4.34c-.14-.4-.52-.66-.97-.66h-7.19c-.46 0-.83.26-.98.66L10 13.77l.01 5.51c0 .38.31.72.69.72h.62c.38 0 .68-.38.68-.76V18h8v1.24c0 .38.31.76.69.76h.61c.38 0 .69-.34.69-.72l.01-1.37v-4.14l-1.43-4.11zm-8.16.34h7.19l1.03 3h-9.25l1.03-3zM12 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm8 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/><path fill="none" d="M0 0h24v24H0z"/></svg>

After

Width:  |  Height:  |  Size: 641 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"><defs><path id="a" d="M24 0v24H0V0h24z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M10.08 10.86c.05-.33.16-.62.3-.87s.34-.46.59-.62c.24-.15.54-.22.91-.23.23.01.44.05.63.13.2.09.38.21.52.36s.25.33.34.53.13.42.14.64h1.79c-.02-.47-.11-.9-.28-1.29s-.4-.73-.7-1.01-.66-.5-1.08-.66-.88-.23-1.39-.23c-.65 0-1.22.11-1.7.34s-.88.53-1.2.92-.56.84-.71 1.36S8 11.29 8 11.87v.27c0 .58.08 1.12.23 1.64s.39.97.71 1.35.72.69 1.2.91 1.05.34 1.7.34c.47 0 .91-.08 1.32-.23s.77-.36 1.08-.63.56-.58.74-.94.29-.74.3-1.15h-1.79c-.01.21-.06.4-.15.58s-.21.33-.36.46-.32.23-.52.3c-.19.07-.39.09-.6.1-.36-.01-.66-.08-.89-.23-.25-.16-.45-.37-.59-.62s-.25-.55-.3-.88-.08-.67-.08-1v-.27c0-.35.03-.68.08-1.01zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" clip-path="url(#b)"/></svg>

After

Width:  |  Height:  |  Size: 1000 B

+15
View File
@@ -0,0 +1,15 @@
import { expect } from '@playwright/test';
import { test } from '../../../utils/test/playwright';
test.describe('icon: csp', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/test/csp');
});
test('should load svg', async ({ page }) => {
const svg = page.locator('ion-icon#icon-usage svg');
await expect(svg).toBeVisible();
});
});
+54
View File
@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html dir="ltr" lang="en" mode="ios">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<meta http-equiv="Content-Security-Policy"
content="default-src 'none'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com/*; img-src 'self'; connect-src 'self'; font-src https://fonts.gstatic.com/*'">
<title>IonIcon - Content Security Policy</title>
<script type="module" src="../../build/ionicons.esm.js"></script>
<script nomodule src="../../build/ionicons.js"></script>
<style>
body {
margin: 0;
padding: 16px;
font-size: 32px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
h1 {
margin: 15px 0 5px;
font-size: 25px;
}
h2 {
margin: 15px 0 5px;
font-size: 18px;
}
.custom {
stroke: red;
fill: goldenrod;
color: black;
}
</style>
</head>
<body>
<h1>Ionicons - Test </h1>
<h2>Default</h2>
<ion-icon src="/assets/chat.svg"></ion-icon>
<ion-icon name="add"></ion-icon>
<ion-icon id="icon-usage"
icon="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Watch</title><rect x='136' y='136' width='240' height='240' rx='8' ry='8'/><path d='M384 96h-48V16H176v80h-48a32 32 0 00-32 32v256a32 32 0 0032 32h48v80h160v-80h48a32 32 0 0032-32V128a32 32 0 00-32-32zm8 272a24 24 0 01-24 24H144a24 24 0 01-24-24V144a24 24 0 0124-24h224a24 24 0 0124 24z'/></svg>">
</ion-icon>
<ion-icon class="custom"
icon="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Watch</title><rect x='136' y='136' width='240' height='240' rx='8' ry='8'/><path d='M384 96h-48V16H176v80h-48a32 32 0 00-32 32v256a32 32 0 0032 32h48v80h160v-80h48a32 32 0 0032-32V128a32 32 0 00-32-32zm8 272a24 24 0 01-24 24H144a24 24 0 01-24-24V144a24 24 0 0124-24h224a24 24 0 0124 24z'/></svg>">
</ion-icon>
</body>
</html>
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>

After

Width:  |  Height:  |  Size: 292 B

@@ -0,0 +1,19 @@
import { expect } from '@playwright/test';
import { test } from '../../../utils/test/playwright';
test.describe('icon: dynamic type', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/test/dynamic-type');
});
test('should scale text on larger font sizes', async ({ page }) => {
// Wait for all SVGs to be lazily loaded before taking screenshots
await page.waitForLoadState('networkidle');
const icons = page.locator('#icons');
expect(await icons.screenshot()).toMatchSnapshot(`icon-dynamic-type-diff.png`);
});
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

@@ -0,0 +1,27 @@
<!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 - Dynamic Type</title>
<script type="module" src="../../build/ionicons.esm.js"></script>
<script nomodule src="../../build/ionicons.js"></script>
<style>
html {
font-size: 28px;
}
</style>
</head>
<body>
<div id="icons">
<ion-icon name="star"></ion-icon>
<ion-icon name="star" size="small"></ion-icon>
<ion-icon name="star" size="large"></ion-icon>
</div>
</body>
</html>
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"/></svg>

After

Width:  |  Height:  |  Size: 369 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><script>alert('got ya')</script><path d="M0 0h24v24H0z" fill="none"/><path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"/></svg>

After

Width:  |  Height:  |  Size: 544 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><script>alert('got ya')</script><path d="M0 0h24v24H0z" fill="none"/><path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"/></svg>

After

Width:  |  Height:  |  Size: 544 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"/><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 12c0-2.61 1.67-4.83 4-5.65V4.26C3.55 5.15 1 8.27 1 12s2.55 6.85 6 7.74v-2.09c-2.33-.82-4-3.04-4-5.65z"/></svg>

After

Width:  |  Height:  |  Size: 372 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm0 14H5V8h14v10z"/><path fill="none" d="M0 0h24v24H0z"/></svg>

After

Width:  |  Height:  |  Size: 233 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 6V4h-4v2h4zM4 8v11h16V8H4zm16-2c1.11 0 2 .89 2 2v11c0 1.11-.89 2-2 2H4c-1.11 0-2-.89-2-2l.01-11c0-1.11.88-2 1.99-2h4V4c0-1.11.89-2 2-2h4c1.11 0 2 .89 2 2v2h4z"/><path fill="none" d="M0 0h24v24H0z"/></svg>

After

Width:  |  Height:  |  Size: 340 B

+9193 -1987
View File
File diff suppressed because it is too large Load Diff
-107
View File
@@ -1,107 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Ionicons Animations</title>
<style>
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background: #fff;
color: #444;
font: 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
}
a, a:visited {
color: #888;
text-decoration: underline;
}
a:hover, a:focus { color: #000; }
p { margin-bottom: 20px; }
header {
border-bottom: 2px solid #ddd;
margin-bottom: 20px;
overflow: hidden;
padding: 20px 0;
}
header h1 {
color: #888;
float: left;
font-size: 36px;
font-weight: 300;
}
header a {
float: right;
font-size: 14px;
}
.container {
margin: 0 auto;
max-width: 1200px;
min-width: 960px;
padding: 0 20px;
width: 95%;
}
.icon {
font-size: 32px;
}
</style>
<link href="css/ionicons.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div class="container">
<header>
<h1>Ionicons Animations:</h1>
<p><a href="http://ionicons.com/">Ionicons Homepage</a></p>
</header>
<div class="content">
<h3>.ion-refreshing</h3>
<p>
<i class="icon ion-refreshing"></i>
</p>
<h3>.ion-ios7-reloading</h3>
<p>
<i class="icon ion-ios7-reloading"></i>
</p>
<h3>.ion-loading-a</h3>
<p>
<i class="icon ion-loading-a"></i>
</p>
<h3>.ion-loading-b</h3>
<p>
<i class="icon ion-loading-b"></i>
</p>
<h3>.ion-loading-c</h3>
<p>
<i class="icon ion-loading-c"></i>
</p>
<h3>.ion-loading-d</h3>
<p>
<i class="icon ion-loading-d"></i>
</p>
<h3>.ion-looping</h3>
<p>
<i class="icon ion-looping"></i>
</p>
</div>
</div>
</body>
</html>
-243
View File
@@ -1,243 +0,0 @@
// jQuery? We don't need no stinkin' jQuery
if (!String.prototype.trim) {
String.prototype.trim = function () {
return this.replace(/^\s+|\s+$/g, '');
};
}
(function(){
// load up the icon object from whats in the DOM
var
x, l, y, t,
iconElement,
tags,
pack,
isResult,
totalResults,
clipboardTimer,
icons = {},
iconElements = document.getElementsByTagName("li"),
searchInput = document.getElementById("search"),
iconsUL = document.getElementById("icons");
for(x = 0, l = iconElements.length; x < l; x++) {
iconElement = iconElements[x];
if(iconElement.className.length < 6) {
continue;
}
if(icons[ iconElement.className ]) {
alert(iconElement.className + " already exists");
continue;
}
tags = iconElement.getAttribute("data-tags");
pack = iconElement.getAttribute("data-pack");
iconElement.icon = icons[ iconElement.className ] = {
name: iconElement.className,
tags: (tags ? tags.split(',') : []),
pack: (pack ? pack : 'default'),
el: iconElement,
show: true,
code: getContentForIcon(iconElement.className),
animation: (iconElement.getAttribute("data-animation") === "true")
};
tags = iconElement.className.split('-');
for(y = 0; y < tags.length; y++) {
tags[y] = tags[y].trim().toLowerCase();
if(tags[y].length > 0 && tags[y] !== "icon") {
iconElement.icon.tags.push(tags[y]);
}
}
addEvent(iconElement, 'click', panelClick);
addEvent(iconElement, 'mouseover', iconMouseOver);
}
totalResults = icons.length;
// search
function onSearchFocus(){
iconsUL.className = "search-init";
searchInput.className = "has-text"
this.placeholder = "";
hideIconPanel();
}
addEvent(searchInput, "focus", onSearchFocus);
function onSearchBlur(){
iconsUL.className = "";
this.placeholder = "Search";
if(totalResults < 1 || this.value.trim() === "") {
this.value = "";
this.className = "";
showAll();
}
hideIconPanel();
}
addEvent(searchInput, "blur", onSearchBlur);
function onSearchKeyUp(e) {
var keyCode = e.which || e.keyCode;
if(keyCode === 27) {
this.value = "";
searchInput.className = "";
this.blur();
} else if(this.value.trim() === "") {
showAll();
this.value = "";
iconsUL.className = "search-init";
hideIconPanel();
} else {
hideIconPanel();
iconsUL.className = "search-results";
searchQuery(this.value);
}
}
addEvent(searchInput, "keyup", onSearchKeyUp);
function searchQuery(query) {
if(!query) return;
totalResults = 0;
query = query.trim().toLowerCase();
var terms = query.split(' ');
if(terms.length < 1) {
showAll();
iconsUL.className = "search-init";
return;
}
iconsUL.className = "search-results";
searchInput.className = "has-text";
// set all to show
for(x in icons) {
icons[x].show = true;
}
// filter down for each term in the query
for(t = 0; t < terms.length; t++) {
for(x in icons) {
if(!icons[x].show) continue;
isResult = false;
for(y = 0; y < icons[x].tags.length; y++) {
if( icons[x].tags[y].indexOf(terms[t]) > -1 ) {
isResult = true;
break;
}
}
if(!isResult) {
icons[x].show = false;
}
}
}
// show or hide
for(x in icons) {
if(icons[x].show) {
totalResults++;
if(icons[x].el.style.display !== "inline-block") {
icons[x].el.style.display = "inline-block";
}
} else {
if(icons[x].el.style.display !== "none") {
icons[x].el.style.display = "none";
}
}
}
}
function showAll() {
totalResults = icons.length;
for(x in icons) {
icons[x].show = true;
if(icons[x].el.style.display !== "inline-block") {
icons[x].el.style.display = "inline-block";
}
}
}
function addEvent(el, ev, fn) {
if (el.addEventListener) {
el.addEventListener(ev, fn, false);
} else if (el.attachEvent) {
el.attachEvent('on' + ev, fn);
} else {
el['on' + ev] = fn;
}
}
var iconPanel = document.getElementById("icon-panel");
var iconName = document.getElementById("icon-name");
var iconCode = document.getElementById("icon-code");
var animateLink = document.getElementById("animate-link");
var mouseOverTimeout;
function iconMouseOver(e) {
var target = (e.currentTarget) ? e.currentTarget : e.srcElement;
if(target.className.indexOf("active") === -1) {
clearTimeout(mouseOverTimeout);
mouseOverTimeout = setTimeout(hideIconPanel, 20);
}
}
function panelClick(e) {
var target = (e.currentTarget) ? e.currentTarget : e.srcElement;
if(target && target.icon) {
if(target.className.indexOf("active") > -1) {
hideIconPanel();
return;
}
for(x in icons) {
if(icons[x].el.className.indexOf("active") > -1) {
icons[x].el.className = icons[x].el.className.replace(" active", "");
}
}
iconPanel.style.top = (target.offsetTop + 60) + "px";
iconPanel.style.left = (target.offsetLeft - 85) + "px";
target.className += " active";
iconName.value = target.icon.name;
iconCode.innerHTML = (target.icon.code || "");
animateLink.style.display = (target.icon.animation ? "" : "none");
}
}
function hideIconPanel() {
if(iconPanel.style.top !== "-9999px") {
iconPanel.style.top = "-9999px";
}
for(x in icons) {
if(icons[x].el.className.indexOf("active") > -1) {
icons[x].el.className = icons[x].el.className.replace(" active", "");
}
}
}
function getContentForIcon(className) {
try {
var rules = document.styleSheets[0].cssRules;
for(var j=0; j<rules.length; j++) {
if(rules[j].selectorText === "." + className + "::before") {
var content = rules[j].style["content"];
if(content) {
var decimalValue = content.charCodeAt().toString(10).replace(/\D/g, ''); //clean the value
return "\\" + Number(decimalValue).toString(16);
}
}
}
} catch(e) {}
}
if(location.hash && location.hash.length > 1 && location.hash !== '#cdn') {
searchInput.value = location.hash.replace('#', '').replace(/%20/g, ' ');
iconsUL.className = "search-results";
searchQuery(searchInput.value);
}
})();
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

-698
View File
@@ -1,698 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="Ionicons is an open-sourced and MIT licensed icon pack." />
<link rel="stylesheet" type="text/css" media="screen" href="/v1/css/ionicons.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="/v1/stylesheet.css">
<title>Ionicons: The premium icon font for Ionic Framework</title>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44023830-2', 'ionicons.com');
ga('send', 'pageview');
</script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</head>
<body>
<h1>
The premium icon font for <a href="http://ionicframework.com/">Ionic Framework</a>.
</h1>
<h2>
100% free and open source. MIT Licensed.
</h2>
<p>
<span class="twitter-share">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="ionicframework" data-hashtags="icons,webdev,mobile" data-related="benjsperry,maxlynch,adamdbradley,drifty">Tweet</a>
</span>
<span class="twitter-follow">
<a href="https://twitter.com/ionicframework" class="twitter-follow-button">Follow @ionicframework</a>
</span>
<span class="github-star">
<iframe src="http://ghbtns.com/github-btn.html?user=driftyco&amp;repo=ionicons&amp;type=watch&amp;count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20" style="margin-left: 0px; margin-right: -30px"></iframe>
</span>
</p>
<p class="download">
<a href="https://github.com/driftyco/ionicons/archive/v1.5.2.zip">
Download
</a>
</p>
<p class="version">
Version 1.5.2 -
<a href="https://github.com/driftyco/ionicons">GitHub</a> -
<a href="#cdn">CDN</a>
</p>
<p class="search">
<input id="search" type="search" placeholder="Search">
<i class="ion-ios7-search"></i>
</p>
<ul id="icons">
<li class="ion-ionic" data-pack="default" data-tags="badass, framework, sexy, hawt"></li>
<li class="ion-arrow-up-a" data-pack="default" data-tags=""></li>
<li class="ion-arrow-right-a" data-pack="default" data-tags=""></li>
<li class="ion-arrow-down-a" data-pack="default" data-tags=""></li>
<li class="ion-arrow-left-a" data-pack="default" data-tags=""></li>
<li class="ion-arrow-up-b" data-pack="default" data-tags=""></li>
<li class="ion-arrow-right-b" data-pack="default" data-tags=""></li>
<li class="ion-arrow-down-b" data-pack="default" data-tags=""></li>
<li class="ion-arrow-left-b" data-pack="default" data-tags=""></li>
<li class="ion-arrow-up-c" data-pack="default" data-tags=""></li>
<li class="ion-arrow-right-c" data-pack="default" data-tags=""></li>
<li class="ion-arrow-down-c" data-pack="default" data-tags=""></li>
<li class="ion-arrow-left-c" data-pack="default" data-tags=""></li>
<li class="ion-arrow-return-right" data-pack="default" data-tags=""></li>
<li class="ion-arrow-return-left" data-pack="default" data-tags=""></li>
<li class="ion-arrow-swap" data-pack="default" data-tags="switch, flip"></li>
<li class="ion-arrow-shrink" data-pack="default" data-tags="pinch"></li>
<li class="ion-arrow-expand" data-pack="default" data-tags="fullscreen"></li>
<li class="ion-arrow-move" data-pack="default" data-tags="drag"></li>
<li class="ion-arrow-resize" data-pack="default" data-tags="drag"></li>
<li class="ion-chevron-up" data-pack="default" data-tags="arrow, up"></li>
<li class="ion-chevron-right" data-pack="default" data-tags="arrow, right"></li>
<li class="ion-chevron-down" data-pack="default" data-tags="arrow, down"></li>
<li class="ion-chevron-left" data-pack="default" data-tags="arrow, left"></li>
<li class="ion-navicon-round" data-pack="default" data-tags="menu, hamburger, slide menu"></li>
<li class="ion-navicon" data-pack="default" data-tags="menu, hamburger, slide menu"></li>
<li class="ion-drag" data-pack="default" data-tags="reorder, move, drag"></li>
<li class="ion-log-in" data-pack="default" data-tags="sign in, "></li>
<li class="ion-log-out" data-pack="default" data-tags="sign out"></li>
<li class="ion-checkmark-round" data-pack="default" data-tags="complete, finished, success, on"></li>
<li class="ion-checkmark" data-pack="default" data-tags="complete, finished, success, on"></li>
<li class="ion-checkmark-circled" data-pack="default" data-tags="complete, finished, success, on"></li>
<li class="ion-close-round" data-pack="default" data-tags="delete, trash, kill, x"></li>
<li class="ion-close" data-pack="default" data-tags="delete, trash, kill, x"></li>
<li class="ion-close-circled" data-pack="default" data-tags="delete, trash, kill, x"></li>
<li class="ion-plus-round" data-pack="default" data-tags="add, include, new, invite, +"></li>
<li class="ion-plus" data-pack="default" data-tags="add, include, new, invite, +"></li>
<li class="ion-plus-circled" data-pack="default" data-tags="add, include, new, invite, +"></li>
<li class="ion-minus-round" data-pack="default" data-tags="hide, remove, minimize, -"></li>
<li class="ion-minus" data-pack="default" data-tags="hide, remove, minimize, -"></li>
<li class="ion-minus-circled" data-pack="default" data-tags="hide, remove, minimize, -"></li>
<li class="ion-information" data-pack="default" data-tags="help, more, tooltip"></li>
<li class="ion-information-circled" data-pack="default" data-tags="help, more, tooltip"></li>
<li class="ion-help" data-pack="default" data-tags="question, ?"></li>
<li class="ion-help-circled" data-pack="default" data-tags="question, ?"></li>
<li class="ion-help-buoy" data-pack="default" data-tags="question, ?"></li>
<li class="ion-asterisk" data-pack="default" data-tags="favorite, mark, star"></li>
<li class="ion-alert" data-pack="default" data-tags="attention, warning, notice, !, exclamation"></li>
<li class="ion-alert-circled" data-pack="default" data-tags="attention, warning, notice, !, exclamation"></li>
<li class="ion-refresh" data-pack="default" data-tags="reload, renew"></li>
<li class="ion-refreshing" data-pack="default" data-tags="reload, renew, animation" data-animation="true"></li>
<li class="ion-loop" data-pack="default" data-tags="refresh"></li>
<li class="ion-looping" data-pack="default" data-tags="refresh, animation" data-animation="true"></li>
<li class="ion-shuffle" data-pack="default" data-tags="random"></li>
<li class="ion-home" data-pack="default" data-tags="house"></li>
<li class="ion-search" data-pack="default" data-tags="magnifying glass"></li>
<li class="ion-flag" data-pack="default" data-tags="favorite, mark, star"></li>
<li class="ion-star" data-pack="default" data-tags="favorite"></li>
<li class="ion-heart" data-pack="default" data-tags="love"></li>
<li class="ion-heart-broken" data-pack="default" data-tags="love"></li>
<li class="ion-gear-a" data-pack="default" data-tags="settings, options, cog"></li>
<li class="ion-gear-b" data-pack="default" data-tags="settings, options, cog"></li>
<li class="ion-toggle-filled" data-pack="default" data-tags="settings, options, switch"></li>
<li class="ion-toggle" data-pack="default" data-tags="settings, options, switch"></li>
<li class="ion-settings" data-pack="default" data-tags="options, tools"></li>
<li class="ion-wrench" data-pack="default" data-tags="settings, options, tools"></li>
<li class="ion-hammer" data-pack="default" data-tags="settings, options, tools"></li>
<li class="ion-edit" data-pack="default" data-tags="change, update, write, type, pencil"></li>
<li class="ion-trash-a" data-pack="default" data-tags="delete, remove, dump"></li>
<li class="ion-trash-b" data-pack="default" data-tags="delete, remove, dump"></li>
<li class="ion-document" data-pack="default" data-tags="paper, file"></li>
<li class="ion-document-text" data-pack="default" data-tags="paper, file"></li>
<li class="ion-clipboard" data-pack="default" data-tags="write"></li>
<li class="ion-scissors" data-pack="default" data-tags="cut"></li>
<li class="ion-funnel" data-pack="default" data-tags="sort"></li>
<li class="ion-bookmark" data-pack="default" data-tags="favorite, tag, save"></li>
<li class="ion-email" data-pack="default" data-tags="snail, mail"></li>
<li class="ion-folder" data-pack="default" data-tags="snail, mail"></li>
<li class="ion-filing" data-pack="default" data-tags="mail"></li>
<li class="ion-archive" data-pack="default" data-tags="mail"></li>
<li class="ion-reply" data-pack="default" data-tags="mail, undo"></li>
<li class="ion-reply-all" data-pack="default" data-tags="mail"></li>
<li class="ion-forward" data-pack="default" data-tags="mail, redo"></li>
<li class="ion-share" data-pack="default" data-tags="outbound"></li>
<li class="ion-paper-airplane" data-pack="default" data-tags="outbound, mail, letter, send"></li>
<li class="ion-link" data-pack="default" data-tags="chain, anchor, href, attach"></li>
<li class="ion-paperclip" data-pack="default" data-tags="attach"></li>
<li class="ion-compose" data-pack="default" data-tags="write, compose, type"></li>
<li class="ion-briefcase" data-pack="default" data-tags="store, organize"></li>
<li class="ion-medkit" data-pack="default" data-tags="health"></li>
<li class="ion-at" data-pack="default" data-tags="@"></li>
<li class="ion-pound" data-pack="default" data-tags="hashtag, #"></li>
<li class="ion-quote" data-pack="default" data-tags="chat, quotation"></li>
<li class="ion-cloud" data-pack="default" data-tags="storage"></li>
<li class="ion-upload" data-pack="default" data-tags="storage, cloud"></li>
<li class="ion-more" data-pack="default" data-tags="circles"></li>
<li class="ion-grid" data-pack="default" data-tags="menu"></li>
<li class="ion-calendar" data-pack="default" data-tags="date, time, month, year"></li>
<li class="ion-clock" data-pack="default" data-tags="time, watch, hours, minutes, seconds"></li>
<li class="ion-compass" data-pack="default" data-tags="location, directions, navigation"></li>
<li class="ion-pinpoint" data-pack="default" data-tags="gps, navigation"></li>
<li class="ion-pin" data-pack="default" data-tags="gps, navigation"></li>
<li class="ion-navigate" data-pack="default" data-tags="gps, location pin"></li>
<li class="ion-location" data-pack="default" data-tags="gps, navigation, pin"></li>
<li class="ion-map" data-pack="default" data-tags="gps, navigation, pin"></li>
<li class="ion-model-s" data-pack="default" data-tags="navigation, car, drive, transportation, tesla, sexy"></li>
<li class="ion-locked" data-pack="default" data-tags="padlock, security"></li>
<li class="ion-unlocked" data-pack="default" data-tags="padlock, security"></li>
<li class="ion-key" data-pack="default" data-tags="access"></li>
<li class="ion-arrow-graph-up-right" data-pack="default" data-tags="stats"></li>
<li class="ion-arrow-graph-down-right" data-pack="default" data-tags="stats"></li>
<li class="ion-arrow-graph-up-left" data-pack="default" data-tags="stats"></li>
<li class="ion-arrow-graph-down-left" data-pack="default" data-tags="stats"></li>
<li class="ion-stats-bars" data-pack="default" data-tags="data"></li>
<li class="ion-connection-bars" data-pack="default" data-tags="data, stats"></li>
<li class="ion-pie-graph" data-pack="default" data-tags="stats"></li>
<li class="ion-chatbubble" data-pack="default" data-tags="talk"></li>
<li class="ion-chatbubble-working" data-pack="default" data-tags="talk"></li>
<li class="ion-chatbubbles" data-pack="default" data-tags="talk"></li>
<li class="ion-chatbox" data-pack="default" data-tags="talk"></li>
<li class="ion-chatbox-working" data-pack="default" data-tags="talk"></li>
<li class="ion-chatboxes" data-pack="default" data-tags="talk"></li>
<li class="ion-person" data-pack="default" data-tags="users, staff, head, human"></li>
<li class="ion-person-add" data-pack="default" data-tags="users, staff, head, human, member, new"></li>
<li class="ion-person-stalker" data-pack="default" data-tags="people, human, users, staff"></li>
<li class="ion-woman" data-pack="default" data-tags="female, lady, girl, dudette"></li>
<li class="ion-man" data-pack="default" data-tags="male, guy, boy, dude"></li>
<li class="ion-female" data-pack="default" data-tags="lady, girl, dudette"></li>
<li class="ion-male" data-pack="default" data-tags="male, guy, boy, dude"></li>
<li class="ion-fork" data-pack="default" data-tags="food, drink, eat"></li>
<li class="ion-knife" data-pack="default" data-tags="food, drink, eat"></li>
<li class="ion-spoon" data-pack="default" data-tags="food, drink, eat"></li>
<li class="ion-beer" data-pack="default" data-tags="food, drink, eat"></li>
<li class="ion-wineglass" data-pack="default" data-tags="food, drink, eat"></li>
<li class="ion-coffee" data-pack="default" data-tags="food, drink, eat, caffeine"></li>
<li class="ion-icecream" data-pack="default" data-tags="food, drink, eat"></li>
<li class="ion-pizza" data-pack="default" data-tags="food, drink, eat"></li>
<li class="ion-power" data-pack="default" data-tags="on, off"></li>
<li class="ion-mouse" data-pack="default" data-tags="computer"></li>
<li class="ion-battery-full" data-pack="default" data-tags=""></li>
<li class="ion-battery-half" data-pack="default" data-tags=""></li>
<li class="ion-battery-low" data-pack="default" data-tags=""></li>
<li class="ion-battery-empty" data-pack="default" data-tags=""></li>
<li class="ion-battery-charging" data-pack="default" data-tags=""></li>
<li class="ion-wifi" data-pack="default" data-tags="internet, connection"></li>
<li class="ion-bluetooth" data-pack="default" data-tags="connection, cloud"></li>
<li class="ion-calculator" data-pack="default" data-tags="math, arithmatic, numbers, addition, subtraction"></li>
<li class="ion-camera" data-pack="default" data-tags="photo"></li>
<li class="ion-eye" data-pack="default" data-tags="view, see, creeper"></li>
<li class="ion-eye-disabled" data-pack="default" data-tags="view, see, creeper"></li>
<li class="ion-flash" data-pack="default" data-tags="lightning, weather, whether"></li>
<li class="ion-flash-off" data-pack="default" data-tags=""></li>
<li class="ion-qr-scanner" data-pack="default" data-tags="reader"></li>
<li class="ion-image" data-pack="default" data-tags="photo"></li>
<li class="ion-images" data-pack="default" data-tags="photo"></li>
<li class="ion-contrast" data-pack="default" data-tags="images, levels, light, dark, settings"></li>
<li class="ion-wand" data-pack="default" data-tags="images, levels, light, dark, settings"></li>
<li class="ion-aperture" data-pack="default" data-tags="images, levels, light, dark, settings"></li>
<li class="ion-monitor" data-pack="default" data-tags="thunderbolt, screen"></li>
<li class="ion-laptop" data-pack="default" data-tags="macbook, apple, osx"></li>
<li class="ion-ipad" data-pack="default" data-tags="tablet, mobile, apple, retina, device"></li>
<li class="ion-iphone" data-pack="default" data-tags="smartphone, mobile, apple, retina, device"></li>
<li class="ion-ipod" data-pack="default" data-tags="music, player, apple, retina, device"></li>
<li class="ion-printer" data-pack="default" data-tags="paper"></li>
<li class="ion-usb" data-pack="default" data-tags="digital, computer"></li>
<li class="ion-outlet" data-pack="default" data-tags="digital, computer, electricity"></li>
<li class="ion-bug" data-pack="default" data-tags="develop, program, hacker, error"></li>
<li class="ion-code" data-pack="default" data-tags="develop, program, hacker"></li>
<li class="ion-code-working" data-pack="default" data-tags="develop, program, hacker"></li>
<li class="ion-code-download" data-pack="default" data-tags="develop, program, hacker"></li>
<li class="ion-fork-repo" data-pack="default" data-tags="develop, program, hacker, github"></li>
<li class="ion-network" data-pack="default" data-tags="develop, program, hacker, github"></li>
<li class="ion-pull-request" data-pack="default" data-tags="develop, program, hacker, github"></li>
<li class="ion-merge" data-pack="default" data-tags="develop, program, hacker, github"></li>
<li class="ion-game-controller-a" data-pack="default" data-tags="fun"></li>
<li class="ion-game-controller-b" data-pack="default" data-tags="fun"></li>
<li class="ion-xbox" data-pack="default" data-tags="fun, games"></li>
<li class="ion-playstation" data-pack="default" data-tags="fun, games"></li>
<li class="ion-steam" data-pack="default" data-tags="fun, games"></li>
<li class="ion-closed-captioning" data-pack="default" data-tags="movie, film, television"></li>
<li class="ion-videocamera" data-pack="default" data-tags="movie, film, television"></li>
<li class="ion-film-marker" data-pack="default" data-tags="film, cut, action"></li>
<li class="ion-disc" data-pack="default" data-tags="cd, vinyl"></li>
<li class="ion-headphone" data-pack="default" data-tags="music, earbuds, beats"></li>
<li class="ion-music-note" data-pack="default" data-tags="songs"></li>
<li class="ion-radio-waves" data-pack="default" data-tags="music, sound, speaker"></li>
<li class="ion-speakerphone" data-pack="default" data-tags="sound, speaker, loud, amplify"></li>
<li class="ion-mic-a" data-pack="default" data-tags="sound, talk, speaker"></li>
<li class="ion-mic-b" data-pack="default" data-tags="sound, talk, speaker"></li>
<li class="ion-mic-c" data-pack="default" data-tags="sound, talk, speaker"></li>
<li class="ion-volume-high" data-pack="default" data-tags="sound, noise"></li>
<li class="ion-volume-medium" data-pack="default" data-tags="sound"></li>
<li class="ion-volume-low" data-pack="default" data-tags="sound"></li>
<li class="ion-volume-mute" data-pack="default" data-tags="sound"></li>
<li class="ion-levels" data-pack="default" data-tags="options, toggles, sound, mixer"></li>
<li class="ion-play" data-pack="default" data-tags="music, watch, arrow, right"></li>
<li class="ion-pause" data-pack="default" data-tags="music, break, hold, freeze"></li>
<li class="ion-stop" data-pack="default" data-tags="music, square, hold, freeze"></li>
<li class="ion-record" data-pack="default" data-tags="music, circle"></li>
<li class="ion-skip-forward" data-pack="default" data-tags="music, next"></li>
<li class="ion-skip-backward" data-pack="default" data-tags="music, previous"></li>
<li class="ion-eject" data-pack="default" data-tags="music, dvd, remove"></li>
<li class="ion-bag" data-pack="default" data-tags="shopping, price, cart, money, container, $"></li>
<li class="ion-card" data-pack="default" data-tags="credit, price, debit, money, shopping, cash, dollars, $"></li>
<li class="ion-cash" data-pack="default" data-tags="credit, price, debit, money, shopping, dollars, $"></li>
<li class="ion-pricetag" data-pack="default" data-tags="credit, debit, money, shopping, cash, dollars, $"></li>
<li class="ion-pricetags" data-pack="default" data-tags="credit, debit, money, shopping, cash, dollars, $"></li>
<li class="ion-thumbsup" data-pack="default" data-tags="like, fun, yes"></li>
<li class="ion-thumbsdown" data-pack="default" data-tags="dislike, boring, no"></li>
<li class="ion-happy" data-pack="default" data-tags="good, like, fun, yes"></li>
<li class="ion-sad" data-pack="default" data-tags="cry, bad, no"></li>
<li class="ion-trophy" data-pack="default" data-tags="competition, compete, win, lose, award"></li>
<li class="ion-podium" data-pack="default" data-tags="competition, compete, win, lose, award"></li>
<li class="ion-ribbon-a" data-pack="default" data-tags="competition, compete, win, lose, award, trophy"></li>
<li class="ion-ribbon-b" data-pack="default" data-tags="competition, compete, win, lose, award, trophy"></li>
<li class="ion-university" data-pack="default" data-tags="graduate, education, school, tassle"></li>
<li class="ion-magnet" data-pack="default" data-tags="sticky, attraction"></li>
<li class="ion-beaker" data-pack="default" data-tags="mixture, potion, flask"></li>
<li class="ion-flask" data-pack="default" data-tags="bubbles, mixture, potion"></li>
<li class="ion-egg" data-pack="default" data-tags="birth, twitter, bird, baby"></li>
<li class="ion-earth" data-pack="default" data-tags="nature, globe, home, planet"></li>
<li class="ion-planet" data-pack="default" data-tags="nature, globe, home, planet, space"></li>
<li class="ion-lightbulb" data-pack="default" data-tags="idea, new, aha!"></li>
<li class="ion-cube" data-pack="default" data-tags="box, square, container"></li>
<li class="ion-leaf" data-pack="default" data-tags="green, recycle, plant, nature"></li>
<li class="ion-waterdrop" data-pack="default" data-tags="nature, clean, recycle, fresh, wet, rain"></li>
<li class="ion-flame" data-pack="default" data-tags="fire, hot, heat"></li>
<li class="ion-fireball" data-pack="default" data-tags="hot, heat"></li>
<li class="ion-bonfire" data-pack="default" data-tags="hot, heat"></li>
<li class="ion-umbrella" data-pack="default" data-tags="wet, rain, dry, shelter"></li>
<li class="ion-nuclear" data-pack="default" data-tags="danger, warning, hazard"></li>
<li class="ion-no-smoking" data-pack="default" data-tags="danger, warning, cigarette, cancer"></li>
<li class="ion-thermometer" data-pack="default" data-tags="hot, cold, heat, temperature, mercury"></li>
<li class="ion-speedometer" data-pack="default" data-tags="travel, accelerate"></li>
<li class="ion-plane" data-pack="default" data-tags="fly, jet"></li>
<li class="ion-jet" data-pack="default" data-tags="fly, plane"></li>
<li class="ion-load-a" data-pack="default" data-tags="spinner, waiting, refresh"></li>
<li class="ion-loading-a" data-pack="default" data-tags="spinner, waiting, refresh, animation" data-animation="true"></li>
<li class="ion-load-b" data-pack="default" data-tags="spinner, waiting, refresh"></li>
<li class="ion-loading-b" data-pack="default" data-tags="spinner, waiting, refresh, animation" data-animation="true"></li>
<li class="ion-load-c" data-pack="default" data-tags="spinner, waiting, refresh"></li>
<li class="ion-loading-c" data-pack="default" data-tags="spinner, waiting, refresh, animation" data-animation="true"></li>
<li class="ion-load-d" data-pack="default" data-tags="spinner, waiting, refresh"></li>
<li class="ion-loading-d" data-pack="default" data-tags="spinner, waiting, refresh, animation" data-animation="true"></li>
<p><!-- end default icons pack --></p>
<li class="ion-ios7-ionic-outline" data-pack="ios7" data-tags="badass, framework, sexy"></li>
<li class="ion-ios7-arrow-back" data-pack="ios7" data-tags="chevron, left"></li>
<li class="ion-ios7-arrow-forward" data-pack="ios7" data-tags="chevron, right"></li>
<li class="ion-ios7-arrow-up" data-pack="ios7" data-tags="chevron"></li>
<li class="ion-ios7-arrow-right" data-pack="ios7" data-tags="chevron"></li>
<li class="ion-ios7-arrow-down" data-pack="ios7" data-tags="chevron"></li>
<li class="ion-ios7-arrow-left" data-pack="ios7" data-tags="chevron"></li>
<li class="ion-ios7-arrow-thin-up" data-pack="ios7" data-tags="chevron"></li>
<li class="ion-ios7-arrow-thin-right" data-pack="ios7" data-tags="chevron"></li>
<li class="ion-ios7-arrow-thin-down" data-pack="ios7" data-tags="chevron"></li>
<li class="ion-ios7-arrow-thin-left" data-pack="ios7" data-tags="chevron"></li>
<li class="ion-ios7-circle-filled" data-pack="ios7" data-tags="checkmark, radio, dot, on, selected, button"></li>
<li class="ion-ios7-circle-outline" data-pack="ios7" data-tags="checkmark, radio, dot, off, button"></li>
<li class="ion-ios7-checkmark-empty" data-pack="ios7" data-tags="success, confirmed, on, finished, complete"></li>
<li class="ion-ios7-checkmark-outline" data-pack="ios7" data-tags="success, confirmed, on, finished, complete"></li>
<li class="ion-ios7-checkmark" data-pack="ios7" data-tags="success, confirmed, on, finished, complete"></li>
<li class="ion-ios7-plus-empty" data-pack="ios7" data-tags="add, include, new, invite, +"></li>
<li class="ion-ios7-plus-outline" data-pack="ios7" data-tags="add, include, new, invite, +"></li>
<li class="ion-ios7-plus" data-pack="ios7" data-tags="add, include, new, invite, +"></li>
<li class="ion-ios7-close-empty" data-pack="ios7" data-tags="delete, remove, trash, end, stop, x"></li>
<li class="ion-ios7-close-outline" data-pack="ios7" data-tags="delete, remove, trash, end, stop, x"></li>
<li class="ion-ios7-close" data-pack="ios7" data-tags="delete, remove, trash, end, stop, x"></li>
<li class="ion-ios7-minus-empty" data-pack="ios7" data-tags="hide, remove, minimize, -"></li>
<li class="ion-ios7-minus-outline" data-pack="ios7" data-tags="hide, remove, minimize, -"></li>
<li class="ion-ios7-minus" data-pack="ios7" data-tags="hide, remove, minimize, -"></li>
<li class="ion-ios7-information-empty" data-pack="ios7" data-tags="help, question"></li>
<li class="ion-ios7-information-outline" data-pack="ios7" data-tags="help, question"></li>
<li class="ion-ios7-information" data-pack="ios7" data-tags="help, question"></li>
<li class="ion-ios7-help-empty" data-pack="ios7" data-tags="question, information, ?"></li>
<li class="ion-ios7-help-outline" data-pack="ios7" data-tags="question, information, ?"></li>
<li class="ion-ios7-help" data-pack="ios7" data-tags="question, information, ?"></li>
<li class="ion-ios7-search" data-pack="ios7" data-tags="find, seek, look, magnifying glass"></li>
<li class="ion-ios7-search-strong" data-pack="ios7" data-tags="find, seek, look, magnifying glass"></li>
<li class="ion-ios7-star" data-pack="ios7" data-tags="favorite, rate"></li>
<li class="ion-ios7-star-half" data-pack="ios7" data-tags="favorite, rate"></li>
<li class="ion-ios7-star-outline" data-pack="ios7" data-tags="favorite, rate"></li>
<li class="ion-ios7-heart" data-pack="ios7" data-tags="love"></li>
<li class="ion-ios7-heart-outline" data-pack="ios7" data-tags="love"></li>
<li class="ion-ios7-more" data-pack="ios7" data-tags="menu"></li>
<li class="ion-ios7-more-outline" data-pack="ios7" data-tags="menu"></li>
<li class="ion-ios7-home" data-pack="ios7" data-tags="house"></li>
<li class="ion-ios7-home-outline" data-pack="ios7" data-tags="house"></li>
<li class="ion-ios7-cloud" data-pack="ios7" data-tags="storage, weather, whether"></li>
<li class="ion-ios7-cloud-outline" data-pack="ios7" data-tags="storage, weather, whether"></li>
<li class="ion-ios7-cloud-upload" data-pack="ios7" data-tags="storage"></li>
<li class="ion-ios7-cloud-upload-outline" data-pack="ios7" data-tags="storage"></li>
<li class="ion-ios7-cloud-download" data-pack="ios7" data-tags="storage"></li>
<li class="ion-ios7-cloud-download-outline" data-pack="ios7" data-tags="storage"></li>
<li class="ion-ios7-upload" data-pack="ios7" data-tags="share, import"></li>
<li class="ion-ios7-upload-outline" data-pack="ios7" data-tags="share, import"></li>
<li class="ion-ios7-download" data-pack="ios7" data-tags="save, export"></li>
<li class="ion-ios7-download-outline" data-pack="ios7" data-tags="save, export"></li>
<li class="ion-ios7-refresh" data-pack="ios7" data-tags="reload, renew, reset"></li>
<li class="ion-ios7-refresh-outline" data-pack="ios7" data-tags="reload, renew, reset"></li>
<li class="ion-ios7-refresh-empty" data-pack="ios7" data-tags="reload, renew"></li>
<li class="ion-ios7-reload" data-pack="ios7" data-tags="renew, reset"></li>
<li class="ion-ios7-reloading" data-pack="ios7" data-tags="renew, reset, animation" data-animation="true"></li>
<li class="ion-ios7-loop-strong" data-pack="ios7" data-tags="reload, renew, reset"></li>
<li class="ion-ios7-loop" data-pack="ios7" data-tags="reload, renew, reset"></li>
<li class="ion-ios7-bookmarks" data-pack="ios7" data-tags="favorite"></li>
<li class="ion-ios7-bookmarks-outline" data-pack="ios7" data-tags="favorite"></li>
<li class="ion-ios7-flag" data-pack="ios7" data-tags="marker, favorite"></li>
<li class="ion-ios7-flag-outline" data-pack="ios7" data-tags="marker, favorite"></li>
<li class="ion-ios7-glasses" data-pack="ios7" data-tags="steve, reading, look, see"></li>
<li class="ion-ios7-glasses-outline" data-pack="ios7" data-tags="steve, reading, look, see"></li>
<li class="ion-ios7-browsers" data-pack="ios7" data-tags="square"></li>
<li class="ion-ios7-browsers-outline" data-pack="ios7" data-tags="square"></li>
<li class="ion-ios7-at" data-pack="ios7" data-tags="@"></li>
<li class="ion-ios7-at-outline" data-pack="ios7" data-tags="@"></li>
<li class="ion-ios7-pricetag" data-pack="ios7" data-tags="shopping, money, items, commerce, $"></li>
<li class="ion-ios7-pricetag-outline" data-pack="ios7" data-tags="shopping, money, items, commerce, $"></li>
<li class="ion-ios7-pricetags" data-pack="ios7" data-tags="shopping, money, items, commerce, $"></li>
<li class="ion-ios7-pricetags-outline" data-pack="ios7" data-tags="shopping, money, items, commerce, $"></li>
<li class="ion-ios7-chatboxes" data-pack="ios7" data-tags="talk"></li>
<li class="ion-ios7-chatboxes-outline" data-pack="ios7" data-tags="talk"></li>
<li class="ion-ios7-chatbubble" data-pack="ios7" data-tags="talk"></li>
<li class="ion-ios7-chatbubble-outline" data-pack="ios7" data-tags="talk"></li>
<li class="ion-ios7-cog" data-pack="ios7" data-tags="settings, gear, options"></li>
<li class="ion-ios7-cog-outline" data-pack="ios7" data-tags="settings, gear, options"></li>
<li class="ion-ios7-gear" data-pack="ios7" data-tags="cog, settings, options"></li>
<li class="ion-ios7-gear-outline" data-pack="ios7" data-tags="cog, settings, options"></li>
<li class="ion-ios7-settings" data-pack="ios7" data-tags="cog, settings, options"></li>
<li class="ion-ios7-settings-strong" data-pack="ios7" data-tags="cog, settings, options"></li>
<li class="ion-ios7-toggle" data-pack="ios7" data-tags="settings, options, switch"></li>
<li class="ion-ios7-toggle-outline" data-pack="ios7" data-tags="settings, options, switch"></li>
<li class="ion-ios7-analytics" data-pack="ios7" data-tags="metrics, track, data"></li>
<li class="ion-ios7-analytics-outline" data-pack="ios7" data-tags="metrics, track, data"></li>
<li class="ion-ios7-pie" data-pack="ios7" data-tags="cog, settings, options"></li>
<li class="ion-ios7-pie-outline" data-pack="ios7" data-tags="cog, settings, options"></li>
<li class="ion-ios7-pulse" data-pack="ios7" data-tags="live, hot, rate"></li>
<li class="ion-ios7-pulse-strong" data-pack="ios7" data-tags="live, hot, rate"></li>
<li class="ion-ios7-filing" data-pack="ios7" data-tags="archive"></li>
<li class="ion-ios7-filing-outline" data-pack="ios7" data-tags="archive"></li>
<li class="ion-ios7-box" data-pack="ios7" data-tags="archive"></li>
<li class="ion-ios7-box-outline" data-pack="ios7" data-tags="archive"></li>
<li class="ion-ios7-compose" data-pack="ios7" data-tags="write, type, create"></li>
<li class="ion-ios7-compose-outline" data-pack="ios7" data-tags="write, type, create"></li>
<li class="ion-ios7-trash" data-pack="ios7" data-tags="delete, remove, dispose, waste, basket, dump, kill"></li>
<li class="ion-ios7-trash-outline" data-pack="ios7" data-tags="delete, remove, dispose, waste, basket, dump, kill"></li>
<li class="ion-ios7-copy" data-pack="ios7" data-tags="duplicate, paper"></li>
<li class="ion-ios7-copy-outline" data-pack="ios7" data-tags="duplicate, paper"></li>
<li class="ion-ios7-email" data-pack="ios7" data-tags="snail, mail"></li>
<li class="ion-ios7-email-outline" data-pack="ios7" data-tags="snail, mail"></li>
<li class="ion-ios7-undo" data-pack="ios7" data-tags="reply"></li>
<li class="ion-ios7-undo-outline" data-pack="ios7" data-tags="reply"></li>
<li class="ion-ios7-redo" data-pack="ios7" data-tags="forward"></li>
<li class="ion-ios7-redo-outline" data-pack="ios7" data-tags="forward"></li>
<li class="ion-ios7-paperplane" data-pack="ios7" data-tags="send"></li>
<li class="ion-ios7-paperplane-outline" data-pack="ios7" data-tags="send"></li>
<li class="ion-ios7-folder" data-pack="ios7" data-tags="file"></li>
<li class="ion-ios7-folder-outline" data-pack="ios7" data-tags="file"></li>
<li class="ion-ios7-paper" data-pack="ios7" data-tags="feed, paper"></li>
<li class="ion-ios7-paper-outline" data-pack="ios7" data-tags="feed, paper"></li>
<li class="ion-ios7-world" data-pack="ios7" data-tags="globe, earth"></li>
<li class="ion-ios7-world-outline" data-pack="ios7" data-tags="globe, earth"></li>
<li class="ion-ios7-alarm" data-pack="ios7" data-tags="wake, ring"></li>
<li class="ion-ios7-alarm-outline" data-pack="ios7" data-tags="wake, ring"></li>
<li class="ion-ios7-speedometer" data-pack="ios7" data-tags="speed, drive, level"></li>
<li class="ion-ios7-speedometer-outline" data-pack="ios7" data-tags="speed, drive, level"></li>
<li class="ion-ios7-stopwatch" data-pack="ios7" data-tags="time, speed"></li>
<li class="ion-ios7-stopwatch-outline" data-pack="ios7" data-tags="time, speed"></li>
<li class="ion-ios7-timer" data-pack="ios7" data-tags="cooking, alarm, buzz"></li>
<li class="ion-ios7-timer-outline" data-pack="ios7" data-tags="cooking, alarm, buzz"></li>
<li class="ion-ios7-clock" data-pack="ios7" data-tags="time, date, hours, minutes, seconds, watch"></li>
<li class="ion-ios7-clock-outline" data-pack="ios7" data-tags="time, date, hours, minutes, seconds, watch"></li>
<li class="ion-ios7-time" data-pack="ios7" data-tags="clock, watch, hour, minute, second"></li>
<li class="ion-ios7-time-outline" data-pack="ios7" data-tags="clock, watch, hour, minute, second"></li>
<li class="ion-ios7-calendar" data-pack="ios7" data-tags="date, time, month, year"></li>
<li class="ion-ios7-calendar-outline" data-pack="ios7" data-tags="date, time, month, year"></li>
<li class="ion-ios7-photos" data-pack="ios7" data-tags="images, stills, square"></li>
<li class="ion-ios7-photos-outline" data-pack="ios7" data-tags="images, stills, square"></li>
<li class="ion-ios7-albums" data-pack="ios7" data-tags="square, boxes, slides"></li>
<li class="ion-ios7-albums-outline" data-pack="ios7" data-tags="square, boxes, slides"></li>
<li class="ion-ios7-camera" data-pack="ios7" data-tags="picture"></li>
<li class="ion-ios7-camera-outline" data-pack="ios7" data-tags="picture"></li>
<li class="ion-ios7-reverse-camera" data-pack="ios7" data-tags="picture"></li>
<li class="ion-ios7-reverse-camera-outline" data-pack="ios7" data-tags="picture"></li>
<li class="ion-ios7-eye" data-pack="ios7" data-tags="view, see, exposed, look"></li>
<li class="ion-ios7-eye-outline" data-pack="ios7" data-tags="view, see, exposed, look"></li>
<li class="ion-ios7-bolt" data-pack="ios7" data-tags="flash, lightning"></li>
<li class="ion-ios7-bolt-outline" data-pack="ios7" data-tags="flash, lightning"></li>
<li class="ion-ios7-barcode" data-pack="ios7" data-tags="reader, camera"></li>
<li class="ion-ios7-barcode-outline" data-pack="ios7" data-tags="reader, camera"></li>
<li class="ion-ios7-briefcase" data-pack="ios7" data-tags="organize, folder"></li>
<li class="ion-ios7-briefcase-outline" data-pack="ios7" data-tags="organize, folder"></li>
<li class="ion-ios7-medkit" data-pack="ios7" data-tags="health, case, first aid, sick, disease"></li>
<li class="ion-ios7-medkit-outline" data-pack="ios7" data-tags="health, case, first aid, sick, disease"></li>
<li class="ion-ios7-infinite" data-pack="ios7" data-tags="forever, loop"></li>
<li class="ion-ios7-infinite-outline" data-pack="ios7" data-tags="forever, loop"></li>
<li class="ion-ios7-calculator" data-pack="ios7" data-tags="math, arithmatic"></li>
<li class="ion-ios7-calculator-outline" data-pack="ios7" data-tags="math, arithmatic"></li>
<li class="ion-ios7-keypad" data-pack="ios7" data-tags="type, grid, circle"></li>
<li class="ion-ios7-keypad-outline" data-pack="ios7" data-tags="type, grid, circle"></li>
<li class="ion-ios7-telephone" data-pack="ios7" data-tags="oldschool, call"></li>
<li class="ion-ios7-telephone-outline" data-pack="ios7" data-tags="oldschool, call"></li>
<li class="ion-ios7-drag" data-pack="ios7" data-tags="reorder, move, drag"></li>
<li class="ion-ios7-location" data-pack="ios7" data-tags="navigation, map, gps, pin"></li>
<li class="ion-ios7-location-outline" data-pack="ios7" data-tags="navigation, map, gps, pin"></li>
<li class="ion-ios7-navigate" data-pack="ios7" data-tags="location, map, gps, pin"></li>
<li class="ion-ios7-navigate-outline" data-pack="ios7" data-tags="location, map, gps, pin"></li>
<li class="ion-ios7-locked" data-pack="ios7" data-tags="security, padlock, safe"></li>
<li class="ion-ios7-locked-outline" data-pack="ios7" data-tags="security, padlock, safe"></li>
<li class="ion-ios7-unlocked" data-pack="ios7" data-tags="security, padlock, safe"></li>
<li class="ion-ios7-unlocked-outline" data-pack="ios7" data-tags="security, padlock, safe"></li>
<li class="ion-ios7-monitor" data-pack="ios7" data-tags="thunderbolt, display, screen"></li>
<li class="ion-ios7-monitor-outline" data-pack="ios7" data-tags="thunderbolt, display, screen"></li>
<li class="ion-ios7-printer" data-pack="ios7" data-tags="paper"></li>
<li class="ion-ios7-printer-outline" data-pack="ios7" data-tags="paper"></li>
<li class="ion-ios7-person" data-pack="ios7" data-tags="users, staff, head, human"></li>
<li class="ion-ios7-person-outline" data-pack="ios7" data-tags="users, staff, head, human"></li>
<li class="ion-ios7-personadd" data-pack="ios7" data-tags="users, staff, head, human, new, invite"></li>
<li class="ion-ios7-personadd-outline" data-pack="ios7" data-tags="users, staff, head, human, new, invite"></li>
<li class="ion-ios7-people" data-pack="ios7" data-tags="stalker, person, users, head, human"></li>
<li class="ion-ios7-people-outline" data-pack="ios7" data-tags="stalker, person, users, head, human"></li>
<li class="ion-ios7-sunny" data-pack="ios7" data-tags="weather, whether, light, sky"></li>
<li class="ion-ios7-sunny-outline" data-pack="ios7" data-tags="weather, whether, light, sky"></li>
<li class="ion-ios7-partlysunny" data-pack="ios7" data-tags="light, weather, whether, cloudy"></li>
<li class="ion-ios7-partlysunny-outline" data-pack="ios7" data-tags="light, weather, whether, cloudy"></li>
<li class="ion-ios7-cloudy" data-pack="ios7" data-tags="weather, whether, overcast"></li>
<li class="ion-ios7-cloudy-outline" data-pack="ios7" data-tags="weather, whether, overcast"></li>
<li class="ion-ios7-rainy" data-pack="ios7" data-tags="whether, weather, water, cloud"></li>
<li class="ion-ios7-rainy-outline" data-pack="ios7" data-tags="whether, weather, water, cloud"></li>
<li class="ion-ios7-thunderstorm" data-pack="ios7" data-tags="whether, weather, sky, lightning, rain, cloudy, overcast, storm"></li>
<li class="ion-ios7-thunderstorm-outline" data-pack="ios7" data-tags="whether, weather, sky, lightning, rain, cloudy, overcast, storm"></li>
<li class="ion-ios7-snowy" data-pack="ios7" data-tags="cold, weather, whether, overcast"></li>
<li class="ion-ios7-moon" data-pack="ios7" data-tags="sky, night, dark"></li>
<li class="ion-ios7-moon-outline" data-pack="ios7" data-tags="sky, night, dark"></li>
<li class="ion-ios7-cloudy-night" data-pack="ios7" data-tags="weather, whether, overcast"></li>
<li class="ion-ios7-cloudy-night-outline" data-pack="ios7" data-tags="weather, whether, overcast"></li>
<li class="ion-ios7-musical-notes" data-pack="ios7" data-tags="sound, noise, listening, play"></li>
<li class="ion-ios7-musical-note" data-pack="ios7" data-tags="sound, noise, listening, play"></li>
<li class="ion-ios7-bell" data-pack="ios7" data-tags="right, noise, alarm, sound, music"></li>
<li class="ion-ios7-bell-outline" data-pack="ios7" data-tags="right, noise, alarm, sound, music"></li>
<li class="ion-ios7-mic" data-pack="ios7" data-tags="sound, noise, speaker, talk"></li>
<li class="ion-ios7-mic-outline" data-pack="ios7" data-tags="sound, noise, speaker, talk"></li>
<li class="ion-ios7-mic-off" data-pack="ios7" data-tags="sound, noise, speaker, talk"></li>
<li class="ion-ios7-volume-high" data-pack="ios7" data-tags="sound, noise, listen, music"></li>
<li class="ion-ios7-volume-low" data-pack="ios7" data-tags="sound, noise, listen, music"></li>
<li class="ion-ios7-play" data-pack="ios7" data-tags="music, watch, arrow, right"></li>
<li class="ion-ios7-play-outline" data-pack="ios7" data-tags="music, watch, arrow, right"></li>
<li class="ion-ios7-pause" data-pack="ios7" data-tags="music, break, hold, freeze"></li>
<li class="ion-ios7-pause-outline" data-pack="ios7" data-tags="music, break, hold, freeze"></li>
<li class="ion-ios7-recording" data-pack="ios7" data-tags="film, tape, voicemail"></li>
<li class="ion-ios7-recording-outline" data-pack="ios7" data-tags="film, tape, voicemail"></li>
<li class="ion-ios7-fastforward" data-pack="ios7" data-tags="next, skip, jump"></li>
<li class="ion-ios7-fastforward-outline" data-pack="ios7" data-tags="next, skip, jump"></li>
<li class="ion-ios7-rewind" data-pack="ios7" data-tags="music, previous, back"></li>
<li class="ion-ios7-rewind-outline" data-pack="ios7" data-tags="music, previous, back"></li>
<li class="ion-ios7-skipbackward" data-pack="ios7" data-tags="music, previous"></li>
<li class="ion-ios7-skipbackward-outline" data-pack="ios7" data-tags="music, previous"></li>
<li class="ion-ios7-skipforward" data-pack="ios7" data-tags="music, next"></li>
<li class="ion-ios7-skipforward-outline" data-pack="ios7" data-tags="music, next"></li>
<li class="ion-ios7-videocam" data-pack="ios7" data-tags="film, movie, camera"></li>
<li class="ion-ios7-videocam-outline" data-pack="ios7" data-tags="film, movie, camera"></li>
<li class="ion-ios7-lightbulb" data-pack="ios7" data-tags="idea, new, bright, aha!"></li>
<li class="ion-ios7-lightbulb-outline" data-pack="ios7" data-tags="idea, new, bright, aha!"></li>
<p><!-- end iOS 7-style icons pack --></p>
<li class="ion-android-system-back" data-pack="android" data-tags="arrows"></li>
<li class="ion-android-system-home" data-pack="android" data-tags=""></li>
<li class="ion-android-system-windows" data-pack="android" data-tags=""></li>
<li class="ion-android-wifi" data-pack="android" data-tags="internet,connection, bars"></li>
<li class="ion-android-battery" data-pack="android" data-tags=""></li>
<li class="ion-android-storage" data-pack="android" data-tags=""></li>
<li class="ion-android-keypad" data-pack="android" data-tags="type"></li>
<li class="ion-android-call" data-pack="android" data-tags="telephone"></li>
<li class="ion-android-arrow-back" data-pack="android" data-tags="chevron, navigation"></li>
<li class="ion-android-arrow-forward" data-pack="android" data-tags="chevron, navigation"></li>
<li class="ion-android-arrow-up-right" data-pack="android" data-tags=""></li>
<li class="ion-android-arrow-down-right" data-pack="android" data-tags=""></li>
<li class="ion-android-arrow-down-left" data-pack="android" data-tags=""></li>
<li class="ion-android-arrow-up-left" data-pack="android" data-tags=""></li>
<li class="ion-android-sort" data-pack="android" data-tags="reorder"></li>
<li class="ion-android-drawer" data-pack="android" data-tags=""></li>
<li class="ion-android-stair-drawer" data-pack="android" data-tags=""></li>
<li class="ion-android-more" data-pack="android" data-tags="options"></li>
<li class="ion-android-dropdown" data-pack="android" data-tags=""></li>
<li class="ion-android-settings" data-pack="android" data-tags="options"></li>
<li class="ion-android-mixer" data-pack="android" data-tags="settings, options"></li>
<li class="ion-android-display" data-pack="android" data-tags="settings"></li>
<li class="ion-android-star" data-pack="android" data-tags="favorite"></li>
<li class="ion-android-search" data-pack="android" data-tags="magnifying glass"></li>
<li class="ion-android-microphone" data-pack="android" data-tags="recorde, speak, noise, music, sound"></li>
<li class="ion-android-checkmark" data-pack="android" data-tags=""></li>
<li class="ion-android-information" data-pack="android" data-tags="knowledge, help"></li>
<li class="ion-android-add" data-pack="android" data-tags="plus, include, invite"></li>
<li class="ion-android-remove" data-pack="android" data-tags="minus, subtract"></li>
<li class="ion-android-close" data-pack="android" data-tags="delete, remove"></li>
<li class="ion-android-trash" data-pack="android" data-tags="delete, close, remove"></li>
<li class="ion-android-volume" data-pack="android" data-tags="music, sound, noise"></li>
<li class="ion-android-printer" data-pack="android" data-tags=""></li>
<li class="ion-android-download" data-pack="android" data-tags="export"></li>
<li class="ion-android-hand" data-pack="android" data-tags="stop"></li>
<li class="ion-android-developer" data-pack="android" data-tags="code, hacker"></li>
<li class="ion-android-calendar" data-pack="android" data-tags="date, month, week"></li>
<li class="ion-android-clock" data-pack="android" data-tags="time"></li>
<li class="ion-android-alarm" data-pack="android" data-tags=""></li>
<li class="ion-android-stopwatch" data-pack="android" data-tags=""></li>
<li class="ion-android-data" data-pack="android" data-tags="usage"></li>
<li class="ion-android-timer" data-pack="android" data-tags="clock"></li>
<li class="ion-android-camera" data-pack="android" data-tags="image, photo"></li>
<li class="ion-android-image" data-pack="android" data-tags="camera, photo"></li>
<li class="ion-android-location" data-pack="android" data-tags="gps, navigate, maps"></li>
<li class="ion-android-locate" data-pack="android" data-tags="gps, navigate, maps"></li>
<li class="ion-android-earth" data-pack="android" data-tags="globe"></li>
<li class="ion-android-book" data-pack="android" data-tags="read"></li>
<li class="ion-android-note" data-pack="android" data-tags="letter, paper"></li>
<li class="ion-android-promotion" data-pack="android" data-tags="shopping, price, money"></li>
<li class="ion-android-playstore" data-pack="android" data-tags=""></li>
<li class="ion-android-share" data-pack="android" data-tags=""></li>
<li class="ion-android-send" data-pack="android" data-tags="email, paper"></li>
<li class="ion-android-mail" data-pack="android" data-tags="email"></li>
<li class="ion-android-inbox" data-pack="android" data-tags="email"></li>
<li class="ion-android-archive" data-pack="android" data-tags="email"></li>
<li class="ion-android-folder" data-pack="android" data-tags="file"></li>
<li class="ion-android-forums" data-pack="android" data-tags="talk, text, chat"></li>
<li class="ion-android-chat" data-pack="android" data-tags="talk, text"></li>
<li class="ion-android-user-menu" data-pack="android" data-tags="people, social, users"></li>
<li class="ion-android-contact" data-pack="android" data-tags="people, social, users"></li>
<li class="ion-android-contacts" data-pack="android" data-tags="people, social, users"></li>
<li class="ion-android-friends" data-pack="android" data-tags="people, social, users"></li>
<li class="ion-android-add-contact" data-pack="android" data-tags="include, invite, person, friend, contact, user"></li>
<li class="ion-android-social-user" data-pack="android" data-tags="person, people, contact, friend"></li>
<li class="ion-android-social" data-pack="android" data-tags="user, person, people, contact, friend"></li>
<li class="ion-android-reminder" data-pack="android" data-tags="bell, alarm, noise, sound"></li>
<li class="ion-android-lightbulb" data-pack="android" data-tags="new, idea"></li>
<p><!-- end Android-style icons pack --></p>
<li class="ion-social-twitter" data-pack="social" data-tags="follow, post, share"></li>
<li class="ion-social-twitter-outline" data-pack="social" data-tags="follow, post, share"></li>
<li class="ion-social-facebook" data-pack="social" data-tags="like, post, share"></li>
<li class="ion-social-facebook-outline" data-pack="social" data-tags="like, post, share"></li>
<li class="ion-social-googleplus" data-pack="social" data-tags="follow, post, share"></li>
<li class="ion-social-googleplus-outline" data-pack="social" data-tags="follow, post, share"></li>
<li class="ion-social-google" data-pack="social" data-tags="follow, post, share"></li>
<li class="ion-social-google-outline" data-pack="social" data-tags="follow, post, share"></li>
<li class="ion-social-dribbble" data-pack="social" data-tags="design"></li>
<li class="ion-social-dribbble-outline" data-pack="social" data-tags="design"></li>
<li class="ion-social-github" data-pack="social" data-tags="code"></li>
<li class="ion-social-github-outline" data-pack="social" data-tags="code"></li>
<li class="ion-social-instagram" data-pack="social" data-tags="photo, camera"></li>
<li class="ion-social-instagram-outline" data-pack="social" data-tags="photo, camera"></li>
<li class="ion-social-foursquare" data-pack="social" data-tags="checkin"></li>
<li class="ion-social-foursquare-outline" data-pack="social" data-tags="checkin"></li>
<li class="ion-social-pinterest" data-pack="social" data-tags="social"></li>
<li class="ion-social-pinterest-outline" data-pack="social" data-tags="social"></li>
<li class="ion-social-rss" data-pack="social" data-tags="blogging"></li>
<li class="ion-social-rss-outline" data-pack="social" data-tags="blogging"></li>
<li class="ion-social-tumblr" data-pack="social" data-tags="blogging"></li>
<li class="ion-social-tumblr-outline" data-pack="social" data-tags="blogging"></li>
<li class="ion-social-wordpress" data-pack="social" data-tags="blogging"></li>
<li class="ion-social-wordpress-outline" data-pack="social" data-tags="blogging"></li>
<li class="ion-social-reddit" data-pack="social" data-tags="news, upvotes, karma"></li>
<li class="ion-social-reddit-outline" data-pack="social" data-tags="news, upvotes, karma"></li>
<li class="ion-social-hackernews" data-pack="social" data-tags="discuss, upvotes, karma"></li>
<li class="ion-social-hackernews-outline" data-pack="social" data-tags="discuss, upvotes, karma"></li>
<li class="ion-social-designernews" data-pack="social" data-tags="design, post"></li>
<li class="ion-social-designernews-outline" data-pack="social" data-tags="design, post"></li>
<li class="ion-social-yahoo" data-pack="social" data-tags=""></li>
<li class="ion-social-yahoo-outline" data-pack="social" data-tags=""></li>
<li class="ion-social-buffer" data-pack="social" data-tags="share"></li>
<li class="ion-social-buffer-outline" data-pack="social" data-tags="share"></li>
<li class="ion-social-skype" data-pack="social" data-tags="call"></li>
<li class="ion-social-skype-outline" data-pack="social" data-tags="call"></li>
<li class="ion-social-linkedin" data-pack="social" data-tags="connect"></li>
<li class="ion-social-linkedin-outline" data-pack="social" data-tags="connect"></li>
<li class="ion-social-usd" data-pack="social" data-tags="currency, trade, money, cash"></li>
<li class="ion-social-usd-outline" data-pack="social" data-tags="currency, trade, money, cash"></li>
<li class="ion-social-bitcoin" data-pack="social" data-tags="currency, trade, money"></li>
<li class="ion-social-bitcoin-outline" data-pack="social" data-tags="currency, trade, money"></li>
<li class="ion-social-vimeo" data-pack="social" data-tags="video, watch, share, view"></li>
<li class="ion-social-vimeo-outline" data-pack="social" data-tags="video, watch, share, view"></li>
<li class="ion-social-youtube" data-pack="social" data-tags="video, watch, share, view"></li>
<li class="ion-social-youtube-outline" data-pack="social" data-tags="video, watch, share, view"></li>
<li class="ion-social-dropbox" data-pack="social" data-tags="upload"></li>
<li class="ion-social-dropbox-outline" data-pack="social" data-tags="upload"></li>
<li class="ion-social-apple" data-pack="social" data-tags="mac, mobile"></li>
<li class="ion-social-apple-outline" data-pack="social" data-tags="mac, mobile"></li>
<li class="ion-social-android" data-pack="social" data-tags="mobile"></li>
<li class="ion-social-android-outline" data-pack="social" data-tags="mobile"></li>
<li class="ion-social-windows" data-pack="social" data-tags="pc"></li>
<li class="ion-social-windows-outline" data-pack="social" data-tags="pc"></li>
<li class="ion-social-tux" data-pack="social" data-tags="linux, opensource"></li>
<li class="ion-social-freebsd-devil" data-pack="social" data-tags="unix"></li>
</ul>
<div id="cdn" class="footer cdn">
<h2>
CDN, sponsored by <a href="http://www.maxcdn.com/">MaxCDN</a>
</h2>
<p>
<input type="text" value="http://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css" onClick="this.select();" readonly>
</p>
</div>
<div class="footer">
<p>
Designed by <a href="https://twitter.com/benjsperry">@benjsperry</a>.
Licensed under <a href="http://opensource.org/licenses/MIT">MIT</a>.
</p>
<p>
(Yes it's free and <a href="https://github.com/driftyco/ionicons">open-sourced</a>)
</p>
<p class="links">
<a href="animation.html">Animated Icons</a> &#183;
<a href="cheatsheet.html">Cheatsheet</a> &#183;
<a href="https://github.com/driftyco/ionicons">GitHub</a> &#183;
<a href="https://github.com/driftyco/ionicons/issues">Feedback</a> &#183;
<a href="http://ionicframework.com/">Ionic Framework</a> &#183;
<a href="http://ionicframework.com/subscribe/">Ionic Newsletter</a>
</p>
</div>
<div id="icon-panel">
<input type="text" id="icon-name" onclick="this.select();" readonly>
<div id="icon-code"></div>
<div id="animate-link"><a href="animation.html">See all animated icons</a></div>
</div>
<script src="/v1/app.js"></script>
</body>
</html>
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More