@hotosm/ui 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +231 -139
- package/dist/chunks/{chunk.GEAU3JJH.js → chunk.252GL6HT.js} +11 -11
- package/dist/chunks/{chunk.JVUHDRTK.js → chunk.2Y7OBKRQ.js} +1 -1
- package/dist/chunks/{chunk.AL4CJN73.js → chunk.5QY2VLMG.js} +1 -1
- package/dist/chunks/{chunk.J7OUGJBS.js → chunk.6BGQ256H.js} +2 -2
- package/dist/chunks/{chunk.7TYQYCSB.js → chunk.7JIKOYG6.js} +1 -1
- package/dist/chunks/{chunk.3LBUXCAP.js → chunk.APYFF2XE.js} +1 -1
- package/dist/chunks/{chunk.2Y2ST5QL.js → chunk.BVHLTKMC.js} +1 -1
- package/dist/chunks/{chunk.QWZJAW2S.js → chunk.CNUZFRRF.js} +2 -2
- package/dist/chunks/{chunk.LHZ7Q2M3.js → chunk.FDQFFQX3.js} +5 -5
- package/dist/chunks/chunk.FN6G7X23.js +251 -0
- package/dist/chunks/{chunk.OICCPCO3.js → chunk.IILWGAOM.js} +1 -1
- package/dist/chunks/{chunk.G6ZZSFVM.js → chunk.JYPMFVPO.js} +1 -1
- package/dist/chunks/chunk.LKMWWUYT.js +20 -0
- package/dist/chunks/{chunk.BD4Q32VT.js → chunk.LVCDAVRU.js} +4 -4
- package/dist/chunks/{chunk.ARF626EG.js → chunk.LXN3PNAP.js} +1 -1
- package/dist/chunks/chunk.P6GWPFCT.js +32 -0
- package/dist/chunks/{chunk.7BVHA4G6.js → chunk.X354U5TL.js} +3 -3
- package/dist/chunks/{chunk.DDWCUURX.js → chunk.XU6UFL27.js} +4 -4
- package/dist/chunks/{chunk.MZOQNTPX.js → chunk.ZGC6XD6L.js} +37 -56
- package/dist/components/consent/consent.component.d.ts +0 -3
- 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/file-input-dropzone/file-input-dropzone.component.d.ts +0 -2
- package/dist/components/file-input-dropzone/file-input-dropzone.component.js +1 -1
- package/dist/components/file-input-dropzone/file-input-dropzone.js +1 -1
- package/dist/components/file-input-dropzone/file-input-dropzone.styles.js +1 -1
- package/dist/components/header/header.component.d.ts +0 -4
- 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/list-card/list-card.component.d.ts +0 -1
- package/dist/components/list-card/list-card.component.js +1 -1
- package/dist/components/list-card/list-card.js +1 -1
- package/dist/components/list-card/list-card.styles.js +1 -1
- package/dist/components/logo/logo.component.js +1 -1
- package/dist/components/logo/logo.js +1 -1
- package/dist/components/tool-menu/tool-menu.component.d.ts +0 -3
- package/dist/components/tool-menu/tool-menu.component.js +1 -1
- package/dist/components/tool-menu/tool-menu.js +1 -1
- package/dist/components/tool-menu/tool-menu.styles.js +1 -1
- package/dist/components/tracking/tracking.component.d.ts +0 -3
- 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/style-core.css +1 -0
- package/dist/style.css +1 -1
- package/dist/themes/hot-wa.css +152 -115
- package/dist/themes/hot.css +1 -1
- package/package.json +4 -2
- package/dist/chunks/chunk.CQO3GWTI.js +0 -32
- package/dist/chunks/chunk.PLECT4NZ.js +0 -20
- package/dist/chunks/chunk.U4AAC5ID.js +0 -239
package/README.md
CHANGED
|
@@ -44,176 +44,268 @@
|
|
|
44
44
|
🎯 <strong>Roadmap / Tasks</strong>:
|
|
45
45
|
<a href="https://github.com/orgs/hotosm/projects/37/views/3" target="_blank">https://github.com/orgs/hotosm/projects/37/views/3</a>
|
|
46
46
|
</p>
|
|
47
|
-
|
|
48
|
-
|
|
49
47
|
<!-- markdownlint-enable -->
|
|
50
48
|
|
|
51
49
|
---
|
|
52
50
|
|
|
53
|
-
##
|
|
51
|
+
## Overview
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
[
|
|
57
|
-
|
|
58
|
-
components to assist development:
|
|
53
|
+
Shared [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components)
|
|
54
|
+
built with [Lit](https://lit.dev) and themed for HOTOSM tools using
|
|
55
|
+
[WebAwesome](https://webawesome.com) primitives.
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
2. Simplified developer experience to create a HOT app.
|
|
62
|
-
3. Reasonably consistent theming and style across tools.
|
|
57
|
+
**Goals:**
|
|
63
58
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
- Reduce code duplication across HOT tools.
|
|
60
|
+
- Provide a consistent HOT look-and-feel out of the box.
|
|
61
|
+
- Keep the component set small and focused (header, sidebar, footer, etc.).
|
|
67
62
|
|
|
68
|
-
|
|
69
|
-
- Sidebar with links to extra resources.
|
|
70
|
-
- Footer with links.
|
|
63
|
+
**WebAwesome version:** `3.2.1`
|
|
71
64
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Current HOTOSM UI version used: `0.3.1-b5`
|
|
75
|
-
Current WebAwesome version used: `3.2.1`
|
|
65
|
+
---
|
|
76
66
|
|
|
77
|
-
|
|
67
|
+
## Installation
|
|
78
68
|
|
|
79
69
|
```bash
|
|
80
|
-
pnpm install
|
|
70
|
+
pnpm install @hotosm/ui @awesome.me/webawesome@3.2.1
|
|
81
71
|
```
|
|
82
72
|
|
|
83
73
|
> [!NOTE]
|
|
84
|
-
>
|
|
85
|
-
>
|
|
74
|
+
> `@awesome.me/webawesome` is a **peer dependency**. Always pin it to the
|
|
75
|
+
> version shown above to avoid conflicts between HOT components and
|
|
76
|
+
> WebAwesome internals.
|
|
86
77
|
|
|
87
|
-
|
|
78
|
+
---
|
|
88
79
|
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
## Loading Styles
|
|
81
|
+
|
|
82
|
+
Two CSS files are published. Choose the one that fits your setup.
|
|
83
|
+
|
|
84
|
+
### Option A — Bundled (recommended for simplicity)
|
|
85
|
+
|
|
86
|
+
A single self-contained file with WebAwesome base styles + HOT theme
|
|
87
|
+
already inlined. Nothing else to load.
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<link rel="stylesheet"
|
|
91
|
+
href="https://cdn.jsdelivr.net/npm/@hotosm/ui@0.6.1/dist/style.css">
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Or from a bundler:
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
import '@hotosm/ui/dist/style.css';
|
|
91
98
|
```
|
|
92
99
|
|
|
93
|
-
###
|
|
100
|
+
### Option B — Split / CDN-optimised (recommended for multi-tool caching)
|
|
101
|
+
|
|
102
|
+
If you run several HOT tools (FMTM, Tasking Manager, etc.) and want
|
|
103
|
+
the browser to **cache WebAwesome CSS once** across all of them, load
|
|
104
|
+
WebAwesome from CDN separately and use the slim HOT-only stylesheet:
|
|
94
105
|
|
|
95
|
-
|
|
96
|
-
|
|
106
|
+
```html
|
|
107
|
+
<!-- WebAwesome CSS — shared across all HOT tools via browser cache -->
|
|
108
|
+
<link rel="stylesheet"
|
|
109
|
+
href="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3.2.1/dist/styles/native.css">
|
|
110
|
+
<link rel="stylesheet"
|
|
111
|
+
href="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3.2.1/dist/styles/utilities.css">
|
|
112
|
+
<link rel="stylesheet"
|
|
113
|
+
href="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3.2.1/dist/styles/themes/default.css">
|
|
114
|
+
|
|
115
|
+
<!-- HOT theme only (fonts + design tokens + WebAwesome overrides) -->
|
|
116
|
+
<link rel="stylesheet"
|
|
117
|
+
href="https://cdn.jsdelivr.net/npm/@hotosm/ui@0.6.1/dist/style-core.css">
|
|
118
|
+
```
|
|
97
119
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
120
|
+
Or from a bundler:
|
|
121
|
+
|
|
122
|
+
```js
|
|
123
|
+
// WebAwesome (resolve from node_modules)
|
|
124
|
+
import '@awesome.me/webawesome/dist/styles/native.css';
|
|
125
|
+
import '@awesome.me/webawesome/dist/styles/utilities.css';
|
|
126
|
+
import '@awesome.me/webawesome/dist/styles/themes/default.css';
|
|
127
|
+
|
|
128
|
+
// HOT theme only
|
|
129
|
+
import '@hotosm/ui/dist/style-core.css';
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
| File | Size | Contains |
|
|
133
|
+
| --- | --- | --- |
|
|
134
|
+
| `style.css` | ~105 KB | WebAwesome + fonts + HOT theme (everything) |
|
|
135
|
+
| `style-core.css` | ~21 KB | Fonts + HOT theme only (no WebAwesome) |
|
|
136
|
+
|
|
137
|
+
> [!TIP]
|
|
138
|
+
> **Which should I pick?**
|
|
139
|
+
>
|
|
140
|
+
> - Building a single standalone app? Use **Option A** — zero config.
|
|
141
|
+
> - Running multiple HOT tools on the same domain or expecting users to
|
|
142
|
+
> navigate between them? Use **Option B** — the ~84 KB of shared
|
|
143
|
+
> WebAwesome CSS is fetched once and cached by the browser.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## HTML Setup
|
|
148
|
+
|
|
149
|
+
Add the required WebAwesome classes to your `<html>` element:
|
|
150
|
+
|
|
151
|
+
```html
|
|
152
|
+
<!DOCTYPE html>
|
|
153
|
+
<html class="wa-theme-default wa-palette-hotosm">
|
|
154
|
+
<head>...</head>
|
|
155
|
+
<body>...</body>
|
|
156
|
+
</html>
|
|
157
|
+
```
|
|
110
158
|
|
|
111
159
|
> [!IMPORTANT]
|
|
112
|
-
> These classes
|
|
113
|
-
>
|
|
160
|
+
> These classes activate the HOT colour palette and light theme for every
|
|
161
|
+
> WebAwesome component on the page. Do not remove them.
|
|
114
162
|
|
|
115
|
-
|
|
116
|
-
package rather than CDN, to allow the bundler to work its CSS tree-shaking
|
|
117
|
-
magic).
|
|
163
|
+
---
|
|
118
164
|
|
|
119
|
-
|
|
120
|
-
import '@hotosm/ui/dist/style.css';
|
|
121
|
-
```
|
|
165
|
+
## Using Components
|
|
122
166
|
|
|
123
|
-
|
|
124
|
-
them as variables like so:
|
|
167
|
+
### Via Bundler (Vite, Webpack, etc.)
|
|
125
168
|
|
|
126
|
-
|
|
127
|
-
/* In your CSS file */
|
|
128
|
-
some-param: var(--hot-some-param);
|
|
129
|
-
/* See all variables in the `theme/hot.css` file */
|
|
130
|
-
```
|
|
169
|
+
Import individual components — your bundler will tree-shake the rest:
|
|
131
170
|
|
|
132
|
-
|
|
171
|
+
```js
|
|
172
|
+
import '@hotosm/ui/dist/components/header/header.js';
|
|
173
|
+
```
|
|
133
174
|
|
|
134
|
-
|
|
175
|
+
```html
|
|
176
|
+
<hot-header title="My App"></hot-header>
|
|
177
|
+
```
|
|
135
178
|
|
|
136
|
-
|
|
179
|
+
### Via CDN / Plain HTML / HTMX
|
|
180
|
+
|
|
181
|
+
The recommended approach for HTMX and plain-HTML apps loads WebAwesome
|
|
182
|
+
styles and components from CDN so the browser can cache them once across
|
|
183
|
+
all HOT tools (Option B from the styles section above):
|
|
184
|
+
|
|
185
|
+
```html
|
|
186
|
+
<!DOCTYPE html>
|
|
187
|
+
<html class="wa-theme-default wa-palette-hotosm">
|
|
188
|
+
<head>
|
|
189
|
+
<!-- WebAwesome CSS — cached once across all HOT tools at this WA version -->
|
|
190
|
+
<link rel="stylesheet"
|
|
191
|
+
href="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3.2.1/dist/styles/native.css">
|
|
192
|
+
<link rel="stylesheet"
|
|
193
|
+
href="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3.2.1/dist/styles/utilities.css">
|
|
194
|
+
<link rel="stylesheet"
|
|
195
|
+
href="https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3.2.1/dist/styles/themes/default.css">
|
|
196
|
+
|
|
197
|
+
<!-- HOT UI theme (fonts + HOT design tokens + WebAwesome overrides, ~21 KB) -->
|
|
198
|
+
<link rel="stylesheet"
|
|
199
|
+
href="https://cdn.jsdelivr.net/npm/@hotosm/ui@0.6.1/dist/style-core.css">
|
|
200
|
+
|
|
201
|
+
<!-- Import map: resolves WebAwesome bare-module specifiers
|
|
202
|
+
inside hotosm-ui.js -->
|
|
203
|
+
<!-- WA components load lazily from CDN only when first used;
|
|
204
|
+
no separate loader needed -->
|
|
205
|
+
<script type="importmap">
|
|
206
|
+
{
|
|
207
|
+
"imports": {
|
|
208
|
+
"@awesome.me/webawesome/dist/components/":
|
|
209
|
+
"https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3.2.1/dist-cdn/components/"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
</script>
|
|
213
|
+
|
|
214
|
+
<!-- HOT UI web components -->
|
|
215
|
+
<script type="module"
|
|
216
|
+
src="https://cdn.jsdelivr.net/npm/@hotosm/ui@0.6.1/dist/hotosm-ui.js">
|
|
217
|
+
</script>
|
|
218
|
+
</head>
|
|
219
|
+
|
|
220
|
+
<body>
|
|
221
|
+
<hot-header id="hdr" title="My App" size="small" show-login></hot-header>
|
|
137
222
|
|
|
138
|
-
```html
|
|
139
223
|
<script>
|
|
140
|
-
|
|
224
|
+
// Boolean props default to false.
|
|
225
|
+
// Include the attribute to make it true.
|
|
226
|
+
const hdr = document.getElementById('hdr');
|
|
227
|
+
hdr.drawer = true; // enable the hamburger drawer
|
|
228
|
+
hdr.borderBottom = true; // enable bottom border
|
|
141
229
|
</script>
|
|
230
|
+
</body>
|
|
231
|
+
</html>
|
|
232
|
+
```
|
|
142
233
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
HOT UI is free and open source software
|
|
219
|
-
terms of the
|
|
234
|
+
> [!TIP]
|
|
235
|
+
> If you need only a single self-contained stylesheet instead of the three
|
|
236
|
+
> WA links above, you can use Option A (`style.css`) — but then the ~84 KB
|
|
237
|
+
> of WebAwesome CSS is bundled into the HOT package and cannot be shared
|
|
238
|
+
> across tools as a single cached resource.
|
|
239
|
+
|
|
240
|
+
### React
|
|
241
|
+
|
|
242
|
+
Web Components work in React with a small caveat — use `ref` callbacks
|
|
243
|
+
for custom events if React's synthetic event system doesn't forward them:
|
|
244
|
+
|
|
245
|
+
```jsx
|
|
246
|
+
import '@hotosm/ui/dist/components/header/header.js';
|
|
247
|
+
|
|
248
|
+
function App() {
|
|
249
|
+
return (
|
|
250
|
+
<hot-header
|
|
251
|
+
title="My App"
|
|
252
|
+
ref={(el) => {
|
|
253
|
+
if (el) el.addEventListener('login', () => console.log('logged in'));
|
|
254
|
+
}}
|
|
255
|
+
/>
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Using HOT Design Tokens
|
|
263
|
+
|
|
264
|
+
The HOT theme exposes CSS custom properties you can reference in your
|
|
265
|
+
own stylesheets:
|
|
266
|
+
|
|
267
|
+
```css
|
|
268
|
+
.my-card {
|
|
269
|
+
background: var(--hot-color-primary-50);
|
|
270
|
+
color: var(--hot-color-neutral-900);
|
|
271
|
+
font-family: var(--hot-font-sans);
|
|
272
|
+
padding: var(--hot-spacing-medium);
|
|
273
|
+
border-radius: var(--hot-border-radius-large);
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
See all available tokens in
|
|
278
|
+
[`src/themes/hot.css`](src/themes/hot.css).
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Component Guides
|
|
283
|
+
|
|
284
|
+
- **Header:** see [`header.md`](header.md) for detailed integration,
|
|
285
|
+
styling, and framework examples.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Contributing
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
git clone git@github.com:hotosm/ui.git
|
|
293
|
+
cd ui
|
|
294
|
+
pnpm install
|
|
295
|
+
pnpm run dev # starts Storybook on localhost:3001
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
**Styling files** (under `src/themes/`):
|
|
299
|
+
|
|
300
|
+
| File | Purpose |
|
|
301
|
+
| --- | --- |
|
|
302
|
+
| `hot.css` | HOT design tokens (colours, typography, spacing) |
|
|
303
|
+
| `hot-wa.css` | WebAwesome variable overrides to apply the HOT palette |
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## License
|
|
308
|
+
|
|
309
|
+
HOT UI is free and open source software. You may use any HOT UI project
|
|
310
|
+
under the terms of the
|
|
311
|
+
[GNU Affero General Public License (AGPL) Version 3](LICENSE.md).
|
|
@@ -45,7 +45,7 @@ import{a as o}from"./chunk.QABMDRWR.js";var e=o`
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.dropzone:focus {
|
|
48
|
-
outline: 2px solid var(--
|
|
48
|
+
outline: 2px solid var(--wa-color-focus);
|
|
49
49
|
outline-offset: 2px;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -54,13 +54,13 @@ import{a as o}from"./chunk.QABMDRWR.js";var e=o`
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.dropzone:focus-visible {
|
|
57
|
-
outline: 2px solid var(--
|
|
57
|
+
outline: 2px solid var(--wa-color-focus);
|
|
58
58
|
outline-offset: 2px;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.dropzone--dragging {
|
|
62
|
-
border-color: var(--hot-color-
|
|
63
|
-
background-color: var(--hot-color-
|
|
62
|
+
border-color: var(--hot-color-primary-500);
|
|
63
|
+
background-color: var(--hot-color-primary-100);
|
|
64
64
|
border-width: 3px;
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -96,11 +96,11 @@ import{a as o}from"./chunk.QABMDRWR.js";var e=o`
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.dropzone:hover:not(.dropzone--disabled) .dropzone-icon {
|
|
99
|
-
color: var(--hot-color-
|
|
99
|
+
color: var(--hot-color-primary-500);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.dropzone--dragging .dropzone-icon {
|
|
103
|
-
color: var(--hot-color-
|
|
103
|
+
color: var(--hot-color-primary-600);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.dropzone-cta {
|
|
@@ -110,7 +110,7 @@ import{a as o}from"./chunk.QABMDRWR.js";var e=o`
|
|
|
110
110
|
|
|
111
111
|
.dropzone-text {
|
|
112
112
|
font-size: var(--hot-font-size-small);
|
|
113
|
-
font-weight:
|
|
113
|
+
font-weight: var(--hot-font-weight-semibold);
|
|
114
114
|
color: var(--hot-color-neutral-700);
|
|
115
115
|
text-align: center;
|
|
116
116
|
}
|
|
@@ -152,15 +152,15 @@ import{a as o}from"./chunk.QABMDRWR.js";var e=o`
|
|
|
152
152
|
gap: var(--hot-spacing-x-small);
|
|
153
153
|
margin-top: var(--hot-spacing-small);
|
|
154
154
|
padding: var(--hot-spacing-small);
|
|
155
|
-
background-color: var(--hot-color-
|
|
156
|
-
border: 1px solid var(--hot-color-
|
|
155
|
+
background-color: var(--hot-color-danger-50);
|
|
156
|
+
border: 1px solid var(--hot-color-danger-200);
|
|
157
157
|
border-radius: var(--hot-border-radius-small);
|
|
158
|
-
color: var(--hot-color-
|
|
158
|
+
color: var(--hot-color-danger-700);
|
|
159
159
|
font-size: var(--hot-font-size-small);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
.error-message wa-icon {
|
|
163
|
-
color: var(--hot-color-
|
|
163
|
+
color: var(--hot-color-danger-600);
|
|
164
164
|
font-size: var(--hot-font-size-medium);
|
|
165
165
|
}
|
|
166
166
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk.
|
|
1
|
+
import{b as e}from"./chunk.XU6UFL27.js";var a=e;customElements.get("hot-header")||customElements.define("hot-header",e);export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o}from"./chunk.
|
|
1
|
+
import{b as o}from"./chunk.P6GWPFCT.js";var t=o;customElements.get("hotosm-tool-menu")||customElements.define("hotosm-tool-menu",o);export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as d}from"./chunk.
|
|
1
|
+
import{a as d}from"./chunk.ZGC6XD6L.js";import{a as o}from"./chunk.ZETV7TDG.js";import{a as l}from"./chunk.KO4EOD3I.js";import{d as r,f as c}from"./chunk.QABMDRWR.js";import{d as s,e as a,f as n,g as i}from"./chunk.N2W26RCT.js";Promise.allSettled([import("@awesome.me/webawesome/dist/components/callout/callout.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js"),import("@awesome.me/webawesome/dist/components/button/button.js")]);l();var u,g,p,b,m,h,e=class extends c{constructor(){super(...arguments);this.name="hot-consent";n(this,u,"");n(this,g,!1);n(this,p,"About the information we collect");n(this,b,"We use cookies and similar technologies to recognize and analyze your visits, and measure traffic usage and activity.");n(this,m,"I Agree");n(this,h,"I Do Not Agree")}get consentId(){return a(this,u)}set consentId(t){i(this,u,t)}get isOpen(){return a(this,g)}set isOpen(t){i(this,g,t)}get title(){return a(this,p)}set title(t){i(this,p,t)}get message(){return a(this,b)}set message(t){i(this,b,t)}get agreeLabel(){return a(this,m)}set agreeLabel(t){i(this,m,t)}get notAgreeLabel(){return a(this,h)}set notAgreeLabel(t){i(this,h,t)}render(){return this.isOpen?r`
|
|
2
2
|
<div class="consent-overlay">
|
|
3
3
|
<div class="consent-container">
|
|
4
4
|
<wa-callout variant="brand" appearance="outlined filled" size="large" class="consent-callout">
|
|
@@ -33,4 +33,4 @@ import{a as d}from"./chunk.MZOQNTPX.js";import{a as r}from"./chunk.ZETV7TDG.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,
|
|
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,m=new WeakMap,h=new WeakMap,e.styles=[d],s([o({type:String,attribute:"consent-id"})],e.prototype,"consentId",1),s([o({type:Boolean,attribute:"is-open"})],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 E=e;export{e as a,E as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk.
|
|
1
|
+
import{b as e}from"./chunk.6BGQ256H.js";var n=e;customElements.get("hot-consent")||customElements.define("hot-consent",e);export{n as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o}from"./chunk.
|
|
1
|
+
import{b as o}from"./chunk.LVCDAVRU.js";var t=o;customElements.get("hot-logo")||customElements.define("hot-logo",o);export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk.
|
|
1
|
+
import{b as e}from"./chunk.CNUZFRRF.js";var t=e;customElements.get("hot-file-input-dropzone")||customElements.define("hot-file-input-dropzone",e);export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as M}from"./chunk.
|
|
1
|
+
import{a as M}from"./chunk.252GL6HT.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`<wa-divider></wa-divider>`:""}
|
|
@@ -86,7 +86,7 @@ import{a as M}from"./chunk.GEAU3JJH.js";import{a as f,b as m,c as z}from"./chunk
|
|
|
86
86
|
${this.statusMessage}
|
|
87
87
|
</div>
|
|
88
88
|
</div>
|
|
89
|
-
`}};S=new WeakMap,T=new WeakMap,C=new WeakMap,D=new WeakMap,
|
|
89
|
+
`}};S=new WeakMap,T=new WeakMap,C=new WeakMap,D=new WeakMap,P=new WeakMap,A=new WeakMap,B=new WeakMap,L=new WeakMap,k=new WeakMap,W=new WeakMap,I=new WeakMap,O=new WeakMap,r.styles=[M],n([f({type:Boolean})],r.prototype,"multiple",1),n([f({type:String})],r.prototype,"accept",1),n([f({type:Number})],r.prototype,"maxSize",1),n([f({type:Boolean,attribute:"show-preview"})],r.prototype,"showPreview",1),n([f({type:Boolean})],r.prototype,"disabled",1),n([f({type:String})],r.prototype,"label",1),n([f({type:String})],r.prototype,"variant",1),n([m()],r.prototype,"isDragging",1),n([m()],r.prototype,"selectedFiles",1),n([m()],r.prototype,"errorMessage",1),n([m()],r.prototype,"statusMessage",1),n([z('input[type="file"]')],r.prototype,"fileInput",1);var Z=r;export{r as a,Z as b};
|
|
90
90
|
/*! Bundled license information:
|
|
91
91
|
|
|
92
92
|
lit-html/directive.js:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as f}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26RCT.js";function p(t){var r,e,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var
|
|
1
|
+
import{a as f}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26RCT.js";function p(t){var r,e,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(e=p(t[r]))&&(a&&(a+=" "),a+=e)}else for(e in t)t[e]&&(a&&(a+=" "),a+=e);return a}function b(){for(var t,r,e=0,a="",i=arguments.length;e<i;e++)(t=arguments[e])&&(r=p(t))&&(a&&(a+=" "),a+=r);return a}var y=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,x=b,w=(t,r)=>e=>{var a;if((r==null?void 0:r.variants)==null)return x(t,e==null?void 0:e.class,e==null?void 0:e.className);let{variants:i,defaultVariants:s}=r,z=Object.keys(i).map(o=>{let n=e==null?void 0:e[o],d=s==null?void 0:s[o];if(n===null)return null;let l=y(n)||y(d);return i[o][l]}),m=e&&Object.entries(e).reduce((o,n)=>{let[d,l]=n;return l===void 0||(o[d]=l),o},{}),j=r==null||(a=r.compoundVariants)===null||a===void 0?void 0:a.reduce((o,n)=>{let g=n,{class:d,className:l}=g,k=v(g,["class","className"]);return Object.entries(k).every(V=>{let[u,c]=V;return Array.isArray(c)?c.includes(h(h({},s),m)[u]):h(h({},s),m)[u]===c})?[...o,d,l]:o},[]);return x(t,z,j,e==null?void 0:e.class,e==null?void 0:e.className)};var S=w(`
|
|
2
2
|
header
|
|
3
3
|
`,{variants:{size:{small:"header--size-small",medium:"header--size-medium",large:"header--size-large"},borderBottom:{true:"border-bottom"}}}),_=f`
|
|
4
4
|
.header {
|
|
@@ -53,19 +53,19 @@ import{a as f}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.header--tab[active]::part(base) {
|
|
56
|
-
border-bottom-color: var(--hot-color-
|
|
56
|
+
border-bottom-color: var(--hot-color-primary-500);
|
|
57
57
|
font-weight: var(--hot-font-weight-bold);
|
|
58
58
|
color: var(--hot-color-neutral-950);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.header--tab:hover::part(base) {
|
|
62
62
|
color: var(--hot-color-neutral-700);
|
|
63
|
-
border-bottom-color: var(--hot-color-
|
|
63
|
+
border-bottom-color: var(--hot-color-primary-300);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.header--tab[active]:hover::part(base) {
|
|
67
67
|
color: var(--hot-color-neutral-950);
|
|
68
|
-
border-bottom-color: var(--hot-color-
|
|
68
|
+
border-bottom-color: var(--hot-color-primary-600);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.header--tab-group::part(base) {
|
|
@@ -113,7 +113,7 @@ import{a as f}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26R
|
|
|
113
113
|
/* Login Modal Styles */
|
|
114
114
|
.login-modal {
|
|
115
115
|
--width: 35rem;
|
|
116
|
-
--border-radius:
|
|
116
|
+
--border-radius: var(--hot-border-radius-large);
|
|
117
117
|
--background-color: white;
|
|
118
118
|
}
|
|
119
119
|
|