@hotosm/ui 0.3.0-b8 → 0.3.1-b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/logo/osm-logo.png +0 -0
- package/dist/chunks/chunk.277I73JI.js +218 -0
- package/dist/chunks/chunk.2C7KHCNI.js +40 -0
- package/dist/chunks/chunk.3BMRK6RX.js +94 -0
- package/dist/chunks/chunk.6QXNTVCU.js +1 -0
- package/dist/chunks/chunk.7P5E5KMI.js +73 -0
- package/dist/chunks/chunk.BLTVEIFI.js +1 -0
- package/dist/chunks/chunk.DQ7UCE7O.js +6 -0
- package/dist/chunks/chunk.GRD7DOAE.js +14 -0
- package/dist/chunks/chunk.GTA7FK6E.js +1 -0
- package/dist/chunks/chunk.H27BHZTL.js +1 -0
- package/dist/chunks/chunk.KO4EOD3I.js +1 -0
- package/dist/chunks/chunk.N5L63ITD.js +171 -0
- package/dist/chunks/chunk.NK4IZUTO.js +1 -0
- package/dist/chunks/chunk.PICS5Z5K.js +1 -0
- package/dist/chunks/chunk.RGDK5VTE.js +1 -0
- package/dist/chunks/chunk.TJK2P3MY.js +239 -0
- package/dist/chunks/{chunk.KTVXG6ZT.js → chunk.TVZQJVLS.js} +1 -1
- package/dist/chunks/chunk.V76UU3GK.js +1 -0
- package/dist/chunks/chunk.W5TPMQK4.js +1 -0
- package/dist/chunks/chunk.XYLRVYKD.js +36 -0
- package/dist/components/consent/consent.component.js +1 -1
- package/dist/components/consent/consent.js +1 -1
- package/dist/components/consent/consent.styles.js +1 -1
- package/dist/components/header/header.component.js +1 -1
- package/dist/components/header/header.js +1 -1
- package/dist/components/header/header.styles.js +1 -1
- package/dist/components/icons.js +1 -1
- package/dist/components/logo/logo.component.js +1 -1
- package/dist/components/logo/logo.js +1 -1
- package/dist/components/logo/logo.styles.js +1 -1
- package/dist/components/tracking/tracking.component.js +1 -1
- package/dist/components/tracking/tracking.js +1 -1
- package/dist/hotosm-ui.js +1 -1
- package/dist/react/consent/index.js +1 -1
- package/dist/react/header/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/logo/index.js +1 -1
- package/dist/react/tracking/index.js +1 -1
- package/dist/themes/hot-wa.css +179 -0
- package/package.json +2 -4
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import{a as v}from"./chunk.2C7KHCNI.js";import{a as c,c as u}from"./chunk.RGDK5VTE.js";function p(t){var o,e,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(o=0;o<i;o++)t[o]&&(e=p(t[o]))&&(r&&(r+=" "),r+=e)}else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function b(){for(var t,o,e=0,r="",i=arguments.length;e<i;e++)(t=arguments[e])&&(o=p(t))&&(r&&(r+=" "),r+=o);return r}var x=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,y=b,w=(t,o)=>e=>{var r;if((o==null?void 0:o.variants)==null)return y(t,e==null?void 0:e.class,e==null?void 0:e.className);let{variants:i,defaultVariants:s}=o,z=Object.keys(i).map(a=>{let n=e==null?void 0:e[a],d=s==null?void 0:s[a];if(n===null)return null;let l=x(n)||x(d);return i[a][l]}),h=e&&Object.entries(e).reduce((a,n)=>{let[d,l]=n;return l===void 0||(a[d]=l),a},{}),j=o==null||(r=o.compoundVariants)===null||r===void 0?void 0:r.reduce((a,n)=>{let g=n,{class:d,className:l}=g,k=u(g,["class","className"]);return Object.entries(k).every(V=>{let[f,m]=V;return Array.isArray(m)?m.includes(c(c({},s),h)[f]):c(c({},s),h)[f]===m})?[...a,d,l]:a},[]);return y(t,z,j,e==null?void 0:e.class,e==null?void 0:e.className)};var _=w(`
|
|
2
|
+
header
|
|
3
|
+
`,{variants:{size:{small:"header--size-small",medium:"header--size-medium",large:"header--size-large"},borderBottom:{true:"border-bottom"}}}),B=v`
|
|
4
|
+
.header {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
padding: 0 var(--hot-spacing-small);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.header.border-bottom {
|
|
12
|
+
border-bottom: var(--hot-spacing-3x-small) solid var(--hot-color-neutral-50);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.header--size-small {
|
|
16
|
+
height: var(--hot-spacing-4x-large);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.header--size-medium {
|
|
20
|
+
height: calc(var(--hot-spacing-4x-large) * 2);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.header--size-large {
|
|
24
|
+
height: calc(var(--hot-spacing-4x-large) * 4);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.header--link {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
gap: var(--hot-spacing-small);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.header--title {
|
|
36
|
+
color: var(--hot-color-neutral-950);
|
|
37
|
+
font-family: var(--hot-font-sans);
|
|
38
|
+
font-size: var(--hot-font-size-x-large);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.header--tab::part(base) {
|
|
42
|
+
font-size: var(--hot-font-size-medium);
|
|
43
|
+
font-weight: var(--hot-font-weight-normal);
|
|
44
|
+
color: var(--hot-color-neutral-950);
|
|
45
|
+
padding: var(--hot-spacing-small) var(--hot-spacing-small);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.header--tab-group::part(base) {
|
|
49
|
+
--track-color: transparent;
|
|
50
|
+
--indicator-color: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.header--nav {
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
justify-items: center;
|
|
56
|
+
gap: var(--hot-spacing-medium);
|
|
57
|
+
font-weight: var(--hot-font-weight-semibold);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.header--nav-mobile {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.header--person-circle {
|
|
64
|
+
font-size: var(--hot-font-size-x-large);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.header--drawer {
|
|
68
|
+
font-size: var(--hot-font-size-x-large)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.header--right-section {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: var(--hot-spacing-small);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.header--login-button {
|
|
78
|
+
--wa-color-brand-600: var(--hot-color-red-500);
|
|
79
|
+
--wa-color-brand-700: var(--hot-color-red-600);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.header--logo-img {
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.header--tab {
|
|
86
|
+
border-bottom: 2px solid;
|
|
87
|
+
border-color: transparent;
|
|
88
|
+
}
|
|
89
|
+
.header--tab-active {
|
|
90
|
+
border-color: var(--hot-color-neutral-1000);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Login Modal Styles */
|
|
94
|
+
.login-modal {
|
|
95
|
+
--width: 35rem;
|
|
96
|
+
--border-radius: 8px;
|
|
97
|
+
--background-color: white;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.login-modal::part(header) {
|
|
101
|
+
padding: 1.5rem 1.5rem 0 1.5rem;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.login-modal::part(body) {
|
|
105
|
+
padding: 0 1.5rem 1.5rem 1.5rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.login-content {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
align-items: flex-start;
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.login-title {
|
|
116
|
+
font-size: 1.5rem;
|
|
117
|
+
font-weight: 700;
|
|
118
|
+
margin-bottom: 1rem;
|
|
119
|
+
color: #1f2937;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.login-options {
|
|
123
|
+
width: 100%;
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: 1rem;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.login-option {
|
|
130
|
+
background-color: #f5f5f5;
|
|
131
|
+
border: 1px solid #d1d5db;
|
|
132
|
+
color: #374151;
|
|
133
|
+
padding: 0.75rem 1rem;
|
|
134
|
+
border-radius: 6px;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
font-size: 0.875rem;
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 0.75rem;
|
|
140
|
+
transition: all 0.3s ease;
|
|
141
|
+
min-height: 3rem;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.login-option:hover {
|
|
145
|
+
border-color: #d73f3f;
|
|
146
|
+
color: #d73f3f;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.login-option-icon {
|
|
150
|
+
width: 2.5rem;
|
|
151
|
+
height: 2.5rem;
|
|
152
|
+
max-width: 2.5rem;
|
|
153
|
+
min-width: 2.5rem;
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
flex-shrink: 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.login-option-icon img {
|
|
161
|
+
width: 100%;
|
|
162
|
+
height: 100%;
|
|
163
|
+
object-fit: contain;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.login-option-text {
|
|
167
|
+
font-size: 1.125rem;
|
|
168
|
+
font-weight: 400;
|
|
169
|
+
line-height: 1.5;
|
|
170
|
+
}
|
|
171
|
+
`;export{_ as a,B as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk.GRD7DOAE.js";import{a as r,b as t,e as m}from"./chunk.RGDK5VTE.js";var e=m(n(),1);var a=e.default.forwardRef((d,o)=>e.default.createElement("hot-header",t(r({},d),{ref:o})));a.displayName="Header";var p=a;export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l}from"./chunk.GRD7DOAE.js";import{a as e,b as t,e as f}from"./chunk.RGDK5VTE.js";var o=f(l(),1);var r=o.default.forwardRef((a,m)=>o.default.createElement("hot-logo",t(e({},a),{ref:m})));r.displayName="Logo";var c=r;export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=Object.create;var g=Object.defineProperty,p=Object.defineProperties,l=Object.getOwnPropertyDescriptor,q=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var k=(a,b,c)=>b in a?g(a,b,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[b]=c,u=(a,b)=>{for(var c in b||(b={}))j.call(b,c)&&k(a,c,b[c]);if(f)for(var c of f(b))m.call(b,c)&&k(a,c,b[c]);return a},v=(a,b)=>p(a,q(b));var w=(a,b)=>{var c={};for(var d in a)j.call(a,d)&&b.indexOf(d)<0&&(c[d]=a[d]);if(a!=null&&f)for(var d of f(a))b.indexOf(d)<0&&m.call(a,d)&&(c[d]=a[d]);return c};var x=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var t=(a,b,c,d)=>{if(b&&typeof b=="object"||typeof b=="function")for(let e of r(b))!j.call(a,e)&&e!==c&&g(a,e,{get:()=>b[e],enumerable:!(d=l(b,e))||d.enumerable});return a};var y=(a,b,c)=>(c=a!=null?o(s(a)):{},t(b||!a||!a.__esModule?g(c,"default",{value:a,enumerable:!0}):c,a));var z=(a,b,c,d)=>{for(var e=d>1?void 0:d?l(b,c):b,h=a.length-1,i;h>=0;h--)(i=a[h])&&(e=(d?i(b,c,e):i(e))||e);return d&&e&&g(b,c,e),e};var n=(a,b,c)=>{if(!b.has(a))throw TypeError("Cannot "+c)};var A=(a,b,c)=>(n(a,b,"read from private field"),c?c.call(a):b.get(a)),B=(a,b,c)=>{if(b.has(a))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(a):b.set(a,c)},C=(a,b,c,d)=>(n(a,b,"write to private field"),d?d.call(a,c):b.set(a,c),c);export{u as a,v as b,w as c,x as d,y as e,z as f,A as g,B as h,C as i};
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import{a as c,b as r}from"./chunk.7P5E5KMI.js";import{a as b,d as l,e as u}from"./chunk.2C7KHCNI.js";import{f as a,g as n,h as s,i}from"./chunk.RGDK5VTE.js";import"https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/callout/callout.js";import"https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/button/button.js";import"https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/icon/icon.js";var w,m,f,x,v,t=class extends u{constructor(){super(...arguments);this.name="hot-tracking";s(this,w,"");s(this,m,"");s(this,f,"https://matomo.hotosm.org");s(this,x,!0);s(this,v,"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 n(this,w)}set siteId(e){i(this,w,e)}get domain(){return n(this,m)}set domain(e){i(this,m,e)}get matomoURL(){return n(this,f)}set matomoURL(e){i(this,f,e)}get showConsent(){return n(this,x)}set showConsent(e){i(this,x,e)}get consentMessage(){return n(this,v)}set consentMessage(e){i(this,v,e)}agree(){this.consentGiven=!0,this.consentShown=!1;let e=window._paq=window._paq||[];e.length!==0&&(e.push(["rememberConsentGiven"]),e.push(["trackPageView"]),this.showSuccessCallout("Tracking consent granted. Thank you!"))}disagree(){this.consentGiven=!1,this.consentShown=!1;let e=window._paq=window._paq||[];e.length!==0&&(e.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`
|
|
3
|
+
<div class="error-banner">
|
|
4
|
+
<wa-callout style="padding: 1rem;" variant="danger" appearance="outlined filled" size="large">
|
|
5
|
+
<wa-icon slot="icon" family="classic" variant="solid" name="circle-exclamation"></wa-icon>
|
|
6
|
+
<div style="padding: 0 1rem;">
|
|
7
|
+
<strong>Tracking Configuration Error</strong><br />
|
|
8
|
+
${this.errorMessage}
|
|
9
|
+
</div>
|
|
10
|
+
</wa-callout>
|
|
11
|
+
</div>
|
|
12
|
+
`:""}
|
|
13
|
+
|
|
14
|
+
${this.showSuccess?l`
|
|
15
|
+
<div class="toast-banner">
|
|
16
|
+
<wa-callout style="padding: 1rem;" variant="success" appearance="outlined accent" size="medium">
|
|
17
|
+
<wa-icon slot="icon" family="classic" variant="solid" name="circle-check"></wa-icon>
|
|
18
|
+
<div style="padding: 0 1rem;">
|
|
19
|
+
<strong>Success!</strong><br />
|
|
20
|
+
${this.successMessage}
|
|
21
|
+
</div>
|
|
22
|
+
</wa-callout>
|
|
23
|
+
</div>
|
|
24
|
+
`:""}
|
|
25
|
+
|
|
26
|
+
${this.showInfo?l`
|
|
27
|
+
<div class="toast-banner">
|
|
28
|
+
<wa-callout style="padding: 1rem;" variant="brand" appearance="outlined filled" size="medium">
|
|
29
|
+
<wa-icon slot="icon" family="classic" variant="solid" name="circle-info"></wa-icon>
|
|
30
|
+
<div style="padding: 0 1rem;">
|
|
31
|
+
<strong>Information</strong><br />
|
|
32
|
+
${this.infoMessage}
|
|
33
|
+
</div>
|
|
34
|
+
</wa-callout>
|
|
35
|
+
</div>
|
|
36
|
+
`:""}
|
|
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>
|
|
55
|
+
</div>
|
|
56
|
+
`:""}
|
|
57
|
+
`}connectedCallback(){if(super.connectedCallback(),window.location.hostname!==this.domain){this.showErrorCallout(`Matomo tracking is not configured for this domain. Current domain: ${window.location.hostname}, Expected: ${this.domain}`);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}console.log(`Setting Matomo tracking for site=${e} domain=${this.domain}`);let o=window._paq=window._paq||[];o.push(["requireConsent"]),o.push(["setDomains",[this.domain]]),o.push(["enableLinkTracking"]),o.push(["trackVisibleContentImpressions"]),function(h){o.push(["setTrackerUrl",`${h}/matomo.php`]),o.push(["setSiteId",e]);let g=document,p=g.createElement("script"),d=g.getElementsByTagName("script")[0];(d==null?void 0:d.parentNode)!=null?(p.async=!0,p.src=`${h}/matomo.js`,d.parentNode.insertBefore(p,d)):console.warn("Script insertion failed. Parent node is null.")}(this.matomoURL),setTimeout(()=>{this.showConsentBanner()},1e3)}};w=new WeakMap,m=new WeakMap,f=new WeakMap,x=new WeakMap,v=new WeakMap,t.styles=b`
|
|
58
|
+
:host {
|
|
59
|
+
display: block;
|
|
60
|
+
font-family: var(--wa-font-sans);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.consent-banner {
|
|
64
|
+
position: fixed;
|
|
65
|
+
bottom: 0;
|
|
66
|
+
left: 0;
|
|
67
|
+
right: 0;
|
|
68
|
+
z-index: 1000;
|
|
69
|
+
padding: 1rem;
|
|
70
|
+
background: rgba(255, 255, 255, 0.95);
|
|
71
|
+
backdrop-filter: blur(10px);
|
|
72
|
+
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.error-banner {
|
|
76
|
+
position: fixed;
|
|
77
|
+
top: 1rem;
|
|
78
|
+
left: 1rem;
|
|
79
|
+
right: 1rem;
|
|
80
|
+
z-index: 1001;
|
|
81
|
+
max-width: 600px;
|
|
82
|
+
margin: 0 auto;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.toast-banner {
|
|
86
|
+
position: fixed;
|
|
87
|
+
top: 1rem;
|
|
88
|
+
right: 1rem;
|
|
89
|
+
z-index: 1002;
|
|
90
|
+
max-width: 450px;
|
|
91
|
+
animation: slideIn 0.3s ease-out;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@keyframes slideIn {
|
|
95
|
+
from {
|
|
96
|
+
transform: translateX(100%);
|
|
97
|
+
opacity: 0;
|
|
98
|
+
}
|
|
99
|
+
to {
|
|
100
|
+
transform: translateX(0);
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.consent-actions {
|
|
106
|
+
display: flex;
|
|
107
|
+
gap: 0.75rem;
|
|
108
|
+
margin-top: 1rem;
|
|
109
|
+
justify-content: flex-end;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
wa-callout {
|
|
113
|
+
--wa-callout-spacing: 1.5rem;
|
|
114
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
|
|
115
|
+
border-radius: 12px;
|
|
116
|
+
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
117
|
+
backdrop-filter: blur(8px);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
wa-button {
|
|
121
|
+
min-width: 80px;
|
|
122
|
+
font-weight: 500;
|
|
123
|
+
transition: all 0.2s ease;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
wa-button:hover {
|
|
127
|
+
transform: translateY(-1px);
|
|
128
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.error-banner wa-callout {
|
|
132
|
+
border-radius: 16px;
|
|
133
|
+
box-shadow: 0 16px 48px rgba(243, 77, 71, 0.2);
|
|
134
|
+
border: 1px solid rgba(243, 77, 71, 0.2);
|
|
135
|
+
background: linear-gradient(135deg, rgba(254, 236, 239, 0.95), rgba(253, 208, 214, 0.95));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.error-banner wa-callout::before {
|
|
139
|
+
content: '';
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: 0;
|
|
142
|
+
left: 0;
|
|
143
|
+
right: 0;
|
|
144
|
+
height: 4px;
|
|
145
|
+
background: linear-gradient(90deg, var(--hot-color-red-500), var(--hot-color-red-600), var(--hot-color-red-700));
|
|
146
|
+
border-radius: 16px 16px 0 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.toast-banner wa-callout {
|
|
150
|
+
border-radius: 14px;
|
|
151
|
+
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
|
|
152
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
153
|
+
background: rgba(255, 255, 255, 0.98);
|
|
154
|
+
backdrop-filter: blur(12px);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.toast-banner wa-callout[variant="success"] {
|
|
158
|
+
box-shadow: 0 12px 40px rgba(34, 197, 94, 0.15);
|
|
159
|
+
border: 1px solid rgba(34, 197, 94, 0.2);
|
|
160
|
+
background: linear-gradient(135deg, rgba(240, 253, 244, 0.95), rgba(220, 252, 231, 0.95));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.toast-banner wa-callout[variant="success"]::before {
|
|
164
|
+
content: '';
|
|
165
|
+
position: absolute;
|
|
166
|
+
top: 0;
|
|
167
|
+
left: 0;
|
|
168
|
+
right: 0;
|
|
169
|
+
height: 3px;
|
|
170
|
+
background: linear-gradient(90deg, #22c55e, #16a34a);
|
|
171
|
+
border-radius: 14px 14px 0 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.toast-banner wa-callout[variant="brand"] {
|
|
175
|
+
box-shadow: 0 12px 40px rgba(243, 77, 71, 0.15);
|
|
176
|
+
border: 1px solid rgba(243, 77, 71, 0.2);
|
|
177
|
+
background: linear-gradient(135deg, rgba(254, 236, 239, 0.95), rgba(253, 208, 214, 0.95));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.toast-banner wa-callout[variant="brand"]::before {
|
|
181
|
+
content: '';
|
|
182
|
+
position: absolute;
|
|
183
|
+
top: 0;
|
|
184
|
+
left: 0;
|
|
185
|
+
right: 0;
|
|
186
|
+
height: 3px;
|
|
187
|
+
background: linear-gradient(90deg, var(--hot-color-red-500), var(--hot-color-red-600));
|
|
188
|
+
border-radius: 14px 14px 0 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.consent-banner wa-callout {
|
|
192
|
+
border-radius: 16px;
|
|
193
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
|
|
194
|
+
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
195
|
+
background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.98));
|
|
196
|
+
backdrop-filter: blur(16px);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.consent-banner wa-callout::before {
|
|
200
|
+
content: '';
|
|
201
|
+
position: absolute;
|
|
202
|
+
top: 0;
|
|
203
|
+
left: 0;
|
|
204
|
+
right: 0;
|
|
205
|
+
height: 4px;
|
|
206
|
+
background: linear-gradient(90deg, var(--hot-color-red-500), var(--hot-color-red-600), var(--hot-color-red-700));
|
|
207
|
+
border-radius: 16px 16px 0 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
wa-icon {
|
|
211
|
+
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@media (max-width: 768px) {
|
|
215
|
+
.consent-banner {
|
|
216
|
+
padding: 0.75rem;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.error-banner {
|
|
220
|
+
left: 0.5rem;
|
|
221
|
+
right: 0.5rem;
|
|
222
|
+
max-width: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.toast-banner {
|
|
226
|
+
right: 0.5rem;
|
|
227
|
+
max-width: calc(100vw - 1rem);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.consent-actions {
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
gap: 0.5rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
wa-button {
|
|
236
|
+
width: 100%;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
`,a([c({type:String,attribute:"site-id"})],t.prototype,"siteId",1),a([c({type:String})],t.prototype,"domain",1),a([c({type:String})],t.prototype,"matomoURL",1),a([c({type:Boolean,attribute:"show-consent"})],t.prototype,"showConsent",1),a([c({type:String,attribute:"consent-message"})],t.prototype,"consentMessage",1),a([r()],t.prototype,"consentGiven",2),a([r()],t.prototype,"consentShown",2),a([r()],t.prototype,"errorMessage",2),a([r()],t.prototype,"showError",2),a([r()],t.prototype,"successMessage",2),a([r()],t.prototype,"showSuccess",2),a([r()],t.prototype,"infoMessage",2),a([r()],t.prototype,"showInfo",2);var q=t;customElements.define("hot-tracking",t);export{t as a,q as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk.GRD7DOAE.js";import{a as t,b as e,e as i}from"./chunk.RGDK5VTE.js";var r=i(s(),1);var n=r.default.forwardRef((o,a)=>r.default.createElement("hot-tracking",e(t({},o),{ref:a})));n.displayName="Tracking";var g=n;export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk.3BMRK6RX.js";var r=e;export{r as a};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{a as d}from"./chunk.277I73JI.js";import{a as o}from"./chunk.7P5E5KMI.js";import{a as l}from"./chunk.KO4EOD3I.js";import{d as r,e as c}from"./chunk.2C7KHCNI.js";import{f as s,g as n,h as a,i}from"./chunk.RGDK5VTE.js";import"https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/callout/callout.js";import"https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/icon/icon.js";import"https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/button/button.js";l();var u,g,p,b,h,m,v,e=class extends c{constructor(){super(...arguments);this.name="hot-consent";a(this,u,"");a(this,g,!1);a(this,p,!0);a(this,b,"About the information we collect");a(this,h,"We use cookies and similar technologies to recognize and analyze your visits, and measure traffic usage and activity.");a(this,m,"I Agree");a(this,v,"I Do Not Agree")}get consentId(){return n(this,u)}set consentId(t){i(this,u,t)}get force(){return n(this,g)}set force(t){i(this,g,t)}get isOpen(){return n(this,p)}set isOpen(t){i(this,p,t)}get title(){return n(this,b)}set title(t){i(this,b,t)}get message(){return n(this,h)}set message(t){i(this,h,t)}get agreeLabel(){return n(this,m)}set agreeLabel(t){i(this,m,t)}get notAgreeLabel(){return n(this,v)}set notAgreeLabel(t){i(this,v,t)}render(){return this.isOpen?r`
|
|
2
|
+
<div class="consent-overlay">
|
|
3
|
+
<div class="consent-container">
|
|
4
|
+
<wa-callout variant="brand" appearance="outlined filled" size="large" class="consent-callout">
|
|
5
|
+
<wa-icon slot="icon" family="classic" variant="solid" name="shield-check" class="consent-icon"></wa-icon>
|
|
6
|
+
<div class="consent-content">
|
|
7
|
+
<h2 id="consent-header" class="consent-header">
|
|
8
|
+
${this.title}
|
|
9
|
+
</h2>
|
|
10
|
+
<div class="consent-message">
|
|
11
|
+
<p>${this.message}</p>
|
|
12
|
+
<slot name="additional-info"></slot>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="consent-actions">
|
|
15
|
+
<wa-button
|
|
16
|
+
size="medium"
|
|
17
|
+
variant="neutral"
|
|
18
|
+
class="consent-button decline-button"
|
|
19
|
+
@click=${t=>this._setDisagree(t)}
|
|
20
|
+
>
|
|
21
|
+
${this.notAgreeLabel}
|
|
22
|
+
</wa-button>
|
|
23
|
+
<wa-button
|
|
24
|
+
size="medium"
|
|
25
|
+
variant="brand"
|
|
26
|
+
class="consent-button accept-button"
|
|
27
|
+
@click=${t=>this._setAgree(t)}
|
|
28
|
+
>
|
|
29
|
+
${this.agreeLabel}
|
|
30
|
+
</wa-button>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</wa-callout>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
`:null}_setAgree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"true"),this.dispatchEvent(new Event("agree",{bubbles:!0,composed:!0}))}_setDisagree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"false"),this.dispatchEvent(new Event("disagree",{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback();let t=localStorage.getItem(`${this.consentId}-consent-agree`);if(t==="false"){this.isOpen=!1;return}t==="true"&&(this.isOpen=!1)}};u=new WeakMap,g=new WeakMap,p=new WeakMap,b=new WeakMap,h=new WeakMap,m=new WeakMap,v=new WeakMap,e.styles=[d],s([o({type:String,attribute:"consent-id"})],e.prototype,"consentId",1),s([o({type:Boolean})],e.prototype,"force",1),s([o({type:Boolean})],e.prototype,"isOpen",1),s([o({type:String})],e.prototype,"title",1),s([o({type:String})],e.prototype,"message",1),s([o({type:String,attribute:"agree-label"})],e.prototype,"agreeLabel",1),s([o({type:String,attribute:"not-agree-label"})],e.prototype,"notAgreeLabel",1);var O=e;customElements.define("hot-consent",e);export{e as a,O as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.XYLRVYKD.js";import"../../chunks/chunk.277I73JI.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Consent,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"../../chunks/chunk.
|
|
1
|
+
import{a as b}from"../../chunks/chunk.BLTVEIFI.js";import{a}from"../../chunks/chunk.XYLRVYKD.js";import"../../chunks/chunk.277I73JI.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Consent,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.277I73JI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.3BMRK6RX.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.N5L63ITD.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Header,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"../../chunks/chunk.
|
|
1
|
+
import{a as b}from"../../chunks/chunk.W5TPMQK4.js";import{a}from"../../chunks/chunk.3BMRK6RX.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.N5L63ITD.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Header,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.N5L63ITD.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as headerVariants,b as styles};
|
package/dist/components/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunks/chunk.KO4EOD3I.js";import"../chunks/chunk.
|
|
1
|
+
import{a}from"../chunks/chunk.KO4EOD3I.js";import"../chunks/chunk.RGDK5VTE.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.DQ7UCE7O.js";import"../../chunks/chunk.TVZQJVLS.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Logo,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"../../chunks/chunk.
|
|
1
|
+
import{a as b}from"../../chunks/chunk.6QXNTVCU.js";import{a}from"../../chunks/chunk.DQ7UCE7O.js";import"../../chunks/chunk.TVZQJVLS.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as Logo,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.TVZQJVLS.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.TJK2P3MY.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as MatomoTracking,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"../../chunks/chunk.
|
|
1
|
+
import{a as b}from"../../chunks/chunk.GTA7FK6E.js";import{a}from"../../chunks/chunk.TJK2P3MY.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as MatomoTracking,b as default};
|
package/dist/hotosm-ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./chunks/chunk.
|
|
1
|
+
import{b as t}from"./chunks/chunk.DQ7UCE7O.js";import"./chunks/chunk.TVZQJVLS.js";import{b as e}from"./chunks/chunk.TJK2P3MY.js";import{b as r}from"./chunks/chunk.XYLRVYKD.js";import"./chunks/chunk.277I73JI.js";import{b as o}from"./chunks/chunk.3BMRK6RX.js";import"./chunks/chunk.7P5E5KMI.js";import"./chunks/chunk.KO4EOD3I.js";import"./chunks/chunk.N5L63ITD.js";import"./chunks/chunk.2C7KHCNI.js";import"./chunks/chunk.RGDK5VTE.js";export{r as Consent,o as Header,t as Logo,e as Tracking};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.H27BHZTL.js";import"../../chunks/chunk.GRD7DOAE.js";import"../../chunks/chunk.BLTVEIFI.js";import"../../chunks/chunk.XYLRVYKD.js";import"../../chunks/chunk.277I73JI.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.NK4IZUTO.js";import"../../chunks/chunk.GRD7DOAE.js";import"../../chunks/chunk.W5TPMQK4.js";import"../../chunks/chunk.3BMRK6RX.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.KO4EOD3I.js";import"../../chunks/chunk.N5L63ITD.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as default};
|
package/dist/react/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"../chunks/chunk.
|
|
1
|
+
import{a as o}from"../chunks/chunk.PICS5Z5K.js";import{a}from"../chunks/chunk.V76UU3GK.js";import"../chunks/chunk.6QXNTVCU.js";import"../chunks/chunk.GTA7FK6E.js";import{a as r}from"../chunks/chunk.H27BHZTL.js";import{a as e}from"../chunks/chunk.NK4IZUTO.js";import"../chunks/chunk.GRD7DOAE.js";import"../chunks/chunk.DQ7UCE7O.js";import"../chunks/chunk.TVZQJVLS.js";import"../chunks/chunk.TJK2P3MY.js";import"../chunks/chunk.BLTVEIFI.js";import"../chunks/chunk.XYLRVYKD.js";import"../chunks/chunk.277I73JI.js";import"../chunks/chunk.W5TPMQK4.js";import"../chunks/chunk.3BMRK6RX.js";import"../chunks/chunk.7P5E5KMI.js";import"../chunks/chunk.KO4EOD3I.js";import"../chunks/chunk.N5L63ITD.js";import"../chunks/chunk.2C7KHCNI.js";import"../chunks/chunk.RGDK5VTE.js";export{r as Consent,e as Header,o as Logo,a as Tracking};
|
package/dist/react/logo/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.PICS5Z5K.js";import"../../chunks/chunk.6QXNTVCU.js";import"../../chunks/chunk.GRD7DOAE.js";import"../../chunks/chunk.DQ7UCE7O.js";import"../../chunks/chunk.TVZQJVLS.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.V76UU3GK.js";import"../../chunks/chunk.GTA7FK6E.js";import"../../chunks/chunk.GRD7DOAE.js";import"../../chunks/chunk.TJK2P3MY.js";import"../../chunks/chunk.7P5E5KMI.js";import"../../chunks/chunk.2C7KHCNI.js";import"../../chunks/chunk.RGDK5VTE.js";export{a as default};
|