@hotosm/ui 0.9.2 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk.NZ24D6VL.js";var t=e;customElements.get("hot-announcement")||customElements.define("hot-announcement",e);export{t 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`
@@ -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};
@@ -0,0 +1,89 @@
1
+ import{a,b as d}from"./chunk.ZETV7TDG.js";import{a as g,d as u,f as b}from"./chunk.QABMDRWR.js";import{d as s,e as i,f as n,g as r}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 S=["brand","success","neutral","warning"];function p(o){if(typeof o!="string"||o.length===0)return null;let h=new Date(o);return Number.isNaN(h.getTime())?null:h}var f,v,y,w,x,A,k,e=class extends b{constructor(){super(...arguments);this.name="hot-announcement";n(this,f,"");n(this,v,"");n(this,y,"");n(this,w,"brand");n(this,x,"Dismiss");n(this,A,"hot-announcement");n(this,k,"");this.visible=!1;this.startsAt=null;this.endsAt=null;this.fetchAbort=null}get version(){return i(this,f)}set version(t){r(this,f,t)}get title(){return i(this,v)}set title(t){r(this,v,t)}get message(){return i(this,y)}set message(t){r(this,y,t)}get variant(){return i(this,w)}set variant(t){r(this,w,t)}get dismissLabel(){return i(this,x)}set dismissLabel(t){r(this,x,t)}get storageKey(){return i(this,A)}set storageKey(t){r(this,A,t)}get src(){return i(this,k)}set src(t){r(this,k,t)}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()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.fetchAbort)==null||t.abort(),this.fetchAbort=null}willUpdate(t){if(t.has("src")&&this.src.length>0){this._loadRemoteConfig();return}(t.has("version")||t.has("storageKey"))&&this._evaluateVisibility()}async _loadRemoteConfig(){var l;(l=this.fetchAbort)==null||l.abort();let t=new AbortController;this.fetchAbort=t,this.visible=!1;try{let c=await fetch(this.src,{signal:t.signal});if(!c.ok)return;let m=await c.text();if(m.trim().length===0)return;let C=JSON.parse(m);this._applyRemoteConfig(C)}catch(c){if(c.name==="AbortError")return}finally{this.fetchAbort===t&&(this.fetchAbort=null)}}_applyRemoteConfig(t){typeof t.version=="string"&&(this.version=t.version),typeof t.title=="string"&&(this.title=t.title),typeof t.message=="string"&&(this.message=t.message),typeof t.variant=="string"&&S.includes(t.variant)&&(this.variant=t.variant),this.startsAt=p(t.startsAt),this.endsAt=p(t.endsAt),this._evaluateVisibility()}_evaluateVisibility(){if(this.version.length===0){this.src.length===0&&console.warn("[hot-announcement] `version` is required so dismissal can be keyed per release. Banner hidden."),this.visible=!1;return}let t=Date.now();if(this.startsAt&&t<this.startsAt.getTime()){this.visible=!1;return}if(this.endsAt&&t>this.endsAt.getTime()){this.visible=!1;return}let l=localStorage.getItem(this.storageFullKey())==="true";this.visible=!l}render(){return this.visible?u`
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?u`<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}};f=new WeakMap,v=new WeakMap,y=new WeakMap,w=new WeakMap,x=new WeakMap,A=new WeakMap,k=new WeakMap,e.styles=g`
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
+ `,s([a({type:String})],e.prototype,"version",1),s([a({type:String})],e.prototype,"title",1),s([a({type:String})],e.prototype,"message",1),s([a({type:String})],e.prototype,"variant",1),s([a({type:String,attribute:"dismiss-label"})],e.prototype,"dismissLabel",1),s([a({type:String,attribute:"storage-key"})],e.prototype,"storageKey",1),s([a({type:String})],e.prototype,"src",1),s([d()],e.prototype,"visible",2),s([d()],e.prototype,"startsAt",2),s([d()],e.prototype,"endsAt",2);var $=e;export{e as a,$ 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;
@@ -0,0 +1,47 @@
1
+ import { LitElement } from "lit";
2
+ import type { PropertyValues } from "lit";
3
+ declare const VARIANTS: readonly ["brand", "success", "neutral", "warning"];
4
+ type AnnouncementVariant = (typeof VARIANTS)[number];
5
+ export declare class Announcement extends LitElement {
6
+ name: string;
7
+ /** Release identifier used to key dismissal state. Required. */
8
+ accessor version: string;
9
+ /** Optional bold headline shown before the body content. */
10
+ accessor title: string;
11
+ /** Plain-text body shown when no slotted content is provided. */
12
+ accessor message: string;
13
+ /** Visual variant mapped onto wa-callout. */
14
+ accessor variant: AnnouncementVariant;
15
+ /** Aria-label for the dismiss button. */
16
+ accessor dismissLabel: string;
17
+ /**
18
+ * Prefix for the localStorage key. The full key is
19
+ * `${storageKey}-${version}-dismissed`. Override to run multiple
20
+ * independent banners on the same origin.
21
+ */
22
+ accessor storageKey: string;
23
+ /**
24
+ * Optional URL to a JSON config file. When set, the component fetches
25
+ * the config and uses it to drive the banner - letting ops update or
26
+ * remove notices without redeploying. Any fetch/parse failure or empty
27
+ * body silently hides the banner. Schema:
28
+ * { version, title?, message?, variant?, startsAt?, endsAt? }
29
+ */
30
+ accessor src: string;
31
+ private visible;
32
+ private startsAt;
33
+ private endsAt;
34
+ private fetchAbort;
35
+ static styles: import("lit").CSSResult;
36
+ private storageFullKey;
37
+ /** Dismiss the banner and persist the choice for this version. */
38
+ dismiss(): void;
39
+ connectedCallback(): void;
40
+ disconnectedCallback(): void;
41
+ protected willUpdate(changedProps: PropertyValues): void;
42
+ private _loadRemoteConfig;
43
+ private _applyRemoteConfig;
44
+ private _evaluateVisibility;
45
+ protected render(): import("lit").TemplateResult<1> | null;
46
+ }
47
+ export default Announcement;
@@ -0,0 +1 @@
1
+ import{a,b}from"../../chunks/chunk.NZ24D6VL.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.AD6PBOLJ.js";import"../../chunks/chunk.NZ24D6VL.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.L7KUSNV7.js";import"../../chunks/chunk.MKQTK2RW.js";import"../../chunks/chunk.NCBKWO6J.js";import"../../chunks/chunk.UVBWHOA2.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.L7KUSNV7.js";import"../../chunks/chunk.MKQTK2RW.js";import"../../chunks/chunk.NCBKWO6J.js";import"../../chunks/chunk.UVBWHOA2.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};
@@ -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.V5BQICX2.js";import"./chunks/chunk.DNXHV7I7.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 S}from"./chunks/chunk.NZMGMJCM.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.AD6PBOLJ.js";import"./chunks/chunk.NZ24D6VL.js";import{a as d}from"./chunks/chunk.N7SRHM5F.js";import"./chunks/chunk.ZZ7X3H3S.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.TUEFHEUN.js";import"./chunks/chunk.IKKWEPSE.js";import"./chunks/chunk.L7KUSNV7.js";import{a as h}from"./chunks/chunk.MKQTK2RW.js";import"./chunks/chunk.NCBKWO6J.js";import"./chunks/chunk.UVBWHOA2.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.2",
3
+ "version": "0.10.1",
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",