@hotosm/ui 0.9.1 → 0.10.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.
Files changed (27) hide show
  1. package/dist/chunks/{chunk.AA57UJ2D.js → chunk.DNXHV7I7.js} +42 -71
  2. package/dist/chunks/{chunk.N7SRHM5F.js → chunk.G5R5NK6C.js} +1 -1
  3. package/dist/chunks/{chunk.PESN3BZK.js → chunk.IKKWEPSE.js} +1 -1
  4. package/dist/chunks/chunk.IW4CQOKU.js +1 -0
  5. package/dist/chunks/chunk.K3ILHIDX.js +89 -0
  6. package/dist/chunks/{chunk.FZ7HQZU4.js → chunk.L2GREEZE.js} +1 -1
  7. package/dist/chunks/{chunk.XFKYNNG3.js → chunk.LLGJXBVH.js} +9 -3
  8. package/dist/chunks/{chunk.3AWIVJTF.js → chunk.NZMGMJCM.js} +1 -1
  9. package/dist/chunks/{chunk.6WYUOJRX.js → chunk.UB7NXUCE.js} +28 -2
  10. package/dist/chunks/{chunk.ZZ7X3H3S.js → chunk.UFI755NV.js} +1 -1
  11. package/dist/chunks/{chunk.CCOEI6XU.js → chunk.V5BQICX2.js} +1 -1
  12. package/dist/components/announcement/announcement.component.d.ts +32 -0
  13. package/dist/components/announcement/announcement.component.js +1 -0
  14. package/dist/components/announcement/announcement.d.ts +7 -0
  15. package/dist/components/announcement/announcement.js +1 -0
  16. package/dist/components/consent/consent.component.js +1 -1
  17. package/dist/components/consent/consent.js +1 -1
  18. package/dist/components/file-input-dropzone/file-input-dropzone.component.js +1 -1
  19. package/dist/components/file-input-dropzone/file-input-dropzone.js +1 -1
  20. package/dist/components/header/header.component.js +1 -1
  21. package/dist/components/header/header.js +1 -1
  22. package/dist/components/header/header.styles.js +1 -1
  23. package/dist/components/tracking/tracking.component.js +1 -1
  24. package/dist/components/tracking/tracking.js +1 -1
  25. package/dist/hotosm-ui.d.ts +2 -1
  26. package/dist/hotosm-ui.js +1 -1
  27. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import{a as c,b as t}from"./chunk.ZETV7TDG.js";import{a as g,d as l,f as b}from"./chunk.QABMDRWR.js";import{d as a,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")]);var m,v,w,f,x,r=class extends b{constructor(){super(...arguments);this.name="hot-tracking";n(this,m,"");n(this,v,"");n(this,w,"https://matomo.hotosm.org");n(this,f,!1);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,v)}set domain(e){i(this,v,e)}get matomoURL(){return s(this,w)}set matomoURL(e){i(this,w,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 l`
2
- ${this.showError?l`
1
+ import{a as l,b as r}from"./chunk.ZETV7TDG.js";import{a as g,d as h,f as b}from"./chunk.QABMDRWR.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
+ ${this.showError?h`
3
3
  <div class="error-banner">
4
4
  <wa-callout style="padding: 1rem;" variant="danger" appearance="outlined filled" size="large">
5
5
  <wa-icon slot="icon" family="classic" variant="solid" name="circle-exclamation"></wa-icon>
@@ -11,7 +11,7 @@ import{a as c,b as t}from"./chunk.ZETV7TDG.js";import{a as g,d as l,f as b}from"
11
11
  </div>
12
12
  `:""}
13
13
 
14
- ${this.showSuccess?l`
14
+ ${this.showSuccess?h`
15
15
  <div class="toast-banner">
16
16
  <wa-callout style="padding: 1rem;" variant="success" appearance="outlined accent" size="medium">
17
17
  <wa-icon slot="icon" family="classic" variant="solid" name="circle-check"></wa-icon>
@@ -23,7 +23,7 @@ import{a as c,b as t}from"./chunk.ZETV7TDG.js";import{a as g,d as l,f as b}from"
23
23
  </div>
24
24
  `:""}
25
25
 
26
- ${this.showInfo?l`
26
+ ${this.showInfo?h`
27
27
  <div class="toast-banner">
28
28
  <wa-callout style="padding: 1rem;" variant="brand" appearance="outlined filled" size="medium">
29
29
  <wa-icon slot="icon" family="classic" variant="solid" name="circle-info"></wa-icon>
@@ -35,41 +35,50 @@ import{a as c,b as t}from"./chunk.ZETV7TDG.js";import{a as g,d as l,f as b}from"
35
35
  </div>
36
36
  `:""}
37
37
 
38
- ${this.consentShown?l`
39
- <div class="consent-banner">
40
- <wa-callout variant="brand" appearance="outlined filled" size="large">
41
- <wa-icon slot="icon" family="classic" variant="solid" name="shield-check"></wa-icon>
42
- <div style="padding: 1rem;">
43
- <strong>Privacy & Tracking</strong><br />
44
- ${this.consentMessage}
45
- <div class="consent-actions">
46
- <wa-button size="small" variant="neutral" @click=${e=>{e.preventDefault(),e.stopPropagation(),this.disagree()}}>
47
- Decline
48
- </wa-button>
49
- <wa-button size="small" variant="brand" @click=${e=>{e.preventDefault(),e.stopPropagation(),this.agree()}}>
50
- Accept
51
- </wa-button>
52
- </div>
53
- </div>
54
- </wa-callout>
38
+ <wa-dialog
39
+ label="Privacy & Tracking"
40
+ ?open=${this.consentShown}
41
+ @wa-hide=${e=>{this.consentShown&&e.preventDefault()}}
42
+ >
43
+ ${this.consentMessage}
44
+ <div slot="footer" class="consent-actions">
45
+ <wa-button size="small" variant="neutral" @click=${()=>this.disagree()}>
46
+ Decline
47
+ </wa-button>
48
+ <wa-button size="small" variant="brand" @click=${()=>this.agree()}>
49
+ Accept
50
+ </wa-button>
55
51
  </div>
56
- `:""}
57
- `}connectedCallback(){if(super.connectedCallback(),window.location.hostname!==this.domain){console.warn(`[hot-tracking] Domain mismatch: expected "${this.domain}", got "${window.location.hostname}". Tracking disabled.`);return}let e=this.siteId;if(e.length===0||this.domain.length===0){this.showErrorCallout("Matomo tracking is not properly configured. Please provide both site-id and domain attributes.");return}let o=window._paq=window._paq||[];if(o.push(["setDomains",[this.domain]]),o.push(["enableLinkTracking"]),o.push(["trackVisibleContentImpressions"]),(function(d){o.push(["setTrackerUrl",`${d}/matomo.php`]),o.push(["setSiteId",e]);let u=document,h=u.createElement("script"),p=u.getElementsByTagName("script")[0];(p==null?void 0:p.parentNode)!=null?(h.async=!0,h.src=`${d}/matomo.js`,p.parentNode.insertBefore(h,p)):console.warn("Script insertion failed. Parent node is null.")})(this.matomoURL),this.showConsent){o.push(["requireConsent"]);let d=this.getStoredConsent();d===!0?(this.consentGiven=!0,o.push(["rememberConsentGiven"]),o.push(["trackPageView"])):d===!1?this.consentGiven=!1:setTimeout(()=>{this.showConsentBanner()},1e3)}else o.push(["trackPageView"])}};m=new WeakMap,v=new WeakMap,w=new WeakMap,f=new WeakMap,x=new WeakMap,r.styles=g`
52
+ </wa-dialog>
53
+ `}connectedCallback(){if(super.connectedCallback(),window.location.hostname!==this.domain){console.warn(`[hot-tracking] Domain mismatch: expected "${this.domain}", got "${window.location.hostname}". Tracking disabled.`);return}let e=this.siteId;if(e.length===0||this.domain.length===0){this.showErrorCallout("Matomo tracking is not properly configured. Please provide both site-id and domain attributes.");return}let o=window._paq=window._paq||[];if(o.push(["setDomains",[this.domain]]),o.push(["enableLinkTracking"]),o.push(["trackVisibleContentImpressions"]),(function(c){o.push(["setTrackerUrl",`${c}/matomo.php`]),o.push(["setSiteId",e]);let u=document,p=u.createElement("script"),d=u.getElementsByTagName("script")[0];(d==null?void 0:d.parentNode)!=null?(p.async=!0,p.src=`${c}/matomo.js`,d.parentNode.insertBefore(p,d)):console.warn("Script insertion failed. Parent node is null.")})(this.matomoURL),this.showConsent){o.push(["requireConsent"]);let c=this.getStoredConsent();c===!0?(this.consentGiven=!0,o.push(["rememberConsentGiven"]),o.push(["trackPageView"])):c===!1?this.consentGiven=!1:this.showConsentBanner()}else o.push(["trackPageView"])}};m=new WeakMap,w=new WeakMap,v=new WeakMap,f=new WeakMap,x=new WeakMap,a.styles=g`
58
54
  :host {
59
55
  display: block;
60
56
  font-family: var(--hot-font-sans);
61
57
  }
62
58
 
63
- .consent-banner {
59
+ wa-dialog {
60
+ --width: 100vw;
61
+ }
62
+
63
+ wa-dialog::part(dialog) {
64
64
  position: fixed;
65
- bottom: 0;
66
- left: 0;
67
- right: 0;
68
- z-index: 1000;
69
- padding: var(--hot-spacing-medium);
70
- background: rgba(255, 255, 255, 0.95);
71
- backdrop-filter: blur(10px);
72
- border-top: 1px solid var(--wa-color-surface-border);
65
+ inset: auto 0 0 0;
66
+ margin: 0;
67
+ max-width: 100vw;
68
+ max-height: none;
69
+ border-radius: var(--hot-border-radius-large) var(--hot-border-radius-large) 0 0;
70
+ }
71
+
72
+ wa-dialog::part(title) {
73
+ font-weight: var(--hot-font-weight-semibold);
74
+ }
75
+
76
+ wa-dialog::part(body) {
77
+ padding: var(--hot-spacing-medium) var(--hot-spacing-large);
78
+ }
79
+
80
+ wa-dialog::part(footer) {
81
+ padding: var(--hot-spacing-medium) var(--hot-spacing-large);
73
82
  }
74
83
 
75
84
  .error-banner {
@@ -105,7 +114,6 @@ import{a as c,b as t}from"./chunk.ZETV7TDG.js";import{a as g,d as l,f as b}from"
105
114
  .consent-actions {
106
115
  display: flex;
107
116
  gap: var(--hot-spacing-small);
108
- margin-top: var(--hot-spacing-medium);
109
117
  justify-content: flex-end;
110
118
  }
111
119
 
@@ -205,39 +213,11 @@ import{a as c,b as t}from"./chunk.ZETV7TDG.js";import{a as g,d as l,f as b}from"
205
213
  border-radius: var(--hot-border-radius-x-large) var(--hot-border-radius-x-large) 0 0;
206
214
  }
207
215
 
208
- .consent-banner wa-callout {
209
- border-radius: var(--hot-border-radius-x-large);
210
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
211
- border: 1px solid var(--wa-color-surface-border);
212
- background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.98));
213
- backdrop-filter: blur(16px);
214
- }
215
-
216
- .consent-banner wa-callout::before {
217
- content: "";
218
- position: absolute;
219
- top: 0;
220
- left: 0;
221
- right: 0;
222
- height: 4px;
223
- background: linear-gradient(
224
- 90deg,
225
- var(--hot-color-primary-500),
226
- var(--hot-color-primary-600),
227
- var(--hot-color-primary-700)
228
- );
229
- border-radius: var(--hot-border-radius-x-large) var(--hot-border-radius-x-large) 0 0;
230
- }
231
-
232
216
  wa-icon {
233
217
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
234
218
  }
235
219
 
236
220
  @media (max-width: 768px) {
237
- .consent-banner {
238
- padding: var(--hot-spacing-small);
239
- }
240
-
241
221
  .error-banner {
242
222
  left: var(--hot-spacing-x-small);
243
223
  right: var(--hot-spacing-x-small);
@@ -248,14 +228,5 @@ import{a as c,b as t}from"./chunk.ZETV7TDG.js";import{a as g,d as l,f as b}from"
248
228
  right: var(--hot-spacing-x-small);
249
229
  max-width: calc(100vw - var(--hot-spacing-medium));
250
230
  }
251
-
252
- .consent-actions {
253
- flex-direction: column;
254
- gap: var(--hot-spacing-x-small);
255
- }
256
-
257
- wa-button {
258
- width: 100%;
259
- }
260
231
  }
261
- `,a([c({type:String,attribute:"site-id"})],r.prototype,"siteId",1),a([c({type:String})],r.prototype,"domain",1),a([c({type:String})],r.prototype,"matomoURL",1),a([c({type:Boolean,attribute:"show-consent"})],r.prototype,"showConsent",1),a([c({type:String,attribute:"consent-message"})],r.prototype,"consentMessage",1),a([t()],r.prototype,"consentGiven",2),a([t()],r.prototype,"consentShown",2),a([t()],r.prototype,"errorMessage",2),a([t()],r.prototype,"showError",2),a([t()],r.prototype,"successMessage",2),a([t()],r.prototype,"showSuccess",2),a([t()],r.prototype,"infoMessage",2),a([t()],r.prototype,"showInfo",2);var I=r;export{r as a,I as b};
232
+ `,t([l({type:String,attribute:"site-id"})],a.prototype,"siteId",1),t([l({type:String})],a.prototype,"domain",1),t([l({type:String})],a.prototype,"matomoURL",1),t([l({type:Boolean,attribute:"show-consent"})],a.prototype,"showConsent",1),t([l({type:String,attribute:"consent-message"})],a.prototype,"consentMessage",1),t([r()],a.prototype,"consentGiven",2),t([r()],a.prototype,"consentShown",2),t([r()],a.prototype,"errorMessage",2),t([r()],a.prototype,"showError",2),t([r()],a.prototype,"successMessage",2),t([r()],a.prototype,"showSuccess",2),t([r()],a.prototype,"infoMessage",2),t([r()],a.prototype,"showInfo",2);var I=a;export{a,I as b};
@@ -1 +1 @@
1
- import{b as e}from"./chunk.ZZ7X3H3S.js";var n=e;customElements.get("hot-consent")||customElements.define("hot-consent",e);export{n as a};
1
+ import{b as e}from"./chunk.UFI755NV.js";var n=e;customElements.get("hot-consent")||customElements.define("hot-consent",e);export{n as a};
@@ -1,4 +1,4 @@
1
- import{a as f,b as m,c as z}from"./chunk.ZETV7TDG.js";import{a as M}from"./chunk.L7KUSNV7.js";import{d as h,e as x,f as F}from"./chunk.QABMDRWR.js";import{d as n,e as o,f as d,g as c}from"./chunk.N2W26RCT.js";var E={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},y=l=>(...a)=>({_$litDirective$:l,values:a}),$=class{constructor(a){}get _$AU(){return this._$AM._$AU}_$AT(a,e,i){this._$Ct=a,this._$AM=e,this._$Ci=i}_$AS(a,e){return this.update(a,e)}update(a,e){return this.render(...e)}};var _=y(class extends ${constructor(l){var a;if(super(l),l.type!==E.ATTRIBUTE||l.name!=="class"||((a=l.strings)==null?void 0:a.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(l){return" "+Object.keys(l).filter(a=>l[a]).join(" ")+" "}update(l,[a]){var i,s;if(this.st===void 0){this.st=new Set,l.strings!==void 0&&(this.nt=new Set(l.strings.join(" ").split(/\s/).filter(t=>t!=="")));for(let t in a)a[t]&&!((i=this.nt)!=null&&i.has(t))&&this.st.add(t);return this.render(a)}let e=l.element.classList;for(let t of this.st)t in a||(e.remove(t),this.st.delete(t));for(let t in a){let p=!!a[t];p===this.st.has(t)||(s=this.nt)!=null&&s.has(t)||(p?(e.add(t),this.st.add(t)):(e.remove(t),this.st.delete(t)))}return x}});Promise.allSettled([import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/divider/divider.js")]);var S,T,C,D,P,A,B,L,k,W,I,O,r=class extends F{constructor(){super(...arguments);this.name="hot-file-input-dropzone";d(this,S,!1);d(this,T,"");d(this,C,0);d(this,D,!1);d(this,P,!1);d(this,A,"");d(this,B,"traditional");d(this,L,!1);d(this,k,[]);d(this,W,"");d(this,I,"");d(this,O)}get multiple(){return o(this,S)}set multiple(e){c(this,S,e)}get accept(){return o(this,T)}set accept(e){c(this,T,e)}get maxSize(){return o(this,C)}set maxSize(e){c(this,C,e)}get showPreview(){return o(this,D)}set showPreview(e){c(this,D,e)}get disabled(){return o(this,P)}set disabled(e){c(this,P,e)}get label(){return o(this,A)}set label(e){c(this,A,e)}get variant(){return o(this,B)}set variant(e){c(this,B,e)}get isDragging(){return o(this,L)}set isDragging(e){c(this,L,e)}get selectedFiles(){return o(this,k)}set selectedFiles(e){c(this,k,e)}get errorMessage(){return o(this,W)}set errorMessage(e){c(this,W,e)}get statusMessage(){return o(this,I)}set statusMessage(e){c(this,I,e)}get fileInput(){return o(this,O)}set fileInput(e){c(this,O,e)}_generateId(){return`file-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}_handleDragOver(e){e.preventDefault(),e.stopPropagation(),this.disabled||(this.isDragging=!0)}_handleDragLeave(e){e.preventDefault(),e.stopPropagation(),this.isDragging=!1}_handleDrop(e){var s;if(e.preventDefault(),e.stopPropagation(),this.isDragging=!1,this.disabled)return;let i=Array.from(((s=e.dataTransfer)==null?void 0:s.files)||[]);this._processFiles(i)}_handleClick(){this.disabled||this.fileInput.click()}_handleKeyDown(e){!this.disabled&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.fileInput.click())}_handleFileInputChange(e){let i=e.target,s=Array.from(i.files||[]);this._processFiles(s)}_processFiles(e){if(this.errorMessage="",!this.multiple&&e.length>1){this.errorMessage="Only one file can be selected";return}if(this.accept){let t=this.accept.split(",").map(u=>u.trim().toLowerCase()),p=e.filter(u=>{let b=u.name.toLowerCase(),g=u.type.toLowerCase();return!t.some(v=>{if(v.startsWith("."))return b.endsWith(v);if(v.endsWith("/*")){let w=v.split("/")[0];if(g)return g.startsWith(w+"/");let j=b.substring(b.lastIndexOf("."));return this._getFileIcon(j).includes(w)}return g?g===v:!1})});if(p.length>0){this.errorMessage=`Invalid file type(s): ${p.map(u=>u.name).join(", ")}`;return}}if(this.maxSize>0){let t=e.filter(p=>p.size>this.maxSize);if(t.length>0){this.errorMessage=`File(s) exceed maximum size of ${this._formatFileSize(this.maxSize)}: ${t.map(p=>p.name).join(", ")}`;return}}let i=e.map(t=>({file:t,id:this._generateId()}));this.multiple?this.selectedFiles=[...i,...this.selectedFiles]:this.selectedFiles=i,this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("hot-files-selected",{detail:{files:i.map(t=>t.file),allFiles:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0}));let s=i.length;this.statusMessage=`${s} ${s===1?"file":"files"} selected: ${i.map(t=>t.file.name).join(", ")}`}_removeFile(e){let i=this.selectedFiles.find(s=>s.id===e);this.selectedFiles=this.selectedFiles.filter(s=>s.id!==e),this.fileInput&&(this.fileInput.value=""),this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(s=>s.file)},bubbles:!0,composed:!0})),i&&(this.statusMessage=`File removed: ${i.file.name}. ${this.selectedFiles.length} ${this.selectedFiles.length===1?"file":"files"} remaining.`)}_formatFileSize(e){if(e===0)return"0 Bytes";let i=1e3,s=["Bytes","KB","MB","GB"],t=Math.floor(Math.log(e)/Math.log(i)),p=e/Math.pow(i,t);return`${Math.round(p*10)/10} ${s[t]}`}_getFileIcon(e){return e.startsWith("image/")?"file-image":e.startsWith("video/")?"file-video":e.startsWith("audio/")?"file-audio":e==="application/pdf"?"file-pdf":e.includes("word")?"file-word":e.includes("sheet")||e.includes("excel")?"file-excel":e.includes("zip")||e.includes("rar")||e.includes("7z")?"file-archive":e.includes("text")?"file-text":"file"}clearFiles(){this.selectedFiles=[],this.errorMessage="",this.fileInput&&(this.fileInput.value="")}getFiles(){return this.selectedFiles.map(e=>e.file)}render(){let e={dropzone:!0,"dropzone--dragging":this.isDragging,"dropzone--disabled":this.disabled,"dropzone--has-files":this.selectedFiles.length>0,"dropzone--compact":this.variant==="compact"},i=this.variant==="compact";return h`
1
+ import{a as M}from"./chunk.L7KUSNV7.js";import{a as f,b as m,c as z}from"./chunk.ZETV7TDG.js";import{d as h,e as x,f as F}from"./chunk.QABMDRWR.js";import{d as n,e as o,f as d,g as c}from"./chunk.N2W26RCT.js";var E={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},y=l=>(...a)=>({_$litDirective$:l,values:a}),$=class{constructor(a){}get _$AU(){return this._$AM._$AU}_$AT(a,e,i){this._$Ct=a,this._$AM=e,this._$Ci=i}_$AS(a,e){return this.update(a,e)}update(a,e){return this.render(...e)}};var _=y(class extends ${constructor(l){var a;if(super(l),l.type!==E.ATTRIBUTE||l.name!=="class"||((a=l.strings)==null?void 0:a.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(l){return" "+Object.keys(l).filter(a=>l[a]).join(" ")+" "}update(l,[a]){var i,s;if(this.st===void 0){this.st=new Set,l.strings!==void 0&&(this.nt=new Set(l.strings.join(" ").split(/\s/).filter(t=>t!=="")));for(let t in a)a[t]&&!((i=this.nt)!=null&&i.has(t))&&this.st.add(t);return this.render(a)}let e=l.element.classList;for(let t of this.st)t in a||(e.remove(t),this.st.delete(t));for(let t in a){let p=!!a[t];p===this.st.has(t)||(s=this.nt)!=null&&s.has(t)||(p?(e.add(t),this.st.add(t)):(e.remove(t),this.st.delete(t)))}return x}});Promise.allSettled([import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/divider/divider.js")]);var S,T,C,D,P,A,B,L,k,W,I,O,r=class extends F{constructor(){super(...arguments);this.name="hot-file-input-dropzone";d(this,S,!1);d(this,T,"");d(this,C,0);d(this,D,!1);d(this,P,!1);d(this,A,"");d(this,B,"traditional");d(this,L,!1);d(this,k,[]);d(this,W,"");d(this,I,"");d(this,O)}get multiple(){return o(this,S)}set multiple(e){c(this,S,e)}get accept(){return o(this,T)}set accept(e){c(this,T,e)}get maxSize(){return o(this,C)}set maxSize(e){c(this,C,e)}get showPreview(){return o(this,D)}set showPreview(e){c(this,D,e)}get disabled(){return o(this,P)}set disabled(e){c(this,P,e)}get label(){return o(this,A)}set label(e){c(this,A,e)}get variant(){return o(this,B)}set variant(e){c(this,B,e)}get isDragging(){return o(this,L)}set isDragging(e){c(this,L,e)}get selectedFiles(){return o(this,k)}set selectedFiles(e){c(this,k,e)}get errorMessage(){return o(this,W)}set errorMessage(e){c(this,W,e)}get statusMessage(){return o(this,I)}set statusMessage(e){c(this,I,e)}get fileInput(){return o(this,O)}set fileInput(e){c(this,O,e)}_generateId(){return`file-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}_handleDragOver(e){e.preventDefault(),e.stopPropagation(),this.disabled||(this.isDragging=!0)}_handleDragLeave(e){e.preventDefault(),e.stopPropagation(),this.isDragging=!1}_handleDrop(e){var s;if(e.preventDefault(),e.stopPropagation(),this.isDragging=!1,this.disabled)return;let i=Array.from(((s=e.dataTransfer)==null?void 0:s.files)||[]);this._processFiles(i)}_handleClick(){this.disabled||this.fileInput.click()}_handleKeyDown(e){!this.disabled&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.fileInput.click())}_handleFileInputChange(e){let i=e.target,s=Array.from(i.files||[]);this._processFiles(s)}_processFiles(e){if(this.errorMessage="",!this.multiple&&e.length>1){this.errorMessage="Only one file can be selected";return}if(this.accept){let t=this.accept.split(",").map(u=>u.trim().toLowerCase()),p=e.filter(u=>{let b=u.name.toLowerCase(),g=u.type.toLowerCase();return!t.some(v=>{if(v.startsWith("."))return b.endsWith(v);if(v.endsWith("/*")){let w=v.split("/")[0];if(g)return g.startsWith(w+"/");let j=b.substring(b.lastIndexOf("."));return this._getFileIcon(j).includes(w)}return g?g===v:!1})});if(p.length>0){this.errorMessage=`Invalid file type(s): ${p.map(u=>u.name).join(", ")}`;return}}if(this.maxSize>0){let t=e.filter(p=>p.size>this.maxSize);if(t.length>0){this.errorMessage=`File(s) exceed maximum size of ${this._formatFileSize(this.maxSize)}: ${t.map(p=>p.name).join(", ")}`;return}}let i=e.map(t=>({file:t,id:this._generateId()}));this.multiple?this.selectedFiles=[...i,...this.selectedFiles]:this.selectedFiles=i,this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("hot-files-selected",{detail:{files:i.map(t=>t.file),allFiles:this.selectedFiles.map(t=>t.file)},bubbles:!0,composed:!0}));let s=i.length;this.statusMessage=`${s} ${s===1?"file":"files"} selected: ${i.map(t=>t.file.name).join(", ")}`}_removeFile(e){let i=this.selectedFiles.find(s=>s.id===e);this.selectedFiles=this.selectedFiles.filter(s=>s.id!==e),this.fileInput&&(this.fileInput.value=""),this.dispatchEvent(new CustomEvent("hot-file-change",{detail:{files:this.selectedFiles.map(s=>s.file)},bubbles:!0,composed:!0})),i&&(this.statusMessage=`File removed: ${i.file.name}. ${this.selectedFiles.length} ${this.selectedFiles.length===1?"file":"files"} remaining.`)}_formatFileSize(e){if(e===0)return"0 Bytes";let i=1e3,s=["Bytes","KB","MB","GB"],t=Math.floor(Math.log(e)/Math.log(i)),p=e/Math.pow(i,t);return`${Math.round(p*10)/10} ${s[t]}`}_getFileIcon(e){return e.startsWith("image/")?"file-image":e.startsWith("video/")?"file-video":e.startsWith("audio/")?"file-audio":e==="application/pdf"?"file-pdf":e.includes("word")?"file-word":e.includes("sheet")||e.includes("excel")?"file-excel":e.includes("zip")||e.includes("rar")||e.includes("7z")?"file-archive":e.includes("text")?"file-text":"file"}clearFiles(){this.selectedFiles=[],this.errorMessage="",this.fileInput&&(this.fileInput.value="")}getFiles(){return this.selectedFiles.map(e=>e.file)}render(){let e={dropzone:!0,"dropzone--dragging":this.isDragging,"dropzone--disabled":this.disabled,"dropzone--has-files":this.selectedFiles.length>0,"dropzone--compact":this.variant==="compact"},i=this.variant==="compact";return h`
2
2
  <div class="file-input-dropzone">
3
3
  ${this.label&&this.variant==="traditional"?h`<label class="label" id="dropzone-label">${this.label}</label>`:""}
4
4
  ${this.variant==="traditional"?h`
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk.K3ILHIDX.js";var t=e;customElements.get("hot-announcement")||customElements.define("hot-announcement",e);export{t as a};
@@ -0,0 +1,89 @@
1
+ import{a as n,b as d}from"./chunk.ZETV7TDG.js";import{a as l,d as o,f as c}from"./chunk.QABMDRWR.js";import{d as t,e as s,f as i,g as a}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")]);var m,u,h,b,g,p,e=class extends c{constructor(){super(...arguments);this.name="hot-announcement";i(this,m,"");i(this,u,"");i(this,h,"");i(this,b,"brand");i(this,g,"Dismiss");i(this,p,"hot-announcement");this.visible=!1}get version(){return s(this,m)}set version(r){a(this,m,r)}get title(){return s(this,u)}set title(r){a(this,u,r)}get message(){return s(this,h)}set message(r){a(this,h,r)}get variant(){return s(this,b)}set variant(r){a(this,b,r)}get dismissLabel(){return s(this,g)}set dismissLabel(r){a(this,g,r)}get storageKey(){return s(this,p)}set storageKey(r){a(this,p,r)}storageFullKey(){return`${this.storageKey}-${this.version}-dismissed`}dismiss(){this.version.length>0&&localStorage.setItem(this.storageFullKey(),"true"),this.visible=!1,this.dispatchEvent(new CustomEvent("dismiss",{detail:{version:this.version},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this._evaluateVisibility()}willUpdate(r){(r.has("version")||r.has("storageKey"))&&this._evaluateVisibility()}_evaluateVisibility(){if(this.version.length===0){console.warn("[hot-announcement] `version` is required so dismissal can be keyed per release. Banner hidden."),this.visible=!1;return}let r=localStorage.getItem(this.storageFullKey())==="true";this.visible=!r}render(){return this.visible?o`
2
+ <div class="announcement-banner" role="status">
3
+ <wa-callout variant="${this.variant}" appearance="outlined filled" size="medium">
4
+ <wa-icon slot="icon" family="classic" variant="solid" name="circle-info"></wa-icon>
5
+ <div class="announcement-content">
6
+ <div class="announcement-body">
7
+ ${this.title.length>0?o`<strong>${this.title}</strong>`:null}
8
+ <slot>${this.message}</slot>
9
+ </div>
10
+ <button
11
+ type="button"
12
+ class="announcement-dismiss"
13
+ aria-label="${this.dismissLabel}"
14
+ @click=${()=>this.dismiss()}
15
+ >
16
+ <wa-icon name="xmark"></wa-icon>
17
+ </button>
18
+ </div>
19
+ </wa-callout>
20
+ </div>
21
+ `:null}};m=new WeakMap,u=new WeakMap,h=new WeakMap,b=new WeakMap,g=new WeakMap,p=new WeakMap,e.styles=l`
22
+ :host {
23
+ display: block;
24
+ font-family: var(--hot-font-sans);
25
+ }
26
+
27
+ .announcement-banner {
28
+ position: sticky;
29
+ top: 0;
30
+ z-index: 1000;
31
+ width: 100%;
32
+ }
33
+
34
+ wa-callout {
35
+ border-radius: 0;
36
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
37
+ }
38
+
39
+ .announcement-content {
40
+ display: flex;
41
+ align-items: center;
42
+ gap: var(--hot-spacing-small);
43
+ width: 100%;
44
+ }
45
+
46
+ .announcement-body {
47
+ padding: 0 var(--hot-spacing-x-small);
48
+ flex: 1;
49
+ min-width: 0;
50
+ }
51
+
52
+ .announcement-body strong {
53
+ display: block;
54
+ margin-bottom: var(--hot-spacing-3x-small);
55
+ font-weight: var(--hot-font-weight-semibold);
56
+ }
57
+
58
+ .announcement-body ::slotted(a),
59
+ .announcement-body a {
60
+ color: var(--hot-color-primary-600);
61
+ text-decoration: underline;
62
+ }
63
+
64
+ .announcement-dismiss {
65
+ flex-shrink: 0;
66
+ display: inline-flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ width: 1.75rem;
70
+ height: 1.75rem;
71
+ padding: 0;
72
+ border: none;
73
+ border-radius: var(--hot-border-radius-medium);
74
+ background: transparent;
75
+ color: inherit;
76
+ cursor: pointer;
77
+ font-size: 1rem;
78
+ line-height: 1;
79
+ }
80
+
81
+ .announcement-dismiss:hover {
82
+ background: rgba(0, 0, 0, 0.06);
83
+ }
84
+
85
+ .announcement-dismiss:focus-visible {
86
+ outline: 2px solid var(--hot-color-primary-500);
87
+ outline-offset: 2px;
88
+ }
89
+ `,t([n({type:String})],e.prototype,"version",1),t([n({type:String})],e.prototype,"title",1),t([n({type:String})],e.prototype,"message",1),t([n({type:String})],e.prototype,"variant",1),t([n({type:String,attribute:"dismiss-label"})],e.prototype,"dismissLabel",1),t([n({type:String,attribute:"storage-key"})],e.prototype,"storageKey",1),t([d()],e.prototype,"visible",2);var x=e;export{e as a,x as b};
@@ -1 +1 @@
1
- import{b as e}from"./chunk.XFKYNNG3.js";var a=e;customElements.get("hot-header")||customElements.define("hot-header",e);export{a};
1
+ import{b as e}from"./chunk.LLGJXBVH.js";var a=e;customElements.get("hot-header")||customElements.define("hot-header",e);export{a};
@@ -1,4 +1,4 @@
1
- import{a as w,b as f}from"./chunk.6WYUOJRX.js";import{a as y}from"./chunk.KO4EOD3I.js";import{a as d}from"./chunk.ZETV7TDG.js";import{d as i,f as g}from"./chunk.QABMDRWR.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")]);y();var S,m,$,E,L,T,k,A,_,C,I,M,s=class s extends g{constructor(){super(...arguments);this.name="hot-header";c(this,S,"");c(this,m,"Mapping our world together");c(this,$,"Humanitarian OpenStreetMap Team Website");c(this,E,"https://www.hotosm.org");c(this,L,"");c(this,T,!1);c(this,k,[]);c(this,A,[]);c(this,_,"small");c(this,C,!1);c(this,I,0);c(this,M,0);this._navScrollAtStart=!0;this._navScrollAtEnd=!1;this._boundLocationSync=null}get title(){return l(this,S)}set title(e){h(this,S,e)}get topTagline(){return l(this,m)}set topTagline(e){h(this,m,e)}get topLinkLabel(){return l(this,$)}set topLinkLabel(e){h(this,$,e)}get topLinkHref(){return l(this,E)}set topLinkHref(e){h(this,E,e)}get logo(){return l(this,L)}set logo(e){h(this,L,e)}get drawer(){return l(this,T)}set drawer(e){h(this,T,e)}get tabs(){return l(this,k)}set tabs(e){h(this,k,e)}get drawerLinks(){return l(this,A)}set drawerLinks(e){h(this,A,e)}get size(){return l(this,_)}set size(e){h(this,_,e)}get tabsCenterAlign(){return l(this,C)}set tabsCenterAlign(e){h(this,C,e)}get selectedTab(){return l(this,I)}set selectedTab(e){h(this,I,e)}get activeTabIndex(){return l(this,M)}set activeTabIndex(e){h(this,M,e)}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),s._patchHistory()}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)}firstUpdated(e){this._updateNavScrollState(),this.syncActiveTab()}updated(e){if(super.updated(e),e.has("selectedTab")){let t=this.selectedTab;typeof t=="number"&&t>=0&&t<this.tabs.length&&t!==this.activeTabIndex&&(this.activeTabIndex=t)}(e.has("tabs")||e.has("size"))&&(this.updateComplete.then(()=>this._updateNavScrollState()),e.has("tabs")&&this.syncActiveTab())}selectTab(e){if(e!==this.selectedTab&&e>=0&&e<this.tabs.length){let t=this.selectedTab;this.selectedTab=e,this.activeTabIndex=e,this.dispatchEvent(new CustomEvent("tab-change",{detail:{selectedIndex:e,previousIndex:t,tab:this.tabs[e]},bubbles:!0})),this.requestUpdate()}}_updateNavScrollState(){var b;let e=(b=this.renderRoot)==null?void 0:b.querySelector(".header--nav-scroll");if(!e)return;let{scrollLeft:t,scrollWidth:a,clientWidth:r}=e,n=t<=0,u=t+r>=a-1;(n!==this._navScrollAtStart||u!==this._navScrollAtEnd)&&(this._navScrollAtStart=n,this._navScrollAtEnd=u,this.requestUpdate())}_scrollNav(e){var n;let t=(n=this.renderRoot)==null?void 0:n.querySelector(".header--nav-scroll");if(!t)return;let a=Math.max(t.scrollWidth-t.clientWidth,0),r=e==="right"?a:0;t.scrollTo({left:r,behavior:"smooth"}),window.setTimeout(()=>this._updateNavScrollState(),250)}syncActiveTab(){var r;if(typeof window=="undefined"||!((r=this.tabs)!=null&&r.length))return;let e=window.location.pathname.replace(/\/+$/,"");if(!e)return;let t=-1,a=-1;this.tabs.forEach((n,u)=>{if(n!=null&&n.href)try{let p=new URL(n.href,window.location.origin).pathname.replace(/\/+$/,"");if(!p)return;e===p?(t=u,a=Number.MAX_SAFE_INTEGER):a<Number.MAX_SAFE_INTEGER&&e.startsWith(p)&&p.length>a&&(t=u,a=p.length)}catch(b){}}),t>=0&&t!==this.activeTabIndex&&(this.selectedTab=t,this.activeTabIndex=t,this.requestUpdate())}static _patchHistory(){if(s._historyPatched||typeof window=="undefined")return;s._historyPatched=!0;let e=history.pushState.bind(history),t=history.replaceState.bind(history);history.pushState=function(a,r,n){e(a,r,n),window.dispatchEvent(new Event("hot-locationchange"))},history.replaceState=function(a,r,n){t(a,r,n),window.dispatchEvent(new Event("hot-locationchange"))}}render(){let e=typeof this.logo=="string"||this.logo instanceof URL?typeof this.logo=="string"?this.logo:this.logo.href:"";return i`
1
+ import{a as w,b as f}from"./chunk.UB7NXUCE.js";import{a as y}from"./chunk.KO4EOD3I.js";import{a as d}from"./chunk.ZETV7TDG.js";import{d as i,f as g}from"./chunk.QABMDRWR.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")]);y();var S,m,$,E,L,T,k,A,_,C,I,x,s=class s extends g{constructor(){super(...arguments);this.name="hot-header";c(this,S,"");c(this,m,"Mapping our world together");c(this,$,"Humanitarian OpenStreetMap Team Website");c(this,E,"https://www.hotosm.org");c(this,L,"");c(this,T,!1);c(this,k,[]);c(this,A,[]);c(this,_,"small");c(this,C,!1);c(this,I,0);c(this,x,0);this._navScrollAtStart=!0;this._navScrollAtEnd=!1;this._boundLocationSync=null}get title(){return l(this,S)}set title(e){h(this,S,e)}get topTagline(){return l(this,m)}set topTagline(e){h(this,m,e)}get topLinkLabel(){return l(this,$)}set topLinkLabel(e){h(this,$,e)}get topLinkHref(){return l(this,E)}set topLinkHref(e){h(this,E,e)}get logo(){return l(this,L)}set logo(e){h(this,L,e)}get drawer(){return l(this,T)}set drawer(e){h(this,T,e)}get tabs(){return l(this,k)}set tabs(e){h(this,k,e)}get drawerLinks(){return l(this,A)}set drawerLinks(e){h(this,A,e)}get size(){return l(this,_)}set size(e){h(this,_,e)}get tabsCenterAlign(){return l(this,C)}set tabsCenterAlign(e){h(this,C,e)}get selectedTab(){return l(this,I)}set selectedTab(e){h(this,I,e)}get activeTabIndex(){return l(this,x)}set activeTabIndex(e){h(this,x,e)}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),s._patchHistory()}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)}firstUpdated(e){this._updateNavScrollState(),this.syncActiveTab()}updated(e){if(super.updated(e),e.has("selectedTab")){let t=this.selectedTab;typeof t=="number"&&t>=0&&t<this.tabs.length&&t!==this.activeTabIndex&&(this.activeTabIndex=t)}(e.has("tabs")||e.has("size"))&&(this.updateComplete.then(()=>this._updateNavScrollState()),e.has("tabs")&&this.syncActiveTab())}selectTab(e){if(e!==this.selectedTab&&e>=0&&e<this.tabs.length){let t=this.selectedTab;this.selectedTab=e,this.activeTabIndex=e,this.dispatchEvent(new CustomEvent("tab-change",{detail:{selectedIndex:e,previousIndex:t,tab:this.tabs[e]},bubbles:!0})),this.requestUpdate()}}_updateNavScrollState(){var v;let e=(v=this.renderRoot)==null?void 0:v.querySelector(".header--nav-scroll");if(!e)return;let{scrollLeft:t,scrollWidth:a,clientWidth:r}=e,n=t<=0,u=t+r>=a-1;(n!==this._navScrollAtStart||u!==this._navScrollAtEnd)&&(this._navScrollAtStart=n,this._navScrollAtEnd=u,this.requestUpdate())}_scrollNav(e){var n;let t=(n=this.renderRoot)==null?void 0:n.querySelector(".header--nav-scroll");if(!t)return;let a=Math.max(t.scrollWidth-t.clientWidth,0),r=e==="right"?a:0;t.scrollTo({left:r,behavior:"smooth"}),window.setTimeout(()=>this._updateNavScrollState(),250)}syncActiveTab(){var r;if(typeof window=="undefined"||!((r=this.tabs)!=null&&r.length))return;let e=window.location.pathname.replace(/\/+$/,"");if(!e)return;let t=-1,a=-1;this.tabs.forEach((n,u)=>{if(n!=null&&n.href)try{let p=new URL(n.href,window.location.origin).pathname.replace(/\/+$/,"");if(!p)return;e===p?(t=u,a=Number.MAX_SAFE_INTEGER):a<Number.MAX_SAFE_INTEGER&&e.startsWith(p)&&p.length>a&&(t=u,a=p.length)}catch(v){}}),t>=0&&t!==this.activeTabIndex&&(this.selectedTab=t,this.activeTabIndex=t,this.requestUpdate())}static _patchHistory(){if(s._historyPatched||typeof window=="undefined")return;s._historyPatched=!0;let e=history.pushState.bind(history),t=history.replaceState.bind(history);history.pushState=function(a,r,n){e(a,r,n),window.dispatchEvent(new Event("hot-locationchange"))},history.replaceState=function(a,r,n){t(a,r,n),window.dispatchEvent(new Event("hot-locationchange"))}}render(){let e=typeof this.logo=="string"||this.logo instanceof URL?typeof this.logo=="string"?this.logo:this.logo.href:"";return i`
2
2
  <div class="header-container">
3
3
  ${this.size!=="small"?i`
4
4
  <div class="header--top">
@@ -103,7 +103,8 @@ import{a as w,b as f}from"./chunk.6WYUOJRX.js";import{a as y}from"./chunk.KO4EOD
103
103
 
104
104
 
105
105
  <div id="right-section" class="header--right-section">
106
- <slot name="auth"></slot>
106
+ <slot name="lang" class="header--lang-slot"></slot>
107
+ <slot name="auth" class="header--auth-slot"></slot>
107
108
  ${this._showDrawer?i`
108
109
  <wa-drawer label=" " id="drawer-overview">
109
110
  <div class="drawer-content">
@@ -139,6 +140,11 @@ import{a as w,b as f}from"./chunk.6WYUOJRX.js";import{a as y}from"./chunk.KO4EOD
139
140
  </li>
140
141
  `)}
