feat(ionicons): use the ionicons collection from npm

This commit is contained in:
Adam Bradley
2017-09-20 09:55:31 -05:00
parent 62f5bd0d30
commit e3efcfcb4c
13 changed files with 162 additions and 374 deletions

View File

@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@stencil/core": {
"version": "0.0.5-23",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-0.0.5-23.tgz",
"integrity": "sha512-i3YX9GAremA09J8OrjzGGBm+UtvwUFjffr6ZNi6mn3f91GP64xFphci4SuSc+SNos720pdQk/7vjIVdAUb1c7A==",
"version": "0.0.5-25",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-0.0.5-25.tgz",
"integrity": "sha512-sP98R4wfa/H0gGJPySLxZ7pCpD4dlqCObpNRqyi5kkkpigVYczNsozzWFlQhls1aZcIjvrbwjnT5c5uaRcsT6A==",
"dev": true,
"requires": {
"chokidar": "1.7.0",
@ -17,7 +17,7 @@
"rollup-plugin-commonjs": "8.2.1",
"rollup-plugin-node-resolve": "3.0.0",
"typescript": "2.5.2",
"uglify-es": "3.1.0",
"uglify-es": "3.1.1",
"workbox-build": "2.0.1"
}
},
@ -73,12 +73,14 @@
}
},
"ajv": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.2.tgz",
"integrity": "sha1-R8aNaehvXZUxA7AHSpQw3GPaXjk=",
"dev": true,
"requires": {
"co": "4.6.0",
"fast-deep-equal": "1.0.0",
"json-schema-traverse": "0.3.1",
"json-stable-stringify": "1.0.1"
}
},
@ -111,9 +113,9 @@
}
},
"aproba": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz",
"integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
"dev": true
},
"are-we-there-yet": {
@ -166,9 +168,9 @@
"dev": true
},
"assert-plus": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
"integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
},
"async-each": {
@ -190,9 +192,9 @@
"dev": true
},
"aws-sign2": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
"integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
"dev": true
},
"aws4": {
@ -245,12 +247,12 @@
}
},
"boom": {
"version": "2.10.1",
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
"integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
"dev": true,
"requires": {
"hoek": "2.16.3"
"hoek": "4.2.0"
}
},
"brace-expansion": {
@ -434,12 +436,23 @@
}
},
"cryptiles": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
"integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz",
"integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=",
"dev": true,
"requires": {
"boom": "2.10.1"
"boom": "5.2.0"
},
"dependencies": {
"boom": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz",
"integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
"dev": true,
"requires": {
"hoek": "4.2.0"
}
}
}
},
"cssom": {
@ -473,14 +486,6 @@
"dev": true,
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
}
}
},
"debug": {
@ -663,6 +668,12 @@
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"dev": true
},
"fast-deep-equal": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
"integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=",
"dev": true
},
"fast-levenshtein": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
@ -675,7 +686,7 @@
"integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=",
"dev": true,
"requires": {
"websocket-driver": "0.6.5"
"websocket-driver": "0.7.0"
}
},
"filename-regex": {
@ -729,9 +740,9 @@
"dev": true
},
"form-data": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
"integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz",
"integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=",
"dev": true,
"requires": {
"asynckit": "0.4.0",
@ -1525,6 +1536,14 @@
}
}
},
"string_decoder": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"string-width": {
"version": "1.0.2",
"bundled": true,
@ -1535,14 +1554,6 @@
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"stringstream": {
"version": "0.0.5",
"bundled": true,
@ -1673,7 +1684,7 @@
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
"dev": true,
"requires": {
"aproba": "1.1.2",
"aproba": "1.2.0",
"console-control-strings": "1.1.0",
"has-unicode": "2.0.1",
"object-assign": "4.1.1",
@ -1711,14 +1722,6 @@
"dev": true,
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
}
}
},
"glob": {
@ -1772,19 +1775,19 @@
"dev": true
},
"har-schema": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
"integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
"dev": true
},
"har-validator": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
"integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
"dev": true,
"requires": {
"ajv": "4.11.8",
"har-schema": "1.0.5"
"ajv": "5.2.2",
"har-schema": "2.0.0"
}
},
"has-ansi": {
@ -1803,15 +1806,15 @@
"dev": true
},
"hawk": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
"integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz",
"integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
"dev": true,
"requires": {
"boom": "2.10.1",
"cryptiles": "2.0.5",
"hoek": "2.16.3",
"sntp": "1.0.9"
"boom": "4.3.1",
"cryptiles": "3.1.2",
"hoek": "4.2.0",
"sntp": "2.0.2"
}
},
"he": {
@ -1821,9 +1824,9 @@
"dev": true
},
"hoek": {
"version": "2.16.3",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
"integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz",
"integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==",
"dev": true
},
"hosted-git-info": {
@ -1841,13 +1844,19 @@
"whatwg-encoding": "1.0.1"
}
},
"http-parser-js": {
"version": "0.4.6",
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.6.tgz",
"integrity": "sha1-GVJz9YcExFLWcQdr4gEyndNB3FU=",
"dev": true
},
"http-signature": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
"integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"dev": true,
"requires": {
"assert-plus": "0.2.0",
"assert-plus": "1.0.0",
"jsprim": "1.4.1",
"sshpk": "1.13.1"
}
@ -1895,6 +1904,12 @@
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
"dev": true
},
"ionicons": {
"version": "4.0.0-6",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-4.0.0-6.tgz",
"integrity": "sha512-GHJNBjHOrASVjJ6ajdt9TDqv5ZAD6GDCLNYWdC9uG35TiQ79ggfr7RbcVb/DrGk9mLXHbpVCaBaGAVJnnLNY3Q==",
"dev": true
},
"is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
@ -2082,7 +2097,7 @@
"nwmatcher": "1.4.1",
"parse5": "3.0.2",
"pn": "1.0.0",
"request": "2.81.0",
"request": "2.82.0",
"request-promise-native": "1.0.4",
"sax": "1.2.4",
"symbol-tree": "3.2.2",
@ -2099,6 +2114,12 @@
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
"dev": true
},
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
"dev": true
},
"json-stable-stringify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
@ -2139,14 +2160,6 @@
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
}
}
},
"kind-of": {
@ -2322,7 +2335,7 @@
"normalize-path": "2.1.1",
"object.omit": "2.0.1",
"parse-glob": "3.0.4",
"regex-cache": "0.4.3"
"regex-cache": "0.4.4"
}
},
"mime": {
@ -2404,7 +2417,7 @@
"nopt": "3.0.6",
"npmlog": "4.1.2",
"osenv": "0.1.4",
"request": "2.81.0",
"request": "2.82.0",
"rimraf": "2.6.2",
"semver": "5.3.0",
"tar": "2.2.1",
@ -2440,7 +2453,7 @@
"nan": "2.7.0",
"node-gyp": "3.6.2",
"npmlog": "4.1.2",
"request": "2.81.0",
"request": "2.82.0",
"sass-graph": "2.2.4",
"stdout-stream": "1.4.0"
}
@ -2647,9 +2660,9 @@
}
},
"performance-now": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz",
"integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true
},
"pify": {
@ -2833,13 +2846,12 @@
}
},
"regex-cache": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz",
"integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=",
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
"integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
"dev": true,
"requires": {
"is-equal-shallow": "0.1.3",
"is-primitive": "2.0.0"
"is-equal-shallow": "0.1.3"
}
},
"remove-trailing-separator": {
@ -2870,33 +2882,41 @@
}
},
"request": {
"version": "2.81.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
"integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
"version": "2.82.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.82.0.tgz",
"integrity": "sha512-/QWqfmyTfQ4OYs6EhB1h2wQsX9ZxbuNePCvCm0Mdz/mxw73mjdg0D4QdIl0TQBFs35CZmMXLjk0iCGK395CUDg==",
"dev": true,
"requires": {
"aws-sign2": "0.6.0",
"aws-sign2": "0.7.0",
"aws4": "1.6.0",
"caseless": "0.12.0",
"combined-stream": "1.0.5",
"extend": "3.0.1",
"forever-agent": "0.6.1",
"form-data": "2.1.4",
"har-validator": "4.2.1",
"hawk": "3.1.3",
"http-signature": "1.1.1",
"form-data": "2.3.1",
"har-validator": "5.0.3",
"hawk": "6.0.2",
"http-signature": "1.2.0",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
"json-stringify-safe": "5.0.1",
"mime-types": "2.1.17",
"oauth-sign": "0.8.2",
"performance-now": "0.2.0",
"qs": "6.4.0",
"performance-now": "2.1.0",
"qs": "6.5.1",
"safe-buffer": "5.1.1",
"stringstream": "0.0.5",
"tough-cookie": "2.3.2",
"tunnel-agent": "0.6.0",
"uuid": "3.1.0"
},
"dependencies": {
"qs": {
"version": "6.5.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==",
"dev": true
}
}
},
"request-promise-core": {
@ -3082,12 +3102,12 @@
"dev": true
},
"sntp": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
"integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-2.0.2.tgz",
"integrity": "sha1-UGQRDwr4X3z9t9a2ekACjOUrSys=",
"dev": true,
"requires": {
"hoek": "2.16.3"
"hoek": "4.2.0"
}
},
"source-map": {
@ -3131,14 +3151,6 @@
"getpass": "0.1.7",
"jsbn": "0.1.1",
"tweetnacl": "0.14.5"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
}
}
},
"stdout-stream": {
@ -3156,6 +3168,15 @@
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
"dev": true
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-template": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz",
@ -3173,15 +3194,6 @@
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
},
"stringstream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
@ -3348,9 +3360,9 @@
"dev": true
},
"uglify-es": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.1.0.tgz",
"integrity": "sha512-368gRJ/ww3e9c8eJLAFM6sco4ndsg7d2MskNusejep0kvd7VCqNj/q/zrDG/1KwS+EWfTxJKTj7UyLN+zz+gyg==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.1.1.tgz",
"integrity": "sha512-oESWzXRJ5cHfxZnj1wS4WAy1Tcn4RbMhSX6lhMpzkHN+6SrO6Wmlg9dK4M+K/MXHIwndOD7wme7fEGuFcEf4BQ==",
"dev": true,
"requires": {
"commander": "2.11.0",
@ -3400,14 +3412,6 @@
"assert-plus": "1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "1.3.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
}
}
},
"vlq": {
@ -3423,18 +3427,19 @@
"dev": true
},
"websocket-driver": {
"version": "0.6.5",
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz",
"integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=",
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",
"integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=",
"dev": true,
"requires": {
"websocket-extensions": "0.1.1"
"http-parser-js": "0.4.6",
"websocket-extensions": "0.1.2"
}
},
"websocket-extensions": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz",
"integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=",
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.2.tgz",
"integrity": "sha1-Dhh4HeYpoYMIzhSBZQ9n/6JpOl0=",
"dev": true
},
"whatwg-encoding": {

View File

@ -10,9 +10,10 @@
"dist/"
],
"devDependencies": {
"@stencil/core": "0.0.5-23",
"@stencil/core": "0.0.5-25",
"@stencil/dev-server": "latest",
"@stencil/utils": "latest",
"ionicons": "^4.0.0-6",
"tslint-ionic-rules": "0.0.11"
},
"scripts": {

View File

@ -1,4 +1,5 @@
@import "../../themes/ionic.globals";
@import "../icon/icon";
// Button Icons

View File

@ -1,5 +1,7 @@
@import "../../themes/ionic.globals.ios";
@import "./button";
@import "../icon/icon.ios";
// iOS Button
// --------------------------------------------------

View File

@ -1,5 +1,7 @@
@import "../../themes/ionic.globals.md";
@import "./button";
@import "../icon/icon.md";
// Material Design Button
// --------------------------------------------------

View File

@ -1,5 +1,7 @@
@import "../../themes/ionic.globals.wp";
@import "./button";
@import "../icon/icon.wp";
// Windows Button
// --------------------------------------------------

View File

@ -1,5 +1,4 @@
@import "../../themes/ionic.globals.ios";
@import "./icon";
// iOS Icon
// --------------------------------------------------

View File

@ -1,5 +1,4 @@
@import "../../themes/ionic.globals.md";
@import "./icon";
// Material Design Icon
// --------------------------------------------------

View File

@ -1,5 +1,3 @@
@import "../../themes/ionic.globals";
// Icon
// --------------------------------------------------
@ -9,11 +7,6 @@ ion-icon {
display: inline-block;
font-size: 1.2em;
svg {
width: 1em;
height: 1em;
}
}
ion-icon[small] {

View File

@ -1,217 +0,0 @@
import { Component, Prop, State } from '@stencil/core';
@Component({
tag: 'ion-icon',
styleUrls: {
ios: 'icon.ios.scss',
md: 'icon.md.scss',
wp: 'icon.wp.scss'
},
host: {
theme: 'icon'
},
assetsDir: 'svj'
})
export class Icon {
mode: string;
/**
* @input {string} Specifies the label to use for accessibility. Defaults to the icon name.
*/
@Prop() ariaLabel: string = '';
/**
* @input {string} Specifies which icon to use. The appropriate icon will be used based on the mode.
* For more information, see [Ionicons](/docs/ionicons/).
*/
@Prop() name: string = '';
/**
* @input {string} Specifies which icon to use on `ios` mode.
*/
@Prop() ios: string = '';
/**
* @input {string} Specifies which icon to use on `md` mode.
*/
@Prop() md: string = '';
@Prop({ context: 'isServer'}) private isServer: boolean;
@State() private svgContent: string = null;
private get iconName() {
// if no name was passed set iconName to null
if (!this.name) {
return null;
}
let iconName = this.name.toLowerCase();
// default to "md" if somehow the mode wasn't set
const mode = this.mode || 'md';
if (!(/^md-|^ios-|^logo-/.test(iconName))) {
// this does not have one of the defaults
// so lets auto add in the mode prefix for them
iconName = mode + '-' + iconName;
} else if (this.ios && mode === 'ios') {
// if an icon was passed in using the ios or md attributes
// set the iconName to whatever was passed in
// when we're also on that mode
// basically, use the ios attribute when you're on ios
iconName = this.ios;
} else if (this.md && mode === 'md') {
// use the md attribute when you're in md mode
// and the md attribute has been set
iconName = this.md;
}
// only allow alpha characters and dash
const invalidChars = iconName.replace(/[a-z]|-/g, '');
if (invalidChars !== '') {
console.error(`invalid characters in ion-icon name: ${invalidChars}`);
return null;
}
return iconName;
}
hostData() {
const attrs: {[attrName: string]: string} = {
'role': 'img'
};
if (this.ariaLabel) {
// user provided label
attrs['aria-label'] = this.ariaLabel;
} 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(/\-/g, ' ');
}
}
return {
attrs
};
}
render() {
if (this.isServer) {
return <div class='icon-inner'>{/* ssr */}</div>;
}
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, 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>;
}
}
function loadSvgContent(iconName: 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}svj/${iconName}.svj`;
// 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];
}
};

View File

@ -1,5 +1,4 @@
@import "../../themes/ionic.globals.wp";
@import "./icon";
// Windows Icon
// --------------------------------------------------

View File

@ -36,6 +36,9 @@ exports.config = {
{ components: ['ion-nav', 'ion-nav-controller', 'stencil-ion-nav-delegate','page-one', 'page-two', 'page-three'] },
{ components: ['ion-toast', 'ion-toast-controller'] },
],
collections: [
'ionicons'
],
preamble: '(C) Ionic http://ionicframework.com - MIT License',
global: 'src/global/ionic-global.ts'
};

View File

@ -28,7 +28,6 @@
"src/**/*.tsx"
],
"exclude": [
"node_modules",
"src/animations"
"node_modules"
]
}