Workaround github pages routes h and our history router

This commit is contained in:
Kevin Ports
2018-05-10 14:50:27 -05:00
parent 35140e77df
commit 9a52be8470
51 changed files with 22331 additions and 20 deletions
+2 -2
View File
@@ -83,7 +83,7 @@
// let's do this!
x.src = resourcesUrl + appCore;
x.setAttribute('type', 'module');
x.setAttribute('crossorigin', 'use-credentials');
x.setAttribute('crossorigin', true);
}
x.setAttribute('data-resources-url', resourcesUrl);
x.setAttribute('data-namespace', fsNamespace);
@@ -120,4 +120,4 @@ function doesNotSupportsDynamicImports(dynamicImportTest) {
init(win, doc, namespace, fsNamespace, resourcesUrl, appCore, appCoreSsr, appCorePolyfilled, hydratedCssClass, components);
})(window, document, "DocsSite","docssite",0,"docssite.core.js","es5-build-disabled.js","hydrated",[["footer-bar","footer-bar",1],["header-bar","header-bar",1,[["el",7],["isMobileMenuShown",5],["isSearchVisible",1,0,"is-search-visible",3],["isSticky",5],["query",1,0,1,2],["version",1,0,1,2]],0,[["window:scroll","handleScroll",0,1],["window:resize","handleResize",0,1]]],["icon-list","icon-list",1,[["data",1,0,1,1],["el",7],["isHeaderSearchVisible",5],["query",1,0,1,2],["selectedIcon",5],["selectedIconType",5]],0,[["body:keyup","escListener"],["body:click","handleBodyClicked"],["clearToast","handleClearToast"],["window:scroll","handleScroll",0,1]]],["icon-search","icon-search",1,[["autofocus",1,0,1,2],["query",1,0,1,2],["showClearCtrl",5],["size",1,0,1,2]],0,[["keyup","searchListener"]]],["ionicons-site","header-bar",1,[["data",5],["isHeaderSearchVisible",5],["query",5]],0,[["window:scroll","handleScroll",0,1],["hasSearched","searchHandler"],["toggleHeaderSearch","toggleHandler"]]],["landing-page","icon-list",1,[["data",1,0,1,1],["el",7],["query",1,0,1,2]]],["notfound-page","notfound-page",1],["stencil-route","header-bar",0,[["activeInGroup",5],["activeRouter",3,0,0,0,"activeRouter"],["component",1,0,1,2],["componentProps",1],["el",7],["exact",1,0,1,3],["group",1,0,1,2],["groupIndex",1,0,"group-index",4],["isServer",3,0,0,0,"isServer"],["location",3,0,0,0,"location"],["match",5],["queue",3,0,0,0,"queue"],["routeRender",1],["scrollTopOffset",1,0,"scroll-top-offset",4],["url",1,0,1,2]]],["stencil-route-link","stencil-route-link",0,[["activeClass",1,0,"active-class",2],["activeRouter",3,0,0,0,"activeRouter"],["anchorClass",1,0,"anchor-class",2],["anchorRole",1,0,"anchor-role",2],["anchorTabIndex",1,0,"anchor-tab-index",2],["anchorTitle",1,0,"anchor-title",2],["custom",1,0,1,2],["exact",1,0,1,3],["match",5],["strict",1,0,1,3],["url",1,0,1,2],["urlMatch",1,0,"url-match",2]]],["stencil-router","header-bar",0,[["activeRouter",3,0,0,0,"activeRouter"],["historyType",1,0,"history-type",2],["match",5],["root",1,0,1,2],["titleSuffix",1,0,"title-suffix",2]]],["toast-bar","icon-list",1,[["el",7],["hadIconOnce",5],["selectedIcon",1],["selectedIconType",1,0,"selected-icon-type",2],["showCopiedConfirm",5],["touchEndY",5],["touchStartY",5]]],["usage-page","usage-page",1,[["data",1,0,1,1],["exampleIcon",5],["exampleType",5],["match",1],["queue",3,0,0,0,"queue"]]]],HTMLElement.prototype);
})(window, document, "DocsSite","docssite",0,"docssite.core.js","docssite.core.pf.js","hydrated",[["footer-bar","footer-bar",1],["header-bar","header-bar",1,[["el",7],["isMobileMenuShown",5],["isSearchVisible",1,0,"is-search-visible",3],["isSticky",5],["query",1,0,1,2],["version",1,0,1,2]],0,[["window:scroll","handleScroll",0,1],["window:resize","handleResize",0,1]]],["icon-list","icon-list",1,[["data",1,0,1,1],["el",7],["isHeaderSearchVisible",5],["query",1,0,1,2],["selectedIcon",5],["selectedIconType",5]],0,[["body:keyup","escListener"],["body:click","handleBodyClicked"],["clearToast","handleClearToast"],["window:scroll","handleScroll",0,1]]],["icon-search","icon-search",1,[["autofocus",1,0,1,2],["query",1,0,1,2],["showClearCtrl",5],["size",1,0,1,2]],0,[["keyup","searchListener"]]],["ionicons-site","header-bar",1,[["data",5],["isHeaderSearchVisible",5],["query",5]],0,[["window:scroll","handleScroll",0,1],["hasSearched","searchHandler"],["toggleHeaderSearch","toggleHandler"]]],["landing-page","icon-list",1,[["data",1,0,1,1],["el",7],["query",1,0,1,2]]],["notfound-page","notfound-page",1],["stencil-route","header-bar",0,[["activeInGroup",5],["activeRouter",3,0,0,0,"activeRouter"],["component",1,0,1,2],["componentProps",1],["el",7],["exact",1,0,1,3],["group",1,0,1,2],["groupIndex",1,0,"group-index",4],["isServer",3,0,0,0,"isServer"],["location",3,0,0,0,"location"],["match",5],["queue",3,0,0,0,"queue"],["routeRender",1],["scrollTopOffset",1,0,"scroll-top-offset",4],["url",1,0,1,2]]],["stencil-route-link","stencil-route-link",0,[["activeClass",1,0,"active-class",2],["activeRouter",3,0,0,0,"activeRouter"],["anchorClass",1,0,"anchor-class",2],["anchorRole",1,0,"anchor-role",2],["anchorTabIndex",1,0,"anchor-tab-index",2],["anchorTitle",1,0,"anchor-title",2],["custom",1,0,1,2],["exact",1,0,1,3],["match",5],["strict",1,0,1,3],["url",1,0,1,2],["urlMatch",1,0,"url-match",2]]],["stencil-router","header-bar",0,[["activeRouter",3,0,0,0,"activeRouter"],["historyType",1,0,"history-type",2],["match",5],["root",1,0,1,2],["titleSuffix",1,0,"title-suffix",2]]],["toast-bar","icon-list",1,[["el",7],["hadIconOnce",5],["selectedIcon",1],["selectedIconType",1,0,"selected-icon-type",2],["showCopiedConfirm",5],["touchEndY",5],["touchStartY",5]]],["usage-page","usage-page",1,[["data",1,0,1,1],["exampleIcon",5],["exampleType",5],["match",1],["queue",3,0,0,0,"queue"]]]],HTMLElement.prototype);
+2
View File
@@ -0,0 +1,2 @@
/*! Built with http://stenciljs.com */
DocsSite.loadBundle("5szlxwny",["exports","./chunk-4440b782.js"],function(t,e){var i=window.DocsSite.h,r=function(){function t(){this.unsubscribe=function(){},this.activeClass="link-active",this.exact=!1,this.strict=!0,this.custom="a",this.match=null}return t.prototype.computeMatch=function(t){return t||(t=this.activeRouter.get("location").pathname),e.matchPath(t,{path:this.urlMatch||this.url,exact:this.exact,strict:this.strict})},t.prototype.componentWillLoad=function(){var t=this;this.unsubscribe=this.activeRouter.subscribe({isMatch:this.computeMatch.bind(this),listener:function(e){t.match=e}}),this.match=this.computeMatch()},t.prototype.componentDidUnload=function(){this.unsubscribe()},t.prototype.handleClick=function(t){if(t.preventDefault(),this.activeRouter)return this.activeRouter.get("history").push(this.getUrl(this.url));console.warn('<stencil-route-link> wasn\'t passed an instance of the router as the "router" prop!')},t.prototype.getUrl=function(t){var e=this.activeRouter.get("root")||"/";return"/"==t.charAt(0)&&"/"==e.charAt(e.length-1)?e.slice(0,e.length-1)+t:e+t},t.prototype.render=function(){var t,e={class:(t={},t[this.activeClass]=null!==this.match,t),onClick:this.handleClick.bind(this)};return this.anchorClass&&(e.class[this.anchorClass]=!0),"a"===this.custom&&(e=Object.assign({},e,{href:this.url,title:this.anchorTitle,role:this.anchorRole,tabindex:this.anchorTabIndex})),i(this.custom,Object.assign({},e),i("slot",null))},Object.defineProperty(t,"is",{get:function(){return"stencil-route-link"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{activeClass:{type:String,attr:"active-class"},activeRouter:{context:"activeRouter"},anchorClass:{type:String,attr:"anchor-class"},anchorRole:{type:String,attr:"anchor-role"},anchorTabIndex:{type:String,attr:"anchor-tab-index"},anchorTitle:{type:String,attr:"anchor-title"},custom:{type:String,attr:"custom"},exact:{type:Boolean,attr:"exact"},match:{state:!0},strict:{type:Boolean,attr:"strict"},url:{type:String,attr:"url"},urlMatch:{type:String,attr:"url-match"}}},enumerable:!0,configurable:!0}),t}();t.StencilRouteLink=r,Object.defineProperty(t,"__esModule",{value:!0})});
+2
View File
@@ -0,0 +1,2 @@
/*! Built with http://stenciljs.com */
const{h:t}=window.DocsSite;import{a as e}from"./chunk-f6f1d593.js";class s{constructor(){this.unsubscribe=(()=>{}),this.activeClass="link-active",this.exact=!1,this.strict=!0,this.custom="a",this.match=null}computeMatch(t){return t||(t=this.activeRouter.get("location").pathname),e(t,{path:this.urlMatch||this.url,exact:this.exact,strict:this.strict})}componentWillLoad(){this.unsubscribe=this.activeRouter.subscribe({isMatch:this.computeMatch.bind(this),listener:t=>{this.match=t}}),this.match=this.computeMatch()}componentDidUnload(){this.unsubscribe()}handleClick(t){if(t.preventDefault(),this.activeRouter)return this.activeRouter.get("history").push(this.getUrl(this.url));console.warn('<stencil-route-link> wasn\'t passed an instance of the router as the "router" prop!')}getUrl(t){const e=this.activeRouter.get("root")||"/";return"/"==t.charAt(0)&&"/"==e.charAt(e.length-1)?e.slice(0,e.length-1)+t:e+t}render(){let e={class:{[this.activeClass]:null!==this.match},onClick:this.handleClick.bind(this)};return this.anchorClass&&(e.class[this.anchorClass]=!0),"a"===this.custom&&(e=Object.assign({},e,{href:this.url,title:this.anchorTitle,role:this.anchorRole,tabindex:this.anchorTabIndex})),t(this.custom,Object.assign({},e),t("slot",null))}static get is(){return"stencil-route-link"}static get properties(){return{activeClass:{type:String,attr:"active-class"},activeRouter:{context:"activeRouter"},anchorClass:{type:String,attr:"anchor-class"},anchorRole:{type:String,attr:"anchor-role"},anchorTabIndex:{type:String,attr:"anchor-tab-index"},anchorTitle:{type:String,attr:"anchor-title"},custom:{type:String,attr:"custom"},exact:{type:Boolean,attr:"exact"},match:{state:!0},strict:{type:Boolean,attr:"strict"},url:{type:String,attr:"url"},urlMatch:{type:String,attr:"url-match"}}}}export{s as StencilRouteLink};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+265
View File
@@ -0,0 +1,265 @@
/*! Built with http://stenciljs.com */
DocsSite.loadBundle('chunk-4440b782.js', ['exports'], function (exports) {
var h = window.DocsSite.h;
/**
* TS adaption of https://github.com/pillarjs/path-to-regexp/blob/master/index.js
*/
/**
* Default configs.
*/
var DEFAULT_DELIMITER = '/';
var DEFAULT_DELIMITERS = './';
/**
* The main path matching regexp utility.
*/
var PATH_REGEXP = new RegExp([
// Match escaped characters that would otherwise appear in future matches.
// This allows the user to escape special characters that won't transform.
'(\\\\.)',
// Match Express-style parameters and un-named parameters with a prefix
// and optional suffixes. Matches appear as:
//
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?"]
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined]
'(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?'
].join('|'), 'g');
/**
* Parse a string for the raw tokens.
*/
function parse(str, options) {
var tokens = [];
var key = 0;
var index = 0;
var path = '';
var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER;
var delimiters = (options && options.delimiters) || DEFAULT_DELIMITERS;
var pathEscaped = false;
var res;
while ((res = PATH_REGEXP.exec(str)) !== null) {
var m = res[0];
var escaped = res[1];
var offset = res.index;
path += str.slice(index, offset);
index = offset + m.length;
// Ignore already escaped sequences.
if (escaped) {
path += escaped[1];
pathEscaped = true;
continue;
}
var prev = '';
var next = str[index];
var name = res[2];
var capture = res[3];
var group = res[4];
var modifier = res[5];
if (!pathEscaped && path.length) {
var k = path.length - 1;
if (delimiters.indexOf(path[k]) > -1) {
prev = path[k];
path = path.slice(0, k);
}
}
// Push the current path onto the tokens.
if (path) {
tokens.push(path);
path = '';
pathEscaped = false;
}
var partial = prev !== '' && next !== undefined && next !== prev;
var repeat = modifier === '+' || modifier === '*';
var optional = modifier === '?' || modifier === '*';
var delimiter = prev || defaultDelimiter;
var pattern = capture || group;
tokens.push({
name: name || key++,
prefix: prev,
delimiter: delimiter,
optional: optional,
repeat: repeat,
partial: partial,
pattern: pattern ? escapeGroup(pattern) : '[^' + escapeString(delimiter) + ']+?'
});
}
// Push any remaining characters.
if (path || index < str.length) {
tokens.push(path + str.substr(index));
}
return tokens;
}
/**
* Escape a regular expression string.
*/
function escapeString(str) {
return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, '\\$1');
}
/**
* Escape the capturing group by escaping special characters and meaning.
*/
function escapeGroup(group) {
return group.replace(/([=!:$/()])/g, '\\$1');
}
/**
* Get the flags for a regexp from the options.
*/
function flags(options) {
return options && options.sensitive ? '' : 'i';
}
/**
* Pull out keys from a regexp.
*/
function regexpToRegexp(path, keys) {
if (!keys)
return path;
// Use a negative lookahead to match only capturing groups.
var groups = path.source.match(/\((?!\?)/g);
if (groups) {
for (var i = 0; i < groups.length; i++) {
keys.push({
name: i,
prefix: null,
delimiter: null,
optional: false,
repeat: false,
partial: false,
pattern: null
});
}
}
return path;
}
/**
* Transform an array into a regexp.
*/
function arrayToRegexp(path, keys, options) {
var parts = [];
for (var i = 0; i < path.length; i++) {
parts.push(pathToRegexp(path[i], keys, options).source);
}
return new RegExp('(?:' + parts.join('|') + ')', flags(options));
}
/**
* Create a path regexp from string input.
*/
function stringToRegexp(path, keys, options) {
return tokensToRegExp(parse(path, options), keys, options);
}
/**
* Expose a function for taking tokens and returning a RegExp.
*/
function tokensToRegExp(tokens, keys, options) {
options = options || {};
var strict = options.strict;
var end = options.end !== false;
var delimiter = escapeString(options.delimiter || DEFAULT_DELIMITER);
var delimiters = options.delimiters || DEFAULT_DELIMITERS;
var endsWith = [].concat(options.endsWith || []).map(escapeString).concat('$').join('|');
var route = '';
var isEndDelimited = false;
// Iterate over the tokens and create our regexp string.
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
if (typeof token === 'string') {
route += escapeString(token);
isEndDelimited = i === tokens.length - 1 && delimiters.indexOf(token[token.length - 1]) > -1;
}
else {
var prefix = escapeString(token.prefix);
var capture = token.repeat
? '(?:' + token.pattern + ')(?:' + prefix + '(?:' + token.pattern + '))*'
: token.pattern;
if (keys)
keys.push(token);
if (token.optional) {
if (token.partial) {
route += prefix + '(' + capture + ')?';
}
else {
route += '(?:' + prefix + '(' + capture + '))?';
}
}
else {
route += prefix + '(' + capture + ')';
}
}
}
if (end) {
if (!strict)
route += '(?:' + delimiter + ')?';
route += endsWith === '$' ? '$' : '(?=' + endsWith + ')';
}
else {
if (!strict)
route += '(?:' + delimiter + '(?=' + endsWith + '))?';
if (!isEndDelimited)
route += '(?=' + delimiter + '|' + endsWith + ')';
}
return new RegExp('^' + route, flags(options));
}
/**
* Normalize the given path string, returning a regular expression.
*
* An empty array can be passed in for the keys, which will hold the
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
*/
function pathToRegexp(path, keys, options) {
if (path instanceof RegExp) {
return regexpToRegexp(path, keys);
}
if (Array.isArray(path)) {
return arrayToRegexp(path, keys, options);
}
return stringToRegexp(path, keys, options);
}
var patternCache = {};
var cacheLimit = 10000;
var cacheCount = 0;
// Memoized function for creating the path match regex
function compilePath(pattern, options) {
var cacheKey = "" + options.end + options.strict;
var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
var cachePattern = JSON.stringify(pattern);
if (cache[cachePattern]) {
return cache[cachePattern];
}
var keys = [];
var re = pathToRegexp(pattern, keys, options);
var compiledPattern = { re: re, keys: keys };
if (cacheCount < cacheLimit) {
cache[cachePattern] = compiledPattern;
cacheCount += 1;
}
return compiledPattern;
}
/**
* Public API for matching a URL pathname to a path pattern.
*/
function matchPath(pathname, options) {
if (options === void 0) { options = {}; }
if (typeof options === 'string') {
options = { path: options };
}
var _a = options.path, path = _a === void 0 ? '/' : _a, _b = options.exact, exact = _b === void 0 ? false : _b, _c = options.strict, strict = _c === void 0 ? false : _c;
var _d = compilePath(path, { end: exact, strict: strict }), re = _d.re, keys = _d.keys;
var match = re.exec(pathname);
if (!match) {
return null;
}
var url = match[0], values = match.slice(1);
var isExact = pathname === url;
if (exact && !isExact) {
return null;
}
return {
path: path,
url: path === '/' && url === '' ? '/' : url,
isExact: isExact,
params: keys.reduce(function (memo, key, index) {
memo[key.name] = values[index];
return memo;
}, {})
};
}
exports.matchPath = matchPath;
});
+2
View File
@@ -0,0 +1,2 @@
/*! Built with http://stenciljs.com */
DocsSite.loadBundle("d83fvjds",["exports"],function(e){var n=window.DocsSite.h,o=function(){function e(){}return e.prototype.render=function(){return n("main",null,n("div",{class:"container"},n("h1",null,"Woops! We can't find the page your looking for."),n("p",null,"Head on back to the ",n("stencil-route-link",{url:"/",class:"block"},"Icons page"),".")),n("footer-bar",null))},Object.defineProperty(e,"is",{get:function(){return"notfound-page"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return"notfound-page{text-align:center;height:100%}notfound-page h1{max-width:500px}notfound-page a{font-weight:600}"},enumerable:!0,configurable:!0}),e}();e.NotfoundPage=o,Object.defineProperty(e,"__esModule",{value:!0})});
+2
View File
@@ -0,0 +1,2 @@
/*! Built with http://stenciljs.com */
const{h:e}=window.DocsSite;class n{render(){return e("main",null,e("div",{class:"container"},e("h1",null,"Woops! We can't find the page your looking for."),e("p",null,"Head on back to the ",e("stencil-route-link",{url:"/",class:"block"},"Icons page"),".")),e("footer-bar",null))}static get is(){return"notfound-page"}static get style(){return"notfound-page{text-align:center;height:100%}notfound-page h1{max-width:500px}notfound-page a{font-weight:600}"}}export{n as NotfoundPage};
+1 -1
View File
@@ -316,7 +316,7 @@ s=document.querySelector("script[data-namespace='docssite']");if(s){resourcesUrl
// we could have either gotten the data from the attribute changed callback,
// which wouldn't have Constructor data yet, and because this method is reused
// within proxy where we don't have meta data, but only constructor data
if (isDef(propValue) && 'object' !== typeof propValue) {
if (isDef(propValue) && 'object' !== typeof propValue && 'function' !== typeof propValue) {
if (propType === Boolean || 3 /* Boolean */ === propType) {
// per the HTML spec, any string value means it is a boolean true value
// but we'll cheat here and say that the string "false" is the boolean false
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -2,9 +2,9 @@
"namespace": "DocsSite",
"fsNamespace": "docssite",
"loader": "../docssite.js",
"corePolyfilled": "es5-build-disabled.js",
"global": "docssite.global.js",
"core": "docssite.core.js",
"corePolyfilled": "docssite.core.pf.js",
"components": {
"footer-bar": {
"$": "footer-bar"
+24
View File
@@ -0,0 +1,24 @@
/*! Built with http://stenciljs.com */
DocsSite.loadBundle('footer-bar', ['exports'], function (exports) {
var h = window.DocsSite.h;
var FooterBar = /** @class */ (function () {
function FooterBar() {
}
FooterBar.prototype.render = function () {
return (h("footer", null, h("div", { class: "container" }, h("div", { class: "footer__open-source" }, h("a", { href: "http://ionicframework.com/", title: "IonicFramework.com", rel: "noopener" }, h("img", { src: "/assets/img/ionic-os-logo.png", alt: "Ionic Open Source Logo" })), h("p", null, "Released under ", h("span", { id: "mit" }, "MIT License"), " | Copyright @ ", (new Date()).getFullYear())), h("div", { class: "footer-menu" }, h("a", { href: "cheatsheet.html" }, "Cheatsheet"), h("a", { href: "/v1" }, "v1"), h("a", { href: "/v2" }, "v2"), h("a", { href: "https://ionicframework.com/docs/components/#icons" }, "v3"), h("a", { href: "https://ionicframework.com/" }, "Ionic Framework")))));
};
Object.defineProperty(FooterBar, "is", {
get: function () { return "footer-bar"; },
enumerable: true,
configurable: true
});
Object.defineProperty(FooterBar, "style", {
get: function () { return "footer-bar footer {\n width: 100%;\n background: var(--color-white-lilac);\n -webkit-box-flex: 0;\n -webkit-flex: 0 0 8em;\n -ms-flex: 0 0 8em;\n flex: 0 0 8em;\n /* margin-top: 100px; */ }\n\nfooter-bar .container {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n padding-top: 40px;\n padding-bottom: 40px; }\n\nfooter-bar img {\n width: 50%; }\n\nfooter-bar p {\n margin-top: 0;\n margin-bottom: 0;\n color: var(--color-cadet-blue);\n font-size: 10px;\n letter-spacing: 0; }\n\nfooter-bar .footer-menu a {\n -webkit-transition: color 0.3s;\n transition: color 0.3s;\n font-size: 11px;\n font-weight: 600;\n text-decoration: none;\n color: var(--color-gull-gray); }\n\nfooter-bar .footer-menu a:hover {\n color: var(--color-shark); }\n\nfooter-bar .footer-menu a + a {\n margin-left: 18px; }\n\n\@media screen and (max-width: 768px) {\n footer-bar .container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -webkit-flex-direction: column-reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n text-align: center; }\n footer-bar .footer-menu {\n margin-bottom: 36px; } }"; },
enumerable: true,
configurable: true
});
return FooterBar;
}());
exports.FooterBar = FooterBar;
Object.defineProperty(exports, '__esModule', { value: true });
});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -221,7 +221,7 @@ class IoniconsSite {
h("stencil-router-scroll-top", null,
h(RouterSwitch, { scrollTopOffset: 0 },
h("stencil-route", { url: "/", component: "landing-page", exact: true, componentProps: { 'query': this.query, 'data': this.data } }),
h("stencil-route", { url: "/usage/:type?/:icon?", component: "usage-page", componentProps: { 'data': this.data } }),
h("stencil-route", { url: "/usage", component: "usage-page", componentProps: { 'data': this.data } }),
h("stencil-route", { component: 'notfound-page' }))))
];
}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -288,7 +288,7 @@ class ToastBar {
h("span", { class: "confirmation" },
h("i", { class: "ion ion-md-checkmark" }),
"Copied")),
h("stencil-route-link", { url: `/usage/${iconType}/${this.selectedIcon.name}`, onClick: () => this.toggleHeaderSearch.emit('hide') },
h("stencil-route-link", { url: `/usage#${iconType}-${this.selectedIcon.name}`, onClick: () => this.toggleHeaderSearch.emit('hide') },
"Usage",
h("i", { class: "ion ion-ios-arrow-forward" }))),
h("code", null,
+97
View File
@@ -0,0 +1,97 @@
/*! Built with http://stenciljs.com */
DocsSite.loadBundle('icon-search', ['exports'], function (exports) {
var h = window.DocsSite.h;
var IconSearch = /** @class */ (function () {
function IconSearch() {
this.query = '';
this.size = 'small';
this.autofocus = 'none';
this.showClearCtrl = false;
}
IconSearch.prototype.watchQuery = function () {
this.showClearCtrl = (this.query.length > 0) ? true : false;
};
IconSearch.prototype.searchListener = function (ev) {
if (ev.keyCode === 27) {
this.handleClear();
return;
}
var value = ev.target.value;
this.hasSearched.emit(value);
};
IconSearch.prototype.handleClear = function () {
this.hasSearched.emit('');
};
IconSearch.prototype.componentWillLoad = function () {
this.watchQuery();
};
IconSearch.prototype.render = function () {
return (h("div", { class: "search-input search-input--" + this.size }, h("input", { type: "text", placeholder: "Search icons...", value: this.query, autofocus: this.autofocus === 'autofocus' ? 'autofocus' : '' }), h("i", { class: {
'search-input__clear': true,
'search-input__clear--active': this.showClearCtrl,
'ion': true,
'ion-md-close': true
}, onClick: this.handleClear.bind(this) })));
};
Object.defineProperty(IconSearch, "is", {
get: function () { return "icon-search"; },
enumerable: true,
configurable: true
});
Object.defineProperty(IconSearch, "properties", {
get: function () {
return {
"autofocus": {
"type": String,
"attr": "autofocus"
},
"query": {
"type": String,
"attr": "query",
"watchCallbacks": ["watchQuery"]
},
"showClearCtrl": {
"state": true
},
"size": {
"type": String,
"attr": "size"
}
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(IconSearch, "events", {
get: function () {
return [{
"name": "hasSearched",
"method": "hasSearched",
"bubbles": true,
"cancelable": true,
"composed": true
}];
},
enumerable: true,
configurable: true
});
Object.defineProperty(IconSearch, "listeners", {
get: function () {
return [{
"name": "keyup",
"method": "searchListener"
}];
},
enumerable: true,
configurable: true
});
Object.defineProperty(IconSearch, "style", {
get: function () { return "icon-search .search-input {\n position: relative; }\n\nicon-search .search-input input {\n width: 100%;\n font-weight: 400;\n font-family: 'Eina';\n font-size: 16px;\n border: 0;\n outline: 0;\n border-radius: 6px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: block;\n -webkit-appearance: none;\n vertical-align: middle; }\n\nicon-search .search-input__clear {\n -webkit-transition: background 0.3s, opacity 0.3s;\n transition: background 0.3s, opacity 0.3s;\n position: absolute;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n right: 16px;\n font-size: 14px;\n width: 22px;\n height: 22px;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n cursor: pointer;\n color: var(--color-pale-sky);\n opacity: 0;\n background-color: var(--color-catskill-white);\n border-radius: 100px; }\n icon-search .search-input__clear--active {\n opacity: 0.8; }\n icon-search .search-input__clear--active:hover {\n opacity: 1;\n background-color: #e3e9f3; }\n\nicon-search .search-input--small .search-input__clear {\n font-size: 12px;\n width: 18px;\n height: 18px;\n background-color: #e3e9f3;\n right: 12px; }\n icon-search .search-input--small .search-input__clear--active:hover {\n background-color: #dce3f0; }\n\nicon-search .search-input:before {\n font-family: \"Ionicons\";\n content: \"\\f4a5\";\n color: var(--color-heather);\n position: absolute;\n height: 24px;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n\nicon-search .search-input--small input {\n font-size: 13px;\n line-height: 18px;\n padding: 10px;\n padding-left: 30px;\n padding-right: 30px;\n background-color: #f6f7f9;\n height: 39px;\n text-indent: 0; }\n\nicon-search .search-input--small:before {\n font-size: 18px;\n left: 10px; }\n\nicon-search .search-input--large input {\n -webkit-transition: -webkit-box-shadow 0.3s;\n transition: -webkit-box-shadow 0.3s;\n transition: box-shadow 0.3s;\n transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;\n font-size: 16px;\n line-height: 22px;\n padding: 20px;\n padding-left: 50px;\n padding-right: 50px;\n background-color: white;\n -webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.08);\n box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.08); }\n\nicon-search .search-input--large input:focus {\n -webkit-box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.08);\n box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.08); }\n\nicon-search .search-input--large:before {\n font-size: 22px;\n left: 20px; }\n\nicon-search .search-input input::-webkit-input-placeholder {\n color: var(--color-heather); }\n\nicon-search .search-input input:-ms-input-placeholder {\n color: var(--color-heather); }\n\nicon-search .search-input input::-ms-input-placeholder {\n color: var(--color-heather); }\n\nicon-search .search-input input::placeholder {\n color: var(--color-heather); }"; },
enumerable: true,
configurable: true
});
return IconSearch;
}());
exports.IconSearch = IconSearch;
Object.defineProperty(exports, '__esModule', { value: true });
});
+2
View File
@@ -0,0 +1,2 @@
/*! Built with http://stenciljs.com */
DocsSite.loadBundle("ms1l1l4a",["exports"],function(e){var t=window.DocsSite.h,r=function(){function e(){this.query="",this.size="small",this.autofocus="none",this.showClearCtrl=!1}return e.prototype.watchQuery=function(){this.showClearCtrl=this.query.length>0},e.prototype.searchListener=function(e){if(27!==e.keyCode){var t=e.target.value;this.hasSearched.emit(t)}else this.handleClear()},e.prototype.handleClear=function(){this.hasSearched.emit("")},e.prototype.componentWillLoad=function(){this.watchQuery()},e.prototype.render=function(){return t("div",{class:"search-input search-input--"+this.size},t("input",{type:"text",placeholder:"Search icons...",value:this.query,autofocus:"autofocus"===this.autofocus?"autofocus":""}),t("i",{class:{"search-input__clear":!0,"search-input__clear--active":this.showClearCtrl,ion:!0,"ion-md-close":!0},onClick:this.handleClear.bind(this)}))},Object.defineProperty(e,"is",{get:function(){return"icon-search"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{autofocus:{type:String,attr:"autofocus"},query:{type:String,attr:"query",watchCallbacks:["watchQuery"]},showClearCtrl:{state:!0},size:{type:String,attr:"size"}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"events",{get:function(){return[{name:"hasSearched",method:"hasSearched",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"listeners",{get:function(){return[{name:"keyup",method:"searchListener"}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return"icon-search .search-input{position:relative}icon-search .search-input input{width:100%;font-weight:400;font-family:Eina;font-size:16px;border:0;outline:0;border-radius:6px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;-webkit-appearance:none;vertical-align:middle}icon-search .search-input__clear{-webkit-transition:background .3s,opacity .3s;transition:background .3s,opacity .3s;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:16px;font-size:14px;width:22px;height:22px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;color:var(--color-pale-sky);opacity:0;background-color:var(--color-catskill-white);border-radius:100px}icon-search .search-input__clear--active{opacity:.8}icon-search .search-input__clear--active:hover{opacity:1;background-color:#e3e9f3}icon-search .search-input--small .search-input__clear{font-size:12px;width:18px;height:18px;background-color:#e3e9f3;right:12px}icon-search .search-input--small .search-input__clear--active:hover{background-color:#dce3f0}icon-search .search-input:before{font-family:Ionicons;content:\"\\f4a5\";color:var(--color-heather);position:absolute;height:24px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}icon-search .search-input--small input{font-size:13px;line-height:18px;padding:10px;padding-left:30px;padding-right:30px;background-color:#f6f7f9;height:39px;text-indent:0}icon-search .search-input--small:before{font-size:18px;left:10px}icon-search .search-input--large input{-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s,-webkit-box-shadow .3s;font-size:16px;line-height:22px;padding:20px;padding-left:50px;padding-right:50px;background-color:#fff;-webkit-box-shadow:0 3px 6px 0 rgba(0,0,0,.1),0 1px 3px 0 rgba(0,0,0,.08);box-shadow:0 3px 6px 0 rgba(0,0,0,.1),0 1px 3px 0 rgba(0,0,0,.08)}icon-search .search-input--large input:focus{-webkit-box-shadow:0 6px 12px 0 rgba(0,0,0,.1),0 1px 3px 0 rgba(0,0,0,.08);box-shadow:0 6px 12px 0 rgba(0,0,0,.1),0 1px 3px 0 rgba(0,0,0,.08)}icon-search .search-input--large:before{font-size:22px;left:20px}icon-search .search-input input::-webkit-input-placeholder{color:var(--color-heather)}icon-search .search-input input:-ms-input-placeholder{color:var(--color-heather)}icon-search .search-input input::-ms-input-placeholder{color:var(--color-heather)}icon-search .search-input input::placeholder{color:var(--color-heather)}"},enumerable:!0,configurable:!0}),e}();e.IconSearch=r,Object.defineProperty(e,"__esModule",{value:!0})});
+2
View File
@@ -0,0 +1,2 @@
/*! Built with http://stenciljs.com */
const{h:e}=window.DocsSite;class t{constructor(){this.query="",this.size="small",this.autofocus="none",this.showClearCtrl=!1}watchQuery(){this.showClearCtrl=this.query.length>0}searchListener(e){if(27===e.keyCode)return void this.handleClear();const t=e.target.value;this.hasSearched.emit(t)}handleClear(){this.hasSearched.emit("")}componentWillLoad(){this.watchQuery()}render(){return e("div",{class:`search-input search-input--${this.size}`},e("input",{type:"text",placeholder:"Search icons...",value:this.query,autofocus:"autofocus"===this.autofocus?"autofocus":""}),e("i",{class:{"search-input__clear":!0,"search-input__clear--active":this.showClearCtrl,ion:!0,"ion-md-close":!0},onClick:this.handleClear.bind(this)}))}static get is(){return"icon-search"}static get properties(){return{autofocus:{type:String,attr:"autofocus"},query:{type:String,attr:"query",watchCallbacks:["watchQuery"]},showClearCtrl:{state:!0},size:{type:String,attr:"size"}}}static get events(){return[{name:"hasSearched",method:"hasSearched",bubbles:!0,cancelable:!0,composed:!0}]}static get listeners(){return[{name:"keyup",method:"searchListener"}]}static get style(){return"icon-search .search-input{position:relative}icon-search .search-input input{width:100%;font-weight:400;font-family:Eina;font-size:16px;border:0;outline:0;border-radius:6px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;-webkit-appearance:none;vertical-align:middle}icon-search .search-input__clear{-webkit-transition:background .3s,opacity .3s;transition:background .3s,opacity .3s;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:16px;font-size:14px;width:22px;height:22px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;color:var(--color-pale-sky);opacity:0;background-color:var(--color-catskill-white);border-radius:100px}icon-search .search-input__clear--active{opacity:.8}icon-search .search-input__clear--active:hover{opacity:1;background-color:#e3e9f3}icon-search .search-input--small .search-input__clear{font-size:12px;width:18px;height:18px;background-color:#e3e9f3;right:12px}icon-search .search-input--small .search-input__clear--active:hover{background-color:#dce3f0}icon-search .search-input:before{font-family:Ionicons;content:\"\\f4a5\";color:var(--color-heather);position:absolute;height:24px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}icon-search .search-input--small input{font-size:13px;line-height:18px;padding:10px;padding-left:30px;padding-right:30px;background-color:#f6f7f9;height:39px;text-indent:0}icon-search .search-input--small:before{font-size:18px;left:10px}icon-search .search-input--large input{-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s,-webkit-box-shadow .3s;font-size:16px;line-height:22px;padding:20px;padding-left:50px;padding-right:50px;background-color:#fff;-webkit-box-shadow:0 3px 6px 0 rgba(0,0,0,.1),0 1px 3px 0 rgba(0,0,0,.08);box-shadow:0 3px 6px 0 rgba(0,0,0,.1),0 1px 3px 0 rgba(0,0,0,.08)}icon-search .search-input--large input:focus{-webkit-box-shadow:0 6px 12px 0 rgba(0,0,0,.1),0 1px 3px 0 rgba(0,0,0,.08);box-shadow:0 6px 12px 0 rgba(0,0,0,.1),0 1px 3px 0 rgba(0,0,0,.08)}icon-search .search-input--large:before{font-size:22px;left:20px}icon-search .search-input input::-webkit-input-placeholder{color:var(--color-heather)}icon-search .search-input input:-ms-input-placeholder{color:var(--color-heather)}icon-search .search-input input::-ms-input-placeholder{color:var(--color-heather)}icon-search .search-input input::placeholder{color:var(--color-heather)}"}}export{t as IconSearch};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+24
View File
@@ -0,0 +1,24 @@
/*! Built with http://stenciljs.com */
DocsSite.loadBundle('notfound-page', ['exports'], function (exports) {
var h = window.DocsSite.h;
var NotFoundPage = /** @class */ (function () {
function NotFoundPage() {
}
NotFoundPage.prototype.render = function () {
return (h("main", null, h("div", { class: "container" }, h("h1", null, "Woops! We can't find the page your looking for."), h("p", null, "Head on back to the ", h("stencil-route-link", { url: '/', class: 'block' }, "Icons page"), ".")), h("footer-bar", null)));
};
Object.defineProperty(NotFoundPage, "is", {
get: function () { return "notfound-page"; },
enumerable: true,
configurable: true
});
Object.defineProperty(NotFoundPage, "style", {
get: function () { return "notfound-page {\n text-align: center;\n height: 100%; }\n notfound-page h1 {\n max-width: 500px; }\n notfound-page a {\n font-weight: 600; }"; },
enumerable: true,
configurable: true
});
return NotFoundPage;
}());
exports.NotfoundPage = NotFoundPage;
Object.defineProperty(exports, '__esModule', { value: true });
});
+150
View File
@@ -0,0 +1,150 @@
/*! Built with http://stenciljs.com */
DocsSite.loadBundle('stencil-route-link', ['exports', './chunk-4440b782.js'], function (exports, __chunk_1) {
var h = window.DocsSite.h;
/**
* @name Route
* @module ionic
* @description
*/
var RouteLink = /** @class */ (function () {
function RouteLink() {
this.unsubscribe = function () { return; };
this.activeClass = 'link-active';
this.exact = false;
this.strict = true;
/**
* Custom tag to use instead of an anchor
*/
this.custom = 'a';
this.match = null;
}
// Identify if the current route is a match.
RouteLink.prototype.computeMatch = function (pathname) {
if (!pathname) {
var location = this.activeRouter.get('location');
pathname = location.pathname;
}
var match = __chunk_1.matchPath(pathname, {
path: this.urlMatch || this.url,
exact: this.exact,
strict: this.strict
});
return match;
};
RouteLink.prototype.componentWillLoad = function () {
var _this = this;
// subscribe the project's active router and listen
// for changes. Recompute the match if any updates get
// pushed
this.unsubscribe = this.activeRouter.subscribe({
isMatch: this.computeMatch.bind(this),
listener: function (matchResult) {
_this.match = matchResult;
},
});
// Likely that this route link could receive a location prop
this.match = this.computeMatch();
};
RouteLink.prototype.componentDidUnload = function () {
// be sure to unsubscribe to the router so that we don't
// get any memory leaks
this.unsubscribe();
};
RouteLink.prototype.handleClick = function (e) {
e.preventDefault();
if (!this.activeRouter) {
console.warn('<stencil-route-link> wasn\'t passed an instance of the router as the "router" prop!');
return;
}
var history = this.activeRouter.get('history');
return history.push(this.getUrl(this.url));
};
// Get the URL for this route link without the root from the router
RouteLink.prototype.getUrl = function (url) {
var root = this.activeRouter.get('root') || '/';
// Don't allow double slashes
if (url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') {
return root.slice(0, root.length - 1) + url;
}
return root + url;
};
RouteLink.prototype.render = function () {
var anchorAttributes = {
class: (_a = {},
_a[this.activeClass] = this.match !== null,
_a),
onClick: this.handleClick.bind(this)
};
if (this.anchorClass) {
anchorAttributes.class[this.anchorClass] = true;
}
if (this.custom === 'a') {
anchorAttributes = Object.assign({}, anchorAttributes, { href: this.url, title: this.anchorTitle, role: this.anchorRole, tabindex: this.anchorTabIndex });
}
return (h(this.custom, Object.assign({}, anchorAttributes), h("slot", null)));
var _a;
};
Object.defineProperty(RouteLink, "is", {
get: function () { return "stencil-route-link"; },
enumerable: true,
configurable: true
});
Object.defineProperty(RouteLink, "properties", {
get: function () {
return {
"activeClass": {
"type": String,
"attr": "active-class"
},
"activeRouter": {
"context": "activeRouter"
},
"anchorClass": {
"type": String,
"attr": "anchor-class"
},
"anchorRole": {
"type": String,
"attr": "anchor-role"
},
"anchorTabIndex": {
"type": String,
"attr": "anchor-tab-index"
},
"anchorTitle": {
"type": String,
"attr": "anchor-title"
},
"custom": {
"type": String,
"attr": "custom"
},
"exact": {
"type": Boolean,
"attr": "exact"
},
"match": {
"state": true
},
"strict": {
"type": Boolean,
"attr": "strict"
},
"url": {
"type": String,
"attr": "url"
},
"urlMatch": {
"type": String,
"attr": "url-match"
}
};
},
enumerable: true,
configurable: true
});
return RouteLink;
}());
exports.StencilRouteLink = RouteLink;
Object.defineProperty(exports, '__esModule', { value: true });
});
File diff suppressed because one or more lines are too long
+7 -5
View File
@@ -18100,22 +18100,24 @@ class UsagePage {
this.exampleIcon = 'heart';
}
componentWillLoad() {
if (!this.match.params.icon)
if (!window.location.hash)
return;
let iconNames = [];
this.data.icons.map((o) => {
iconNames = iconNames.concat(o.icons);
});
if (iconNames.includes(`${this.match.params.type}-${this.match.params.icon}`)) {
this.exampleType = this.match.params.type;
this.exampleIcon = this.match.params.icon;
const hash = window.location.hash.replace('#', '');
if (iconNames.includes(hash)) {
const splt = hash.split('-');
this.exampleType = splt[0];
this.exampleIcon = splt[1];
}
}
componentDidLoad() {
// this.queue.read(function() {
// console.log('offset ', document.getElementById('basic-usage').offsetTop)
// });
if (this.match.params.icon) {
if (window.location.hash) {
setTimeout(() => {
const offset = document.getElementById('basic-usage').offsetTop - 100;
window.scrollTo({ left: 0, top: offset, behavior: 'smooth' });
+2
View File
@@ -0,0 +1,2 @@
/*! Built with http://stenciljs.com */
DocsSite.loadBundle("vtu3zyh5",["exports"],function(e){var o=window.DocsSite.h,r=function(){function e(){}return e.prototype.render=function(){return o("footer",null,o("div",{class:"container"},o("div",{class:"footer__open-source"},o("a",{href:"http://ionicframework.com/",title:"IonicFramework.com",rel:"noopener"},o("img",{src:"/assets/img/ionic-os-logo.png",alt:"Ionic Open Source Logo"})),o("p",null,"Released under ",o("span",{id:"mit"},"MIT License")," | Copyright @ ",(new Date).getFullYear())),o("div",{class:"footer-menu"},o("a",{href:"cheatsheet.html"},"Cheatsheet"),o("a",{href:"/v1"},"v1"),o("a",{href:"/v2"},"v2"),o("a",{href:"https://ionicframework.com/docs/components/#icons"},"v3"),o("a",{href:"https://ionicframework.com/"},"Ionic Framework"))))},Object.defineProperty(e,"is",{get:function(){return"footer-bar"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return"footer-bar footer{width:100%;background:var(--color-white-lilac);-webkit-box-flex:0;-webkit-flex:0 0 8em;-ms-flex:0 0 8em;flex:0 0 8em}footer-bar .container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;padding-top:40px;padding-bottom:40px}footer-bar img{width:50%}footer-bar p{margin-top:0;margin-bottom:0;color:var(--color-cadet-blue);font-size:10px;letter-spacing:0}footer-bar .footer-menu a{-webkit-transition:color .3s;transition:color .3s;font-size:11px;font-weight:600;text-decoration:none;color:var(--color-gull-gray)}footer-bar .footer-menu a:hover{color:var(--color-shark)}footer-bar .footer-menu a+a{margin-left:18px}\@media screen and (max-width:768px){footer-bar .container{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;text-align:center}footer-bar .footer-menu{margin-bottom:36px}}"},enumerable:!0,configurable:!0}),e}();e.FooterBar=r,Object.defineProperty(e,"__esModule",{value:!0})});
+2
View File
@@ -0,0 +1,2 @@
/*! Built with http://stenciljs.com */
const{h:e}=window.DocsSite;class o{render(){return e("footer",null,e("div",{class:"container"},e("div",{class:"footer__open-source"},e("a",{href:"http://ionicframework.com/",title:"IonicFramework.com",rel:"noopener"},e("img",{src:"/assets/img/ionic-os-logo.png",alt:"Ionic Open Source Logo"})),e("p",null,"Released under ",e("span",{id:"mit"},"MIT License")," | Copyright @ ",(new Date).getFullYear())),e("div",{class:"footer-menu"},e("a",{href:"cheatsheet.html"},"Cheatsheet"),e("a",{href:"/v1"},"v1"),e("a",{href:"/v2"},"v2"),e("a",{href:"https://ionicframework.com/docs/components/#icons"},"v3"),e("a",{href:"https://ionicframework.com/"},"Ionic Framework"))))}static get is(){return"footer-bar"}static get style(){return"footer-bar footer{width:100%;background:var(--color-white-lilac);-webkit-box-flex:0;-webkit-flex:0 0 8em;-ms-flex:0 0 8em;flex:0 0 8em}footer-bar .container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;padding-top:40px;padding-bottom:40px}footer-bar img{width:50%}footer-bar p{margin-top:0;margin-bottom:0;color:var(--color-cadet-blue);font-size:10px;letter-spacing:0}footer-bar .footer-menu a{-webkit-transition:color .3s;transition:color .3s;font-size:11px;font-weight:600;text-decoration:none;color:var(--color-gull-gray)}footer-bar .footer-menu a:hover{color:var(--color-shark)}footer-bar .footer-menu a+a{margin-left:18px}\@media screen and (max-width:768px){footer-bar .container{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;text-align:center}footer-bar .footer-menu{margin-bottom:36px}}"}}export{o as FooterBar};
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.
+1 -1
View File
@@ -5,7 +5,7 @@
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata>
Created by FontForge 20180321 at Thu May 10 14:09:45 2018
Created by FontForge 20180321 at Thu May 10 14:48:40 2018
By Kevin Ports
Copyright (c) 2018, Kevin Ports
</metadata>

Before

Width:  |  Height:  |  Size: 306 KiB

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,2 +1,2 @@
/*! Built with http://stenciljs.com */
!function(e,t,n,i,r,o,s,c,a,l,u,d,m,p,h){for((u=e.ionicons=e.ionicons||{}).components=a,(m=a.filter(function(e){return e[2]}).map(function(e){return e[0]})).length&&((d=t.createElement("style")).innerHTML=m.join()+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),t.head.insertBefore(d,t.head.firstChild)),u.$r=[],h=l.componentOnReady,l.componentOnReady=function(t){const n=this;function i(e){u.$r?u.$r.push([n,e]):u.componentOnReady(n,e)}return h&&h.call(n),t?i(t):e.Promise?new Promise(i):{then:i}},d=(m=t.querySelectorAll("script")).length-1;d>=0&&!(p=m[d]).src&&!p.hasAttribute("data-resources-url");d--);(m=p.getAttribute("data-resources-url"))&&(r=m),!r&&p.src&&(r=(m=p.src.split("/").slice(0,-1)).join("/")+(m.length?"/":"")+"ionicons/"),d=t.createElement("script"),function(e,t,n,i){return!(t.search.indexOf("core=esm")>0)&&(!(!(t.search.indexOf("core=es5")>0||"file:"===t.protocol)&&e.customElements&&e.customElements.define&&e.fetch&&e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")&&"noModule"in n)||function(e){try{return new Function('import("")'),!1}catch(e){}return!0}())}(e,e.location,d)?d.src=r+"ionicons.wuyw82jl.js":(d.src=r+"ionicons.bnvv65il.js",d.setAttribute("type","module"),d.setAttribute("crossorigin","use-credentials")),d.setAttribute("data-resources-url",r),d.setAttribute("data-namespace","ionicons"),t.head.appendChild(d)}(window,document,0,0,0,0,0,0,[["ion-icon","6rxqbvfx",1,[["ariaLabel",1,0,"aria-label",2],["color",1,0,1,2],["ios",1,0,1,2],["isServer",3,0,0,0,"isServer"],["md",1,0,1,2],["mode",3,0,0,0,"mode"],["name",1,0,1,2],["publicPath",3,0,0,0,"publicPath"],["size",1,0,1,2],["svgContent",5]]]],HTMLElement.prototype);
!function(e,t,n,r,i,o,s,c,a,l,u,d,m,p,h){for((u=e.ionicons=e.ionicons||{}).components=a,(m=a.filter(function(e){return e[2]}).map(function(e){return e[0]})).length&&((d=t.createElement("style")).innerHTML=m.join()+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),t.head.insertBefore(d,t.head.firstChild)),u.$r=[],h=l.componentOnReady,l.componentOnReady=function(t){const n=this;function r(e){u.$r?u.$r.push([n,e]):u.componentOnReady(n,e)}return h&&h.call(n),t?r(t):e.Promise?new Promise(r):{then:r}},d=(m=t.querySelectorAll("script")).length-1;d>=0&&!(p=m[d]).src&&!p.hasAttribute("data-resources-url");d--);(m=p.getAttribute("data-resources-url"))&&(i=m),!i&&p.src&&(i=(m=p.src.split("/").slice(0,-1)).join("/")+(m.length?"/":"")+"ionicons/"),d=t.createElement("script"),function(e,t,n,r){return!(t.search.indexOf("core=esm")>0)&&(!(!(t.search.indexOf("core=es5")>0||"file:"===t.protocol)&&e.customElements&&e.customElements.define&&e.fetch&&e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")&&"noModule"in n)||function(e){try{return new Function('import("")'),!1}catch(e){}return!0}())}(e,e.location,d)?d.src=i+"ionicons.jnmt4b9p.js":(d.src=i+"ionicons.o84enl63.js",d.setAttribute("type","module"),d.setAttribute("crossorigin",!0)),d.setAttribute("data-resources-url",i),d.setAttribute("data-namespace","ionicons"),t.head.appendChild(d)}(window,document,0,0,0,0,0,0,[["ion-icon","6rxqbvfx",1,[["ariaLabel",1,0,"aria-label",2],["color",1,0,1,2],["ios",1,0,1,2],["isServer",3,0,0,0,"isServer"],["md",1,0,1,2],["mode",3,0,0,0,"mode"],["name",1,0,1,2],["publicPath",3,0,0,0,"publicPath"],["size",1,0,1,2],["svgContent",5]]]],HTMLElement.prototype);
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.
+52
View File
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8">
<title>Ionicons: The premium icon pack for Ionic Framework</title>
<meta name="author" content="Ionic">
<meta name="description" content="Ionicons is an open-sourced and MIT licensed icon pack." />
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="manifest" href="/manifest.json">
<meta property="og:title" content="Ionicons: The premium icon pack for Ionic Framework" />
<meta property="og:description" content="Ionicons is an open-sourced and MIT licensed icon pack." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://ionicons.com/" />
<meta property="og:image" content="/assets/img/meta/ionicons-og-image.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:creator" content="@ionicframework" />
<link rel="apple-touch-icon" sizes="57x57" href="/assets/img/meta/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/assets/img/meta/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/img/meta/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/assets/img/meta/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/assets/img/meta/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/img/meta/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/assets/img/meta/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/img/meta/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/img/meta/apple-icon-180x180.png">
<link rel="icon" type="image/png" href="/assets/img/meta/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/assets/img/meta/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/assets/img/meta/favicon-96x96.png" sizes="96x96">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="/assets/img/meta/ms-icon-70x70.png">
<meta name="msapplication-TileImage" content="/assets/img/meta/ms-icon-144x144.png">
<meta name="theme-color" content="#16161d">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:500" rel="stylesheet">
<link rel="stylesheet" href="/css/ionicons.min.css">
<link rel="stylesheet" href="/build/docssite.css">
<script src="/build/docssite.js"></script>
</head>
<body>
<ionicons-site></ionicons-site>
<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>
</body>
</html>
@@ -93,7 +93,7 @@ export class IoniconsSite {
componentProps={{'query': this.query, 'data': this.data}}>
</stencil-route>
<stencil-route url="/usage/:type?/:icon?"
<stencil-route url="/usage"
component="usage-page"
componentProps={{'data': this.data}}>
@@ -131,7 +131,7 @@ export class ToastBar {
<span class="confirmation"><i class="ion ion-md-checkmark"></i>Copied</span>
</div>
<stencil-route-link
url={`/usage/${iconType}/${ this.selectedIcon.name }`}
url={`/usage#${iconType}-${ this.selectedIcon.name }`}
onClick={() => this.toggleHeaderSearch.emit('hide')}>
Usage
<i class="ion ion-ios-arrow-forward"></i>
@@ -24,16 +24,19 @@ export class UsagePage {
@Prop() data: any;
componentWillLoad() {
if (!this.match.params.icon) return;
if(!window.location.hash) return;
let iconNames = [];
this.data.icons.map((o) =>{
iconNames = iconNames.concat(o.icons)
})
if (iconNames.includes(`${this.match.params.type}-${this.match.params.icon}`)) {
this.exampleType = this.match.params.type;
this.exampleIcon = this.match.params.icon;
const hash = window.location.hash.replace('#', '')
if (iconNames.includes(hash)) {
const splt = hash.split('-');
this.exampleType = splt[0];
this.exampleIcon = splt[1];
}
}
@@ -42,7 +45,7 @@ export class UsagePage {
// console.log('offset ', document.getElementById('basic-usage').offsetTop)
// });
if (this.match.params.icon) {
if (window.location.hash) {
setTimeout( () => {
const offset = document.getElementById('basic-usage').offsetTop - 100;
window.scrollTo({left: 0, top: offset, behavior: 'smooth'});
+1
View File
@@ -25,6 +25,7 @@ exports.config = {
{ src: '../../../dist/cheatsheet.html', dest: './cheatsheet.html' },
{ src: '../archived/v1/', dest: './v1/' },
{ src: '../archived/v2/', dest: './v2/' },
{ src: './index.html', dest: './usage/index.html' },
{ src: '../../../dist/ionicons/data.json', dest: './data.json' }
]
};