141
142
  </ul>
143
+
144
+ <div class="drawer-extras">
145
+ <slot name="drawer-lang" class="drawer-lang-slot"></slot>
146
+ <slot name="drawer-auth" class="drawer-auth-slot"></slot>
147
+ </div>
142
148
  </div>
143
149
  </wa-drawer>
144
150
  <wa-button
@@ -154,4 +160,4 @@ import{a as w,b as f}from"./chunk.6WYUOJRX.js";import{a as y}from"./chunk.KO4EOD
154
160
 
155
161
  </header>
156
162
  </div>
157
- `}async _tabClick(e,t,a){e.preventDefault(),e.stopPropagation();try{this.selectTab(a),setTimeout(async()=>{try{typeof t=="function"&&await t()}catch(r){console.error("Error during navigation:",r),typeof t=="function"&&t()}},0)}catch(r){console.error("Error handling tab click:",r);try{typeof t=="function"&&t()}catch(n){console.error("Fallback navigation also failed:",n)}}}_handleTabShow(e){try{let t=e.target,a=parseInt(t.getAttribute("data-index")||"0",10);!isNaN(a)&&a<this.tabs.length&&this.selectTab(a)}catch(t){console.error("Error handling tab show event:",t)}}get _showDrawer(){return this.drawer||this.tabs.length>0}_handleDrawerOpen(){var t;let e=(t=this.renderRoot)==null?void 0:t.querySelector("#drawer-overview");e&&(e.open=!0)}};S=new WeakMap,m=new WeakMap,$=new WeakMap,E=new WeakMap,L=new WeakMap,T=new WeakMap,k=new WeakMap,A=new WeakMap,_=new WeakMap,C=new WeakMap,I=new WeakMap,M=new WeakMap,s.styles=[f],s._historyPatched=!1,o([d({type:String})],s.prototype,"title",1),o([d({type:String,attribute:"top-tagline"})],s.prototype,"topTagline",1),o([d({type:String,attribute:"top-link-label"})],s.prototype,"topLinkLabel",1),o([d({type:String,attribute:"top-link-href"})],s.prototype,"topLinkHref",1),o([d({type:String})],s.prototype,"logo",1),o([d({type:Boolean})],s.prototype,"drawer",1),o([d({type:Array})],s.prototype,"tabs",1),o([d({type:Array})],s.prototype,"drawerLinks",1),o([d({type:String})],s.prototype,"size",1),o([d({type:Boolean,attribute:"tabs-center-align"})],s.prototype,"tabsCenterAlign",1),o([d({type:Number})],s.prototype,"selectedTab",1),o([d({type:Number})],s.prototype,"activeTabIndex",1);var v=s,V=v;export{v as a,V as b};
163
+ `}async _tabClick(e,t,a){e.preventDefault(),e.stopPropagation();try{this.selectTab(a),setTimeout(async()=>{try{typeof t=="function"&&await t()}catch(r){console.error("Error during navigation:",r),typeof t=="function"&&t()}},0)}catch(r){console.error("Error handling tab click:",r);try{typeof t=="function"&&t()}catch(n){console.error("Fallback navigation also failed:",n)}}}_handleTabShow(e){try{let t=e.target,a=parseInt(t.getAttribute("data-index")||"0",10);!isNaN(a)&&a<this.tabs.length&&this.selectTab(a)}catch(t){console.error("Error handling tab show event:",t)}}get _showDrawer(){return this.drawer||this.tabs.length>0}_handleDrawerOpen(){var t;let e=(t=this.renderRoot)==null?void 0:t.querySelector("#drawer-overview");e&&(e.open=!0)}};S=new WeakMap,m=new WeakMap,$=new WeakMap,E=new WeakMap,L=new WeakMap,T=new WeakMap,k=new WeakMap,A=new WeakMap,_=new WeakMap,C=new WeakMap,I=new WeakMap,x=new WeakMap,s.styles=[f],s._historyPatched=!1,o([d({type:String})],s.prototype,"title",1),o([d({type:String,attribute:"top-tagline"})],s.prototype,"topTagline",1),o([d({type:String,attribute:"top-link-label"})],s.prototype,"topLinkLabel",1),o([d({type:String,attribute:"top-link-href"})],s.prototype,"topLinkHref",1),o([d({type:String})],s.prototype,"logo",1),o([d({type:Boolean})],s.prototype,"drawer",1),o([d({type:Array})],s.prototype,"tabs",1),o([d({type:Array})],s.prototype,"drawerLinks",1),o([d({type:String})],s.prototype,"size",1),o([d({type:Boolean,attribute:"tabs-center-align"})],s.prototype,"tabsCenterAlign",1),o([d({type:Number})],s.prototype,"selectedTab",1),o([d({type:Number})],s.prototype,"activeTabIndex",1);var b=s,V=b;export{b as a,V as b};
@@ -1 +1 @@
1
- import{b as e}from"./chunk.PESN3BZK.js";var t=e;customElements.get("hot-file-input-dropzone")||customElements.define("hot-file-input-dropzone",e);export{t as a};
1
+ import{b as e}from"./chunk.IKKWEPSE.js";var t=e;customElements.get("hot-file-input-dropzone")||customElements.define("hot-file-input-dropzone",e);export{t as a};
@@ -235,6 +235,22 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
235
235
  flex-shrink: 0;
