@hotosm/ui 0.3.3-b1 → 0.3.3-b3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -26
- package/dist/chunks/chunk.65UBVOFP.js +1 -0
- package/dist/chunks/{chunk.SMJLJ4AN.js → chunk.EOKB5QI4.js} +2 -2
- package/dist/chunks/chunk.FICDKF3C.js +1 -0
- package/dist/chunks/{chunk.34D2LPI2.js → chunk.ILRWC26B.js} +3 -3
- package/dist/chunks/{chunk.XJWPNRXI.js → chunk.TPOAILO5.js} +159 -57
- package/dist/components/consent/consent.component.d.ts +0 -2
- package/dist/components/consent/consent.component.js +1 -1
- package/dist/components/consent/consent.js +1 -1
- package/dist/components/header/header.component.js +1 -1
- package/dist/components/header/header.js +1 -1
- package/dist/components/tracking/tracking.component.js +1 -1
- package/dist/components/tracking/tracking.js +1 -1
- package/dist/hotosm-ui.d.ts +2 -3
- package/dist/hotosm-ui.js +1 -1
- package/dist/themes/hot-wa-override.css +1 -1
- package/package.json +13 -14
- package/dist/chunks/chunk.4IHZBYNQ.js +0 -1
- package/dist/chunks/chunk.BPPYCS7U.js +0 -19
- package/dist/chunks/chunk.IGQ7CODZ.js +0 -1
- package/dist/chunks/chunk.O2GMJYSL.js +0 -0
- package/dist/chunks/chunk.O6I2TNK3.js +0 -203
- package/dist/chunks/chunk.UUHEHDRS.js +0 -1
- package/dist/components/button/button.component.d.ts +0 -28
- package/dist/components/button/button.component.js +0 -1
- package/dist/components/button/button.d.ts +0 -7
- package/dist/components/button/button.js +0 -1
- package/dist/components/button/button.styles.d.ts +0 -2
- package/dist/components/button/button.styles.js +0 -1
package/README.md
CHANGED
|
@@ -157,8 +157,7 @@ bundler, you can import all the components as a bundle, as use them like so:
|
|
|
157
157
|
import '@hotosm/ui/dist/hotosm-ui';
|
|
158
158
|
</script>
|
|
159
159
|
|
|
160
|
-
<hot-
|
|
161
|
-
<hot-button variant="primary">Click me!</hot-button>
|
|
160
|
+
<hot-header title="Test App" size="small" showLogin="false"></hot-header>
|
|
162
161
|
```
|
|
163
162
|
|
|
164
163
|
#### React
|
|
@@ -167,31 +166,16 @@ Import in the same way as the bundler example above, except events
|
|
|
167
166
|
are bound to slightly differently:
|
|
168
167
|
|
|
169
168
|
```jsx
|
|
170
|
-
<hot-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
console.log('
|
|
169
|
+
<hot-header
|
|
170
|
+
title="Test App"
|
|
171
|
+
size="small"
|
|
172
|
+
showLogin="false"
|
|
173
|
+
onLogin={() => {
|
|
174
|
+
console.log('handler');
|
|
176
175
|
}}
|
|
177
|
-
>
|
|
178
|
-
</hot-button>
|
|
176
|
+
></hot-header>
|
|
179
177
|
```
|
|
180
178
|
|
|
181
|
-
### Development
|
|
182
|
-
|
|
183
|
-
HOT UI is developed in TypeScript, using Lit and @lit/react.
|
|
184
|
-
|
|
185
|
-
Primarily we want to have:
|
|
186
|
-
|
|
187
|
-
- Low level components exported from the Shoelace web component
|
|
188
|
-
library, simply re-exported with our default styling / CSS overrides.
|
|
189
|
-
- A few composite components (header, sidebar, etc):
|
|
190
|
-
- Consistent styling across most of our tools where it counts.
|
|
191
|
-
- Reduction in duplicated logic, such as user management, OAuth login, etc.
|
|
192
|
-
- Improved developer experience, reduced development time for new tools, while
|
|
193
|
-
maintaining consistency in look and feel of applications.
|
|
194
|
-
|
|
195
179
|
### How to contribute
|
|
196
180
|
|
|
197
181
|
- Clone the project `git clone git@github.com:hotosm/ui.git`
|
|
@@ -201,8 +185,8 @@ Primarily we want to have:
|
|
|
201
185
|
|
|
202
186
|
For **styling**, check `/theme`:
|
|
203
187
|
|
|
204
|
-
- `hot.css` has a HOT theme, used across HOT components
|
|
205
|
-
- `hot-
|
|
188
|
+
- `hot.css` has a HOT theme, used across HOT components.
|
|
189
|
+
- `hot-wa-override.css` has a WebAwesome theme, re-defining style variables.
|
|
206
190
|
|
|
207
191
|
### License
|
|
208
192
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as e}from"./chunk.TPOAILO5.js";var r=e;customElements.define("hot-header",e);export{r as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as d}from"./chunk.GTNRNZDH.js";import{b as r}from"./chunk.6Y3X2E2V.js";import{a as l}from"./chunk.M3ZIZPKF.js";import{e as o,k as c}from"./chunk.TNLBUOUK.js";import{d as s,e as n,f as a,g as i}from"./chunk.NI7UJOOZ.js";l();var u,g,p,b,h,m,e=class extends c{constructor(){super(...arguments);this.name="hot-consent";a(this,u,"");a(this,g,!0);a(this,p,"About the information we collect");a(this,b,"We use cookies and similar technologies to recognize and analyze your visits, and measure traffic usage and activity.");a(this,h,"I Agree");a(this,m,"I Do Not Agree")}get consentId(){return n(this,u)}set consentId(t){i(this,u,t)}get isOpen(){return n(this,g)}set isOpen(t){i(this,g,t)}get title(){return n(this,p)}set title(t){i(this,p,t)}get message(){return n(this,b)}set message(t){i(this,b,t)}get agreeLabel(){return n(this,h)}set agreeLabel(t){i(this,h,t)}get notAgreeLabel(){return n(this,m)}set notAgreeLabel(t){i(this,m,t)}render(){return this.isOpen?o`
|
|
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">
|
|
@@ -33,4 +33,4 @@ import{b as o}from"./chunk.6Y3X2E2V.js";import{a as l}from"./chunk.M3ZIZPKF.js";
|
|
|
33
33
|
</wa-callout>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
|
-
`:null}_setAgree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"true"),this.dispatchEvent(new Event("agree",{bubbles:!0,composed:!0}))}_setDisagree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"false"),this.dispatchEvent(new Event("disagree",{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback();let t=localStorage.getItem(`${this.consentId}-consent-agree`);if(t==="false"){this.isOpen=!1;return}t==="true"&&(this.isOpen=!1)}};u=new WeakMap,g=new WeakMap,p=new WeakMap,b=new WeakMap,h=new WeakMap,m=new WeakMap,
|
|
36
|
+
`:null}_setAgree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"true"),this.dispatchEvent(new Event("agree",{bubbles:!0,composed:!0}))}_setDisagree(t){this.isOpen=!1,localStorage.setItem(`${this.consentId}-consent-agree`,"false"),this.dispatchEvent(new Event("disagree",{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback();let t=localStorage.getItem(`${this.consentId}-consent-agree`);if(t==="false"){this.isOpen=!1;return}t==="true"&&(this.isOpen=!1)}};u=new WeakMap,g=new WeakMap,p=new WeakMap,b=new WeakMap,h=new WeakMap,m=new WeakMap,e.styles=[d],s([r({type:String,attribute:"consent-id"})],e.prototype,"consentId",1),s([r({type:Boolean})],e.prototype,"isOpen",1),s([r({type:String})],e.prototype,"title",1),s([r({type:String})],e.prototype,"message",1),s([r({type:String,attribute:"agree-label"})],e.prototype,"agreeLabel",1),s([r({type:String,attribute:"not-agree-label"})],e.prototype,"notAgreeLabel",1);var k=e;export{e as a,k as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk.EOKB5QI4.js";var n=e;customElements.define("hot-consent",e);export{n as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as o,d as
|
|
1
|
+
import{c as o,d as e,g as l,h as i}from"./chunk.2FEIL35F.js";import{a as t,b as a}from"./chunk.6Y3X2E2V.js";import{e as n}from"./chunk.TNLBUOUK.js";var p=`:host {
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
align-items: stretch;
|
|
@@ -58,7 +58,7 @@ import{c as o,d as t,g as l,h as i}from"./chunk.2FEIL35F.js";import{a as e,b as
|
|
|
58
58
|
display: block;
|
|
59
59
|
overflow: hidden;
|
|
60
60
|
}
|
|
61
|
-
`,r=class extends
|
|
61
|
+
`,r=class extends e{constructor(){super(...arguments),this.variant="brand",this.appearance="outlined filled",this.size="medium"}render(){return n`
|
|
62
62
|
<div part="icon">
|
|
63
63
|
<slot name="icon"></slot>
|
|
64
64
|
</div>
|
|
@@ -66,4 +66,4 @@ import{c as o,d as t,g as l,h as i}from"./chunk.2FEIL35F.js";import{a as e,b as
|
|
|
66
66
|
<div part="message">
|
|
67
67
|
<slot></slot>
|
|
68
68
|
</div>
|
|
69
|
-
`}};r.css=[
|
|
69
|
+
`}};r.css=[p,i,l];o([a({reflect:!0})],r.prototype,"variant",2);o([a({reflect:!0})],r.prototype,"appearance",2);o([a({reflect:!0})],r.prototype,"size",2);r=o([t("wa-callout")],r);
|