@hotosm/ui 0.3.1-b7 → 0.3.1-b8

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.MIYFUINI.js";var n=e;customElements.define("hot-consent",e);export{n as a};
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk.AUBRGELY.js";var r=e;customElements.define("hot-header",e);export{r as a};
@@ -1,4 +1,4 @@
1
- import{a as q,b as z}from"./chunk.IG27I42A.js";import{a as O,b as g,c as i,d as k,e as C,f as W}from"./chunk.D2BMH7HD.js";import{a as y,b as s,c as D,d as x}from"./chunk.6ZDEZIWM.js";import{a as M}from"./chunk.KO4EOD3I.js";import{e as r,k as B}from"./chunk.U4P7XQR4.js";import{a as A,d as h,e as p,f as u,g as b}from"./chunk.NI7UJOOZ.js";function rt(t,n){return{top:Math.round(t.getBoundingClientRect().top-n.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-n.getBoundingClientRect().left)}}var T=new Set;function lt(){let t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function ct(){let t=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(t)||!t?0:t}function $(t){if(T.add(t),!document.documentElement.classList.contains("wa-scroll-lock")){let n=lt()+ct(),e=getComputedStyle(document.documentElement).scrollbarGutter;(!e||e==="auto")&&(e="stable"),n<2&&(e=""),document.documentElement.style.setProperty("--wa-scroll-lock-gutter",e),document.documentElement.classList.add("wa-scroll-lock"),document.documentElement.style.setProperty("--wa-scroll-lock-size",`${n}px`)}}function P(t){T.delete(t),T.size===0&&(document.documentElement.classList.remove("wa-scroll-lock"),document.documentElement.style.removeProperty("--wa-scroll-lock-size"))}function I(t,n,e="vertical",o="smooth"){let a=rt(t,n),l=a.top+n.scrollTop,c=a.left+n.scrollLeft,f=n.scrollLeft,E=n.scrollLeft+n.offsetWidth,it=n.scrollTop,st=n.scrollTop+n.offsetHeight;(e==="horizontal"||e==="both")&&(c<f?n.scrollTo({left:c,behavior:o}):c+t.clientWidth>E&&n.scrollTo({left:c-n.offsetWidth+t.clientWidth,behavior:o})),(e==="vertical"||e==="both")&&(l<it?n.scrollTo({top:l,behavior:o}):l+t.clientHeight>st&&n.scrollTo({top:l-n.offsetHeight+t.clientHeight,behavior:o}))}var dt=class extends Event{constructor(t){super("wa-tab-hide",{bubbles:!0,cancelable:!1,composed:!0}),this.detail=t}},ht=class extends Event{constructor(t){super("wa-tab-show",{bubbles:!0,cancelable:!1,composed:!0}),this.detail=t}},pt=`:host {
1
+ import{a as O,b as g,c as i,d as k,e as C,f as W}from"./chunk.D2BMH7HD.js";import{a as y,b as s,c as D,d as x}from"./chunk.6ZDEZIWM.js";import{a as M}from"./chunk.KO4EOD3I.js";import{a as q,b as z}from"./chunk.IG27I42A.js";import{e as r,k as B}from"./chunk.U4P7XQR4.js";import{a as A,d as h,e as p,f as u,g as b}from"./chunk.NI7UJOOZ.js";function rt(t,n){return{top:Math.round(t.getBoundingClientRect().top-n.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-n.getBoundingClientRect().left)}}var T=new Set;function lt(){let t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function ct(){let t=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(t)||!t?0:t}function $(t){if(T.add(t),!document.documentElement.classList.contains("wa-scroll-lock")){let n=lt()+ct(),e=getComputedStyle(document.documentElement).scrollbarGutter;(!e||e==="auto")&&(e="stable"),n<2&&(e=""),document.documentElement.style.setProperty("--wa-scroll-lock-gutter",e),document.documentElement.classList.add("wa-scroll-lock"),document.documentElement.style.setProperty("--wa-scroll-lock-size",`${n}px`)}}function P(t){T.delete(t),T.size===0&&(document.documentElement.classList.remove("wa-scroll-lock"),document.documentElement.style.removeProperty("--wa-scroll-lock-size"))}function I(t,n,e="vertical",o="smooth"){let a=rt(t,n),l=a.top+n.scrollTop,c=a.left+n.scrollLeft,f=n.scrollLeft,E=n.scrollLeft+n.offsetWidth,it=n.scrollTop,st=n.scrollTop+n.offsetHeight;(e==="horizontal"||e==="both")&&(c<f?n.scrollTo({left:c,behavior:o}):c+t.clientWidth>E&&n.scrollTo({left:c-n.offsetWidth+t.clientWidth,behavior:o})),(e==="vertical"||e==="both")&&(l<it?n.scrollTo({top:l,behavior:o}):l+t.clientHeight>st&&n.scrollTo({top:l-n.offsetHeight+t.clientHeight,behavior:o}))}var dt=class extends Event{constructor(t){super("wa-tab-hide",{bubbles:!0,cancelable:!1,composed:!0}),this.detail=t}},ht=class extends Event{constructor(t){super("wa-tab-show",{bubbles:!0,cancelable:!1,composed:!0}),this.detail=t}},pt=`:host {
2
2
  --indicator-color: var(--wa-color-brand-fill-loud);
3
3
  --track-color: var(--wa-color-neutral-fill-normal);
4
4
  --track-width: 0.125rem;
@@ -1,4 +1,4 @@
1
- import{b as o}from"./chunk.6ZDEZIWM.js";import{a as l}from"./chunk.KO4EOD3I.js";import{a as d}from"./chunk.T4GALJJA.js";import{e as r,k as c}from"./chunk.U4P7XQR4.js";import{d as s,e as a,f as n,g as i}from"./chunk.NI7UJOOZ.js";l();var u,g,p,b,h,m,v,e=class extends c{constructor(){super(...arguments);this.name="hot-consent";n(this,u,"");n(this,g,!1);n(this,p,!0);n(this,b,"About the information we collect");n(this,h,"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,v,"I Do Not Agree")}get consentId(){return a(this,u)}set consentId(t){i(this,u,t)}get force(){return a(this,g)}set force(t){i(this,g,t)}get isOpen(){return a(this,p)}set isOpen(t){i(this,p,t)}get title(){return a(this,b)}set title(t){i(this,b,t)}get message(){return a(this,h)}set message(t){i(this,h,t)}get agreeLabel(){return a(this,m)}set agreeLabel(t){i(this,m,t)}get notAgreeLabel(){return a(this,v)}set notAgreeLabel(t){i(this,v,t)}render(){return this.isOpen?r`
1
+ import{a as d}from"./chunk.T4GALJJA.js";import{b as o}from"./chunk.6ZDEZIWM.js";import{a as l}from"./chunk.KO4EOD3I.js";import{e as r,k as c}from"./chunk.U4P7XQR4.js";import{d as s,e as a,f as n,g as i}from"./chunk.NI7UJOOZ.js";l();var u,g,p,b,h,m,v,e=class extends c{constructor(){super(...arguments);this.name="hot-consent";n(this,u,"");n(this,g,!1);n(this,p,!0);n(this,b,"About the information we collect");n(this,h,"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,v,"I Do Not Agree")}get consentId(){return a(this,u)}set consentId(t){i(this,u,t)}get force(){return a(this,g)}set force(t){i(this,g,t)}get isOpen(){return a(this,p)}set isOpen(t){i(this,p,t)}get title(){return a(this,b)}set title(t){i(this,b,t)}get message(){return a(this,h)}set message(t){i(this,h,t)}get agreeLabel(){return a(this,m)}set agreeLabel(t){i(this,m,t)}get notAgreeLabel(){return a(this,v)}set notAgreeLabel(t){i(this,v,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{a,b}from"../../chunks/chunk.CS56NBTQ.js";import"../../chunks/chunk.LPSHZWUY.js";import"../../chunks/chunk.D2BMH7HD.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.T4GALJJA.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Consent,b as default};
1
+ import{a,b}from"../../chunks/chunk.MIYFUINI.js";import"../../chunks/chunk.LPSHZWUY.js";import"../../chunks/chunk.T4GALJJA.js";import"../../chunks/chunk.D2BMH7HD.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Consent,b as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.UYOJKKGV.js";import"../../chunks/chunk.CS56NBTQ.js";import"../../chunks/chunk.LPSHZWUY.js";import"../../chunks/chunk.D2BMH7HD.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.T4GALJJA.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.456NATDG.js";import"../../chunks/chunk.MIYFUINI.js";import"../../chunks/chunk.LPSHZWUY.js";import"../../chunks/chunk.T4GALJJA.js";import"../../chunks/chunk.D2BMH7HD.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as default};
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk.SVJY4SS3.js";import"../../chunks/chunk.IG27I42A.js";import"../../chunks/chunk.D2BMH7HD.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Header,b as default};
1
+ import{a,b}from"../../chunks/chunk.AUBRGELY.js";import"../../chunks/chunk.D2BMH7HD.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.IG27I42A.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Header,b as default};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk.EPRR7SLL.js";import"../../chunks/chunk.SVJY4SS3.js";import"../../chunks/chunk.IG27I42A.js";import"../../chunks/chunk.D2BMH7HD.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as default};
1
+ import{a}from"../../chunks/chunk.AP2LRWVP.js";import"../../chunks/chunk.AUBRGELY.js";import"../../chunks/chunk.D2BMH7HD.js";import"../../chunks/chunk.6ZDEZIWM.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.IG27I42A.js";import"../../chunks/chunk.U4P7XQR4.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as default};
package/dist/hotosm-ui.js CHANGED
@@ -1 +1 @@
1
- import{a as r}from"./chunks/chunk.SZ46YTWY.js";import"./chunks/chunk.7RJ72M75.js";import"./chunks/chunk.UTSKEKTV.js";import{a as t}from"./chunks/chunk.YYEOK7MA.js";import"./chunks/chunk.PDLGEB7T.js";import{a as o}from"./chunks/chunk.EPRR7SLL.js";import"./chunks/chunk.SVJY4SS3.js";import"./chunks/chunk.IG27I42A.js";import{a}from"./chunks/chunk.UYOJKKGV.js";import"./chunks/chunk.CS56NBTQ.js";import"./chunks/chunk.LPSHZWUY.js";import"./chunks/chunk.D2BMH7HD.js";import"./chunks/chunk.6ZDEZIWM.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.T4GALJJA.js";import"./chunks/chunk.U4P7XQR4.js";import"./chunks/chunk.NI7UJOOZ.js";export{a as Consent,o as Header,r as Logo,t as Tracking};
1
+ import{a as r}from"./chunks/chunk.SZ46YTWY.js";import"./chunks/chunk.7RJ72M75.js";import"./chunks/chunk.UTSKEKTV.js";import{a as t}from"./chunks/chunk.YYEOK7MA.js";import"./chunks/chunk.PDLGEB7T.js";import{a}from"./chunks/chunk.456NATDG.js";import"./chunks/chunk.MIYFUINI.js";import"./chunks/chunk.LPSHZWUY.js";import"./chunks/chunk.T4GALJJA.js";import{a as o}from"./chunks/chunk.AP2LRWVP.js";import"./chunks/chunk.AUBRGELY.js";import"./chunks/chunk.D2BMH7HD.js";import"./chunks/chunk.6ZDEZIWM.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.IG27I42A.js";import"./chunks/chunk.U4P7XQR4.js";import"./chunks/chunk.NI7UJOOZ.js";export{a as Consent,o as Header,r as Logo,t as Tracking};
@@ -94,6 +94,79 @@
94
94
  --hot-color-gray-100: #E1E0E1;
95
95
  --hot-color-gray-50: #F3F3F3;
96
96
 
97
+ /*
98
+ * Semantic Colors
99
+ * These map primitive colors to semantic meanings
100
+ */
101
+
102
+ /* Primary colors (HOT brand color - red) */
103
+ --hot-color-primary-950: var(--hot-color-red-950);
104
+ --hot-color-primary-900: var(--hot-color-red-900);
105
+ --hot-color-primary-800: var(--hot-color-red-800);
106
+ --hot-color-primary-700: var(--hot-color-red-700);
107
+ --hot-color-primary-600: var(--hot-color-red-600);
108
+ --hot-color-primary-500: var(--hot-color-red-500);
109
+ --hot-color-primary-400: var(--hot-color-red-400);
110
+ --hot-color-primary-300: var(--hot-color-red-300);
111
+ --hot-color-primary-200: var(--hot-color-red-200);
112
+ --hot-color-primary-100: var(--hot-color-red-100);
113
+ --hot-color-primary-50: var(--hot-color-red-50);
114
+
115
+ /* Danger colors (red) */
116
+ --hot-color-danger-950: var(--hot-color-red-950);
117
+ --hot-color-danger-900: var(--hot-color-red-900);
118
+ --hot-color-danger-800: var(--hot-color-red-800);
119
+ --hot-color-danger-700: var(--hot-color-red-700);
120
+ --hot-color-danger-600: var(--hot-color-red-600);
121
+ --hot-color-danger-500: var(--hot-color-red-500);
122
+ --hot-color-danger-400: var(--hot-color-red-400);
123
+ --hot-color-danger-300: var(--hot-color-red-300);
124
+ --hot-color-danger-200: var(--hot-color-red-200);
125
+ --hot-color-danger-100: var(--hot-color-red-100);
126
+ --hot-color-danger-50: var(--hot-color-red-50);
127
+
128
+ /* Warning colors (yellow) */
129
+ --hot-color-warning-950: var(--hot-color-yellow-950);
130
+ --hot-color-warning-900: var(--hot-color-yellow-900);
131
+ --hot-color-warning-800: var(--hot-color-yellow-800);
132
+ --hot-color-warning-700: var(--hot-color-yellow-700);
133
+ --hot-color-warning-600: var(--hot-color-yellow-600);
134
+ --hot-color-warning-500: var(--hot-color-yellow-500);
135
+ --hot-color-warning-400: var(--hot-color-yellow-400);
136
+ --hot-color-warning-300: var(--hot-color-yellow-300);
137
+ --hot-color-warning-200: var(--hot-color-yellow-200);
138
+ --hot-color-warning-100: var(--hot-color-yellow-100);
139
+ --hot-color-warning-50: var(--hot-color-yellow-50);
140
+
141
+ /* Success colors (green - using WebAwesome green values) */
142
+ --hot-color-success-950: #031608;
143
+ --hot-color-success-900: #052310;
144
+ --hot-color-success-800: #0a3a1d;
145
+ --hot-color-success-700: #0a5027;
146
+ --hot-color-success-600: #036730;
147
+ --hot-color-success-500: #00883c;
148
+ --hot-color-success-400: #00ac49;
149
+ --hot-color-success-300: #5dc36f;
150
+ --hot-color-success-200: #93da98;
151
+ --hot-color-success-100: #c2f2c1;
152
+ --hot-color-success-50: #e3f9e3;
153
+
154
+ /* Neutral colors (gray) */
155
+ --hot-color-neutral-1000: #ffffff;
156
+ --hot-color-neutral-950: var(--hot-color-gray-950);
157
+ --hot-color-neutral-900: var(--hot-color-gray-900);
158
+ --hot-color-neutral-800: var(--hot-color-gray-800);
159
+ --hot-color-neutral-700: var(--hot-color-gray-700);
160
+ --hot-color-neutral-600: var(--hot-color-gray-600);
161
+ --hot-color-neutral-500: var(--hot-color-gray-500);
162
+ --hot-color-neutral-400: var(--hot-color-gray-400);
163
+ --hot-color-neutral-300: var(--hot-color-gray-300);
164
+ --hot-color-neutral-200: var(--hot-color-gray-200);
165
+ --hot-color-neutral-100: var(--hot-color-gray-100);
166
+ --hot-color-neutral-50: var(--hot-color-gray-50);
167
+ --hot-color-neutral-0: #000000;
168
+
169
+
97
170
  /*
98
171
  * Typography
99
172
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotosm/ui",
3
- "version": "0.3.1-b7",
3
+ "version": "0.3.1-b8",
4
4
  "description": "Shared UI components with HOT theming.",
5
5
  "homepage": "https://github.com/hotosm/ui#readme",
6
6
  "author": {
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk.SVJY4SS3.js";var r=e;customElements.define("hot-header",e);export{r as a};
@@ -1 +0,0 @@
1
- import{b as e}from"./chunk.CS56NBTQ.js";var n=e;customElements.define("hot-consent",e);export{n as a};