236
236
  }
237
237
 
238
+ /* Slots in the right rail are hidden on mobile and instead projected
239
+ * through their drawer-* counterparts inside the sidebar. */
240
+ @media (max-width: 768px) {
241
+ .header--lang-slot,
242
+ .header--auth-slot {
243
+ display: none;
244
+ }
245
+ }
246
+
247
+ @media (min-width: 769px) {
248
+ .drawer-lang-slot,
249
+ .drawer-auth-slot {
250
+ display: none;
251
+ }
252
+ }
253
+
238
254
  /* Base mobile touch target for drawer / close buttons */
239
255
  wa-button[appearance="outlined"] {
240
256
  min-width: 2.5rem;
@@ -471,10 +487,13 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
471
487
  display: none;
472
488
  }
473
489
 
474
- .header--right-section {
490
+ .header--right-section,
491
+ .header--size-small .header--right-section,
492
+ .header--size-medium .header--right-section,
493
+ .header--size-large .header--right-section {
475
494
  justify-content: center;
476
495
  margin-top: 0;
477
- gap: var(--hot-spacing-small);
496
+ gap: calc(var(--hot-spacing-medium) * 2);
478
497
  }
479
498
 
480
499
  .header--size-small .header--logo-img {
@@ -561,6 +580,13 @@ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
561
580
  text-decoration: underline;
562
581
  }
563
582
 
583
+ .drawer-extras {
584
+ display: flex;
585
+ flex-direction: column;
586
+ gap: var(--hot-spacing-small);
587
+ margin-top: var(--hot-spacing-medium);
588
+ }
589
+
564
590
  @media (min-width: 769px) {
565
591
  .drawer-nav {
566
592
  display: none;
@@ -1,4 +1,4 @@
1
- import{a as l}from"./chunk.KO4EOD3I.js";import{a as d}from"./chunk.TUEFHEUN.js";import{a as o}from"./chunk.ZETV7TDG.js";import{d as r,f as c}from"./chunk.QABMDRWR.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,m,h,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,m,"I Agree");n(this,h,"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,m)}set agreeLabel(t){i(this,m,t)}get notAgreeLabel(){return a(this,h)}set notAgreeLabel(t){i(this,h,t)}render(){return this.isOpen?r`
1
+ import{a as d}from"./chunk.TUEFHEUN.js";import{a as l}from"./chunk.KO4EOD3I.js";import{a as o}from"./chunk.ZETV7TDG.js";import{d as r,f as c}from"./chunk.QABMDRWR.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,m,h,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,m,"I Agree");n(this,h,"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,m)}set agreeLabel(t){i(this,m,t)}get notAgreeLabel(){return a(this,h)}set notAgreeLabel(t){i(this,h,t)}render(){return this.isOpen?r`
2
2
  <div class="consent-overlay">
3
3
  <div class="consent-container">
4
4
  <wa-callout variant="brand" appearance="outlined filled" size="large" class="consent-callout">
@@ -1 +1 @@
1
- import{b as t}from"./chunk.AA57UJ2D.js";var a=t;customElements.get("hot-tracking")||customElements.define("hot-tracking",t);export{a};
1
+ import{b as t}from"./chunk.DNXHV7I7.js";var a=t;customElements.get("hot-tracking")||customElements.define("hot-tracking",t);export{a};
@@ -0,0 +1,32 @@
1
+ import { LitElement } from "lit";
2
+ import type { PropertyValues } from "lit";
3
+ type AnnouncementVariant = "brand" | "success" | "neutral" | "warning";
4
+ export declare class Announcement extends LitElement {
5
+ name: string;
6
+ /** Release identifier used to key dismissal state. Required. */
7
+ accessor version: string;
8
+ /** Optional bold headline shown before the body content. */
9
+ accessor title: string;
10
+ /** Plain-text body shown when no slotted content is provided. */
11
+ accessor message: string;
12
+ /** Visual variant mapped onto wa-callout. */
13
+ accessor variant: AnnouncementVariant;
14
+ /** Aria-label for the dismiss button. */
15
+ accessor dismissLabel: string;
16
+ /**
17
+ * Prefix for the localStorage key. The full key is
18
+ * `${storageKey}-${version}-dismissed`. Override to run multiple
19
+ * independent banners on the same origin.
20
+ */
21
+ accessor storageKey: string;
22
+ private visible;
23
+ static styles: import("lit").CSSResult;
24
+ private storageFullKey;
25
+ /** Dismiss the banner and persist the choice for this version. */
26
+ dismiss(): void;
27
+ connectedCallback(): void;
28
+ protected willUpdate(changedProps: PropertyValues): void;
29
+ private _evaluateVisibility;
30
+ protected render(): import("lit").TemplateResult<1> | null;
31
+ }
32
+ export default Announcement;
@@ -0,0 +1 @@
1
+ import{a,b}from"../../chunks/chunk.K3ILHIDX.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as Announcement,b as default};
@@ -0,0 +1,7 @@
1
+ import Announcement from "./announcement.component.js";
2
+ export default Announcement;
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ "hot-announcement": Announcement;
6
+ }
7
+ }
@@ -0,0 +1 @@
1
+ import{a}from"../../chunks/chunk.IW4CQOKU.js";import"../../chunks/chunk.K3ILHIDX.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.ZZ7X3H3S.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.TUEFHEUN.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as Consent,b as default};
1
+ import{a,b}from"../../chunks/chunk.UFI755NV.js";import"../../chunks/chunk.TUEFHEUN.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as Consent,b as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.N7SRHM5F.js";import"../../chunks/chunk.ZZ7X3H3S.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.TUEFHEUN.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.G5R5NK6C.js";import"../../chunks/chunk.UFI755NV.js";import"../../chunks/chunk.TUEFHEUN.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.PESN3BZK.js";import"../../chunks/chunk.MKQTK2RW.js";import"../../chunks/chunk.NCBKWO6J.js";import"../../chunks/chunk.UVBWHOA2.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.L7KUSNV7.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as FileInputDropzone,b as default};
1
+ import{a,b}from"../../chunks/chunk.IKKWEPSE.js";import"../../chunks/chunk.MKQTK2RW.js";import"../../chunks/chunk.NCBKWO6J.js";import"../../chunks/chunk.UVBWHOA2.js";import"../../chunks/chunk.L7KUSNV7.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as FileInputDropzone,b as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.3AWIVJTF.js";import"../../chunks/chunk.PESN3BZK.js";import"../../chunks/chunk.MKQTK2RW.js";import"../../chunks/chunk.NCBKWO6J.js";import"../../chunks/chunk.UVBWHOA2.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.L7KUSNV7.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.NZMGMJCM.js";import"../../chunks/chunk.IKKWEPSE.js";import"../../chunks/chunk.MKQTK2RW.js";import"../../chunks/chunk.NCBKWO6J.js";import"../../chunks/chunk.UVBWHOA2.js";import"../../chunks/chunk.L7KUSNV7.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.XFKYNNG3.js";import"../../chunks/chunk.6WYUOJRX.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as Header,b as default};
1
+ import{a,b}from"../../chunks/chunk.LLGJXBVH.js";import"../../chunks/chunk.UB7NXUCE.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as Header,b as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.FZ7HQZU4.js";import"../../chunks/chunk.XFKYNNG3.js";import"../../chunks/chunk.6WYUOJRX.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.L2GREEZE.js";import"../../chunks/chunk.LLGJXBVH.js";import"../../chunks/chunk.UB7NXUCE.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.6WYUOJRX.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as headerVariants,b as styles};
1
+ import{a,b}from"../../chunks/chunk.UB7NXUCE.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as headerVariants,b as styles};
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.AA57UJ2D.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as MatomoTracking,b as default};
1
+ import{a,b}from"../../chunks/chunk.DNXHV7I7.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as MatomoTracking,b as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.CCOEI6XU.js";import"../../chunks/chunk.AA57UJ2D.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.V5BQICX2.js";import"../../chunks/chunk.DNXHV7I7.js";import"../../chunks/chunk.ZETV7TDG.js";import"../../chunks/chunk.QABMDRWR.js";import"../../chunks/chunk.N2W26RCT.js";export{a as default};
@@ -2,8 +2,9 @@ import HotHeader from "./components/header/header.js";
2
2
  import HotLogo from "./components/logo/logo.js";
