@hotosm/ui 0.6.1 → 0.8.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.
Files changed (59) hide show
  1. package/README.md +234 -139
  2. package/dist/chunks/{chunk.GEAU3JJH.js → chunk.252GL6HT.js} +11 -11
  3. package/dist/chunks/{chunk.AL4CJN73.js → chunk.5QY2VLMG.js} +1 -1
  4. package/dist/chunks/chunk.6JUW2IZJ.js +105 -0
  5. package/dist/chunks/{chunk.DDWCUURX.js → chunk.BMD7HOGS.js} +141 -50
  6. package/dist/chunks/chunk.F26WEVPO.js +526 -0
  7. package/dist/chunks/chunk.FN6G7X23.js +251 -0
  8. package/dist/chunks/{chunk.OICCPCO3.js → chunk.IILWGAOM.js} +1 -1
  9. package/dist/chunks/{chunk.G6ZZSFVM.js → chunk.JYPMFVPO.js} +1 -1
  10. package/dist/chunks/chunk.LKMWWUYT.js +20 -0
  11. package/dist/chunks/{chunk.J7OUGJBS.js → chunk.LVC64FO7.js} +2 -2
  12. package/dist/chunks/{chunk.ARF626EG.js → chunk.LXN3PNAP.js} +1 -1
  13. package/dist/chunks/{chunk.7TYQYCSB.js → chunk.M3LK72JN.js} +1 -1
  14. package/dist/chunks/{chunk.JVUHDRTK.js → chunk.MYCDEEQF.js} +1 -1
  15. package/dist/chunks/{chunk.3LBUXCAP.js → chunk.N5KXL4J6.js} +1 -1
  16. package/dist/chunks/chunk.P6GWPFCT.js +32 -0
  17. package/dist/chunks/{chunk.BD4Q32VT.js → chunk.R44PTHOJ.js} +4 -4
  18. package/dist/chunks/{chunk.2Y2ST5QL.js → chunk.WELXILIP.js} +1 -1
  19. package/dist/chunks/{chunk.7BVHA4G6.js → chunk.X354U5TL.js} +3 -3
  20. package/dist/chunks/{chunk.MZOQNTPX.js → chunk.ZGC6XD6L.js} +37 -56
  21. package/dist/chunks/chunk.ZKUACKKG.js +14 -0
  22. package/dist/components/consent/consent.component.d.ts +0 -3
  23. package/dist/components/consent/consent.component.js +1 -1
  24. package/dist/components/consent/consent.js +1 -1
  25. package/dist/components/consent/consent.styles.js +1 -1
  26. package/dist/components/file-input-dropzone/file-input-dropzone.component.d.ts +0 -2
  27. package/dist/components/file-input-dropzone/file-input-dropzone.component.js +1 -1
  28. package/dist/components/file-input-dropzone/file-input-dropzone.js +1 -1
  29. package/dist/components/file-input-dropzone/file-input-dropzone.styles.js +1 -1
  30. package/dist/components/header/header.component.d.ts +31 -6
  31. package/dist/components/header/header.component.js +1 -1
  32. package/dist/components/header/header.js +1 -1
  33. package/dist/components/header/header.styles.js +1 -1
  34. package/dist/components/list-card/list-card.component.d.ts +0 -1
  35. package/dist/components/list-card/list-card.component.js +1 -1
  36. package/dist/components/list-card/list-card.js +1 -1
  37. package/dist/components/list-card/list-card.styles.js +1 -1
  38. package/dist/components/logo/logo.component.js +1 -1
  39. package/dist/components/logo/logo.js +1 -1
  40. package/dist/components/logo/logo.styles.js +1 -1
  41. package/dist/components/tool-menu/tool-menu.component.d.ts +0 -3
  42. package/dist/components/tool-menu/tool-menu.component.js +1 -1
  43. package/dist/components/tool-menu/tool-menu.js +1 -1
  44. package/dist/components/tool-menu/tool-menu.styles.js +1 -1
  45. package/dist/components/tracking/tracking.component.d.ts +0 -3
  46. package/dist/components/tracking/tracking.component.js +1 -1
  47. package/dist/components/tracking/tracking.js +1 -1
  48. package/dist/hotosm-ui.js +1 -1
  49. package/dist/style-core.css +1 -0
  50. package/dist/style.css +1 -1
  51. package/dist/themes/hot-wa.css +152 -115
  52. package/dist/themes/hot.css +1 -1
  53. package/package.json +4 -2
  54. package/dist/chunks/chunk.CQO3GWTI.js +0 -32
  55. package/dist/chunks/chunk.LHZ7Q2M3.js +0 -166
  56. package/dist/chunks/chunk.PBBH42B6.js +0 -6
  57. package/dist/chunks/chunk.PLECT4NZ.js +0 -20
  58. package/dist/chunks/chunk.QWZJAW2S.js +0 -105
  59. package/dist/chunks/chunk.U4AAC5ID.js +0 -239
