@phila/phila-ui-app-header 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +191 -280
- package/package.json +4 -4
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#trusted-site[data-v-
|
|
1
|
+
#trusted-site[data-v-117bdb56]{width:100%;height:3rem;padding:0 var(--spacing-l);box-sizing:border-box}#trusted-site .content[data-v-117bdb56]{color:var(--Schemes-On-Surface);font-size:var(--component-banner-font-size)}#trusted-site button[data-v-117bdb56]{--Schemes-Surface-Container-Lowest: transparent;font-size:var(--component-banner-font-size, .75)!important}#trusted-site .trusted-toggle[data-v-117bdb56]{height:100%}#trusted-site-info .circle-icon[data-v-117bdb56]{border:solid 1px var(--Schemes-On-Surface);border-radius:100%;font-size:var(--scale-250);aspect-ratio:1;display:inline-flex;justify-content:center;align-content:center}.phila-navbar-logo[data-v-7dabdf6b]{font-size:1.2rem}body:has(.phila-navbar .phila-navbar-item-flyout-active){overflow:hidden}.phila-navbar[data-v-26fd958d]{display:flex;justify-content:space-between;column-gap:var(--spacing-3xl);height:5rem}.phila-navbar .phila-navbar-brand[data-v-26fd958d],.phila-navbar .phila-navbar-list[data-v-26fd958d],.phila-navbar .phila-navbar-search[data-v-26fd958d],.phila-navbar .phila-navbar-item[data-v-26fd958d],.phila-navbar .phila-navbar-burger[data-v-26fd958d]{display:flex}[data-v-26fd958d] a.phila-navbar-link,.phila-navbar a.phila-navbar-link[data-v-26fd958d]{text-decoration:none;color:var(--Schemes-On-Inverse-Surface-Bright)}[data-v-26fd958d] .phila-navbar-list,.phila-navbar .phila-navbar-list[data-v-26fd958d]{list-style:none;padding:0;margin:0;column-gap:var(--spacing-l)}:is([data-v-26fd958d] .phila-navbar-list,.phila-navbar .phila-navbar-list[data-v-26fd958d]) .phila-navbar-link-list-item{height:100%;display:flex;align-items:center}:is([data-v-26fd958d] .phila-navbar-list,.phila-navbar .phila-navbar-list[data-v-26fd958d]) .phila-navbar-link-list-item .phila-navbar-link{display:flex;align-items:center;height:100%}:is([data-v-26fd958d] .phila-navbar-list,.phila-navbar .phila-navbar-list[data-v-26fd958d]) .phila-navbar-link-list-item .phila-navbar-link:hover,:is([data-v-26fd958d] .phila-navbar-list,.phila-navbar .phila-navbar-list[data-v-26fd958d]) .phila-navbar-link-list-item .phila-navbar-link:active,:is([data-v-26fd958d] .phila-navbar-list,.phila-navbar .phila-navbar-list[data-v-26fd958d]) .phila-navbar-link-list-item .phila-navbar-link.phila-navbar-item-flyout-active{color:var(--Schemes-Primary-Container);background-color:var(--Palettes-Secondary-Secondary-650)}:is([data-v-26fd958d] .phila-navbar-list,.phila-navbar .phila-navbar-list[data-v-26fd958d]) .phila-navbar-link-list-item .phila-navbar-link:active,:is([data-v-26fd958d] .phila-navbar-list,.phila-navbar .phila-navbar-list[data-v-26fd958d]) .phila-navbar-link-list-item .phila-navbar-link.phila-navbar-item-flyout-active{outline-offset:0!important}:is([data-v-26fd958d] .phila-navbar-list,.phila-navbar .phila-navbar-list[data-v-26fd958d]) .phila-navbar-link-list-item .phila-navbar-link:focus{outline:2px solid var(--Schemes-Outline);outline-offset:2px}[data-v-26fd958d] .phila-navbar-burger,.phila-navbar .phila-navbar-burger[data-v-26fd958d]{flex:0 0 auto;aspect-ratio:1;height:5rem!important;width:5rem!important;align-items:center;justify-content:center;background-color:var(--orange-400-orange);border-radius:0!important;font-size:var(--scale-400);color:var(--Schemes-On-Surface)}:is([data-v-26fd958d] .phila-navbar-burger,.phila-navbar .phila-navbar-burger[data-v-26fd958d]).phila-navbar-item-flyout-active{color:var(--Schemes-Primary, #2176d2);background-color:var(--Schemes-Surface-Container-Low)}[data-v-26fd958d] .phila-navbar-brand,.phila-navbar .phila-navbar-brand[data-v-26fd958d]{flex:1 1 auto;align-items:center;column-gap:var(--spacing-l)}:is([data-v-26fd958d] .phila-navbar-brand,.phila-navbar .phila-navbar-brand[data-v-26fd958d]) a{font-weight:400}:is([data-v-26fd958d] .phila-navbar-brand,.phila-navbar .phila-navbar-brand[data-v-26fd958d]) img:hover{opacity:.8}[data-v-26fd958d] .nav-flyout,.phila-navbar .nav-flyout[data-v-26fd958d]{position:absolute;top:var(--nav-height);left:0;width:100%;z-index:9999;overflow-y:auto;max-height:calc(100vh - var(--nav-bottom))}[data-v-26fd958d] .phila-navbar-search,.phila-navbar .phila-navbar-search[data-v-26fd958d]{flex:0 0 auto;align-items:center}:is([data-v-26fd958d] .phila-navbar-search,.phila-navbar .phila-navbar-search[data-v-26fd958d]) button{background-color:var(--Schemes-Primary)}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),f=require("@fortawesome/vue-fontawesome"),x=require("@phila/phila-ui-collapse-panel"),U=require("@phila/phila-ui-logo");var j={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},G=j,V={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},H=V,w=V,q={prefix:"fas",iconName:"lock",icon:[384,512,[128274],"f023","M128 96l0 64 128 0 0-64c0-35.3-28.7-64-64-64s-64 28.7-64 64zM64 160l0-64C64 25.3 121.3-32 192-32S320 25.3 320 96l0 64c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]},_={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M140.3 135.2c12.6-10.3 31.1-9.5 42.8 2.2l128 128c9.2 9.2 11.9 22.9 6.9 34.9S301.4 320 288.5 320l-256 0c-12.9 0-24.6-7.8-29.6-19.8S.7 274.5 9.9 265.4l128-128 2.4-2.2z"]},A={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M140.3 376.8c12.6 10.2 31.1 9.5 42.8-2.2l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301.4 192 288.5 192l-256 0c-12.9 0-24.6 7.8-29.6 19.8S.7 237.5 9.9 246.6l128 128 2.4 2.2z"]},K={prefix:"fas",iconName:"building-columns",icon:[512,512,["bank","institution","museum","university"],"f19c","M271.9 20.2c-9.8-5.6-21.9-5.6-31.8 0l-224 128c-12.6 7.2-18.8 22-15.1 36S17.5 208 32 208l32 0 0 208 0 0-51.2 38.4C4.7 460.4 0 469.9 0 480 0 497.7 14.3 512 32 512l448 0c17.7 0 32-14.3 32-32 0-10.1-4.7-19.6-12.8-25.6l-51.2-38.4 0-208 32 0c14.5 0 27.2-9.8 30.9-23.8s-2.5-28.8-15.1-36l-224-128zM400 208l0 208-64 0 0-208 64 0zm-112 0l0 208-64 0 0-208 64 0zm-112 0l0 208-64 0 0-208 64 0zM256 96a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},Q={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},R={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},X=R;const Y="data:image/svg+xml,%3csvg%20width='16'%20height='11'%20viewBox='0%200%2016%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='16'%20height='11'%20fill='url(%23pattern0_61022_1867)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_61022_1867'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_61022_1867'%20transform='scale(0.0625%200.0909091)'/%3e%3c/pattern%3e%3cimage%20id='image0_61022_1867'%20width='16'%20height='11'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAMAAABBPP0LAAAAG1BMVEUdM7EeNLIeM7HgQCDaPh/bPh/bPx/////bPyBEby41AAAAUElEQVQI123MNw4CABDEwD3jC/9/MQ1BQrgeOSkIqYe2o2FZtthXgQLgbHVMZdlsfUQFQnHtjP1+8BUhBDKOqtmfot6ojqPzR7TjdU+f6vkED+IDPhTBcMAAAAAASUVORK5CYII='/%3e%3c/defs%3e%3c/svg%3e";e.ref("");e.reactive({validateOnBlur:!1,validateOnInput:!1,validateOnChange:!1,validateOnMount:!1,required:!1,isValid:!0,errors:[]});const u=e.ref({}),m=e.ref(),k=400,g=e.ref(null);function S(t){const l=t?.group??"global",i=(s,d)=>{u.value[l][s]=d},n=(s,d)=>{u.value[l]={[s]:d}},c=s=>u.value[l][s]??!1,r=s=>{i(s,!c(s))},a=s=>{n(s,!c(s))},o=()=>{u.value[l]={}},v=s=>{s.key==="Escape"&&(i(t.id,!1),p())},b=s=>{if(!t)return;const d=s.target,[h]=Object.keys(u.value[l]).filter(D=>u.value[l][D]===!0),C=document.getElementById(h),O=document.querySelector(`[aria-controls="${h}"]`),F=d.getAttribute("aria-controls")===h||O?.contains(s.target);C&&!C.contains(d)&&!F&&(i(t.id,!1),p())},$=()=>{t&&(m.value=setTimeout(()=>{i(t.id,!1),p()},k))},L=()=>{t&&t.mouseOverToggle===!0&&(g.value=t.id,m.value=setTimeout(()=>{B()},k))},T=()=>{t&&t.mouseOverToggle===!0&&(g.value=null,clearTimeout(m.value),m.value=setTimeout(()=>{g.value!==t.id&&(i(t.id,!1),p())},k))},M=s=>{if(!t)return;const{relatedTarget:d}=s;if(!d||d.getAttribute("aria-controls")===t.id)return;const h=document.getElementById(t.id);h&&h.contains(d)||(clearTimeout(m.value),m.value=setTimeout(()=>{t.openSingle?n(t.id,!1):i(t.id,!1),p()},k))},z=()=>{t&&(t.outsideClickClose&&(document.addEventListener("click",b),document.addEventListener("touchend",b)),t.escapeKeyClose&&document.addEventListener("keydown",v))},p=()=>{document.removeEventListener("click",b),document.removeEventListener("touchend",b),document.removeEventListener("keydown",v),document.removeEventListener("scroll",$)},y=s=>{t&&(s?.preventDefault(),clearTimeout(m.value),z())},I=s=>{t&&(y(s),t.openSingle?a(t.id):r(t.id))},B=s=>{t&&(y(s),t.openSingle?n(t.id,!0):i(t.id,!0))};return e.onBeforeMount(()=>{u.value[l]||o()}),e.onUnmounted(()=>{p()}),{state:u,timeout:m,toggle:r,toggleSingle:a,setCollapsed:i,setSingleCollapsed:n,isCollapsed:c,reset:o,onMouseEnter:L,onMouseLeave:T,focusChange:M,onClickToggle:I,onClickOpen:B}}const Z={id:"trusted-site",class:"has-background-ghost-gray is-flex is-justify-space-between"},W={class:"trusted-wrap"},J={class:"hidden-tablet trusted-toggle is-flex is-align-center"},P=["src"],ee=["aria-label","aria-expanded"],te={class:"icon","aria-hidden":"true"},ne={class:"hidden-desktop trusted-toggle is-flex is-align-center"},ae=["aria-label","aria-expanded"],oe={class:"icon","aria-hidden":"true"},le={key:0,class:"trusted-translation is-flex is-align-center"},ie=["hidden"],se={class:"trusted-site-info-content content has-text-body-small is-flex is-justify-space-between"},re={class:"info-item-wrap is-flex"},ce={class:"info-item is-flex is-12-mobile is-align-flex-start is-flex-1 my-4"},de={class:"trusted-icon is-flex is-flex-column has-text-center"},ue={class:"icon circle-icon p-3 mb-2"},me={class:"info-item is-flex is-12-mobile is-align-flex-start is-flex-1 my-4"},fe={class:"trusted-icon is-flex is-flex-column has-text-center"},ve={class:"icon circle-icon p-3 mb-2"},pe={class:"info-content-close mt-4"},he=e.defineComponent({__name:"TrustedSite",setup(t){const l=e.useSlots(),{isCollapsed:i,onClickToggle:n}=S({id:"trusted-site-info",escapeKeyClose:!0}),c=e.computed(()=>i("trusted-site-info"));return(r,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Z,[e.createElementVNode("div",W,[e.createElementVNode("div",J,[e.createElementVNode("img",{src:e.unref(Y),alt:"",class:"icon"},null,8,P),a[4]||(a[4]=e.createElementVNode("div",{class:"content mx-2"},"An official website of the City of Philadelphia government",-1)),e.createElementVNode("button",{class:"phila-button is-extra-small","aria-label":`${c.value?"Close":"Open"} Trusted Site information panel`,"aria-controls":"trusted-site-info","aria-expanded":c.value,onClick:a[0]||(a[0]=(...o)=>e.unref(n)&&e.unref(n)(...o))},[a[3]||(a[3]=e.createTextVNode(" Here's how you know ",-1)),e.createElementVNode("span",te,[e.createVNode(e.unref(f.FontAwesomeIcon),{icon:c.value?e.unref(_):e.unref(A)},null,8,["icon"])])],8,ee)]),e.createElementVNode("div",ne,[e.createElementVNode("button",{class:"phila-button is-extra-small","aria-label":`${c.value?"Close":"Open"} Trusted Site information panel`,"aria-controls":"trusted-site-info","aria-expanded":c.value,onClick:a[1]||(a[1]=(...o)=>e.unref(n)&&e.unref(n)(...o))},[a[5]||(a[5]=e.createTextVNode(" An official website ",-1)),e.createElementVNode("span",oe,[e.createVNode(e.unref(f.FontAwesomeIcon),{icon:e.unref(X)},null,8,["icon"])])],8,ae)])]),e.unref(l).translation?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(r.$slots,"translation",{},void 0,!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{id:"trusted-site-info",class:"has-background-secondary px-6",hidden:!c.value},[e.createElementVNode("div",se,[e.createElementVNode("div",re,[e.createElementVNode("div",ce,[e.createElementVNode("div",de,[e.createElementVNode("div",ue,[e.createVNode(e.unref(f.FontAwesomeIcon),{icon:e.unref(q)},null,8,["icon"])]),a[6]||(a[6]=e.createElementVNode("span",{class:"has-text-bold"},"https://",-1))]),a[7]||(a[7]=e.createElementVNode("div",{class:"trusted-text m-4"},[e.createTextVNode(" The "),e.createElementVNode("strong",null,"https://"),e.createTextVNode(" in the address bar means your information is encrypted and can not be accessed by anyone else ")],-1))]),e.createElementVNode("div",me,[e.createElementVNode("div",fe,[e.createElementVNode("span",ve,[e.createVNode(e.unref(f.FontAwesomeIcon),{icon:e.unref(K)},null,8,["icon"])]),a[8]||(a[8]=e.createElementVNode("span",{class:"has-text-bold"},".gov",-1))]),a[9]||(a[9]=e.createElementVNode("div",{class:"trusted-text m-4"},"Only government entities in the U.S. can end in .gov",-1))])]),e.createElementVNode("div",pe,[e.createElementVNode("button",{class:"phila-button phila-button--primary icon-button is-extra-small","aria-label":"Close Trusted Site information panel",onClick:a[2]||(a[2]=(...o)=>e.unref(n)&&e.unref(n)(...o))},[e.createVNode(e.unref(f.FontAwesomeIcon),{icon:e.unref(H)},null,8,["icon"])])])])],8,ie)],64))}}),N=(t,l)=>{const i=t.__vccOpts||t;for(const[n,c]of l)i[n]=c;return i},be=N(he,[["__scopeId","data-v-5d964269"]]),ke=["aria-controls","aria-expanded","aria-label","onClick"],ge={class:"icon"},xe=["id","hidden"],Ne=e.defineComponent({__name:"NavbarBurger",props:{mobileNav:{},collapseGroup:{}},setup(t){return(l,i)=>(e.openBlock(),e.createBlock(e.unref(x.CollapsePanel),{id:"mobile-nav",group:t.collapseGroup,"outside-click-close":"","escape-key-close":"","blur-close":"","open-single":""},{toggle:e.withCtx(n=>[e.createElementVNode("button",{class:e.normalizeClass(["phila-navbar-burger phila-button icon-button",{"phila-navbar-item-flyout-active":n.open}]),"aria-controls":n.ariaControls,"aria-expanded":n.open,"aria-label":`${n.open?"Close":"Open"} mobile navigation panel`,onClick:n.onClick},[e.createElementVNode("span",ge,[e.createVNode(e.unref(f.FontAwesomeIcon),{icon:n.open?e.unref(w):e.unref(Q)},null,8,["icon"])])],10,ke)]),default:e.withCtx(n=>[e.createElementVNode("div",{id:n.id,class:"phila-mobile-nav",hidden:!n.open},[e.renderSlot(l.$slots,"mobile-nav",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.mobileNav)))])],8,xe)]),_:3},8,["group"]))}}),ye=["href"],Be=["href","aria-controls","aria-expanded","onKeypress","onTouchend","onClick"],Ce=["id","hidden"],Ee={key:0,class:"content nav-flyout has-background-ghost-gray px-6 py-4",tabindex:"-1"},Ve={class:"is-flex is-flex-column is-flex-wrap-wrap",style:{gap:"var(--spacing-4xl)"}},we=["href"],_e=e.defineComponent({__name:"NavbarLinks",props:{links:{},collapseGroup:{}},setup(t){const l=n=>!!(n.subLinks||n.subNav),i=n=>`main-nav-${n.text.split(" ").join("-").toLowerCase().replace(/[^a-z0-9-]/g,"")}`;return(n,c)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.links,(r,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l(r)?(e.openBlock(),e.createBlock(e.unref(x.CollapsePanel),{id:i(r),key:`collapse-${a}`,group:t.collapseGroup,"outside-click-close":"","escape-key-close":"","blur-close":"","mouse-over-toggle":"","open-single":"",class:"phila-navbar-link-list-item"},{toggle:e.withCtx(o=>[e.createElementVNode("a",{href:r.href,class:e.normalizeClass(["phila-navbar-link px-4",{"phila-navbar-item-flyout-active":o.open}]),"aria-controls":o.ariaControls,"aria-expanded":o.open,tabindex:"0",onKeypress:e.withKeys(o.onClick,["enter"]),onTouchend:o.onClick,onClick:o.onClick},[e.createTextVNode(e.toDisplayString(r.text)+" ",1),e.createVNode(e.unref(f.FontAwesomeIcon),{class:"ml-1",icon:o.open?e.unref(_):e.unref(A)},null,8,["icon"])],42,Be)]),default:e.withCtx(o=>[(e.openBlock(),e.createElementBlock("div",{id:o.id,key:r.text,hidden:!o.open},[r.subLinks?(e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("ul",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.subLinks,v=>(e.openBlock(),e.createElementBlock("li",{key:v.text,class:"sub-nav-link is-flex is-align-center",style:{width:"150px"}},[e.createElementVNode("a",{href:v.href,class:"has-text-link has-text-weight-medium",tabindex:"0"},e.toDisplayString(v.text),9,we)]))),128))])])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.subNav),{key:1}))],8,Ce))]),_:2},1032,["id","group"])):(e.openBlock(),e.createElementBlock("div",{key:`link-${a}`,class:"phila-navbar-link-list-item"},[e.createElementVNode("a",{href:r.href,class:"phila-navbar-link px-4",tabindex:"0"},e.toDisplayString(r.text),9,ye)]))],64))),256))}}),Ae=e.defineComponent({__name:"NavbarBrandLogo",props:{src:{},href:{default:"/"},altText:{}},setup(t){const l=t;return(i,n)=>(e.openBlock(),e.createBlock(e.unref(U.Logo),{href:l.href,variant:"city",layout:"stacked","color-scheme":"on-primary",class:"phila-navbar-logo"},null,8,["href"]))}}),Se=N(Ae,[["__scopeId","data-v-7dabdf6b"]]),$e={class:"pr-4"},Le=["aria-controls","aria-expanded","aria-label","onClick"],Te={class:"icon"},Me=["id","hidden"],ze=e.defineComponent({__name:"NavbarSearch",props:{search:{},collapseGroup:{}},setup(t){return(l,i)=>(e.openBlock(),e.createBlock(e.unref(x.CollapsePanel),{id:"navbar-search",group:t.collapseGroup,"outside-click-close":"","escape-key-close":"","blur-close":"","open-single":""},{toggle:e.withCtx(n=>[e.createElementVNode("div",$e,[e.createElementVNode("button",{class:e.normalizeClass(["phila-button phila-button--primary icon-button is-small",{"phila-navbar-item-flyout-active":n.open}]),"aria-controls":n.ariaControls,"aria-expanded":n.open,"aria-label":`${n.open?"Close":"Open"} search panel`,onClick:n.onClick},[e.createElementVNode("span",Te,[e.createVNode(e.unref(f.FontAwesomeIcon),{icon:n.open?e.unref(w):e.unref(G)},null,8,["icon"])])],10,Le)])]),default:e.withCtx(n=>[e.createElementVNode("div",{id:n.id,class:"nav-flyout is-12",hidden:!n.open},[e.renderSlot(l.$slots,"default",{},()=>[t.search&&n.open?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.search),{key:0})):e.createCommentVNode("",!0)])],8,Me)]),_:3},8,["group"]))}});function Ie(t,l){let i;return(...n)=>{i!==void 0&&window.clearTimeout(i),i=window.setTimeout(()=>{t(...n)},l)}}const Oe={class:"phila-navbar-brand"},Fe={class:"phila-navbar-item phila-navbar-brand-link hidden-tablet"},De={key:0,class:"content"},Ue=["href"],je={class:"phila-navbar-item phila-navbar-list is-flex is-align-center is-justify-space-between content has-text-label-default hidden-tablet"},Ge={class:"phila-navbar-search"},E="5rem",He=e.defineComponent({__name:"index",props:{id:{},sticky:{type:Boolean},navbarBrand:{},mobileNav:{},collapseGroup:{},search:{},links:{default:()=>[{text:"Home",href:"#"}]}},setup(t){const l=t,{state:i}=S(),n=e.useTemplateRef("navBarElement"),c=e.ref(E),r=e.ref(0),a=Ie(()=>{const o=(n.value?.offsetTop||0)+(n.value?.offsetHeight||0);c.value=!l.sticky||window.innerWidth<1024?o+"px":E,r.value=o},100);return e.watch(()=>i.value,a,{deep:!0,immediate:!0}),e.onMounted(()=>{window.addEventListener("resize",a)}),e.onUnmounted(()=>{window.removeEventListener("resize",a)}),(o,v)=>(e.openBlock(),e.createElementBlock("nav",{ref_key:"navBarElement",ref:n,class:e.normalizeClass(["phila-navbar has-background-primary",{"is-sticky-desktop":t.sticky}]),"aria-label":"Main navigation",style:e.normalizeStyle(`--nav-height:${c.value};--nav-bottom:${r.value}px`)},[e.renderSlot(o.$slots,"navbar-burger",{},()=>[t.mobileNav?(e.openBlock(),e.createBlock(Ne,{key:0,"mobile-nav":t.mobileNav,"collapse-group":t.id},null,8,["mobile-nav","collapse-group"])):e.createCommentVNode("",!0)],!0),e.createElementVNode("div",Oe,[e.renderSlot(o.$slots,"navbar-logo",{},()=>[t.navbarBrand?.brandingImage?(e.openBlock(),e.createBlock(Se,e.normalizeProps(e.mergeProps({key:0},t.navbarBrand.brandingImage)),null,16)):e.createCommentVNode("",!0)],!0),e.createElementVNode("div",Fe,[e.renderSlot(o.$slots,"navbar-brand-link",{},()=>[t.navbarBrand?.brandingLink?(e.openBlock(),e.createElementBlock("div",De,[e.createElementVNode("a",{tabindex:"0",href:t.navbarBrand.brandingLink.href,class:"has-text-underline"},e.toDisplayString(t.navbarBrand.brandingLink.text),9,Ue)])):e.createCommentVNode("",!0)],!0)])]),e.createElementVNode("div",je,[e.renderSlot(o.$slots,"navbar-links",{},()=>[t.links?(e.openBlock(),e.createBlock(_e,{key:0,links:t.links,"collapse-group":t.id},null,8,["links","collapse-group"])):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",Ge,[e.renderSlot(o.$slots,"navbar-search",{},()=>[t.search?(e.openBlock(),e.createBlock(ze,{key:0,search:t.search,"collapse-group":t.id},null,8,["search","collapse-group"])):e.createCommentVNode("",!0)],!0)])],6))}}),qe=N(He,[["__scopeId","data-v-f2a05d03"]]),Ke=e.defineComponent({__name:"AppHeader",props:{showTrustedSite:{type:Boolean,default:!0},translations:{default:void 0},className:{},id:{default:"main-nav"},sticky:{type:Boolean,default:!0},navbarBrand:{default:void 0},mobileNav:{default:void 0},collapseGroup:{},search:{default:void 0},links:{default:void 0}},setup(t){return(l,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.showTrustedSite?(e.openBlock(),e.createBlock(be,{key:0},{translation:e.withCtx(()=>[e.renderSlot(l.$slots,"translations",{},()=>[t.translations?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.translations),{key:0})):e.createCommentVNode("",!0)])]),_:3})):e.createCommentVNode("",!0),e.createVNode(qe,{id:t.id,sticky:t.sticky,"mobile-nav":t.mobileNav,links:t.links,"navbar-brand":t.navbarBrand,search:t.search},null,8,["id","sticky","mobile-nav","links","navbar-brand","search"])],64))}});exports.AppHeader=Ke;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),c=require("@fortawesome/vue-fontawesome"),u=require("@phila/phila-ui-core"),m=require("@phila/phila-ui-collapse-panel"),x=require("@phila/phila-ui-logo");var N={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},g=N,h={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},B=h,v=h,y={prefix:"fas",iconName:"lock",icon:[384,512,[128274],"f023","M128 96l0 64 128 0 0-64c0-35.3-28.7-64-64-64s-64 28.7-64 64zM64 160l0-64C64 25.3 121.3-32 192-32S320 25.3 320 96l0 64c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]},b={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M140.3 135.2c12.6-10.3 31.1-9.5 42.8 2.2l128 128c9.2 9.2 11.9 22.9 6.9 34.9S301.4 320 288.5 320l-256 0c-12.9 0-24.6-7.8-29.6-19.8S.7 274.5 9.9 265.4l128-128 2.4-2.2z"]},k={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M140.3 376.8c12.6 10.2 31.1 9.5 42.8-2.2l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301.4 192 288.5 192l-256 0c-12.9 0-24.6 7.8-29.6 19.8S.7 237.5 9.9 246.6l128 128 2.4 2.2z"]},C={prefix:"fas",iconName:"building-columns",icon:[512,512,["bank","institution","museum","university"],"f19c","M271.9 20.2c-9.8-5.6-21.9-5.6-31.8 0l-224 128c-12.6 7.2-18.8 22-15.1 36S17.5 208 32 208l32 0 0 208 0 0-51.2 38.4C4.7 460.4 0 469.9 0 480 0 497.7 14.3 512 32 512l448 0c17.7 0 32-14.3 32-32 0-10.1-4.7-19.6-12.8-25.6l-51.2-38.4 0-208 32 0c14.5 0 27.2-9.8 30.9-23.8s-2.5-28.8-15.1-36l-224-128zM400 208l0 208-64 0 0-208 64 0zm-112 0l0 208-64 0 0-208 64 0zm-112 0l0 208-64 0 0-208 64 0zM256 96a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},V={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},E={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},w=E;const _="data:image/svg+xml,%3csvg%20width='16'%20height='11'%20viewBox='0%200%2016%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='16'%20height='11'%20fill='url(%23pattern0_61022_1867)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_61022_1867'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_61022_1867'%20transform='scale(0.0625%200.0909091)'/%3e%3c/pattern%3e%3cimage%20id='image0_61022_1867'%20width='16'%20height='11'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAMAAABBPP0LAAAAG1BMVEUdM7EeNLIeM7HgQCDaPh/bPh/bPx/////bPyBEby41AAAAUElEQVQI123MNw4CABDEwD3jC/9/MQ1BQrgeOSkIqYe2o2FZtthXgQLgbHVMZdlsfUQFQnHtjP1+8BUhBDKOqtmfot6ojqPzR7TjdU+f6vkED+IDPhTBcMAAAAAASUVORK5CYII='/%3e%3c/defs%3e%3c/svg%3e",A={id:"trusted-site",class:"has-background-ghost-gray is-flex is-justify-space-between"},$={class:"trusted-wrap"},S={class:"hidden-tablet trusted-toggle is-flex is-align-center"},L=["src"],z=["aria-label","aria-expanded"],M={class:"icon","aria-hidden":"true"},T={class:"hidden-desktop trusted-toggle is-flex is-align-center"},I=["aria-label","aria-expanded"],F={class:"icon","aria-hidden":"true"},D={key:0,class:"trusted-translation is-flex is-align-center"},U=["hidden"],G={class:"trusted-site-info-content content has-text-body-small is-flex is-justify-space-between"},H={class:"info-item-wrap is-flex"},O={class:"info-item is-flex is-12-mobile is-align-flex-start is-flex-1 my-4"},j={class:"trusted-icon is-flex is-flex-column has-text-center"},q={class:"icon circle-icon p-3 mb-2"},Q={class:"info-item is-flex is-12-mobile is-align-flex-start is-flex-1 my-4"},K={class:"trusted-icon is-flex is-flex-column has-text-center"},R={class:"icon circle-icon p-3 mb-2"},W={class:"info-content-close mt-4"},X=e.defineComponent({__name:"TrustedSite",setup(n){const l=e.useSlots(),{isCollapsed:s,onClickToggle:t}=u.useCollapse({id:"trusted-site-info",escapeKeyClose:!0}),r=e.computed(()=>s("trusted-site-info"));return(i,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",A,[e.createElementVNode("div",$,[e.createElementVNode("div",S,[e.createElementVNode("img",{src:e.unref(_),alt:"",class:"icon"},null,8,L),a[4]||(a[4]=e.createElementVNode("div",{class:"content mx-2"},"An official website of the City of Philadelphia government",-1)),e.createElementVNode("button",{class:"phila-button is-extra-small","aria-label":`${r.value?"Close":"Open"} Trusted Site information panel`,"aria-controls":"trusted-site-info","aria-expanded":r.value,onClick:a[0]||(a[0]=(...o)=>e.unref(t)&&e.unref(t)(...o))},[a[3]||(a[3]=e.createTextVNode(" Here's how you know ",-1)),e.createElementVNode("span",M,[e.createVNode(e.unref(c.FontAwesomeIcon),{icon:r.value?e.unref(b):e.unref(k)},null,8,["icon"])])],8,z)]),e.createElementVNode("div",T,[e.createElementVNode("button",{class:"phila-button is-extra-small","aria-label":`${r.value?"Close":"Open"} Trusted Site information panel`,"aria-controls":"trusted-site-info","aria-expanded":r.value,onClick:a[1]||(a[1]=(...o)=>e.unref(t)&&e.unref(t)(...o))},[a[5]||(a[5]=e.createTextVNode(" An official website ",-1)),e.createElementVNode("span",F,[e.createVNode(e.unref(c.FontAwesomeIcon),{icon:e.unref(w)},null,8,["icon"])])],8,I)])]),e.unref(l).translation?(e.openBlock(),e.createElementBlock("div",D,[e.renderSlot(i.$slots,"translation",{},void 0,!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{id:"trusted-site-info",class:"has-background-secondary px-6",hidden:!r.value},[e.createElementVNode("div",G,[e.createElementVNode("div",H,[e.createElementVNode("div",O,[e.createElementVNode("div",j,[e.createElementVNode("div",q,[e.createVNode(e.unref(c.FontAwesomeIcon),{icon:e.unref(y)},null,8,["icon"])]),a[6]||(a[6]=e.createElementVNode("span",{class:"has-text-bold"},"https://",-1))]),a[7]||(a[7]=e.createElementVNode("div",{class:"trusted-text m-4"},[e.createTextVNode(" The "),e.createElementVNode("strong",null,"https://"),e.createTextVNode(" in the address bar means your information is encrypted and can not be accessed by anyone else ")],-1))]),e.createElementVNode("div",Q,[e.createElementVNode("div",K,[e.createElementVNode("span",R,[e.createVNode(e.unref(c.FontAwesomeIcon),{icon:e.unref(C)},null,8,["icon"])]),a[8]||(a[8]=e.createElementVNode("span",{class:"has-text-bold"},".gov",-1))]),a[9]||(a[9]=e.createElementVNode("div",{class:"trusted-text m-4"},"Only government entities in the U.S. can end in .gov",-1))])]),e.createElementVNode("div",W,[e.createElementVNode("button",{class:"phila-button phila-button--primary icon-button is-extra-small","aria-label":"Close Trusted Site information panel",onClick:a[2]||(a[2]=(...o)=>e.unref(t)&&e.unref(t)(...o))},[e.createVNode(e.unref(c.FontAwesomeIcon),{icon:e.unref(B)},null,8,["icon"])])])])],8,U)],64))}}),f=(n,l)=>{const s=n.__vccOpts||n;for(const[t,r]of l)s[t]=r;return s},Y=f(X,[["__scopeId","data-v-117bdb56"]]),Z=["aria-controls","aria-expanded","aria-label","onClick"],J={class:"icon"},P=["id","hidden"],ee=e.defineComponent({__name:"NavbarBurger",props:{mobileNav:{},collapseGroup:{}},setup(n){return(l,s)=>(e.openBlock(),e.createBlock(e.unref(m.CollapsePanel),{id:"mobile-nav",group:n.collapseGroup,"outside-click-close":"","escape-key-close":"","blur-close":"","open-single":""},{toggle:e.withCtx(t=>[e.createElementVNode("button",{class:e.normalizeClass(["phila-navbar-burger phila-button icon-button",{"phila-navbar-item-flyout-active":t.open}]),"aria-controls":t.ariaControls,"aria-expanded":t.open,"aria-label":`${t.open?"Close":"Open"} mobile navigation panel`,onClick:t.onClick},[e.createElementVNode("span",J,[e.createVNode(e.unref(c.FontAwesomeIcon),{icon:t.open?e.unref(v):e.unref(V)},null,8,["icon"])])],10,Z)]),default:e.withCtx(t=>[e.createElementVNode("div",{id:t.id,class:"phila-mobile-nav",hidden:!t.open},[e.renderSlot(l.$slots,"mobile-nav",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.mobileNav)))])],8,P)]),_:3},8,["group"]))}}),ne=["href"],te=["href","aria-controls","aria-expanded","onKeypress","onTouchend","onClick"],ae=["id","hidden"],oe={key:0,class:"content nav-flyout has-background-ghost-gray px-6 py-4",tabindex:"-1"},le={class:"is-flex is-flex-column is-flex-wrap-wrap",style:{gap:"var(--spacing-4xl)"}},ie=["href"],se=e.defineComponent({__name:"NavbarLinks",props:{links:{},collapseGroup:{}},setup(n){const l=t=>!!(t.subLinks||t.subNav),s=t=>`main-nav-${t.text.split(" ").join("-").toLowerCase().replace(/[^a-z0-9-]/g,"")}`;return(t,r)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.links,(i,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l(i)?(e.openBlock(),e.createBlock(e.unref(m.CollapsePanel),{id:s(i),key:`collapse-${a}`,group:n.collapseGroup,"outside-click-close":"","escape-key-close":"","blur-close":"","mouse-over-toggle":"","open-single":"",class:"phila-navbar-link-list-item"},{toggle:e.withCtx(o=>[e.createElementVNode("a",{href:i.href,class:e.normalizeClass(["phila-navbar-link px-4",{"phila-navbar-item-flyout-active":o.open}]),"aria-controls":o.ariaControls,"aria-expanded":o.open,tabindex:"0",onKeypress:e.withKeys(o.onClick,["enter"]),onTouchend:o.onClick,onClick:o.onClick},[e.createTextVNode(e.toDisplayString(i.text)+" ",1),e.createVNode(e.unref(c.FontAwesomeIcon),{class:"ml-1",icon:o.open?e.unref(b):e.unref(k)},null,8,["icon"])],42,te)]),default:e.withCtx(o=>[(e.openBlock(),e.createElementBlock("div",{id:o.id,key:i.text,hidden:!o.open},[i.subLinks?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("ul",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.subLinks,d=>(e.openBlock(),e.createElementBlock("li",{key:d.text,class:"sub-nav-link is-flex is-align-center",style:{width:"150px"}},[e.createElementVNode("a",{href:d.href,class:"has-text-link has-text-weight-medium",tabindex:"0"},e.toDisplayString(d.text),9,ie)]))),128))])])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.subNav),{key:1}))],8,ae))]),_:2},1032,["id","group"])):(e.openBlock(),e.createElementBlock("div",{key:`link-${a}`,class:"phila-navbar-link-list-item"},[e.createElementVNode("a",{href:i.href,class:"phila-navbar-link px-4",tabindex:"0"},e.toDisplayString(i.text),9,ne)]))],64))),256))}}),re=e.defineComponent({__name:"NavbarBrandLogo",props:{src:{},href:{default:"/"},altText:{}},setup(n){const l=n;return(s,t)=>(e.openBlock(),e.createBlock(e.unref(x.Logo),{href:l.href,variant:"city",layout:"stacked","color-scheme":"on-primary",class:"phila-navbar-logo"},null,8,["href"]))}}),ce=f(re,[["__scopeId","data-v-7dabdf6b"]]),de={class:"pr-4"},ue=["aria-controls","aria-expanded","aria-label","onClick"],me={class:"icon"},fe=["id","hidden"],pe=e.defineComponent({__name:"NavbarSearch",props:{search:{},collapseGroup:{}},setup(n){return(l,s)=>(e.openBlock(),e.createBlock(e.unref(m.CollapsePanel),{id:"navbar-search",group:n.collapseGroup,"outside-click-close":"","escape-key-close":"","blur-close":"","open-single":""},{toggle:e.withCtx(t=>[e.createElementVNode("div",de,[e.createElementVNode("button",{class:e.normalizeClass(["phila-button phila-button--primary icon-button is-small",{"phila-navbar-item-flyout-active":t.open}]),"aria-controls":t.ariaControls,"aria-expanded":t.open,"aria-label":`${t.open?"Close":"Open"} search panel`,onClick:t.onClick},[e.createElementVNode("span",me,[e.createVNode(e.unref(c.FontAwesomeIcon),{icon:t.open?e.unref(v):e.unref(g)},null,8,["icon"])])],10,ue)])]),default:e.withCtx(t=>[e.createElementVNode("div",{id:t.id,class:"nav-flyout is-12",hidden:!t.open},[e.renderSlot(l.$slots,"default",{},()=>[n.search&&t.open?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.search),{key:0})):e.createCommentVNode("",!0)])],8,fe)]),_:3},8,["group"]))}}),he={class:"phila-navbar-brand"},ve={class:"phila-navbar-item phila-navbar-brand-link hidden-tablet"},be={key:0,class:"content"},ke=["href"],xe={class:"phila-navbar-item phila-navbar-list is-flex is-align-center is-justify-space-between content has-text-label-default hidden-tablet"},Ne={class:"phila-navbar-search"},p="5rem",ge=e.defineComponent({__name:"index",props:{id:{},sticky:{type:Boolean},navbarBrand:{},mobileNav:{},collapseGroup:{},search:{},links:{default:()=>[{text:"Home",href:"#"}]}},setup(n){const l=n,{state:s}=u.useCollapse(),t=e.useTemplateRef("navBarElement"),r=e.ref(p),i=e.ref(0),a=u.debounce(()=>{const o=(t.value?.offsetTop||0)+(t.value?.offsetHeight||0),d=typeof window<"u"?window.innerWidth:1024;r.value=!l.sticky||d<1024?o+"px":p,i.value=o},100);return e.watch(()=>s.value,a,{deep:!0,immediate:!0}),e.onMounted(()=>{window.addEventListener("resize",a)}),e.onUnmounted(()=>{window.removeEventListener("resize",a)}),(o,d)=>(e.openBlock(),e.createElementBlock("nav",{ref_key:"navBarElement",ref:t,class:e.normalizeClass(["phila-navbar has-background-primary",{"is-sticky-desktop":n.sticky}]),"aria-label":"Main navigation",style:e.normalizeStyle(`--nav-height:${r.value};--nav-bottom:${i.value}px`)},[e.renderSlot(o.$slots,"navbar-burger",{},()=>[n.mobileNav?(e.openBlock(),e.createBlock(ee,{key:0,"mobile-nav":n.mobileNav,"collapse-group":n.id},null,8,["mobile-nav","collapse-group"])):e.createCommentVNode("",!0)],!0),e.createElementVNode("div",he,[e.renderSlot(o.$slots,"navbar-logo",{},()=>[n.navbarBrand?.brandingImage?(e.openBlock(),e.createBlock(ce,e.normalizeProps(e.mergeProps({key:0},n.navbarBrand.brandingImage)),null,16)):e.createCommentVNode("",!0)],!0),e.createElementVNode("div",ve,[e.renderSlot(o.$slots,"navbar-brand-link",{},()=>[n.navbarBrand?.brandingLink?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("a",{tabindex:"0",href:n.navbarBrand.brandingLink.href,class:"has-text-underline"},e.toDisplayString(n.navbarBrand.brandingLink.text),9,ke)])):e.createCommentVNode("",!0)],!0)])]),e.createElementVNode("div",xe,[e.renderSlot(o.$slots,"navbar-links",{},()=>[n.links?(e.openBlock(),e.createBlock(se,{key:0,links:n.links,"collapse-group":n.id},null,8,["links","collapse-group"])):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",Ne,[e.renderSlot(o.$slots,"navbar-search",{},()=>[n.search?(e.openBlock(),e.createBlock(pe,{key:0,search:n.search,"collapse-group":n.id},null,8,["search","collapse-group"])):e.createCommentVNode("",!0)],!0)])],6))}}),Be=f(ge,[["__scopeId","data-v-26fd958d"]]),ye=e.defineComponent({__name:"AppHeader",props:{showTrustedSite:{type:Boolean,default:!0},translations:{default:void 0},className:{},id:{default:"main-nav"},sticky:{type:Boolean,default:!0},navbarBrand:{default:void 0},mobileNav:{default:void 0},collapseGroup:{},search:{default:void 0},links:{default:void 0}},setup(n){return(l,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.showTrustedSite?(e.openBlock(),e.createBlock(Y,{key:0},{translation:e.withCtx(()=>[e.renderSlot(l.$slots,"translations",{},()=>[n.translations?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.translations),{key:0})):e.createCommentVNode("",!0)])]),_:3})):e.createCommentVNode("",!0),e.createVNode(Be,{id:n.id,sticky:n.sticky,"mobile-nav":n.mobileNav,links:n.links,"navbar-brand":n.navbarBrand,search:n.search},null,8,["id","sticky","mobile-nav","links","navbar-brand","search"])],64))}});exports.AppHeader=ye;
|
package/dist/index.mjs
CHANGED
|
@@ -1,243 +1,163 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FontAwesomeIcon as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as x, useSlots as I, computed as U, createElementBlock as h, openBlock as o, Fragment as y, createElementVNode as a, createCommentVNode as f, unref as t, createTextVNode as g, createVNode as v, renderSlot as m, createBlock as c, withCtx as b, resolveDynamicComponent as C, normalizeClass as w, renderList as A, toDisplayString as _, withKeys as G, useTemplateRef as H, ref as N, watch as O, onMounted as j, onUnmounted as D, normalizeStyle as V, normalizeProps as Q, mergeProps as K } from "vue";
|
|
2
|
+
import { FontAwesomeIcon as p } from "@fortawesome/vue-fontawesome";
|
|
3
|
+
import { useCollapse as z, debounce as F } from "@phila/phila-ui-core";
|
|
4
|
+
import { CollapsePanel as $ } from "@phila/phila-ui-collapse-panel";
|
|
5
|
+
import { Logo as R } from "@phila/phila-ui-logo";
|
|
6
|
+
import './index.css';var q = {
|
|
6
7
|
prefix: "fas",
|
|
7
8
|
iconName: "magnifying-glass",
|
|
8
9
|
icon: [512, 512, [128269, "search"], "f002", "M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]
|
|
9
|
-
},
|
|
10
|
+
}, W = q, M = {
|
|
10
11
|
prefix: "fas",
|
|
11
12
|
iconName: "xmark",
|
|
12
13
|
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
|
|
13
|
-
},
|
|
14
|
+
}, X = M, S = M, Y = {
|
|
14
15
|
prefix: "fas",
|
|
15
16
|
iconName: "lock",
|
|
16
17
|
icon: [384, 512, [128274], "f023", "M128 96l0 64 128 0 0-64c0-35.3-28.7-64-64-64s-64 28.7-64 64zM64 160l0-64C64 25.3 121.3-32 192-32S320 25.3 320 96l0 64c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]
|
|
17
|
-
},
|
|
18
|
+
}, T = {
|
|
18
19
|
prefix: "fas",
|
|
19
20
|
iconName: "caret-up",
|
|
20
21
|
icon: [320, 512, [], "f0d8", "M140.3 135.2c12.6-10.3 31.1-9.5 42.8 2.2l128 128c9.2 9.2 11.9 22.9 6.9 34.9S301.4 320 288.5 320l-256 0c-12.9 0-24.6-7.8-29.6-19.8S.7 274.5 9.9 265.4l128-128 2.4-2.2z"]
|
|
21
|
-
},
|
|
22
|
+
}, E = {
|
|
22
23
|
prefix: "fas",
|
|
23
24
|
iconName: "caret-down",
|
|
24
25
|
icon: [320, 512, [], "f0d7", "M140.3 376.8c12.6 10.2 31.1 9.5 42.8-2.2l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301.4 192 288.5 192l-256 0c-12.9 0-24.6 7.8-29.6 19.8S.7 237.5 9.9 246.6l128 128 2.4 2.2z"]
|
|
25
|
-
},
|
|
26
|
+
}, Z = {
|
|
26
27
|
prefix: "fas",
|
|
27
28
|
iconName: "building-columns",
|
|
28
29
|
icon: [512, 512, ["bank", "institution", "museum", "university"], "f19c", "M271.9 20.2c-9.8-5.6-21.9-5.6-31.8 0l-224 128c-12.6 7.2-18.8 22-15.1 36S17.5 208 32 208l32 0 0 208 0 0-51.2 38.4C4.7 460.4 0 469.9 0 480 0 497.7 14.3 512 32 512l448 0c17.7 0 32-14.3 32-32 0-10.1-4.7-19.6-12.8-25.6l-51.2-38.4 0-208 32 0c14.5 0 27.2-9.8 30.9-23.8s-2.5-28.8-15.1-36l-224-128zM400 208l0 208-64 0 0-208 64 0zm-112 0l0 208-64 0 0-208 64 0zm-112 0l0 208-64 0 0-208 64 0zM256 96a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]
|
|
29
|
-
},
|
|
30
|
+
}, J = {
|
|
30
31
|
prefix: "fas",
|
|
31
32
|
iconName: "bars",
|
|
32
33
|
icon: [448, 512, ["navicon"], "f0c9", "M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]
|
|
33
|
-
},
|
|
34
|
+
}, P = {
|
|
34
35
|
prefix: "fas",
|
|
35
36
|
iconName: "circle-info",
|
|
36
37
|
icon: [512, 512, ["info-circle"], "f05a", "M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]
|
|
37
|
-
},
|
|
38
|
-
const
|
|
39
|
-
$("");
|
|
40
|
-
te({
|
|
41
|
-
validateOnBlur: !1,
|
|
42
|
-
validateOnInput: !1,
|
|
43
|
-
validateOnChange: !1,
|
|
44
|
-
validateOnMount: !1,
|
|
45
|
-
required: !1,
|
|
46
|
-
isValid: !0,
|
|
47
|
-
errors: []
|
|
48
|
-
});
|
|
49
|
-
const g = $({}), k = $(), T = 400, z = $(null);
|
|
50
|
-
function R(e) {
|
|
51
|
-
const o = e?.group ?? "global", l = (c, m) => {
|
|
52
|
-
g.value[o][c] = m;
|
|
53
|
-
}, a = (c, m) => {
|
|
54
|
-
g.value[o] = { [c]: m };
|
|
55
|
-
}, u = (c) => g.value[o][c] ?? !1, d = (c) => {
|
|
56
|
-
l(c, !u(c));
|
|
57
|
-
}, i = (c) => {
|
|
58
|
-
a(c, !u(c));
|
|
59
|
-
}, s = () => {
|
|
60
|
-
g.value[o] = {};
|
|
61
|
-
}, y = (c) => {
|
|
62
|
-
c.key === "Escape" && (l(e.id, !1), w());
|
|
63
|
-
}, N = (c) => {
|
|
64
|
-
if (!e) return;
|
|
65
|
-
const m = c.target, [B] = Object.keys(g.value[o]).filter((ne) => g.value[o][ne] === !0), G = document.getElementById(B), ee = document.querySelector(`[aria-controls="${B}"]`), ae = m.getAttribute("aria-controls") === B || ee?.contains(c.target);
|
|
66
|
-
G && !G.contains(m) && !ae && (l(e.id, !1), w());
|
|
67
|
-
}, X = () => {
|
|
68
|
-
e && (k.value = setTimeout(() => {
|
|
69
|
-
l(e.id, !1), w();
|
|
70
|
-
}, T));
|
|
71
|
-
}, Y = () => {
|
|
72
|
-
e && e.mouseOverToggle === !0 && (z.value = e.id, k.value = setTimeout(() => {
|
|
73
|
-
D();
|
|
74
|
-
}, T));
|
|
75
|
-
}, Z = () => {
|
|
76
|
-
e && e.mouseOverToggle === !0 && (z.value = null, clearTimeout(k.value), k.value = setTimeout(() => {
|
|
77
|
-
z.value !== e.id && (l(e.id, !1), w());
|
|
78
|
-
}, T));
|
|
79
|
-
}, W = (c) => {
|
|
80
|
-
if (!e) return;
|
|
81
|
-
const { relatedTarget: m } = c;
|
|
82
|
-
if (!m || m.getAttribute("aria-controls") === e.id)
|
|
83
|
-
return;
|
|
84
|
-
const B = document.getElementById(e.id);
|
|
85
|
-
B && B.contains(m) || (clearTimeout(k.value), k.value = setTimeout(() => {
|
|
86
|
-
e.openSingle ? a(e.id, !1) : l(e.id, !1), w();
|
|
87
|
-
}, T));
|
|
88
|
-
}, J = () => {
|
|
89
|
-
e && (e.outsideClickClose && (document.addEventListener("click", N), document.addEventListener("touchend", N)), e.escapeKeyClose && document.addEventListener("keydown", y));
|
|
90
|
-
}, w = () => {
|
|
91
|
-
document.removeEventListener("click", N), document.removeEventListener("touchend", N), document.removeEventListener("keydown", y), document.removeEventListener("scroll", X);
|
|
92
|
-
}, U = (c) => {
|
|
93
|
-
e && (c?.preventDefault(), clearTimeout(k.value), J());
|
|
94
|
-
}, P = (c) => {
|
|
95
|
-
e && (U(c), e.openSingle ? i(e.id) : d(e.id));
|
|
96
|
-
}, D = (c) => {
|
|
97
|
-
e && (U(c), e.openSingle ? a(e.id, !0) : l(e.id, !0));
|
|
98
|
-
};
|
|
99
|
-
return ie(() => {
|
|
100
|
-
g.value[o] || s();
|
|
101
|
-
}), V(() => {
|
|
102
|
-
w();
|
|
103
|
-
}), {
|
|
104
|
-
state: g,
|
|
105
|
-
timeout: k,
|
|
106
|
-
toggle: d,
|
|
107
|
-
toggleSingle: i,
|
|
108
|
-
setCollapsed: l,
|
|
109
|
-
setSingleCollapsed: a,
|
|
110
|
-
isCollapsed: u,
|
|
111
|
-
reset: s,
|
|
112
|
-
onMouseEnter: Y,
|
|
113
|
-
onMouseLeave: Z,
|
|
114
|
-
focusChange: W,
|
|
115
|
-
onClickToggle: P,
|
|
116
|
-
onClickOpen: D
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
const we = {
|
|
38
|
+
}, ee = P;
|
|
39
|
+
const ae = "data:image/svg+xml,%3csvg%20width='16'%20height='11'%20viewBox='0%200%2016%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='16'%20height='11'%20fill='url(%23pattern0_61022_1867)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_61022_1867'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_61022_1867'%20transform='scale(0.0625%200.0909091)'/%3e%3c/pattern%3e%3cimage%20id='image0_61022_1867'%20width='16'%20height='11'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAMAAABBPP0LAAAAG1BMVEUdM7EeNLIeM7HgQCDaPh/bPh/bPx/////bPyBEby41AAAAUElEQVQI123MNw4CABDEwD3jC/9/MQ1BQrgeOSkIqYe2o2FZtthXgQLgbHVMZdlsfUQFQnHtjP1+8BUhBDKOqtmfot6ojqPzR7TjdU+f6vkED+IDPhTBcMAAAAAASUVORK5CYII='/%3e%3c/defs%3e%3c/svg%3e", ne = {
|
|
120
40
|
id: "trusted-site",
|
|
121
41
|
class: "has-background-ghost-gray is-flex is-justify-space-between"
|
|
122
|
-
},
|
|
42
|
+
}, te = { class: "trusted-wrap" }, ie = { class: "hidden-tablet trusted-toggle is-flex is-align-center" }, se = ["src"], oe = ["aria-label", "aria-expanded"], le = {
|
|
123
43
|
class: "icon",
|
|
124
44
|
"aria-hidden": "true"
|
|
125
|
-
},
|
|
45
|
+
}, re = { class: "hidden-desktop trusted-toggle is-flex is-align-center" }, ce = ["aria-label", "aria-expanded"], de = {
|
|
126
46
|
class: "icon",
|
|
127
47
|
"aria-hidden": "true"
|
|
128
|
-
},
|
|
48
|
+
}, ue = {
|
|
129
49
|
key: 0,
|
|
130
50
|
class: "trusted-translation is-flex is-align-center"
|
|
131
|
-
},
|
|
51
|
+
}, he = ["hidden"], fe = { class: "trusted-site-info-content content has-text-body-small is-flex is-justify-space-between" }, ve = { class: "info-item-wrap is-flex" }, me = { class: "info-item is-flex is-12-mobile is-align-flex-start is-flex-1 my-4" }, pe = { class: "trusted-icon is-flex is-flex-column has-text-center" }, be = { class: "icon circle-icon p-3 mb-2" }, xe = { class: "info-item is-flex is-12-mobile is-align-flex-start is-flex-1 my-4" }, ke = { class: "trusted-icon is-flex is-flex-column has-text-center" }, ge = { class: "icon circle-icon p-3 mb-2" }, ye = { class: "info-content-close mt-4" }, _e = /* @__PURE__ */ x({
|
|
132
52
|
__name: "TrustedSite",
|
|
133
53
|
setup(e) {
|
|
134
|
-
const
|
|
54
|
+
const l = I(), { isCollapsed: d, onClickToggle: n } = z({
|
|
135
55
|
id: "trusted-site-info",
|
|
136
56
|
escapeKeyClose: !0
|
|
137
|
-
}), u =
|
|
138
|
-
return (
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
src: t(
|
|
57
|
+
}), u = U(() => d("trusted-site-info"));
|
|
58
|
+
return (r, i) => (o(), h(y, null, [
|
|
59
|
+
a("div", ne, [
|
|
60
|
+
a("div", te, [
|
|
61
|
+
a("div", ie, [
|
|
62
|
+
a("img", {
|
|
63
|
+
src: t(ae),
|
|
144
64
|
alt: "",
|
|
145
65
|
class: "icon"
|
|
146
|
-
}, null, 8,
|
|
147
|
-
i[4] || (i[4] =
|
|
148
|
-
|
|
66
|
+
}, null, 8, se),
|
|
67
|
+
i[4] || (i[4] = a("div", { class: "content mx-2" }, "An official website of the City of Philadelphia government", -1)),
|
|
68
|
+
a("button", {
|
|
149
69
|
class: "phila-button is-extra-small",
|
|
150
70
|
"aria-label": `${u.value ? "Close" : "Open"} Trusted Site information panel`,
|
|
151
71
|
"aria-controls": "trusted-site-info",
|
|
152
72
|
"aria-expanded": u.value,
|
|
153
73
|
onClick: i[0] || (i[0] = //@ts-ignore
|
|
154
|
-
(...s) => t(
|
|
74
|
+
(...s) => t(n) && t(n)(...s))
|
|
155
75
|
}, [
|
|
156
|
-
i[3] || (i[3] =
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
icon: u.value ? t(
|
|
76
|
+
i[3] || (i[3] = g(" Here's how you know ", -1)),
|
|
77
|
+
a("span", le, [
|
|
78
|
+
v(t(p), {
|
|
79
|
+
icon: u.value ? t(T) : t(E)
|
|
160
80
|
}, null, 8, ["icon"])
|
|
161
81
|
])
|
|
162
|
-
], 8,
|
|
82
|
+
], 8, oe)
|
|
163
83
|
]),
|
|
164
|
-
|
|
165
|
-
|
|
84
|
+
a("div", re, [
|
|
85
|
+
a("button", {
|
|
166
86
|
class: "phila-button is-extra-small",
|
|
167
87
|
"aria-label": `${u.value ? "Close" : "Open"} Trusted Site information panel`,
|
|
168
88
|
"aria-controls": "trusted-site-info",
|
|
169
89
|
"aria-expanded": u.value,
|
|
170
90
|
onClick: i[1] || (i[1] = //@ts-ignore
|
|
171
|
-
(...s) => t(
|
|
91
|
+
(...s) => t(n) && t(n)(...s))
|
|
172
92
|
}, [
|
|
173
|
-
i[5] || (i[5] =
|
|
174
|
-
|
|
175
|
-
|
|
93
|
+
i[5] || (i[5] = g(" An official website ", -1)),
|
|
94
|
+
a("span", de, [
|
|
95
|
+
v(t(p), { icon: t(ee) }, null, 8, ["icon"])
|
|
176
96
|
])
|
|
177
|
-
], 8,
|
|
97
|
+
], 8, ce)
|
|
178
98
|
])
|
|
179
99
|
]),
|
|
180
|
-
t(
|
|
181
|
-
|
|
182
|
-
])) :
|
|
100
|
+
t(l).translation ? (o(), h("div", ue, [
|
|
101
|
+
m(r.$slots, "translation", {}, void 0, !0)
|
|
102
|
+
])) : f("", !0)
|
|
183
103
|
]),
|
|
184
|
-
|
|
104
|
+
a("div", {
|
|
185
105
|
id: "trusted-site-info",
|
|
186
106
|
class: "has-background-secondary px-6",
|
|
187
107
|
hidden: !u.value
|
|
188
108
|
}, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
109
|
+
a("div", fe, [
|
|
110
|
+
a("div", ve, [
|
|
111
|
+
a("div", me, [
|
|
112
|
+
a("div", pe, [
|
|
113
|
+
a("div", be, [
|
|
114
|
+
v(t(p), { icon: t(Y) }, null, 8, ["icon"])
|
|
195
115
|
]),
|
|
196
|
-
i[6] || (i[6] =
|
|
116
|
+
i[6] || (i[6] = a("span", { class: "has-text-bold" }, "https://", -1))
|
|
197
117
|
]),
|
|
198
|
-
i[7] || (i[7] =
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
118
|
+
i[7] || (i[7] = a("div", { class: "trusted-text m-4" }, [
|
|
119
|
+
g(" The "),
|
|
120
|
+
a("strong", null, "https://"),
|
|
121
|
+
g(" in the address bar means your information is encrypted and can not be accessed by anyone else ")
|
|
202
122
|
], -1))
|
|
203
123
|
]),
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
124
|
+
a("div", xe, [
|
|
125
|
+
a("div", ke, [
|
|
126
|
+
a("span", ge, [
|
|
127
|
+
v(t(p), { icon: t(Z) }, null, 8, ["icon"])
|
|
208
128
|
]),
|
|
209
|
-
i[8] || (i[8] =
|
|
129
|
+
i[8] || (i[8] = a("span", { class: "has-text-bold" }, ".gov", -1))
|
|
210
130
|
]),
|
|
211
|
-
i[9] || (i[9] =
|
|
131
|
+
i[9] || (i[9] = a("div", { class: "trusted-text m-4" }, "Only government entities in the U.S. can end in .gov", -1))
|
|
212
132
|
])
|
|
213
133
|
]),
|
|
214
|
-
|
|
215
|
-
|
|
134
|
+
a("div", ye, [
|
|
135
|
+
a("button", {
|
|
216
136
|
class: "phila-button phila-button--primary icon-button is-extra-small",
|
|
217
137
|
"aria-label": "Close Trusted Site information panel",
|
|
218
138
|
onClick: i[2] || (i[2] = //@ts-ignore
|
|
219
|
-
(...s) => t(
|
|
139
|
+
(...s) => t(n) && t(n)(...s))
|
|
220
140
|
}, [
|
|
221
|
-
|
|
141
|
+
v(t(p), { icon: t(X) }, null, 8, ["icon"])
|
|
222
142
|
])
|
|
223
143
|
])
|
|
224
144
|
])
|
|
225
|
-
], 8,
|
|
145
|
+
], 8, he)
|
|
226
146
|
], 64));
|
|
227
147
|
}
|
|
228
|
-
}),
|
|
229
|
-
const
|
|
230
|
-
for (const [
|
|
231
|
-
|
|
232
|
-
return
|
|
233
|
-
},
|
|
148
|
+
}), B = (e, l) => {
|
|
149
|
+
const d = e.__vccOpts || e;
|
|
150
|
+
for (const [n, u] of l)
|
|
151
|
+
d[n] = u;
|
|
152
|
+
return d;
|
|
153
|
+
}, Ce = /* @__PURE__ */ B(_e, [["__scopeId", "data-v-117bdb56"]]), we = ["aria-controls", "aria-expanded", "aria-label", "onClick"], $e = { class: "icon" }, Be = ["id", "hidden"], Ae = /* @__PURE__ */ x({
|
|
234
154
|
__name: "NavbarBurger",
|
|
235
155
|
props: {
|
|
236
156
|
mobileNav: {},
|
|
237
157
|
collapseGroup: {}
|
|
238
158
|
},
|
|
239
159
|
setup(e) {
|
|
240
|
-
return (
|
|
160
|
+
return (l, d) => (o(), c(t($), {
|
|
241
161
|
id: "mobile-nav",
|
|
242
162
|
group: e.collapseGroup,
|
|
243
163
|
"outside-click-close": "",
|
|
@@ -245,53 +165,53 @@ const we = {
|
|
|
245
165
|
"blur-close": "",
|
|
246
166
|
"open-single": ""
|
|
247
167
|
}, {
|
|
248
|
-
toggle:
|
|
249
|
-
|
|
250
|
-
class:
|
|
251
|
-
"aria-controls":
|
|
252
|
-
"aria-expanded":
|
|
253
|
-
"aria-label": `${
|
|
254
|
-
onClick:
|
|
168
|
+
toggle: b((n) => [
|
|
169
|
+
a("button", {
|
|
170
|
+
class: w(["phila-navbar-burger phila-button icon-button", { "phila-navbar-item-flyout-active": n.open }]),
|
|
171
|
+
"aria-controls": n.ariaControls,
|
|
172
|
+
"aria-expanded": n.open,
|
|
173
|
+
"aria-label": `${n.open ? "Close" : "Open"} mobile navigation panel`,
|
|
174
|
+
onClick: n.onClick
|
|
255
175
|
}, [
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
icon:
|
|
176
|
+
a("span", $e, [
|
|
177
|
+
v(t(p), {
|
|
178
|
+
icon: n.open ? t(S) : t(J)
|
|
259
179
|
}, null, 8, ["icon"])
|
|
260
180
|
])
|
|
261
|
-
], 10,
|
|
181
|
+
], 10, we)
|
|
262
182
|
]),
|
|
263
|
-
default:
|
|
264
|
-
|
|
265
|
-
id:
|
|
183
|
+
default: b((n) => [
|
|
184
|
+
a("div", {
|
|
185
|
+
id: n.id,
|
|
266
186
|
class: "phila-mobile-nav",
|
|
267
|
-
hidden: !
|
|
187
|
+
hidden: !n.open
|
|
268
188
|
}, [
|
|
269
|
-
|
|
270
|
-
(
|
|
189
|
+
m(l.$slots, "mobile-nav", {}, () => [
|
|
190
|
+
(o(), c(C(e.mobileNav)))
|
|
271
191
|
])
|
|
272
|
-
], 8,
|
|
192
|
+
], 8, Be)
|
|
273
193
|
]),
|
|
274
194
|
_: 3
|
|
275
195
|
}, 8, ["group"]));
|
|
276
196
|
}
|
|
277
|
-
}),
|
|
197
|
+
}), Ne = ["href"], Le = ["href", "aria-controls", "aria-expanded", "onKeypress", "onTouchend", "onClick"], ze = ["id", "hidden"], Me = {
|
|
278
198
|
key: 0,
|
|
279
199
|
class: "content nav-flyout has-background-ghost-gray px-6 py-4",
|
|
280
200
|
tabindex: "-1"
|
|
281
|
-
},
|
|
201
|
+
}, Se = {
|
|
282
202
|
class: "is-flex is-flex-column is-flex-wrap-wrap",
|
|
283
203
|
style: { gap: "var(--spacing-4xl)" }
|
|
284
|
-
},
|
|
204
|
+
}, Te = ["href"], Ee = /* @__PURE__ */ x({
|
|
285
205
|
__name: "NavbarLinks",
|
|
286
206
|
props: {
|
|
287
207
|
links: {},
|
|
288
208
|
collapseGroup: {}
|
|
289
209
|
},
|
|
290
210
|
setup(e) {
|
|
291
|
-
const
|
|
292
|
-
return (
|
|
293
|
-
|
|
294
|
-
id:
|
|
211
|
+
const l = (n) => !!(n.subLinks || n.subNav), d = (n) => `main-nav-${n.text.split(" ").join("-").toLowerCase().replace(/[^a-z0-9-]/g, "")}`;
|
|
212
|
+
return (n, u) => (o(!0), h(y, null, A(e.links, (r, i) => (o(), h(y, null, [
|
|
213
|
+
l(r) ? (o(), c(t($), {
|
|
214
|
+
id: d(r),
|
|
295
215
|
key: `collapse-${i}`,
|
|
296
216
|
group: e.collapseGroup,
|
|
297
217
|
"outside-click-close": "",
|
|
@@ -301,61 +221,61 @@ const we = {
|
|
|
301
221
|
"open-single": "",
|
|
302
222
|
class: "phila-navbar-link-list-item"
|
|
303
223
|
}, {
|
|
304
|
-
toggle:
|
|
305
|
-
|
|
306
|
-
href:
|
|
307
|
-
class:
|
|
224
|
+
toggle: b((s) => [
|
|
225
|
+
a("a", {
|
|
226
|
+
href: r.href,
|
|
227
|
+
class: w(["phila-navbar-link px-4", { "phila-navbar-item-flyout-active": s.open }]),
|
|
308
228
|
"aria-controls": s.ariaControls,
|
|
309
229
|
"aria-expanded": s.open,
|
|
310
230
|
tabindex: "0",
|
|
311
|
-
onKeypress:
|
|
231
|
+
onKeypress: G(s.onClick, ["enter"]),
|
|
312
232
|
onTouchend: s.onClick,
|
|
313
233
|
onClick: s.onClick
|
|
314
234
|
}, [
|
|
315
|
-
|
|
316
|
-
|
|
235
|
+
g(_(r.text) + " ", 1),
|
|
236
|
+
v(t(p), {
|
|
317
237
|
class: "ml-1",
|
|
318
|
-
icon: s.open ? t(
|
|
238
|
+
icon: s.open ? t(T) : t(E)
|
|
319
239
|
}, null, 8, ["icon"])
|
|
320
|
-
], 42,
|
|
240
|
+
], 42, Le)
|
|
321
241
|
]),
|
|
322
|
-
default:
|
|
323
|
-
(
|
|
242
|
+
default: b((s) => [
|
|
243
|
+
(o(), h("div", {
|
|
324
244
|
id: s.id,
|
|
325
|
-
key:
|
|
245
|
+
key: r.text,
|
|
326
246
|
hidden: !s.open
|
|
327
247
|
}, [
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
(
|
|
331
|
-
key:
|
|
248
|
+
r.subLinks ? (o(), h("div", Me, [
|
|
249
|
+
a("ul", Se, [
|
|
250
|
+
(o(!0), h(y, null, A(r.subLinks, (k) => (o(), h("li", {
|
|
251
|
+
key: k.text,
|
|
332
252
|
class: "sub-nav-link is-flex is-align-center",
|
|
333
253
|
style: { width: "150px" }
|
|
334
254
|
}, [
|
|
335
|
-
|
|
336
|
-
href:
|
|
255
|
+
a("a", {
|
|
256
|
+
href: k.href,
|
|
337
257
|
class: "has-text-link has-text-weight-medium",
|
|
338
258
|
tabindex: "0"
|
|
339
|
-
},
|
|
259
|
+
}, _(k.text), 9, Te)
|
|
340
260
|
]))), 128))
|
|
341
261
|
])
|
|
342
|
-
])) : (
|
|
343
|
-
], 8,
|
|
262
|
+
])) : (o(), c(C(r.subNav), { key: 1 }))
|
|
263
|
+
], 8, ze))
|
|
344
264
|
]),
|
|
345
265
|
_: 2
|
|
346
|
-
}, 1032, ["id", "group"])) : (
|
|
266
|
+
}, 1032, ["id", "group"])) : (o(), h("div", {
|
|
347
267
|
key: `link-${i}`,
|
|
348
268
|
class: "phila-navbar-link-list-item"
|
|
349
269
|
}, [
|
|
350
|
-
|
|
351
|
-
href:
|
|
270
|
+
a("a", {
|
|
271
|
+
href: r.href,
|
|
352
272
|
class: "phila-navbar-link px-4",
|
|
353
273
|
tabindex: "0"
|
|
354
|
-
},
|
|
274
|
+
}, _(r.text), 9, Ne)
|
|
355
275
|
]))
|
|
356
276
|
], 64))), 256));
|
|
357
277
|
}
|
|
358
|
-
}),
|
|
278
|
+
}), Ie = /* @__PURE__ */ x({
|
|
359
279
|
__name: "NavbarBrandLogo",
|
|
360
280
|
props: {
|
|
361
281
|
src: {},
|
|
@@ -363,23 +283,23 @@ const we = {
|
|
|
363
283
|
altText: {}
|
|
364
284
|
},
|
|
365
285
|
setup(e) {
|
|
366
|
-
const
|
|
367
|
-
return (
|
|
368
|
-
href:
|
|
286
|
+
const l = e;
|
|
287
|
+
return (d, n) => (o(), c(t(R), {
|
|
288
|
+
href: l.href,
|
|
369
289
|
variant: "city",
|
|
370
290
|
layout: "stacked",
|
|
371
291
|
"color-scheme": "on-primary",
|
|
372
292
|
class: "phila-navbar-logo"
|
|
373
293
|
}, null, 8, ["href"]));
|
|
374
294
|
}
|
|
375
|
-
}),
|
|
295
|
+
}), Ue = /* @__PURE__ */ B(Ie, [["__scopeId", "data-v-7dabdf6b"]]), Ge = { class: "pr-4" }, He = ["aria-controls", "aria-expanded", "aria-label", "onClick"], Oe = { class: "icon" }, je = ["id", "hidden"], De = /* @__PURE__ */ x({
|
|
376
296
|
__name: "NavbarSearch",
|
|
377
297
|
props: {
|
|
378
298
|
search: {},
|
|
379
299
|
collapseGroup: {}
|
|
380
300
|
},
|
|
381
301
|
setup(e) {
|
|
382
|
-
return (
|
|
302
|
+
return (l, d) => (o(), c(t($), {
|
|
383
303
|
id: "navbar-search",
|
|
384
304
|
group: e.collapseGroup,
|
|
385
305
|
"outside-click-close": "",
|
|
@@ -387,50 +307,41 @@ const we = {
|
|
|
387
307
|
"blur-close": "",
|
|
388
308
|
"open-single": ""
|
|
389
309
|
}, {
|
|
390
|
-
toggle:
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
class:
|
|
394
|
-
"aria-controls":
|
|
395
|
-
"aria-expanded":
|
|
396
|
-
"aria-label": `${
|
|
397
|
-
onClick:
|
|
310
|
+
toggle: b((n) => [
|
|
311
|
+
a("div", Ge, [
|
|
312
|
+
a("button", {
|
|
313
|
+
class: w(["phila-button phila-button--primary icon-button is-small", { "phila-navbar-item-flyout-active": n.open }]),
|
|
314
|
+
"aria-controls": n.ariaControls,
|
|
315
|
+
"aria-expanded": n.open,
|
|
316
|
+
"aria-label": `${n.open ? "Close" : "Open"} search panel`,
|
|
317
|
+
onClick: n.onClick
|
|
398
318
|
}, [
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
icon:
|
|
319
|
+
a("span", Oe, [
|
|
320
|
+
v(t(p), {
|
|
321
|
+
icon: n.open ? t(S) : t(W)
|
|
402
322
|
}, null, 8, ["icon"])
|
|
403
323
|
])
|
|
404
|
-
], 10,
|
|
324
|
+
], 10, He)
|
|
405
325
|
])
|
|
406
326
|
]),
|
|
407
|
-
default:
|
|
408
|
-
|
|
409
|
-
id:
|
|
327
|
+
default: b((n) => [
|
|
328
|
+
a("div", {
|
|
329
|
+
id: n.id,
|
|
410
330
|
class: "nav-flyout is-12",
|
|
411
|
-
hidden: !
|
|
331
|
+
hidden: !n.open
|
|
412
332
|
}, [
|
|
413
|
-
|
|
414
|
-
e.search &&
|
|
333
|
+
m(l.$slots, "default", {}, () => [
|
|
334
|
+
e.search && n.open ? (o(), c(C(e.search), { key: 0 })) : f("", !0)
|
|
415
335
|
])
|
|
416
|
-
], 8,
|
|
336
|
+
], 8, je)
|
|
417
337
|
]),
|
|
418
338
|
_: 3
|
|
419
339
|
}, 8, ["group"]));
|
|
420
340
|
}
|
|
421
|
-
})
|
|
422
|
-
function da(e, o) {
|
|
423
|
-
let l;
|
|
424
|
-
return (...a) => {
|
|
425
|
-
l !== void 0 && window.clearTimeout(l), l = window.setTimeout(() => {
|
|
426
|
-
e(...a);
|
|
427
|
-
}, o);
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
const ua = { class: "phila-navbar-brand" }, va = { class: "phila-navbar-item phila-navbar-brand-link hidden-tablet" }, fa = {
|
|
341
|
+
}), Ve = { class: "phila-navbar-brand" }, Qe = { class: "phila-navbar-item phila-navbar-brand-link hidden-tablet" }, Ke = {
|
|
431
342
|
key: 0,
|
|
432
343
|
class: "content"
|
|
433
|
-
},
|
|
344
|
+
}, Fe = ["href"], Re = { class: "phila-navbar-item phila-navbar-list is-flex is-align-center is-justify-space-between content has-text-label-default hidden-tablet" }, qe = { class: "phila-navbar-search" }, L = "5rem", We = /* @__PURE__ */ x({
|
|
434
345
|
__name: "index",
|
|
435
346
|
props: {
|
|
436
347
|
id: {},
|
|
@@ -442,65 +353,65 @@ const ua = { class: "phila-navbar-brand" }, va = { class: "phila-navbar-item phi
|
|
|
442
353
|
links: { default: () => [{ text: "Home", href: "#" }] }
|
|
443
354
|
},
|
|
444
355
|
setup(e) {
|
|
445
|
-
const
|
|
446
|
-
const s = (
|
|
447
|
-
u.value = !
|
|
356
|
+
const l = e, { state: d } = z(), n = H("navBarElement"), u = N(L), r = N(0), i = F(() => {
|
|
357
|
+
const s = (n.value?.offsetTop || 0) + (n.value?.offsetHeight || 0), k = typeof window < "u" ? window.innerWidth : 1024;
|
|
358
|
+
u.value = !l.sticky || k < 1024 ? s + "px" : L, r.value = s;
|
|
448
359
|
}, 100);
|
|
449
|
-
return
|
|
360
|
+
return O(() => d.value, i, { deep: !0, immediate: !0 }), j(() => {
|
|
450
361
|
window.addEventListener("resize", i);
|
|
451
|
-
}),
|
|
362
|
+
}), D(() => {
|
|
452
363
|
window.removeEventListener("resize", i);
|
|
453
|
-
}), (s,
|
|
364
|
+
}), (s, k) => (o(), h("nav", {
|
|
454
365
|
ref_key: "navBarElement",
|
|
455
|
-
ref:
|
|
456
|
-
class:
|
|
366
|
+
ref: n,
|
|
367
|
+
class: w(["phila-navbar has-background-primary", { "is-sticky-desktop": e.sticky }]),
|
|
457
368
|
"aria-label": "Main navigation",
|
|
458
|
-
style:
|
|
369
|
+
style: V(`--nav-height:${u.value};--nav-bottom:${r.value}px`)
|
|
459
370
|
}, [
|
|
460
|
-
|
|
461
|
-
e.mobileNav ? (
|
|
371
|
+
m(s.$slots, "navbar-burger", {}, () => [
|
|
372
|
+
e.mobileNav ? (o(), c(Ae, {
|
|
462
373
|
key: 0,
|
|
463
374
|
"mobile-nav": e.mobileNav,
|
|
464
375
|
"collapse-group": e.id
|
|
465
|
-
}, null, 8, ["mobile-nav", "collapse-group"])) :
|
|
376
|
+
}, null, 8, ["mobile-nav", "collapse-group"])) : f("", !0)
|
|
466
377
|
], !0),
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
e.navbarBrand?.brandingImage ? (
|
|
378
|
+
a("div", Ve, [
|
|
379
|
+
m(s.$slots, "navbar-logo", {}, () => [
|
|
380
|
+
e.navbarBrand?.brandingImage ? (o(), c(Ue, Q(K({ key: 0 }, e.navbarBrand.brandingImage)), null, 16)) : f("", !0)
|
|
470
381
|
], !0),
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
e.navbarBrand?.brandingLink ? (
|
|
474
|
-
|
|
382
|
+
a("div", Qe, [
|
|
383
|
+
m(s.$slots, "navbar-brand-link", {}, () => [
|
|
384
|
+
e.navbarBrand?.brandingLink ? (o(), h("div", Ke, [
|
|
385
|
+
a("a", {
|
|
475
386
|
tabindex: "0",
|
|
476
387
|
href: e.navbarBrand.brandingLink.href,
|
|
477
388
|
class: "has-text-underline"
|
|
478
|
-
},
|
|
479
|
-
])) :
|
|
389
|
+
}, _(e.navbarBrand.brandingLink.text), 9, Fe)
|
|
390
|
+
])) : f("", !0)
|
|
480
391
|
], !0)
|
|
481
392
|
])
|
|
482
393
|
]),
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
e.links ? (
|
|
394
|
+
a("div", Re, [
|
|
395
|
+
m(s.$slots, "navbar-links", {}, () => [
|
|
396
|
+
e.links ? (o(), c(Ee, {
|
|
486
397
|
key: 0,
|
|
487
398
|
links: e.links,
|
|
488
399
|
"collapse-group": e.id
|
|
489
|
-
}, null, 8, ["links", "collapse-group"])) :
|
|
400
|
+
}, null, 8, ["links", "collapse-group"])) : f("", !0)
|
|
490
401
|
], !0)
|
|
491
402
|
]),
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
e.search ? (
|
|
403
|
+
a("div", qe, [
|
|
404
|
+
m(s.$slots, "navbar-search", {}, () => [
|
|
405
|
+
e.search ? (o(), c(De, {
|
|
495
406
|
key: 0,
|
|
496
407
|
search: e.search,
|
|
497
408
|
"collapse-group": e.id
|
|
498
|
-
}, null, 8, ["search", "collapse-group"])) :
|
|
409
|
+
}, null, 8, ["search", "collapse-group"])) : f("", !0)
|
|
499
410
|
], !0)
|
|
500
411
|
])
|
|
501
412
|
], 6));
|
|
502
413
|
}
|
|
503
|
-
}),
|
|
414
|
+
}), Xe = /* @__PURE__ */ B(We, [["__scopeId", "data-v-26fd958d"]]), aa = /* @__PURE__ */ x({
|
|
504
415
|
__name: "AppHeader",
|
|
505
416
|
props: {
|
|
506
417
|
showTrustedSite: { type: Boolean, default: !0 },
|
|
@@ -515,16 +426,16 @@ const ua = { class: "phila-navbar-brand" }, va = { class: "phila-navbar-item phi
|
|
|
515
426
|
links: { default: void 0 }
|
|
516
427
|
},
|
|
517
428
|
setup(e) {
|
|
518
|
-
return (
|
|
519
|
-
e.showTrustedSite ? (
|
|
520
|
-
translation:
|
|
521
|
-
|
|
522
|
-
e.translations ? (
|
|
429
|
+
return (l, d) => (o(), h(y, null, [
|
|
430
|
+
e.showTrustedSite ? (o(), c(Ce, { key: 0 }, {
|
|
431
|
+
translation: b(() => [
|
|
432
|
+
m(l.$slots, "translations", {}, () => [
|
|
433
|
+
e.translations ? (o(), c(C(e.translations), { key: 0 })) : f("", !0)
|
|
523
434
|
])
|
|
524
435
|
]),
|
|
525
436
|
_: 3
|
|
526
|
-
})) :
|
|
527
|
-
|
|
437
|
+
})) : f("", !0),
|
|
438
|
+
v(Xe, {
|
|
528
439
|
id: e.id,
|
|
529
440
|
sticky: e.sticky,
|
|
530
441
|
"mobile-nav": e.mobileNav,
|
|
@@ -536,5 +447,5 @@ const ua = { class: "phila-navbar-brand" }, va = { class: "phila-navbar-item phi
|
|
|
536
447
|
}
|
|
537
448
|
});
|
|
538
449
|
export {
|
|
539
|
-
|
|
450
|
+
aa as AppHeader
|
|
540
451
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phila/phila-ui-app-header",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A header component for site info and main navigation.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"vue": "^3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@phila/phila-ui-core": "2.3.
|
|
33
|
-
"@phila/phila-ui-collapse-panel": "0.0.
|
|
34
|
-
"@phila/phila-ui-logo": "0.1.
|
|
32
|
+
"@phila/phila-ui-core": "2.3.1",
|
|
33
|
+
"@phila/phila-ui-collapse-panel": "0.0.3",
|
|
34
|
+
"@phila/phila-ui-logo": "0.1.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^24.0.0",
|