3
3
  import HotTracking from "./components/tracking/tracking.js";
4
4
  import HotConsent from "./components/consent/consent.js";
5
+ import HotAnnouncement from "./components/announcement/announcement.js";
5
6
  import HotFileInputDropzone from "./components/file-input-dropzone/file-input-dropzone.js";
6
7
  import HotListCard from "./components/list-card/list-card.js";
7
8
  import HotToolMenu from "./components/tool-menu/tool-menu.js";
8
9
  export { injectCSSIntoShadowDOM } from "./utils/shadow-dom-css.js";
9
- export { HotHeader as Header, HotLogo as Logo, HotConsent as Consent, HotTracking as Tracking, HotFileInputDropzone as FileInputDropzone, HotListCard as ListCard, HotToolMenu as ToolMenu, };
10
+ export { HotHeader as Header, HotLogo as Logo, HotConsent as Consent, HotTracking as Tracking, HotAnnouncement as Announcement, HotFileInputDropzone as FileInputDropzone, HotListCard as ListCard, HotToolMenu as ToolMenu, };
package/dist/hotosm-ui.js CHANGED
@@ -1 +1 @@
1
- import{a as d}from"./chunks/chunk.ZG2J5SU5.js";import{a as S}from"./chunks/chunk.V7C4W6GD.js";import"./chunks/chunk.24HG5LKA.js";import"./chunks/chunk.DCR6GEE6.js";import{a as p}from"./chunks/chunk.CCOEI6XU.js";import"./chunks/chunk.AA57UJ2D.js";import{a as m}from"./chunks/chunk.FZ7HQZU4.js";import"./chunks/chunk.XFKYNNG3.js";import"./chunks/chunk.6WYUOJRX.js";import"./chunks/chunk.34AG3B2Y.js";import"./chunks/chunk.ZKUACKKG.js";import{a as u}from"./chunks/chunk.N7SRHM5F.js";import"./chunks/chunk.ZZ7X3H3S.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.TUEFHEUN.js";import{a as h}from"./chunks/chunk.3AWIVJTF.js";import"./chunks/chunk.PESN3BZK.js";import{a as f}from"./chunks/chunk.MKQTK2RW.js";import"./chunks/chunk.NCBKWO6J.js";import"./chunks/chunk.UVBWHOA2.js";import"./chunks/chunk.ZETV7TDG.js";import"./chunks/chunk.L7KUSNV7.js";import"./chunks/chunk.QABMDRWR.js";import"./chunks/chunk.N2W26RCT.js";function a(o,e=document){let t=[],r=e.querySelectorAll(o);return t.push(...Array.from(r)),e.querySelectorAll("*").forEach(i=>{i.shadowRoot&&t.push(...a(o,i.shadowRoot))}),t}function y(o){let{css:e,selector:t="wa-button",all:r=!0,styleId:s="hot-theme-injection"}=o;(r?a(t):[a(t)[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{u as Consent,h as FileInputDropzone,m as Header,f as ListCard,d as Logo,S as ToolMenu,p as Tracking,y as injectCSSIntoShadowDOM};
1
+ import{a as p}from"./chunks/chunk.ZG2J5SU5.js";import"./chunks/chunk.34AG3B2Y.js";import"./chunks/chunk.ZKUACKKG.js";import{a as y}from"./chunks/chunk.V7C4W6GD.js";import"./chunks/chunk.24HG5LKA.js";import"./chunks/chunk.DCR6GEE6.js";import{a as u}from"./chunks/chunk.V5BQICX2.js";import"./chunks/chunk.DNXHV7I7.js";import{a as d}from"./chunks/chunk.G5R5NK6C.js";import{a as m}from"./chunks/chunk.L2GREEZE.js";import"./chunks/chunk.LLGJXBVH.js";import"./chunks/chunk.UB7NXUCE.js";import{a as f}from"./chunks/chunk.IW4CQOKU.js";import"./chunks/chunk.K3ILHIDX.js";import{a as S}from"./chunks/chunk.NZMGMJCM.js";import"./chunks/chunk.IKKWEPSE.js";import{a as h}from"./chunks/chunk.MKQTK2RW.js";import"./chunks/chunk.NCBKWO6J.js";import"./chunks/chunk.UVBWHOA2.js";import"./chunks/chunk.L7KUSNV7.js";import"./chunks/chunk.UFI755NV.js";import"./chunks/chunk.TUEFHEUN.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.ZETV7TDG.js";import"./chunks/chunk.QABMDRWR.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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotosm/ui",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Shared UI components with HOT theming.",
5
5
  "homepage": "https://github.com/hotosm/ui#readme",
6
6
  "license": "AGPL-3.0-only",