diff --git a/archived/v4/build/p-i2s3rn6x.entry.js b/archived/v4/build/p-i2s3rn6x.entry.js index a3ff42c..3cc77fe 100644 --- a/archived/v4/build/p-i2s3rn6x.entry.js +++ b/archived/v4/build/p-i2s3rn6x.entry.js @@ -1 +1 @@ -import{r as s,c as i,h as t,g as o}from"./p-5f00bf62.js";const a=class{constructor(t){s(this,t),this.hadIconOnce=!1,this.clearToast=i(this,"clearToast",7),this.toggleHeaderSearch=i(this,"toggleHeaderSearch",7)}handleCodeClick(s){const i=this.el.querySelector(".toast-bar__section:first-child"),t=document.createElement("textarea");t.value=``,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),this.showCopiedConfirm&&(window.clearTimeout(this.showCopiedConfirm),this.showCopiedConfirm=0),i.classList.add("copied"),this.showCopiedConfirm=window.setTimeout(()=>{i.classList.remove("copied"),this.showCopiedConfirm=0},1500)}componentDidLoad(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),!1),this.el.addEventListener("touchend",this.handleTouchEnd.bind(this),!1)}handleTouchStart(s){s.target.classList.contains("toast-bar--inner")&&(s.preventDefault(),this.touchStartY=s.changedTouches[0].screenY)}handleTouchEnd(s){s.target.classList.contains("toast-bar--inner")&&(s.preventDefault(),this.touchEndY=s.changedTouches[0].screenY,this.touchEndY>this.touchStartY&&this.clearToast.emit())}render(){let s,i,o,a=null;return this.selectedIcon&&(this.hadIconOnce||(this.hadIconOnce=!0),o=this.selectedIcon.name,"logo"===(i=this.selectedIcon.icons[0].startsWith("logo-")?"logo":this.selectedIconType)&&(o="logo-"+o),s=8*``.length+32,a=this.selectedIcon.icons.map(s=>{let i;switch(s.substr(0,s.indexOf("-"))){case"ios":i="iOS STYLE";break;case"md":i="MATERIAL STYLE";break;case"logo":i="LOGO"}return t("div",{class:"toast-bar__section"},t("div",{class:"toast-bar__section-header"},t("h6",null,i)),t("div",{class:"btn-group"},t("div",{class:"btn btn--gray btn--small btn--icon"},t("i",{class:"ion ion-"+s})),t("a",{class:"btn btn--gray btn--small",download:`/ionicons/svg/${s}.svg`,href:`/ionicons/svg/${s}.svg`},t("i",{class:"ion ion-md-download"}),"SVG")))})),t("div",{class:`toast-bar ${this.selectedIcon?"isVisible":""} ${!this.selectedIcon&&this.hadIconOnce?"isHidden":""} ${this.hadIconOnce?"":"preload"}`,onClick:s=>s.stopPropagation()},t("div",{class:"container"},t("div",{class:"toast-bar--inner"},this.selectedIcon&&t("h4",null,this.selectedIcon.name),this.selectedIcon&&t("div",{class:"toast-bar__details"},t("div",{class:"toast-bar__section",style:{maxWidth:s+"px"}},t("div",{class:"toast-bar__section-header"},t("div",null,t("h6",null,"Web component code"),t("span",{class:"confirmation"},t("i",{class:"ion ion-md-checkmark"}),"Copied")),t("stencil-route-link",{url:`/usage#${i}-${this.selectedIcon.name}`,onClick:()=>this.toggleHeaderSearch.emit("hide")},"Usage",t("i",{class:"ion ion-ios-arrow-forward"}))),t("code",null,t("span",{class:"hover-highlight",onClick:()=>this.handleCodeClick(o)},"<",t("span",{class:"yellow"},"ion-icon")," ",t("span",{class:"orange"},"name"),"=",t("span",{class:"green"},`"${o}"`),">",""))),a))))}get el(){return o(this)}static get style(){return"toast-bar .toast-bar{position:fixed;padding:12px 0;left:0;bottom:0;width:100%;-webkit-transform:translateY(100%);transform:translateY(100%)}toast-bar .toast-bar.isVisible{-webkit-animation-name:slideIn;animation-name:slideIn;-webkit-animation-duration:.6s;animation-duration:.6s;-webkit-animation-timing-function:var(--easeOutExpo);animation-timing-function:var(--easeOutExpo);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;opacity:1}\@-webkit-keyframes slideIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}\@keyframes slideIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}toast-bar .toast-bar.isHidden{-webkit-animation-name:slideOut;animation-name:slideOut;-webkit-animation-duration:.4s;animation-duration:.4s;-webkit-animation-timing-function:var(--easeOutExpo);animation-timing-function:var(--easeOutExpo);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}\@-webkit-keyframes slideOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:1}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}\@keyframes slideOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:1}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}toast-bar .toast-bar.preload{opacity:0}toast-bar .toast-bar--inner{background-color:var(--color-shark);height:80px;border-radius:15px;padding:0 20px 0 30px;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-shadow:0 16px 32px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.08);box-shadow:0 16px 32px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.08)}toast-bar .toast-bar--inner h4{color:#fff;margin:0;white-space:nowrap;margin-right:30px}toast-bar .toast-bar__details{-ms-flex:1 0 auto;flex:1 0 auto;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}toast-bar .toast-bar__section-header,toast-bar .toast-bar__section-header>div{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}toast-bar .toast-bar__section-header{height:10px;margin-bottom:7px}toast-bar .toast-bar__section-header h6{display:inline-block}toast-bar .toast-bar__section-header a{-webkit-transition:border .3s;transition:border .3s;color:var(--color-melrose);font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;text-decoration:none;border-bottom:1px solid transparent}toast-bar .toast-bar__section-header a:hover{border-bottom-color:var(--color-melrose-dark)}toast-bar .toast-bar__section-header i{margin-left:3px}toast-bar .toast-bar__section:not(:first-child){margin-left:20px}toast-bar .toast-bar__section:first-child{position:relative;max-width:none}toast-bar .toast-bar__details code{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:14px;line-height:14px;height:32px;padding:0 12px;cursor:text;overflow:hidden}\@supports (display:grid){toast-bar .toast-bar__section:not(:first-child){-ms-flex:0;flex:0}toast-bar .toast-bar__section:first-child{-ms-flex:1;flex:1}toast-bar .toast-bar__details code{overflow-x:auto}}toast-bar .toast-bar__details code>span{position:absolute;white-space:nowrap}toast-bar .toast-bar__section .confirmation{font-size:11px;font-family:Eina;font-weight:600;color:#aec6ff;display:-ms-flexbox;display:flex;opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px);margin-left:12px}toast-bar .toast-bar__section .confirmation .ion{color:#aec6ff;font-size:14px;margin-right:4px}toast-bar .toast-bar__section.copied .confirmation{-webkit-animation-name:slideInOut;animation-name:slideInOut;-webkit-animation-duration:1.5s;animation-duration:1.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}\@-webkit-keyframes slideInOut{0%{opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px)}10%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}90%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-5px);transform:translateY(-5px)}}\@keyframes slideInOut{0%{opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px)}10%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}90%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-5px);transform:translateY(-5px)}}toast-bar .toast-bar__details code:hover .hover-highlight{background-color:#5882b2}\@media screen and (max-width:768px){toast-bar .toast-bar__section:not(:first-child){display:none}}\@media screen and (max-width:540px){toast-bar .toast-bar--inner{padding:16px;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;height:auto}toast-bar .toast-bar--inner h4{margin:0 0 16px}toast-bar .toast-bar__section{max-width:100%!important}toast-bar .toast-bar__details{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}}"}};export{a as toast_bar}; \ No newline at end of file +import{r as s,c as i,h as t,g as o}from"./p-5f00bf62.js";const a=class{constructor(t){s(this,t),this.hadIconOnce=!1,this.clearToast=i(this,"clearToast",7),this.toggleHeaderSearch=i(this,"toggleHeaderSearch",7)}handleCodeClick(s){const i=this.el.querySelector(".toast-bar__section:first-child"),t=document.createElement("textarea");t.value=``,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),this.showCopiedConfirm&&(window.clearTimeout(this.showCopiedConfirm),this.showCopiedConfirm=0),i.classList.add("copied"),this.showCopiedConfirm=window.setTimeout(()=>{i.classList.remove("copied"),this.showCopiedConfirm=0},1500)}componentDidLoad(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),!1),this.el.addEventListener("touchend",this.handleTouchEnd.bind(this),!1)}handleTouchStart(s){s.target.classList.contains("toast-bar--inner")&&(s.preventDefault(),this.touchStartY=s.changedTouches[0].screenY)}handleTouchEnd(s){s.target.classList.contains("toast-bar--inner")&&(s.preventDefault(),this.touchEndY=s.changedTouches[0].screenY,this.touchEndY>this.touchStartY&&this.clearToast.emit())}render(){let s,i,o,a=null;return this.selectedIcon&&(this.hadIconOnce||(this.hadIconOnce=!0),o=this.selectedIcon.name,"logo"===(i=this.selectedIcon.icons[0].startsWith("logo-")?"logo":this.selectedIconType)&&(o="logo-"+o),s=8*``.length+32,a=this.selectedIcon.icons.map(s=>{let i;switch(s.substr(0,s.indexOf("-"))){case"ios":i="iOS STYLE";break;case"md":i="MATERIAL STYLE";break;case"logo":i="LOGO"}return t("div",{class:"toast-bar__section"},t("div",{class:"toast-bar__section-header"},t("h6",null,i)),t("div",{class:"btn-group"},t("div",{class:"btn btn--gray btn--small btn--icon"},t("i",{class:"ion ion-"+s})),t("a",{class:"btn btn--gray btn--small",download:`/v4/ionicons/svg/${s}.svg`,href:`/v4/ionicons/svg/${s}.svg`},t("i",{class:"ion ion-md-download"}),"SVG")))})),t("div",{class:`toast-bar ${this.selectedIcon?"isVisible":""} ${!this.selectedIcon&&this.hadIconOnce?"isHidden":""} ${this.hadIconOnce?"":"preload"}`,onClick:s=>s.stopPropagation()},t("div",{class:"container"},t("div",{class:"toast-bar--inner"},this.selectedIcon&&t("h4",null,this.selectedIcon.name),this.selectedIcon&&t("div",{class:"toast-bar__details"},t("div",{class:"toast-bar__section",style:{maxWidth:s+"px"}},t("div",{class:"toast-bar__section-header"},t("div",null,t("h6",null,"Web component code"),t("span",{class:"confirmation"},t("i",{class:"ion ion-md-checkmark"}),"Copied")),t("stencil-route-link",{url:`/usage#${i}-${this.selectedIcon.name}`,onClick:()=>this.toggleHeaderSearch.emit("hide")},"Usage",t("i",{class:"ion ion-ios-arrow-forward"}))),t("code",null,t("span",{class:"hover-highlight",onClick:()=>this.handleCodeClick(o)},"<",t("span",{class:"yellow"},"ion-icon")," ",t("span",{class:"orange"},"name"),"=",t("span",{class:"green"},`"${o}"`),">",""))),a))))}get el(){return o(this)}static get style(){return"toast-bar .toast-bar{position:fixed;padding:12px 0;left:0;bottom:0;width:100%;-webkit-transform:translateY(100%);transform:translateY(100%)}toast-bar .toast-bar.isVisible{-webkit-animation-name:slideIn;animation-name:slideIn;-webkit-animation-duration:.6s;animation-duration:.6s;-webkit-animation-timing-function:var(--easeOutExpo);animation-timing-function:var(--easeOutExpo);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;opacity:1}\@-webkit-keyframes slideIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}\@keyframes slideIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}toast-bar .toast-bar.isHidden{-webkit-animation-name:slideOut;animation-name:slideOut;-webkit-animation-duration:.4s;animation-duration:.4s;-webkit-animation-timing-function:var(--easeOutExpo);animation-timing-function:var(--easeOutExpo);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}\@-webkit-keyframes slideOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:1}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}\@keyframes slideOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:1}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}toast-bar .toast-bar.preload{opacity:0}toast-bar .toast-bar--inner{background-color:var(--color-shark);height:80px;border-radius:15px;padding:0 20px 0 30px;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-shadow:0 16px 32px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.08);box-shadow:0 16px 32px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.08)}toast-bar .toast-bar--inner h4{color:#fff;margin:0;white-space:nowrap;margin-right:30px}toast-bar .toast-bar__details{-ms-flex:1 0 auto;flex:1 0 auto;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}toast-bar .toast-bar__section-header,toast-bar .toast-bar__section-header>div{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}toast-bar .toast-bar__section-header{height:10px;margin-bottom:7px}toast-bar .toast-bar__section-header h6{display:inline-block}toast-bar .toast-bar__section-header a{-webkit-transition:border .3s;transition:border .3s;color:var(--color-melrose);font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;text-decoration:none;border-bottom:1px solid transparent}toast-bar .toast-bar__section-header a:hover{border-bottom-color:var(--color-melrose-dark)}toast-bar .toast-bar__section-header i{margin-left:3px}toast-bar .toast-bar__section:not(:first-child){margin-left:20px}toast-bar .toast-bar__section:first-child{position:relative;max-width:none}toast-bar .toast-bar__details code{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:14px;line-height:14px;height:32px;padding:0 12px;cursor:text;overflow:hidden}\@supports (display:grid){toast-bar .toast-bar__section:not(:first-child){-ms-flex:0;flex:0}toast-bar .toast-bar__section:first-child{-ms-flex:1;flex:1}toast-bar .toast-bar__details code{overflow-x:auto}}toast-bar .toast-bar__details code>span{position:absolute;white-space:nowrap}toast-bar .toast-bar__section .confirmation{font-size:11px;font-family:Eina;font-weight:600;color:#aec6ff;display:-ms-flexbox;display:flex;opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px);margin-left:12px}toast-bar .toast-bar__section .confirmation .ion{color:#aec6ff;font-size:14px;margin-right:4px}toast-bar .toast-bar__section.copied .confirmation{-webkit-animation-name:slideInOut;animation-name:slideInOut;-webkit-animation-duration:1.5s;animation-duration:1.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}\@-webkit-keyframes slideInOut{0%{opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px)}10%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}90%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-5px);transform:translateY(-5px)}}\@keyframes slideInOut{0%{opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px)}10%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}90%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-5px);transform:translateY(-5px)}}toast-bar .toast-bar__details code:hover .hover-highlight{background-color:#5882b2}\@media screen and (max-width:768px){toast-bar .toast-bar__section:not(:first-child){display:none}}\@media screen and (max-width:540px){toast-bar .toast-bar--inner{padding:16px;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;height:auto}toast-bar .toast-bar--inner h4{margin:0 0 16px}toast-bar .toast-bar__section{max-width:100%!important}toast-bar .toast-bar__details{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}}"}};export{a as toast_bar}; \ No newline at end of file diff --git a/docs/build/Button-36d57e33.js b/docs/build/Button-36d57e33.js new file mode 100644 index 0000000..05535e3 --- /dev/null +++ b/docs/build/Button-36d57e33.js @@ -0,0 +1,30 @@ +import { h } from './index-93b10a2a.js'; + +// Given a set of provided props and extra props, +// merge to two except for the class prop which is concated +const applyProps = (props, extra = {}) => { + const allKeys = new Set(Object.keys(props).concat(Object.keys(extra))); + return Array.from(allKeys).reduce((v, k) => { + if (k in extra) { + if (k === 'class') { + if (typeof extra[k] === 'string') { + v[k] = `${extra[k]} ${props[k] ? props[k] : ''}`; + } + else { + v[k] = Object.assign(Object.assign({}, props[k]), extra[k]); + } + } + else { + v[k] = extra[k]; + } + } + else if (k in props) { + v[k] = props[k]; + } + return v; + }, {}); +}; + +const Button = (props, children) => (h("button", Object.assign({}, applyProps(props, { class: 'ui-button' })), children)); + +export { Button as B, applyProps as a }; diff --git a/docs/build/_commonjsHelpers-8f072dc7.js b/docs/build/_commonjsHelpers-8f072dc7.js new file mode 100644 index 0000000..a80c915 --- /dev/null +++ b/docs/build/_commonjsHelpers-8f072dc7.js @@ -0,0 +1,25 @@ +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule(fn, basedir, module) { + return module = { + path: basedir, + exports: {}, + require: function (path, base) { + return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); + } + }, fn(module, module.exports), module.exports; +} + +function getCjsExportFromNamespace (n) { + return n && n['default'] || n; +} + +function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +} + +export { commonjsGlobal as a, createCommonjsModule as c, unwrapExports as u }; diff --git a/docs/build/active-router-4c192dee.js b/docs/build/active-router-4c192dee.js new file mode 100644 index 0000000..0846714 --- /dev/null +++ b/docs/build/active-router-4c192dee.js @@ -0,0 +1,73 @@ +import { h } from './index-93b10a2a.js'; + +const createProviderConsumer = (defaultState, consumerRender) => { + let listeners = new Map(); + let currentState = defaultState; + const updateListener = (fields, instance) => { + if (Array.isArray(fields)) { + [...fields].forEach(fieldName => { + instance[fieldName] = currentState[fieldName]; + }); + } + else { + instance[fields] = Object.assign({}, currentState); + } + }; + const subscribe = (instance, propList) => { + if (!listeners.has(instance)) { + listeners.set(instance, propList); + updateListener(propList, instance); + } + return () => { + if (listeners.has(instance)) { + listeners.delete(instance); + } + }; + }; + const Provider = ({ state }, children) => { + currentState = state; + listeners.forEach(updateListener); + return children; + }; + const Consumer = (props, children) => { + // The casting on subscribe is to allow for crossover through the stencil compiler + // In the future we should allow for generics in components. + return consumerRender(subscribe, children[0]); + }; + const injectProps = (Cstr, fieldList) => { + const CstrPrototype = Cstr.prototype; + const cstrConnectedCallback = CstrPrototype.connectedCallback; + const cstrDisconnectedCallback = CstrPrototype.disconnectedCallback; + CstrPrototype.connectedCallback = function () { + subscribe(this, fieldList); + if (cstrConnectedCallback) { + return cstrConnectedCallback.call(this); + } + }; + CstrPrototype.disconnectedCallback = function () { + listeners.delete(this); + if (cstrDisconnectedCallback) { + cstrDisconnectedCallback.call(this); + } + }; + }; + return { + Provider, + Consumer, + injectProps + }; +}; + +const ActiveRouter = createProviderConsumer({ + historyType: 'browser', + location: { + pathname: '', + query: {}, + key: '' + }, + titleSuffix: '', + root: '/', + routeViewsUpdated: () => { } +}, (subscribe, child) => (h("context-consumer", { subscribe: subscribe, renderer: child }))); + +export { ActiveRouter as A }; diff --git a/docs/build/announcement-bar.entry.js b/docs/build/announcement-bar.entry.js new file mode 100644 index 0000000..8fa6b78 --- /dev/null +++ b/docs/build/announcement-bar.entry.js @@ -0,0 +1,31 @@ +import { r as registerInstance, h } from './index-93b10a2a.js'; +import './_commonjsHelpers-8f072dc7.js'; +import './index-ff62d206.js'; +import './Button-36d57e33.js'; +import { R as ResponsiveContainer } from './index-5421a3d1.js'; +import { P as Prismic } from './prismic-javascript.min-e8451ed1.js'; +import { P as PrismicDom } from './prismic-dom.min-c7c2ccaa.js'; + +const announcementBarCss = "@charset \"UTF-8\";announcement-bar{background:#F8FAFC;box-shadow:0 1px 0px 0 rgba(0, 20, 56, 0.06);position:relative;z-index:999;padding:6px 0 7px;text-align:center;color:#73849A}announcement-bar .container{position:relative;font-size:11px;line-height:1.8em;font-weight:400;letter-spacing:-0.01em;display:flex;flex-wrap:wrap;justify-content:center;align-content:center}announcement-bar .container:before,announcement-bar .container:after{display:none}announcement-bar p{display:inline;margin:4px 0 0;color:#73849A}announcement-bar strong{font-weight:600;color:#020814}announcement-bar a{background-color:var(--color-dodger-blue);color:#fff;border-radius:16px;margin-left:12px;padding:6px 8px 5px;font-weight:600;font-size:9px;line-height:1em;text-decoration:none;text-transform:uppercase;vertical-align:0;white-space:pre;letter-spacing:0.02em;transition:0.2s background-color, 0.2s box-shadow}announcement-bar a::after{font-family:\"Ionicons\";content:\"\";margin-left:3px}announcement-bar a:hover{background-color:--color-dodger-blue-light;box-shadow:0 1px 2px rgba(0, 0, 0, 0.1)}@media (max-width: 768px){announcement-bar{display:none}}.announcement-bar--studio{background-color:#0B0C10;background-image:url(\"https://ionicframework.com/img/products/studio/preheader-bg-2.png\");background-repeat:no-repeat;background-size:1224px 49px;background-position:center;color:#B2BECD;padding:10px 0 12px}.announcement-bar--studio .container{font-size:13px}.announcement-bar--studio .container>div{display:flex;align-items:center;justify-content:center}.announcement-bar--studio .container>div::before{display:block;content:\"\";background-image:url(\"https://ionicframework.com/img/products/studio/studio-logo.svg\");width:78px;height:21px;margin-right:24px}.announcement-bar--studio .container p{margin-bottom:0;color:#b2becd}.announcement-bar--studio a{font-size:11px;padding:10px;margin-left:24px}.announcement-bar--studio a:hover{background-color:#5290ff}"; + +const AnnouncementBar = class { + constructor(hostRef) { + registerInstance(this, hostRef); + this.apiURL = 'https://ionicframeworkcom.prismic.io/api/v2'; + this.getLatest(); + } + async getLatest() { + const api = await Prismic.getApi(this.apiURL); + const single = await api.getSingle('ionicons_announcement_bar'); + // console.log(single) + this.data = single.data; + } + render() { + if (!this.data || Object.keys(this.data).length === 0) + return; + return (h("nav", { class: this.data.theme === 'Studio' ? 'announcement-bar--studio' : '' }, h(ResponsiveContainer, null, h("div", { innerHTML: PrismicDom.RichText.asHtml(this.data.text) }), h("a", { href: this.data.link.url, target: "_blank" }, this.data.button_text)))); + } +}; +AnnouncementBar.style = announcementBarCss; + +export { AnnouncementBar as announcement_bar }; diff --git a/docs/build/app-globals-e0181ab0.js b/docs/build/app-globals-e0181ab0.js new file mode 100644 index 0000000..8622a32 --- /dev/null +++ b/docs/build/app-globals-e0181ab0.js @@ -0,0 +1,150 @@ +import { B as BUILD, C as CSS, p as plt, w as win, a as promiseResolve, c as consoleDevInfo, H, d as doc, N as NAMESPACE } from './index-93b10a2a.js'; + +/* + Stencil Client Patch v1.17.4 | MIT Licensed | https://stenciljs.com + */ +const noop = () => { + /* noop*/ +}; +const IS_DENO_ENV = typeof Deno !== 'undefined'; +const IS_NODE_ENV = !IS_DENO_ENV && + typeof global !== 'undefined' && + typeof require === 'function' && + !!global.process && + typeof __filename === 'string' && + (!global.origin || typeof global.origin !== 'string'); +const IS_DENO_WINDOWS_ENV = IS_DENO_ENV && Deno.build.os === 'windows'; +const getCurrentDirectory = IS_NODE_ENV ? process.cwd : IS_DENO_ENV ? Deno.cwd : () => '/'; +const exit = IS_NODE_ENV ? process.exit : IS_DENO_ENV ? Deno.exit : noop; +const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`; +const patchEsm = () => { + // NOTE!! This fn cannot use async/await! + // @ts-ignore + if (BUILD.cssVarShim && !(CSS && CSS.supports && CSS.supports('color', 'var(--c)'))) { + // @ts-ignore + return __sc_import_ionicons_site(/* webpackChunkName: "polyfills-css-shim" */ './css-shim-5ce2b5c4.js').then(() => { + if ((plt.$cssShim$ = win.__cssshim)) { + return plt.$cssShim$.i(); + } + else { + // for better minification + return 0; + } + }); + } + return promiseResolve(); +}; +const patchBrowser = () => { + // NOTE!! This fn cannot use async/await! + if (BUILD.isDev && !BUILD.isTesting) { + consoleDevInfo('Running in development mode.'); + } + if (BUILD.cssVarShim) { + // shim css vars + plt.$cssShim$ = win.__cssshim; + } + if (BUILD.cloneNodeFix) { + // opted-in to polyfill cloneNode() for slot polyfilled components + patchCloneNodeFix(H.prototype); + } + if (BUILD.profile && !performance.mark) { + // not all browsers support performance.mark/measure (Safari 10) + performance.mark = performance.measure = () => { + /*noop*/ + }; + performance.getEntriesByName = () => []; + } + // @ts-ignore + const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim + ? Array.from(doc.querySelectorAll('script')).find(s => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) || s.getAttribute('data-stencil-namespace') === NAMESPACE) + : null; + const importMeta = ""; + const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {}; + if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) { + // Safari < v11 support: This IF is true if it's Safari below v11. + // This fn cannot use async/await since Safari didn't support it until v11, + // however, Safari 10 did support modules. Safari 10 also didn't support "nomodule", + // so both the ESM file and nomodule file would get downloaded. Only Safari + // has 'onbeforeload' in the script, and "history.scrollRestoration" was added + // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue. + // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds. + return { + then() { + /* promise noop */ + }, + }; + } + if (!BUILD.safari10 && importMeta !== '') { + opts.resourcesUrl = new URL('.', importMeta).href; + } + else if (BUILD.dynamicImportShim || BUILD.safari10) { + opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href; + if (BUILD.dynamicImportShim) { + patchDynamicImport(opts.resourcesUrl, scriptElm); + } + if (BUILD.dynamicImportShim && !win.customElements) { + // module support, but no custom elements support (Old Edge) + // @ts-ignore + return __sc_import_ionicons_site(/* webpackChunkName: "polyfills-dom" */ './dom-91ed8d21.js').then(() => opts); + } + } + return promiseResolve(opts); +}; +const patchDynamicImport = (base, orgScriptElm) => { + const importFunctionName = getDynamicImportFunction(NAMESPACE); + try { + // test if this browser supports dynamic imports + // There is a caching issue in V8, that breaks using import() in Function + // By generating a random string, we can workaround it + // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info + win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`); + } + catch (e) { + // this shim is specifically for browsers that do support "esm" imports + // however, they do NOT support "dynamic" imports + // basically this code is for old Edge, v18 and below + const moduleMap = new Map(); + win[importFunctionName] = (src) => { + const url = new URL(src, base).href; + let mod = moduleMap.get(url); + if (!mod) { + const script = doc.createElement('script'); + script.type = 'module'; + script.crossOrigin = orgScriptElm.crossOrigin; + script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], { type: 'application/javascript' })); + mod = new Promise(resolve => { + script.onload = () => { + resolve(win[importFunctionName].m); + script.remove(); + }; + }); + moduleMap.set(url, mod); + doc.head.appendChild(script); + } + return mod; + }; + } +}; +const patchCloneNodeFix = (HTMLElementPrototype) => { + const nativeCloneNodeFn = HTMLElementPrototype.cloneNode; + HTMLElementPrototype.cloneNode = function (deep) { + if (this.nodeName === 'TEMPLATE') { + return nativeCloneNodeFn.call(this, deep); + } + const clonedNode = nativeCloneNodeFn.call(this, false); + const srcChildNodes = this.childNodes; + if (deep) { + for (let i = 0; i < srcChildNodes.length; i++) { + // Node.ATTRIBUTE_NODE === 2, and checking because IE11 + if (srcChildNodes[i].nodeType !== 2) { + clonedNode.appendChild(srcChildNodes[i].cloneNode(true)); + } + } + } + return clonedNode; + }; +}; + +const globalScripts = () => {}; + +export { patchEsm as a, globalScripts as g, patchBrowser as p }; diff --git a/docs/build/context-consumer.entry.js b/docs/build/context-consumer.entry.js new file mode 100644 index 0000000..753fe9b --- /dev/null +++ b/docs/build/context-consumer.entry.js @@ -0,0 +1,25 @@ +import { r as registerInstance, i as getElement } from './index-93b10a2a.js'; + +const ContextConsumer = class { + constructor(hostRef) { + registerInstance(this, hostRef); + this.context = {}; + this.renderer = () => null; + } + connectedCallback() { + if (this.subscribe != null) { + this.unsubscribe = this.subscribe(this.el, 'context'); + } + } + disconnectedCallback() { + if (this.unsubscribe != null) { + this.unsubscribe(); + } + } + render() { + return this.renderer(Object.assign({}, this.context)); + } + get el() { return getElement(this); } +}; + +export { ContextConsumer as context_consumer }; diff --git a/docs/build/css-shim-5ce2b5c4.js b/docs/build/css-shim-5ce2b5c4.js new file mode 100644 index 0000000..7e231d0 --- /dev/null +++ b/docs/build/css-shim-5ce2b5c4.js @@ -0,0 +1,4 @@ +/* + Stencil Client Patch v1.17.4 | MIT Licensed | https://stenciljs.com + */ +var StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return Object.assign(Object.assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return Object.assign(Object.assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t=s.scopeId+"-"+this.count,o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window); diff --git a/docs/build/disqus-comments.entry.js b/docs/build/disqus-comments.entry.js new file mode 100644 index 0000000..2ba61d2 --- /dev/null +++ b/docs/build/disqus-comments.entry.js @@ -0,0 +1,49 @@ +import { r as registerInstance, h, j as Host } from './index-93b10a2a.js'; + +const disqusCommentsCss = ":host{display:block}"; + +const DisqusComments = class { + constructor(hostRef) { + registerInstance(this, hostRef); + this.setScriptEl = (el) => { + this.targetEl = el; + }; + } + componentDidLoad() { + var _a; + const script = ` + var disqus_config = function () { + this.page.url = '${this.url}'; // Replace PAGE_URL with your page's canonical URL variable + this.page.identifier = '${this.siteId}'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable + }; + + (function() { + var d = document, s = d.createElement('script'); + s.src = 'https://${this.siteId}.disqus.com/embed.js'; + s.setAttribute('data-timestamp', +new Date()); + (d.head || d.body).appendChild(s); + })(); + `; + this.scriptEl = document.createElement('script'); + this.scriptEl.type = 'text/javascript'; + this.scriptEl.innerHTML = script; + (_a = this.targetEl) === null || _a === void 0 ? void 0 : _a.appendChild(this.scriptEl); + const disqusScript = document.createElement('script'); + disqusScript.id = 'dsq-count-scr'; + disqusScript.async = true; + disqusScript.src = `//${this.siteId}.disqus.com/count.js`; + this.disqusScriptEl = disqusScript; + document.body.appendChild(disqusScript); + } + componentDidUnload() { + var _a, _b, _c, _d; + (_b = (_a = this.scriptEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.scriptEl); + (_d = (_c = this.disqusScriptEl) === null || _c === void 0 ? void 0 : _c.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.disqusScriptEl); + } + render() { + return (h(Host, null, h("div", { id: "disqus_thread" }), h("div", { ref: (e) => this.setScriptEl(e) }), h("noscript", null, "Please enable JavaScript to view the", ' ', h("a", { href: "https://disqus.com/?ref_noscript" }, "comments powered by Disqus.")))); + } +}; +DisqusComments.style = disqusCommentsCss; + +export { DisqusComments as disqus_comments }; diff --git a/docs/build/dom-91ed8d21.js b/docs/build/dom-91ed8d21.js new file mode 100644 index 0000000..7c2772b --- /dev/null +++ b/docs/build/dom-91ed8d21.js @@ -0,0 +1,73 @@ +/* + Stencil Client Patch v1.17.4 | MIT Licensed | https://stenciljs.com + */ +(function(){ +var aa=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function g(a){var b=aa.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return !b&&a}function l(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return !(!a||!(a.__CE_isImportDocument||a instanceof Document))} + function n(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null} + function p(a,b,d){d=void 0===d?new Set:d;for(var c=a;c;){if(c.nodeType===Node.ELEMENT_NODE){var e=c;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){c=e.import;if(c instanceof Node&&!d.has(c))for(d.add(c),c=c.firstChild;c;c=c.nextSibling)p(c,b,d);c=n(a,e);continue}else if("template"===f){c=n(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)p(e,b,d);}c=c.firstChild?c.firstChild:n(a,c);}}function r(a,b,d){a[b]=d;}function u(){this.a=new Map;this.g=new Map;this.c=[];this.f=[];this.b=!1;}function ba(a,b,d){a.a.set(b,d);a.g.set(d.constructorFunction,d);}function ca(a,b){a.b=!0;a.c.push(b);}function da(a,b){a.b=!0;a.f.push(b);}function v(a,b){a.b&&p(b,function(b){return w(a,b)});}function w(a,b){if(a.b&&!b.__CE_patched){b.__CE_patched=!0;for(var d=0;d0?e.setAttribute("class",t.join(" ")):e.removeAttribute("class");}return ""===t[0]&&t.splice(0,1),t.toggle=function(e,i){void 0!==i?i?t.add(e):t.remove(e):-1!==t.indexOf(e)?t.splice(t.indexOf(e),1):t.push(e),n();},t.add=function(){for(var e=[].slice.call(arguments),i=0,s=e.length;i (callback(win.confirm(message))); +const isModifiedEvent = (ev) => (ev.metaKey || ev.altKey || ev.ctrlKey || ev.shiftKey); +/** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 + */ +const supportsHistory = (win) => { + const ua = win.navigator.userAgent; + if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && + ua.indexOf('Mobile Safari') !== -1 && + ua.indexOf('Chrome') === -1 && + ua.indexOf('Windows Phone') === -1) { + return false; + } + return win.history && 'pushState' in win.history; +}; +/** + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. + */ +const supportsPopStateOnHashChange = (nav) => (nav.userAgent.indexOf('Trident') === -1); +/** + * Returns false if using go(n) with hash history causes a full page reload. + */ +const supportsGoWithoutReloadUsingHash = (nav) => (nav.userAgent.indexOf('Firefox') === -1); +const isExtraneousPopstateEvent = (nav, event) => (event.state === undefined && + nav.userAgent.indexOf('CriOS') === -1); +const storageAvailable = (win, type) => { + const storage = win[type]; + const x = '__storage_test__'; + try { + storage.setItem(x, x); + storage.removeItem(x); + return true; + } + catch (e) { + return e instanceof DOMException && ( + // everything except Firefox + e.code === 22 || + // Firefox + e.code === 1014 || + // test name field too, because code might not be present + // everything except Firefox + e.name === 'QuotaExceededError' || + // Firefox + e.name === 'NS_ERROR_DOM_QUOTA_REACHED') && + // acknowledge QuotaExceededError only if there's something already stored + storage.length !== 0; + } +}; + +export { supportsHistory as a, supportsPopStateOnHashChange as b, supportsGoWithoutReloadUsingHash as c, isModifiedEvent as d, getConfirmation as g, isExtraneousPopstateEvent as i, storageAvailable as s }; diff --git a/docs/build/footer-bar.entry.js b/docs/build/footer-bar.entry.js new file mode 100644 index 0000000..a2a75d3 --- /dev/null +++ b/docs/build/footer-bar.entry.js @@ -0,0 +1,20 @@ +import { r as registerInstance, h } from './index-93b10a2a.js'; +import './_commonjsHelpers-8f072dc7.js'; +import './index-ff62d206.js'; +import './Button-36d57e33.js'; +import { R as ResponsiveContainer } from './index-5421a3d1.js'; + +const footerBarCss = "footer-bar footer{width:100%;background:var(--color-white-lilac);flex:0 0 8em;}footer-bar .ui-container{display:flex;justify-content:space-between;align-items:center;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{transition:color 0.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 .ui-container{flex-direction:column-reverse;text-align:center}footer-bar .footer-menu{margin-bottom:36px}}"; + +const FooterBar = class { + constructor(hostRef) { + registerInstance(this, hostRef); + } + render() { + const cheatsheetUrl = `https://unpkg.com/ionicons@${this.version}/dist/cheatsheet.html`; + return (h("footer", null, h(ResponsiveContainer, null, 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: cheatsheetUrl, target: "_blank", rel: "noopener noreferrer" }, "Cheatsheet"), h("a", { href: "https://github.com/ionic-team/ionicons/releases", target: "_blank", rel: "noopener noreferrer" }, "Release Notes"), h("a", { href: "/v1" }, "v1"), h("a", { href: "/v2" }, "v2"), h("a", { href: "https://ionicframework.com/docs/v3/ionicons/" }, "v3"), h("a", { href: "/v4/" }, "v4"), h("a", { href: "https://ionicframework.com/" }, "Ionic Framework"))))); + } +}; +FooterBar.style = footerBarCss; + +export { FooterBar as footer_bar }; diff --git a/docs/build/header-bar.entry.js b/docs/build/header-bar.entry.js new file mode 100644 index 0000000..6b7e3a7 --- /dev/null +++ b/docs/build/header-bar.entry.js @@ -0,0 +1,67 @@ +import { r as registerInstance, k as createEvent, h, i as getElement } from './index-93b10a2a.js'; +import './_commonjsHelpers-8f072dc7.js'; +import './index-ff62d206.js'; +import './Button-36d57e33.js'; +import { R as ResponsiveContainer } from './index-5421a3d1.js'; + +const headerBarCss = "header-bar{display:block;position:sticky;top:0;z-index:999}header-bar header{transition:border 0.6s;width:100%;left:0;right:0;background:#fff;border-bottom:1px solid transparent;height:64px}header-bar header.overlay{border-bottom:1px solid rgba(0, 0, 0, 0.05)}header-bar .ui-container,header-bar .logo,header-bar .logo a,header-bar nav{display:flex;align-items:center}header-bar .logo,header-bar nav{flex:0 0 auto}header-bar nav{align-items:baseline}header-bar icon-search{transition:opacity 0.5s;flex:1;padding-left:60px;padding-right:60px;opacity:0;pointer-events:none}header-bar .visible-search icon-search{opacity:1;pointer-events:auto}header-bar .ui-container{justify-content:space-between;padding-top:12px;padding-bottom:12px}header-bar .logo a{font-weight:700;font-size:16px;color:var(--color-shark)}header-bar .logo svg{margin-right:10px}header-bar .logo .version{margin-left:10px;font-size:10px;font-weight:600;color:var(--color-oslo-gray);background-color:var(--color-catskill-white);border-radius:4px;padding:1px 5px;position:relative;top:2px}header-bar a{text-decoration:none}header-bar nav+.btn,header-bar .nav__item+.nav__item{margin-left:30px}header-bar .nav__item{font-size:13px;font-weight:600}header-bar .nav__item,header-bar .nav__item a{transition:color 0.3s;color:var(--color-pale-sky)}header-bar .nav__item:hover,header-bar .nav__item a:not(.link-active):hover{color:var(--color-shark)}header-bar .nav__item .link-active{color:var(--color-heather);cursor:default}header-bar .nav__item svg{margin-left:6px}header-bar .nav__item svg #arrow{transition:0.2s transform}header-bar .nav__item:hover svg #arrow{transform:translate(1px, -1px)}header-bar .btn svg{margin-right:6px}header-bar .btn:hover svg #arrow{transform:translate(0, 1px)}header-bar .more{padding:0 8px;font-size:28px;line-height:28px;color:var(--color-dodger-blue);cursor:pointer;display:none}header-bar nav span.close{display:none;font-size:28px}@media screen and (max-width: 992px){header-bar nav>*+*{margin-left:18px}header-bar icon-search{padding-left:30px;padding-right:30px}}@media screen and (max-width: 768px){header-bar .btn.sm-hide{display:none}header-bar .more,header-bar .close{cursor:pointer}header-bar .more{display:block}header-bar nav+.btn,header-bar .nav__item+.nav__item{margin-left:0;margin-top:30px}header-bar nav{transition:opacity 0.3s;position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:99999;background-image:linear-gradient(-223deg, #363e49 0%, #1c1e21 100%);display:flex;flex-direction:column;justify-content:center;align-items:center;opacity:0;display:none}header-bar nav .close{margin:0;position:absolute;top:14px;right:18px;color:#fff;cursor:pointer}header-bar .nav__item{transition:transform 0.4s;transform:translateY(8px)}header-bar .nav__item,header-bar .nav__item a{font-size:28px;color:rgba(255, 255, 255, 0.9)}header-bar .nav__item .link-active{color:rgba(255, 255, 255, 0.3)}header-bar .nav__item:hover,header-bar .nav__item a:not(.link-active):hover{color:rgba(255, 255, 255, 0.9)}header-bar .nav__item svg #bg{opacity:0.2}header-bar nav.show-mobile-menu{opacity:1}header-bar nav.show-mobile-menu .nav__item{transform:translateY(0)}header-bar nav.show-mobile-menu .close{display:block}header-bar icon-search{padding-left:20px;padding-right:15px}}@media screen and (max-width: 520px){header-bar .version{display:none}}"; + +const HeaderBar = class { + constructor(hostRef) { + registerInstance(this, hostRef); + this.toggleHeaderSearch = createEvent(this, "toggleHeaderSearch", 7); + this.isSticky = false; + this.query = ''; + this.isSearchVisible = false; + } + handleScroll() { + requestAnimationFrame(this.checkScroll.bind(this)); + } + handleResize() { + requestAnimationFrame(() => { + if (window.innerWidth > 768) { + const menu = this.el.querySelector('nav'); + menu.style.display = ''; + this.el.classList.remove('show-mobile-menu'); + document.body.classList.remove('no-scroll'); + this.isMobileMenuShown = false; + } + }); + } + checkScroll() { + const scrollTop = document.documentElement.scrollTop || document.body.scrollTop; + this.isSticky = (scrollTop > 30); + } + showNav() { + if (this.isMobileMenuShown) + return; + this.isMobileMenuShown = true; + const menu = this.el.querySelector('nav'); + menu.style.display = 'flex'; + setTimeout(() => { + menu.classList.add('show-mobile-menu'); + document.body.classList.add('no-scroll'); + }, 1); + } + hideNav() { + if (!this.isMobileMenuShown) + return; + this.isMobileMenuShown = false; + const menu = this.el.querySelector('nav'); + menu.classList.remove('show-mobile-menu'); + setTimeout(() => { + menu.style.display = 'none'; + document.body.classList.remove('no-scroll'); + }, 300); + } + render() { + return (h("header", { class: `${this.isSearchVisible ? 'visible-search' : ''} ${this.isSticky ? 'overlay' : ''}` }, h(ResponsiveContainer, null, h("div", { class: "logo" }, h("stencil-route-link", { url: "/", exact: true }, h("svg", { width: "117", height: "32", viewBox: "0 0 117 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M42.2832 11.6686C43.3555 11.6686 44.1276 10.9177 44.1276 9.84502C44.1276 8.77233 43.3555 8 42.2832 8C41.2108 8 40.4387 8.77233 40.4387 9.84502C40.4387 10.9177 41.2108 11.6686 42.2832 11.6686ZM40.7604 23.7427H43.8059V12.5009H40.7604V23.7427Z", fill: "#03060B" }), h("path", { d: "M60.2522 12.5009H57.4427V23.7427H60.4882V17.3065C60.4882 15.8048 61.3031 14.8608 62.783 14.8608C64.1341 14.8608 64.6918 15.7619 64.6918 17.0705V23.7427H67.7372V16.7273C67.7372 14.0456 66.3003 12.2435 63.598 12.2435C61.9251 12.2435 60.767 12.9085 60.2522 13.8739V12.5009Z", fill: "#03060B" }), h("path", { d: "M70.2976 11.6687C71.37 11.6687 72.142 10.9178 72.142 9.84512C72.142 8.77244 71.37 8.0001 70.2976 8.0001C69.2253 8.0001 68.4532 8.77244 68.4532 9.84512C68.4532 10.9178 69.2253 11.6687 70.2976 11.6687ZM68.7749 23.7427H71.8204V12.5009H68.7749V23.7427Z", fill: "#03060B" }), h("path", { d: "M72.7047 18.1218C72.7047 21.4686 75.0854 24.0001 78.3453 24.0001C81.8412 24.0001 83.4926 21.5329 83.707 19.6235H80.5758C80.3399 20.589 79.4391 21.2969 78.3239 21.2969C76.6939 21.2969 75.7502 20.0097 75.7502 18.1218C75.7502 16.2339 76.6939 14.9466 78.3239 14.9466C79.4391 14.9466 80.3399 15.6546 80.5758 16.62H83.707C83.4926 14.7106 81.8412 12.2435 78.3453 12.2435C75.0854 12.2435 72.7047 14.775 72.7047 18.1218Z", fill: "#03060B" }), h("path", { d: "M99.268 12.5009H96.4585V23.7427H99.5039V17.3065C99.5039 15.8048 100.319 14.8608 101.799 14.8608C103.15 14.8608 103.708 15.7619 103.708 17.0705V23.7427H106.753V16.7273C106.753 14.0456 105.316 12.2435 102.614 12.2435C100.941 12.2435 99.7827 12.9085 99.268 13.8739V12.5009Z", fill: "#03060B" }), h("path", { d: "M112.177 24.0001C115.223 24.0001 116.939 22.4125 116.939 20.3959C116.939 15.7833 110.719 17.6712 110.719 15.7833C110.719 15.1612 111.277 14.6892 112.263 14.6892C113.357 14.6892 113.893 15.3328 113.958 16.0408H116.896C116.81 14.3888 115.652 12.2435 112.285 12.2435C109.518 12.2435 107.781 13.9168 107.781 15.955C107.781 20.4173 114.022 18.6367 114.022 20.5246C114.022 21.1468 113.421 21.5544 112.263 21.5544C110.998 21.5544 110.44 20.8464 110.397 20.0955H107.309C107.459 22.198 108.66 24.0001 112.177 24.0001Z", fill: "#03060B" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M50.6194 21.1354C52.2808 21.1354 53.6277 19.7885 53.6277 18.1271C53.6277 16.4656 52.2808 15.1188 50.6194 15.1188C48.958 15.1188 47.6111 16.4656 47.6111 18.1271C47.6111 19.7885 48.958 21.1354 50.6194 21.1354ZM50.6194 24.0001C53.863 24.0001 56.4925 21.3707 56.4925 18.1271C56.4925 14.8835 53.863 12.254 50.6194 12.254C47.3758 12.254 44.7463 14.8835 44.7463 18.1271C44.7463 21.3707 47.3758 24.0001 50.6194 24.0001Z", fill: "#03060B" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M89.8251 21.1354C91.4866 21.1354 92.8334 19.7885 92.8334 18.1271C92.8334 16.4656 91.4866 15.1188 89.8251 15.1188C88.1637 15.1188 86.8168 16.4656 86.8168 18.1271C86.8168 19.7885 88.1637 21.1354 89.8251 21.1354ZM89.8251 24.0001C93.0687 24.0001 95.6982 21.3707 95.6982 18.1271C95.6982 14.8835 93.0687 12.254 89.8251 12.254C86.5815 12.254 83.9521 14.8835 83.9521 18.1271C83.9521 21.3707 86.5815 24.0001 89.8251 24.0001Z", fill: "#03060B" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16 3.5C9.09644 3.5 3.5 9.09644 3.5 16C3.5 22.9036 9.09644 28.5 16 28.5C22.9036 28.5 28.5 22.9036 28.5 16C28.5 15.0785 28.4005 14.182 28.2123 13.32L31.1433 12.68C31.3771 13.7509 31.5 14.862 31.5 16C31.5 24.5604 24.5604 31.5 16 31.5C7.43959 31.5 0.5 24.5604 0.5 16C0.5 7.43959 7.43959 0.5 16 0.5C19.793 0.5 23.2712 1.86431 25.9649 4.12727L24.0351 6.42427C21.8618 4.59841 19.0611 3.5 16 3.5Z", fill: "#3880FF" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M27 4.66664C25.7114 4.66664 24.6667 5.71131 24.6667 6.99998C24.6667 8.28864 25.7114 9.33331 27 9.33331C28.2887 9.33331 29.3334 8.28864 29.3334 6.99998C29.3334 5.71131 28.2887 4.66664 27 4.66664ZM24 7.49998C24 3.63398 23.134 5 27 5C30.866 5 34 3.13398 34 6.99998C34 10.866 30.866 14 27 14C23.134 14 24 11.366 24 7.49998Z", fill: "white" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M27 5.5C26.1716 5.5 25.5 6.17157 25.5 7C25.5 7.82843 26.1716 8.5 27 8.5C27.8284 8.5 28.5 7.82843 28.5 7C28.5 6.17157 27.8284 5.5 27 5.5ZM22.5 7C22.5 4.51472 24.5147 2.5 27 2.5C29.4853 2.5 31.5 4.51472 31.5 7C31.5 9.48528 29.4853 11.5 27 11.5C24.5147 11.5 22.5 9.48528 22.5 7Z", fill: "#194BFD" }), h("circle", { cx: "16", cy: "16", r: "6", stroke: "#0CADFF", "stroke-width": "3" }))), h("span", { class: "version" }, this.version)), h("icon-search", { query: this.query, size: "small" }), h("nav", null, h("stencil-route-link", { class: "nav__item", url: "/", exact: true, onClick: this.hideNav.bind(this) }, "Icons"), h("stencil-route-link", { class: "nav__item", url: "/usage", onClick: () => { + this.toggleHeaderSearch.emit('hide'); + this.hideNav(); + } }, "Usage"), h("a", { class: "nav__item", href: "https://github.com/ionic-team/ionicons" }, "GitHub", h("svg", { width: "12px", height: "12px", viewBox: "0 0 12 12", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, h("g", { transform: "translate(0,1)" }, h("rect", { id: "bg", fill: "#e3e8f1", x: "0", y: "2", width: "9", height: "9", rx: "1.5" }), h("path", { d: "M9.18198052,1 L6.5,1 L6.5,0 L11,0 L11,1 L11,4.5 L10,4.5 L10,1.59619408 L4.02512627,7.57106781 L3.31801948,6.86396103 L9.18198052,1 Z", id: "arrow", fill: "#A4AEC3" })))), h("span", { class: "close", onClick: this.hideNav.bind(this) }, h("i", { class: "ion ion-md-close" }))), h("a", { class: "btn sm-hide download-link", href: "/ionicons.designerpack.zip", download: `ionicons-${this.version}.designerpack.zip` }, h("svg", { width: "9px", height: "11px", viewBox: "0 0 9 11", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, h("g", null, h("rect", { id: "bg", fill: "#BAC3D1", x: "0", y: "9", width: "9", height: "2", rx: "1" }), h("path", { d: "M5,6.26776695 L7.26776695,4 L7.97487373,4.70710678 L4.70710678,7.97487373 L4.48743687,7.75520382 L4.26776695,7.97487373 L1,4.70710678 L1.70710678,4 L4,6.29289322 L4,0 L5,0 L5,6.26776695 Z", id: "arrow", fill: "#94A0B8" }))), "Designer pack"), h("span", { class: "more", onClick: this.showNav.bind(this) }, h("i", { class: "ion ion-md-more" }))))); + } + get el() { return getElement(this); } +}; +HeaderBar.style = headerBarCss; + +export { HeaderBar as header_bar }; diff --git a/docs/build/icon-list.entry.js b/docs/build/icon-list.entry.js new file mode 100644 index 0000000..7c7abd7 --- /dev/null +++ b/docs/build/icon-list.entry.js @@ -0,0 +1,104 @@ +import { r as registerInstance, h, i as getElement } from './index-93b10a2a.js'; + +const iconListCss = "icon-list .icon-list{margin-bottom:100px}icon-list .icon-list__search+.icon-list__wrapper{padding-top:90px}icon-list .icon-list__header-bar{transition:box-shadow 0.6s;margin-bottom:14px;height:52px;background-color:#fff;box-shadow:0;z-index:99}icon-list .icon-list__header-bar.sticky{position:sticky;top:58px;box-shadow:0px 2px 4px 0px rgba(0, 0, 0, 0.06)}icon-list .icon-list__header-bar .container--small{display:flex;justify-content:space-between}icon-list .icon-list__header-bar h4{margin-top:21px;margin-bottom:0}icon-list .icon-results{display:grid;grid-template-columns:repeat(auto-fill, minmax(70px, 1fr));grid-auto-rows:minmax(70px, auto);grid-gap:0.5em;padding-bottom:60px;margin-left:-20px;margin-right:-20px}icon-list .icon-results__cell,icon-list .icon-results .ion{display:inline-flex;align-items:center;justify-content:center}icon-list .icon-results__cell{transition:background-color 0.4s;cursor:pointer;border-radius:8px;border:2px solid transparent;box-sizing:border-box;-webkit-tap-highlight-color:rgba(236, 240, 246, 0.4)}icon-list .icon-results__cell svg{width:32px;height:32px;color:#373737}icon-list .icon-results__cell:not(.active).mouseOver{animation-name:shadowIn;animation-duration:0.3s;animation-fill-mode:forwards}@keyframes shadowIn{from{box-shadow:0}to{box-shadow:0px 3px 6px 0px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.08)}}icon-list .icon-results__cell:not(.active).mouseOff,icon-list .icon-results__cell.active{animation-name:shadowOut;animation-duration:0.6s;animation-fill-mode:forwards}icon-list .icon-results__cell.active{animation-duration:0.3s}@keyframes shadowOut{from{box-shadow:0px 3px 6px 0px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.08)}to{box-shadow:0}}icon-list .icon-results__cell.active{background-color:var(--color-catskill-white);cursor:default}icon-list .icon-results--empty{text-align:center;padding-top:70px}icon-list .icon-results--empty h2{margin-top:0}icon-list .toggle{list-style-type:none;display:flex;margin-right:-4px;position:relative;bottom:-3px;margin-top:18px}icon-list .toggle__item{transition:opacity 0.3s, padding-bottom 0.1s;opacity:0.5;text-decoration:none;font-size:13px;font-weight:600;color:var(--color-dodger-blue);border-bottom:2px solid transparent}icon-list .toggle__item:not(.active){cursor:pointer}icon-list .toggle__item:hover,icon-list .toggle__item.active{opacity:1}icon-list .toggle__item.active{border-bottom:2px solid var(--color-dodger-blue);padding-bottom:2px}icon-list .toggle__item+.toggle__item{margin-left:20px}icon-list .icon-list__header-bar.sticky .toggle__item{padding-bottom:11px}@media screen and (max-width: 768px){icon-list .icon-results{margin-left:0;margin-right:0}icon-list .icon-list__search+.icon-list__wrapper{padding-top:40px}}@media screen and (max-width: 560px){icon-list .icon-results__cell:not(.active).mouseOver,icon-list .icon-results__cell:not(.active).mouseOff,icon-list .icon-results__cell.active{animation-name:none;box-shadow:0}}"; + +const LandingPage = class { + constructor(hostRef) { + registerInstance(this, hostRef); + this.selectedIcon = ''; + this.selectedIconType = 'outline'; + this.isHeaderSearchVisible = false; + this.query = ''; + } + escListener(ev) { + if (ev.code === 'Escape' && this.selectedIcon.length) + this.selectedIcon = ''; + } + handleBodyClicked() { + if (this.selectedIcon.length) + this.selectedIcon = ''; + } + handleClearToast() { + this.selectedIcon = ''; + } + handleScroll() { + requestAnimationFrame(this.checkScroll.bind(this)); + } + checkScroll() { + const headerBars = this.el.querySelectorAll('.icon-list__header-bar'); + for (let i = 0; i < headerBars.length; i++) { + const bar = headerBars[i]; + if (bar.getBoundingClientRect().top < 67) { + bar.classList.add('sticky'); + } + else { + bar.classList.remove('sticky'); + } + } + } + filterIcons() { + const search = this.query.trim().toLowerCase(); + const results = { + icon: [], + logo: [] + }; + this.data.icons.forEach((iconData) => { + if (search === '' || iconData.tags.some((t) => t.indexOf(search) > -1)) { + const iconType = iconData.name.substr(0, iconData.name.indexOf('-')); + switch (iconType) { + case 'logo': + results['logo'].push({ name: iconData.name }); + break; + default: + results['icon'].push({ name: iconData.name }); + return; + } + } + }); + return results; + } + handleIconMouseEnter(ev) { + ev.target.classList.remove('mouseOff'); + ev.target.classList.add('mouseOver'); + } + handleIconMouseLeave(ev) { + ev.target.classList.remove('mouseOver'); + ev.target.classList.add('mouseOff'); + } + handleIconClick(ev, name) { + ev.stopPropagation(); + this.selectedIcon = name; + } + handleToggleClick(ev, type) { + ev.stopPropagation(); + this.selectedIconType = type; + } + render() { + const results = this.filterIcons(); + const selectedIcon = this.data.icons.find(o => o.name === this.selectedIcon); + let typeSuffix; + switch (this.selectedIconType) { + case 'outline': + typeSuffix = '-outline'; + break; + case 'sharp': + typeSuffix = '-sharp'; + break; + default: + typeSuffix = ''; + } + if (!results.icon.length && !results.logo.length && this.isHeaderSearchVisible) + document.documentElement.scrollTop = 0; + return (h("div", { class: "icon-list" }, h("div", { class: "icon-list__search container--small" }, h("icon-search", { query: this.query, size: "large", autoFocus: "autofocus" })), results.icon.length ? + h("div", { class: "icon-list__wrapper" }, h("div", { class: "icon-list__header-bar" }, h("div", { class: "container--small" }, h("h4", null, "App icons"), h("ul", { class: "toggle" }, h("li", { class: `toggle__item ${(this.selectedIconType === 'outline') ? 'active' : ''}`, onClick: ev => this.handleToggleClick(ev, 'outline') }, "Outline"), h("li", { class: `toggle__item ${(this.selectedIconType === 'filled') ? 'active' : ''}`, onClick: ev => this.handleToggleClick(ev, 'filled') }, "Filled"), h("li", { class: `toggle__item ${(this.selectedIconType === 'sharp') ? 'active' : ''}`, onClick: ev => this.handleToggleClick(ev, 'sharp') }, "Sharp")))), h("div", { class: "container--small" }, h("div", { class: "icon-results" }, results.icon.map(icon => (h("span", { class: `icon-results__cell ${(this.selectedIcon === icon.name) ? 'active' : ''}`, onClick: (ev) => this.handleIconClick(ev, icon.name), onMouseEnter: (ev) => this.handleIconMouseEnter(ev), onMouseLeave: (ev) => this.handleIconMouseLeave(ev) }, h("svg", null, h("use", { xlinkHref: `#${icon.name + typeSuffix}` })))))))) + : '', results.logo.length ? + h("div", { class: "icon-list__wrapper" }, h("div", { class: "icon-list__header-bar" }, h("div", { class: "container--small" }, h("h4", null, "Logos"))), h("div", { class: "container--small" }, h("div", { class: "icon-results" }, results.logo.map(icon => (h("span", { class: `icon-results__cell ${(this.selectedIcon === icon.name) ? 'active' : ''}`, onClick: (ev) => this.handleIconClick(ev, icon.name), onMouseEnter: (ev) => this.handleIconMouseEnter(ev), onMouseLeave: (ev) => this.handleIconMouseLeave(ev) }, h("svg", null, h("use", { xlinkHref: `#${icon.name}` })))))))) + : '', (!results.icon.length && !results.logo.length) ? + h("div", { class: "icon-results--empty container--small" }, h("h2", null, "No results for \"", this.query, "\""), h("p", null, "Not finding an icon that you want? ", h("a", { href: "https://github.com/ionic-team/ionicons/issues" }, "File an issue"), " and suggest a new icon.")) + : '', h("toast-bar", { selectedIcon: selectedIcon, selectedIconType: this.selectedIconType, typeSuffix: typeSuffix, version: this.data.version }))); + } + get el() { return getElement(this); } +}; +LandingPage.style = iconListCss; + +export { LandingPage as icon_list }; diff --git a/docs/build/icon-search.entry.js b/docs/build/icon-search.entry.js new file mode 100644 index 0000000..15ddf57 --- /dev/null +++ b/docs/build/icon-search.entry.js @@ -0,0 +1,50 @@ +import { r as registerInstance, k as createEvent, e as Build, h } from './index-93b10a2a.js'; + +const iconSearchCss = "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;box-sizing:border-box;display:block;-webkit-appearance:none;vertical-align:middle}icon-search .search-input__clear{transition:background 0.3s, opacity 0.3s;position:absolute;top:50%;transform:translateY(-50%);right:16px;width:22px;height:22px;display:flex;align-items: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 svg{width:16px;height:16px}icon-search .search-input__clear--active{opacity:0.8}icon-search .search-input__clear--active:hover{opacity:1;background-color:#e3e9f3}icon-search .search-input--small .search-input__clear{width:18px;height:18px;background-color:#e3e9f3;right:12px}icon-search .search-input--small .search-input__clear svg{width:14px;height:14px}icon-search .search-input--small .search-input__clear--active:hover{background-color:#dce3f0}icon-search .search-input__icon svg{color:var(--color-heather);position:absolute;height:20px;width:20px;top:50%;transform:translateY(-50%);left:16px}icon-search .search-input--small .search-input__icon svg{width:16px;height:16px;left:8px}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--large input{transition:box-shadow 0.3s;font-size:16px;line-height:22px;padding:20px;padding-left:50px;padding-right:50px;background-color:white;box-shadow:0px 3px 6px 0px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.08)}icon-search .search-input--large input:focus{box-shadow:0px 6px 12px 0px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.08)}icon-search .search-input--large:before{font-size:22px;left:20px}icon-search .search-input input::placeholder{color:var(--color-heather)}"; + +const IconSearch = class { + constructor(hostRef) { + registerInstance(this, hostRef); + this.hasSearched = createEvent(this, "hasSearched", 7); + this.query = ''; + this.size = 'small'; + this.autoFocus = 'none'; + this.showClearCtrl = false; + this.handleKeyUp = (e) => { + if (e.keyCode === 27) { + this.handleClear(); + return; + } + }; + this.handleInput = (e) => { + const value = e.target.value; + this.hasSearched.emit(value); + }; + } + watchQuery() { + this.showClearCtrl = (this.query.length > 0) ? true : false; + } + componentDidLoad() { + if (Build.isBrowser) { + this.searchRef && this.searchRef.focus(); + } + } + handleClear() { + this.hasSearched.emit(''); + } + componentWillLoad() { + this.watchQuery(); + } + render() { + return (h("div", { class: `search-input search-input--${this.size}` }, h("i", { class: "search-input__icon" }, h("svg", null, h("use", { xlinkHref: `#search-outline` }))), h("input", { ref: e => this.searchRef = e, type: "text", placeholder: "Search icons...", value: this.query, onKeyUp: this.handleKeyUp, onInput: this.handleInput, autofocus: this.autoFocus === 'autofocus' ? 'autofocus' : '' }), h("i", { class: { + 'search-input__clear': true, + 'search-input__clear--active': this.showClearCtrl, + }, onClick: this.handleClear.bind(this) }, h("svg", null, h("use", { xlinkHref: `#close-outline` }))))); + } + static get watchers() { return { + "query": ["watchQuery"] + }; } +}; +IconSearch.style = iconSearchCss; + +export { IconSearch as icon_search }; diff --git a/docs/build/index-5421a3d1.js b/docs/build/index-5421a3d1.js new file mode 100644 index 0000000..3dc867f --- /dev/null +++ b/docs/build/index-5421a3d1.js @@ -0,0 +1,264 @@ +import { h } from './index-93b10a2a.js'; +import { a as applyProps } from './Button-36d57e33.js'; + +const Blockquote = (props, children) => (h("blockquote", Object.assign({}, applyProps(props, { class: 'ui-blockquote' })), children)); + +const Breadcrumbs = (props, children) => (h("ul", Object.assign({}, applyProps(props, { class: 'ui-breadcrumbs' })), children)); + +var __rest = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const Breakpoint = (_a, children) => { + var { xs, sm, md, lg, xl, display = 'block' } = _a, props = __rest(_a, ["xs", "sm", "md", "lg", "xl", "display"]); + const Tag = display === 'inline' ? 'span' : 'div'; + //cascade values up breakpoints + xs = xs !== undefined ? xs : false; + sm = sm !== undefined ? sm : xs; + md = md !== undefined ? md : sm; + lg = lg !== undefined ? lg : md; + xl = xl !== undefined ? xl : lg; + const breakpoints = [['xs', xs], ['sm', sm], ['md', md], ['lg', lg], ['xl', xl]]; + //Combine classes into string based on breakpoint values + const className = breakpoints.reduce((acc, cur) => `${acc} ${cur[1] ? `ui-breakpoint-${cur[0]}` : ``}`, 'ui-breakpoint'); + return (h(Tag, Object.assign({}, applyProps(props, { class: className }), { style: { '--display': display } }), children)); +}; + +const AnchorButton = (props, children) => h("a", Object.assign({}, applyProps(props, { class: 'ui-button' })), children); + +const Card = (props, children) => (h("div", Object.assign({}, applyProps(props, { + class: `ui-card${props.embelish !== false ? ' ui-card--embelish' : ''}`, +})), children)); + +const CardContent = (props, children) => (h("div", Object.assign({}, applyProps(props, { class: 'ui-card-content' })), children)); + +var __rest$1 = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const DateTime = (_a) => { + var { date, format = { + weekday: 'short', + year: 'numeric', + month: 'long', + day: 'numeric', + } } = _a, props = __rest$1(_a, ["date", "format"]); + const formatter = new Intl.DateTimeFormat('en-US', Object.assign({}, format)); + return h("time", Object.assign({}, applyProps(props, { class: 'ui-date' })), formatter.format(date)); +}; + +var __rest$2 = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const applyClasses = (cols, xs, sm, md, lg) => { + const classes = []; + // General class, doesn't apply column behavior but + // can be useful for selectors + classes.push('ui-col'); + if (cols) { + classes.push(`ui-col-${cols}`); + } + else { + // If no "cols" is specified, add a default 12 to make content go full width + // in the smallest viewport sizes + classes.push(`ui-col-12`); + } + if (xs) { + classes.push(`ui-col-xs-${xs}`); + } + if (sm) { + classes.push(`ui-col-sm-${sm}`); + } + if (md) { + classes.push(`ui-col-md-${md}`); + } + if (lg) { + classes.push(`ui-col-lg-${lg}`); + } + return classes.join(' '); +}; +const Col = (_a, children) => { + var { cols, xs, sm, md, lg } = _a, props = __rest$2(_a, ["cols", "xs", "sm", "md", "lg"]); + return (h("div", Object.assign({}, applyProps(props, { class: applyClasses(cols, xs, sm, md, lg) })), children)); +}; + +var __rest$3 = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +/* +interface GridProps { + bordered?: boolean; + + xsCols?: number | null; + smCols?: number | null; + mdCols?: number | null; + lgCols?: number | null; + + cols?: number; + [key: string]: any; +} + +const getColClasses = ( + xsCols: number | null, + smCols: number | null, + mdCols: number | null, + lgCols: number | null) => ( + [ ['xs', xsCols], ['sm', smCols], ['md', mdCols], ['lg', lgCols] ].reduce((str, c) => { + const ct = c[0]; + const cn = c[1]; + if (cn) { + return `${str} ui-grid-cols-${ct}-${cn}`; + } + return str; + }, '') + ); +*/ +const Grid = (_a, children) => { + var props = __rest$3(_a, []); + return h("div", Object.assign({}, applyProps(props, { class: `ui-grid` })), children); +}; + +// import { h } from '@stencil/core'; +const listeners = []; +const visible = []; +const observer = new IntersectionObserver((entries, observer) => { + entries.forEach((e) => { + if (e.intersectionRatio > 0) { + if (visible.indexOf(e.target) < 0) { + visible.push(e.target); + } + } + else { + visible.splice(visible.indexOf(e.target), 1); + } + }); + listeners.forEach((l) => l({ entries, observer, visible })); +}, { threshold: [0, 1] }); +const addListener = (listener) => listeners.push(listener); +const removeListener = (listener) => listeners.splice(listeners.indexOf(listener), 1); +const observe = (el) => el && observer.observe(el); + +var __rest$4 = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const Heading = (_a, children) => { + var { level = 3, poster = false, as } = _a, props = __rest$4(_a, ["level", "poster", "as"]); + const Tag = as ? as : (poster ? 'h1' : `h${level}`); + const classes = [ + `ui-heading`, + `${poster ? `ui-poster-${level}` : `ui-heading-${level}`}` + ]; + return (h(Tag, Object.assign({}, applyProps(props, { class: classes.join(' ') }), { ref: (e) => observe(e) }), children)); +}; + +var __rest$5 = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const Paragraph = (_a, children) => { + var { level = 3, leading = 'body' } = _a, props = __rest$5(_a, ["level", "leading"]); + const classes = [ + `ui-paragraph`, + `ui-paragraph-${level}`, + `ui-paragraph--${leading}`, + ]; + return (h("p", Object.assign({}, applyProps(props, { class: classes.join(' ') })), children)); +}; + +var __rest$6 = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const ResponsiveContainer = (_a, children) => { + var { as = 'div' } = _a, props = __rest$6(_a, ["as"]); + const Tag = as; + return h(Tag, Object.assign({}, applyProps(props, { class: 'ui-container' })), children); +}; + +var __rest$7 = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const Skeleton = (_a, children) => { + var { animated = true } = _a, props = __rest$7(_a, ["animated"]); + return (h("div", Object.assign({}, applyProps(props, { class: `ui-skeleton${animated ? ` ui-skeleton--animated` : ``}` })), children)); +}; + +const Text = (props, children) => h("p", Object.assign({}, applyProps(props, { class: 'ui-text' })), children); + +var __rest$8 = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const ThemeProvider = (_a, children) => { + var { type = 'base' } = _a, props = __rest$8(_a, ["type"]); + return (h("div", Object.assign({}, applyProps(props, { class: `ui-theme--${type}` })), children)); +}; + +export { Blockquote as B, Col as C, Grid as G, Heading as H, Paragraph as P, ResponsiveContainer as R, ThemeProvider as T, Card as a, CardContent as b, Breakpoint as c }; diff --git a/docs/build/index-93b10a2a.js b/docs/build/index-93b10a2a.js new file mode 100644 index 0000000..a429a8c --- /dev/null +++ b/docs/build/index-93b10a2a.js @@ -0,0 +1,2830 @@ +const NAMESPACE = 'ionicons-site'; +const BUILD = /* ionicons-site */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: true, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, cssVarShim: true, devTools: true, disconnectedCallback: true, dynamicImportShim: true, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: true, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: true, scoped: true, scriptDataOpts: true, shadowDelegatesFocus: false, shadowDom: false, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true }; + +let scopeId; +let contentRef; +let hostTagName; +let i = 0; +let useNativeShadowDom = false; +let checkSlotFallbackVisibility = false; +let checkSlotRelocate = false; +let isSvgMode = false; +let renderingRef = null; +let queueCongestion = 0; +let queuePending = false; +const win = typeof window !== 'undefined' ? window : {}; +const CSS = BUILD.cssVarShim ? win.CSS : null; +const doc = win.document || { head: {} }; +const H = (win.HTMLElement || class { +}); +const plt = { + $flags$: 0, + $resourcesUrl$: '', + jmp: h => h(), + raf: h => requestAnimationFrame(h), + ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts), + rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts), + ce: (eventName, opts) => new CustomEvent(eventName, opts), +}; +const supportsShadow = BUILD.shadowDomShim && BUILD.shadowDom ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)() : true; +const supportsListenerOptions = /*@__PURE__*/ (() => { + let supportsListenerOptions = false; + try { + doc.addEventListener('e', null, Object.defineProperty({}, 'passive', { + get() { + supportsListenerOptions = true; + }, + })); + } + catch (e) { } + return supportsListenerOptions; +})(); +const promiseResolve = (v) => Promise.resolve(v); +const supportsConstructibleStylesheets = BUILD.constructableCSS + ? /*@__PURE__*/ (() => { + try { + new CSSStyleSheet(); + return true; + } + catch (e) { } + return false; + })() + : false; +const Context = {}; +const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => { + if (BUILD.hostListener && listeners) { + // this is called immediately within the element's constructor + // initialize our event listeners on the host element + // we do this now so that we can listen to events that may + // have fired even before the instance is ready + if (BUILD.hostListenerTargetParent) { + // this component may have event listeners that should be attached to the parent + if (attachParentListeners) { + // this is being ran from within the connectedCallback + // which is important so that we know the host element actually has a parent element + // filter out the listeners to only have the ones that ARE being attached to the parent + listeners = listeners.filter(([flags]) => flags & 16 /* TargetParent */); + } + else { + // this is being ran from within the component constructor + // everything BUT the parent element listeners should be attached at this time + // filter out the listeners that are NOT being attached to the parent + listeners = listeners.filter(([flags]) => !(flags & 16 /* TargetParent */)); + } + } + listeners.map(([flags, name, method]) => { + const target = BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm; + const handler = hostListenerProxy(hostRef, method); + const opts = hostListenerOpts(flags); + plt.ael(target, name, handler, opts); + (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts)); + }); + } +}; +const hostListenerProxy = (hostRef, methodName) => (ev) => { + if (BUILD.lazyLoad) { + if (hostRef.$flags$ & 256 /* isListenReady */) { + // instance is ready, let's call it's member method for this event + hostRef.$lazyInstance$[methodName](ev); + } + else { + (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]); + } + } + else { + hostRef.$hostElement$[methodName](ev); + } +}; +const getHostListenerTarget = (elm, flags) => { + if (BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) + return doc; + if (BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) + return win; + if (BUILD.hostListenerTargetBody && flags & 32 /* TargetBody */) + return doc.body; + if (BUILD.hostListenerTargetParent && flags & 16 /* TargetParent */) + return elm.parentElement; + return elm; +}; +// prettier-ignore +const hostListenerOpts = (flags) => supportsListenerOptions + ? ({ + passive: (flags & 1 /* Passive */) !== 0, + capture: (flags & 2 /* Capture */) !== 0, + }) + : (flags & 2 /* Capture */) !== 0; +const CONTENT_REF_ID = 'r'; +const ORG_LOCATION_ID = 'o'; +const SLOT_NODE_ID = 's'; +const TEXT_NODE_ID = 't'; +const HYDRATE_ID = 's-id'; +const HYDRATED_STYLE_ID = 'sty-id'; +const HYDRATE_CHILD_ID = 'c-id'; +const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}'; +const XLINK_NS = 'http://www.w3.org/1999/xlink'; +const createTime = (fnName, tagName = '') => { + if (BUILD.profile && performance.mark) { + const key = `st:${fnName}:${tagName}:${i++}`; + // Start + performance.mark(key); + // End + return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key); + } + else { + return () => { + return; + }; + } +}; +const uniqueTime = (key, measureText) => { + if (BUILD.profile && performance.mark) { + if (performance.getEntriesByName(key).length === 0) { + performance.mark(key); + } + return () => { + if (performance.getEntriesByName(measureText).length === 0) { + performance.measure(measureText, key); + } + }; + } + else { + return () => { + return; + }; + } +}; +const inspect = (ref) => { + const hostRef = getHostRef(ref); + if (!hostRef) { + return undefined; + } + const flags = hostRef.$flags$; + const hostElement = hostRef.$hostElement$; + return { + renderCount: hostRef.$renderCount$, + flags: { + hasRendered: !!(flags & 2 /* hasRendered */), + hasConnected: !!(flags & 1 /* hasConnected */), + isWaitingForChildren: !!(flags & 4 /* isWaitingForChildren */), + isConstructingInstance: !!(flags & 8 /* isConstructingInstance */), + isQueuedForUpdate: !!(flags & 16 /* isQueuedForUpdate */), + hasInitializedComponent: !!(flags & 32 /* hasInitializedComponent */), + hasLoadedComponent: !!(flags & 64 /* hasLoadedComponent */), + isWatchReady: !!(flags & 128 /* isWatchReady */), + isListenReady: !!(flags & 256 /* isListenReady */), + needsRerender: !!(flags & 512 /* needsRerender */), + }, + instanceValues: hostRef.$instanceValues$, + ancestorComponent: hostRef.$ancestorComponent$, + hostElement, + lazyInstance: hostRef.$lazyInstance$, + vnode: hostRef.$vnode$, + modeName: hostRef.$modeName$, + onReadyPromise: hostRef.$onReadyPromise$, + onReadyResolve: hostRef.$onReadyResolve$, + onInstancePromise: hostRef.$onInstancePromise$, + onInstanceResolve: hostRef.$onInstanceResolve$, + onRenderResolve: hostRef.$onRenderResolve$, + queuedListeners: hostRef.$queuedListeners$, + rmListeners: hostRef.$rmListeners$, + ['s-id']: hostElement['s-id'], + ['s-cr']: hostElement['s-cr'], + ['s-lr']: hostElement['s-lr'], + ['s-p']: hostElement['s-p'], + ['s-rc']: hostElement['s-rc'], + ['s-sc']: hostElement['s-sc'], + }; +}; +const installDevTools = () => { + if (BUILD.devTools) { + const stencil = (win.stencil = win.stencil || {}); + const originalInspect = stencil.inspect; + stencil.inspect = (ref) => { + let result = inspect(ref); + if (!result && typeof originalInspect === 'function') { + result = originalInspect(ref); + } + return result; + }; + } +}; +const rootAppliedStyles = new WeakMap(); +const registerStyle = (scopeId, cssText, allowCS) => { + let style = styles.get(scopeId); + if (supportsConstructibleStylesheets && allowCS) { + style = (style || new CSSStyleSheet()); + style.replace(cssText); + } + else { + style = cssText; + } + styles.set(scopeId, style); +}; +const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => { + let scopeId = getScopeId(cmpMeta, mode); + let style = styles.get(scopeId); + if (!BUILD.attachStyles) { + return scopeId; + } + // if an element is NOT connected then getRootNode() will return the wrong root node + // so the fallback is to always use the document for the root node in those cases + styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc; + if (style) { + if (typeof style === 'string') { + styleContainerNode = styleContainerNode.head || styleContainerNode; + let appliedStyles = rootAppliedStyles.get(styleContainerNode); + let styleElm; + if (!appliedStyles) { + rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set())); + } + if (!appliedStyles.has(scopeId)) { + if (BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) { + // This is only happening on native shadow-dom, do not needs CSS var shim + styleElm.innerHTML = style; + } + else { + if (BUILD.cssVarShim && plt.$cssShim$) { + styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */)); + const newScopeId = styleElm['s-sc']; + if (newScopeId) { + scopeId = newScopeId; + // we don't want to add this styleID to the appliedStyles Set + // since the cssVarShim might need to apply several different + // stylesheets for the same component + appliedStyles = null; + } + } + else { + styleElm = doc.createElement('style'); + styleElm.innerHTML = style; + } + if (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) { + styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId); + } + styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link')); + } + if (appliedStyles) { + appliedStyles.add(scopeId); + } + } + } + else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) { + styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style]; + } + } + return scopeId; +}; +const attachStyles = (hostRef) => { + const cmpMeta = hostRef.$cmpMeta$; + const elm = hostRef.$hostElement$; + const flags = cmpMeta.$flags$; + const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$); + const scopeId = addStyle(BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$, elm); + if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) { + // only required when we're NOT using native shadow dom (slot) + // or this browser doesn't support native shadow dom + // and this host element was NOT created with SSR + // let's pick out the inner content for slot projection + // create a node to represent where the original + // content was first placed, which is useful later on + // DOM WRITE!! + elm['s-sc'] = scopeId; + elm.classList.add(scopeId + '-h'); + if (BUILD.scoped && flags & 2 /* scopedCssEncapsulation */) { + elm.classList.add(scopeId + '-s'); + } + } + endAttachStyles(); +}; +const getScopeId = (cmp, mode) => 'sc-' + (BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$); +const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{'); +// Private +const computeMode = (elm) => modeResolutionChain.map(h => h(elm)).find(m => !!m); +// Public +const setMode = (handler) => modeResolutionChain.push(handler); +const getMode = (ref) => getHostRef(ref).$modeName$; +/** + * Default style mode id + */ +/** + * Reusable empty obj/array + * Don't add values to these!! + */ +const EMPTY_OBJ = {}; +/** + * Namespaces + */ +const SVG_NS = 'http://www.w3.org/2000/svg'; +const HTML_NS = 'http://www.w3.org/1999/xhtml'; +const isDef = (v) => v != null; +const noop = () => { + /* noop*/ +}; +const isComplexType = (o) => { + // https://jsperf.com/typeof-fn-object/5 + o = typeof o; + return o === 'object' || o === 'function'; +}; +const IS_DENO_ENV = typeof Deno !== 'undefined'; +const IS_NODE_ENV = !IS_DENO_ENV && + typeof global !== 'undefined' && + typeof require === 'function' && + !!global.process && + typeof __filename === 'string' && + (!global.origin || typeof global.origin !== 'string'); +const IS_DENO_WINDOWS_ENV = IS_DENO_ENV && Deno.build.os === 'windows'; +const getCurrentDirectory = IS_NODE_ENV ? process.cwd : IS_DENO_ENV ? Deno.cwd : () => '/'; +const exit = IS_NODE_ENV ? process.exit : IS_DENO_ENV ? Deno.exit : noop; +/** + * Production h() function based on Preact by + * Jason Miller (@developit) + * Licensed under the MIT License + * https://github.com/developit/preact/blob/master/LICENSE + * + * Modified for Stencil's compiler and vdom + */ +// const stack: any[] = []; +// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode; +// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode; +const h = (nodeName, vnodeData, ...children) => { + let child = null; + let key = null; + let slotName = null; + let simple = false; + let lastSimple = false; + let vNodeChildren = []; + const walk = (c) => { + for (let i = 0; i < c.length; i++) { + child = c[i]; + if (Array.isArray(child)) { + walk(child); + } + else if (child != null && typeof child !== 'boolean') { + if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) { + child = String(child); + } + else if (BUILD.isDev && typeof nodeName !== 'function' && child.$flags$ === undefined) { + consoleDevError(`vNode passed as children has unexpected type. +Make sure it's using the correct h() function. +Empty objects can also be the cause, look for JSX comments that became objects.`); + } + if (simple && lastSimple) { + // If the previous child was simple (string), we merge both + vNodeChildren[vNodeChildren.length - 1].$text$ += child; + } + else { + // Append a new vNode, if it's text, we create a text vNode + vNodeChildren.push(simple ? newVNode(null, child) : child); + } + lastSimple = simple; + } + } + }; + walk(children); + if (vnodeData) { + if (BUILD.isDev && nodeName === 'input') { + validateInputProperties(vnodeData); + } + // normalize class / classname attributes + if (BUILD.vdomKey && vnodeData.key) { + key = vnodeData.key; + } + if (BUILD.slotRelocation && vnodeData.name) { + slotName = vnodeData.name; + } + if (BUILD.vdomClass) { + const classData = vnodeData.className || vnodeData.class; + if (classData) { + vnodeData.class = + typeof classData !== 'object' + ? classData + : Object.keys(classData) + .filter(k => classData[k]) + .join(' '); + } + } + } + if (BUILD.isDev && vNodeChildren.some(isHost)) { + consoleDevError(`The must be the single root component. Make sure: +- You are NOT using hostData() and in the same component. +- is used once, and it's the single root component of the render() function.`); + } + if (BUILD.vdomFunctional && typeof nodeName === 'function') { + // nodeName is a functional component + return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils); + } + const vnode = newVNode(nodeName, null); + vnode.$attrs$ = vnodeData; + if (vNodeChildren.length > 0) { + vnode.$children$ = vNodeChildren; + } + if (BUILD.vdomKey) { + vnode.$key$ = key; + } + if (BUILD.slotRelocation) { + vnode.$name$ = slotName; + } + return vnode; +}; +const newVNode = (tag, text) => { + const vnode = { + $flags$: 0, + $tag$: tag, + $text$: text, + $elm$: null, + $children$: null, + }; + if (BUILD.vdomAttribute) { + vnode.$attrs$ = null; + } + if (BUILD.vdomKey) { + vnode.$key$ = null; + } + if (BUILD.slotRelocation) { + vnode.$name$ = null; + } + return vnode; +}; +const Host = {}; +const isHost = (node) => node && node.$tag$ === Host; +const vdomFnUtils = { + forEach: (children, cb) => children.map(convertToPublic).forEach(cb), + map: (children, cb) => children + .map(convertToPublic) + .map(cb) + .map(convertToPrivate), +}; +const convertToPublic = (node) => ({ + vattrs: node.$attrs$, + vchildren: node.$children$, + vkey: node.$key$, + vname: node.$name$, + vtag: node.$tag$, + vtext: node.$text$, +}); +const convertToPrivate = (node) => { + if (typeof node.vtag === 'function') { + const vnodeData = Object.assign({}, node.vattrs); + if (node.vkey) { + vnodeData.key = node.vkey; + } + if (node.vname) { + vnodeData.name = node.vname; + } + return h(node.vtag, vnodeData, ...node.vchildren || []); + } + const vnode = newVNode(node.vtag, node.vtext); + vnode.$attrs$ = node.vattrs; + vnode.$children$ = node.vchildren; + vnode.$key$ = node.vkey; + vnode.$name$ = node.vname; + return vnode; +}; +const validateInputProperties = (vnodeData) => { + const props = Object.keys(vnodeData); + const typeIndex = props.indexOf('type'); + const minIndex = props.indexOf('min'); + const maxIndex = props.indexOf('max'); + const stepIndex = props.indexOf('min'); + const value = props.indexOf('value'); + if (value === -1) { + return; + } + if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) { + consoleDevWarn(`The "value" prop of should be set after "min", "max", "type" and "step"`); + } +}; +/** + * Production setAccessor() function based on Preact by + * Jason Miller (@developit) + * Licensed under the MIT License + * https://github.com/developit/preact/blob/master/LICENSE + * + * Modified for Stencil's compiler and vdom + */ +const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => { + if (oldValue !== newValue) { + let isProp = isMemberInElement(elm, memberName); + let ln = memberName.toLowerCase(); + if (BUILD.vdomClass && memberName === 'class') { + const classList = elm.classList; + const oldClasses = parseClassList(oldValue); + const newClasses = parseClassList(newValue); + classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c))); + classList.add(...newClasses.filter(c => c && !oldClasses.includes(c))); + } + else if (BUILD.vdomStyle && memberName === 'style') { + // update style attribute, css properties and values + if (BUILD.updatable) { + for (const prop in oldValue) { + if (!newValue || newValue[prop] == null) { + if (!BUILD.hydrateServerSide && prop.includes('-')) { + elm.style.removeProperty(prop); + } + else { + elm.style[prop] = ''; + } + } + } + } + for (const prop in newValue) { + if (!oldValue || newValue[prop] !== oldValue[prop]) { + if (!BUILD.hydrateServerSide && prop.includes('-')) { + elm.style.setProperty(prop, newValue[prop]); + } + else { + elm.style[prop] = newValue[prop]; + } + } + } + } + else if (BUILD.vdomKey && memberName === 'key') + ; + else if (BUILD.vdomRef && memberName === 'ref') { + // minifier will clean this up + if (newValue) { + newValue(elm); + } + } + else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === 'o' && memberName[1] === 'n') { + // Event Handlers + // so if the member name starts with "on" and the 3rd characters is + // a capital letter, and it's not already a member on the element, + // then we're assuming it's an event listener + if (memberName[2] === '-') { + // on- prefixed events + // allows to be explicit about the dom event to listen without any magic + // under the hood: + // // listens for "click" + // // listens for "Click" + // // listens for "ionChange" + // // listens for "EVENTS" + memberName = memberName.slice(3); + } + else if (isMemberInElement(win, ln)) { + // standard event + // the JSX attribute could have been "onMouseOver" and the + // member name "onmouseover" is on the window's prototype + // so let's add the listener "mouseover", which is all lowercased + memberName = ln.slice(2); + } + else { + // custom event + // the JSX attribute could have been "onMyCustomEvent" + // so let's trim off the "on" prefix and lowercase the first character + // and add the listener "myCustomEvent" + // except for the first character, we keep the event name case + memberName = ln[2] + memberName.slice(3); + } + if (oldValue) { + plt.rel(elm, memberName, oldValue, false); + } + if (newValue) { + plt.ael(elm, memberName, newValue, false); + } + } + else if (BUILD.vdomPropOrAttr) { + // Set property if it exists and it's not a SVG + const isComplex = isComplexType(newValue); + if ((isProp || (isComplex && newValue !== null)) && !isSvg) { + try { + if (!elm.tagName.includes('-')) { + let n = newValue == null ? '' : newValue; + // Workaround for Safari, moving the caret when re-assigning the same valued + if (memberName === 'list') { + isProp = false; + // tslint:disable-next-line: triple-equals + } + else if (oldValue == null || elm[memberName] != n) { + elm[memberName] = n; + } + } + else { + elm[memberName] = newValue; + } + } + catch (e) { } + } + /** + * Need to manually update attribute if: + * - memberName is not an attribute + * - if we are rendering the host element in order to reflect attribute + * - if it's a SVG, since properties might not work in + * - if the newValue is null/undefined or 'false'. + */ + let xlink = false; + if (BUILD.vdomXlink) { + if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) { + memberName = ln; + xlink = true; + } + } + if (newValue == null || newValue === false) { + if (newValue !== false || elm.getAttribute(memberName) === '') { + if (BUILD.vdomXlink && xlink) { + elm.removeAttributeNS(XLINK_NS, memberName); + } + else { + elm.removeAttribute(memberName); + } + } + } + else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) { + newValue = newValue === true ? '' : newValue; + if (BUILD.vdomXlink && xlink) { + elm.setAttributeNS(XLINK_NS, memberName, newValue); + } + else { + elm.setAttribute(memberName, newValue); + } + } + } + } +}; +const parseClassListRegex = /\s/; +const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex)); +const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => { + // if the element passed in is a shadow root, which is a document fragment + // then we want to be adding attrs/props to the shadow root's "host" element + // if it's not a shadow root, then we add attrs/props to the same element + const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$; + const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ; + const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ; + if (BUILD.updatable) { + // remove attributes no longer present on the vnode by setting them to undefined + for (memberName in oldVnodeAttrs) { + if (!(memberName in newVnodeAttrs)) { + setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$); + } + } + } + // add new & update changed attributes + for (memberName in newVnodeAttrs) { + setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$); + } +}; +const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => { + // tslint:disable-next-line: prefer-const + let newVNode = newParentVNode.$children$[childIndex]; + let i = 0; + let elm; + let childNode; + let oldVNode; + if (BUILD.slotRelocation && !useNativeShadowDom) { + // remember for later we need to check to relocate nodes + checkSlotRelocate = true; + if (newVNode.$tag$ === 'slot') { + if (scopeId) { + // scoped css needs to add its scoped id to the parent element + parentElm.classList.add(scopeId + '-s'); + } + newVNode.$flags$ |= newVNode.$children$ + ? // slot element has fallback content + 2 /* isSlotFallback */ + : // slot element does not have fallback content + 1 /* isSlotReference */; + } + } + if (BUILD.isDev && newVNode.$elm$) { + consoleError(`The JSX ${newVNode.$text$ !== null ? `"${newVNode.$text$}" text` : `"${newVNode.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`); + } + if (BUILD.vdomText && newVNode.$text$ !== null) { + // create text node + elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$); + } + else if (BUILD.slotRelocation && newVNode.$flags$ & 1 /* isSlotReference */) { + // create a slot reference node + elm = newVNode.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode(''); + } + else { + if (BUILD.svg && !isSvgMode) { + isSvgMode = newVNode.$tag$ === 'svg'; + } + // create element + elm = newVNode.$elm$ = (BUILD.svg + ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$) + : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$)); + if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') { + isSvgMode = false; + } + // add css classes, attrs, props, listeners, etc. + if (BUILD.vdomAttribute) { + updateElement(null, newVNode, isSvgMode); + } + if ((BUILD.shadowDom || BUILD.scoped) && isDef(scopeId) && elm['s-si'] !== scopeId) { + // if there is a scopeId and this is the initial render + // then let's add the scopeId as a css class + elm.classList.add((elm['s-si'] = scopeId)); + } + if (newVNode.$children$) { + for (i = 0; i < newVNode.$children$.length; ++i) { + // create the node + childNode = createElm(oldParentVNode, newVNode, i, elm); + // return node could have been null + if (childNode) { + // append our new node + elm.appendChild(childNode); + } + } + } + if (BUILD.svg) { + if (newVNode.$tag$ === 'svg') { + // Only reset the SVG context when we're exiting element + isSvgMode = false; + } + else if (elm.tagName === 'foreignObject') { + // Reenter SVG context when we're exiting element + isSvgMode = true; + } + } + } + if (BUILD.slotRelocation) { + elm['s-hn'] = hostTagName; + if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) { + // remember the content reference comment + elm['s-sr'] = true; + // remember the content reference comment + elm['s-cr'] = contentRef; + // remember the slot name, or empty string for default slot + elm['s-sn'] = newVNode.$name$ || ''; + // check if we've got an old vnode for this slot + oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex]; + if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) { + // we've got an old slot vnode and the wrapper is being replaced + // so let's move the old slot content back to it's original location + putBackInOriginalLocation(oldParentVNode.$elm$, false); + } + } + } + return elm; +}; +const putBackInOriginalLocation = (parentElm, recursive) => { + plt.$flags$ |= 1 /* isTmpDisconnected */; + const oldSlotChildNodes = parentElm.childNodes; + for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) { + const childNode = oldSlotChildNodes[i]; + if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) { + // // this child node in the old element is from another component + // // remove this node from the old slot's parent + // childNode.remove(); + // and relocate it back to it's original location + parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode)); + // remove the old original location comment entirely + // later on the patch function will know what to do + // and move this to the correct spot in need be + childNode['s-ol'].remove(); + childNode['s-ol'] = undefined; + checkSlotRelocate = true; + } + if (recursive) { + putBackInOriginalLocation(childNode, recursive); + } + } + plt.$flags$ &= ~1 /* isTmpDisconnected */; +}; +const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => { + let containerElm = ((BUILD.slotRelocation && parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm); + let childNode; + if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) { + containerElm = containerElm.shadowRoot; + } + for (; startIdx <= endIdx; ++startIdx) { + if (vnodes[startIdx]) { + childNode = createElm(null, parentVNode, startIdx, parentElm); + if (childNode) { + vnodes[startIdx].$elm$ = childNode; + containerElm.insertBefore(childNode, BUILD.slotRelocation ? referenceNode(before) : before); + } + } + } +}; +const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => { + for (; startIdx <= endIdx; ++startIdx) { + if ((vnode = vnodes[startIdx])) { + elm = vnode.$elm$; + callNodeRefs(vnode); + if (BUILD.slotRelocation) { + // we're removing this element + // so it's possible we need to show slot fallback content now + checkSlotFallbackVisibility = true; + if (elm['s-ol']) { + // remove the original location comment + elm['s-ol'].remove(); + } + else { + // it's possible that child nodes of the node + // that's being removed are slot nodes + putBackInOriginalLocation(elm, true); + } + } + // remove the vnode's element from the dom + elm.remove(); + } + } +}; +const updateChildren = (parentElm, oldCh, newVNode, newCh) => { + let oldStartIdx = 0; + let newStartIdx = 0; + let idxInOld = 0; + let i = 0; + let oldEndIdx = oldCh.length - 1; + let oldStartVnode = oldCh[0]; + let oldEndVnode = oldCh[oldEndIdx]; + let newEndIdx = newCh.length - 1; + let newStartVnode = newCh[0]; + let newEndVnode = newCh[newEndIdx]; + let node; + let elmToMove; + while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { + if (oldStartVnode == null) { + // Vnode might have been moved left + oldStartVnode = oldCh[++oldStartIdx]; + } + else if (oldEndVnode == null) { + oldEndVnode = oldCh[--oldEndIdx]; + } + else if (newStartVnode == null) { + newStartVnode = newCh[++newStartIdx]; + } + else if (newEndVnode == null) { + newEndVnode = newCh[--newEndIdx]; + } + else if (isSameVnode(oldStartVnode, newStartVnode)) { + patch(oldStartVnode, newStartVnode); + oldStartVnode = oldCh[++oldStartIdx]; + newStartVnode = newCh[++newStartIdx]; + } + else if (isSameVnode(oldEndVnode, newEndVnode)) { + patch(oldEndVnode, newEndVnode); + oldEndVnode = oldCh[--oldEndIdx]; + newEndVnode = newCh[--newEndIdx]; + } + else if (isSameVnode(oldStartVnode, newEndVnode)) { + // Vnode moved right + if (BUILD.slotRelocation && (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) { + putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false); + } + patch(oldStartVnode, newEndVnode); + parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling); + oldStartVnode = oldCh[++oldStartIdx]; + newEndVnode = newCh[--newEndIdx]; + } + else if (isSameVnode(oldEndVnode, newStartVnode)) { + // Vnode moved left + if (BUILD.slotRelocation && (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) { + putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false); + } + patch(oldEndVnode, newStartVnode); + parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$); + oldEndVnode = oldCh[--oldEndIdx]; + newStartVnode = newCh[++newStartIdx]; + } + else { + // createKeyToOldIdx + idxInOld = -1; + if (BUILD.vdomKey) { + for (i = oldStartIdx; i <= oldEndIdx; ++i) { + if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) { + idxInOld = i; + break; + } + } + } + if (BUILD.vdomKey && idxInOld >= 0) { + elmToMove = oldCh[idxInOld]; + if (elmToMove.$tag$ !== newStartVnode.$tag$) { + node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm); + } + else { + patch(elmToMove, newStartVnode); + oldCh[idxInOld] = undefined; + node = elmToMove.$elm$; + } + newStartVnode = newCh[++newStartIdx]; + } + else { + // new element + node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm); + newStartVnode = newCh[++newStartIdx]; + } + if (node) { + if (BUILD.slotRelocation) { + parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$)); + } + else { + oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$); + } + } + } + } + if (oldStartIdx > oldEndIdx) { + addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx); + } + else if (BUILD.updatable && newStartIdx > newEndIdx) { + removeVnodes(oldCh, oldStartIdx, oldEndIdx); + } +}; +const isSameVnode = (vnode1, vnode2) => { + // compare if two vnode to see if they're "technically" the same + // need to have the same element tag, and same key to be the same + if (vnode1.$tag$ === vnode2.$tag$) { + if (BUILD.slotRelocation && vnode1.$tag$ === 'slot') { + return vnode1.$name$ === vnode2.$name$; + } + if (BUILD.vdomKey) { + return vnode1.$key$ === vnode2.$key$; + } + return true; + } + return false; +}; +const referenceNode = (node) => { + // this node was relocated to a new location in the dom + // because of some other component's slot + // but we still have an html comment in place of where + // it's original location was according to it's original vdom + return (node && node['s-ol']) || node; +}; +const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode; +const patch = (oldVNode, newVNode) => { + const elm = (newVNode.$elm$ = oldVNode.$elm$); + const oldChildren = oldVNode.$children$; + const newChildren = newVNode.$children$; + const tag = newVNode.$tag$; + const text = newVNode.$text$; + let defaultHolder; + if (!BUILD.vdomText || text === null) { + if (BUILD.svg) { + // test if we're rendering an svg element, or still rendering nodes inside of one + // only add this to the when the compiler sees we're using an svg somewhere + isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode; + } + // element node + if (BUILD.vdomAttribute || BUILD.reflect) { + if (BUILD.slot && tag === 'slot') + ; + else { + // either this is the first render of an element OR it's an update + // AND we already know it's possible it could have changed + // this updates the element's css classes, attrs, props, listeners, etc. + updateElement(oldVNode, newVNode, isSvgMode); + } + } + if (BUILD.updatable && oldChildren !== null && newChildren !== null) { + // looks like there's child vnodes for both the old and new vnodes + updateChildren(elm, oldChildren, newVNode, newChildren); + } + else if (newChildren !== null) { + // no old child vnodes, but there are new child vnodes to add + if (BUILD.updatable && BUILD.vdomText && oldVNode.$text$ !== null) { + // the old vnode was text, so be sure to clear it out + elm.textContent = ''; + } + // add the new vnode children + addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1); + } + else if (BUILD.updatable && oldChildren !== null) { + // no new child vnodes, but there are old child vnodes to remove + removeVnodes(oldChildren, 0, oldChildren.length - 1); + } + if (BUILD.svg && isSvgMode && tag === 'svg') { + isSvgMode = false; + } + } + else if (BUILD.vdomText && BUILD.slotRelocation && (defaultHolder = elm['s-cr'])) { + // this element has slotted content + defaultHolder.parentNode.textContent = text; + } + else if (BUILD.vdomText && oldVNode.$text$ !== text) { + // update the text content for the text only vnode + // and also only if the text is different than before + elm.data = text; + } +}; +const updateFallbackSlotVisibility = (elm) => { + // tslint:disable-next-line: prefer-const + let childNodes = elm.childNodes; + let childNode; + let i; + let ilen; + let j; + let slotNameAttr; + let nodeType; + for (i = 0, ilen = childNodes.length; i < ilen; i++) { + childNode = childNodes[i]; + if (childNode.nodeType === 1 /* ElementNode */) { + if (childNode['s-sr']) { + // this is a slot fallback node + // get the slot name for this slot reference node + slotNameAttr = childNode['s-sn']; + // by default always show a fallback slot node + // then hide it if there are other slots in the light dom + childNode.hidden = false; + for (j = 0; j < ilen; j++) { + if (childNodes[j]['s-hn'] !== childNode['s-hn']) { + // this sibling node is from a different component + nodeType = childNodes[j].nodeType; + if (slotNameAttr !== '') { + // this is a named fallback slot node + if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) { + childNode.hidden = true; + break; + } + } + else { + // this is a default fallback slot node + // any element or text node (with content) + // should hide the default fallback slot node + if (nodeType === 1 /* ElementNode */ || (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) { + childNode.hidden = true; + break; + } + } + } + } + } + // keep drilling down + updateFallbackSlotVisibility(childNode); + } + } +}; +const relocateNodes = []; +const relocateSlotContent = (elm) => { + // tslint:disable-next-line: prefer-const + let childNode; + let node; + let hostContentNodes; + let slotNameAttr; + let relocateNodeData; + let j; + let i = 0; + let childNodes = elm.childNodes; + let ilen = childNodes.length; + for (; i < ilen; i++) { + childNode = childNodes[i]; + if (childNode['s-sr'] && (node = childNode['s-cr'])) { + // first got the content reference comment node + // then we got it's parent, which is where all the host content is in now + hostContentNodes = node.parentNode.childNodes; + slotNameAttr = childNode['s-sn']; + for (j = hostContentNodes.length - 1; j >= 0; j--) { + node = hostContentNodes[j]; + if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) { + // let's do some relocating to its new home + // but never relocate a content reference node + // that is suppose to always represent the original content location + if (isNodeLocatedInSlot(node, slotNameAttr)) { + // it's possible we've already decided to relocate this node + relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node); + // made some changes to slots + // let's make sure we also double check + // fallbacks are correctly hidden or shown + checkSlotFallbackVisibility = true; + node['s-sn'] = node['s-sn'] || slotNameAttr; + if (relocateNodeData) { + // previously we never found a slot home for this node + // but turns out we did, so let's remember it now + relocateNodeData.$slotRefNode$ = childNode; + } + else { + // add to our list of nodes to relocate + relocateNodes.push({ + $slotRefNode$: childNode, + $nodeToRelocate$: node, + }); + } + if (node['s-sr']) { + relocateNodes.map(relocateNode => { + if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) { + relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node); + if (relocateNodeData && !relocateNode.$slotRefNode$) { + relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$; + } + } + }); + } + } + else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) { + // so far this element does not have a slot home, not setting slotRefNode on purpose + // if we never find a home for this element then we'll need to hide it + relocateNodes.push({ + $nodeToRelocate$: node, + }); + } + } + } + } + if (childNode.nodeType === 1 /* ElementNode */) { + relocateSlotContent(childNode); + } + } +}; +const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => { + if (nodeToRelocate.nodeType === 1 /* ElementNode */) { + if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') { + return true; + } + if (nodeToRelocate.getAttribute('slot') === slotNameAttr) { + return true; + } + return false; + } + if (nodeToRelocate['s-sn'] === slotNameAttr) { + return true; + } + return slotNameAttr === ''; +}; +const callNodeRefs = (vNode) => { + if (BUILD.vdomRef) { + vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null); + vNode.$children$ && vNode.$children$.map(callNodeRefs); + } +}; +const renderVdom = (hostRef, renderFnResults) => { + const hostElm = hostRef.$hostElement$; + const cmpMeta = hostRef.$cmpMeta$; + const oldVNode = hostRef.$vnode$ || newVNode(null, null); + const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults); + hostTagName = hostElm.tagName; + // runtime check + if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) { + throw new Error(`The must be the single root component. +Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the . + +The render() function should look like this instead: + +render() { + // Do not return an array + return ( + {content} + ); +} + `); + } + if (BUILD.reflect && cmpMeta.$attrsToReflect$) { + rootVnode.$attrs$ = rootVnode.$attrs$ || {}; + cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName])); + } + rootVnode.$tag$ = null; + rootVnode.$flags$ |= 4 /* isHost */; + hostRef.$vnode$ = rootVnode; + rootVnode.$elm$ = oldVNode.$elm$ = (BUILD.shadowDom ? hostElm.shadowRoot || hostElm : hostElm); + if (BUILD.scoped || BUILD.shadowDom) { + scopeId = hostElm['s-sc']; + } + if (BUILD.slotRelocation) { + contentRef = hostElm['s-cr']; + useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0; + // always reset + checkSlotFallbackVisibility = false; + } + // synchronous patch + patch(oldVNode, rootVnode); + if (BUILD.slotRelocation) { + // while we're moving nodes around existing nodes, temporarily disable + // the disconnectCallback from working + plt.$flags$ |= 1 /* isTmpDisconnected */; + if (checkSlotRelocate) { + relocateSlotContent(rootVnode.$elm$); + let relocateData; + let nodeToRelocate; + let orgLocationNode; + let parentNodeRef; + let insertBeforeNode; + let refNode; + let i = 0; + for (; i < relocateNodes.length; i++) { + relocateData = relocateNodes[i]; + nodeToRelocate = relocateData.$nodeToRelocate$; + if (!nodeToRelocate['s-ol']) { + // add a reference node marking this node's original location + // keep a reference to this node for later lookups + orgLocationNode = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : doc.createTextNode(''); + orgLocationNode['s-nr'] = nodeToRelocate; + nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate); + } + } + for (i = 0; i < relocateNodes.length; i++) { + relocateData = relocateNodes[i]; + nodeToRelocate = relocateData.$nodeToRelocate$; + if (relocateData.$slotRefNode$) { + // by default we're just going to insert it directly + // after the slot reference node + parentNodeRef = relocateData.$slotRefNode$.parentNode; + insertBeforeNode = relocateData.$slotRefNode$.nextSibling; + orgLocationNode = nodeToRelocate['s-ol']; + while ((orgLocationNode = orgLocationNode.previousSibling)) { + refNode = orgLocationNode['s-nr']; + if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) { + refNode = refNode.nextSibling; + if (!refNode || !refNode['s-nr']) { + insertBeforeNode = refNode; + break; + } + } + } + if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) || nodeToRelocate.nextSibling !== insertBeforeNode) { + // we've checked that it's worth while to relocate + // since that the node to relocate + // has a different next sibling or parent relocated + if (nodeToRelocate !== insertBeforeNode) { + if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) { + // probably a component in the index.html that doesn't have it's hostname set + nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName; + } + // add it back to the dom but in its new home + parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode); + } + } + } + else { + // this node doesn't have a slot home to go to, so let's hide it + if (nodeToRelocate.nodeType === 1 /* ElementNode */) { + nodeToRelocate.hidden = true; + } + } + } + } + if (checkSlotFallbackVisibility) { + updateFallbackSlotVisibility(rootVnode.$elm$); + } + // done moving nodes around + // allow the disconnect callback to work again + plt.$flags$ &= ~1 /* isTmpDisconnected */; + // always reset + relocateNodes.length = 0; + } +}; +// slot comment debug nodes only created with the `--debug` flag +// otherwise these nodes are text nodes w/out content +const slotReferenceDebugNode = (slotVNode) => doc.createComment(` (host=${hostTagName.toLowerCase()})`); +const originalLocationDebugNode = (nodeToRelocate) => doc.createComment(`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate['s-hn']})` : `[${nodeToRelocate.textContent}]`)); +const getElement = (ref) => (BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref); +const createEvent = (ref, name, flags) => { + const elm = getElement(ref); + return { + emit: (detail) => { + if (BUILD.isDev && !elm.isConnected) { + consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`); + } + return emitEvent(elm, name, { + bubbles: !!(flags & 4 /* Bubbles */), + composed: !!(flags & 2 /* Composed */), + cancelable: !!(flags & 1 /* Cancellable */), + detail, + }); + }, + }; +}; +const emitEvent = (elm, name, opts) => { + const ev = plt.ce(name, opts); + elm.dispatchEvent(ev); + return ev; +}; +const attachToAncestor = (hostRef, ancestorComponent) => { + if (BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) { + ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r))); + } +}; +const scheduleUpdate = (hostRef, isInitialLoad) => { + if (BUILD.taskQueue && BUILD.updatable) { + hostRef.$flags$ |= 16 /* isQueuedForUpdate */; + } + if (BUILD.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) { + hostRef.$flags$ |= 512 /* needsRerender */; + return; + } + attachToAncestor(hostRef, hostRef.$ancestorComponent$); + // there is no ancestorc omponent or the ancestor component + // has already fired off its lifecycle update then + // fire off the initial update + const dispatch = () => dispatchHooks(hostRef, isInitialLoad); + return BUILD.taskQueue ? writeTask(dispatch) : dispatch; +}; +const dispatchHooks = (hostRef, isInitialLoad) => { + const elm = hostRef.$hostElement$; + const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$); + const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm; + let promise; + if (isInitialLoad) { + if (BUILD.lazyLoad && BUILD.hostListener) { + hostRef.$flags$ |= 256 /* isListenReady */; + if (hostRef.$queuedListeners$) { + hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event)); + hostRef.$queuedListeners$ = null; + } + } + emitLifecycleEvent(elm, 'componentWillLoad'); + if (BUILD.cmpWillLoad) { + promise = safeCall(instance, 'componentWillLoad'); + } + } + else { + emitLifecycleEvent(elm, 'componentWillUpdate'); + if (BUILD.cmpWillUpdate) { + promise = safeCall(instance, 'componentWillUpdate'); + } + } + emitLifecycleEvent(elm, 'componentWillRender'); + if (BUILD.cmpWillRender) { + promise = then(promise, () => safeCall(instance, 'componentWillRender')); + } + endSchedule(); + return then(promise, () => updateComponent(hostRef, instance, isInitialLoad)); +}; +const updateComponent = (hostRef, instance, isInitialLoad) => { + // updateComponent + const elm = hostRef.$hostElement$; + const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$); + const rc = elm['s-rc']; + if (BUILD.style && isInitialLoad) { + // DOM WRITE! + attachStyles(hostRef); + } + const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$); + if (BUILD.isDev) { + hostRef.$flags$ |= 1024 /* devOnRender */; + } + if (BUILD.hasRenderFn || BUILD.reflect) { + if (BUILD.vdomRender || BUILD.reflect) { + // looks like we've got child nodes to render into this host element + // or we need to update the css class/attrs on the host element + // DOM WRITE! + renderVdom(hostRef, callRender(hostRef, instance)); + } + else { + elm.textContent = callRender(hostRef, instance); + } + } + if (BUILD.cssVarShim && plt.$cssShim$) { + plt.$cssShim$.updateHost(elm); + } + if (BUILD.isDev) { + hostRef.$renderCount$++; + hostRef.$flags$ &= ~1024 /* devOnRender */; + } + if (BUILD.hydrateServerSide) { + try { + // manually connected child components during server-side hydrate + serverSideConnected(elm); + if (isInitialLoad) { + // using only during server-side hydrate + if (hostRef.$cmpMeta$.$flags$ & 1 /* shadowDomEncapsulation */) { + elm['s-en'] = ''; + } + else if (hostRef.$cmpMeta$.$flags$ & 2 /* scopedCssEncapsulation */) { + elm['s-en'] = 'c'; + } + } + } + catch (e) { + consoleError(e); + } + } + if (BUILD.asyncLoading && rc) { + // ok, so turns out there are some child host elements + // waiting on this parent element to load + // let's fire off all update callbacks waiting + rc.map(cb => cb()); + elm['s-rc'] = undefined; + } + endRender(); + endUpdate(); + if (BUILD.asyncLoading) { + const childrenPromises = elm['s-p']; + const postUpdate = () => postUpdateComponent(hostRef); + if (childrenPromises.length === 0) { + postUpdate(); + } + else { + Promise.all(childrenPromises).then(postUpdate); + hostRef.$flags$ |= 4 /* isWaitingForChildren */; + childrenPromises.length = 0; + } + } + else { + postUpdateComponent(hostRef); + } +}; +const callRender = (hostRef, instance) => { + // in order for bundlers to correctly treeshake the BUILD object + // we need to ensure BUILD is not deoptimized within a try/catch + // https://rollupjs.org/guide/en/#treeshake tryCatchDeoptimization + const allRenderFn = BUILD.allRenderFn ? true : false; + const lazyLoad = BUILD.lazyLoad ? true : false; + const taskQueue = BUILD.taskQueue ? true : false; + const updatable = BUILD.updatable ? true : false; + try { + renderingRef = instance; + instance = allRenderFn ? instance.render() : instance.render && instance.render(); + if (updatable && taskQueue) { + hostRef.$flags$ &= ~16 /* isQueuedForUpdate */; + } + if (updatable || lazyLoad) { + hostRef.$flags$ |= 2 /* hasRendered */; + } + } + catch (e) { + consoleError(e); + } + renderingRef = null; + return instance; +}; +const getRenderingRef = () => renderingRef; +const postUpdateComponent = (hostRef) => { + const tagName = hostRef.$cmpMeta$.$tagName$; + const elm = hostRef.$hostElement$; + const endPostUpdate = createTime('postUpdate', tagName); + const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm; + const ancestorComponent = hostRef.$ancestorComponent$; + if (BUILD.cmpDidRender) { + if (BUILD.isDev) { + hostRef.$flags$ |= 1024 /* devOnRender */; + } + safeCall(instance, 'componentDidRender'); + if (BUILD.isDev) { + hostRef.$flags$ &= ~1024 /* devOnRender */; + } + } + emitLifecycleEvent(elm, 'componentDidRender'); + if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) { + hostRef.$flags$ |= 64 /* hasLoadedComponent */; + if (BUILD.asyncLoading && BUILD.cssAnnotations) { + // DOM WRITE! + addHydratedFlag(elm); + } + if (BUILD.cmpDidLoad) { + if (BUILD.isDev) { + hostRef.$flags$ |= 2048 /* devOnDidLoad */; + } + safeCall(instance, 'componentDidLoad'); + if (BUILD.isDev) { + hostRef.$flags$ &= ~2048 /* devOnDidLoad */; + } + } + emitLifecycleEvent(elm, 'componentDidLoad'); + endPostUpdate(); + if (BUILD.asyncLoading) { + hostRef.$onReadyResolve$(elm); + if (!ancestorComponent) { + appDidLoad(tagName); + } + } + } + else { + if (BUILD.cmpDidUpdate) { + // we've already loaded this component + // fire off the user's componentDidUpdate method (if one was provided) + // componentDidUpdate runs AFTER render() has been called + // and all child components have finished updating + if (BUILD.isDev) { + hostRef.$flags$ |= 1024 /* devOnRender */; + } + safeCall(instance, 'componentDidUpdate'); + if (BUILD.isDev) { + hostRef.$flags$ &= ~1024 /* devOnRender */; + } + } + emitLifecycleEvent(elm, 'componentDidUpdate'); + endPostUpdate(); + } + if (BUILD.hotModuleReplacement) { + elm['s-hmr-load'] && elm['s-hmr-load'](); + } + if (BUILD.method && BUILD.lazyLoad) { + hostRef.$onInstanceResolve$(elm); + } + // load events fire from bottom to top + // the deepest elements load first then bubbles up + if (BUILD.asyncLoading) { + if (hostRef.$onRenderResolve$) { + hostRef.$onRenderResolve$(); + hostRef.$onRenderResolve$ = undefined; + } + if (hostRef.$flags$ & 512 /* needsRerender */) { + nextTick(() => scheduleUpdate(hostRef, false)); + } + hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */); + } + // ( •_•) + // ( •_•)>⌐■-■ + // (⌐■_■) +}; +const forceUpdate = (ref) => { + if (BUILD.updatable) { + const hostRef = getHostRef(ref); + const isConnected = hostRef.$hostElement$.isConnected; + if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) { + scheduleUpdate(hostRef, false); + } + // Returns "true" when the forced update was successfully scheduled + return isConnected; + } + return false; +}; +const appDidLoad = (who) => { + // on appload + // we have finish the first big initial render + if (BUILD.cssAnnotations) { + addHydratedFlag(doc.documentElement); + } + if (BUILD.asyncQueue) { + plt.$flags$ |= 2 /* appLoaded */; + } + nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } })); + if (BUILD.profile && performance.measure) { + performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, 'st:app:start'); + } +}; +const safeCall = (instance, method, arg) => { + if (instance && instance[method]) { + try { + return instance[method](arg); + } + catch (e) { + consoleError(e); + } + } + return undefined; +}; +const then = (promise, thenFn) => { + return promise && promise.then ? promise.then(thenFn) : thenFn(); +}; +const emitLifecycleEvent = (elm, lifecycleName) => { + if (BUILD.lifecycleDOMEvents) { + emitEvent(elm, 'stencil_' + lifecycleName, { + bubbles: true, + composed: true, + detail: { + namespace: NAMESPACE, + }, + }); + } +}; +const addHydratedFlag = (elm) => (BUILD.hydratedClass ? elm.classList.add('hydrated') : BUILD.hydratedAttribute ? elm.setAttribute('hydrated', '') : undefined); +const serverSideConnected = (elm) => { + const children = elm.children; + if (children != null) { + for (let i = 0, ii = children.length; i < ii; i++) { + const childElm = children[i]; + if (typeof childElm.connectedCallback === 'function') { + childElm.connectedCallback(); + } + serverSideConnected(childElm); + } + } +}; +const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => { + const endHydrate = createTime('hydrateClient', tagName); + const shadowRoot = hostElm.shadowRoot; + const childRenderNodes = []; + const slotNodes = []; + const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null; + const vnode = (hostRef.$vnode$ = newVNode(tagName, null)); + if (!plt.$orgLocNodes$) { + initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map())); + } + hostElm[HYDRATE_ID] = hostId; + hostElm.removeAttribute(HYDRATE_ID); + clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId); + childRenderNodes.map(c => { + const orgLocationId = c.$hostId$ + '.' + c.$nodeId$; + const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId); + const node = c.$elm$; + if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') { + orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling); + } + if (!shadowRoot) { + node['s-hn'] = tagName; + if (orgLocationNode) { + node['s-ol'] = orgLocationNode; + node['s-ol']['s-nr'] = node; + } + } + plt.$orgLocNodes$.delete(orgLocationId); + }); + if (BUILD.shadowDom && shadowRoot) { + shadowRootNodes.map(shadowRootNode => { + if (shadowRootNode) { + shadowRoot.appendChild(shadowRootNode); + } + }); + } + endHydrate(); +}; +const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => { + let childNodeType; + let childIdSplt; + let childVNode; + let i; + if (node.nodeType === 1 /* ElementNode */) { + childNodeType = node.getAttribute(HYDRATE_CHILD_ID); + if (childNodeType) { + // got the node data from the element's attribute + // `${hostId}.${nodeId}.${depth}.${index}` + childIdSplt = childNodeType.split('.'); + if (childIdSplt[0] === hostId || childIdSplt[0] === '0') { + childVNode = { + $flags$: 0, + $hostId$: childIdSplt[0], + $nodeId$: childIdSplt[1], + $depth$: childIdSplt[2], + $index$: childIdSplt[3], + $tag$: node.tagName.toLowerCase(), + $elm$: node, + $attrs$: null, + $children$: null, + $key$: null, + $name$: null, + $text$: null, + }; + childRenderNodes.push(childVNode); + node.removeAttribute(HYDRATE_CHILD_ID); + // this is a new child vnode + // so ensure its parent vnode has the vchildren array + if (!parentVNode.$children$) { + parentVNode.$children$ = []; + } + // add our child vnode to a specific index of the vnode's children + parentVNode.$children$[childVNode.$index$] = childVNode; + // this is now the new parent vnode for all the next child checks + parentVNode = childVNode; + if (shadowRootNodes && childVNode.$depth$ === '0') { + shadowRootNodes[childVNode.$index$] = childVNode.$elm$; + } + } + } + // recursively drill down, end to start so we can remove nodes + for (i = node.childNodes.length - 1; i >= 0; i--) { + clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId); + } + if (node.shadowRoot) { + // keep drilling down through the shadow root nodes + for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) { + clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId); + } + } + } + else if (node.nodeType === 8 /* CommentNode */) { + // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}` + childIdSplt = node.nodeValue.split('.'); + if (childIdSplt[1] === hostId || childIdSplt[1] === '0') { + // comment node for either the host id or a 0 host id + childNodeType = childIdSplt[0]; + childVNode = { + $flags$: 0, + $hostId$: childIdSplt[1], + $nodeId$: childIdSplt[2], + $depth$: childIdSplt[3], + $index$: childIdSplt[4], + $elm$: node, + $attrs$: null, + $children$: null, + $key$: null, + $name$: null, + $tag$: null, + $text$: null, + }; + if (childNodeType === TEXT_NODE_ID) { + childVNode.$elm$ = node.nextSibling; + if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) { + childVNode.$text$ = childVNode.$elm$.textContent; + childRenderNodes.push(childVNode); + // remove the text comment since it's no longer needed + node.remove(); + if (!parentVNode.$children$) { + parentVNode.$children$ = []; + } + parentVNode.$children$[childVNode.$index$] = childVNode; + if (shadowRootNodes && childVNode.$depth$ === '0') { + shadowRootNodes[childVNode.$index$] = childVNode.$elm$; + } + } + } + else if (childVNode.$hostId$ === hostId) { + // this comment node is specifcally for this host id + if (childNodeType === SLOT_NODE_ID) { + // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`; + childVNode.$tag$ = 'slot'; + if (childIdSplt[5]) { + node['s-sn'] = childVNode.$name$ = childIdSplt[5]; + } + else { + node['s-sn'] = ''; + } + node['s-sr'] = true; + if (BUILD.shadowDom && shadowRootNodes) { + // browser support shadowRoot and this is a shadow dom component + // create an actual slot element + childVNode.$elm$ = doc.createElement(childVNode.$tag$); + if (childVNode.$name$) { + // add the slot name attribute + childVNode.$elm$.setAttribute('name', childVNode.$name$); + } + // insert the new slot element before the slot comment + node.parentNode.insertBefore(childVNode.$elm$, node); + // remove the slot comment since it's not needed for shadow + node.remove(); + if (childVNode.$depth$ === '0') { + shadowRootNodes[childVNode.$index$] = childVNode.$elm$; + } + } + slotNodes.push(childVNode); + if (!parentVNode.$children$) { + parentVNode.$children$ = []; + } + parentVNode.$children$[childVNode.$index$] = childVNode; + } + else if (childNodeType === CONTENT_REF_ID) { + // `${CONTENT_REF_ID}.${hostId}`; + if (BUILD.shadowDom && shadowRootNodes) { + // remove the content ref comment since it's not needed for shadow + node.remove(); + } + else if (BUILD.slotRelocation) { + hostElm['s-cr'] = node; + node['s-cn'] = true; + } + } + } + } + } + else if (parentVNode && parentVNode.$tag$ === 'style') { + const vnode = newVNode(null, node.textContent); + vnode.$elm$ = node; + vnode.$index$ = '0'; + parentVNode.$children$ = [vnode]; + } +}; +const initializeDocumentHydrate = (node, orgLocNodes) => { + if (node.nodeType === 1 /* ElementNode */) { + let i = 0; + for (; i < node.childNodes.length; i++) { + initializeDocumentHydrate(node.childNodes[i], orgLocNodes); + } + if (node.shadowRoot) { + for (i = 0; i < node.shadowRoot.childNodes.length; i++) { + initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes); + } + } + } + else if (node.nodeType === 8 /* CommentNode */) { + const childIdSplt = node.nodeValue.split('.'); + if (childIdSplt[0] === ORG_LOCATION_ID) { + orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node); + node.nodeValue = ''; + // useful to know if the original location is + // the root light-dom of a shadow dom component + node['s-en'] = childIdSplt[3]; + } + } +}; +const parsePropertyValue = (propValue, propType) => { + // ensure this value is of the correct prop type + if (propValue != null && !isComplexType(propValue)) { + if (BUILD.propBoolean && propType & 4 /* Boolean */) { + // 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 + return propValue === 'false' ? false : propValue === '' || !!propValue; + } + if (BUILD.propNumber && propType & 2 /* Number */) { + // force it to be a number + return parseFloat(propValue); + } + if (BUILD.propString && propType & 1 /* String */) { + // could have been passed as a number or boolean + // but we still want it as a string + return String(propValue); + } + // redundant return here for better minification + return propValue; + } + // not sure exactly what type we want + // so no need to change to a different type + return propValue; +}; +const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName); +const setValue = (ref, propName, newVal, cmpMeta) => { + // check our new property value against our internal value + const hostRef = getHostRef(ref); + const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : ref; + const oldVal = hostRef.$instanceValues$.get(propName); + const flags = hostRef.$flags$; + const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm; + newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]); + if ((!BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) { + // gadzooks! the property's value has changed!! + // set our new value! + hostRef.$instanceValues$.set(propName, newVal); + if (BUILD.isDev) { + if (hostRef.$flags$ & 1024 /* devOnRender */) { + consoleDevWarn(`The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`, '\nElement', elm, '\nNew value', newVal, '\nOld value', oldVal); + } + else if (hostRef.$flags$ & 2048 /* devOnDidLoad */) { + consoleDevWarn(`The state/prop "${propName}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`, '\nElement', elm, '\nNew value', newVal, '\nOld value', oldVal); + } + } + if (!BUILD.lazyLoad || instance) { + // get an array of method names of watch functions to call + if (BUILD.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) { + const watchMethods = cmpMeta.$watchers$[propName]; + if (watchMethods) { + // this instance is watching for when this property changed + watchMethods.map(watchMethodName => { + try { + // fire off each of the watch methods that are watching this property + instance[watchMethodName](newVal, oldVal, propName); + } + catch (e) { + consoleError(e); + } + }); + } + } + if (BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) { + if (BUILD.cmpShouldUpdate && instance.componentShouldUpdate) { + if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) { + return; + } + } + // looks like this value actually changed, so we've got work to do! + // but only if we've already rendered, otherwise just chill out + // queue that we need to do an update, but don't worry about queuing + // up millions cuz this function ensures it only runs once + scheduleUpdate(hostRef, false); + } + } + } +}; +const proxyComponent = (Cstr, cmpMeta, flags) => { + if (BUILD.member && cmpMeta.$members$) { + if (BUILD.watchCallback && Cstr.watchers) { + cmpMeta.$watchers$ = Cstr.watchers; + } + // It's better to have a const than two Object.entries() + const members = Object.entries(cmpMeta.$members$); + const prototype = Cstr.prototype; + members.map(([memberName, [memberFlags]]) => { + if ((BUILD.prop || BUILD.state) && (memberFlags & 31 /* Prop */ || ((!BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) { + // proxyComponent - prop + Object.defineProperty(prototype, memberName, { + get() { + // proxyComponent, get value + return getValue(this, memberName); + }, + set(newValue) { + if ( + // only during dev time + BUILD.isDev && + // we are proxing the instance (not element) + (flags & 1 /* isElementConstructor */) === 0 && + // the member is a non-mutable prop + (memberFlags & (31 /* Prop */ | 1024 /* Mutable */)) === 31 /* Prop */) { + consoleDevWarn(`@Prop() "${memberName}" on "${cmpMeta.$tagName$}" cannot be modified.\nFurther information: https://stenciljs.com/docs/properties#prop-mutability`); + } + // proxyComponent, set value + setValue(this, memberName, newValue, cmpMeta); + }, + configurable: true, + enumerable: true, + }); + } + else if (BUILD.lazyLoad && BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) { + // proxyComponent - method + Object.defineProperty(prototype, memberName, { + value(...args) { + const ref = getHostRef(this); + return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args)); + }, + }); + } + }); + if (BUILD.observeAttribute && (!BUILD.lazyLoad || flags & 1 /* isElementConstructor */)) { + const attrNameToPropName = new Map(); + prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) { + plt.jmp(() => { + const propName = attrNameToPropName.get(attrName); + this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue; + }); + }; + // create an array of attributes to observe + // and also create a map of html attribute name to js property name + Cstr.observedAttributes = members + .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes + .map(([propName, m]) => { + const attrName = m[1] || propName; + attrNameToPropName.set(attrName, propName); + if (BUILD.reflect && m[0] & 512 /* ReflectAttr */) { + cmpMeta.$attrsToReflect$.push([propName, attrName]); + } + return attrName; + }); + } + } + return Cstr; +}; +const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => { + // initializeComponent + if ((BUILD.lazyLoad || BUILD.hydrateServerSide || BUILD.style) && (hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) { + if (BUILD.lazyLoad || BUILD.hydrateClientSide) { + // we haven't initialized this element yet + hostRef.$flags$ |= 32 /* hasInitializedComponent */; + // lazy loaded components + // request the component's implementation to be + // wired up with the host element + Cstr = loadModule(cmpMeta, hostRef, hmrVersionId); + if (Cstr.then) { + // Await creates a micro-task avoid if possible + const endLoad = uniqueTime(`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`, `[Stencil] Load module for <${cmpMeta.$tagName$}>`); + Cstr = await Cstr; + endLoad(); + } + if ((BUILD.isDev || BUILD.isDebug) && !Cstr) { + throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`); + } + if (BUILD.member && !Cstr.isProxied) { + // we'eve never proxied this Constructor before + // let's add the getters/setters to its prototype before + // the first time we create an instance of the implementation + if (BUILD.watchCallback) { + cmpMeta.$watchers$ = Cstr.watchers; + } + proxyComponent(Cstr, cmpMeta, 2 /* proxyState */); + Cstr.isProxied = true; + } + const endNewInstance = createTime('createInstance', cmpMeta.$tagName$); + // ok, time to construct the instance + // but let's keep track of when we start and stop + // so that the getters/setters don't incorrectly step on data + if (BUILD.member) { + hostRef.$flags$ |= 8 /* isConstructingInstance */; + } + // construct the lazy-loaded component implementation + // passing the hostRef is very important during + // construction in order to directly wire together the + // host element and the lazy-loaded instance + try { + new Cstr(hostRef); + } + catch (e) { + consoleError(e); + } + if (BUILD.member) { + hostRef.$flags$ &= ~8 /* isConstructingInstance */; + } + if (BUILD.watchCallback) { + hostRef.$flags$ |= 128 /* isWatchReady */; + } + endNewInstance(); + fireConnectedCallback(hostRef.$lazyInstance$); + } + else { + // sync constructor component + Cstr = elm.constructor; + hostRef.$flags$ |= 128 /* isWatchReady */ | 32 /* hasInitializedComponent */; + } + if (BUILD.style && Cstr.style) { + // this component has styles but we haven't registered them yet + let style = Cstr.style; + if (BUILD.mode && typeof style !== 'string') { + style = style[(hostRef.$modeName$ = computeMode(elm))]; + if (BUILD.hydrateServerSide && hostRef.$modeName$) { + elm.setAttribute('s-mode', hostRef.$modeName$); + } + } + const scopeId = getScopeId(cmpMeta, hostRef.$modeName$); + if (!styles.has(scopeId)) { + const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$); + if (!BUILD.hydrateServerSide && BUILD.shadowDom && BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) { + style = await __sc_import_ionicons_site('./shadow-css-fb1c6168.js').then(m => m.scopeCss(style, scopeId, false)); + } + registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)); + endRegisterStyles(); + } + } + } + // we've successfully created a lazy instance + const ancestorComponent = hostRef.$ancestorComponent$; + const schedule = () => scheduleUpdate(hostRef, true); + if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) { + // this is the intial load and this component it has an ancestor component + // but the ancestor component has NOT fired its will update lifecycle yet + // so let's just cool our jets and wait for the ancestor to continue first + // this will get fired off when the ancestor component + // finally gets around to rendering its lazy self + // fire off the initial update + ancestorComponent['s-rc'].push(schedule); + } + else { + schedule(); + } +}; +const fireConnectedCallback = (instance) => { + if (BUILD.lazyLoad && BUILD.connectedCallback) { + safeCall(instance, 'connectedCallback'); + } +}; +const connectedCallback = (elm) => { + if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) { + const hostRef = getHostRef(elm); + const cmpMeta = hostRef.$cmpMeta$; + const endConnected = createTime('connectedCallback', cmpMeta.$tagName$); + if (BUILD.hostListenerTargetParent) { + // only run if we have listeners being attached to a parent + addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true); + } + if (!(hostRef.$flags$ & 1 /* hasConnected */)) { + // first time this component has connected + hostRef.$flags$ |= 1 /* hasConnected */; + let hostId; + if (BUILD.hydrateClientSide) { + hostId = elm.getAttribute(HYDRATE_ID); + if (hostId) { + if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) { + const scopeId = BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode')) : addStyle(elm.shadowRoot, cmpMeta); + elm.classList.remove(scopeId + '-h', scopeId + '-s'); + } + initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef); + } + } + if (BUILD.slotRelocation && !hostId) { + // initUpdate + // if the slot polyfill is required we'll need to put some nodes + // in here to act as original content anchors as we move nodes around + // host element has been connected to the DOM + if (BUILD.hydrateServerSide || ((BUILD.slot || BUILD.shadowDom) && cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) { + setContentReference(elm); + } + } + if (BUILD.asyncLoading) { + // find the first ancestor component (if there is one) and register + // this component as one of the actively loading child components for its ancestor + let ancestorComponent = elm; + while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) { + // climb up the ancestors looking for the first + // component that hasn't finished its lifecycle update yet + if ((BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute('s-id') && ancestorComponent['s-p']) || + ancestorComponent['s-p']) { + // we found this components first ancestor component + // keep a reference to this component's ancestor component + attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent)); + break; + } + } + } + // Lazy properties + // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties + if (BUILD.prop && BUILD.lazyLoad && !BUILD.hydrateServerSide && cmpMeta.$members$) { + Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => { + if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) { + const value = elm[memberName]; + delete elm[memberName]; + elm[memberName] = value; + } + }); + } + if (BUILD.initializeNextTick) { + // connectedCallback, taskQueue, initialLoad + // angular sets attribute AFTER connectCallback + // https://github.com/angular/angular/issues/18909 + // https://github.com/angular/angular/issues/19940 + nextTick(() => initializeComponent(elm, hostRef, cmpMeta)); + } + else { + initializeComponent(elm, hostRef, cmpMeta); + } + } + else { + // not the first time this has connected + // reattach any event listeners to the host + // since they would have been removed when disconnected + addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false); + // fire off connectedCallback() on component instance + fireConnectedCallback(hostRef.$lazyInstance$); + } + endConnected(); + } +}; +const setContentReference = (elm) => { + // only required when we're NOT using native shadow dom (slot) + // or this browser doesn't support native shadow dom + // and this host element was NOT created with SSR + // let's pick out the inner content for slot projection + // create a node to represent where the original + // content was first placed, which is useful later on + const contentRefElm = (elm['s-cr'] = doc.createComment(BUILD.isDebug ? `content-ref (host=${elm.localName})` : '')); + contentRefElm['s-cn'] = true; + elm.insertBefore(contentRefElm, elm.firstChild); +}; +const disconnectedCallback = (elm) => { + if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) { + const hostRef = getHostRef(elm); + const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm; + if (BUILD.hostListener) { + if (hostRef.$rmListeners$) { + hostRef.$rmListeners$.map(rmListener => rmListener()); + hostRef.$rmListeners$ = undefined; + } + } + // clear CSS var-shim tracking + if (BUILD.cssVarShim && plt.$cssShim$) { + plt.$cssShim$.removeHost(elm); + } + if (BUILD.lazyLoad && BUILD.disconnectedCallback) { + safeCall(instance, 'disconnectedCallback'); + } + if (BUILD.cmpDidUnload) { + safeCall(instance, 'componentDidUnload'); + } + } +}; +const defineCustomElement = (Cstr, compactMeta) => { + customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta)); +}; +const proxyCustomElement = (Cstr, compactMeta) => { + const cmpMeta = { + $flags$: compactMeta[0], + $tagName$: compactMeta[1], + }; + if (BUILD.member) { + cmpMeta.$members$ = compactMeta[2]; + } + if (BUILD.hostListener) { + cmpMeta.$listeners$ = compactMeta[3]; + } + if (BUILD.watchCallback) { + cmpMeta.$watchers$ = Cstr.$watchers$; + } + if (BUILD.reflect) { + cmpMeta.$attrsToReflect$ = []; + } + if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) { + cmpMeta.$flags$ |= 8 /* needsShadowDomShim */; + } + const originalConnectedCallback = Cstr.prototype.connectedCallback; + const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback; + Object.assign(Cstr.prototype, { + __registerHost() { + registerHost(this, cmpMeta); + }, + connectedCallback() { + connectedCallback(this); + if (BUILD.connectedCallback && originalConnectedCallback) { + originalConnectedCallback.call(this); + } + }, + disconnectedCallback() { + disconnectedCallback(this); + if (BUILD.disconnectedCallback && originalDisconnectedCallback) { + originalDisconnectedCallback.call(this); + } + }, + }); + Cstr.is = cmpMeta.$tagName$; + return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */); +}; +const forceModeUpdate = (elm) => { + if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) { + const mode = computeMode(elm); + const hostRef = getHostRef(elm); + if (hostRef.$modeName$ !== mode) { + const cmpMeta = hostRef.$cmpMeta$; + const oldScopeId = elm['s-sc']; + const scopeId = getScopeId(cmpMeta, mode); + const style = elm.constructor.style[mode]; + const flags = cmpMeta.$flags$; + if (style) { + if (!styles.has(scopeId)) { + registerStyle(scopeId, style, !!(flags & 1 /* shadowDomEncapsulation */)); + } + hostRef.$modeName$ = mode; + elm.classList.remove(oldScopeId + '-h', oldScopeId + '-s'); + attachStyles(hostRef); + forceUpdate(elm); + } + } + } +}; +const attachShadow = (el) => { + if (supportsShadow) { + el.attachShadow({ mode: 'open' }); + } + else { + el.shadowRoot = el; + } +}; +const hmrStart = (elm, cmpMeta, hmrVersionId) => { + // ¯\_(ツ)_/¯ + const hostRef = getHostRef(elm); + // reset state flags to only have been connected + hostRef.$flags$ = 1 /* hasConnected */; + // TODO + // detatch any event listeners that may have been added + // because we're not passing an exact event name it'll + // remove all of this element's event, which is good + // create a callback for when this component finishes hmr + elm['s-hmr-load'] = () => { + // finished hmr for this element + delete elm['s-hmr-load']; + }; + // re-initialize the component + initializeComponent(elm, hostRef, cmpMeta, hmrVersionId); +}; +const patchCloneNode = (HostElementPrototype) => { + const orgCloneNode = HostElementPrototype.cloneNode; + HostElementPrototype.cloneNode = function (deep) { + const srcNode = this; + const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false; + const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false); + if (BUILD.slot && !isShadowDom && deep) { + let i = 0; + let slotted, nonStencilNode; + let stencilPrivates = ['s-id', 's-cr', 's-lr', 's-rc', 's-sc', 's-p', 's-cn', 's-sr', 's-sn', 's-hn', 's-ol', 's-nr', 's-si']; + for (; i < srcNode.childNodes.length; i++) { + slotted = srcNode.childNodes[i]['s-nr']; + nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]); + if (slotted) { + if (BUILD.appendChildSlotFix && clonedNode.__appendChild) { + clonedNode.__appendChild(slotted.cloneNode(true)); + } + else { + clonedNode.appendChild(slotted.cloneNode(true)); + } + } + if (nonStencilNode) { + clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true)); + } + } + } + return clonedNode; + }; +}; +const patchSlotAppendChild = (HostElementPrototype) => { + HostElementPrototype.__appendChild = HostElementPrototype.appendChild; + HostElementPrototype.appendChild = function (newChild) { + const slotName = (newChild['s-sn'] = getSlotName(newChild)); + const slotNode = getHostSlotNode(this.childNodes, slotName); + if (slotNode) { + const slotChildNodes = getHostSlotChildNodes(slotNode, slotName); + const appendAfter = slotChildNodes[slotChildNodes.length - 1]; + return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling); + } + return this.__appendChild(newChild); + }; +}; +const patchChildSlotNodes = (elm, cmpMeta) => { + class FakeNodeList extends Array { + item(n) { + return this[n]; + } + } + if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) { + const childNodesFn = elm.__lookupGetter__('childNodes'); + Object.defineProperty(elm, 'children', { + get() { + return this.childNodes.map((n) => n.nodeType === 1); + }, + }); + Object.defineProperty(elm, 'childElementCount', { + get() { + return elm.children.length; + }, + }); + Object.defineProperty(elm, 'childNodes', { + get() { + const childNodes = childNodesFn.call(this); + if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) { + const result = new FakeNodeList(); + for (let i = 0; i < childNodes.length; i++) { + const slot = childNodes[i]['s-nr']; + if (slot) { + result.push(slot); + } + } + return result; + } + return FakeNodeList.from(childNodes); + }, + }); + } +}; +const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || ''; +const getHostSlotNode = (childNodes, slotName) => { + let i = 0; + let childNode; + for (; i < childNodes.length; i++) { + childNode = childNodes[i]; + if (childNode['s-sr'] && childNode['s-sn'] === slotName) { + return childNode; + } + childNode = getHostSlotNode(childNode.childNodes, slotName); + if (childNode) { + return childNode; + } + } + return null; +}; +const getHostSlotChildNodes = (n, slotName) => { + const childNodes = [n]; + while ((n = n.nextSibling) && n['s-sn'] === slotName) { + childNodes.push(n); + } + return childNodes; +}; +const bootstrapLazy = (lazyBundles, options = {}) => { + if (BUILD.profile && performance.mark) { + performance.mark('st:app:start'); + } + installDevTools(); + const endBootstrap = createTime('bootstrapLazy'); + const cmpTags = []; + const exclude = options.exclude || []; + const customElements = win.customElements; + const head = doc.head; + const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]'); + const visibilityStyle = /*@__PURE__*/ doc.createElement('style'); + const deferredConnectedCallbacks = []; + const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`); + let appLoadFallback; + let isBootstrapping = true; + let i = 0; + Object.assign(plt, options); + plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href; + if (BUILD.asyncQueue) { + if (options.syncQueue) { + plt.$flags$ |= 4 /* queueSync */; + } + } + if (BUILD.hydrateClientSide) { + // If the app is already hydrated there is not point to disable the + // async queue. This will improve the first input delay + plt.$flags$ |= 2 /* appLoaded */; + } + if (BUILD.hydrateClientSide && BUILD.shadowDom) { + for (; i < styles.length; i++) { + registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true); + } + } + lazyBundles.map(lazyBundle => lazyBundle[1].map(compactMeta => { + const cmpMeta = { + $flags$: compactMeta[0], + $tagName$: compactMeta[1], + $members$: compactMeta[2], + $listeners$: compactMeta[3], + }; + if (BUILD.member) { + cmpMeta.$members$ = compactMeta[2]; + } + if (BUILD.hostListener) { + cmpMeta.$listeners$ = compactMeta[3]; + } + if (BUILD.reflect) { + cmpMeta.$attrsToReflect$ = []; + } + if (BUILD.watchCallback) { + cmpMeta.$watchers$ = {}; + } + if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) { + cmpMeta.$flags$ |= 8 /* needsShadowDomShim */; + } + const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$; + const HostElement = class extends HTMLElement { + // StencilLazyHost + constructor(self) { + // @ts-ignore + super(self); + self = this; + registerHost(self, cmpMeta); + if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) { + // this component is using shadow dom + // and this browser supports shadow dom + // add the read-only property "shadowRoot" to the host element + // adding the shadow root build conditionals to minimize runtime + if (supportsShadow) { + if (BUILD.shadowDelegatesFocus) { + self.attachShadow({ + mode: 'open', + delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */), + }); + } + else { + self.attachShadow({ mode: 'open' }); + } + } + else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) { + self.shadowRoot = self; + } + } + if (BUILD.slotChildNodesFix) { + patchChildSlotNodes(self, cmpMeta); + } + } + connectedCallback() { + if (appLoadFallback) { + clearTimeout(appLoadFallback); + appLoadFallback = null; + } + if (isBootstrapping) { + // connectedCallback will be processed once all components have been registered + deferredConnectedCallbacks.push(this); + } + else { + plt.jmp(() => connectedCallback(this)); + } + } + disconnectedCallback() { + plt.jmp(() => disconnectedCallback(this)); + } + forceUpdate() { + if (BUILD.isDev) { + consoleDevWarn(`element.forceUpdate() is deprecated, use the "forceUpdate" function from "@stencil/core" instead: + + import { forceUpdate } from ‘@stencil/core’; + + forceUpdate(this); + forceUpdate(element);`); + } + forceUpdate(this); + } + componentOnReady() { + return getHostRef(this).$onReadyPromise$; + } + }; + if (BUILD.cloneNodeFix) { + patchCloneNode(HostElement.prototype); + } + if (BUILD.appendChildSlotFix) { + patchSlotAppendChild(HostElement.prototype); + } + if (BUILD.hotModuleReplacement) { + HostElement.prototype['s-hmr'] = function (hmrVersionId) { + hmrStart(this, cmpMeta, hmrVersionId); + }; + } + cmpMeta.$lazyBundleId$ = lazyBundle[0]; + if (!exclude.includes(tagName) && !customElements.get(tagName)) { + cmpTags.push(tagName); + customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)); + } + })); + if (BUILD.hydratedClass || BUILD.hydratedAttribute) { + visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS; + visibilityStyle.setAttribute('data-styles', ''); + head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild); + } + // Process deferred connectedCallbacks now all components have been registered + isBootstrapping = false; + if (deferredConnectedCallbacks.length) { + deferredConnectedCallbacks.map(host => host.connectedCallback()); + } + else { + if (BUILD.profile) { + plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30, 'timeout'))); + } + else { + plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30))); + } + } + // Fallback appLoad event + endBootstrap(); +}; +const getAssetPath = (path) => { + const assetUrl = new URL(path, plt.$resourcesUrl$); + return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname; +}; +const setAssetPath = (path) => (plt.$resourcesUrl$ = path); +const getConnect = (_ref, tagName) => { + const componentOnReady = () => { + let elm = doc.querySelector(tagName); + if (!elm) { + elm = doc.createElement(tagName); + doc.body.appendChild(elm); + } + return typeof elm.componentOnReady === 'function' ? elm.componentOnReady() : Promise.resolve(elm); + }; + const create = (...args) => { + return componentOnReady().then(el => el.create(...args)); + }; + return { + create, + componentOnReady, + }; +}; +const getContext = (_elm, context) => { + if (context in Context) { + return Context[context]; + } + else if (context === 'window') { + return win; + } + else if (context === 'document') { + return doc; + } + else if (context === 'isServer' || context === 'isPrerender') { + return BUILD.hydrateServerSide ? true : false; + } + else if (context === 'isClient') { + return BUILD.hydrateServerSide ? false : true; + } + else if (context === 'resourcesUrl' || context === 'publicPath') { + return getAssetPath('.'); + } + else if (context === 'queue') { + return { + write: writeTask, + read: readTask, + tick: { + then(cb) { + return nextTick(cb); + }, + }, + }; + } + return undefined; +}; +const insertVdomAnnotations = (doc, staticComponents) => { + if (doc != null) { + const docData = { + hostIds: 0, + rootLevelIds: 0, + staticComponents: new Set(staticComponents), + }; + const orgLocationNodes = []; + parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes); + orgLocationNodes.forEach(orgLocationNode => { + if (orgLocationNode != null) { + const nodeRef = orgLocationNode['s-nr']; + let hostId = nodeRef['s-host-id']; + let nodeId = nodeRef['s-node-id']; + let childId = `${hostId}.${nodeId}`; + if (hostId == null) { + hostId = 0; + docData.rootLevelIds++; + nodeId = docData.rootLevelIds; + childId = `${hostId}.${nodeId}`; + if (nodeRef.nodeType === 1 /* ElementNode */) { + nodeRef.setAttribute(HYDRATE_CHILD_ID, childId); + } + else if (nodeRef.nodeType === 3 /* TextNode */) { + if (hostId === 0) { + const textContent = nodeRef.nodeValue.trim(); + if (textContent === '') { + // useless whitespace node at the document root + orgLocationNode.remove(); + return; + } + } + const commentBeforeTextNode = doc.createComment(childId); + commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`; + nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef); + } + } + let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`; + const orgLocationParentNode = orgLocationNode.parentElement; + if (orgLocationParentNode) { + if (orgLocationParentNode['s-en'] === '') { + // ending with a "." means that the parent element + // of this node's original location is a SHADOW dom element + // and this node is apart of the root level light dom + orgLocationNodeId += `.`; + } + else if (orgLocationParentNode['s-en'] === 'c') { + // ending with a ".c" means that the parent element + // of this node's original location is a SCOPED element + // and this node is apart of the root level light dom + orgLocationNodeId += `.c`; + } + } + orgLocationNode.nodeValue = orgLocationNodeId; + } + }); + } +}; +const parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => { + if (node == null) { + return; + } + if (node['s-nr'] != null) { + orgLocationNodes.push(node); + } + if (node.nodeType === 1 /* ElementNode */) { + node.childNodes.forEach(childNode => { + const hostRef = getHostRef(childNode); + if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) { + const cmpData = { + nodeIds: 0, + }; + insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData); + } + parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes); + }); + } +}; +const insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => { + if (vnode != null) { + const hostId = ++docData.hostIds; + hostElm.setAttribute(HYDRATE_ID, hostId); + if (hostElm['s-cr'] != null) { + hostElm['s-cr'].nodeValue = `${CONTENT_REF_ID}.${hostId}`; + } + if (vnode.$children$ != null) { + const depth = 0; + vnode.$children$.forEach((vnodeChild, index) => { + insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index); + }); + } + if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute('c-id')) { + const parent = hostElm.parentElement; + if (parent && parent.childNodes) { + const parentChildNodes = Array.from(parent.childNodes); + const comment = parentChildNodes.find(node => node.nodeType === 8 /* CommentNode */ && node['s-sr']); + if (comment) { + const index = parentChildNodes.indexOf(hostElm) - 1; + vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`); + } + } + } + } +}; +const insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => { + const childElm = vnodeChild.$elm$; + if (childElm == null) { + return; + } + const nodeId = cmpData.nodeIds++; + const childId = `${hostId}.${nodeId}.${depth}.${index}`; + childElm['s-host-id'] = hostId; + childElm['s-node-id'] = nodeId; + if (childElm.nodeType === 1 /* ElementNode */) { + childElm.setAttribute(HYDRATE_CHILD_ID, childId); + } + else if (childElm.nodeType === 3 /* TextNode */) { + const parentNode = childElm.parentNode; + if (parentNode.nodeName !== 'STYLE') { + const textNodeId = `${TEXT_NODE_ID}.${childId}`; + const commentBeforeTextNode = doc.createComment(textNodeId); + parentNode.insertBefore(commentBeforeTextNode, childElm); + } + } + else if (childElm.nodeType === 8 /* CommentNode */) { + if (childElm['s-sr']) { + const slotName = childElm['s-sn'] || ''; + const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`; + childElm.nodeValue = slotNodeId; + } + } + if (vnodeChild.$children$ != null) { + const childDepth = depth + 1; + vnodeChild.$children$.forEach((vnode, index) => { + insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index); + }); + } +}; +const hostRefs = new WeakMap(); +const getHostRef = (ref) => hostRefs.get(ref); +const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef); +const registerHost = (elm, cmpMeta) => { + const hostRef = { + $flags$: 0, + $hostElement$: elm, + $cmpMeta$: cmpMeta, + $instanceValues$: new Map(), + }; + if (BUILD.isDev) { + hostRef.$renderCount$ = 0; + } + if (BUILD.method && BUILD.lazyLoad) { + hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r)); + } + if (BUILD.asyncLoading) { + hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r)); + elm['s-p'] = []; + elm['s-rc'] = []; + } + addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false); + return hostRefs.set(elm, hostRef); +}; +const isMemberInElement = (elm, memberName) => memberName in elm; +const STENCIL_DEV_MODE = BUILD.isTesting + ? ['STENCIL:'] // E2E testing + : ['%cstencil', 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px']; +const consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m); +const consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m); +const consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m); +const consoleError = (e) => console.error(e); +const cmpModules = /*@__PURE__*/ new Map(); +const loadModule = (cmpMeta, hostRef, hmrVersionId) => { + // loadModuleImport + const exportName = cmpMeta.$tagName$.replace(/-/g, '_'); + const bundleId = cmpMeta.$lazyBundleId$; + if (BUILD.isDev && typeof bundleId !== 'string') { + consoleDevError(`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode "${hostRef.$modeName$}", but it does not exist.`); + return undefined; + } + const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false; + if (module) { + return module[exportName]; + } + return __sc_import_ionicons_site( + /* webpackInclude: /\.entry\.js$/ */ + /* webpackExclude: /\.system\.entry\.js$/ */ + /* webpackMode: "lazy" */ + `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`).then(importedModule => { + if (!BUILD.hotModuleReplacement) { + cmpModules.set(bundleId, importedModule); + } + return importedModule[exportName]; + }, consoleError); +}; +const styles = new Map(); +const modeResolutionChain = []; +const queueDomReads = []; +const queueDomWrites = []; +const queueDomWritesLow = []; +const queueTask = (queue, write) => (cb) => { + queue.push(cb); + if (!queuePending) { + queuePending = true; + if (write && plt.$flags$ & 4 /* queueSync */) { + nextTick(flush); + } + else { + plt.raf(flush); + } + } +}; +const consume = (queue) => { + for (let i = 0; i < queue.length; i++) { + try { + queue[i](performance.now()); + } + catch (e) { + consoleError(e); + } + } + queue.length = 0; +}; +const consumeTimeout = (queue, timeout) => { + let i = 0; + let ts = 0; + while (i < queue.length && (ts = performance.now()) < timeout) { + try { + queue[i++](ts); + } + catch (e) { + consoleError(e); + } + } + if (i === queue.length) { + queue.length = 0; + } + else if (i !== 0) { + queue.splice(0, i); + } +}; +const flush = () => { + if (BUILD.asyncQueue) { + queueCongestion++; + } + // always force a bunch of medium callbacks to run, but still have + // a throttle on how many can run in a certain time + // DOM READS!!! + consume(queueDomReads); + // DOM WRITES!!! + if (BUILD.asyncQueue) { + const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0)) : Infinity; + consumeTimeout(queueDomWrites, timeout); + consumeTimeout(queueDomWritesLow, timeout); + if (queueDomWrites.length > 0) { + queueDomWritesLow.push(...queueDomWrites); + queueDomWrites.length = 0; + } + if ((queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0)) { + // still more to do yet, but we've run out of time + // let's let this thing cool off and try again in the next tick + plt.raf(flush); + } + else { + queueCongestion = 0; + } + } + else { + consume(queueDomWrites); + if ((queuePending = queueDomReads.length > 0)) { + // still more to do yet, but we've run out of time + // let's let this thing cool off and try again in the next tick + plt.raf(flush); + } + } +}; +const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb); +const readTask = /*@__PURE__*/ queueTask(queueDomReads, false); +const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true); +const Build = { + isDev: BUILD.isDev ? true : false, + isBrowser: true, + isServer: false, + isTesting: BUILD.isTesting ? true : false, +}; + +export { BUILD as B, CSS as C, H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, consoleDevInfo as c, doc as d, Build as e, forceUpdate as f, getRenderingRef as g, h, getElement as i, Host as j, createEvent as k, getContext as l, plt as p, registerInstance as r, win as w }; diff --git a/docs/build/index-ff62d206.js b/docs/build/index-ff62d206.js new file mode 100644 index 0000000..1a6cf7a --- /dev/null +++ b/docs/build/index-ff62d206.js @@ -0,0 +1,879 @@ +import { g as getRenderingRef, f as forceUpdate, e as Build, h } from './index-93b10a2a.js'; +import { c as createCommonjsModule, a as commonjsGlobal, u as unwrapExports } from './_commonjsHelpers-8f072dc7.js'; +import { a as applyProps } from './Button-36d57e33.js'; +import { P as Paragraph, H as Heading, B as Blockquote } from './index-5421a3d1.js'; + +var prismicRichtext_min = createCommonjsModule(function (module, exports) { +!function(e,t){"object"=='object'&&"object"=='object'?module.exports=t():"function"==typeof undefined&&undefined.amd?undefined("PrismicRichtext",[],t):"object"=='object'?exports.PrismicRichtext=t():e.PrismicRichtext=t();}("undefined"!=typeof self?self:commonjsGlobal,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r});},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){var r=n(3);e.exports=function(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}};},function(e,t,n){var r=n(0),o=n(3);e.exports=function(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return o(n)?t:r(function(t){return e(n,t)});default:return o(n)&&o(i)?t:o(n)?r(function(t){return e(t,i)}):o(i)?r(function(t){return e(n,t)}):e(n,i)}}};},function(e,t,n){"use strict";var r;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.PRIORITIES=t.NODE_TYPES=void 0;var i={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",preformatted:"preformatted",strong:"strong",em:"em",listItem:"list-item",oListItem:"o-list-item",list:"group-list-item",oList:"group-o-list-item",image:"image",embed:"embed",hyperlink:"hyperlink",label:"label",span:"span"};t.NODE_TYPES=i;var u=(o(r={},i.heading1,4),o(r,i.heading2,4),o(r,i.heading3,4),o(r,i.heading4,4),o(r,i.heading5,4),o(r,i.heading6,4),o(r,i.paragraph,3),o(r,i.preformatted,5),o(r,i.strong,6),o(r,i.em,6),o(r,i.oList,1),o(r,i.list,1),o(r,i.listItem,1),o(r,i.oListItem,1),o(r,i.image,1),o(r,i.embed,1),o(r,i.hyperlink,3),o(r,i.label,4),o(r,i.span,7),r);t.PRIORITIES=u;},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]};},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(12)),o=d(n(15)),i=d(n(16)),u=d(n(17)),c=d(n(21)),a=d(n(7)),l=n(23),f=n(2),s=n(8);function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){for(var n=0;nt.end?{inner:s.SpanNode.slice(n,n.start,t.end,e),outer:s.SpanNode.slice(n,t.end,n.end,e)}:{inner:n}}(e,t.elected,r);return {inner:o.concat(u.inner),outer:u.outer?i.concat(u.outer):i}},{inner:[],outer:[]}),r=n.inner,o=n.outer;return [t.elected.setChildren(x(e,r,t.elected.boundaries()))].concat(b(e,o))}function v(e){return function(e,t){return t.reduce(function(t,n){var r=(0,c.default)(t);if(r){if(r.some(function(e){return e.isParentOf(n)}))return (0,u.default)(t).concat([r.concat(n)]);var o=(0,c.default)(r);return o&&e(o,n)?(0,u.default)(t).concat([r.concat(n)]):t.concat([[n]])}return [[n]]},[])}(function(e,t){return e.end>=t.start},(0,i.default)([function(e,t){return e.start-t.start},function(e,t){return e.end-t.end}],e))}function m(e){if(0===e.length)throw new Error("Unable to elect node on empty list");var t=h(e.sort(function(e,t){if(e.isParentOf(t))return -1;if(t.isParentOf(e))return 1;var n=f.PRIORITIES[e.type]-f.PRIORITIES[t.type];return 0===n?e.text.length-t.text.length:n}));return {elected:t[0],others:t.slice(1)}}function x(e,t,n){if(t.length>0)return function(e,t,n){return t.reduce(function(r,o,i){var u=[],c=0===i&&o.start>n.lower,a=i===t.length-1&&n.upper>o.end;if(c){var l=new s.TextNode(n.lower,o.start,e.slice(n.lower,o.start));u=u.concat(l);}else {var f=t[i-1];if(f&&o.start>f.end){var d=e.slice(f.end,o.start),p=new s.TextNode(f.end,o.start,d);u=u.concat(p);}}if(u=u.concat(o),a){var h=new s.TextNode(o.end,n.upper,e.slice(o.end,n.upper));u=u.concat(h);}return r.concat(u)},[])}(e,b(e,t),n);var r=e.slice(n.lower,n.upper);return [new s.TextNode(n.lower,n.upper,r)]}function b(e,t){var n=v((0,o.default)(function(e){return e.start},t)).map(m),i=(0,r.default)(n.map(function(t){return y(e,t)}));return (0,o.default)(function(e){return e.start},i)}var g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);}var t,n,r;return t=e,r=[{key:"fromRichText",value:function(e){return {key:(0,a.default)(),children:e.reduce(function(e,t,n){if(l.RichTextBlock.isEmbedBlock(t.type)||l.RichTextBlock.isImageBlock(t.type))return e.concat(new s.BlockNode(t.type,t));var r=function(e){var t=e.spans.map(function(t){var n=e.text.slice(t.start,t.end);return new s.SpanNode(t.start,t.end,t.type,n,[],t)}),n={lower:0,upper:e.text.length};return x(e.text,t,n)}(t),o=e[e.length-1];if(l.RichTextBlock.isListItem(t.type)&&o&&o instanceof s.ListBlockNode){var i=new s.ListItemBlockNode(t,r),c=o.addChild(i);return (0,u.default)(e).concat(c)}if(l.RichTextBlock.isOrderedListItem(t.type)&&o&&o instanceof s.OrderedListBlockNode){var a=new s.OrderedListItemBlockNode(t,r),f=o.addChild(a);return (0,u.default)(e).concat(f)}if(l.RichTextBlock.isListItem(t.type)){var d=new s.ListItemBlockNode(t,r),p=new s.ListBlockNode(l.RichTextBlock.emptyList(),[d]);return e.concat(p)}if(l.RichTextBlock.isOrderedListItem(t.type)){var h=new s.OrderedListItemBlockNode(t,r),y=new s.OrderedListBlockNode(l.RichTextBlock.emptyOrderedList(),[h]);return e.concat(y)}return e.concat(new s.BlockNode(t.type,t,r))},[])}}}],(n=null)&&p(t.prototype,n),r&&p(t,r),e}();t.default=g;},function(e,t){e.exports=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};},function(e,t){e.exports=function(e){return "[object String]"===Object.prototype.toString.call(e)};},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=(new Date).getTime();return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)})};},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBlockNode=t.OrderedListBlockNode=t.OrderedListItemBlockNode=t.ListItemBlockNode=t.BlockNode=t.TextNode=t.SpanNode=t.Node=void 0;var r,o=(r=n(7))&&r.__esModule?r:{default:r},i=n(2);function u(e){return (u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n=e.end}},{key:"setChildren",value:function(e){return new t(this.start,this.end,this.type,this.text,e,this.element)}}],[{key:"slice",value:function(e,n,r,o){return new t(n,r,e.type,o.slice(n,r),e.children,e.element)}}]),t}();t.SpanNode=y;var v=function(e){function t(e,n,r){p(this,t);var o={type:i.NODE_TYPES.span,start:e,end:n,text:r};return l(this,f(t).call(this,e,n,i.NODE_TYPES.span,r,[],o))}return s(t,y),t}();t.TextNode=v;var m=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return p(this,t),l(this,f(t).call(this,e,n,r))}return s(t,h),t}();t.BlockNode=m;var x=function(e){function t(e,n){return p(this,t),l(this,f(t).call(this,i.NODE_TYPES.listItem,e,n))}return s(t,m),t}();t.ListItemBlockNode=x;var b=function(e){function t(e,n){return p(this,t),l(this,f(t).call(this,i.NODE_TYPES.oListItem,e,n))}return s(t,m),t}();t.OrderedListItemBlockNode=b;var g=function(e){function t(e,n){return p(this,t),l(this,f(t).call(this,i.NODE_TYPES.oList,e,n))}return s(t,m),a(t,[{key:"addChild",value:function(e){var n=this.children.concat(e);return new t(this.element,n)}}]),t}();t.OrderedListBlockNode=g;var O=function(e){function t(e,n){return p(this,t),l(this,f(t).call(this,i.NODE_TYPES.list,e,n))}return s(t,m),a(t,[{key:"addChild",value:function(e){var n=this.children.concat(e);return new t(this.element,n)}}]),t}();t.ListBlockNode=O;},function(e,t,n){e.exports=n(10);},function(e,t,n){"use strict";var r=c(n(11)),o=c(n(4)),i=c(n(24)),u=n(2);function c(e){return e&&e.__esModule?e:{default:e}}e.exports={asText:r.default,asTree:o.default.fromRichText,serialize:i.default,Elements:u.NODE_TYPES};},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){var n="string"==typeof t?t:" ";return e.map(function(e){return e.text}).join(n)};t.default=r;},function(e,t,n){var r=n(0)(n(13)(!0));e.exports=r;},function(e,t,n){var r=n(14);e.exports=function(e){return function t(n){for(var o,i,u,c=[],a=0,l=n.length;a0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))});e.exports=u;},function(e,t,n){var r=n(1)(function(e,t){return Array.prototype.slice.call(t,0).sort(function(t,n){var r=e(t),o=e(n);return ro?1:0})});e.exports=r;},function(e,t,n){var r=n(1)(function(e,t){return Array.prototype.slice.call(t,0).sort(function(t,n){for(var r=0,o=0;0===r&&o { + const items = map.get(propName); + if (!items) { + map.set(propName, [value]); + } + else if (!items.includes(value)) { + items.push(value); + } +}; +const debounce = (fn, ms) => { + let timeoutId; + return (...args) => { + if (timeoutId) { + clearTimeout(timeoutId); + } + timeoutId = setTimeout(() => { + timeoutId = 0; + fn(...args); + }, ms); + }; +}; + +/** + * Check if a possible element isConnected. + * The property might not be there, so we check for it. + * + * We want it to return true if isConnected is not a property, + * otherwise we would remove these elements and would not update. + * + * Better leak in Edge than to be useless. + */ +const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected; +const cleanupElements = debounce((map) => { + for (let key of map.keys()) { + map.set(key, map.get(key).filter(isConnected)); + } +}, 2000); +const stencilSubscription = ({ on }) => { + const elmsToUpdate = new Map(); + if (typeof getRenderingRef === 'function') { + // If we are not in a stencil project, we do nothing. + // This function is not really exported by @stencil/core. + on('dispose', () => { + elmsToUpdate.clear(); + }); + on('get', (propName) => { + const elm = getRenderingRef(); + if (elm) { + appendToMap(elmsToUpdate, propName, elm); + } + }); + on('set', (propName) => { + const elements = elmsToUpdate.get(propName); + if (elements) { + elmsToUpdate.set(propName, elements.filter(forceUpdate)); + } + cleanupElements(elmsToUpdate); + }); + on('reset', () => { + elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate)); + cleanupElements(elmsToUpdate); + }); + } +}; + +const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => { + let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {})); + const handlers = { + dispose: [], + get: [], + set: [], + reset: [], + }; + const reset = () => { + states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {})); + handlers.reset.forEach((cb) => cb()); + }; + const dispose = () => { + // Call first dispose as resetting the state would + // cause less updates ;) + handlers.dispose.forEach((cb) => cb()); + reset(); + }; + const get = (propName) => { + handlers.get.forEach((cb) => cb(propName)); + return states.get(propName); + }; + const set = (propName, value) => { + const oldValue = states.get(propName); + if (shouldUpdate(value, oldValue, propName)) { + states.set(propName, value); + handlers.set.forEach((cb) => cb(propName, value, oldValue)); + } + }; + const state = (typeof Proxy === 'undefined' + ? {} + : new Proxy(defaultState, { + get(_, propName) { + return get(propName); + }, + ownKeys(_) { + return Array.from(states.keys()); + }, + getOwnPropertyDescriptor() { + return { + enumerable: true, + configurable: true, + }; + }, + has(_, propName) { + return states.has(propName); + }, + set(_, propName, value) { + set(propName, value); + return true; + }, + })); + const on = (eventName, callback) => { + handlers[eventName].push(callback); + return () => { + removeFromArray(handlers[eventName], callback); + }; + }; + const onChange = (propName, cb) => { + const unSet = on('set', (key, newValue) => { + if (key === propName) { + cb(newValue); + } + }); + const unReset = on('reset', () => cb(defaultState[propName])); + return () => { + unSet(); + unReset(); + }; + }; + const use = (...subscriptions) => subscriptions.forEach((subscription) => { + if (subscription.set) { + on('set', subscription.set); + } + if (subscription.get) { + on('get', subscription.get); + } + if (subscription.reset) { + on('reset', subscription.reset); + } + }); + const forceUpdate = (key) => { + const oldValue = states.get(key); + handlers.set.forEach((cb) => cb(key, oldValue, oldValue)); + }; + return { + state, + get, + set, + on, + onChange, + use, + dispose, + reset, + forceUpdate, + }; +}; +const removeFromArray = (array, item) => { + const index = array.indexOf(item); + if (index >= 0) { + array[index] = array[array.length - 1]; + array.length--; + } +}; + +const createStore = (defaultState, shouldUpdate) => { + const map = createObservableMap(defaultState, shouldUpdate); + stencilSubscription(map); + return map; +}; + +let defaultRouter; +const createRouter = (opts) => { + var _a; + const win = window; + const url = new URL(win.location.href); + const parseURL = (_a = opts === null || opts === void 0 ? void 0 : opts.parseURL) !== null && _a !== void 0 ? _a : DEFAULT_PARSE_URL; + const { state, onChange, dispose } = createStore({ + url, + activePath: parseURL(url) + }, (newV, oldV, prop) => { + if (prop === 'url') { + return newV.href !== oldV.href; + } + return newV !== oldV; + }); + const push = (href) => { + history.pushState(null, null, href); + const url = new URL(href, document.baseURI); + state.url = url; + state.activePath = parseURL(url); + }; + const match = (routes) => { + const { activePath } = state; + for (let route of routes) { + const params = matchPath(activePath, route.path); + if (params) { + if (route.to != null) { + push(route.to); + return match(routes); + } + else { + return { params, route }; + } + } + } + return undefined; + }; + const navigationChanged = () => { + const url = new URL(win.location.href); + state.url = url; + state.activePath = parseURL(url); + }; + const Switch = (_, childrenRoutes) => { + const result = match(childrenRoutes); + if (result) { + if (typeof result.route.jsx === 'function') { + return result.route.jsx(result.params); + } + else { + return result.route.jsx; + } + } + }; + const disposeRouter = () => { + defaultRouter = undefined; + win.removeEventListener('popstate', navigationChanged); + dispose(); + }; + const router = defaultRouter = { + Switch, + get url() { + return state.url; + }, + get activePath() { + return state.activePath; + }, + push, + onChange: onChange, + dispose: disposeRouter, + }; + // Initial update + navigationChanged(); + // Listen URL changes + win.addEventListener('popstate', navigationChanged); + return router; +}; +const Route = (props, children) => { + var _a; + if ('to' in props) { + return { + path: props.path, + to: props.to, + }; + } + if (Build.isDev && props.render && children.length > 0) { + console.warn('Route: if `render` is provided, the component should not have any childreen'); + } + return { + path: props.path, + id: props.id, + jsx: (_a = props.render) !== null && _a !== void 0 ? _a : children, + }; +}; +const href = (href, router = defaultRouter) => { + if (Build.isDev && !router) { + throw new Error('Router must be defined in href'); + } + return { + href, + onClick: (ev) => { + ev.preventDefault(); + router.push(href); + }, + }; +}; +const matchPath = (pathname, path) => { + if (typeof path === 'string') { + if (path === pathname) { + return {}; + } + } + else if (typeof path === 'function') { + const params = path(pathname); + if (params) { + return params === true + ? {} + : { ...params }; + } + } + else { + const results = path.exec(pathname); + if (results) { + path.lastIndex = 0; + return { ...results }; + } + } + return undefined; +}; +const DEFAULT_PARSE_URL = (url) => { + return url.pathname.toLowerCase(); +}; +const NotFound = () => ({}); + +/** + * TS adaption of https://github.com/pillarjs/path-to-regexp/blob/master/index.js + */ +/** + * Default configs. + */ +const DEFAULT_DELIMITER = '/'; +const DEFAULT_DELIMITERS = './'; +/** + * The main path matching regexp utility. + */ +const 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. + */ +const 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. + */ +const escapeString = (str) => { + return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, '\\$1'); +}; +/** + * Escape the capturing group by escaping special characters and meaning. + */ +const escapeGroup = (group) => { + return group.replace(/([=!:$/()])/g, '\\$1'); +}; +/** + * Get the flags for a regexp from the options. + */ +const flags = (options) => { + return options && options.sensitive ? '' : 'i'; +}; +/** + * Pull out keys from a regexp. + */ +const 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. + */ +const 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. + */ +const stringToRegexp = (path, keys, options) => { + return tokensToRegExp(parse(path, options), keys, options); +}; +/** + * Expose a function for taking tokens and returning a RegExp. + */ +const 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 }]`. + */ +const 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); +}; + +let cacheCount = 0; +const patternCache = {}; +const cacheLimit = 10000; +// Memoized function for creating the path match regex +const compilePath = (pattern, options) => { + const cacheKey = `${options.end}${options.strict}`; + const cache = patternCache[cacheKey] || (patternCache[cacheKey] = {}); + const cachePattern = JSON.stringify(pattern); + if (cache[cachePattern]) { + return cache[cachePattern]; + } + const keys = []; + const re = pathToRegexp(pattern, keys, options); + const compiledPattern = { re, keys }; + if (cacheCount < cacheLimit) { + cache[cachePattern] = compiledPattern; + cacheCount += 1; + } + return compiledPattern; +}; +const match = (pathname, options = {}) => { + const { exact = false, strict = false } = options; + const { re, keys } = compilePath(pathname, { end: exact, strict }); + return (path) => { + const match = re.exec(path); + if (!match) { + return undefined; + } + const [url, ...values] = match; + const isExact = path === url; + if (exact && !isExact) { + return undefined; + } + return keys.reduce((memo, key, index) => { + memo[key.name] = values[index]; + return memo; + }, {}); + }; +}; + +function createScript({ property, src, id }) { + if (!window) { + return; + } + (function (src, id) { + var js, fjs = document.getElementsByTagName('script')[0], t = window[property] || {}; + if (document.getElementById(id)) { + return t; + } + js = document.createElement('script'); + js.id = id; + js.src = src; + fjs.parentNode.insertBefore(js, fjs); + t._e = []; + t.ready = function (f) { + t._e.push(f); + }; + return t; + })(src, id); +} +const embeds = { + Twitter: { + property: 'twttr', + src: 'https://platform.twitter.com/widgets.js', + id: 'twitter-wjs', + load: function () { + if (window && window.twttr) { + window.twttr.widgets.load(); + } + }, + }, + Facebook: { + property: 'FB', + src: 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.3', + id: 'fb-wjs', + load: (ref) => { + if (window && window.FB) { + window.FB.XFBML.parse(ref); + } + }, + }, + Instagram: { + property: 'instgrm', + src: 'https://www.instagram.com/embed.js', + id: 'insta-wjs', + load: () => { + if (window && window.instgrm) { + window.instgrm.Embeds.process(); + } + }, + }, +}; + +function slugify(text) { + if (!text) { + return ''; + } + return text + .toString() + .toLowerCase() + .replace(/\s+/g, '-') // Replace spaces with - + .replace(/\.+/g, '-') // Replace periods with - + .replace(/[^\w\-]+/g, '') // Remove all non-word chars + .replace(/\-\-+/g, '-') // Replace multiple - with single - + .replace(/^-+/, '') // Trim - from start of text + .replace(/-+$/, ''); // Trim - from end of text +} + +var __rest = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +function htmlSerializer(type, element, _content, children) { + // give headings an ID + switch (type) { + case 'heading1': + case 'heading2': + case 'heading3': + case 'heading4': + case 'heading5': + case 'heading6': + const level = parseInt(type[type.length - 1], 10); + const id = slugify(element.text); + return (h(Heading, { level: level, id: id }, children)); + case 'paragraph': + return h(Paragraph, null, children); + case 'preformatted': + return (h("pre", null, + h("code", null, children))); + // Return null to stick with the default behavior for all other elements + default: + return null; + } +} +function slugifyHeading(children) { + return children.reduce((id, c) => { + return id + slugify(c[0]); + }, ''); +} +function serialize(linkResolver, elements, type, element, content, children, index, routerLink = false, router = null) { + if (elements[type]) { + return serializeElement(elements[type], type, element, content, children, index); + } + const Elements = PrismicRichTextLib.Elements; + switch (type) { + case Elements.heading1: + return serializeStandardTag('h1', element, children, index, { id: slugifyHeading(children) }); + case Elements.heading2: + return serializeStandardTag('h2', element, children, index, { id: slugifyHeading(children) }); + case Elements.heading3: + return serializeStandardTag('h3', element, children, index, { id: slugifyHeading(children) }); + case Elements.heading4: + return serializeStandardTag('h4', element, children, index, { id: slugifyHeading(children) }); + case Elements.heading5: + return serializeStandardTag('h5', element, children, index, { id: slugifyHeading(children) }); + case Elements.heading6: + return serializeStandardTag('h6', element, children, index, { id: slugifyHeading(children) }); + case Elements.paragraph: + return serializeStandardTag('p', element, children, index); + case Elements.preformatted: + return serializeStandardTag('pre', element, children, index); + case Elements.strong: + return serializeStandardTag('strong', element, children, index); + case Elements.em: + return serializeStandardTag('em', element, children, index); + case Elements.listItem: + return serializeStandardTag('li', element, children, index); + case Elements.oListItem: + return serializeStandardTag('li', element, children, index); + case Elements.list: + return serializeStandardTag('ul', element, children, index); + case Elements.oList: + return serializeStandardTag('ol', element, children, index); + case Elements.image: + return serializeImage(linkResolver, element, index); + case Elements.embed: + return serializeEmbed(element, index); + case Elements.hyperlink: + return serializeHyperlink(linkResolver, element, children, index, routerLink, router); + case Elements.label: + return serializeLabel(element, children, index); + case Elements.span: + return serializeSpan(content); + default: + return null; + } +} +function propsWithUniqueKey(props = {}, key) { + return Object.assign(props, { key }); +} +function serializeElement(Element, type, props, _content, children, index) { + return (h(Element, Object.assign({ key: `element-${type}-${index + 1}` }, props, (type === 'image' ? { src: props.url, url: undefined } : null)), children && children.length ? children : undefined)); +} +function serializeStandardTag(Tag, element, children, key, extra = {}) { + const props = element.label ? Object.assign(extra, { className: element.label }) : extra; + return h(Tag, Object.assign({}, propsWithUniqueKey(props, key)), children); +} +function serializeHyperlink(linkResolver, element, children, key, routerLink = false, router = null) { + const targetAttr = element.data.target ? { target: element.data.target } : {}; + const relAttr = element.data.target ? { rel: 'noopener' } : {}; + let href$1 = PrismicHelpers.Link.url(element.data, linkResolver); + if (element.data.url) { + const parsed = new URL(element.data.url); + if (parsed.hostname.indexOf('.') < 0) { + // Allow relative links + href$1 = `/${parsed.hostname}${parsed.pathname + parsed.search + parsed.hash}`; + } + } + const props = Object.assign({ href: href$1 }, targetAttr, relAttr); + if (routerLink) { + return h("a", Object.assign({}, propsWithUniqueKey(props, key), href(props.href, router)), children); + } + else { + return h("a", Object.assign({}, propsWithUniqueKey(props, key)), children); + } +} +function serializeLabel(element, children, key) { + const props = element.data ? Object.assign({}, { className: element.data.label }) : {}; + return h("span", Object.assign({}, propsWithUniqueKey(props, key)), children); +} +function serializeSpan(content) { + if (content) { + return content.split('\n').reduce((acc, p) => { + if (acc.length === 0) { + return [p]; + } + else { + const brIndex = (acc.length + 1) / 2 - 1; + const br = h("br", Object.assign({}, propsWithUniqueKey({}, brIndex))); + return acc.concat([br, p]); + } + }, []); + } + else { + return null; + } +} +function serializeImage(linkResolver, element, key) { + const linkUrl = element.linkTo ? PrismicHelpers.Link.url(element.linkTo, linkResolver) : null; + const linkTarget = element.linkTo && element.linkTo.target ? { target: element.linkTo.target } : {}; + const relAttr = linkTarget.target ? { rel: 'noopener' } : {}; + const img = h("img", { loading: 'lazy', src: element.url, alt: element.alt || '' }); + return (h("p", Object.assign({}, propsWithUniqueKey({ className: [element.label || '', 'block-img'].join(' ') }, key)), linkUrl ? h("a", Object.assign({}, Object.assign({ href: linkUrl }, linkTarget, relAttr)), img) : img)); +} +function serializeEmbed(element, key) { + if (embeds[element.oembed.provider_name]) { + createScript(embeds[element.oembed.provider_name]); + } + const className = `embed embed-${element.oembed.provider_name.toLowerCase()}`; + const props = Object.assign({ + 'data-oembed': element.oembed.embed_url, + 'data-oembed-type': element.oembed.type, + 'data-oembed-provider': element.oembed.provider_name, + ref: (ref) => { + if (embeds[element.oembed.provider_name]) { + embeds[element.oembed.provider_name].load(ref); + } + }, + }, element.label ? { className: `${className} ${element.label}` } : { className }); + const embedHtml = h("div", { innerHTML: element.oembed.html }); + return h("div", Object.assign({}, propsWithUniqueKey(props, key)), embedHtml); +} +const asText = (structuredText) => PrismicRichTextLib.asText(structuredText, null); +const PrismicRichText = (_a, _, utils) => { + var { richText, linkResolver, htmlSerializerProp = htmlSerializer, routerLink, router } = _a, props = __rest(_a, ["richText", "linkResolver", "htmlSerializerProp", "routerLink", "router"]); + const serializedChildren = PrismicRichTextLib.serialize(richText, (...args) => serialize.apply(null, [linkResolver, {}, ...args, routerLink, router]), + // serialize.bind(null, linkResolver, {}), + htmlSerializerProp); + return utils.map(serializedChildren, Child => { + Child.vattrs = applyProps(props, Child.vattrs); + return Child; + }); +}; + +const SliceNormalText = ({ slice }) => (h(PrismicRichText, { richText: slice.primary.content, htmlSerializer: htmlSerializer })); +const SliceRawHtml = ({ slice }) => (h("div", { class: "prismic-raw-html", innerHTML: slice.primary.html_content.map((c) => c.text).join('') })); +const SliceQuote = ({ slice }) => (h(Blockquote, null, + h("div", null, + h(PrismicRichText, { richText: slice.primary.quote })), + slice.primary.name ? (h("cite", null, + slice.primary.name, + h("span", null, slice.primary.description))) : null)); +const SliceFloatingImage = ({ slice }) => (h("figure", null, + h("img", { loading: 'lazy', src: slice.primary.illustration.url, alt: slice.primary.illustration.alt }))); +const SliceAd = ({ slice }) => (h("aside", null, + h("a", { href: slice.primary.link.url, target: slice.primary.link.target }, slice.primary.text[0].text))); +const PrismicBodySlice = ({ slice, key }) => { + switch (slice.slice_type) { + case 'normal_text': + return h(SliceNormalText, { slice: slice, key: key }); + case 'raw_html': + return h(SliceRawHtml, { slice: slice, key: key }); + case 'quote': + return h(SliceQuote, { slice: slice, key: key }); + case 'floating_image': + return h(SliceFloatingImage, { slice: slice, key: key }); + case 'ad': + return h(SliceAd, { slice: slice, key: key }); + } + return null; +}; + +const PrismicContent = ({ content }) => content.map((c, i) => h(PrismicBodySlice, { slice: c, key: i })); + +var __rest$1 = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const PrismicResponsiveImage = (_a) => { + var { image, loading = 'lazy', params, width, height } = _a, props = __rest$1(_a, ["image", "loading", "params", "width", "height"]); + const paramString = params ? + Object.entries(params).reduce((acc, cur) => { + const regex = new RegExp(`\\?.*${cur[0]}=`); + if (!image.url.match(regex)) { + return `${acc}${acc.match(/^\?$/) ? '' : '&'}${cur.join('=')}`; + } + return acc; + }, image.url.match(/\?/) ? '' : '?') : ''; + const imageUrl = new URL(image.url + paramString); + const dimensions = { + 'width': width ? width : imageUrl.searchParams.get('w'), + 'height': height ? height : imageUrl.searchParams.get('h'), + }; + return (h("img", Object.assign({}, applyProps(props), { loading: loading, src: `${imageUrl}` }, { 'srcset': image['1x'] ? `${image['1x'].url}${paramString} 1x, ${imageUrl} 2x` : undefined }, dimensions, { alt: image.alt }))); +}; diff --git a/docs/build/index.esm.js b/docs/build/index.esm.js index 089dba2..2a8c86f 100644 --- a/docs/build/index.esm.js +++ b/docs/build/index.esm.js @@ -1 +1,5 @@ -import"./p-b18ab5ec.js";import"./p-89519618.js";import"./p-660a81d1.js"; \ No newline at end of file +import './index-93b10a2a.js'; +import './_commonjsHelpers-8f072dc7.js'; +import './index-ff62d206.js'; +import './Button-36d57e33.js'; +import './index-5421a3d1.js'; diff --git a/docs/build/internal-ad.entry.js b/docs/build/internal-ad.entry.js new file mode 100644 index 0000000..8d3f6fb --- /dev/null +++ b/docs/build/internal-ad.entry.js @@ -0,0 +1,120 @@ +import { r as registerInstance, h } from './index-93b10a2a.js'; +import './_commonjsHelpers-8f072dc7.js'; +import { P as Prismic } from './prismic-javascript.min-e8451ed1.js'; +import { P as PrismicDom } from './prismic-dom.min-c7c2ccaa.js'; + +const apiURL = 'https://ionicframeworkcom.prismic.io/api/v2'; +const cacheLife = 20 * 60 * 1000; // 20 mins +let ads; +let lastFetch = null; +const getLatest = async () => { + const api = await Prismic.getApi(apiURL); + const response = await api.query(Prismic.Predicates.at('document.type', 'docs_ad'), {}); + ads = response.results; + lastFetch = Date.now(); +}; +const getAd = async () => { + if (lastFetch === null || (Date.now() - lastFetch) > cacheLife) { + await getLatest(); + } + return chooseAdByWeight(); +}; +const chooseAdByWeight = () => { + var _a; + const weightList = []; // Just Checking... + for (const ad of ads) { + if (ad['data']) { // Safety + if (!ad['data'].ad_weight) { + ad['data'].ad_weight = 1; + } + for (let i = 0; i < ad['data'].ad_weight; i++) { + weightList.push(ad); + } + } + } + // Probability Fun + return ((_a = weightList[Math.floor(Math.random() * weightList.length)]) === null || _a === void 0 ? void 0 : _a.data) || null; +}; + +const trackView = (adId) => { + hubspotTrack('View', adId); + googleAnalyticsTrack('View', adId); +}; +const trackClick = (adId, event) => { + const timeForTrackingRequests = 150; // ms + if (event) { + event.preventDefault(); + } + hubspotTrack('Click', adId); + googleAnalyticsTrack('Click', adId); + // give tracking request time to complete + setTimeout(() => { + const link = hrefClimber(event === null || event === void 0 ? void 0 : event.target); + if (link.target && link.target.toLowerCase() === '_blank') { + window.open(link.href); + } + else if (link.href) { + document.location = link.href; + } + }, timeForTrackingRequests); +}; +const hubspotTrack = (type, adId) => { + if (!window['_hsq']) { + console.warn('Unable to track Hubspot event, _hsq not found', type, adId); + return; + } + window['_hsq'].push(['trackEvent', { + id: `Docs ad - ${type} - ${adId}` + }]); +}; +const googleAnalyticsTrack = (type, adId) => { + if (!window['gtag']) { + console.warn('Unable to track Google Analytics event, gtag not found', type, adId); + return; + } + window['gtag']('event', `Docs ad - ${type} - ${adId}`, { + 'event_category': `Docs ad - ${type}`, + 'event_label': adId + }); +}; +// recursive function to climb the DOM looking for href tags +const hrefClimber = (el) => { + if (el['href']) { + return el; + } + else if (el.parentNode) { + return hrefClimber(el.parentNode); + } +}; + +const internalAdCss = "internal-ad{max-width:148px;display:block;margin:48px 0 0}internal-ad p{font-size:13px;line-height:19px;font-weight:400;letter-spacing:0.02em;color:var(--text-color--dark);transition:.2s color}internal-ad a:hover p{color:var(--text-color)}@media (max-width: 1233px){internal-ad{display:none}}"; + +const InternalAd = class { + constructor(hostRef) { + registerInstance(this, hostRef); + this.update(); + } + async update() { + this.ad = await getAd(); + if (!this.ad) { + return; + } + // give the page a chance to reflow + this.timeout = setTimeout(() => { + trackView(this.ad.ad_id); + }, 50); + } + disconnectedCallback() { + // if the reflowed page doesn't have an ad, don't fire view events + clearTimeout(this.timeout); + } + render() { + if (!this.ad || Object.keys(this.ad).length === 0) { + return; + } + return (h("a", { href: this.ad.ad_url.url, target: this.ad.ad_url.target, onClick: e => trackClick(this.ad.ad_id, e) }, h("picture", null, h("source", { media: "(min-width: 37.5em)", src: this.ad.ad_image.url }), h("source", { src: this.ad.ad_image['1x'].url }), h("img", { src: this.ad.ad_image.url, alt: this.ad.ad_image.alt, height: this.ad.ad_image['1x'].dimensions.height, width: this.ad.ad_image['1x'].dimensions.width }), h("p", null, this.ad.ad_image.alt)), h("div", { innerHTML: PrismicDom.RichText.asHtml(this.ad.ad_copy) }))); + } +}; +InternalAd.style = internalAdCss; + +export { InternalAd as internal_ad }; diff --git a/docs/build/ionicons-site.css b/docs/build/ionicons-site.css index 1cb8063..c18c215 100644 --- a/docs/build/ionicons-site.css +++ b/docs/build/ionicons-site.css @@ -1 +1,404 @@ -:root{--color-mirage:#171c24;--color-shark:#272a2f;--color-oslo-gray:#868b95;--color-pale-sky:#697384;--color-melrose:#aec6ff;--color-melrose-dark:#4c5873;--color-gull-gray:#a1aab8;--color-bright-gray:#363e49;--color-bright-gray-light:#3d4650;--color-heather:#bec7d5;--color-catskill-white:#ecf0f6;--color-dodger-blue:#3880ff;--color-dodger-blue-light:#5a96ff;--color-periwinkle:#c6dbff;--color-cadet-blue:#abb2bf;--color-white-lilac:#f8f8fc;--easeOutExpo:cubic-bezier(0.19, 1, 0.22, 1)}html,body{height:auto;margin:0;padding:0;font-family:var(--f-family-text);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;letter-spacing:-0.015em;color:var(--color-shark)}body.no-scroll{overflow:hidden}main{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:100%;padding-top:96px;-webkit-box-sizing:border-box;box-sizing:border-box}main>.wrapper{-ms-flex:1 0 auto;flex:1 0 auto}stencil-router-scroll-top>div{height:100%}@media screen and (max-width: 460px){main{padding-top:95px}}.content{max-width:650px;margin:0 auto}.container,.container--small{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:30px;padding-right:30px}.container{max-width:1140px;-ms-flex:1;flex:1}.container--small{max-width:650px}h1{font-family:var(--f-family-display);font-size:48px;line-height:54px;font-weight:700;letter-spacing:-0.03em;color:var(--color-mirage)}h2{font-size:24px;margin-top:60px;margin-bottom:0;letter-spacing:-0.03em;color:var(--color-shark)}h3{font-size:18px;line-height:28px;margin-top:40px;margin-bottom:0;letter-spacing:-0.03em;color:var(--color-shark)}h4{font-size:16px;line-height:16px;font-weight:600;color:var(--color-gull-gray)}h6{font-size:10px;line-height:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--color-heather);margin:0}p{color:#3c4b62;font-size:14px;line-height:28px;margin-top:10px;letter-spacing:0}p a{-webkit-transition:border-color 0.3s;transition:border-color 0.3s;text-decoration:none;color:var(--color-dodger-blue);border-bottom:1px solid transparent}p a:hover{border-bottom-color:var(--color-dodger-blue-light)}p.lead{font-size:18px;line-height:32px;font-weight:400}.btn{-webkit-transition:0.3s background, 0.3s -webkit-box-shadow;transition:0.3s background, 0.3s -webkit-box-shadow;transition:0.3s box-shadow, 0.3s background;transition:0.3s box-shadow, 0.3s background, 0.3s -webkit-box-shadow;background-color:var(--color-catskill-white);color:var(--color-pale-sky);font-size:13px;line-height:13px;font-weight:600;padding:9px 10px;border-radius:8px;text-decoration:none;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;cursor:pointer}.btn:hover{background-color:#e3e9f3}.btn--gray{background:var(--color-bright-gray);color:var(--color-melrose)}.btn--gray:hover{background-color:var(--color-bright-gray-light)}.btn--large{font-size:14px;padding:13px 15px}.btn--small{font-size:9px;text-transform:uppercase;letter-spacing:0.05em}.btn--small svg{width:14px;height:14px;margin-right:4px}.btn--icon{width:36px;height:32px;padding:0;pointer-events:none;-ms-flex-pack:center;justify-content:center;color:#fff}.btn--icon svg{width:26px;height:26px;margin:0}.btn-group{display:-ms-flexbox;display:flex}.btn-group .btn+.btn{margin-left:1px}.btn-group .btn:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group .btn:last-child{border-top-left-radius:0;border-bottom-left-radius:0}@media screen and (max-width: 460px){h3{font-size:16px;line-height:28px}.container{padding-left:15px;padding-right:15px}}@media screen and (max-width: 768px){.container{padding-left:15px;padding-right:15px}}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333}.hljs-number,.hljs-literal,.hljs-variable,.hljs-template-variable,.hljs-tag .hljs-attr{color:#008080}.hljs-string,.hljs-doctag{color:#d14}.hljs-title,.hljs-section,.hljs-selector-id{color:#900}.hljs-subst{font-weight:normal}.hljs-type,.hljs-class .hljs-title{color:#458}.hljs-tag,.hljs-name,.hljs-attribute{color:#000080;font-weight:normal}.hljs-regexp,.hljs-link{color:#009926}.hljs-symbol,.hljs-bullet{color:#990073}.hljs-built_in,.hljs-builtin-name{color:#0086b3}.hljs-meta{color:#999}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}code,pre{font-family:"Roboto Mono", monospace}code{background-color:var(--color-bright-gray);color:#97a1b6;padding:8px 12px;border-radius:5px}code .yellow{color:#ffc866}code .orange{color:#e48d26}code .green{color:#a4dd5b}p code{font-size:13px;font-weight:500;padding:2px 5px;color:#f06332;background-color:#f5f7fa}.styled-code{-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f7fa;padding:16px 14px;width:100%;border-radius:5px;display:block;overflow-x:auto;margin:18px 0px}.styled-code+.styled-code{margin-top:12px}pre{margin:0;font-size:14px;line-height:20px;color:var(--color-pale-sky)}.download-link svg #arrow{-webkit-transition:0.2s -webkit-transform;transition:0.2s -webkit-transform;transition:0.2s transform;transition:0.2s transform, 0.2s -webkit-transform;-webkit-transform:translate(0, 0px);transform:translate(0, 0px)}.download-link:hover svg #arrow{-webkit-transform:translate(0, 1px);transform:translate(0, 1px)}.loading-animation{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:1000ms;animation-duration:1000ms;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-transform-origin:center center;transform-origin:center center}@-webkit-keyframes spin{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} \ No newline at end of file +:root { + --color-mirage: #171c24; + --color-shark: #272a2f; + --color-oslo-gray: #868b95; + --color-pale-sky: #697384; + --color-melrose: #aec6ff; + --color-melrose-dark: #4c5873; + --color-gull-gray: #a1aab8; + --color-bright-gray: #363e49; + --color-bright-gray-light: #3d4650; + --color-heather: #bec7d5; + --color-catskill-white: #ecf0f6; + --color-dodger-blue: #3880ff; + --color-dodger-blue-light: #5a96ff; + --color-periwinkle: #c6dbff; + --color-cadet-blue: #abb2bf; + --color-white-lilac: #f8f8fc; + + --easeOutExpo: cubic-bezier(0.19, 1, 0.22, 1); +} + +html, +body { + height: auto; + margin: 0; + padding: 0; + font-family: var(--f-family-text); + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + letter-spacing: -0.015em; + color: var(--color-shark); +} + +body.no-scroll { + overflow: hidden; +} + +main { + display: flex; + flex-direction: column; + min-height: 100%; + padding-top: 96px; + box-sizing: border-box; +} + +main > .wrapper { + flex: 1 0 auto; +} + +stencil-router-scroll-top > div { + height: 100%; +} + +@media screen and (max-width: 460px) { + main { + padding-top: 95px; + } +} + +.content { + max-width: 650px; + margin: 0 auto; +} + +.container, +.container--small { + box-sizing: border-box; + margin: 0 auto; + padding-left: 30px; + padding-right: 30px; +} + +.container { + max-width: 1140px; + flex: 1; +} + +.container--small { + max-width: 650px; +} + +h1 { + font-family: var(--f-family-display); + font-size: 48px; + line-height: 54px; + font-weight: 700; + letter-spacing: -0.03em; + color: var(--color-mirage); +} + +h2 { + font-size: 24px; + margin-top: 60px; + margin-bottom: 0; + letter-spacing: -0.03em; + color: var(--color-shark); +} + +h3 { + font-size: 18px; + line-height: 28px; + margin-top: 40px; + margin-bottom: 0; + letter-spacing: -0.03em; + color: var(--color-shark); +} + +h4 { + font-size: 16px; + line-height: 16px; + font-weight: 600; + color: var(--color-gull-gray); +} + +h6 { + font-size: 10px; + line-height: 10px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + color: var(--color-heather); + margin: 0; +} + +p { + color: #3c4b62; + font-size: 14px; + line-height: 28px; + margin-top: 10px; + letter-spacing: 0; +} + +p a { + transition: border-color 0.3s; + text-decoration: none; + color: var(--color-dodger-blue); + border-bottom: 1px solid transparent; +} + +p a:hover { + border-bottom-color: var(--color-dodger-blue-light); +} + +p.lead { + font-size: 18px; + line-height: 32px; + font-weight: 400; +} + +.btn { + transition: 0.3s box-shadow, 0.3s background; + background-color: var(--color-catskill-white); + color: var(--color-pale-sky); + font-size: 13px; + line-height: 13px; + font-weight: 600; + padding: 9px 10px; + border-radius: 8px; + text-decoration: none; + display: inline-flex; + align-items: center; + cursor: pointer; +} + +.btn:hover { + background-color: #e3e9f3; +} + +.btn--gray { + background: var(--color-bright-gray); + color: var(--color-melrose); +} + +.btn--gray:hover { + background-color: var(--color-bright-gray-light); +} + +.btn--large { + font-size: 14px; + padding: 13px 15px; +} + +.btn--small { + font-size: 9px; + text-transform: uppercase; + letter-spacing: 0.05em; +} + +.btn--small svg { + width: 14px; + height: 14px; + margin-right: 4px; +} + +.btn--icon { + width: 36px; + height: 32px; + padding: 0; + pointer-events: none; + justify-content: center; + color: #fff; +} + +.btn--icon svg { + width: 26px; + height: 26px; + margin: 0; +} + +.btn-group { + display: flex; +} + +.btn-group .btn + .btn { + margin-left: 1px; +} + +.btn-group .btn:first-child { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.btn-group .btn:last-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +@media screen and (max-width: 460px) { + h3 { + font-size: 16px; + line-height: 28px; + } + .container { + padding-left: 15px; + padding-right: 15px; + } +} + +@media screen and (max-width: 768px) { + .container { + padding-left: 15px; + padding-right: 15px; + } +} + +.hljs-comment, +.hljs-quote { + color: #998; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; +} + +.hljs-number, +.hljs-literal, +.hljs-variable, +.hljs-template-variable, +.hljs-tag .hljs-attr { + color: #008080; +} + +.hljs-string, +.hljs-doctag { + color: #d14; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #900; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-type, +.hljs-class .hljs-title { + color: #458; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-regexp, +.hljs-link { + color: #009926; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +code, +pre { + font-family: "Roboto Mono", monospace; +} + +code { + background-color: var(--color-bright-gray); + color: #97a1b6; + padding: 8px 12px; + border-radius: 5px; +} + +code .yellow { + color: #ffc866; +} +code .orange { + color: #e48d26; +} +code .green { + color: #a4dd5b; +} + +p code { + font-size: 13px; + font-weight: 500; + padding: 2px 5px; + color: #f06332; + background-color: #f5f7fa; +} + +.styled-code { + box-sizing: border-box; + background-color: #f5f7fa; + padding: 16px 14px; + width: 100%; + border-radius: 5px; + display: block; + overflow-x: auto; + margin: 18px 0px; +} + +.styled-code + .styled-code { + margin-top: 12px; +} + +pre { + margin: 0; + font-size: 14px; + line-height: 20px; + color: var(--color-pale-sky); +} + +.download-link svg #arrow { + transition: 0.2s transform; + transform: translate(0, 0px); +} + +.download-link:hover svg #arrow { + transform: translate(0, 1px); +} + +.loading-animation { + animation-name: spin; + animation-duration: 1000ms; + animation-iteration-count: infinite; + animation-timing-function: linear; + transform-origin: center center; +} + +@keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} diff --git a/docs/build/ionicons-site.entry.js b/docs/build/ionicons-site.entry.js new file mode 100644 index 0000000..a0a4174 --- /dev/null +++ b/docs/build/ionicons-site.entry.js @@ -0,0 +1,88 @@ +import { r as registerInstance, h } from './index-93b10a2a.js'; + +const ioniconsSiteCss = "stencil-router>div{height:100%}"; + +const IoniconsSite = class { + constructor(hostRef) { + registerInstance(this, hostRef); + this.data = { + version: undefined, + icons: [] + }; + this.query = ''; + this.isHeaderSearchVisible = false; + } + handleScroll() { + requestAnimationFrame(this.checkScroll.bind(this)); + } + searchHandler(event) { + this.query = event.detail; + } + toggleHandler(event) { + this.isHeaderSearchVisible = (event.detail === 'show') ? true : false; + } + componentWillLoad() { + return this.loadData(); + } + async loadData() { + const res = await fetch('/ionicons.json'); + const json = await res.json(); + this.data = json; + let dat = []; + json.icons.forEach((icon) => { + if (!icon.name.includes('-outline') && !icon.name.includes('-sharp') && !dat.find((o) => o.name === icon.name)) { + dat.push({ + name: icon.name, + icons: [icon.name], + tags: icon.tags + }); + } + }); + insertVariants('-outline'); + insertVariants('-sharp'); + function insertVariants(variantSuffix) { + json.icons.forEach((icon) => { + if (icon.name.includes('logo-')) + return; + if (icon.name.includes(variantSuffix)) { + const baseName = icon.name.replace(variantSuffix, ''); + const datIndex = dat.findIndex((icon => icon.name === baseName)); + if (datIndex < 0) + return; + dat[datIndex].icons.push(icon.name); + } + }); + } + this.data.icons = dat; + } + checkScroll() { + // show/hide header searchbar + const headerSearchEl = document.querySelector('header .search-input'); + const bodySearchEl = document.querySelector('icon-list .search-input'); + if (!bodySearchEl || !headerSearchEl) { + return; + } + const headerInput = headerSearchEl.querySelector('input'); + const bodyInput = bodySearchEl.querySelector('input'); + if (bodySearchEl.getBoundingClientRect().top < (bodySearchEl.scrollHeight / 2)) { + if (this.isHeaderSearchVisible) + return; + this.isHeaderSearchVisible = true; + if (bodyInput === document.activeElement) + headerInput.focus(); + } + else { + if (!this.isHeaderSearchVisible) + return; + this.isHeaderSearchVisible = false; + if (headerInput === document.activeElement) + bodyInput.focus(); + } + } + render() { + return (h("site-root", null, h("site-platform-bar", { productName: "Ionicons" }), h("header-bar", { version: this.data.version, query: this.query, isSearchVisible: this.isHeaderSearchVisible }), h("stencil-router", null, h("stencil-router-scroll-top", null, h("stencil-route-switch", { scrollTopOffset: 0 }, h("stencil-route", { url: "/", component: "landing-page", exact: true, componentProps: { 'query': this.query, 'data': this.data } }), h("stencil-route", { url: "/usage", component: "usage-page", componentProps: { 'data': this.data } }), h("stencil-route", { component: "notfound-page" })))))); + } +}; +IoniconsSite.style = ioniconsSiteCss; + +export { IoniconsSite as ionicons_site }; diff --git a/docs/build/ionicons-site.esm.js b/docs/build/ionicons-site.esm.js index 10a4dac..f5f1280 100644 --- a/docs/build/ionicons-site.esm.js +++ b/docs/build/ionicons-site.esm.js @@ -1 +1,7 @@ -import{b as e}from"./p-7ed6835f.js";import{p as o}from"./p-3d1218d8.js";o().then(o=>e([["p-3e1ac0a2",[[0,"landing-page",{query:[1],data:[8]}]]],["p-b9590c7b",[[0,"notfound-page"]]],["p-4ff03b85",[[0,"shared-demo",{data:[32]}]]],["p-d0d55fdf",[[0,"usage-page",{match:[16],data:[8],exampleName:[32],exampleSuffix:[32]}]]],["p-080e086e",[[0,"announcement-bar",{data:[32]}]]],["p-3ec33283",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-73a0c297",[[0,"disqus-comments",{url:[1],siteId:[1,"site-id"]}]]],["p-e4f1fa4a",[[0,"internal-ad",{ad:[32],update:[64]}]]],["p-682833ff",[[4,"site-modal",{open:[1028],modalClose:[16],visible:[32]},[[8,"keyup","handleKeyUp"]]]]],["p-e86cdcff",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-b9a934ba",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-e0e372be",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-37223a45",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-5d07a0db",[[2,"more-resources",{resources:[16],showAuthor:[4,"show-author"],showDescription:[4,"show-description"],prismicEndpoint:[1,"prismic-endpoint"],docs:[32]}]]],["p-e6f71f8f",[[0,"ionicons-site",{data:[32],query:[32],isHeaderSearchVisible:[32]},[[9,"scroll","handleScroll"],[0,"hasSearched","searchHandler"],[0,"toggleHeaderSearch","toggleHandler"]]],[0,"header-bar",{query:[1],version:[1],isSearchVisible:[4,"is-search-visible"],isSticky:[32],isMobileMenuShown:[32]},[[9,"scroll","handleScroll"],[9,"resize","handleResize"]]],[4,"site-root"],[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}],[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}],[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}],[2,"site-platform-bar",{productName:[1,"product-name"]}],[0,"icon-search",{query:[1],size:[1],autoFocus:[1,"auto-focus"],showClearCtrl:[32]}],[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}]]],["p-cf14d368",[[0,"toast-bar",{selectedIcon:[16],selectedIconType:[1,"selected-icon-type"],typeSuffix:[1,"type-suffix"],version:[1],showCopiedConfirm:[32],isSVGDownloading:[32],hadIconOnce:[32],touchStartY:[32],touchEndY:[32]}]]],["p-52fc1aca",[[0,"icon-list",{query:[1],data:[8],selectedIcon:[32],selectedIconType:[32],isHeaderSearchVisible:[32]},[[32,"keyup","escListener"],[32,"click","handleBodyClicked"],[0,"clearToast","handleClearToast"],[9,"scroll","handleScroll"]]]]],["p-10804099",[[0,"footer-bar",{version:[1]}]]]],o)); \ No newline at end of file +import { b as bootstrapLazy } from './index-93b10a2a.js'; +import { p as patchBrowser, g as globalScripts } from './app-globals-e0181ab0.js'; + +patchBrowser().then(options => { + globalScripts(); + return bootstrapLazy([["ionicons-site",[[0,"ionicons-site",{"data":[32],"query":[32],"isHeaderSearchVisible":[32]},[[9,"scroll","handleScroll"],[0,"hasSearched","searchHandler"],[0,"toggleHeaderSearch","toggleHandler"]]]]],["landing-page",[[0,"landing-page",{"query":[1],"data":[8]}]]],["notfound-page",[[0,"notfound-page"]]],["shared-demo",[[0,"shared-demo",{"data":[32]}]]],["usage-page",[[0,"usage-page",{"match":[16],"data":[8],"exampleName":[32],"exampleSuffix":[32]}]]],["announcement-bar",[[0,"announcement-bar",{"data":[32]}]]],["context-consumer",[[0,"context-consumer",{"context":[16],"renderer":[16],"subscribe":[16],"unsubscribe":[32]}]]],["disqus-comments",[[0,"disqus-comments",{"url":[1],"siteId":[1,"site-id"]}]]],["internal-ad",[[0,"internal-ad",{"ad":[32],"update":[64]}]]],["site-modal",[[4,"site-modal",{"open":[1028],"modalClose":[16],"visible":[32]},[[8,"keyup","handleKeyUp"]]]]],["stencil-async-content",[[0,"stencil-async-content",{"documentLocation":[1,"document-location"],"content":[32]}]]],["stencil-route-title",[[0,"stencil-route-title",{"titleSuffix":[1,"title-suffix"],"pageTitle":[1,"page-title"]}]]],["stencil-router-prompt",[[0,"stencil-router-prompt",{"when":[4],"message":[1],"history":[16],"unblock":[32]}]]],["stencil-router-redirect",[[0,"stencil-router-redirect",{"history":[16],"root":[1],"url":[1]}]]],["icon-list",[[0,"icon-list",{"query":[1],"data":[8],"selectedIcon":[32],"selectedIconType":[32],"isHeaderSearchVisible":[32]},[[32,"keyup","escListener"],[32,"click","handleBodyClicked"],[0,"clearToast","handleClearToast"],[9,"scroll","handleScroll"]]]]],["header-bar",[[0,"header-bar",{"query":[1],"version":[1],"isSearchVisible":[4,"is-search-visible"],"isSticky":[32],"isMobileMenuShown":[32]},[[9,"scroll","handleScroll"],[9,"resize","handleResize"]]]]],["more-resources",[[2,"more-resources",{"resources":[16],"showAuthor":[4,"show-author"],"showDescription":[4,"show-description"],"prismicEndpoint":[1,"prismic-endpoint"],"docs":[32]}]]],["site-root",[[4,"site-root"]]],["stencil-route",[[0,"stencil-route",{"group":[513],"componentUpdated":[16],"match":[1040],"url":[1],"component":[1],"componentProps":[16],"exact":[4],"routeRender":[16],"scrollTopOffset":[2,"scroll-top-offset"],"routeViewsUpdated":[16],"location":[16],"history":[16],"historyType":[1,"history-type"]}]]],["stencil-route-switch",[[4,"stencil-route-switch",{"group":[513],"scrollTopOffset":[2,"scroll-top-offset"],"location":[16],"routeViewsUpdated":[16]}]]],["stencil-router",[[4,"stencil-router",{"root":[1],"historyType":[1,"history-type"],"titleSuffix":[1,"title-suffix"],"scrollTopOffset":[2,"scroll-top-offset"],"location":[32],"history":[32]}]]],["toast-bar",[[0,"toast-bar",{"selectedIcon":[16],"selectedIconType":[1,"selected-icon-type"],"typeSuffix":[1,"type-suffix"],"version":[1],"showCopiedConfirm":[32],"isSVGDownloading":[32],"hadIconOnce":[32],"touchStartY":[32],"touchEndY":[32]}]]],["site-platform-bar",[[2,"site-platform-bar",{"productName":[1,"product-name"]}]]],["footer-bar",[[0,"footer-bar",{"version":[1]}]]],["icon-search",[[0,"icon-search",{"query":[1],"size":[1],"autoFocus":[1,"auto-focus"],"showClearCtrl":[32]}]]],["stencil-route-link",[[4,"stencil-route-link",{"url":[1],"urlMatch":[1,"url-match"],"activeClass":[1,"active-class"],"exact":[4],"strict":[4],"custom":[1],"anchorClass":[1,"anchor-class"],"anchorRole":[1,"anchor-role"],"anchorTitle":[1,"anchor-title"],"anchorTabIndex":[1,"anchor-tab-index"],"anchorId":[1,"anchor-id"],"history":[16],"location":[16],"root":[1],"ariaHaspopup":[1,"aria-haspopup"],"ariaPosinset":[1,"aria-posinset"],"ariaSetsize":[2,"aria-setsize"],"ariaLabel":[1,"aria-label"],"match":[32]}]]]], options); +}); diff --git a/docs/build/ionicons-site.js b/docs/build/ionicons-site.js index 6963f7a..84a0f5c 100644 --- a/docs/build/ionicons-site.js +++ b/docs/build/ionicons-site.js @@ -1,141 +1,33 @@ -'use strict'; -(function () { - var currentScript = document.currentScript; - - // Safari 10 support type="module" but still download and executes the nomodule script - if (!currentScript || !currentScript.hasAttribute('nomodule') || !('onbeforeload' in currentScript)) { - - /*! -es6-promise - a tiny implementation of Promises/A+. -Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) -Licensed under MIT license -See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE -https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js -v4.2.8 -*/ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){W=t}function r(t){z=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof U?function(){U(a)}:c()}function s(){var t=0,e=new H(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t0?o(e(t),9007199254740991):0}},function(t,r,n){var e=n(2);t.exports=function(t){if(!e(t))throw TypeError(String(t)+" is not an object");return t}},function(t,r,n){var e=n(9);t.exports=function(t){return Object(e(t))}},function(t,r){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,r,n){var e=n(5),o=n(75),i=n(7),u=n(24),a=Object.defineProperty;r.f=e?a:function(t,r,n){if(i(t),r=u(r,!0),i(n),o)try{return a(t,r,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[r]=n.value),t}},function(t,r){var n={}.hasOwnProperty;t.exports=function(t,r){return n.call(t,r)}},function(t,r,n){var e=n(9),o=/"/g;t.exports=function(t,r,n,i){var u=String(e(t)),a="<"+r;return""!==n&&(a+=" "+n+'="'+String(i).replace(o,""")+'"'),a+">"+u+""}},function(t,r,n){var e=n(1);t.exports=function(t){return e(function(){var r=""[t]('"');return r!==r.toLowerCase()||r.split('"').length>3})}},function(t,r,n){var e=n(39),o=n(9);t.exports=function(t){return e(o(t))}},function(t,r,n){var e=n(4),o=n(40),i=n(16),u=n(11),a=n(60),c=n(77),s=n(17),f=s.get,l=s.enforce,h=String(c).split("toString");o("inspectSource",function(t){return c.call(t)}),(t.exports=function(t,r,n,o){var c=!!o&&!!o.unsafe,s=!!o&&!!o.enumerable,f=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof r||u(n,"name")||i(n,"name",r),l(n).source=h.join("string"==typeof r?r:"")),t!==e?(c?!f&&t[r]&&(s=!0):delete t[r],s?t[r]=n:i(t,r,n)):s?t[r]=n:a(r,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&f(this).source||c.call(this)})},function(t,r,n){var e=n(5),o=n(10),i=n(38);t.exports=e?function(t,r,n){return o.f(t,r,i(1,n))}:function(t,r,n){return t[r]=n,t}},function(t,r,n){var e,o,i,u=n(78),a=n(4),c=n(2),s=n(16),f=n(11),l=n(61),h=n(41),p=a.WeakMap;if(u){var v=new p,g=v.get,d=v.has,y=v.set;e=function(t,r){return y.call(v,t,r),r},o=function(t){return g.call(v,t)||{}},i=function(t){return d.call(v,t)}}else{var x=l("state");h[x]=!0,e=function(t,r){return s(t,x,r),r},o=function(t){return f(t,x)?t[x]:{}},i=function(t){return f(t,x)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(r){var n;if(!c(r)||(n=o(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,r){var n=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:n)(t)}},function(t,r,n){var e=n(3),o=n(46),i=n(16),u=e("unscopables"),a=Array.prototype;null==a[u]&&i(a,u,o(null)),t.exports=function(t){a[u][t]=!0}},function(t,r,n){var e=n(5),o=n(59),i=n(38),u=n(14),a=n(24),c=n(11),s=n(75),f=Object.getOwnPropertyDescriptor;r.f=e?f:function(t,r){if(t=u(t),r=a(r,!0),s)try{return f(t,r)}catch(t){}if(c(t,r))return i(!o.f.call(t,r),t[r])}},function(t,r){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,r,n){"use strict";var e=n(24),o=n(10),i=n(38);t.exports=function(t,r,n){var u=e(r);u in t?o.f(t,u,i(0,n)):t[u]=n}},function(t,r,n){var e=n(41),o=n(2),i=n(11),u=n(10).f,a=n(62),c=n(50),s=a("meta"),f=0,l=Object.isExtensible||function(){return!0},h=function(t){u(t,s,{value:{objectID:"O"+ ++f,weakData:{}}})},p=t.exports={REQUIRED:!1,fastKey:function(t,r){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,s)){if(!l(t))return"F";if(!r)return"E";h(t)}return t[s].objectID},getWeakData:function(t,r){if(!i(t,s)){if(!l(t))return!0;if(!r)return!1;h(t)}return t[s].weakData},onFreeze:function(t){return c&&p.REQUIRED&&l(t)&&!i(t,s)&&h(t),t}};e[s]=!0},function(t,r,n){var e=n(2);t.exports=function(t,r){if(!e(t))return t;var n,o;if(r&&"function"==typeof(n=t.toString)&&!e(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!e(o=n.call(t)))return o;if(!r&&"function"==typeof(n=t.toString)&&!e(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,r){t.exports=!1},function(t,r,n){var e=n(18),o=Math.max,i=Math.min;t.exports=function(t,r){var n=e(t);return n<0?o(n+r,0):i(n,r)}},function(t,r,n){var e=n(28),o=n(39),i=n(8),u=n(6),a=n(33),c=[].push,s=function(t){var r=1==t,n=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l;return function(p,v,g,d){for(var y,x,m=i(p),b=o(m),S=e(v,g,3),w=u(b.length),E=0,O=d||a,A=r?O(p,w):n?O(p,0):void 0;w>E;E++)if((h||E in b)&&(x=S(y=b[E],E,m),t))if(r)A[E]=x;else if(x)switch(t){case 3:return!0;case 5:return y;case 6:return E;case 2:c.call(A,y)}else if(f)return!1;return l?-1:s||f?f:A}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},function(t,r,n){var e=n(29);t.exports=function(t,r,n){if(e(t),void 0===r)return t;switch(n){case 0:return function(){return t.call(r)};case 1:return function(n){return t.call(r,n)};case 2:return function(n,e){return t.call(r,n,e)};case 3:return function(n,e,o){return t.call(r,n,e,o)}}return function(){return t.apply(r,arguments)}}},function(t,r){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,r,n){var e=n(11),o=n(8),i=n(61),u=n(91),a=i("IE_PROTO"),c=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){return t=o(t),e(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,r,n){var e=n(10).f,o=n(11),i=n(3)("toStringTag");t.exports=function(t,r,n){t&&!o(t=n?t:t.prototype,i)&&e(t,i,{configurable:!0,value:r})}},function(t,r,n){var e=n(9),o="["+n(53)+"]",i=RegExp("^"+o+o+"*"),u=RegExp(o+o+"*$"),a=function(t){return function(r){var n=String(e(r));return 1&t&&(n=n.replace(i,"")),2&t&&(n=n.replace(u,"")),n}};t.exports={start:a(1),end:a(2),trim:a(3)}},function(t,r,n){var e=n(2),o=n(45),i=n(3)("species");t.exports=function(t,r){var n;return o(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!o(n.prototype)?e(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===r?0:r)}},function(t,r,n){var e=n(1),o=n(3)("species");t.exports=function(t){return!e(function(){var r=[];return(r.constructor={})[o]=function(){return{foo:1}},1!==r[t](Boolean).foo})}},function(t,r){t.exports={}},function(t,r){t.exports=function(t,r,n){if(!(t instanceof r))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,r,n){"use strict";var e=n(7);t.exports=function(){var t=e(this),r="";return t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.sticky&&(r+="y"),r}},function(t,r){t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},function(t,r,n){var e=n(1),o=n(21),i="".split;t.exports=e(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,r,n){var e=n(4),o=n(60),i=n(25),u=e["__core-js_shared__"]||o("__core-js_shared__",{});(t.exports=function(t,r){return u[t]||(u[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.2.0",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,r){t.exports={}},function(t,r,n){var e=n(109),o=n(4),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,r){return arguments.length<2?i(e[t])||i(o[t]):e[t]&&e[t][r]||o[t]&&o[t][r]}},function(t,r,n){var e=n(80),o=n(63).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},function(t,r,n){var e=n(1),o=/#|\.prototype\./,i=function(t,r){var n=a[u(t)];return n==s||n!=c&&("function"==typeof r?e(r):!!r)},u=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=i.data={},c=i.NATIVE="N",s=i.POLYFILL="P";t.exports=i},function(t,r,n){var e=n(21);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,r,n){var e=n(7),o=n(83),i=n(63),u=n(41),a=n(113),c=n(76),s=n(61)("IE_PROTO"),f=function(){},l=function(){var t,r=c("iframe"),n=i.length;for(r.style.display="none",a.appendChild(r),r.src=String("javascript:"),(t=r.contentWindow.document).open(),t.write("`), + h("h3", { id: "basic-usage" }, "Basic usage"), + h("p", null, + "To use a built-in icon from the Ionicons package, populate the", + " ", + h("code", null, "name"), + " attribute on the ", + h("code", null, "ion-icon"), + " component:"), + highlight$1(``), + h("h3", { id: "basic-usage" }, "Custom icons"), + h("p", null, + "To use a custom SVG, provide its url in the ", + h("code", null, "src"), + " attribute to request the external SVG file. The ", + h("code", null, "src"), + " attribute works the same as ", + h("code", null, ""), + " 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 ", + h("code", null, "svg"), + " and does not allow scripts or events within the ", + h("code", null, "svg"), + " element."), + highlight$1(``), + h("h2", null, "Variants"), + h("p", null, + "Each app icon in Ionicons has a ", + h("code", null, "filled"), + ",", + " ", + h("code", null, "outline"), + " and ", + h("code", null, "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."), + highlight$1(` + + `), + h("h3", null, "Platform specificity"), + h("p", null, + "When using icons in Ionic Framework you can specify different icons per platform. Use the ", + h("code", null, "md"), + " and ", + h("code", null, "ios"), + " attributes and provide the platform specific icon/variant name."), + highlight$1(``), + h("h2", null, "Size"), + h("p", null, + "To specify the icon size, you can use the ", + h("code", null, "size"), + " attribute for our pre-defined font sizes."), + highlight$1(` +`), + h("p", null, + "Or you can set a specific size by applying the ", + h("code", null, "font-size"), + " ", + "CSS property on the ", + h("code", null, "ion-icon"), + " component. It's recommended to use pixel sizes that are a multiple of 8 (8, 16, 32, 64, etc.)"), + highlight$1(`ion-icon { + font-size: 64px; +}`), + h("h2", null, "Color"), + h("p", null, + "Specify the icon color by applying the ", + h("code", null, "color"), + " CSS property on the ", + h("code", null, "ion-icon"), + " component."), + highlight$1(`ion-icon { + color: blue; +}`), + h("h2", null, "Stroke weight"), + h("p", null, + "When using an ", + h("code", null, "outline"), + " icon variant it is possible to adjust the stroke weight, for improved visual balance relative to the icon's size or relative to the weight of adjacent text. You can set a specific size by applying the ", + h("code", null, "--ionicon-stroke-weight"), + " CSS custom property to the ", + h("code", null, "ion-icon"), + " component. The default value is", + " ", + h("code", null, "32px")), + highlight$1(``), + highlight$1(`ion-icon { + --ionicon-stroke-width: 16px; +}`), + h("h2", null, "Migrating from v4"), + h("p", null, + "See the", + " ", + h("a", { href: "https://github.com/ionic-team/ionicons/releases/tag/5.0.0" }, "5.0 release notes"), + " ", + "for a list of icon deletions/renames. You can find an archived version of the v4 site ", + h("a", { href: "/v4/" }, "here"), + "."))); +} +function highlight$1(text) { + return (h("div", { class: "styled-code" }, + h("pre", { innerHTML: lib.highlightAuto(text).value }))); +} + +const usagePageCss = "usage-page{height:100%}usage-page .wrapper{padding-bottom:160px}usage-page .lead{color:#6e7f99}"; + +const UsagePage = class { + constructor(hostRef) { + registerInstance(this, hostRef); + this.exampleName = "heart"; + this.exampleSuffix = ""; + this.queue = getContext(this, "queue"); + } + componentWillLoad() { + if (!window.location.hash) + return; + let iconNames = []; + this.data.icons.map((o) => { + iconNames = iconNames.concat(o.icons); + }); + let hash = window.location.hash.replace("#", ""); + if (hash.includes("logo-")) { + this.exampleName = hash; + return; + } + if (iconNames.includes(hash)) { + ["-outline", "-sharp"].forEach((suffix) => { + if (hash.includes(suffix)) { + hash = hash.replace(suffix, ""); + this.exampleSuffix = suffix; + } + }); + this.exampleName = hash; + } + } + componentDidLoad() { + if (window.location.hash) { + setTimeout(() => { + const offset = document.getElementById("basic-usage").offsetTop - 100; + window.scrollTo({ left: 0, top: offset, behavior: "smooth" }); + }, 50); + } + } + render() { + return (h("main", null, h("div", { class: "wrapper" }, h(ResponsiveContainer, null, h("div", { class: "content" }, content(this.data.version, this.exampleName, this.exampleSuffix)))), h("footer-bar", { version: this.data.version }))); + } +}; +UsagePage.style = usagePageCss; + +export { UsagePage as usage_page }; diff --git a/docs/index.html b/docs/index.html index 07b0db8..88555d0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4456 +1,31 @@ - -Ionicons: The premium icon pack for Ionic Framework - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
See how Ionicons fits into the entire Ionic Ecosystem -->
Ionicons is part of the -Ionic Ecosystem ->

Open source icons.
Lovingly hand-crafted.

Premium designed icons for use in web, iOS, Android, and desktop apps. Support for SVG and web font. Completely open source, MIT licensed and built by -Ionic.

App icons

  • Outline
  • Filled
  • Sharp

Logos

- - Accessibility - -Accessibility - Accessibility - -Add - -Add Circle - -Add Circle - Add Circle - -Add - -Add - -Airplane - -Airplane - Airplane - -Alarm - -Alarm - -Alarm - -Albums - -Albums - -Albums - Alert - -Alert Circle - -Alert Circle - -Alert Circle - -Alert - -Alert - American Football - -American Football - American Football - -Analytics - -Analytics - -Analytics - -Aperture - -Aperture - Aperture - -Apps - -Apps - -Apps - Archive - Archive - -Archive - -Arrow Back - Arrow Back Circle - -Arrow Back Circle - Arrow Back Circle - -Arrow Back - Arrow Back - Arrow Down - Arrow Down Circle - -Arrow Down Circle - Arrow Down Circle - -Arrow Down - Arrow Down - Arrow Forward - Arrow Forward Circle - -Arrow Forward Circle - Arrow Forward Circle - -Arrow Forward - Arrow Forward - Arrow Redo - -Arrow Redo Circle - -Arrow Redo Circle - Arrow Redo Circle - -Arrow Redo - Arrow Redo - -Arrow Undo - -Arrow Undo Circle - -Arrow Undo Circle - Arrow Undo Circle - -Arrow Undo - Arrow Undo - -Arrow Up - Arrow Up Circle - -Arrow Up Circle - Arrow Up Circle - -Arrow Up - Arrow Up - At - At Circle - -At Circle - At Circle - -At - At - -Attach - Attach - Attach - Backspace - -Backspace - Backspace - -Bag - -Bag Add - -Bag Add - Bag Add - -Bag Check - -Bag Check - Bag Check - -Bag Handle - -Bag Handle - Bag Handle - -Bag - Bag Remove - -Bag Remove - Bag Remove - -Bag - -Balloon - -Balloon - -Balloon - -Ban - Ban - -Ban - -Bandage - -Bandage - -Bandage - -Bar Chart - -Bar Chart - -Bar Chart - -Barbell - -Barbell - -Barbell - -Barcode - -Barcode - Barcode - Baseball - -Baseball - Baseball - -Basket - -Basket - Basket - -Basketball - -Basketball - Basketball - -Battery Charging - -Battery Charging - -Battery Charging - -Battery Dead - Battery Dead - Battery Dead - -Battery Full - -Battery Full - -Battery Full - -Battery Half - -Battery Half - -Battery Half - -Beaker - -Beaker - Beaker - -Bed - -Bed - Bed - -Beer - -Beer - Beer - -Bicycle - -Bicycle - -Bicycle - -Bluetooth - -Bluetooth - Bluetooth - -Boat - -Boat - Boat - -Body - -Body - Body - -Bonfire - -Bonfire - Bonfire - -Book - -Book - Book - -Bookmark - -Bookmark - Bookmark - Bookmarks - -Bookmarks - Bookmarks - -Bowling Ball - -Bowling Ball - -Bowling Ball - -Briefcase - -Briefcase - Briefcase - -Browsers - -Browsers - -Browsers - -Brush - -Brush - Brush - -Bug - -Bug - Bug - -Build - -Build - Build - -Bulb - -Bulb - Bulb - -Bus - -Bus - -Bus - -Business - -Business - -Business - Cafe - -Cafe - Cafe - -Calculator - -Calculator - Calculator - -Calendar - -Calendar Clear - -Calendar Clear - -Calendar Clear - -Calendar Number - -Calendar Number - Calendar Number - -Calendar - Calendar - -Call - -Call - Call - -Camera - -Camera - -Camera Reverse - -Camera Reverse - Camera Reverse - -Camera - -Car - -Car - -Car - -Car Sport - -Car Sport - -Car Sport - -Card - -Card - -Card - -Caret Back - -Caret Back Circle - -Caret Back Circle - Caret Back Circle - -Caret Back - -Caret Back - Caret Down - -Caret Down Circle - -Caret Down Circle - Caret Down Circle - -Caret Down - -Caret Down - Caret Forward - -Caret Forward Circle - -Caret Forward Circle - Caret Forward Circle - -Caret Forward - -Caret Forward - Caret Up - -Caret Up Circle - -Caret Up Circle - Caret Up Circle - -Caret Up - -Caret Up - Cart - -Cart - Cart - -Cash - -Cash - Cash - Cellular - -Cellular - -Cellular - -Chatbox - -Chatbox Ellipses - -Chatbox Ellipses - Chatbox Ellipses - -Chatbox - Chatbox - -Chatbubble - -Chatbubble Ellipses - -Chatbubble Ellipses - Chatbubble Ellipses - -Chatbubble - Chatbubble - -Chatbubbles - -Chatbubbles - Chatbubbles - -Checkbox - -Checkbox - -Checkbox - -Checkmark - -Checkmark Circle - -Checkmark Circle - Checkmark Circle - -Checkmark Done - Checkmark Done Circle - -Checkmark Done Circle - -Checkmark Done Circle - -Checkmark Done - Checkmark Done - Checkmark - -Checkmark - -Chevron Back - -Chevron Back Circle - -Chevron Back Circle - Chevron Back Circle - -Chevron Back - -Chevron Back - -Chevron Down - -Chevron Down Circle - -Chevron Down Circle - Chevron Down Circle - -Chevron Down - -Chevron Down - -Chevron Forward - -Chevron Forward Circle - -Chevron Forward Circle - Chevron Forward Circle - -Chevron Forward - -Chevron Forward - -Chevron Up - -Chevron Up Circle - -Chevron Up Circle - Chevron Up Circle - -Chevron Up - -Chevron Up - -Clipboard - -Clipboard - Clipboard - -Close - -Close Circle - -Close Circle - Close Circle - -Close - -Close - -Cloud - -Cloud Circle - -Cloud Circle - Cloud Circle - -Cloud Done - -Cloud Done - -Cloud Done - -Cloud Download - -Cloud Download - Cloud Download - -Cloud Offline - -Cloud Offline - -Cloud Offline - -Cloud - Cloud - -Cloud Upload - -Cloud Upload - -Cloud Upload - -Cloudy - -Cloudy Night - -Cloudy Night - Cloudy Night - -Cloudy - Cloudy - -Code - -Code Download - Code Download - Code Download - Code - Code - -Code Slash - -Code Slash - Code Slash - -Code Working - Code Working - -Code Working - -Cog - -Cog - -Cog - -Color Fill - -Color Fill - Color Fill - -Color Filter - -Color Filter - -Color Filter - -Color Palette - -Color Palette - Color Palette - -Color Wand - -Color Wand - Color Wand - -Compass - -Compass - -Compass - -Construct - -Construct - Construct - -Contract - Contract - Contract - Contrast - -Contrast - Contrast - -Copy - -Copy - Copy - -Create - -Create - -Create - Crop - -Crop - Crop - -Cube - -Cube - -Cube - -Cut - -Cut - Cut - Desktop - -Desktop - -Desktop - -Diamond - -Diamond - Diamond - -Dice - -Dice - Dice - -Disc - -Disc - Disc - -Document - -Document Attach - -Document Attach - Document Attach - -Document Lock - -Document Lock - Document Lock - -Document - Document - -Document Text - -Document Text - Document Text - -Documents - -Documents - Documents - -Download - -Download - -Download - -Duplicate - -Duplicate - Duplicate - -Ear - -Ear - Ear - -Earth - -Earth - -Earth - -Easel - -Easel - -Easel - Egg - -Egg - Egg - -Ellipse - -Ellipse - -Ellipse - -Ellipsis Horizontal - -Ellipsis Horizontal Circle - Ellipsis Horizontal Circle - Ellipsis Horizontal Circle - -Ellipsis Horizontal - -Ellipsis Horizontal - -Ellipsis Vertical - -Ellipsis Vertical Circle - Ellipsis Vertical Circle - Ellipsis Vertical Circle - -Ellipsis Vertical - -Ellipsis Vertical - -Enter - -Enter - -Enter - -Exit - -Exit - Exit - -Expand - Expand - Expand - Extension Puzzle - -Extension Puzzle - Extension Puzzle - -Eye - -Eye Off - -Eye Off - -Eye Off - -Eye - Eye - -Eyedrop - -Eyedrop - Eyedrop - -Fast Food - -Fast Food - -Fast Food - -Female - -Female - -Female - -File Tray - -File Tray Full - -File Tray Full - -File Tray Full - -File Tray - -File Tray - -File Tray Stacked - -File Tray Stacked - -File Tray Stacked - -Film - -Film - -Film - -Filter - -Filter Circle - -Filter Circle - Filter Circle - -Filter - -Filter - Finger Print - -Finger Print - -Finger Print - -Fish - -Fish - -Fish - -Fitness - -Fitness - -Fitness - -Flag - -Flag - Flag - -Flame - -Flame - Flame - -Flash - -Flash Off - -Flash Off - -Flash Off - -Flash - Flash - Flashlight - -Flashlight - -Flashlight - -Flask - -Flask - Flask - -Flower - -Flower - -Flower - -Folder - -Folder Open - -Folder Open - Folder Open - -Folder - Folder - -Football - -Football - Football - -Footsteps - -Footsteps - Footsteps - -Funnel - -Funnel - Funnel - Game Controller - -Game Controller - Game Controller - -Gift - -Gift - Gift - -Git Branch - -Git Branch - -Git Branch - -Git Commit - -Git Commit - -Git Commit - -Git Compare - -Git Compare - Git Compare - -Git Merge - -Git Merge - -Git Merge - -Git Network - -Git Network - Git Network - -Git Pull Request - -Git Pull Request - -Git Pull Request - -Glasses - -Glasses - Glasses - -Globe - -Globe - Globe - Golf - -Golf - Golf - -Grid - -Grid - -Grid - -Hammer - -Hammer - Hammer - -Hand Left - -Hand Left - Hand Left - -Hand Right - -Hand Right - Hand Right - -Happy - -Happy - -Happy - -Hardware Chip - -Hardware Chip - Hardware Chip - -Headset - -Headset - Headset - -Heart - -Heart Circle - -Heart Circle - -Heart Circle - -Heart Dislike - -Heart Dislike Circle - -Heart Dislike Circle - -Heart Dislike Circle - -Heart Dislike - -Heart Dislike - -Heart Half - -Heart Half - -Heart Half - -Heart - Heart - -Help - Help Buoy - -Help Buoy - Help Buoy - -Help Circle - -Help Circle - -Help Circle - -Help - Help - Home - -Home - Home - -Hourglass - -Hourglass - -Hourglass - -Ice Cream - -Ice Cream - Ice Cream - -Id Card - -Id Card - -Id Card - -Image - -Image - Image - -Images - -Images - Images - -Infinite - Infinite - Infinite - -Information - Information Circle - -Information Circle - -Information Circle - -Information - Information - Invert Mode - -Invert Mode - -Invert Mode - Journal - -Journal - Journal - -Key - -Key - Key - -Keypad - -Keypad - -Keypad - -Language - -Language - Language - -Laptop - -Laptop - Laptop - -Layers - -Layers - Layers - Leaf - -Leaf - Leaf - -Library - -Library - Library - -Link - Link - Link - List - List Circle - -List Circle - -List Circle - -List - -List - -Locate - Locate - -Locate - Location - -Location - -Location - -Lock Closed - -Lock Closed - -Lock Closed - -Lock Open - -Lock Open - -Lock Open - -Log In - -Log In - -Log In - -Log Out - -Log Out - Log Out - -Logo Alipay - -Logo Amazon - -Logo Amplify - Logo Android - -Logo Angular - -Logo Apple - -Logo Apple Appstore - -Logo Apple Ar - -Logo Behance - Logo Bitbucket - -Logo Bitcoin - -Logo Buffer - -Logo Capacitor - -Logo Chrome - -Logo Closed Captioning - -Logo Codepen - -Logo Css3 - -Logo Designernews - -Logo Deviantart - -Logo Discord - -Logo Docker - -Logo Dribbble - -Logo Dropbox - -Logo Edge - -Logo Electron - -Logo Euro - -Logo Facebook - Logo Figma - Logo Firebase - -Logo Firefox - -Logo Flickr - -Logo Foursquare - -Logo Github - -Logo Gitlab - -Logo Google - -Logo Google Playstore - -Logo Hackernews - -Logo Html5 - -Logo Instagram - -Logo Ionic - -Logo Ionitron - -Logo Javascript - -Logo Laravel - -Logo Linkedin - -Logo Markdown - -Logo Mastodon - -Logo Medium - -Logo Microsoft - -Logo No Smoking - -Logo Nodejs - -Logo Npm - -Logo Octocat - -Logo Paypal - -Logo Pinterest - -Logo Playstation - -Logo Pwa - -Logo Python - -Logo React - Logo Reddit - -Logo Rss - -Logo Sass - -Logo Skype - -Logo Slack - -Logo Snapchat - -Logo Soundcloud - -Logo Stackoverflow - -Logo Steam - -Logo Stencil - -Logo Tableau - -Logo Tiktok - -Logo Tumblr - -Logo Tux - -Logo Twitch - Logo Twitter - -Logo Usd - -Logo Venmo - -Logo Vercel - Logo Vimeo - -Logo Vk - Logo Vue - -Logo Web Component - Logo Wechat - -Logo Whatsapp - Logo Windows - -Logo Wordpress - -Logo Xbox - -Logo Xing - -Logo Yahoo - -Logo Yen - -Logo Youtube - -Magnet - -Magnet - Magnet - -Mail - -Mail Open - -Mail Open - Mail Open - -Mail - -Mail - -Mail Unread - -Mail Unread - -Mail Unread - -Male - -Male Female - -Male Female - -Male Female - -Male - -Male - -Man - -Man - -Man - -Map - -Map - Map - -Medal - -Medal - Medal - Medical - -Medical - Medical - -Medkit - -Medkit - Medkit - -Megaphone - -Megaphone - Megaphone - -Menu - Menu - -Menu - Mic - -Mic Circle - -Mic Circle - -Mic Circle - -Mic Off - -Mic Off Circle - -Mic Off Circle - -Mic Off Circle - -Mic Off - -Mic Off - Mic - Mic - -Moon - -Moon - Moon - -Move - Move - Move - Musical Note - -Musical Note - Musical Note - -Musical Notes - -Musical Notes - Musical Notes - -Navigate - -Navigate Circle - -Navigate Circle - Navigate Circle - -Navigate - -Navigate - Newspaper - -Newspaper - -Newspaper - -Notifications - -Notifications Circle - -Notifications Circle - -Notifications Circle - -Notifications Off - -Notifications Off Circle - -Notifications Off Circle - -Notifications Off Circle - -Notifications Off - -Notifications Off - -Notifications - Notifications - -Nuclear - -Nuclear - Nuclear - -Nutrition - -Nutrition - Nutrition - -Open - -Open - Open - -Options - -Options - -Options - -Paper Plane - -Paper Plane - Paper Plane - Partly Sunny - -Partly Sunny - Partly Sunny - -Pause - -Pause Circle - -Pause Circle - Pause Circle - -Pause - -Pause - Paw - -Paw - Paw - Pencil - Pencil - Pencil - -People - -People Circle - -People Circle - -People Circle - -People - People - Person - -Person Add - -Person Add - Person Add - Person Circle - -Person Circle - -Person Circle - -Person - Person Remove - -Person Remove - Person Remove - -Person - -Phone Landscape - -Phone Landscape - Phone Landscape - -Phone Portrait - -Phone Portrait - Phone Portrait - -Pie Chart - -Pie Chart - Pie Chart - -Pin - -Pin - Pin - -Pint - -Pint - Pint - -Pizza - -Pizza - Pizza - -Planet - -Planet - Planet - -Play - -Play Back - -Play Back Circle - -Play Back Circle - -Play Back Circle - -Play Back - Play Back - Play Circle - -Play Circle - -Play Circle - -Play Forward - -Play Forward Circle - -Play Forward Circle - -Play Forward Circle - -Play Forward - Play Forward - Play - Play - Play Skip Back - -Play Skip Back Circle - -Play Skip Back Circle - -Play Skip Back Circle - -Play Skip Back - Play Skip Back - Play Skip Forward - -Play Skip Forward Circle - -Play Skip Forward Circle - -Play Skip Forward Circle - -Play Skip Forward - Play Skip Forward - Podium - -Podium - Podium - Power - Power - Power - Pricetag - -Pricetag - -Pricetag - -Pricetags - -Pricetags - -Pricetags - -Print - -Print - -Print - -Prism - -Prism - Prism - Pulse - -Pulse - -Pulse - -Push - -Push - -Push - -Qr Code - -Qr Code - Qr Code - Radio - -Radio Button Off - Radio Button Off - Radio Button Off - Radio Button On - -Radio Button On - -Radio Button On - -Radio - Radio - -Rainy - -Rainy - -Rainy - -Reader - -Reader - -Reader - -Receipt - -Receipt - Receipt - -Recording - -Recording - -Recording - -Refresh - Refresh Circle - -Refresh Circle - Refresh Circle - -Refresh - Refresh - Reload - -Reload Circle - -Reload Circle - -Reload Circle - -Reload - -Reload - -Remove - -Remove Circle - -Remove Circle - Remove Circle - -Remove - -Remove - -Reorder Four - Reorder Four - Reorder Four - Reorder Three - Reorder Three - -Reorder Three - Reorder Two - -Reorder Two - -Reorder Two - -Repeat - Repeat - Repeat - -Resize - Resize - Resize - Restaurant - -Restaurant - Restaurant - -Return Down Back - -Return Down Back - -Return Down Back - -Return Down Forward - -Return Down Forward - -Return Down Forward - -Return Up Back - -Return Up Back - -Return Up Back - -Return Up Forward - -Return Up Forward - -Return Up Forward - -Ribbon - -Ribbon - -Ribbon - -Rocket - -Rocket - Rocket - -Rose - -Rose - Rose - -Sad - -Sad - -Sad - -Save - Save - Save - -Scale - -Scale - Scale - -Scan - Scan Circle - -Scan Circle - Scan Circle - -Scan - Scan - -School - -School - -School - -Search - -Search Circle - Search Circle - -Search Circle - Search - Search - -Send - -Send - Send - Server - -Server - Server - -Settings - -Settings - Settings - -Shapes - -Shapes - -Shapes - -Share - -Share - Share - -Share Social - -Share Social - -Share Social - -Shield - -Shield Checkmark - -Shield Checkmark - Shield Checkmark - -Shield Half - -Shield Half - -Shield Half - -Shield - Shield - -Shirt - -Shirt - Shirt - -Shuffle - Shuffle - Shuffle - Skull - -Skull - -Skull - -Snow - -Snow - Snow - -Sparkles - -Sparkles - Sparkles - -Speedometer - -Speedometer - Speedometer - -Square - -Square - Square - Star - -Star Half - -Star Half - -Star Half - -Star - Star - -Stats Chart - -Stats Chart - -Stats Chart - -Stop - -Stop Circle - -Stop Circle - -Stop Circle - -Stop - -Stop - Stopwatch - -Stopwatch - -Stopwatch - -Storefront - -Storefront - Storefront - -Subway - -Subway - -Subway - -Sunny - -Sunny - Sunny - -Swap Horizontal - Swap Horizontal - Swap Horizontal - Swap Vertical - Swap Vertical - Swap Vertical - Sync - -Sync Circle - -Sync Circle - Sync Circle - -Sync - -Sync - -Tablet Landscape - -Tablet Landscape - Tablet Landscape - -Tablet Portrait - -Tablet Portrait - -Tablet Portrait - -Telescope - -Telescope - Telescope - -Tennisball - -Tennisball - Tennisball - -Terminal - -Terminal - -Terminal - -Text - -Text - Text - -Thermometer - -Thermometer - Thermometer - -Thumbs Down - -Thumbs Down - Thumbs Down - -Thumbs Up - -Thumbs Up - Thumbs Up - -Thunderstorm - -Thunderstorm - Thunderstorm - -Ticket - -Ticket - Ticket - -Time - -Time - Time - -Timer - -Timer - -Timer - -Today - -Today - -Today - -Toggle - -Toggle - -Toggle - -Trail Sign - -Trail Sign - Trail Sign - -Train - -Train - Train - -Transgender - -Transgender - Transgender - -Trash - -Trash Bin - -Trash Bin - -Trash Bin - Trash - Trash - -Trending Down - Trending Down - Trending Down - -Trending Up - Trending Up - Trending Up - -Triangle - -Triangle - -Triangle - Trophy - -Trophy - Trophy - -Tv - Tv - Tv - Umbrella - -Umbrella - Umbrella - -Unlink - Unlink - Unlink - Videocam - -Videocam Off - -Videocam Off - Videocam Off - -Videocam - Videocam - -Volume High - -Volume High - Volume High - -Volume Low - -Volume Low - Volume Low - -Volume Medium - -Volume Medium - Volume Medium - Volume Mute - -Volume Mute - -Volume Mute - -Volume Off - -Volume Off - Volume Off - Walk - Walk - -Walk - -Wallet - -Wallet - Wallet - -Warning - -Warning - -Warning - -Watch - -Watch - Watch - -Water - -Water - Water - -Wifi - Wifi - -Wifi - -Wine - -Wine - -Wine - -Woman - -Woman - -Woman - - - - \ No newline at end of file + > Accessibility Accessibility Accessibility Add Add Circle Add Circle Add Circle Add Add Airplane Airplane Airplane Alarm Alarm Alarm Albums Albums Albums Alert Alert Circle Alert Circle Alert Circle Alert Alert American Football American Football American Football Analytics Analytics Analytics Aperture Aperture Aperture Apps Apps Apps Archive Archive Archive Arrow Back Arrow Back Circle Arrow Back Circle Arrow Back Circle Arrow Back Arrow Back Arrow Down Arrow Down Circle Arrow Down Circle Arrow Down Circle Arrow Down Arrow Down Arrow Forward Arrow Forward Circle Arrow Forward Circle Arrow Forward Circle Arrow Forward Arrow Forward Arrow Redo Arrow Redo Circle Arrow Redo Circle Arrow Redo Circle Arrow Redo Arrow Redo Arrow Undo Arrow Undo Circle Arrow Undo Circle Arrow Undo Circle Arrow Undo Arrow Undo Arrow Up Arrow Up Circle Arrow Up Circle Arrow Up Circle Arrow Up Arrow Up At At Circle At Circle At Circle At At Attach Attach Attach Backspace Backspace Backspace Bag Bag Add Bag Add Bag Add Bag Check Bag Check Bag Check Bag Handle Bag Handle Bag Handle Bag Bag Remove Bag Remove Bag Remove Bag Balloon Balloon Balloon Ban Ban Ban Bandage Bandage Bandage Bar Chart Bar Chart Bar Chart Barbell Barbell Barbell Barcode Barcode Barcode Baseball Baseball Baseball Basket Basket Basket Basketball Basketball Basketball Battery Charging Battery Charging Battery Charging Battery Dead Battery Dead Battery Dead Battery Full Battery Full Battery Full Battery Half Battery Half Battery Half Beaker Beaker Beaker Bed Bed Bed Beer Beer Beer Bicycle Bicycle Bicycle Bluetooth Bluetooth Bluetooth Boat Boat Boat Body Body Body Bonfire Bonfire Bonfire Book Book Book Bookmark Bookmark Bookmark Bookmarks Bookmarks Bookmarks Bowling Ball Bowling Ball Bowling Ball Briefcase Briefcase Briefcase Browsers Browsers Browsers Brush Brush Brush Bug Bug Bug Build Build Build Bulb Bulb Bulb Bus Bus Bus Business Business Business Cafe Cafe Cafe Calculator Calculator Calculator Calendar Calendar Clear Calendar Clear Calendar Clear Calendar Number Calendar Number Calendar Number Calendar Calendar Call Call Call Camera Camera Camera Reverse Camera Reverse Camera Reverse Camera Car Car Car Car Sport Car Sport Car Sport Card Card Card Caret Back Caret Back Circle Caret Back Circle Caret Back Circle Caret Back Caret Back Caret Down Caret Down Circle Caret Down Circle Caret Down Circle Caret Down Caret Down Caret Forward Caret Forward Circle Caret Forward Circle Caret Forward Circle Caret Forward Caret Forward Caret Up Caret Up Circle Caret Up Circle Caret Up Circle Caret Up Caret Up Cart Cart Cart Cash Cash Cash Cellular Cellular Cellular Chatbox Chatbox Ellipses Chatbox Ellipses Chatbox Ellipses Chatbox Chatbox Chatbubble Chatbubble Ellipses Chatbubble Ellipses Chatbubble Ellipses Chatbubble Chatbubble Chatbubbles Chatbubbles Chatbubbles Checkbox Checkbox Checkbox Checkmark Checkmark Circle Checkmark Circle Checkmark Circle Checkmark Done Checkmark Done Circle Checkmark Done Circle Checkmark Done Circle Checkmark Done Checkmark Done Checkmark Checkmark Chevron Back Chevron Back Circle Chevron Back Circle Chevron Back Circle Chevron Back Chevron Back Chevron Down Chevron Down Circle Chevron Down Circle Chevron Down Circle Chevron Down Chevron Down Chevron Forward Chevron Forward Circle Chevron Forward Circle Chevron Forward Circle Chevron Forward Chevron Forward Chevron Up Chevron Up Circle Chevron Up Circle Chevron Up Circle Chevron Up Chevron Up Clipboard Clipboard Clipboard Close Close Circle Close Circle Close Circle Close Close Cloud Cloud Circle Cloud Circle Cloud Circle Cloud Done Cloud Done Cloud Done Cloud Download Cloud Download Cloud Download Cloud Offline Cloud Offline Cloud Offline Cloud Cloud Cloud Upload Cloud Upload Cloud Upload Cloudy Cloudy Night Cloudy Night Cloudy Night Cloudy Cloudy Code Code Download Code Download Code Download Code Code Code Slash Code Slash Code Slash Code Working Code Working Code Working Cog Cog Cog Color Fill Color Fill Color Fill Color Filter Color Filter Color Filter Color Palette Color Palette Color Palette Color Wand Color Wand Color Wand Compass Compass Compass Construct Construct Construct Contract Contract Contract Contrast Contrast Contrast Copy Copy Copy Create Create Create Crop Crop Crop Cube Cube Cube Cut Cut Cut Desktop Desktop Desktop Diamond Diamond Diamond Dice Dice Dice Disc Disc Disc Document Document Attach Document Attach Document Attach Document Lock Document Lock Document Lock Document Document Document Text Document Text Document Text Documents Documents Documents Download Download Download Duplicate Duplicate Duplicate Ear Ear Ear Earth Earth Earth Easel Easel Easel Egg Egg Egg Ellipse Ellipse Ellipse Ellipsis Horizontal Ellipsis Horizontal Circle Ellipsis Horizontal Circle Ellipsis Horizontal Circle Ellipsis Horizontal Ellipsis Horizontal Ellipsis Vertical Ellipsis Vertical Circle Ellipsis Vertical Circle Ellipsis Vertical Circle Ellipsis Vertical Ellipsis Vertical Enter Enter Enter Exit Exit Exit Expand Expand Expand Extension Puzzle Extension Puzzle Extension Puzzle Eye Eye Off Eye Off Eye Off Eye Eye Eyedrop Eyedrop Eyedrop Fast Food Fast Food Fast Food Female Female Female File Tray File Tray Full File Tray Full File Tray Full File Tray File Tray File Tray Stacked File Tray Stacked File Tray Stacked Film Film Film Filter Filter Circle Filter Circle Filter Circle Filter Filter Finger Print Finger Print Finger Print Fish Fish Fish Fitness Fitness Fitness Flag Flag Flag Flame Flame Flame Flash Flash Off Flash Off Flash Off Flash Flash Flashlight Flashlight Flashlight Flask Flask Flask Flower Flower Flower Folder Folder Open Folder Open Folder Open Folder Folder Football Football Football Footsteps Footsteps Footsteps Funnel Funnel Funnel Game Controller Game Controller Game Controller Gift Gift Gift Git Branch Git Branch Git Branch Git Commit Git Commit Git Commit Git Compare Git Compare Git Compare Git Merge Git Merge Git Merge Git Network Git Network Git Network Git Pull Request Git Pull Request Git Pull Request Glasses Glasses Glasses Globe Globe Globe Golf Golf Golf Grid Grid Grid Hammer Hammer Hammer Hand Left Hand Left Hand Left Hand Right Hand Right Hand Right Happy Happy Happy Hardware Chip Hardware Chip Hardware Chip Headset Headset Headset Heart Heart Circle Heart Circle Heart Circle Heart Dislike Heart Dislike Circle Heart Dislike Circle Heart Dislike Circle Heart Dislike Heart Dislike Heart Half Heart Half Heart Half Heart Heart Help Help Buoy Help Buoy Help Buoy Help Circle Help Circle Help Circle Help Help Home Home Home Hourglass Hourglass Hourglass Ice Cream Ice Cream Ice Cream Id Card Id Card Id Card Image Image Image Images Images Images Infinite Infinite Infinite Information Information Circle Information Circle Information Circle Information Information Invert Mode Invert Mode Invert Mode Journal Journal Journal Key Key Key Keypad Keypad Keypad Language Language Language Laptop Laptop Laptop Layers Layers Layers Leaf Leaf Leaf Library Library Library Link Link Link List List Circle List Circle List Circle List List Locate Locate Locate Location Location Location Lock Closed Lock Closed Lock Closed Lock Open Lock Open Lock Open Log In Log In Log In Log Out Log Out Log Out Logo Alipay Logo Amazon Logo Amplify Logo Android Logo Angular Logo Apple Logo Apple Appstore Logo Apple Ar Logo Behance Logo Bitbucket Logo Bitcoin Logo Buffer Logo Capacitor Logo Chrome Logo Closed Captioning Logo Codepen Logo Css3 Logo Designernews Logo Deviantart Logo Discord Logo Docker Logo Dribbble Logo Dropbox Logo Edge Logo Electron Logo Euro Logo Facebook Logo Figma Logo Firebase Logo Firefox Logo Flickr Logo Foursquare Logo Github Logo Gitlab Logo Google Logo Google Playstore Logo Hackernews Logo Html5 Logo Instagram Logo Ionic Logo Ionitron Logo Javascript Logo Laravel Logo Linkedin Logo Markdown Logo Mastodon Logo Medium Logo Microsoft Logo No Smoking Logo Nodejs Logo Npm Logo Octocat Logo Paypal Logo Pinterest Logo Playstation Logo Pwa Logo Python Logo React Logo Reddit Logo Rss Logo Sass Logo Skype Logo Slack Logo Snapchat Logo Soundcloud Logo Stackoverflow Logo Steam Logo Stencil Logo Tableau Logo Tiktok Logo Tumblr Logo Tux Logo Twitch Logo Twitter Logo Usd Logo Venmo Logo Vercel Logo Vimeo Logo Vk Logo Vue Logo Web Component Logo Wechat Logo Whatsapp Logo Windows Logo Wordpress Logo Xbox Logo Xing Logo Yahoo Logo Yen Logo Youtube Magnet Magnet Magnet Mail Mail Open Mail Open Mail Open Mail Mail Mail Unread Mail Unread Mail Unread Male Male Female Male Female Male Female Male Male Man Man Man Map Map Map Medal Medal Medal Medical Medical Medical Medkit Medkit Medkit Megaphone Megaphone Megaphone Menu Menu Menu Mic Mic Circle Mic Circle Mic Circle Mic Off Mic Off Circle Mic Off Circle Mic Off Circle Mic Off Mic Off Mic Mic Moon Moon Moon Move Move Move Musical Note Musical Note Musical Note Musical Notes Musical Notes Musical Notes Navigate Navigate Circle Navigate Circle Navigate Circle Navigate Navigate Newspaper Newspaper Newspaper Notifications Notifications Circle Notifications Circle Notifications Circle Notifications Off Notifications Off Circle Notifications Off Circle Notifications Off Circle Notifications Off Notifications Off Notifications Notifications Nuclear Nuclear Nuclear Nutrition Nutrition Nutrition Open Open Open Options Options Options Paper Plane Paper Plane Paper Plane Partly Sunny Partly Sunny Partly Sunny Pause Pause Circle Pause Circle Pause Circle Pause Pause Paw Paw Paw Pencil Pencil Pencil People People Circle People Circle People Circle People People Person Person Add Person Add Person Add Person Circle Person Circle Person Circle Person Person Remove Person Remove Person Remove Person Phone Landscape Phone Landscape Phone Landscape Phone Portrait Phone Portrait Phone Portrait Pie Chart Pie Chart Pie Chart Pin Pin Pin Pint Pint Pint Pizza Pizza Pizza Planet Planet Planet Play Play Back Play Back Circle Play Back Circle Play Back Circle Play Back Play Back Play Circle Play Circle Play Circle Play Forward Play Forward Circle Play Forward Circle Play Forward Circle Play Forward Play Forward Play Play Play Skip Back Play Skip Back Circle Play Skip Back Circle Play Skip Back Circle Play Skip Back Play Skip Back Play Skip Forward Play Skip Forward Circle Play Skip Forward Circle Play Skip Forward Circle Play Skip Forward Play Skip Forward Podium Podium Podium Power Power Power Pricetag Pricetag Pricetag Pricetags Pricetags Pricetags Print Print Print Prism Prism Prism Pulse Pulse Pulse Push Push Push Qr Code Qr Code Qr Code Radio Radio Button Off Radio Button Off Radio Button Off Radio Button On Radio Button On Radio Button On Radio Radio Rainy Rainy Rainy Reader Reader Reader Receipt Receipt Receipt Recording Recording Recording Refresh Refresh Circle Refresh Circle Refresh Circle Refresh Refresh Reload Reload Circle Reload Circle Reload Circle Reload Reload Remove Remove Circle Remove Circle Remove Circle Remove Remove Reorder Four Reorder Four Reorder Four Reorder Three Reorder Three Reorder Three Reorder Two Reorder Two Reorder Two Repeat Repeat Repeat Resize Resize Resize Restaurant Restaurant Restaurant Return Down Back Return Down Back Return Down Back Return Down Forward Return Down Forward Return Down Forward Return Up Back Return Up Back Return Up Back Return Up Forward Return Up Forward Return Up Forward Ribbon Ribbon Ribbon Rocket Rocket Rocket Rose Rose Rose Sad Sad Sad Save Save Save Scale Scale Scale Scan Scan Circle Scan Circle Scan Circle Scan Scan School School School Search Search Circle Search Circle Search Circle Search Search Send Send Send Server Server Server Settings Settings Settings Shapes Shapes Shapes Share Share Share Share Social Share Social Share Social Shield Shield Checkmark Shield Checkmark Shield Checkmark Shield Half Shield Half Shield Half Shield Shield Shirt Shirt Shirt Shuffle Shuffle Shuffle Skull Skull Skull Snow Snow Snow Sparkles Sparkles Sparkles Speedometer Speedometer Speedometer Square Square Square Star Star Half Star Half Star Half Star Star Stats Chart Stats Chart Stats Chart Stop Stop Circle Stop Circle Stop Circle Stop Stop Stopwatch Stopwatch Stopwatch Storefront Storefront Storefront Subway Subway Subway Sunny Sunny Sunny Swap Horizontal Swap Horizontal Swap Horizontal Swap Vertical Swap Vertical Swap Vertical Sync Sync Circle Sync Circle Sync Circle Sync Sync Tablet Landscape Tablet Landscape Tablet Landscape Tablet Portrait Tablet Portrait Tablet Portrait Telescope Telescope Telescope Tennisball Tennisball Tennisball Terminal Terminal Terminal Text Text Text Thermometer Thermometer Thermometer Thumbs Down Thumbs Down Thumbs Down Thumbs Up Thumbs Up Thumbs Up Thunderstorm Thunderstorm Thunderstorm Ticket Ticket Ticket Time Time Time Timer Timer Timer Today Today Today Toggle Toggle Toggle Trail Sign Trail Sign Trail Sign Train Train Train Transgender Transgender Transgender Trash Trash Bin Trash Bin Trash Bin Trash Trash Trending Down Trending Down Trending Down Trending Up Trending Up Trending Up Triangle Triangle Triangle Trophy Trophy Trophy Tv Tv Tv Umbrella Umbrella Umbrella Unlink Unlink Unlink Videocam Videocam Off Videocam Off Videocam Off Videocam Videocam Volume High Volume High Volume High Volume Low Volume Low Volume Low Volume Medium Volume Medium Volume Medium Volume Mute Volume Mute Volume Mute Volume Off Volume Off Volume Off Walk Walk Walk Wallet Wallet Wallet Warning Warning Warning Watch Watch Watch Water Water Water Wifi Wifi Wifi Wine Wine Wine Woman Woman Woman \ No newline at end of file diff --git a/docs/ionicons.designerpack.zip b/docs/ionicons.designerpack.zip deleted file mode 100644 index 6669bef..0000000 Binary files a/docs/ionicons.designerpack.zip and /dev/null differ diff --git a/docs/robots.txt b/docs/robots.txt deleted file mode 100644 index ae745e0..0000000 --- a/docs/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -User-agent: * -Disallow: -Sitemap: https://ionicons.com/sitemap.xml \ No newline at end of file diff --git a/docs/sitemap.xml b/docs/sitemap.xml deleted file mode 100644 index 1ef3c9d..0000000 --- a/docs/sitemap.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - https://ionicons.com/ - https://ionicons.com/usage - \ No newline at end of file diff --git a/docs/usage/index.html b/docs/usage/index.html index 0961c20..0e2afeb 100644 --- a/docs/usage/index.html +++ b/docs/usage/index.html @@ -1,4007 +1,1498 @@ - -Ionicons: The premium icon pack for Ionic Framework - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
See how Ionicons fits into the entire Ionic Ecosystem -->
Ionicons is part of the -Ionic Ecosystem ->

Usage

Ionicons is a completely open-source icon set with 1,300 icons crafted for web, iOS, Android, and desktop apps. Ionicons was made for -Ionic Framework, a cross-platform hybrid and Progressive Web App framework.

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, 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.

<script src="https://unpkg.com/ionicons@5.4.0/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:

<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.

<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.

<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.

<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.

<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.)

ion-icon {
-  font-size: 64px;
-}

Color

Specify the icon color by applying the color CSS property on the -ion-icon component.

ion-icon {
-  color: blue;
-}

Stroke weight

When using an outline icon variant it is possible to adjust the stroke weight, for improved visual balance relative to the icon's size or relative to the weight of adjacent text. You can set a specific size by applying the ---ionicon-stroke-weight CSS custom property to the -ion-icon component. The default value is -32px

<ion-icon name="heart-outline"></ion-icon>
ion-icon {
-  --ionicon-stroke-width: 16px;
-}

Migrating from v4

See the 5.0 release notes for a list of icon deletions/renames. You can find an archived version of the v4 site -here.

- - Accessibility - -Accessibility - Accessibility - -Add - -Add Circle - -Add Circle - Add Circle - -Add - -Add - -Airplane - -Airplane - Airplane - -Alarm - -Alarm - -Alarm - -Albums - -Albums - -Albums - Alert - -Alert Circle - -Alert Circle - -Alert Circle - -Alert - -Alert - American Football - -American Football - American Football - -Analytics - -Analytics - -Analytics - -Aperture - -Aperture - Aperture - -Apps - -Apps - -Apps - Archive - Archive - -Archive - -Arrow Back - Arrow Back Circle - -Arrow Back Circle - Arrow Back Circle - -Arrow Back - Arrow Back - Arrow Down - Arrow Down Circle - -Arrow Down Circle - Arrow Down Circle - -Arrow Down - Arrow Down - Arrow Forward - Arrow Forward Circle - -Arrow Forward Circle - Arrow Forward Circle - -Arrow Forward - Arrow Forward - Arrow Redo - -Arrow Redo Circle - -Arrow Redo Circle - Arrow Redo Circle - -Arrow Redo - Arrow Redo - -Arrow Undo - -Arrow Undo Circle - -Arrow Undo Circle - Arrow Undo Circle - -Arrow Undo - Arrow Undo - -Arrow Up - Arrow Up Circle - -Arrow Up Circle - Arrow Up Circle - -Arrow Up - Arrow Up - At - At Circle - -At Circle - At Circle - -At - At - -Attach - Attach - Attach - Backspace - -Backspace - Backspace - -Bag - -Bag Add - -Bag Add - Bag Add - -Bag Check - -Bag Check - Bag Check - -Bag Handle - -Bag Handle - Bag Handle - -Bag - Bag Remove - -Bag Remove - Bag Remove - -Bag - -Balloon - -Balloon - -Balloon - -Ban - Ban - -Ban - -Bandage - -Bandage - -Bandage - -Bar Chart - -Bar Chart - -Bar Chart - -Barbell - -Barbell - -Barbell - -Barcode - -Barcode - Barcode - Baseball - -Baseball - Baseball - -Basket - -Basket - Basket - -Basketball - -Basketball - Basketball - -Battery Charging - -Battery Charging - -Battery Charging - -Battery Dead - Battery Dead - Battery Dead - -Battery Full - -Battery Full - -Battery Full - -Battery Half - -Battery Half - -Battery Half - -Beaker - -Beaker - Beaker - -Bed - -Bed - Bed - -Beer - -Beer - Beer - -Bicycle - -Bicycle - -Bicycle - -Bluetooth - -Bluetooth - Bluetooth - -Boat - -Boat - Boat - -Body - -Body - Body - -Bonfire - -Bonfire - Bonfire - -Book - -Book - Book - -Bookmark - -Bookmark - Bookmark - Bookmarks - -Bookmarks - Bookmarks - -Bowling Ball - -Bowling Ball - -Bowling Ball - -Briefcase - -Briefcase - Briefcase - -Browsers - -Browsers - -Browsers - -Brush - -Brush - Brush - -Bug - -Bug - Bug - -Build - -Build - Build - -Bulb - -Bulb - Bulb - -Bus - -Bus - -Bus - -Business - -Business - -Business - Cafe - -Cafe - Cafe - -Calculator - -Calculator - Calculator - -Calendar - -Calendar Clear - -Calendar Clear - -Calendar Clear - -Calendar Number - -Calendar Number - Calendar Number - -Calendar - Calendar - -Call - -Call - Call - -Camera - -Camera - -Camera Reverse - -Camera Reverse - Camera Reverse - -Camera - -Car - -Car - -Car - -Car Sport - -Car Sport - -Car Sport - -Card - -Card - -Card - -Caret Back - -Caret Back Circle - -Caret Back Circle - Caret Back Circle - -Caret Back - -Caret Back - Caret Down - -Caret Down Circle - -Caret Down Circle - Caret Down Circle - -Caret Down - -Caret Down - Caret Forward - -Caret Forward Circle - -Caret Forward Circle - Caret Forward Circle - -Caret Forward - -Caret Forward - Caret Up - -Caret Up Circle - -Caret Up Circle - Caret Up Circle - -Caret Up - -Caret Up - Cart - -Cart - Cart - -Cash - -Cash - Cash - Cellular - -Cellular - -Cellular - -Chatbox - -Chatbox Ellipses - -Chatbox Ellipses - Chatbox Ellipses - -Chatbox - Chatbox - -Chatbubble - -Chatbubble Ellipses - -Chatbubble Ellipses - Chatbubble Ellipses - -Chatbubble - Chatbubble - -Chatbubbles - -Chatbubbles - Chatbubbles - -Checkbox - -Checkbox - -Checkbox - -Checkmark - -Checkmark Circle - -Checkmark Circle - Checkmark Circle - -Checkmark Done - Checkmark Done Circle - -Checkmark Done Circle - -Checkmark Done Circle - -Checkmark Done - Checkmark Done - Checkmark - -Checkmark - -Chevron Back - -Chevron Back Circle - -Chevron Back Circle - Chevron Back Circle - -Chevron Back - -Chevron Back - -Chevron Down - -Chevron Down Circle - -Chevron Down Circle - Chevron Down Circle - -Chevron Down - -Chevron Down - -Chevron Forward - -Chevron Forward Circle - -Chevron Forward Circle - Chevron Forward Circle - -Chevron Forward - -Chevron Forward - -Chevron Up - -Chevron Up Circle - -Chevron Up Circle - Chevron Up Circle - -Chevron Up - -Chevron Up - -Clipboard - -Clipboard - Clipboard - -Close - -Close Circle - -Close Circle - Close Circle - -Close - -Close - -Cloud - -Cloud Circle - -Cloud Circle - Cloud Circle - -Cloud Done - -Cloud Done - -Cloud Done - -Cloud Download - -Cloud Download - Cloud Download - -Cloud Offline - -Cloud Offline - -Cloud Offline - -Cloud - Cloud - -Cloud Upload - -Cloud Upload - -Cloud Upload - -Cloudy - -Cloudy Night - -Cloudy Night - Cloudy Night - -Cloudy - Cloudy - -Code - -Code Download - Code Download - Code Download - Code - Code - -Code Slash - -Code Slash - Code Slash - -Code Working - Code Working - -Code Working - -Cog - -Cog - -Cog - -Color Fill - -Color Fill - Color Fill - -Color Filter - -Color Filter - -Color Filter - -Color Palette - -Color Palette - Color Palette - -Color Wand - -Color Wand - Color Wand - -Compass - -Compass - -Compass - -Construct - -Construct - Construct - -Contract - Contract - Contract - Contrast - -Contrast - Contrast - -Copy - -Copy - Copy - -Create - -Create - -Create - Crop - -Crop - Crop - -Cube - -Cube - -Cube - -Cut - -Cut - Cut - Desktop - -Desktop - -Desktop - -Diamond - -Diamond - Diamond - -Dice - -Dice - Dice - -Disc - -Disc - Disc - -Document - -Document Attach - -Document Attach - Document Attach - -Document Lock - -Document Lock - Document Lock - -Document - Document - -Document Text - -Document Text - Document Text - -Documents - -Documents - Documents - -Download - -Download - -Download - -Duplicate - -Duplicate - Duplicate - -Ear - -Ear - Ear - -Earth - -Earth - -Earth - -Easel - -Easel - -Easel - Egg - -Egg - Egg - -Ellipse - -Ellipse - -Ellipse - -Ellipsis Horizontal - -Ellipsis Horizontal Circle - Ellipsis Horizontal Circle - Ellipsis Horizontal Circle - -Ellipsis Horizontal - -Ellipsis Horizontal - -Ellipsis Vertical - -Ellipsis Vertical Circle - Ellipsis Vertical Circle - Ellipsis Vertical Circle - -Ellipsis Vertical - -Ellipsis Vertical - -Enter - -Enter - -Enter - -Exit - -Exit - Exit - -Expand - Expand - Expand - Extension Puzzle - -Extension Puzzle - Extension Puzzle - -Eye - -Eye Off - -Eye Off - -Eye Off - -Eye - Eye - -Eyedrop - -Eyedrop - Eyedrop - -Fast Food - -Fast Food - -Fast Food - -Female - -Female - -Female - -File Tray - -File Tray Full - -File Tray Full - -File Tray Full - -File Tray - -File Tray - -File Tray Stacked - -File Tray Stacked - -File Tray Stacked - -Film - -Film - -Film - -Filter - -Filter Circle - -Filter Circle - Filter Circle - -Filter - -Filter - Finger Print - -Finger Print - -Finger Print - -Fish - -Fish - -Fish - -Fitness - -Fitness - -Fitness - -Flag - -Flag - Flag - -Flame - -Flame - Flame - -Flash - -Flash Off - -Flash Off - -Flash Off - -Flash - Flash - Flashlight - -Flashlight - -Flashlight - -Flask - -Flask - Flask - -Flower - -Flower - -Flower - -Folder - -Folder Open - -Folder Open - Folder Open - -Folder - Folder - -Football - -Football - Football - -Footsteps - -Footsteps - Footsteps - -Funnel - -Funnel - Funnel - Game Controller - -Game Controller - Game Controller - -Gift - -Gift - Gift - -Git Branch - -Git Branch - -Git Branch - -Git Commit - -Git Commit - -Git Commit - -Git Compare - -Git Compare - Git Compare - -Git Merge - -Git Merge - -Git Merge - -Git Network - -Git Network - Git Network - -Git Pull Request - -Git Pull Request - -Git Pull Request - -Glasses - -Glasses - Glasses - -Globe - -Globe - Globe - Golf - -Golf - Golf - -Grid - -Grid - -Grid - -Hammer - -Hammer - Hammer - -Hand Left - -Hand Left - Hand Left - -Hand Right - -Hand Right - Hand Right - -Happy - -Happy - -Happy - -Hardware Chip - -Hardware Chip - Hardware Chip - -Headset - -Headset - Headset - -Heart - -Heart Circle - -Heart Circle - -Heart Circle - -Heart Dislike - -Heart Dislike Circle - -Heart Dislike Circle - -Heart Dislike Circle - -Heart Dislike - -Heart Dislike - -Heart Half - -Heart Half - -Heart Half - -Heart - Heart - -Help - Help Buoy - -Help Buoy - Help Buoy - -Help Circle - -Help Circle - -Help Circle - -Help - Help - Home - -Home - Home - -Hourglass - -Hourglass - -Hourglass - -Ice Cream - -Ice Cream - Ice Cream - -Id Card - -Id Card - -Id Card - -Image - -Image - Image - -Images - -Images - Images - -Infinite - Infinite - Infinite - -Information - Information Circle - -Information Circle - -Information Circle - -Information - Information - Invert Mode - -Invert Mode - -Invert Mode - Journal - -Journal - Journal - -Key - -Key - Key - -Keypad - -Keypad - -Keypad - -Language - -Language - Language - -Laptop - -Laptop - Laptop - -Layers - -Layers - Layers - Leaf - -Leaf - Leaf - -Library - -Library - Library - -Link - Link - Link - List - List Circle - -List Circle - -List Circle - -List - -List - -Locate - Locate - -Locate - Location - -Location - -Location - -Lock Closed - -Lock Closed - -Lock Closed - -Lock Open - -Lock Open - -Lock Open - -Log In - -Log In - -Log In - -Log Out - -Log Out - Log Out - -Logo Alipay - -Logo Amazon - -Logo Amplify - Logo Android - -Logo Angular - -Logo Apple - -Logo Apple Appstore - -Logo Apple Ar - -Logo Behance - Logo Bitbucket - -Logo Bitcoin - -Logo Buffer - -Logo Capacitor - -Logo Chrome - -Logo Closed Captioning - -Logo Codepen - -Logo Css3 - -Logo Designernews - -Logo Deviantart - -Logo Discord - -Logo Docker - -Logo Dribbble - -Logo Dropbox - -Logo Edge - -Logo Electron - -Logo Euro - -Logo Facebook - Logo Figma - Logo Firebase - -Logo Firefox - -Logo Flickr - -Logo Foursquare - -Logo Github - -Logo Gitlab - -Logo Google - -Logo Google Playstore - -Logo Hackernews - -Logo Html5 - -Logo Instagram - -Logo Ionic - -Logo Ionitron - -Logo Javascript - -Logo Laravel - -Logo Linkedin - -Logo Markdown - -Logo Mastodon - -Logo Medium - -Logo Microsoft - -Logo No Smoking - -Logo Nodejs - -Logo Npm - -Logo Octocat - -Logo Paypal - -Logo Pinterest - -Logo Playstation - -Logo Pwa - -Logo Python - -Logo React - Logo Reddit - -Logo Rss - -Logo Sass - -Logo Skype - -Logo Slack - -Logo Snapchat - -Logo Soundcloud - -Logo Stackoverflow - -Logo Steam - -Logo Stencil - -Logo Tableau - -Logo Tiktok - -Logo Tumblr - -Logo Tux - -Logo Twitch - Logo Twitter - -Logo Usd - -Logo Venmo - -Logo Vercel - Logo Vimeo - -Logo Vk - Logo Vue - -Logo Web Component - Logo Wechat - -Logo Whatsapp - Logo Windows - -Logo Wordpress - -Logo Xbox - -Logo Xing - -Logo Yahoo - -Logo Yen - -Logo Youtube - -Magnet - -Magnet - Magnet - -Mail - -Mail Open - -Mail Open - Mail Open - -Mail - -Mail - -Mail Unread - -Mail Unread - -Mail Unread - -Male - -Male Female - -Male Female - -Male Female - -Male - -Male - -Man - -Man - -Man - -Map - -Map - Map - -Medal - -Medal - Medal - Medical - -Medical - Medical - -Medkit - -Medkit - Medkit - -Megaphone - -Megaphone - Megaphone - -Menu - Menu - -Menu - Mic - -Mic Circle - -Mic Circle - -Mic Circle - -Mic Off - -Mic Off Circle - -Mic Off Circle - -Mic Off Circle - -Mic Off - -Mic Off - Mic - Mic - -Moon - -Moon - Moon - -Move - Move - Move - Musical Note - -Musical Note - Musical Note - -Musical Notes - -Musical Notes - Musical Notes - -Navigate - -Navigate Circle - -Navigate Circle - Navigate Circle - -Navigate - -Navigate - Newspaper - -Newspaper - -Newspaper - -Notifications - -Notifications Circle - -Notifications Circle - -Notifications Circle - -Notifications Off - -Notifications Off Circle - -Notifications Off Circle - -Notifications Off Circle - -Notifications Off - -Notifications Off - -Notifications - Notifications - -Nuclear - -Nuclear - Nuclear - -Nutrition - -Nutrition - Nutrition - -Open - -Open - Open - -Options - -Options - -Options - -Paper Plane - -Paper Plane - Paper Plane - Partly Sunny - -Partly Sunny - Partly Sunny - -Pause - -Pause Circle - -Pause Circle - Pause Circle - -Pause - -Pause - Paw - -Paw - Paw - Pencil - Pencil - Pencil - -People - -People Circle - -People Circle - -People Circle - -People - People - Person - -Person Add - -Person Add - Person Add - Person Circle - -Person Circle - -Person Circle - -Person - Person Remove - -Person Remove - Person Remove - -Person - -Phone Landscape - -Phone Landscape - Phone Landscape - -Phone Portrait - -Phone Portrait - Phone Portrait - -Pie Chart - -Pie Chart - Pie Chart - -Pin - -Pin - Pin - -Pint - -Pint - Pint - -Pizza - -Pizza - Pizza - -Planet - -Planet - Planet - -Play - -Play Back - -Play Back Circle - -Play Back Circle - -Play Back Circle - -Play Back - Play Back - Play Circle - -Play Circle - -Play Circle - -Play Forward - -Play Forward Circle - -Play Forward Circle - -Play Forward Circle - -Play Forward - Play Forward - Play - Play - Play Skip Back - -Play Skip Back Circle - -Play Skip Back Circle - -Play Skip Back Circle - -Play Skip Back - Play Skip Back - Play Skip Forward - -Play Skip Forward Circle - -Play Skip Forward Circle - -Play Skip Forward Circle - -Play Skip Forward - Play Skip Forward - Podium - -Podium - Podium - Power - Power - Power - Pricetag - -Pricetag - -Pricetag - -Pricetags - -Pricetags - -Pricetags - -Print - -Print - -Print - -Prism - -Prism - Prism - Pulse - -Pulse - -Pulse - -Push - -Push - -Push - -Qr Code - -Qr Code - Qr Code - Radio - -Radio Button Off - Radio Button Off - Radio Button Off - Radio Button On - -Radio Button On - -Radio Button On - -Radio - Radio - -Rainy - -Rainy - -Rainy - -Reader - -Reader - -Reader - -Receipt - -Receipt - Receipt - -Recording - -Recording - -Recording - -Refresh - Refresh Circle - -Refresh Circle - Refresh Circle - -Refresh - Refresh - Reload - -Reload Circle - -Reload Circle - -Reload Circle - -Reload - -Reload - -Remove - -Remove Circle - -Remove Circle - Remove Circle - -Remove - -Remove - -Reorder Four - Reorder Four - Reorder Four - Reorder Three - Reorder Three - -Reorder Three - Reorder Two - -Reorder Two - -Reorder Two - -Repeat - Repeat - Repeat - -Resize - Resize - Resize - Restaurant - -Restaurant - Restaurant - -Return Down Back - -Return Down Back - -Return Down Back - -Return Down Forward - -Return Down Forward - -Return Down Forward - -Return Up Back - -Return Up Back - -Return Up Back - -Return Up Forward - -Return Up Forward - -Return Up Forward - -Ribbon - -Ribbon - -Ribbon - -Rocket - -Rocket - Rocket - -Rose - -Rose - Rose - -Sad - -Sad - -Sad - -Save - Save - Save - -Scale - -Scale - Scale - -Scan - Scan Circle - -Scan Circle - Scan Circle - -Scan - Scan - -School - -School - -School - -Search - -Search Circle - Search Circle - -Search Circle - Search - Search - -Send - -Send - Send - Server - -Server - Server - -Settings - -Settings - Settings - -Shapes - -Shapes - -Shapes - -Share - -Share - Share - -Share Social - -Share Social - -Share Social - -Shield - -Shield Checkmark - -Shield Checkmark - Shield Checkmark - -Shield Half - -Shield Half - -Shield Half - -Shield - Shield - -Shirt - -Shirt - Shirt - -Shuffle - Shuffle - Shuffle - Skull - -Skull - -Skull - -Snow - -Snow - Snow - -Sparkles - -Sparkles - Sparkles - -Speedometer - -Speedometer - Speedometer - -Square - -Square - Square - Star - -Star Half - -Star Half - -Star Half - -Star - Star - -Stats Chart - -Stats Chart - -Stats Chart - -Stop - -Stop Circle - -Stop Circle - -Stop Circle - -Stop - -Stop - Stopwatch - -Stopwatch - -Stopwatch - -Storefront - -Storefront - Storefront - -Subway - -Subway - -Subway - -Sunny - -Sunny - Sunny - -Swap Horizontal - Swap Horizontal - Swap Horizontal - Swap Vertical - Swap Vertical - Swap Vertical - Sync - -Sync Circle - -Sync Circle - Sync Circle - -Sync - -Sync - -Tablet Landscape - -Tablet Landscape - Tablet Landscape - -Tablet Portrait - -Tablet Portrait - -Tablet Portrait - -Telescope - -Telescope - Telescope - -Tennisball - -Tennisball - Tennisball - -Terminal - -Terminal - -Terminal - -Text - -Text - Text - -Thermometer - -Thermometer - Thermometer - -Thumbs Down - -Thumbs Down - Thumbs Down - -Thumbs Up - -Thumbs Up - Thumbs Up - -Thunderstorm - -Thunderstorm - Thunderstorm - -Ticket - -Ticket - Ticket - -Time - -Time - Time - -Timer - -Timer - -Timer - -Today - -Today - -Today - -Toggle - -Toggle - -Toggle - -Trail Sign - -Trail Sign - Trail Sign - -Train - -Train - Train - -Transgender - -Transgender - Transgender - -Trash - -Trash Bin - -Trash Bin - -Trash Bin - Trash - Trash - -Trending Down - Trending Down - Trending Down - -Trending Up - Trending Up - Trending Up - -Triangle - -Triangle - -Triangle - Trophy - -Trophy - Trophy - -Tv - Tv - Tv - Umbrella - -Umbrella - Umbrella - -Unlink - Unlink - Unlink - Videocam - -Videocam Off - -Videocam Off - Videocam Off - -Videocam - Videocam - -Volume High - -Volume High - Volume High - -Volume Low - -Volume Low - Volume Low - -Volume Medium - -Volume Medium - Volume Medium - Volume Mute - -Volume Mute - -Volume Mute - -Volume Off - -Volume Off - Volume Off - Walk - Walk - -Walk - -Wallet - -Wallet - Wallet - -Warning - -Warning - -Warning - -Watch - -Watch - Watch - -Water - -Water - Water - -Wifi - Wifi - -Wifi - -Wine - -Wine - -Wine - -Woman - -Woman - -Woman - - - - \ No newline at end of file + > + + + + + + + +Accessibility +Accessibility +Accessibility +Add +Add Circle +Add Circle +Add Circle +Add +Add +Airplane +Airplane +Airplane +Alarm +Alarm +Alarm +Albums +Albums +Albums +Alert +Alert Circle +Alert Circle +Alert Circle +Alert +Alert +American Football +American Football +American Football +Analytics +Analytics +Analytics +Aperture +Aperture +Aperture +Apps +Apps +Apps +Archive +Archive +Archive +Arrow Back +Arrow Back Circle +Arrow Back Circle +Arrow Back Circle +Arrow Back +Arrow Back +Arrow Down +Arrow Down Circle +Arrow Down Circle +Arrow Down Circle +Arrow Down +Arrow Down +Arrow Forward +Arrow Forward Circle +Arrow Forward Circle +Arrow Forward Circle +Arrow Forward +Arrow Forward +Arrow Redo +Arrow Redo Circle +Arrow Redo Circle +Arrow Redo Circle +Arrow Redo +Arrow Redo +Arrow Undo +Arrow Undo Circle +Arrow Undo Circle +Arrow Undo Circle +Arrow Undo +Arrow Undo +Arrow Up +Arrow Up Circle +Arrow Up Circle +Arrow Up Circle +Arrow Up +Arrow Up +At +At Circle +At Circle +At Circle +At +At +Attach +Attach +Attach +Backspace +Backspace +Backspace +Bag +Bag Add +Bag Add +Bag Add +Bag Check +Bag Check +Bag Check +Bag Handle +Bag Handle +Bag Handle +Bag +Bag Remove +Bag Remove +Bag Remove +Bag +Balloon +Balloon +Balloon +Ban +Ban +Ban +Bandage +Bandage +Bandage +Bar Chart +Bar Chart +Bar Chart +Barbell +Barbell +Barbell +Barcode +Barcode +Barcode +Baseball +Baseball +Baseball +Basket +Basket +Basket +Basketball +Basketball +Basketball +Battery Charging +Battery Charging +Battery Charging +Battery Dead +Battery Dead +Battery Dead +Battery Full +Battery Full +Battery Full +Battery Half +Battery Half +Battery Half +Beaker +Beaker +Beaker +Bed +Bed +Bed +Beer +Beer +Beer +Bicycle +Bicycle +Bicycle +Bluetooth +Bluetooth +Bluetooth +Boat +Boat +Boat +Body +Body +Body +Bonfire +Bonfire +Bonfire +Book +Book +Book +Bookmark +Bookmark +Bookmark +Bookmarks +Bookmarks +Bookmarks +Bowling Ball +Bowling Ball +Bowling Ball +Briefcase +Briefcase +Briefcase +Browsers +Browsers +Browsers +Brush +Brush +Brush +Bug +Bug +Bug +Build +Build +Build +Bulb +Bulb +Bulb +Bus +Bus +Bus +Business +Business +Business +Cafe +Cafe +Cafe +Calculator +Calculator +Calculator +Calendar +Calendar Clear +Calendar Clear +Calendar Clear +Calendar Number +Calendar Number +Calendar Number +Calendar +Calendar +Call +Call +Call +Camera +Camera +Camera Reverse +Camera Reverse +Camera Reverse +Camera +Car +Car +Car +Car Sport +Car Sport +Car Sport +Card +Card +Card +Caret Back +Caret Back Circle +Caret Back Circle +Caret Back Circle +Caret Back +Caret Back +Caret Down +Caret Down Circle +Caret Down Circle +Caret Down Circle +Caret Down +Caret Down +Caret Forward +Caret Forward Circle +Caret Forward Circle +Caret Forward Circle +Caret Forward +Caret Forward +Caret Up +Caret Up Circle +Caret Up Circle +Caret Up Circle +Caret Up +Caret Up +Cart +Cart +Cart +Cash +Cash +Cash +Cellular +Cellular +Cellular +Chatbox +Chatbox Ellipses +Chatbox Ellipses +Chatbox Ellipses +Chatbox +Chatbox +Chatbubble +Chatbubble Ellipses +Chatbubble Ellipses +Chatbubble Ellipses +Chatbubble +Chatbubble +Chatbubbles +Chatbubbles +Chatbubbles +Checkbox +Checkbox +Checkbox +Checkmark +Checkmark Circle +Checkmark Circle +Checkmark Circle +Checkmark Done +Checkmark Done Circle +Checkmark Done Circle +Checkmark Done Circle +Checkmark Done +Checkmark Done +Checkmark +Checkmark +Chevron Back +Chevron Back Circle +Chevron Back Circle +Chevron Back Circle +Chevron Back +Chevron Back +Chevron Down +Chevron Down Circle +Chevron Down Circle +Chevron Down Circle +Chevron Down +Chevron Down +Chevron Forward +Chevron Forward Circle +Chevron Forward Circle +Chevron Forward Circle +Chevron Forward +Chevron Forward +Chevron Up +Chevron Up Circle +Chevron Up Circle +Chevron Up Circle +Chevron Up +Chevron Up +Clipboard +Clipboard +Clipboard +Close +Close Circle +Close Circle +Close Circle +Close +Close +Cloud +Cloud Circle +Cloud Circle +Cloud Circle +Cloud Done +Cloud Done +Cloud Done +Cloud Download +Cloud Download +Cloud Download +Cloud Offline +Cloud Offline +Cloud Offline +Cloud +Cloud +Cloud Upload +Cloud Upload +Cloud Upload +Cloudy +Cloudy Night +Cloudy Night +Cloudy Night +Cloudy +Cloudy +Code +Code Download +Code Download +Code Download +Code +Code +Code Slash +Code Slash +Code Slash +Code Working +Code Working +Code Working +Cog +Cog +Cog +Color Fill +Color Fill +Color Fill +Color Filter +Color Filter +Color Filter +Color Palette +Color Palette +Color Palette +Color Wand +Color Wand +Color Wand +Compass +Compass +Compass +Construct +Construct +Construct +Contract +Contract +Contract +Contrast +Contrast +Contrast +Copy +Copy +Copy +Create +Create +Create +Crop +Crop +Crop +Cube +Cube +Cube +Cut +Cut +Cut +Desktop +Desktop +Desktop +Diamond +Diamond +Diamond +Dice +Dice +Dice +Disc +Disc +Disc +Document +Document Attach +Document Attach +Document Attach +Document Lock +Document Lock +Document Lock +Document +Document +Document Text +Document Text +Document Text +Documents +Documents +Documents +Download +Download +Download +Duplicate +Duplicate +Duplicate +Ear +Ear +Ear +Earth +Earth +Earth +Easel +Easel +Easel +Egg +Egg +Egg +Ellipse +Ellipse +Ellipse +Ellipsis Horizontal +Ellipsis Horizontal Circle +Ellipsis Horizontal Circle +Ellipsis Horizontal Circle +Ellipsis Horizontal +Ellipsis Horizontal +Ellipsis Vertical +Ellipsis Vertical Circle +Ellipsis Vertical Circle +Ellipsis Vertical Circle +Ellipsis Vertical +Ellipsis Vertical +Enter +Enter +Enter +Exit +Exit +Exit +Expand +Expand +Expand +Extension Puzzle +Extension Puzzle +Extension Puzzle +Eye +Eye Off +Eye Off +Eye Off +Eye +Eye +Eyedrop +Eyedrop +Eyedrop +Fast Food +Fast Food +Fast Food +Female +Female +Female +File Tray +File Tray Full +File Tray Full +File Tray Full +File Tray +File Tray +File Tray Stacked +File Tray Stacked +File Tray Stacked +Film +Film +Film +Filter +Filter Circle +Filter Circle +Filter Circle +Filter +Filter +Finger Print +Finger Print +Finger Print +Fish +Fish +Fish +Fitness +Fitness +Fitness +Flag +Flag +Flag +Flame +Flame +Flame +Flash +Flash Off +Flash Off +Flash Off +Flash +Flash +Flashlight +Flashlight +Flashlight +Flask +Flask +Flask +Flower +Flower +Flower +Folder +Folder Open +Folder Open +Folder Open +Folder +Folder +Football +Football +Football +Footsteps +Footsteps +Footsteps +Funnel +Funnel +Funnel +Game Controller +Game Controller +Game Controller +Gift +Gift +Gift +Git Branch +Git Branch +Git Branch +Git Commit +Git Commit +Git Commit +Git Compare +Git Compare +Git Compare +Git Merge +Git Merge +Git Merge +Git Network +Git Network +Git Network +Git Pull Request +Git Pull Request +Git Pull Request +Glasses +Glasses +Glasses +Globe +Globe +Globe +Golf +Golf +Golf +Grid +Grid +Grid +Hammer +Hammer +Hammer +Hand Left +Hand Left +Hand Left +Hand Right +Hand Right +Hand Right +Happy +Happy +Happy +Hardware Chip +Hardware Chip +Hardware Chip +Headset +Headset +Headset +Heart +Heart Circle +Heart Circle +Heart Circle +Heart Dislike +Heart Dislike Circle +Heart Dislike Circle +Heart Dislike Circle +Heart Dislike +Heart Dislike +Heart Half +Heart Half +Heart Half +Heart +Heart +Help +Help Buoy +Help Buoy +Help Buoy +Help Circle +Help Circle +Help Circle +Help +Help +Home +Home +Home +Hourglass +Hourglass +Hourglass +Ice Cream +Ice Cream +Ice Cream +Id Card +Id Card +Id Card +Image +Image +Image +Images +Images +Images +Infinite +Infinite +Infinite +Information +Information Circle +Information Circle +Information Circle +Information +Information +Invert Mode +Invert Mode +Invert Mode +Journal +Journal +Journal +Key +Key +Key +Keypad +Keypad +Keypad +Language +Language +Language +Laptop +Laptop +Laptop +Layers +Layers +Layers +Leaf +Leaf +Leaf +Library +Library +Library +Link +Link +Link +List +List Circle +List Circle +List Circle +List +List +Locate +Locate +Locate +Location +Location +Location +Lock Closed +Lock Closed +Lock Closed +Lock Open +Lock Open +Lock Open +Log In +Log In +Log In +Log Out +Log Out +Log Out +Logo Alipay +Logo Amazon +Logo Amplify +Logo Android +Logo Angular +Logo Apple +Logo Apple Appstore +Logo Apple Ar +Logo Behance +Logo Bitbucket +Logo Bitcoin +Logo Buffer +Logo Capacitor +Logo Chrome +Logo Closed Captioning +Logo Codepen +Logo Css3 +Logo Designernews +Logo Deviantart +Logo Discord +Logo Docker +Logo Dribbble +Logo Dropbox +Logo Edge +Logo Electron +Logo Euro +Logo Facebook +Logo Figma +Logo Firebase +Logo Firefox +Logo Flickr +Logo Foursquare +Logo Github +Logo Gitlab +Logo Google +Logo Google Playstore +Logo Hackernews +Logo Html5 +Logo Instagram +Logo Ionic +Logo Ionitron +Logo Javascript +Logo Laravel +Logo Linkedin +Logo Markdown +Logo Mastodon +Logo Medium +Logo Microsoft +Logo No Smoking +Logo Nodejs +Logo Npm +Logo Octocat +Logo Paypal +Logo Pinterest +Logo Playstation +Logo Pwa +Logo Python +Logo React +Logo Reddit +Logo Rss +Logo Sass +Logo Skype +Logo Slack +Logo Snapchat +Logo Soundcloud +Logo Stackoverflow +Logo Steam +Logo Stencil +Logo Tableau +Logo Tiktok +Logo Tumblr +Logo Tux +Logo Twitch +Logo Twitter +Logo Usd +Logo Venmo +Logo Vercel +Logo Vimeo +Logo Vk +Logo Vue +Logo Web Component +Logo Wechat +Logo Whatsapp +Logo Windows +Logo Wordpress +Logo Xbox +Logo Xing +Logo Yahoo +Logo Yen +Logo Youtube +Magnet +Magnet +Magnet +Mail +Mail Open +Mail Open +Mail Open +Mail +Mail +Mail Unread +Mail Unread +Mail Unread +Male +Male Female +Male Female +Male Female +Male +Male +Man +Man +Man +Map +Map +Map +Medal +Medal +Medal +Medical +Medical +Medical +Medkit +Medkit +Medkit +Megaphone +Megaphone +Megaphone +Menu +Menu +Menu +Mic +Mic Circle +Mic Circle +Mic Circle +Mic Off +Mic Off Circle +Mic Off Circle +Mic Off Circle +Mic Off +Mic Off +Mic +Mic +Moon +Moon +Moon +Move +Move +Move +Musical Note +Musical Note +Musical Note +Musical Notes +Musical Notes +Musical Notes +Navigate +Navigate Circle +Navigate Circle +Navigate Circle +Navigate +Navigate +Newspaper +Newspaper +Newspaper +Notifications +Notifications Circle +Notifications Circle +Notifications Circle +Notifications Off +Notifications Off Circle +Notifications Off Circle +Notifications Off Circle +Notifications Off +Notifications Off +Notifications +Notifications +Nuclear +Nuclear +Nuclear +Nutrition +Nutrition +Nutrition +Open +Open +Open +Options +Options +Options +Paper Plane +Paper Plane +Paper Plane +Partly Sunny +Partly Sunny +Partly Sunny +Pause +Pause Circle +Pause Circle +Pause Circle +Pause +Pause +Paw +Paw +Paw +Pencil +Pencil +Pencil +People +People Circle +People Circle +People Circle +People +People +Person +Person Add +Person Add +Person Add +Person Circle +Person Circle +Person Circle +Person +Person Remove +Person Remove +Person Remove +Person +Phone Landscape +Phone Landscape +Phone Landscape +Phone Portrait +Phone Portrait +Phone Portrait +Pie Chart +Pie Chart +Pie Chart +Pin +Pin +Pin +Pint +Pint +Pint +Pizza +Pizza +Pizza +Planet +Planet +Planet +Play +Play Back +Play Back Circle +Play Back Circle +Play Back Circle +Play Back +Play Back +Play Circle +Play Circle +Play Circle +Play Forward +Play Forward Circle +Play Forward Circle +Play Forward Circle +Play Forward +Play Forward +Play +Play +Play Skip Back +Play Skip Back Circle +Play Skip Back Circle +Play Skip Back Circle +Play Skip Back +Play Skip Back +Play Skip Forward +Play Skip Forward Circle +Play Skip Forward Circle +Play Skip Forward Circle +Play Skip Forward +Play Skip Forward +Podium +Podium +Podium +Power +Power +Power +Pricetag +Pricetag +Pricetag +Pricetags +Pricetags +Pricetags +Print +Print +Print +Prism +Prism +Prism +Pulse +Pulse +Pulse +Push +Push +Push +Qr Code +Qr Code +Qr Code +Radio +Radio Button Off +Radio Button Off +Radio Button Off +Radio Button On +Radio Button On +Radio Button On +Radio +Radio +Rainy +Rainy +Rainy +Reader +Reader +Reader +Receipt +Receipt +Receipt +Recording +Recording +Recording +Refresh +Refresh Circle +Refresh Circle +Refresh Circle +Refresh +Refresh +Reload +Reload Circle +Reload Circle +Reload Circle +Reload +Reload +Remove +Remove Circle +Remove Circle +Remove Circle +Remove +Remove +Reorder Four +Reorder Four +Reorder Four +Reorder Three +Reorder Three +Reorder Three +Reorder Two +Reorder Two +Reorder Two +Repeat +Repeat +Repeat +Resize +Resize +Resize +Restaurant +Restaurant +Restaurant +Return Down Back +Return Down Back +Return Down Back +Return Down Forward +Return Down Forward +Return Down Forward +Return Up Back +Return Up Back +Return Up Back +Return Up Forward +Return Up Forward +Return Up Forward +Ribbon +Ribbon +Ribbon +Rocket +Rocket +Rocket +Rose +Rose +Rose +Sad +Sad +Sad +Save +Save +Save +Scale +Scale +Scale +Scan +Scan Circle +Scan Circle +Scan Circle +Scan +Scan +School +School +School +Search +Search Circle +Search Circle +Search Circle +Search +Search +Send +Send +Send +Server +Server +Server +Settings +Settings +Settings +Shapes +Shapes +Shapes +Share +Share +Share +Share Social +Share Social +Share Social +Shield +Shield Checkmark +Shield Checkmark +Shield Checkmark +Shield Half +Shield Half +Shield Half +Shield +Shield +Shirt +Shirt +Shirt +Shuffle +Shuffle +Shuffle +Skull +Skull +Skull +Snow +Snow +Snow +Sparkles +Sparkles +Sparkles +Speedometer +Speedometer +Speedometer +Square +Square +Square +Star +Star Half +Star Half +Star Half +Star +Star +Stats Chart +Stats Chart +Stats Chart +Stop +Stop Circle +Stop Circle +Stop Circle +Stop +Stop +Stopwatch +Stopwatch +Stopwatch +Storefront +Storefront +Storefront +Subway +Subway +Subway +Sunny +Sunny +Sunny +Swap Horizontal +Swap Horizontal +Swap Horizontal +Swap Vertical +Swap Vertical +Swap Vertical +Sync +Sync Circle +Sync Circle +Sync Circle +Sync +Sync +Tablet Landscape +Tablet Landscape +Tablet Landscape +Tablet Portrait +Tablet Portrait +Tablet Portrait +Telescope +Telescope +Telescope +Tennisball +Tennisball +Tennisball +Terminal +Terminal +Terminal +Text +Text +Text +Thermometer +Thermometer +Thermometer +Thumbs Down +Thumbs Down +Thumbs Down +Thumbs Up +Thumbs Up +Thumbs Up +Thunderstorm +Thunderstorm +Thunderstorm +Ticket +Ticket +Ticket +Time +Time +Time +Timer +Timer +Timer +Today +Today +Today +Toggle +Toggle +Toggle +Trail Sign +Trail Sign +Trail Sign +Train +Train +Train +Transgender +Transgender +Transgender +Trash +Trash Bin +Trash Bin +Trash Bin +Trash +Trash +Trending Down +Trending Down +Trending Down +Trending Up +Trending Up +Trending Up +Triangle +Triangle +Triangle +Trophy +Trophy +Trophy +Tv +Tv +Tv +Umbrella +Umbrella +Umbrella +Unlink +Unlink +Unlink +Videocam +Videocam Off +Videocam Off +Videocam Off +Videocam +Videocam +Volume High +Volume High +Volume High +Volume Low +Volume Low +Volume Low +Volume Medium +Volume Medium +Volume Medium +Volume Mute +Volume Mute +Volume Mute +Volume Off +Volume Off +Volume Off +Walk +Walk +Walk +Wallet +Wallet +Wallet +Warning +Warning +Warning +Watch +Watch +Watch +Water +Water +Water +Wifi +Wifi +Wifi +Wine +Wine +Wine +Woman +Woman +Woman + + + + diff --git a/docs/v4/build/p-i2s3rn6x.entry.js b/docs/v4/build/p-i2s3rn6x.entry.js index a3ff42c..3cc77fe 100644 --- a/docs/v4/build/p-i2s3rn6x.entry.js +++ b/docs/v4/build/p-i2s3rn6x.entry.js @@ -1 +1 @@ -import{r as s,c as i,h as t,g as o}from"./p-5f00bf62.js";const a=class{constructor(t){s(this,t),this.hadIconOnce=!1,this.clearToast=i(this,"clearToast",7),this.toggleHeaderSearch=i(this,"toggleHeaderSearch",7)}handleCodeClick(s){const i=this.el.querySelector(".toast-bar__section:first-child"),t=document.createElement("textarea");t.value=``,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),this.showCopiedConfirm&&(window.clearTimeout(this.showCopiedConfirm),this.showCopiedConfirm=0),i.classList.add("copied"),this.showCopiedConfirm=window.setTimeout(()=>{i.classList.remove("copied"),this.showCopiedConfirm=0},1500)}componentDidLoad(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),!1),this.el.addEventListener("touchend",this.handleTouchEnd.bind(this),!1)}handleTouchStart(s){s.target.classList.contains("toast-bar--inner")&&(s.preventDefault(),this.touchStartY=s.changedTouches[0].screenY)}handleTouchEnd(s){s.target.classList.contains("toast-bar--inner")&&(s.preventDefault(),this.touchEndY=s.changedTouches[0].screenY,this.touchEndY>this.touchStartY&&this.clearToast.emit())}render(){let s,i,o,a=null;return this.selectedIcon&&(this.hadIconOnce||(this.hadIconOnce=!0),o=this.selectedIcon.name,"logo"===(i=this.selectedIcon.icons[0].startsWith("logo-")?"logo":this.selectedIconType)&&(o="logo-"+o),s=8*``.length+32,a=this.selectedIcon.icons.map(s=>{let i;switch(s.substr(0,s.indexOf("-"))){case"ios":i="iOS STYLE";break;case"md":i="MATERIAL STYLE";break;case"logo":i="LOGO"}return t("div",{class:"toast-bar__section"},t("div",{class:"toast-bar__section-header"},t("h6",null,i)),t("div",{class:"btn-group"},t("div",{class:"btn btn--gray btn--small btn--icon"},t("i",{class:"ion ion-"+s})),t("a",{class:"btn btn--gray btn--small",download:`/ionicons/svg/${s}.svg`,href:`/ionicons/svg/${s}.svg`},t("i",{class:"ion ion-md-download"}),"SVG")))})),t("div",{class:`toast-bar ${this.selectedIcon?"isVisible":""} ${!this.selectedIcon&&this.hadIconOnce?"isHidden":""} ${this.hadIconOnce?"":"preload"}`,onClick:s=>s.stopPropagation()},t("div",{class:"container"},t("div",{class:"toast-bar--inner"},this.selectedIcon&&t("h4",null,this.selectedIcon.name),this.selectedIcon&&t("div",{class:"toast-bar__details"},t("div",{class:"toast-bar__section",style:{maxWidth:s+"px"}},t("div",{class:"toast-bar__section-header"},t("div",null,t("h6",null,"Web component code"),t("span",{class:"confirmation"},t("i",{class:"ion ion-md-checkmark"}),"Copied")),t("stencil-route-link",{url:`/usage#${i}-${this.selectedIcon.name}`,onClick:()=>this.toggleHeaderSearch.emit("hide")},"Usage",t("i",{class:"ion ion-ios-arrow-forward"}))),t("code",null,t("span",{class:"hover-highlight",onClick:()=>this.handleCodeClick(o)},"<",t("span",{class:"yellow"},"ion-icon")," ",t("span",{class:"orange"},"name"),"=",t("span",{class:"green"},`"${o}"`),">",""))),a))))}get el(){return o(this)}static get style(){return"toast-bar .toast-bar{position:fixed;padding:12px 0;left:0;bottom:0;width:100%;-webkit-transform:translateY(100%);transform:translateY(100%)}toast-bar .toast-bar.isVisible{-webkit-animation-name:slideIn;animation-name:slideIn;-webkit-animation-duration:.6s;animation-duration:.6s;-webkit-animation-timing-function:var(--easeOutExpo);animation-timing-function:var(--easeOutExpo);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;opacity:1}\@-webkit-keyframes slideIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}\@keyframes slideIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}toast-bar .toast-bar.isHidden{-webkit-animation-name:slideOut;animation-name:slideOut;-webkit-animation-duration:.4s;animation-duration:.4s;-webkit-animation-timing-function:var(--easeOutExpo);animation-timing-function:var(--easeOutExpo);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}\@-webkit-keyframes slideOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:1}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}\@keyframes slideOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:1}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}toast-bar .toast-bar.preload{opacity:0}toast-bar .toast-bar--inner{background-color:var(--color-shark);height:80px;border-radius:15px;padding:0 20px 0 30px;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-shadow:0 16px 32px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.08);box-shadow:0 16px 32px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.08)}toast-bar .toast-bar--inner h4{color:#fff;margin:0;white-space:nowrap;margin-right:30px}toast-bar .toast-bar__details{-ms-flex:1 0 auto;flex:1 0 auto;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}toast-bar .toast-bar__section-header,toast-bar .toast-bar__section-header>div{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}toast-bar .toast-bar__section-header{height:10px;margin-bottom:7px}toast-bar .toast-bar__section-header h6{display:inline-block}toast-bar .toast-bar__section-header a{-webkit-transition:border .3s;transition:border .3s;color:var(--color-melrose);font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;text-decoration:none;border-bottom:1px solid transparent}toast-bar .toast-bar__section-header a:hover{border-bottom-color:var(--color-melrose-dark)}toast-bar .toast-bar__section-header i{margin-left:3px}toast-bar .toast-bar__section:not(:first-child){margin-left:20px}toast-bar .toast-bar__section:first-child{position:relative;max-width:none}toast-bar .toast-bar__details code{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:14px;line-height:14px;height:32px;padding:0 12px;cursor:text;overflow:hidden}\@supports (display:grid){toast-bar .toast-bar__section:not(:first-child){-ms-flex:0;flex:0}toast-bar .toast-bar__section:first-child{-ms-flex:1;flex:1}toast-bar .toast-bar__details code{overflow-x:auto}}toast-bar .toast-bar__details code>span{position:absolute;white-space:nowrap}toast-bar .toast-bar__section .confirmation{font-size:11px;font-family:Eina;font-weight:600;color:#aec6ff;display:-ms-flexbox;display:flex;opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px);margin-left:12px}toast-bar .toast-bar__section .confirmation .ion{color:#aec6ff;font-size:14px;margin-right:4px}toast-bar .toast-bar__section.copied .confirmation{-webkit-animation-name:slideInOut;animation-name:slideInOut;-webkit-animation-duration:1.5s;animation-duration:1.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}\@-webkit-keyframes slideInOut{0%{opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px)}10%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}90%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-5px);transform:translateY(-5px)}}\@keyframes slideInOut{0%{opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px)}10%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}90%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-5px);transform:translateY(-5px)}}toast-bar .toast-bar__details code:hover .hover-highlight{background-color:#5882b2}\@media screen and (max-width:768px){toast-bar .toast-bar__section:not(:first-child){display:none}}\@media screen and (max-width:540px){toast-bar .toast-bar--inner{padding:16px;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;height:auto}toast-bar .toast-bar--inner h4{margin:0 0 16px}toast-bar .toast-bar__section{max-width:100%!important}toast-bar .toast-bar__details{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}}"}};export{a as toast_bar}; \ No newline at end of file +import{r as s,c as i,h as t,g as o}from"./p-5f00bf62.js";const a=class{constructor(t){s(this,t),this.hadIconOnce=!1,this.clearToast=i(this,"clearToast",7),this.toggleHeaderSearch=i(this,"toggleHeaderSearch",7)}handleCodeClick(s){const i=this.el.querySelector(".toast-bar__section:first-child"),t=document.createElement("textarea");t.value=``,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),this.showCopiedConfirm&&(window.clearTimeout(this.showCopiedConfirm),this.showCopiedConfirm=0),i.classList.add("copied"),this.showCopiedConfirm=window.setTimeout(()=>{i.classList.remove("copied"),this.showCopiedConfirm=0},1500)}componentDidLoad(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),!1),this.el.addEventListener("touchend",this.handleTouchEnd.bind(this),!1)}handleTouchStart(s){s.target.classList.contains("toast-bar--inner")&&(s.preventDefault(),this.touchStartY=s.changedTouches[0].screenY)}handleTouchEnd(s){s.target.classList.contains("toast-bar--inner")&&(s.preventDefault(),this.touchEndY=s.changedTouches[0].screenY,this.touchEndY>this.touchStartY&&this.clearToast.emit())}render(){let s,i,o,a=null;return this.selectedIcon&&(this.hadIconOnce||(this.hadIconOnce=!0),o=this.selectedIcon.name,"logo"===(i=this.selectedIcon.icons[0].startsWith("logo-")?"logo":this.selectedIconType)&&(o="logo-"+o),s=8*``.length+32,a=this.selectedIcon.icons.map(s=>{let i;switch(s.substr(0,s.indexOf("-"))){case"ios":i="iOS STYLE";break;case"md":i="MATERIAL STYLE";break;case"logo":i="LOGO"}return t("div",{class:"toast-bar__section"},t("div",{class:"toast-bar__section-header"},t("h6",null,i)),t("div",{class:"btn-group"},t("div",{class:"btn btn--gray btn--small btn--icon"},t("i",{class:"ion ion-"+s})),t("a",{class:"btn btn--gray btn--small",download:`/v4/ionicons/svg/${s}.svg`,href:`/v4/ionicons/svg/${s}.svg`},t("i",{class:"ion ion-md-download"}),"SVG")))})),t("div",{class:`toast-bar ${this.selectedIcon?"isVisible":""} ${!this.selectedIcon&&this.hadIconOnce?"isHidden":""} ${this.hadIconOnce?"":"preload"}`,onClick:s=>s.stopPropagation()},t("div",{class:"container"},t("div",{class:"toast-bar--inner"},this.selectedIcon&&t("h4",null,this.selectedIcon.name),this.selectedIcon&&t("div",{class:"toast-bar__details"},t("div",{class:"toast-bar__section",style:{maxWidth:s+"px"}},t("div",{class:"toast-bar__section-header"},t("div",null,t("h6",null,"Web component code"),t("span",{class:"confirmation"},t("i",{class:"ion ion-md-checkmark"}),"Copied")),t("stencil-route-link",{url:`/usage#${i}-${this.selectedIcon.name}`,onClick:()=>this.toggleHeaderSearch.emit("hide")},"Usage",t("i",{class:"ion ion-ios-arrow-forward"}))),t("code",null,t("span",{class:"hover-highlight",onClick:()=>this.handleCodeClick(o)},"<",t("span",{class:"yellow"},"ion-icon")," ",t("span",{class:"orange"},"name"),"=",t("span",{class:"green"},`"${o}"`),">",""))),a))))}get el(){return o(this)}static get style(){return"toast-bar .toast-bar{position:fixed;padding:12px 0;left:0;bottom:0;width:100%;-webkit-transform:translateY(100%);transform:translateY(100%)}toast-bar .toast-bar.isVisible{-webkit-animation-name:slideIn;animation-name:slideIn;-webkit-animation-duration:.6s;animation-duration:.6s;-webkit-animation-timing-function:var(--easeOutExpo);animation-timing-function:var(--easeOutExpo);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;opacity:1}\@-webkit-keyframes slideIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}\@keyframes slideIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}toast-bar .toast-bar.isHidden{-webkit-animation-name:slideOut;animation-name:slideOut;-webkit-animation-duration:.4s;animation-duration:.4s;-webkit-animation-timing-function:var(--easeOutExpo);animation-timing-function:var(--easeOutExpo);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}\@-webkit-keyframes slideOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:1}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}\@keyframes slideOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:1}to{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}toast-bar .toast-bar.preload{opacity:0}toast-bar .toast-bar--inner{background-color:var(--color-shark);height:80px;border-radius:15px;padding:0 20px 0 30px;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-shadow:0 16px 32px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.08);box-shadow:0 16px 32px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.08)}toast-bar .toast-bar--inner h4{color:#fff;margin:0;white-space:nowrap;margin-right:30px}toast-bar .toast-bar__details{-ms-flex:1 0 auto;flex:1 0 auto;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}toast-bar .toast-bar__section-header,toast-bar .toast-bar__section-header>div{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}toast-bar .toast-bar__section-header{height:10px;margin-bottom:7px}toast-bar .toast-bar__section-header h6{display:inline-block}toast-bar .toast-bar__section-header a{-webkit-transition:border .3s;transition:border .3s;color:var(--color-melrose);font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;text-decoration:none;border-bottom:1px solid transparent}toast-bar .toast-bar__section-header a:hover{border-bottom-color:var(--color-melrose-dark)}toast-bar .toast-bar__section-header i{margin-left:3px}toast-bar .toast-bar__section:not(:first-child){margin-left:20px}toast-bar .toast-bar__section:first-child{position:relative;max-width:none}toast-bar .toast-bar__details code{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:14px;line-height:14px;height:32px;padding:0 12px;cursor:text;overflow:hidden}\@supports (display:grid){toast-bar .toast-bar__section:not(:first-child){-ms-flex:0;flex:0}toast-bar .toast-bar__section:first-child{-ms-flex:1;flex:1}toast-bar .toast-bar__details code{overflow-x:auto}}toast-bar .toast-bar__details code>span{position:absolute;white-space:nowrap}toast-bar .toast-bar__section .confirmation{font-size:11px;font-family:Eina;font-weight:600;color:#aec6ff;display:-ms-flexbox;display:flex;opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px);margin-left:12px}toast-bar .toast-bar__section .confirmation .ion{color:#aec6ff;font-size:14px;margin-right:4px}toast-bar .toast-bar__section.copied .confirmation{-webkit-animation-name:slideInOut;animation-name:slideInOut;-webkit-animation-duration:1.5s;animation-duration:1.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}\@-webkit-keyframes slideInOut{0%{opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px)}10%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}90%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-5px);transform:translateY(-5px)}}\@keyframes slideInOut{0%{opacity:0;-webkit-transform:translateY(5px);transform:translateY(5px)}10%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}90%{opacity:.9;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-5px);transform:translateY(-5px)}}toast-bar .toast-bar__details code:hover .hover-highlight{background-color:#5882b2}\@media screen and (max-width:768px){toast-bar .toast-bar__section:not(:first-child){display:none}}\@media screen and (max-width:540px){toast-bar .toast-bar--inner{padding:16px;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;height:auto}toast-bar .toast-bar--inner h4{margin:0 0 16px}toast-bar .toast-bar__section{max-width:100%!important}toast-bar .toast-bar__details{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}}"}};export{a as toast_bar}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4dca1b6..5d24497 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,13 +15,25 @@ "stencil-router-v2": "^0.5.0" } }, + "@prismicio/helpers": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@prismicio/helpers/-/helpers-1.0.5.tgz", + "integrity": "sha512-TPpuAFHNxlCTrEihHnRKcq6zc0oZV0sfz5/iHoSpl5vorwPbwZWiF88JGeflNdefW4A69b5A3x3mfptKPdpoxg==", + "dev": true + }, + "@prismicio/richtext": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@prismicio/richtext/-/richtext-1.1.0.tgz", + "integrity": "sha512-925JuFiZiIkwu9jmlR9O/U8xCSZk/Y6BQDXKpavoVsKo+n90ml1hGdtWkglIupX+ITQO1ZINyDgUgiY1oG9dsA==", + "dev": true + }, "@stencil/core": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-1.15.0.tgz", - "integrity": "sha512-aWTagMDQtKTyNFCpAC98mYRDGDEp6ZfIuEO11RUxha2lqwwVjsXsn9HChr8k3XVPszb9azbmLoWrjT7b+2OKog==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-1.17.4.tgz", + "integrity": "sha512-dmuNYM6fnHPvE2ptHoUBQtjcpXqrHnkDtdyUD6/JrZWcJt6jBtrykewObOxzpDCMLs+NT7668ussRagdVL03gQ==", "dev": true, "requires": { - "typescript": "3.9.5" + "typescript": "3.9.7" } }, "@stencil/router": { @@ -34,9 +46,9 @@ } }, "@stencil/sass": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-1.3.2.tgz", - "integrity": "sha512-w6rkOsRIPY1rBa/13Wf+rMZrOzc6z86/Mkp3inzaYGsxBmLkf4PeP1rfaUB4SFDVRfMduP7FTd4ZJi/+FVrsMw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-1.4.1.tgz", + "integrity": "sha512-aFKoqtxZ/8BRbvNFiWRycGiqvMI22Ifn5qsKfq0U23j43XD81jT6d7K0WQd55ejNpoSpdxJcbOuFgQy3mXizfA==", "dev": true }, "@stencil/state-tunnel": { @@ -46,9 +58,9 @@ "dev": true }, "@stencil/store": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@stencil/store/-/store-1.3.0.tgz", - "integrity": "sha512-e1/Ru/q8P5BkqUYMF+kW54rFWyH9XRABLcxFLruUlbw+ZIGN5OwKe6Rf1vw1wQSa/6vMy0EQq5IrkRYNhENpOA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@stencil/store/-/store-1.4.1.tgz", + "integrity": "sha512-kAtMblucNnDNfTpSqhN9jccExgFWmOe+4U98cXZJrg/6nozNtEd92pY6s3Jko7KUrZ+1MQJU2oLwwS8VuyK3Zg==", "dev": true }, "@types/highlight.js": { @@ -64,13 +76,13 @@ "dev": true }, "archiver": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-4.0.1.tgz", - "integrity": "sha512-/YV1pU4Nhpf/rJArM23W6GTUjT0l++VbjykrCRua1TSXrn+yM8Qs7XvtwSiRse0iCe49EPNf7ktXnPsWuSb91Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-4.0.2.tgz", + "integrity": "sha512-B9IZjlGwaxF33UN4oPbfBkyA4V1SxNLeIhR1qY8sRXSsbdUkEHrrOvwlYFPx+8uQeCe9M+FG6KgO+imDmQ79CQ==", "dev": true, "requires": { "archiver-utils": "^2.1.0", - "async": "^2.6.3", + "async": "^3.2.0", "buffer-crc32": "^0.2.1", "glob": "^7.1.6", "readable-stream": "^3.6.0", @@ -114,13 +126,10 @@ } }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "dev": true }, "at-least-node": { "version": "1.0.0", @@ -129,21 +138,21 @@ "dev": true }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, "bl": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", - "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, "requires": { "buffer": "^5.5.0", @@ -162,13 +171,13 @@ } }, "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "buffer-crc32": { @@ -269,15 +278,15 @@ "dev": true }, "fs-extra": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", - "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "requires": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", - "universalify": "^1.0.0" + "universalify": "^2.0.0" } }, "fs.realpath": { @@ -301,21 +310,21 @@ } }, "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, "highlight.js": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.1.tgz", - "integrity": "sha512-b4L09127uVa+9vkMgPpdUQP78ickGbHEQTWeBrQFTJZ4/n2aihWOGS0ZoUqAwjVmfjhq/C76HRzkqwZhK4sBbg==", + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.2.tgz", + "integrity": "sha512-oFLl873u4usRM9K63j4ME9u3etNF0PLiJhSQ8rdfuL51Wn3zkD6drf9ZW0dOzjnZI22YYG24z30JcmfCZjMgYg==", "dev": true }, "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, "inflight": { @@ -347,13 +356,13 @@ "dev": true }, "jsonfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", - "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "requires": { "graceful-fs": "^4.1.6", - "universalify": "^1.0.0" + "universalify": "^2.0.0" } }, "lazystream": { @@ -382,12 +391,6 @@ } } }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, "lodash.defaults": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", @@ -455,14 +458,14 @@ "dev": true }, "prismic-dom": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/prismic-dom/-/prismic-dom-2.2.3.tgz", - "integrity": "sha512-7jwRBbqkll9BPkS4QAQttRaENmAWR9s4PWGGmi7ifobs1J0kYDCrn8PxJ99cywQJQea0jWgAVzOfJhkMmIF8wQ==", + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/prismic-dom/-/prismic-dom-2.2.5.tgz", + "integrity": "sha512-GafsY6sGet5EAWNG2w/qXaxgitU74yhEu/0vZEnwOt6PJgCClLmMkDzJHBpdl+wuEWqUhvkFMDUFPHSPwSVmKQ==", "dev": true, "requires": { - "escape-html": "1.0.3", - "prismic-helpers": "^1.0.3", - "prismic-richtext": "^1.0.3" + "@prismicio/helpers": "^1.0.4", + "@prismicio/richtext": "^1.1.0", + "escape-html": "1.0.3" } }, "prismic-helpers": { @@ -545,12 +548,12 @@ } }, "tar-stream": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", - "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, "requires": { - "bl": "^4.0.1", + "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", @@ -558,15 +561,15 @@ } }, "typescript": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", - "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", + "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", "dev": true }, "universalify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, "util-deprecate": { diff --git a/package.json b/package.json index ae3f6bc..3cac475 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@types/prismic-dom": "^2.1.1", "archiver": "^4.0.1", "fs-extra": "^9.0.1", - "highlight.js": "^10.1.1", + "highlight.js": "^10.4.1", "ionicons": "5.4.0", "prismic-dom": "^2.2.3", "prismic-javascript": "^2.7.1"