@hotosm/ui 2.0.0 → 2.1.0
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/README.md +1 -1
- package/dist/chunks/{chunk.BWW4EBSJ.js → chunk.7X5TBZPD.js} +1 -1
- package/dist/chunks/{chunk.6HIYAU2K.js → chunk.D2QPKXC3.js} +1 -1
- package/dist/chunks/{chunk.3LDGLQFF.js → chunk.DY7CT6FN.js} +5 -5
- package/dist/chunks/{chunk.N2MY7EL5.js → chunk.G7OBK7EE.js} +1 -1
- package/dist/chunks/{chunk.DMESFENF.js → chunk.HPW4YC7W.js} +1 -1
- package/dist/chunks/{chunk.IV3UXIV2.js → chunk.HY6LFZQK.js} +1 -1
- package/dist/chunks/{chunk.HQKELQDW.js → chunk.JCAWUWEO.js} +4 -4
- package/dist/chunks/{chunk.WQFUUQZA.js → chunk.R7BKNF25.js} +1 -1
- package/dist/chunks/{chunk.54C4CCIE.js → chunk.RPCVLKA4.js} +5 -5
- package/dist/components/announcement/announcement.component.js +1 -1
- package/dist/components/announcement/announcement.js +1 -1
- package/dist/components/consent/consent.component.js +1 -1
- package/dist/components/consent/consent.js +1 -1
- package/dist/components/file-input-dropzone/file-input-dropzone.component.js +1 -1
- package/dist/components/file-input-dropzone/file-input-dropzone.js +1 -1
- package/dist/components/header/header.component.d.ts +3 -1
- package/dist/components/header/header.component.js +1 -1
- package/dist/components/header/header.js +1 -1
- package/dist/components/header/header.styles.d.ts +3 -2
- package/dist/components/header/header.styles.js +1 -1
- package/dist/components/tracking/tracking.component.js +1 -1
- package/dist/components/tracking/tracking.js +1 -1
- package/dist/hotosm-ui.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -214,7 +214,7 @@ element registrations and most `wa-*` elements never register.
|
|
|
214
214
|
</head>
|
|
215
215
|
|
|
216
216
|
<body>
|
|
217
|
-
<hot-header id="hdr" title="My App" size="
|
|
217
|
+
<hot-header id="hdr" title="My App" size="s" show-login></hot-header>
|
|
218
218
|
|
|
219
219
|
<script>
|
|
220
220
|
// Boolean props default to false.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as u}from"./chunk.HOF672RD.js";import{a as h,c as v}from"./chunk.N2W26RCT.js";function f(a){var r,e,t="";if(typeof a=="string"||typeof a=="number")t+=a;else if(typeof a=="object")if(Array.isArray(a)){var i=a.length;for(r=0;r<i;r++)a[r]&&(e=f(a[r]))&&(t&&(t+=" "),t+=e)}else for(e in a)a[e]&&(t&&(t+=" "),t+=e);return t}function x(){for(var a,r,e=0,t="",i=arguments.length;e<i;e++)(a=arguments[e])&&(r=f(a))&&(t&&(t+=" "),t+=r);return t}var b=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,w=x,y=(a,r)=>e=>{var t;if((r==null?void 0:r.variants)==null)return w(a,e==null?void 0:e.class,e==null?void 0:e.className);let{variants:i,defaultVariants:d}=r,z=Object.keys(i).map(o=>{let n=e==null?void 0:e[o],s=d==null?void 0:d[o];if(n===null)return null;let l=b(n)||b(s);return i[o][l]}),g=e&&Object.entries(e).reduce((o,n)=>{let[s,l]=n;return l===void 0||(o[s]=l),o},{}),k=r==null||(t=r.compoundVariants)===null||t===void 0?void 0:t.reduce((o,n)=>{let c=n,{class:s,className:l}=c,j=v(c,["class","className"]);return Object.entries(j).every(V=>{let[p,m]=V;return Array.isArray(m)?m.includes(h(h({},d),g)[p]):h(h({},d),g)[p]===m})?[...o,s,l]:o},[]);return w(a,z,k,e==null?void 0:e.class,e==null?void 0:e.className)};var T=y("header",{variants:{size:{s:"header--size-small",m:"header--size-medium",l:"header--size-large"}}}),U=u`
|
|
2
2
|
/* ================================================================
|
|
3
3
|
* Layout
|
|
4
4
|
* ================================================================ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./chunk.
|
|
1
|
+
import{b as t}from"./chunk.RPCVLKA4.js";var a=t;customElements.get("hot-tracking")||customElements.define("hot-tracking",t);export{a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as l}from"./chunk.KO4EOD3I.js";import{a as d}from"./chunk.VSRVTIBV.js";import{a as o}from"./chunk.DVVFVLNQ.js";import{d as r,g as c}from"./chunk.HOF672RD.js";import{d as s,e as a,f as n,g as i}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/callout/callout.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/button/button.js")]);l();var u,g,p,b,h,m,e=class extends c{constructor(){super(...arguments);this.name="hot-consent";n(this,u,"");n(this,g,!1);n(this,p,"About the information we collect");n(this,b,"We use cookies and similar technologies to recognize and analyze your visits, and measure traffic usage and activity.");n(this,h,"I Agree");n(this,m,"I Do Not Agree")}get consentId(){return a(this,u)}set consentId(t){i(this,u,t)}get isOpen(){return a(this,g)}set isOpen(t){i(this,g,t)}get title(){return a(this,p)}set title(t){i(this,p,t)}get message(){return a(this,b)}set message(t){i(this,b,t)}get agreeLabel(){return a(this,h)}set agreeLabel(t){i(this,h,t)}get notAgreeLabel(){return a(this,m)}set notAgreeLabel(t){i(this,m,t)}render(){return this.isOpen?r`
|
|
2
2
|
<div class="consent-overlay">
|
|
3
3
|
<div class="consent-container">
|
|
4
|
-
<wa-callout variant="brand" appearance="outlined filled" size="
|
|
4
|
+
<wa-callout variant="brand" appearance="outlined filled" size="l" class="consent-callout">
|
|
5
5
|
<wa-icon slot="icon" family="classic" variant="solid" name="shield-check" class="consent-icon"></wa-icon>
|
|
6
6
|
<div class="consent-content">
|
|
7
7
|
<h2 id="consent-header" class="consent-header">
|
|
@@ -13,7 +13,7 @@ import{a as d}from"./chunk.VSRVTIBV.js";import{a as l}from"./chunk.KO4EOD3I.js";
|
|
|
13
13
|
</div>
|
|
14
14
|
<div class="consent-actions">
|
|
15
15
|
<wa-button
|
|
16
|
-
size="
|
|
16
|
+
size="m"
|
|
17
17
|
variant="neutral"
|
|
18
18
|
class="consent-button decline-button"
|
|
19
19
|
@click=${t=>this._setDisagree(t)}
|
|
@@ -21,7 +21,7 @@ import{a as d}from"./chunk.VSRVTIBV.js";import{a as l}from"./chunk.KO4EOD3I.js";
|
|
|
21
21
|
${this.notAgreeLabel}
|
|
22
22
|
</wa-button>
|
|
23
23
|
<wa-button
|
|
24
|
-
size="
|
|
24
|
+
size="m"
|
|
25
25
|
variant="brand"
|
|
26
26
|
class="consent-button accept-button"
|
|
27
27
|
@click=${t=>this._setAgree(t)}
|
|
@@ -33,4 +33,4 @@ import{a as d}from"./chunk.VSRVTIBV.js";import{a as l}from"./chunk.KO4EOD3I.js";
|
|
|
33
33
|
</wa-callout>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
|
-
`:null}_setAgree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"true"),this.dispatchEvent(new Event("agree",{bubbles:!0,composed:!0}))}_setDisagree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"false"),this.dispatchEvent(new Event("disagree",{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback();let t=localStorage.getItem(`${this.consentId}-consent-agree`);if(t==="false"){this.isOpen=!1;return}t==="true"&&(this.isOpen=!1)}};u=new WeakMap,g=new WeakMap,p=new WeakMap,b=new WeakMap,
|
|
36
|
+
`:null}_setAgree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"true"),this.dispatchEvent(new Event("agree",{bubbles:!0,composed:!0}))}_setDisagree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"false"),this.dispatchEvent(new Event("disagree",{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback();let t=localStorage.getItem(`${this.consentId}-consent-agree`);if(t==="false"){this.isOpen=!1;return}t==="true"&&(this.isOpen=!1)}};u=new WeakMap,g=new WeakMap,p=new WeakMap,b=new WeakMap,h=new WeakMap,m=new WeakMap,e.styles=[d],s([o({type:String,attribute:"consent-id"})],e.prototype,"consentId",1),s([o({type:Boolean,attribute:"is-open"})],e.prototype,"isOpen",1),s([o({type:String})],e.prototype,"title",1),s([o({type:String})],e.prototype,"message",1),s([o({type:String,attribute:"agree-label"})],e.prototype,"agreeLabel",1),s([o({type:String,attribute:"not-agree-label"})],e.prototype,"notAgreeLabel",1);var E=e;export{e as a,E as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk.
|
|
1
|
+
import{b as e}from"./chunk.JCAWUWEO.js";var a=e;customElements.get("hot-header")||customElements.define("hot-header",e);export{a};
|
|
@@ -2,7 +2,7 @@ import{a as l,b as g}from"./chunk.DVVFVLNQ.js";import{a as f,d as u,g as v}from"
|
|
|
2
2
|
>${c!=null?c:b}</a
|
|
3
3
|
>`),i=n.index+d.length}return t.length===0?this.message:(t.push(this.message.slice(i)),t)}render(){return this.visible?u`
|
|
4
4
|
<div class="announcement-banner" role="status">
|
|
5
|
-
<wa-callout variant="${this.variant}" appearance="outlined filled" size="
|
|
5
|
+
<wa-callout variant="${this.variant}" appearance="outlined filled" size="m">
|
|
6
6
|
<wa-icon slot="icon" family="classic" variant="solid" name="circle-info"></wa-icon>
|
|
7
7
|
<div class="announcement-content">
|
|
8
8
|
<div class="announcement-body">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk.
|
|
1
|
+
import{b as e}from"./chunk.HPW4YC7W.js";var t=e;customElements.get("hot-announcement")||customElements.define("hot-announcement",e);export{t as a};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as f,b as m}from"./chunk.
|
|
1
|
+
import{a as f,b as m}from"./chunk.7X5TBZPD.js";import{a as k}from"./chunk.KO4EOD3I.js";import{a as d}from"./chunk.DVVFVLNQ.js";import{d as r,f as w,g as y}from"./chunk.HOF672RD.js";import{d as o,e as l,f as c,g as h}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/tab-group/tab-group.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/drawer/drawer.js"),import("@awesome.me/webawesome/dist/components/dropdown/dropdown.js"),import("@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js")]);k();var T,$,L,S,E,I,_,C,x,A,M,P,a=class a extends y{constructor(){super(...arguments);this.name="hot-header";c(this,T,"");c(this,$,"Mapping our world together");c(this,L,"Humanitarian OpenStreetMap Team Website");c(this,S,"https://www.hotosm.org");c(this,E,"");c(this,I,!1);c(this,_,[]);c(this,C,[]);c(this,x,"s");c(this,A,!1);c(this,M,0);c(this,P,0);this._boundLocationSync=null;this._desktopQuery=null;this._boundDesktopChange=null;this._syncedTabIndex=0}get title(){return l(this,T)}set title(t){h(this,T,t)}get topTagline(){return l(this,$)}set topTagline(t){h(this,$,t)}get topLinkLabel(){return l(this,L)}set topLinkLabel(t){h(this,L,t)}get topLinkHref(){return l(this,S)}set topLinkHref(t){h(this,S,t)}get logo(){return l(this,E)}set logo(t){h(this,E,t)}get drawer(){return l(this,I)}set drawer(t){h(this,I,t)}get tabs(){return l(this,_)}set tabs(t){h(this,_,t)}get drawerLinks(){return l(this,C)}set drawerLinks(t){h(this,C,t)}get size(){return l(this,x)}set size(t){h(this,x,t)}get sizeShort(){var e;return(e={small:"s",medium:"m",large:"l"}[this.size])!=null?e:this.size}get tabsCenterAlign(){return l(this,A)}set tabsCenterAlign(t){h(this,A,t)}get selectedTab(){return l(this,M)}set selectedTab(t){h(this,M,t)}get activeTabIndex(){return l(this,P)}set activeTabIndex(t){h(this,P,t)}async connectedCallback(){super.connectedCallback(),this._boundLocationSync=()=>this.syncActiveTab(),window.addEventListener("popstate",this._boundLocationSync),window.addEventListener("hot-locationchange",this._boundLocationSync),window.addEventListener("htmx:pushedIntoHistory",this._boundLocationSync),typeof window.matchMedia=="function"&&(this._desktopQuery=window.matchMedia("(min-width: 769px)"),this._boundDesktopChange=t=>{t.matches&&this._closeDrawer()},this._desktopQuery.addEventListener("change",this._boundDesktopChange))}disconnectedCallback(){super.disconnectedCallback(),this._boundLocationSync&&(window.removeEventListener("popstate",this._boundLocationSync),window.removeEventListener("hot-locationchange",this._boundLocationSync),window.removeEventListener("htmx:pushedIntoHistory",this._boundLocationSync),this._boundLocationSync=null),this._desktopQuery&&this._boundDesktopChange&&(this._desktopQuery.removeEventListener("change",this._boundDesktopChange),this._desktopQuery=null,this._boundDesktopChange=null)}firstUpdated(t){this.syncActiveTab()}willUpdate(t){let e=this._syncedTabIndex;this.activeTabIndex!==this._syncedTabIndex?e=this.activeTabIndex:this.selectedTab!==this._syncedTabIndex&&(e=this.selectedTab),(e!==this._syncedTabIndex||this.activeTabIndex!==e||this.selectedTab!==e)&&(this._syncedTabIndex=e,this.activeTabIndex=e,this.selectedTab=e)}updated(t){super.updated(t),t.has("tabs")&&this.syncActiveTab()}selectTab(t){if(t!==this.selectedTab&&t>=0&&t<this.tabs.length){let e=this.selectedTab;this.selectedTab=t,this.activeTabIndex=t,this.dispatchEvent(new CustomEvent("tab-change",{detail:{selectedIndex:t,previousIndex:e,tab:this.tabs[t]},bubbles:!0})),this.requestUpdate()}}syncActiveTab(){var i;if(typeof window=="undefined"||!((i=this.tabs)!=null&&i.length))return;let t=a._normalisePath(window.location.pathname),e=-1,s=-1,n=!1;this.tabs.forEach((p,v)=>{if(p!=null&&p.href)try{let b=new URL(p.href,window.location.origin);if(b.origin!==window.location.origin)return;let u=a._normalisePath(b.pathname);n=!0,t===u?(e=v,s=Number.MAX_SAFE_INTEGER):s<Number.MAX_SAFE_INTEGER&&u!=="/"&&t.startsWith(`${u}/`)&&u.length>s&&(e=v,s=u.length)}catch(b){}}),n&&(a._patchHistory(),e!==this.activeTabIndex&&(this.selectedTab=e,this.activeTabIndex=e,this.requestUpdate()))}get _activePanel(){let t=this.tabs[this.activeTabIndex];return t?`${t.label}-${this.activeTabIndex}`:a._noActivePanel}static _normalisePath(t){return t.replace(/\/+$/,"")||"/"}static _patchHistory(){if(a._historyPatched||typeof window=="undefined")return;a._historyPatched=!0;let t=history.pushState.bind(history),e=history.replaceState.bind(history);history.pushState=function(s,n,i){t(s,n,i),window.dispatchEvent(new Event("hot-locationchange"))},history.replaceState=function(s,n,i){e(s,n,i),window.dispatchEvent(new Event("hot-locationchange"))}}render(){let t=typeof this.logo=="string"||this.logo instanceof URL?typeof this.logo=="string"?this.logo:this.logo.href:"";return r`
|
|
2
2
|
<div class="header-container">
|
|
3
|
-
${this.
|
|
3
|
+
${this.sizeShort!=="s"?r`
|
|
4
4
|
<div class="header--top">
|
|
5
5
|
<div class="header--top-left">
|
|
6
6
|
${this.topTagline?r`
|
|
@@ -27,7 +27,7 @@ import{a as f,b as m}from"./chunk.BWW4EBSJ.js";import{a as k}from"./chunk.KO4EOD
|
|
|
27
27
|
`:null}
|
|
28
28
|
|
|
29
29
|
<header
|
|
30
|
-
class=${f({size:this.
|
|
30
|
+
class=${f({size:this.sizeShort})}
|
|
31
31
|
>
|
|
32
32
|
<a href="/" class="header--link">
|
|
33
33
|
${t.length>0?r`
|
|
@@ -141,4 +141,4 @@ import{a as f,b as m}from"./chunk.BWW4EBSJ.js";import{a as k}from"./chunk.KO4EOD
|
|
|
141
141
|
|
|
142
142
|
</header>
|
|
143
143
|
</div>
|
|
144
|
-
`}async _tabClick(t,e,s){t.preventDefault(),t.stopPropagation();try{this.selectTab(s),this._closeDrawer(),setTimeout(async()=>{try{typeof e=="function"&&await e()}catch(n){console.error("Error during navigation:",n)}},0)}catch(n){console.error("Error handling tab click:",n);try{typeof e=="function"&&e()}catch(i){console.error("Fallback navigation also failed:",i)}}}_handleTabShow(t){var e,s,n,i;try{let p=(e=t.detail)==null?void 0:e.name;if(!p)return;let b=Array.from((n=(s=this.renderRoot)==null?void 0:s.querySelectorAll("wa-tab"))!=null?n:[]).find(D=>D.getAttribute("panel")===p);if(!b)return;let u=parseInt((i=b.getAttribute("data-index"))!=null?i:"",10);!isNaN(u)&&u>=0&&u<this.tabs.length&&this.selectTab(u)}catch(p){console.error("Error handling tab show event:",p)}}get _showDrawer(){return this.drawer||this.tabs.length>0}_closeDrawer(){var e;let t=(e=this.renderRoot)==null?void 0:e.querySelector("#drawer-overview");t!=null&&t.open&&(t.open=!1)}_handleDrawerOpen(){var e;let t=(e=this.renderRoot)==null?void 0:e.querySelector("#drawer-overview");t&&(t.open=!0)}};T=new WeakMap,$=new WeakMap,L=new WeakMap,
|
|
144
|
+
`}async _tabClick(t,e,s){t.preventDefault(),t.stopPropagation();try{this.selectTab(s),this._closeDrawer(),setTimeout(async()=>{try{typeof e=="function"&&await e()}catch(n){console.error("Error during navigation:",n)}},0)}catch(n){console.error("Error handling tab click:",n);try{typeof e=="function"&&e()}catch(i){console.error("Fallback navigation also failed:",i)}}}_handleTabShow(t){var e,s,n,i;try{let p=(e=t.detail)==null?void 0:e.name;if(!p)return;let b=Array.from((n=(s=this.renderRoot)==null?void 0:s.querySelectorAll("wa-tab"))!=null?n:[]).find(D=>D.getAttribute("panel")===p);if(!b)return;let u=parseInt((i=b.getAttribute("data-index"))!=null?i:"",10);!isNaN(u)&&u>=0&&u<this.tabs.length&&this.selectTab(u)}catch(p){console.error("Error handling tab show event:",p)}}get _showDrawer(){return this.drawer||this.tabs.length>0}_closeDrawer(){var e;let t=(e=this.renderRoot)==null?void 0:e.querySelector("#drawer-overview");t!=null&&t.open&&(t.open=!1)}_handleDrawerOpen(){var e;let t=(e=this.renderRoot)==null?void 0:e.querySelector("#drawer-overview");t&&(t.open=!0)}};T=new WeakMap,$=new WeakMap,L=new WeakMap,S=new WeakMap,E=new WeakMap,I=new WeakMap,_=new WeakMap,C=new WeakMap,x=new WeakMap,A=new WeakMap,M=new WeakMap,P=new WeakMap,a.styles=[m],a._noActivePanel="hot-header-no-active-tab",a._historyPatched=!1,o([d({type:String})],a.prototype,"title",1),o([d({type:String,attribute:"top-tagline"})],a.prototype,"topTagline",1),o([d({type:String,attribute:"top-link-label"})],a.prototype,"topLinkLabel",1),o([d({type:String,attribute:"top-link-href"})],a.prototype,"topLinkHref",1),o([d({type:String})],a.prototype,"logo",1),o([d({type:Boolean})],a.prototype,"drawer",1),o([d({type:Array})],a.prototype,"tabs",1),o([d({type:Array})],a.prototype,"drawerLinks",1),o([d({type:String})],a.prototype,"size",1),o([d({type:Boolean,attribute:"tabs-center-align"})],a.prototype,"tabsCenterAlign",1),o([d({type:Number})],a.prototype,"selectedTab",1),o([d({type:Number})],a.prototype,"activeTabIndex",1);var g=a,V=g;export{g as a,V as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk.
|
|
1
|
+
import{b as e}from"./chunk.DY7CT6FN.js";var n=e;customElements.get("hot-consent")||customElements.define("hot-consent",e);export{n as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import{a as l,b as r}from"./chunk.DVVFVLNQ.js";import{a as g,d as h,g as b}from"./chunk.HOF672RD.js";import{d as t,e as s,f as n,g as i}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/callout/callout.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/button/button.js"),import("@awesome.me/webawesome/dist/components/dialog/dialog.js")]);var m,w,v,f,x,a=class extends b{constructor(){super(...arguments);this.name="hot-tracking";n(this,m,"");n(this,w,"");n(this,v,"https://matomo.hotosm.org");n(this,f,!0);n(this,x,"We use cookies and similar technologies to help personalize content, tailor and measure ads, and provide a better experience. By clicking 'Accept', you consent to our use of cookies and tracking technologies.");this.consentGiven=!1;this.consentShown=!1;this.errorMessage="";this.showError=!1;this.successMessage="";this.showSuccess=!1;this.infoMessage="";this.showInfo=!1}get siteId(){return s(this,m)}set siteId(e){i(this,m,e)}get domain(){return s(this,w)}set domain(e){i(this,w,e)}get matomoURL(){return s(this,v)}set matomoURL(e){i(this,v,e)}get showConsent(){return s(this,f)}set showConsent(e){i(this,f,e)}get consentMessage(){return s(this,x)}set consentMessage(e){i(this,x,e)}get consentKey(){return`hot-matomo-consent-${this.siteId}`}getStoredConsent(){let e=localStorage.getItem(this.consentKey);return e===null?null:e==="true"}setStoredConsent(e){localStorage.setItem(this.consentKey,String(e))}agree(){this.consentGiven=!0,this.consentShown=!1,this.setStoredConsent(!0);let e=window._paq=window._paq||[];e.push(["rememberConsentGiven"]),e.push(["trackPageView"]),this.showSuccessCallout("Tracking consent granted. Thank you!")}disagree(){this.consentGiven=!1,this.consentShown=!1,this.setStoredConsent(!1),(window._paq=window._paq||[]).push(["forgetConsentGiven"]),this.showInfoCallout("Tracking disabled. You can change this preference later.")}showConsentBanner(){this.showConsent&&!this.consentGiven&&!this.consentShown&&(this.consentShown=!0)}showErrorCallout(e){this.errorMessage=e,this.showError=!0,setTimeout(()=>{this.showError=!1},1e4)}showSuccessCallout(e){this.successMessage=e,this.showSuccess=!0,setTimeout(()=>{this.showSuccess=!1},5e3)}showInfoCallout(e){this.infoMessage=e,this.showInfo=!0,setTimeout(()=>{this.showInfo=!1},5e3)}render(){return h`
|
|
2
2
|
${this.showError?h`
|
|
3
3
|
<div class="error-banner">
|
|
4
|
-
<wa-callout style="padding: 1rem;" variant="danger" appearance="outlined filled" size="
|
|
4
|
+
<wa-callout style="padding: 1rem;" variant="danger" appearance="outlined filled" size="l">
|
|
5
5
|
<wa-icon slot="icon" family="classic" variant="solid" name="circle-exclamation"></wa-icon>
|
|
6
6
|
<div style="padding: 0 1rem;">
|
|
7
7
|
<strong>Tracking Configuration Error</strong><br />
|
|
@@ -13,7 +13,7 @@ import{a as l,b as r}from"./chunk.DVVFVLNQ.js";import{a as g,d as h,g as b}from"
|
|
|
13
13
|
|
|
14
14
|
${this.showSuccess?h`
|
|
15
15
|
<div class="toast-banner">
|
|
16
|
-
<wa-callout style="padding: 1rem;" variant="success" appearance="outlined accent" size="
|
|
16
|
+
<wa-callout style="padding: 1rem;" variant="success" appearance="outlined accent" size="m">
|
|
17
17
|
<wa-icon slot="icon" family="classic" variant="solid" name="circle-check"></wa-icon>
|
|
18
18
|
<div style="padding: 0 1rem;">
|
|
19
19
|
<strong>Success!</strong><br />
|
|
@@ -25,7 +25,7 @@ import{a as l,b as r}from"./chunk.DVVFVLNQ.js";import{a as g,d as h,g as b}from"
|
|
|
25
25
|
|
|
26
26
|
${this.showInfo?h`
|
|
27
27
|
<div class="toast-banner">
|
|
28
|
-
<wa-callout style="padding: 1rem;" variant="brand" appearance="outlined filled" size="
|
|
28
|
+
<wa-callout style="padding: 1rem;" variant="brand" appearance="outlined filled" size="m">
|
|
29
29
|
<wa-icon slot="icon" family="classic" variant="solid" name="circle-info"></wa-icon>
|
|
30
30
|
<div style="padding: 0 1rem;">
|
|
31
31
|
<strong>Information</strong><br />
|
|
@@ -42,10 +42,10 @@ import{a as l,b as r}from"./chunk.DVVFVLNQ.js";import{a as g,d as h,g as b}from"
|
|
|
42
42
|
>
|
|
43
43
|
${this.consentMessage}
|
|
44
44
|
<div slot="footer" class="consent-actions">
|
|
45
|
-
<wa-button size="
|
|
45
|
+
<wa-button size="s" variant="neutral" @click=${()=>this.disagree()}>
|
|
46
46
|
Decline
|
|
47
47
|
</wa-button>
|
|
48
|
-
<wa-button size="
|
|
48
|
+
<wa-button size="s" variant="brand" @click=${()=>this.agree()}>
|
|
49
49
|
Accept
|
|
50
50
|
</wa-button>
|
|
51
51
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.HPW4YC7W.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as Announcement,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.HY6LFZQK.js";import"../../chunks/chunk.HPW4YC7W.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.DY7CT6FN.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.VSRVTIBV.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as Consent,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.R7BKNF25.js";import"../../chunks/chunk.DY7CT6FN.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.VSRVTIBV.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.45EZ2EC2.js";import"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.45EZ2EC2.js";import"../../chunks/chunk.AYSFL7J5.js";import"../../chunks/chunk.347QGSW2.js";import"../../chunks/chunk.B77WIT2F.js";import"../../chunks/chunk.TJOQKPXN.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as FileInputDropzone,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.GP3AB7RO.js";import"../../chunks/chunk.45EZ2EC2.js";import"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.GP3AB7RO.js";import"../../chunks/chunk.45EZ2EC2.js";import"../../chunks/chunk.AYSFL7J5.js";import"../../chunks/chunk.347QGSW2.js";import"../../chunks/chunk.B77WIT2F.js";import"../../chunks/chunk.TJOQKPXN.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
|
|
@@ -30,8 +30,10 @@ export declare class Header extends LitElement {
|
|
|
30
30
|
label: string;
|
|
31
31
|
href: string;
|
|
32
32
|
}>;
|
|
33
|
-
/** Size of toolbar vertically. */
|
|
33
|
+
/** Size of toolbar vertically. Prefer "s" | "m" | "l"; long forms are deprecated. */
|
|
34
34
|
accessor size: sizes;
|
|
35
|
+
/** Both spellings must behave identically, so resolve to the short form once. */
|
|
36
|
+
private get sizeShort();
|
|
35
37
|
/** Centre-align navigation tabs instead of the default left alignment. */
|
|
36
38
|
accessor tabsCenterAlign: boolean;
|
|
37
39
|
/** Index of the selected tab. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.JCAWUWEO.js";import"../../chunks/chunk.7X5TBZPD.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as Header,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.G7OBK7EE.js";import"../../chunks/chunk.JCAWUWEO.js";import"../../chunks/chunk.7X5TBZPD.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const headerVariants: (props?: ({
|
|
2
|
-
size?: "
|
|
2
|
+
size?: "s" | "m" | "l" | null | undefined;
|
|
3
3
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
|
-
|
|
4
|
+
/** Long forms are deprecated, matching Web Awesome; both are accepted. */
|
|
5
|
+
export type sizes = "s" | "m" | "l" | "small" | "medium" | "large";
|
|
5
6
|
export declare const styles: import("lit").CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.7X5TBZPD.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as headerVariants,b as styles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.RPCVLKA4.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as MatomoTracking,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.D2QPKXC3.js";import"../../chunks/chunk.RPCVLKA4.js";import"../../chunks/chunk.DVVFVLNQ.js";import"../../chunks/chunk.HOF672RD.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
|
package/dist/hotosm-ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunks/chunk.TMPPHKMO.js";import"./chunks/chunk.LJ4XIP4K.js";import"./chunks/chunk.LIASDRWH.js";import{a as y}from"./chunks/chunk.GQ4LISAU.js";import"./chunks/chunk.LH3TTPVQ.js";import"./chunks/chunk.IVW6CBE7.js";import{a as u}from"./chunks/chunk.
|
|
1
|
+
import{a as p}from"./chunks/chunk.TMPPHKMO.js";import"./chunks/chunk.LJ4XIP4K.js";import"./chunks/chunk.LIASDRWH.js";import{a as y}from"./chunks/chunk.GQ4LISAU.js";import"./chunks/chunk.LH3TTPVQ.js";import"./chunks/chunk.IVW6CBE7.js";import{a as u}from"./chunks/chunk.D2QPKXC3.js";import"./chunks/chunk.RPCVLKA4.js";import{a as S}from"./chunks/chunk.GP3AB7RO.js";import{a as m}from"./chunks/chunk.G7OBK7EE.js";import"./chunks/chunk.JCAWUWEO.js";import"./chunks/chunk.7X5TBZPD.js";import{a as f}from"./chunks/chunk.HY6LFZQK.js";import"./chunks/chunk.HPW4YC7W.js";import{a as d}from"./chunks/chunk.R7BKNF25.js";import"./chunks/chunk.DY7CT6FN.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.VSRVTIBV.js";import"./chunks/chunk.45EZ2EC2.js";import"./chunks/chunk.AYSFL7J5.js";import{a as h}from"./chunks/chunk.347QGSW2.js";import"./chunks/chunk.B77WIT2F.js";import"./chunks/chunk.TJOQKPXN.js";import"./chunks/chunk.DVVFVLNQ.js";import"./chunks/chunk.HOF672RD.js";import"./chunks/chunk.N2W26RCT.js";function a(t,e=document){let o=[],r=e.querySelectorAll(t);return o.push(...Array.from(r)),e.querySelectorAll("*").forEach(i=>{i.shadowRoot&&o.push(...a(t,i.shadowRoot))}),o}function g(t){let{css:e,selector:o="wa-button",all:r=!0,styleId:s="hot-theme-injection"}=t;(r?a(o):[a(o)[0]].filter(Boolean)).forEach(n=>{if(!n)return;let c=()=>{if(!n.shadowRoot){setTimeout(c,10);return}if(n.shadowRoot.getElementById(s))return;let l=document.createElement("style");l.id=s,l.textContent=e,n.shadowRoot.appendChild(l)};c()})}export{f as Announcement,d as Consent,S as FileInputDropzone,m as Header,h as ListCard,p as Logo,y as ToolMenu,u as Tracking,g as injectCSSIntoShadowDOM};
|