@@ -0,0 +1,526 @@
1
+ import{a as u}from"./chunk.QABMDRWR.js";import{a as h,c as v}from"./chunk.N2W26RCT.js";function f(a){var t,e,r="";if(typeof a=="string"||typeof a=="number")r+=a;else if(typeof a=="object")if(Array.isArray(a)){var i=a.length;for(t=0;t<i;t++)a[t]&&(e=f(a[t]))&&(r&&(r+=" "),r+=e)}else for(e in a)a[e]&&(r&&(r+=" "),r+=e);return r}function b(){for(var a,t,e=0,r="",i=arguments.length;e<i;e++)(a=arguments[e])&&(t=f(a))&&(r&&(r+=" "),r+=t);return r}var x=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,w=b,z=(a,t)=>e=>{var r;if((t==null?void 0:t.variants)==null)return w(a,e==null?void 0:e.class,e==null?void 0:e.className);let{variants:i,defaultVariants:s}=t,y=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=x(n)||x(d);return i[o][l]}),g=e&&Object.entries(e).reduce((o,n)=>{let[d,l]=n;return l===void 0||(o[d]=l),o},{}),k=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((o,n)=>{let c=n,{class:d,className:l}=c,j=v(c,["class","className"]);return Object.entries(j).every(V=>{let[p,m]=V;return Array.isArray(m)?m.includes(h(h({},s),g)[p]):h(h({},s),g)[p]===m})?[...o,d,l]:o},[]);return w(a,y,k,e==null?void 0:e.class,e==null?void 0:e.className)};var T=z("header",{variants:{size:{small:"header--size-small",medium:"header--size-medium",large:"header--size-large"},borderBottom:{true:"border-bottom"}}}),B=u`
2
+ /* ================================================================
3
+ * Layout
4
+ * ================================================================ */
5
+
6
+ .header-container {
7
+ background-color: #ffffff;
8
+ border-bottom: 1px solid var(--hot-color-neutral-100);
9
+ }
10
+
11
+ .header {
12
+ display: flex;
13
+ align-items: stretch;
14
+ justify-content: space-between;
15
+ height: auto;
16
+ padding: var(--hot-spacing-2x-small) var(--hot-spacing-small);
17
+ }
18
+
19
+ .header.border-bottom {
20
+ border-bottom: var(--hot-spacing-3x-small) solid var(--hot-color-neutral-50);
21
+ }
22
+
23
+ /* ================================================================
24
+ * Top bar (tagline + external link) — hidden on "small" variant
25
+ * ================================================================ */
26
+
27
+ .header--top {
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: space-between;
31
+ padding: var(--hot-spacing-2x-small) var(--hot-spacing-small);
32
+ background-color: #ffffff;
33
+ font-family: var(--hot-font-sans);
34
+ font-size: var(--hot-font-size-small);
35
+ border-bottom: 1px solid var(--hot-color-neutral-100);
36
+ }
37
+
38
+ .header--top-tagline {
39
+ color: var(--hot-color-primary-400);
40
+ white-space: nowrap;
41
+ }
42
+
43
+ .header--top-link {
44
+ color: var(--hot-color-primary-400);
45
+ text-decoration: none;
46
+ font-weight: var(--hot-font-weight-semibold);
47
+ }
48
+
49
+ .header--top-link:hover {
50
+ text-decoration: underline;
51
+ }
52
+
53
+ .header--external-icon {
54
+ display: inline-block;
55
+ vertical-align: middle;
56
+ margin-left: var(--hot-spacing-3x-small);
57
+ width: 0.65em;
58
+ height: 0.65em;
59
+ }
60
+
61
+ /* ================================================================
62
+ * Logo / title link
63
+ * ================================================================ */
64
+
65
+ .header--link {
66
+ text-decoration: none;
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: flex-start;
70
+ padding-right: var(--hot-spacing-2x-small);
71
+ gap: var(--hot-spacing-x-small);
72
+ flex-shrink: 0;
73
+ }
74
+
75
+ .header--link hot-logo {
76
+ display: flex;
77
+ align-items: center;
78
+ }
79
+
80
+ .header--link .header--logo-img {
81
+ max-height: 2.5rem;
82
+ width: auto;
83
+ display: block;
84
+ object-fit: contain;
85
+ vertical-align: middle;
86
+ }
87
+
88
+ .header--title {
89
+ color: var(--hot-color-neutral-950);
90
+ font-family: var(--hot-font-sans);
91
+ font-size: var(--hot-font-size-large);
92
+ margin: 0;
93
+ line-height: 1;
94
+ white-space: nowrap;
95
+ }
96
+
97
+ /* ================================================================
98
+ * Navigation (desktop tabs with horizontal scroll arrows)
99
+ * Hidden on mobile; shown via media query below.
100
+ * ================================================================ */
101
+
102
+ .header--nav {
103
+ display: none;
104
+ }
105
+
106
+ .header--nav-wrapper {
107
+ display: flex;
108
+ align-items: center;
109
+ width: 100%;
110
+ gap: var(--hot-spacing-2x-small);
111
+ overflow: hidden;
112
+ }
113
+
114
+ .header--nav-scroll {
115
+ flex: 1;
116
+ overflow-x: auto;
117
+ scrollbar-width: none;
118
+ }
119
+
120
+ .header--nav-scroll::-webkit-scrollbar {
121
+ display: none;
122
+ }
123
+
124
+ .header--nav-arrow {
125
+ background: transparent;
126
+ border: none;
127
+ color: var(--hot-color-neutral-500);
128
+ cursor: pointer;
129
+ padding: 0;
130
+ font-size: var(--hot-font-size-medium);
131
+ line-height: 1;
132
+ display: flex;
133
+ align-items: center;
134
+ justify-content: center;
135
+ flex-shrink: 0;
136
+ }
137
+
138
+ .header--nav-arrow:hover {
139
+ color: var(--hot-color-neutral-800);
140
+ }
141
+
142
+ .header--nav-arrow[disabled] {
143
+ opacity: 0;
144
+ pointer-events: none;
145
+ width: 0;
146
+ padding: 0;
147
+ overflow: hidden;
148
+ }
149
+
150
+ .header--nav-mobile {
151
+ display: block;
152
+ width: 100%;
153
+ margin-top: var(--hot-spacing-small);
154
+ }
155
+
156
+ /* ================================================================
157
+ * Tabs
158
+ * ================================================================ */
159
+
160
+ .header--tab-group::part(base) {
161
+ --track-color: transparent;
162
+ --indicator-color: transparent;
163
+ }
164
+
165
+ .header--tab-group::part(nav) {
166
+ display: flex;
167
+ justify-content: flex-start;
168
+ }
169
+
170
+ .header--tab::part(base) {
171
+ font-size: var(--hot-font-size-medium);
172
+ font-weight: var(--hot-font-weight-bold);
173
+ color: var(--hot-color-neutral-600);
174
+ padding: var(--hot-spacing-small);
175
+ border-bottom: 3px solid transparent;
176
+ transition: all 0.2s ease;
177
+ text-transform: uppercase;
178
+ letter-spacing: 0.5px;
179
+ white-space: nowrap;
180
+ }
181
+
182
+ .header--tab[active]::part(base) {
183
+ color: var(--hot-color-neutral-800);
184
+ border-bottom-color: var(--hot-color-neutral-800);
185
+ }
186
+
187
+ .header--tab:hover::part(base) {
188
+ color: var(--hot-color-neutral-800);
189
+ border-bottom-color: var(--hot-color-neutral-300);
190
+ }
191
+
192
+ .header--tab[active]:hover::part(base) {
193
+ color: var(--hot-color-neutral-900);
194
+ border-bottom-color: var(--hot-color-neutral-900);
195
+ }
196
+
197
+ /* ================================================================
198
+ * Right section (login button, drawer toggle)
199
+ * ================================================================ */
200
+
201
+ .header--right-section {
202
+ display: flex;
203
+ align-items: center;
204
+ justify-content: flex-end;
205
+ gap: var(--hot-spacing-x-small);
206
+ flex-shrink: 0;
207
+ }
208
+
209
+ /* Base mobile touch target for drawer / close buttons */
210
+ wa-button[appearance="outlined"] {
211
+ min-width: 2.5rem;
212
+ min-height: 2.5rem;
213
+ padding: 0.5rem;
214
+ }
215
+
216
+ /* ================================================================
217
+ * User avatar + dropdown (shown when logged in)
218
+ * ================================================================ */
219
+
220
+ .header--avatar-trigger {
221
+ background: none;
222
+ border: none;
223
+ padding: 0;
224
+ cursor: pointer;
225
+ display: flex;
226
+ align-items: center;
227
+ justify-content: center;
228
+ border-radius: 50%;
229
+ width: 2rem;
230
+ height: 2rem;
231
+ }
232
+
233
+ .header--avatar-trigger:hover {
234
+ box-shadow: 0 0 0 2px var(--hot-color-neutral-200);
235
+ }
236
+
237
+ /* Google-style text initial avatar */
238
+ .header--avatar-initial {
239
+ display: flex;
240
+ align-items: center;
241
+ justify-content: center;
242
+ width: 100%;
243
+ height: 100%;
244
+ border-radius: 50%;
245
+ background-color: var(--hot-color-primary-500);
246
+ color: #fff;
247
+ font-weight: 600;
248
+ font-size: 0.85rem;
249
+ line-height: 1;
250
+ text-transform: uppercase;
251
+ user-select: none;
252
+ }
253
+
254
+ .header--size-small .header--avatar-trigger {
255
+ width: 1.5rem;
256
+ height: 1.5rem;
257
+ }
258
+
259
+ .header--size-small .header--avatar-initial {
260
+ font-size: 0.7rem;
261
+ }
262
+
263
+ .header--user-dropdown::part(menu) {
264
+ min-width: 10rem;
265
+ }
266
+
267
+ /* ================================================================
268
+ * Login modal
269
+ * ================================================================ */
270
+
271
+ .login-modal {
272
+ --width: 35rem;
273
+ --border-radius: var(--hot-border-radius-large);
274
+ --background-color: white;
275
+ }
276
+
277
+ /* ================================================================
278
+ * Size variants
279
+ *
280
+ * small — compact toolbar (48 px)
281
+ * medium — standard header (60 px)
282
+ * large — prominent header (72 px)
283
+ *
284
+ * Each section scales: header height, logo, title, buttons, tabs.
285
+ * ================================================================ */
286
+
287
+ /* ─── Small (48 px) ─── */
288
+
289
+ .header--size-small {
290
+ height: var(--hot-spacing-3x-large); /* 3rem */
291
+ }
292
+
293
+ .header--size-small .header--link {
294
+ padding-top: var(--hot-spacing-x-small);
295
+ padding-bottom: var(--hot-spacing-x-small);
296
+ }
297
+
298
+ .header--size-small hot-logo {
299
+ --hot-logo-height: calc(var(--hot-spacing-medium) + var(--hot-spacing-x-small)); /* 1.5rem */
300
+ }
301
+
302
+ .header--size-small .header--logo-img {
303
+ max-height: 1.75rem;
304
+ }
305
+
306
+ .header--size-small .header--title {
307
+ font-size: var(--hot-font-size-medium);
308
+ }
309
+
310
+ .header--size-small .header--tab::part(base) {
311
+ font-size: var(--hot-font-size-small);
312
+ padding: var(--hot-spacing-x-small);
313
+ }
314
+
315
+ .header--size-small .header--right-section {
316
+ padding-top: var(--hot-spacing-x-small);
317
+ padding-bottom: var(--hot-spacing-x-small);
318
+ gap: var(--hot-spacing-2x-small);
319
+ }
320
+
321
+ .header--size-small .login-button::part(base) {
322
+ padding: var(--hot-spacing-3x-small) var(--hot-spacing-x-small);
323
+ font-size: var(--hot-font-size-small);
324
+ }
325
+
326
+ .header--size-small .header--right-section wa-button[appearance="outlined"] {
327
+ min-width: 1.5rem;
328
+ min-height: 1.5rem;
329
+ padding: 0;
330
+ }
331
+
332
+ .header--size-small .header--right-section wa-button[appearance="outlined"]::part(base) {
333
+ min-width: 1.5rem;
334
+ min-height: 1.5rem;
335
+ padding: var(--hot-spacing-3x-small);
336
+ }
337
+
338
+ /* ─── Medium (60 px) ─── */
339
+
340
+ .header--size-medium {
341
+ height: calc(var(--hot-spacing-3x-large) + var(--hot-spacing-small)); /* 3.75rem */
342
+ }
343
+
344
+ .header--size-medium .header--link {
345
+ padding-top: var(--hot-spacing-x-small);
346
+ padding-bottom: var(--hot-spacing-x-small);
347
+ }
348
+
349
+ .header--size-medium hot-logo {
350
+ --hot-logo-height: var(--hot-spacing-2x-large); /* 2.25rem */
351
+ }
352
+
353
+ .header--size-medium .header--logo-img {
354
+ max-height: 2.25rem;
355
+ }
356
+
357
+ .header--size-medium .login-button::part(base) {
358
+ padding: var(--hot-spacing-2x-small) var(--hot-spacing-x-small);
359
+ font-size: var(--hot-font-size-small);
360
+ }
361
+
362
+ .header--size-medium .header--right-section wa-button[appearance="outlined"] {
363
+ min-width: 2rem;
364
+ min-height: 2rem;
365
+ padding: 0;
366
+ }
367
+
368
+ .header--size-medium .header--right-section wa-button[appearance="outlined"]::part(base) {
369
+ min-width: 2rem;
370
+ min-height: 2rem;
371
+ padding: var(--hot-spacing-2x-small);
372
+ }
373
+
374
+ /* ─── Large (72 px) ─── */
375
+
376
+ .header--size-large {
377
+ height: var(--hot-spacing-4x-large); /* 4.5rem */
378
+ }
379
+
380
+ .header--size-large .header--link {
381
+ padding-top: var(--hot-spacing-x-small);
382
+ padding-bottom: var(--hot-spacing-x-small);
383
+ }
384
+
385
+ .header--size-large hot-logo {
386
+ --hot-logo-height: var(--hot-spacing-3x-large); /* 3rem */
387
+ }
388
+
389
+ .header--size-large .header--logo-img {
390
+ max-height: 2.75rem;
391
+ }
392
+
393
+ .header--size-large .header--title {
394
+ font-size: var(--hot-font-size-x-large);
395
+ }
396
+
397
+ /* ================================================================
398
+ * Desktop / tablet (≥ 769 px)
399
+ * ================================================================ */
400
+
401
+ @media (min-width: 769px) {
402
+ .header {
403
+ align-items: center;
404
+ height: auto;
405
+ }
406
+
407
+ .header--link {
408
+ justify-content: flex-start;
409
+ padding-right: 0;
410
+ gap: var(--hot-spacing-small);
411
+ }
412
+
413
+ .header--title {
414
+ font-size: var(--hot-font-size-x-large);
415
+ }
416
+
417
+ .header--nav {
418
+ display: flex;
419
+ align-items: center;
420
+ flex: 1;
421
+ min-width: 0;
422
+ margin-left: var(--hot-spacing-x-large);
423
+ font-weight: var(--hot-font-weight-semibold);
424
+ overflow: hidden;
425
+ }
426
+
427
+ .header--nav-mobile {
428
+ display: none;
429
+ }
430
+
431
+ .header--right-section {
432
+ justify-content: center;
433
+ margin-top: 0;
434
+ gap: var(--hot-spacing-small);
435
+ }
436
+
437
+ .header--size-small .header--logo-img {
438
+ max-height: 1.75rem;
439
+ }
440
+
441
+ .header--size-medium .header--logo-img {
442
+ max-height: 2.5rem;
443
+ }
444
+
445
+ .header--size-large .header--logo-img {
446
+ max-height: 2.75rem;
447
+ }
448
+
449
+ wa-button[appearance="outlined"] {
450
+ min-width: auto;
451
+ min-height: auto;
452
+ padding: initial;
453
+ }
454
+ }
455
+
456
+ /* ================================================================
457
+ * Drawer (mobile sidebar)
458
+ * ================================================================ */
459
+
460
+ .drawer-content {
461
+ list-style: none;
462
+ padding: 0;
463
+ margin: 0;
464
+ }
465
+
466
+ .drawer-nav {
467
+ margin-bottom: var(--hot-spacing-small);
468
+ }
469
+
470
+ .drawer-nav-list {
471
+ list-style: none;
472
+ padding: 0;
473
+ margin: 0;
474
+ }
475
+
476
+ .drawer-nav-item + .drawer-nav-item {
477
+ margin-top: var(--hot-spacing-x-small);
478
+ }
479
+
480
+ .drawer-nav-button {
481
+ width: 100%;
482
+ text-align: left;
483
+ background: none;
484
+ border: none;
485
+ padding: var(--hot-spacing-x-small) 0;
486
+ font: inherit;
487
+ color: var(--hot-color-neutral-950);
488
+ cursor: pointer;
489
+ }
490
+
491
+ .drawer-nav-button:hover {
492
+ color: var(--hot-color-primary-600);
493
+ }
494
+
495
+ .drawer-separator {
496
+ border: 0;
497
+ border-top: 1px solid var(--hot-color-neutral-100);
498
+ margin: var(--hot-spacing-small) 0;
499
+ }
500
+
501
+ .drawer-link-list {
502
+ list-style: none;
503
+ padding: 0;
504
+ margin: 0;
505
+ }
506
+
507
+ .drawer-link-item + .drawer-link-item {
508
+ margin-top: var(--hot-spacing-small);
509
+ }
510
+
511
+ .drawer-link {
512
+ color: inherit;
513
+ text-decoration: none;
514
+ font-size: var(--hot-font-size-medium);
515
+ }
516
+
517
+ .drawer-link:hover {
518
+ text-decoration: underline;
519
+ }
520
+
521
+ @media (min-width: 769px) {
522
+ .drawer-nav {
523
+ display: none;
524
+ }
525
+ }
526
+ `;export{T as a,B as b};