@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/dist/themes/hot-wa.css
CHANGED
|
@@ -11,11 +11,17 @@
|
|
|
11
11
|
@import "./hot-wa.css";
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
+
/* ─── Palette layer ─────────────────────────────────────────────────────────
|
|
15
|
+
Maps HOT primitive colors onto WA's named palette slots.
|
|
16
|
+
WA numbers 05 (darkest) → 95 (lightest); HOT numbers 950 (darkest) → 50 (lightest).
|
|
17
|
+
These are ONLY color primitives — no typography or spacing here, because
|
|
18
|
+
WA declares those tokens in @layer wa-theme which has higher priority than
|
|
19
|
+
@layer wa-color-palette. Typography/spacing overrides live in wa-theme below.
|
|
20
|
+
─────────────────────────────────────────────────────────────────────────── */
|
|
14
21
|
@layer wa-color-palette {
|
|
15
22
|
:where(:root),
|
|
16
23
|
.wa-palette-hotosm {
|
|
17
|
-
/*
|
|
18
|
-
/* Material design and WebAwesome convention is the inverse, so we map to that */
|
|
24
|
+
/* Red */
|
|
19
25
|
--wa-color-red-95: var(--hot-color-red-50);
|
|
20
26
|
--wa-color-red-90: var(--hot-color-red-100);
|
|
21
27
|
--wa-color-red-80: var(--hot-color-red-200);
|
|
@@ -30,6 +36,7 @@
|
|
|
30
36
|
--wa-color-red: var(--wa-color-red-50);
|
|
31
37
|
--wa-color-red-key: 50;
|
|
32
38
|
|
|
39
|
+
/* Orange → HOT rose (persian plum) */
|
|
33
40
|
--wa-color-orange-95: var(--hot-color-rose-50);
|
|
34
41
|
--wa-color-orange-90: var(--hot-color-rose-100);
|
|
35
42
|
--wa-color-orange-80: var(--hot-color-rose-200);
|
|
@@ -44,6 +51,7 @@
|
|
|
44
51
|
--wa-color-orange: var(--wa-color-orange-60);
|
|
45
52
|
--wa-color-orange-key: 60;
|
|
46
53
|
|
|
54
|
+
/* Yellow */
|
|
47
55
|
--wa-color-yellow-95: var(--hot-color-yellow-50);
|
|
48
56
|
--wa-color-yellow-90: var(--hot-color-yellow-100);
|
|
49
57
|
--wa-color-yellow-80: var(--hot-color-yellow-200);
|
|
@@ -58,6 +66,7 @@
|
|
|
58
66
|
--wa-color-yellow: var(--wa-color-yellow-80);
|
|
59
67
|
--wa-color-yellow-key: 80;
|
|
60
68
|
|
|
69
|
+
/* Cyan */
|
|
61
70
|
--wa-color-cyan-95: var(--hot-color-cyan-50);
|
|
62
71
|
--wa-color-cyan-90: var(--hot-color-cyan-100);
|
|
63
72
|
--wa-color-cyan-80: var(--hot-color-cyan-200);
|
|
@@ -72,6 +81,7 @@
|
|
|
72
81
|
--wa-color-cyan: var(--wa-color-cyan-70);
|
|
73
82
|
--wa-color-cyan-key: 70;
|
|
74
83
|
|
|
84
|
+
/* Blue (space cadet) */
|
|
75
85
|
--wa-color-blue-95: var(--hot-color-blue-50);
|
|
76
86
|
--wa-color-blue-90: var(--hot-color-blue-100);
|
|
77
87
|
--wa-color-blue-80: var(--hot-color-blue-200);
|
|
@@ -86,6 +96,7 @@
|
|
|
86
96
|
--wa-color-blue: var(--wa-color-blue-50);
|
|
87
97
|
--wa-color-blue-key: 50;
|
|
88
98
|
|
|
99
|
+
/* Gray */
|
|
89
100
|
--wa-color-gray-95: var(--hot-color-gray-50);
|
|
90
101
|
--wa-color-gray-90: var(--hot-color-gray-100);
|
|
91
102
|
--wa-color-gray-80: var(--hot-color-gray-200);
|
|
@@ -100,13 +111,13 @@
|
|
|
100
111
|
--wa-color-gray: var(--wa-color-gray-40);
|
|
101
112
|
--wa-color-gray-key: 40;
|
|
102
113
|
|
|
103
|
-
/* Brand
|
|
114
|
+
/* Brand → HOT primary (red) */
|
|
104
115
|
--wa-color-brand-95: var(--hot-color-primary-50);
|
|
105
116
|
--wa-color-brand-90: var(--hot-color-primary-100);
|
|
106
117
|
--wa-color-brand-80: var(--hot-color-primary-200);
|
|
107
118
|
--wa-color-brand-70: var(--hot-color-primary-300);
|
|
108
119
|
--wa-color-brand-60: var(--hot-color-primary-400);
|
|
109
|
-
--wa-color-brand-50: var(--hot-color-
|
|
120
|
+
--wa-color-brand-50: var(--hot-color-primary-500);
|
|
110
121
|
--wa-color-brand-40: var(--hot-color-primary-600);
|
|
111
122
|
--wa-color-brand-30: var(--hot-color-primary-700);
|
|
112
123
|
--wa-color-brand-20: var(--hot-color-primary-800);
|
|
@@ -115,7 +126,7 @@
|
|
|
115
126
|
--wa-color-brand: var(--wa-color-brand-50);
|
|
116
127
|
--wa-color-brand-key: 50;
|
|
117
128
|
|
|
118
|
-
/* Neutral
|
|
129
|
+
/* Neutral → HOT gray */
|
|
119
130
|
--wa-color-neutral-95: var(--hot-color-neutral-50);
|
|
120
131
|
--wa-color-neutral-90: var(--hot-color-neutral-100);
|
|
121
132
|
--wa-color-neutral-80: var(--hot-color-neutral-200);
|
|
@@ -130,7 +141,7 @@
|
|
|
130
141
|
--wa-color-neutral: var(--wa-color-neutral-40);
|
|
131
142
|
--wa-color-neutral-key: 40;
|
|
132
143
|
|
|
133
|
-
/* Success
|
|
144
|
+
/* Success → HOT cyan */
|
|
134
145
|
--wa-color-success-95: var(--hot-color-success-50);
|
|
135
146
|
--wa-color-success-90: var(--hot-color-success-100);
|
|
136
147
|
--wa-color-success-80: var(--hot-color-success-200);
|
|
@@ -145,7 +156,7 @@
|
|
|
145
156
|
--wa-color-success: var(--wa-color-success-60);
|
|
146
157
|
--wa-color-success-key: 60;
|
|
147
158
|
|
|
148
|
-
/* Warning
|
|
159
|
+
/* Warning → HOT yellow */
|
|
149
160
|
--wa-color-warning-95: var(--hot-color-warning-50);
|
|
150
161
|
--wa-color-warning-90: var(--hot-color-warning-100);
|
|
151
162
|
--wa-color-warning-80: var(--hot-color-warning-200);
|
|
@@ -160,7 +171,7 @@
|
|
|
160
171
|
--wa-color-warning: var(--wa-color-warning-80);
|
|
161
172
|
--wa-color-warning-key: 80;
|
|
162
173
|
|
|
163
|
-
/* Danger
|
|
174
|
+
/* Danger → HOT red (same as primary) */
|
|
164
175
|
--wa-color-danger-95: var(--hot-color-danger-50);
|
|
165
176
|
--wa-color-danger-90: var(--hot-color-danger-100);
|
|
166
177
|
--wa-color-danger-80: var(--hot-color-danger-200);
|
|
@@ -175,8 +186,8 @@
|
|
|
175
186
|
--wa-color-danger: var(--wa-color-danger-50);
|
|
176
187
|
--wa-color-danger-key: 50;
|
|
177
188
|
|
|
178
|
-
/*
|
|
179
|
-
|
|
189
|
+
/* Unchanged: green, indigo, purple, pink
|
|
190
|
+
See https://early.webawesome.com/webawesome@3.2.1/dist/styles/color/palettes/default.css */
|
|
180
191
|
|
|
181
192
|
--wa-color-green-95: #e3f9e3 /* oklch(96.006% 0.03715 145.28) */;
|
|
182
193
|
--wa-color-green-90: #c2f2c1 /* oklch(91.494% 0.08233 144.35) */;
|
|
@@ -233,71 +244,15 @@
|
|
|
233
244
|
--wa-color-pink-05: #28041a /* oklch(19.199% 0.06799 346.97) */;
|
|
234
245
|
--wa-color-pink: var(--wa-color-pink-50);
|
|
235
246
|
--wa-color-pink-key: 50;
|
|
236
|
-
|
|
237
|
-
/* Fonts */
|
|
238
|
-
--wa-font-family-body: var(--hot-font-sans);
|
|
239
|
-
--wa-font-family-heading: var(--hot-font-sans-variant);
|
|
240
|
-
--wa-font-family-code: var(--hot-font-mono);
|
|
241
|
-
--wa-font-family-longform: var(--hot-font-sefif);
|
|
242
|
-
|
|
243
|
-
/* Font sizes */
|
|
244
|
-
--wa-font-size-2xs: var(--hot-font-size-2x-small); /* 10px */
|
|
245
|
-
--wa-font-size-xs: var(--hot-font-size-x-small); /* 12px */
|
|
246
|
-
--wa-font-size-s: var(--hot-font-size-small); /* 14px */
|
|
247
|
-
--wa-font-size-m: var(--hot-font-size-medium); /* 16px */
|
|
248
|
-
--wa-font-size-l: var(--hot-font-size-large); /* 20px */
|
|
249
|
-
--wa-font-size-xl: var(--hot-font-size-x-large); /* 24px */
|
|
250
|
-
--wa-font-size-2xl: var(--hot-font-size-2x-large); /* 36px */
|
|
251
|
-
--wa-font-size-3xl: var(--hot-font-size-3x-large); /* 48px */
|
|
252
|
-
--wa-font-size-4xl: var(--hot-font-size-4x-large); /* 72px */
|
|
253
|
-
/* Note: `wa-font-size-scale` and `wa-font-size-smaller` / `larger` have no direct `hot-` match.
|
|
254
|
-
They depend on calc() so we set no overrides here. */
|
|
255
|
-
|
|
256
|
-
/* Font weights */
|
|
257
|
-
--wa-font-weight-light: var(--hot-font-weight-light);
|
|
258
|
-
--wa-font-weight-normal: var(--hot-font-weight-normal);
|
|
259
|
-
--wa-font-weight-semibold: var(--hot-font-weight-semibold);
|
|
260
|
-
--wa-font-weight-bold: var(--hot-font-weight-bold);
|
|
261
|
-
|
|
262
|
-
/* Functional font weights */
|
|
263
|
-
--wa-font-weight-body: var(--wa-font-weight-normal);
|
|
264
|
-
--wa-font-weight-heading: var(--wa-font-weight-bold);
|
|
265
|
-
--wa-font-weight-code: var(--wa-font-weight-normal);
|
|
266
|
-
--wa-font-weight-longform: var(--wa-font-weight-normal);
|
|
267
|
-
--wa-font-weight-action: var(--wa-font-weight-semibold);
|
|
268
|
-
|
|
269
|
-
/* Line heights */
|
|
270
|
-
--wa-line-height-condensed: var(--hot-line-height-denser);
|
|
271
|
-
--wa-line-height-normal: var(--hot-line-height-normal);
|
|
272
|
-
--wa-line-height-expanded: var(--hot-line-height-looser);
|
|
273
|
-
|
|
274
|
-
/*
|
|
275
|
-
* Spacing, rounding, etc
|
|
276
|
-
*
|
|
277
|
-
* See https://early.webawesome.com/webawesome@3.2.1/dist/styles/themes/default.css for all options
|
|
278
|
-
*/
|
|
279
|
-
/* */
|
|
280
|
-
|
|
281
|
-
--wa-space-3xs: var(--hot-spacing-3x-small); /* 2px */
|
|
282
|
-
--wa-space-2xs: var(--hot-spacing-2x-small); /* 4px */
|
|
283
|
-
--wa-space-xs: var(--hot-spacing-x-small); /* 8px */
|
|
284
|
-
--wa-space-s: var(--hot-spacing-small); /* 12px */
|
|
285
|
-
--wa-space-m: var(--hot-spacing-medium); /* 16px */
|
|
286
|
-
--wa-space-l: var(--hot-spacing-large); /* 20px */
|
|
287
|
-
--wa-space-xl: var(--hot-spacing-x-large); /* 28px */
|
|
288
|
-
--wa-space-2xl: var(--hot-spacing-2x-large); /* 36px */
|
|
289
|
-
--wa-space-3xl: var(--hot-spacing-3x-large); /* 48px */
|
|
290
|
-
--wa-space-4xl: var(--hot-spacing-4x-large); /* 72px */
|
|
291
|
-
|
|
292
|
-
--wa-border-radius-s: var(--hot-border-radius-small); /* 3px */
|
|
293
|
-
--wa-border-radius-m: var(--hot-border-radius-medium); /* 4px */
|
|
294
|
-
--wa-border-radius-l: var(--hot-border-radius-large); /* 8px */
|
|
295
|
-
--wa-border-radius-pill: var(--hot-border-radius-pill); /* 9999px */
|
|
296
|
-
--wa-border-radius-circle: var(--hot-border-radius-circle); /* 50% */
|
|
297
247
|
}
|
|
298
248
|
}
|
|
299
249
|
|
|
300
|
-
/* Theme layer
|
|
250
|
+
/* ─── Theme layer ────────────────────────────────────────────────────────────
|
|
251
|
+
Semantic color tokens + typography + spacing + borders.
|
|
252
|
+
All overrides are in @layer wa-theme so they take precedence over WA's own
|
|
253
|
+
wa-theme defaults (our hot-wa.css is imported after WA's default.css, so
|
|
254
|
+
within the same layer our declarations win).
|
|
255
|
+
─────────────────────────────────────────────────────────────────────────── */
|
|
301
256
|
@layer wa-theme {
|
|
302
257
|
:where(:root),
|
|
303
258
|
.wa-theme-default,
|
|
@@ -306,6 +261,7 @@
|
|
|
306
261
|
.wa-light .wa-theme-default,
|
|
307
262
|
.wa-dark .wa-theme-default.wa-invert,
|
|
308
263
|
.wa-dark .wa-theme-default .wa-invert {
|
|
264
|
+
/* #region Colors (Light) */
|
|
309
265
|
color-scheme: light;
|
|
310
266
|
color: var(--wa-color-text-normal);
|
|
311
267
|
|
|
@@ -334,58 +290,139 @@
|
|
|
334
290
|
var(--hot-color-neutral-950) calc(var(--wa-shadow-blur-scale) * 4% + 8%),
|
|
335
291
|
transparent
|
|
336
292
|
);
|
|
293
|
+
|
|
337
294
|
--wa-color-focus: var(--hot-color-primary-400);
|
|
295
|
+
|
|
338
296
|
--wa-color-mix-hover: black 10%;
|
|
339
297
|
--wa-color-mix-active: black 20%;
|
|
340
298
|
|
|
341
|
-
|
|
342
|
-
--wa-color-brand-fill-
|
|
343
|
-
--wa-color-brand-fill-
|
|
344
|
-
--wa-color-brand-
|
|
345
|
-
--wa-color-brand-border-
|
|
346
|
-
--wa-color-brand-border-
|
|
347
|
-
--wa-color-brand-
|
|
348
|
-
--wa-color-brand-on-
|
|
299
|
+
/* Brand = HOT primary (red) */
|
|
300
|
+
--wa-color-brand-fill-quiet: var(--wa-color-brand-95); /* primary-50 */
|
|
301
|
+
--wa-color-brand-fill-normal: var(--wa-color-brand-90); /* primary-100 */
|
|
302
|
+
--wa-color-brand-fill-loud: var(--wa-color-brand-50); /* primary-500 */
|
|
303
|
+
--wa-color-brand-border-quiet: var(--wa-color-brand-90); /* primary-100 */
|
|
304
|
+
--wa-color-brand-border-normal: var(--wa-color-brand-80); /* primary-200 */
|
|
305
|
+
--wa-color-brand-border-loud: var(--wa-color-brand-60); /* primary-400 */
|
|
306
|
+
--wa-color-brand-on-quiet: var(--wa-color-brand-40); /* primary-600 */
|
|
307
|
+
--wa-color-brand-on-normal: var(--wa-color-brand-30); /* primary-700 */
|
|
349
308
|
--wa-color-brand-on-loud: white;
|
|
350
309
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
--wa-color-success-fill-
|
|
354
|
-
--wa-color-success-
|
|
355
|
-
--wa-color-success-
|
|
356
|
-
--wa-color-success-border-
|
|
357
|
-
--wa-color-success-
|
|
358
|
-
--wa-color-success-
|
|
310
|
+
/* Success = HOT cyan
|
|
311
|
+
on-quiet/normal use darker values for sufficient contrast on light backgrounds */
|
|
312
|
+
--wa-color-success-fill-quiet: var(--wa-color-success-95); /* success-50 */
|
|
313
|
+
--wa-color-success-fill-normal: var(--wa-color-success-90); /* success-100 */
|
|
314
|
+
--wa-color-success-fill-loud: var(--wa-color-success-50); /* success-500 */
|
|
315
|
+
--wa-color-success-border-quiet: var(--wa-color-success-90); /* success-100 */
|
|
316
|
+
--wa-color-success-border-normal: var(--wa-color-success-80); /* success-200 */
|
|
317
|
+
--wa-color-success-border-loud: var(--wa-color-success-60); /* success-400 */
|
|
318
|
+
--wa-color-success-on-quiet: var(--wa-color-success-20); /* success-800 — a11y: cyan needs dark text */
|
|
319
|
+
--wa-color-success-on-normal: var(--wa-color-success-20); /* success-800 */
|
|
359
320
|
--wa-color-success-on-loud: white;
|
|
360
321
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
--wa-color-warning-fill-
|
|
364
|
-
--wa-color-warning-
|
|
365
|
-
--wa-color-warning-
|
|
366
|
-
--wa-color-warning-border-
|
|
367
|
-
--wa-color-warning-
|
|
368
|
-
--wa-color-warning-
|
|
369
|
-
--wa-color-warning-on-
|
|
370
|
-
|
|
371
|
-
--wa-color-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
--wa-color-danger-
|
|
376
|
-
--wa-color-danger-
|
|
377
|
-
--wa-color-danger-
|
|
378
|
-
--wa-color-danger-
|
|
322
|
+
/* Warning = HOT yellow
|
|
323
|
+
on-* and on-loud use dark amber for contrast — white on bright yellow is unreadable */
|
|
324
|
+
--wa-color-warning-fill-quiet: var(--wa-color-warning-95); /* warning-50 */
|
|
325
|
+
--wa-color-warning-fill-normal: var(--wa-color-warning-90); /* warning-100 */
|
|
326
|
+
--wa-color-warning-fill-loud: var(--wa-color-warning-50); /* warning-500 (#FED82E) */
|
|
327
|
+
--wa-color-warning-border-quiet: var(--wa-color-warning-90); /* warning-100 */
|
|
328
|
+
--wa-color-warning-border-normal: var(--wa-color-warning-80); /* warning-200 */
|
|
329
|
+
--wa-color-warning-border-loud: var(--wa-color-warning-40); /* warning-600 (amber) */
|
|
330
|
+
--wa-color-warning-on-quiet: var(--wa-color-warning-05); /* warning-950 — a11y: yellow needs dark text */
|
|
331
|
+
--wa-color-warning-on-normal: var(--wa-color-warning-05); /* warning-950 */
|
|
332
|
+
--wa-color-warning-on-loud: var(--wa-color-warning-05); /* warning-950 — white on yellow = ~1:1 contrast */
|
|
333
|
+
|
|
334
|
+
/* Danger = HOT red
|
|
335
|
+
on-quiet/normal use darker values for accessibility */
|
|
336
|
+
--wa-color-danger-fill-quiet: var(--wa-color-danger-95); /* danger-50 */
|
|
337
|
+
--wa-color-danger-fill-normal: var(--wa-color-danger-90); /* danger-100 */
|
|
338
|
+
--wa-color-danger-fill-loud: var(--wa-color-danger-50); /* danger-500 */
|
|
339
|
+
--wa-color-danger-border-quiet: var(--wa-color-danger-90); /* danger-100 */
|
|
340
|
+
--wa-color-danger-border-normal: var(--wa-color-danger-80); /* danger-200 */
|
|
341
|
+
--wa-color-danger-border-loud: var(--wa-color-danger-60); /* danger-400 */
|
|
342
|
+
--wa-color-danger-on-quiet: var(--wa-color-danger-05); /* danger-950 — a11y */
|
|
343
|
+
--wa-color-danger-on-normal: var(--wa-color-danger-05); /* danger-950 */
|
|
379
344
|
--wa-color-danger-on-loud: white;
|
|
380
345
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
--wa-color-neutral-
|
|
385
|
-
--wa-color-neutral-
|
|
386
|
-
--wa-color-neutral-
|
|
387
|
-
--wa-color-neutral-
|
|
388
|
-
--wa-color-neutral-
|
|
389
|
-
--wa-color-neutral-
|
|
346
|
+
/* Neutral = HOT gray (secondary button colour)
|
|
347
|
+
fill-loud uses neutral-200 (light gray) for a secondary button feel;
|
|
348
|
+
on-loud uses neutral-950 (dark text) for contrast on light fill */
|
|
349
|
+
--wa-color-neutral-fill-quiet: var(--wa-color-neutral-95); /* neutral-50 */
|
|
350
|
+
--wa-color-neutral-fill-normal: var(--wa-color-neutral-90); /* neutral-100 */
|
|
351
|
+
--wa-color-neutral-fill-loud: var(--wa-color-neutral-80); /* neutral-200 */
|
|
352
|
+
--wa-color-neutral-border-quiet: var(--wa-color-neutral-90); /* neutral-100 */
|
|
353
|
+
--wa-color-neutral-border-normal: var(--wa-color-neutral-80); /* neutral-200 */
|
|
354
|
+
--wa-color-neutral-border-loud: var(--wa-color-neutral-60); /* neutral-400 */
|
|
355
|
+
--wa-color-neutral-on-quiet: var(--wa-color-neutral-05); /* neutral-950 */
|
|
356
|
+
--wa-color-neutral-on-normal: var(--wa-color-neutral-05); /* neutral-950 */
|
|
357
|
+
--wa-color-neutral-on-loud: var(--wa-color-neutral-05); /* neutral-950 — dark text on light gray fill */
|
|
358
|
+
/* #endregion */
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* ─── Typography, spacing and border tokens ──────────────────────────────
|
|
362
|
+
Must be in @layer wa-theme (same layer as WA's own declarations) so our
|
|
363
|
+
values win when this file is imported after WA's default.css.
|
|
364
|
+
──────────────────────────────────────────────────────────────────────── */
|
|
365
|
+
:where(:root),
|
|
366
|
+
.wa-theme-default,
|
|
367
|
+
.wa-light,
|
|
368
|
+
.wa-dark,
|
|
369
|
+
.wa-invert {
|
|
370
|
+
/* #region Fonts */
|
|
371
|
+
--wa-font-family-body: var(--hot-font-sans);
|
|
372
|
+
--wa-font-family-heading: var(--hot-font-sans-variant-condensed);
|
|
373
|
+
--wa-font-family-code: var(--hot-font-mono);
|
|
374
|
+
--wa-font-family-longform: var(--hot-font-serif);
|
|
375
|
+
|
|
376
|
+
/* Font sizes — fixed values to match HOT scale */
|
|
377
|
+
--wa-font-size-2xs: var(--hot-font-size-2x-small); /* 10px */
|
|
378
|
+
--wa-font-size-xs: var(--hot-font-size-x-small); /* 12px */
|
|
379
|
+
--wa-font-size-s: var(--hot-font-size-small); /* 14px */
|
|
380
|
+
--wa-font-size-m: var(--hot-font-size-medium); /* 16px */
|
|
381
|
+
--wa-font-size-l: var(--hot-font-size-large); /* 20px */
|
|
382
|
+
--wa-font-size-xl: var(--hot-font-size-x-large); /* 24px */
|
|
383
|
+
--wa-font-size-2xl: var(--hot-font-size-2x-large); /* 36px */
|
|
384
|
+
--wa-font-size-3xl: var(--hot-font-size-3x-large); /* 48px */
|
|
385
|
+
--wa-font-size-4xl: var(--hot-font-size-4x-large); /* 72px */
|
|
386
|
+
/* wa-font-size-scale, wa-font-size-smaller/larger use calc() — no override */
|
|
387
|
+
|
|
388
|
+
/* Font weights */
|
|
389
|
+
--wa-font-weight-light: var(--hot-font-weight-light); /* 300 */
|
|
390
|
+
--wa-font-weight-normal: var(--hot-font-weight-normal); /* 400 */
|
|
391
|
+
--wa-font-weight-semibold: var(--hot-font-weight-semibold); /* 500 */
|
|
392
|
+
--wa-font-weight-bold: var(--hot-font-weight-bold); /* 700 */
|
|
393
|
+
|
|
394
|
+
/* Functional font weights */
|
|
395
|
+
--wa-font-weight-body: var(--wa-font-weight-normal);
|
|
396
|
+
--wa-font-weight-heading: var(--wa-font-weight-bold);
|
|
397
|
+
--wa-font-weight-code: var(--wa-font-weight-normal);
|
|
398
|
+
--wa-font-weight-longform: var(--wa-font-weight-normal);
|
|
399
|
+
--wa-font-weight-action: var(--wa-font-weight-semibold);
|
|
400
|
+
|
|
401
|
+
/* Line heights */
|
|
402
|
+
--wa-line-height-condensed: var(--hot-line-height-dense); /* 1.4 */
|
|
403
|
+
--wa-line-height-normal: var(--hot-line-height-normal); /* 1.8 */
|
|
404
|
+
--wa-line-height-expanded: var(--hot-line-height-loose); /* 2.2 */
|
|
405
|
+
/* #endregion */
|
|
406
|
+
|
|
407
|
+
/* #region Spacing */
|
|
408
|
+
--wa-space-3xs: var(--hot-spacing-3x-small); /* 2px */
|
|
409
|
+
--wa-space-2xs: var(--hot-spacing-2x-small); /* 4px */
|
|
410
|
+
--wa-space-xs: var(--hot-spacing-x-small); /* 8px */
|
|
411
|
+
--wa-space-s: var(--hot-spacing-small); /* 12px */
|
|
412
|
+
--wa-space-m: var(--hot-spacing-medium); /* 16px */
|
|
413
|
+
--wa-space-l: var(--hot-spacing-large); /* 20px */
|
|
414
|
+
--wa-space-xl: var(--hot-spacing-x-large); /* 28px */
|
|
415
|
+
--wa-space-2xl: var(--hot-spacing-2x-large); /* 36px */
|
|
416
|
+
--wa-space-3xl: var(--hot-spacing-3x-large); /* 48px */
|
|
417
|
+
--wa-space-4xl: var(--hot-spacing-4x-large); /* 72px */
|
|
418
|
+
/* #endregion */
|
|
419
|
+
|
|
420
|
+
/* #region Border radius */
|
|
421
|
+
--wa-border-radius-s: var(--hot-border-radius-small); /* 3px */
|
|
422
|
+
--wa-border-radius-m: var(--hot-border-radius-medium); /* 4px */
|
|
423
|
+
--wa-border-radius-l: var(--hot-border-radius-large); /* 8px */
|
|
424
|
+
--wa-border-radius-pill: var(--hot-border-radius-pill); /* 9999px */
|
|
425
|
+
--wa-border-radius-circle: var(--hot-border-radius-circle); /* 50% */
|
|
426
|
+
/* #endregion */
|
|
390
427
|
}
|
|
391
428
|
}
|
package/dist/themes/hot.css
CHANGED
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
--hot-font-sans: Archivo, -apple-system, Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
176
176
|
--hot-font-sans-variant: 'Barlow';
|
|
177
177
|
--hot-font-sans-variant-condensed: 'Barlow Condensed';
|
|
178
|
-
--hot-font-
|
|
178
|
+
--hot-font-serif: Georgia, 'Times New Roman', serif;
|
|
179
179
|
--hot-font-mono: Menlo, Monaco, Consolas, 'Courier New', monospace, Consolas, 'Liberation Mono', Menlo, monospace;
|
|
180
180
|
|
|
181
181
|
/* Font sizes */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotosm/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Shared UI components with HOT theming.",
|
|
5
5
|
"homepage": "https://github.com/hotosm/ui#readme",
|
|
6
6
|
"author": {
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"./dist/hotosm-ui.js": "./dist/hotosm-ui.js",
|
|
41
41
|
"./dist/components/*": "./dist/components/*",
|
|
42
42
|
"./dist/themes/*": "./dist/themes/*",
|
|
43
|
-
"./dist/style.css": "./dist/style.css"
|
|
43
|
+
"./dist/style.css": "./dist/style.css",
|
|
44
|
+
"./dist/style-core.css": "./dist/style-core.css"
|
|
44
45
|
},
|
|
45
46
|
"files": [
|
|
46
47
|
"dist"
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
"dev": "storybook dev -p 3001 --no-open",
|
|
83
84
|
"build:docs": "storybook build --output-dir docs",
|
|
84
85
|
"build": "node scripts/build.js",
|
|
86
|
+
"serve:dist": "node scripts/serve-dist.mjs",
|
|
85
87
|
"test": "vitest run",
|
|
86
88
|
"test:watch": "vitest",
|
|
87
89
|
"coverage": "vitest run --coverage"
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk.ARF626EG.js";import{a as n}from"./chunk.ZETV7TDG.js";import{d as a,f as h}from"./chunk.QABMDRWR.js";import{d as s}from"./chunk.N2W26RCT.js";import"@awesome.me/webawesome/dist/components/dropdown/dropdown";import"@awesome.me/webawesome/dist/components/button/button";import"@awesome.me/webawesome/dist/components/icon/icon";var g='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grid-3x3-gap-fill" viewBox="0 0 16 16">%0A <path d="M1 2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zM1 7a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zM1 12a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1z"/>%0A</svg>';var p='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect width="1" height="1" fill="white"/></svg>%0A';var d='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect width="1" height="1" fill="white"/></svg>%0A';var w='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect width="1" height="1" fill="white"/></svg>%0A';var m='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect width="1" height="1" fill="white"/></svg>%0A';var c='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect width="1" height="1" fill="white"/></svg>%0A';var f='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect width="1" height="1" fill="white"/></svg>%0A';var v='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect width="1" height="1" fill="white"/></svg>%0A';var u='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><rect width="1" height="1" fill="white"/></svg>%0A';var k=[{id:"imagery",title:"Imagery"},{id:"mapping",title:"Mapping"},{id:"field",title:"Field"},{id:"data",title:"Data"}],E=[{id:"drone",title:"Drone Tasking Manager",href:"https://dronetm.org/",icon:p,section:"imagery"},{id:"oam",title:"OpenAerialMap",href:"https://openaerialmap.org/",icon:d,section:"imagery"},{id:"tasking-manager",title:"Tasking Manager",href:"https://tasks.hotosm.org/",icon:w,section:"mapping"},{id:"fair",title:"fAIr",href:"https://fair.hotosm.org/",icon:m,section:"mapping"},{id:"field",title:"Field Mapping Tasking Manager",href:"https://fmtm.hotosm.org/",icon:c,section:"field"},{id:"chat-map",title:"ChatMap",href:"https://www.hotosm.org/tech-suite/chatmap/",icon:f,section:"field"},{id:"export-tool",title:"Export Tool",href:"https://export.hotosm.org/",icon:v,section:"data"},{id:"umap",title:"Maps",href:"https://umap.hotosm.org/",icon:u,section:"data"}],r=class extends h{constructor(){super(...arguments);this.showLogos=!1;this.tools=E}getToolsBySection(t){return this.tools.filter(o=>o.section===t)}handleSelect(t){let o=t.detail.item.value,i=this.tools.find(e=>e.id===o);i&&(this.dispatchEvent(new CustomEvent("tool-selected",{detail:{tool:i},bubbles:!0,composed:!0})),window.open(i.href,"_blank","noopener,noreferrer"))}render(){return a`
|
|
2
|
-
<wa-dropdown placement="bottom-end" @wa-select=${this.handleSelect}>
|
|
3
|
-
<wa-button
|
|
4
|
-
slot="trigger"
|
|
5
|
-
appearance="plain"
|
|
6
|
-
aria-label="Open tools menu"
|
|
7
|
-
>
|
|
8
|
-
<wa-icon src="${g}" class="menu-icon"></wa-icon>
|
|
9
|
-
</wa-button>
|
|
10
|
-
|
|
11
|
-
${k.map((t,o)=>{let i=this.getToolsBySection(t.id);return i.length===0?"":a`
|
|
12
|
-
<div
|
|
13
|
-
class="section-group ${o>0?"section-divider":""}"
|
|
14
|
-
>
|
|
15
|
-
<wa-dropdown-label>${t.title}</wa-dropdown-label>
|
|
16
|
-
${i.map(e=>a`
|
|
17
|
-
<wa-dropdown-item value="${e.id}">
|
|
18
|
-
${this.showLogos?a`<img
|
|
19
|
-
slot="icon"
|
|
20
|
-
src="${e.icon}"
|
|
21
|
-
alt="${e.title}"
|
|
22
|
-
style="width: 32px; height: 32px; object-fit: contain; display: block;"
|
|
23
|
-
/>`:""}
|
|
24
|
-
<div class="tool-content">
|
|
25
|
-
<div class="tool-title">${e.title}</div>
|
|
26
|
-
</div>
|
|
27
|
-
</wa-dropdown-item>
|
|
28
|
-
`)}
|
|
29
|
-
</div>
|
|
30
|
-
`})}
|
|
31
|
-
</wa-dropdown>
|
|
32
|
-
`}};r.styles=l,s([n({type:Boolean,attribute:"show-logos",reflect:!1})],r.prototype,"showLogos",2);var et=r;export{r as a,et as b};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk.7BVHA4G6.js";import{a as n}from"./chunk.ZETV7TDG.js";import{d as l,f as a}from"./chunk.QABMDRWR.js";import{d as t,e as s,f as o,g as i}from"./chunk.N2W26RCT.js";import"@awesome.me/webawesome/dist/components/icon/icon.js";var h,d,m,v,u,y,e=class extends a{constructor(){super(...arguments);this.name="hot-list-card";o(this,h,"");o(this,d,"");o(this,m,"");o(this,v,"");o(this,u,!0);o(this,y,!0)}get title(){return s(this,h)}set title(c){i(this,h,c)}get subtitle(){return s(this,d)}set subtitle(c){i(this,d,c)}get icon(){return s(this,m)}set icon(c){i(this,m,c)}get itemId(){return s(this,v)}set itemId(c){i(this,v,c)}get showRemove(){return s(this,u)}set showRemove(c){i(this,u,c)}get showIcon(){return s(this,y)}set showIcon(c){i(this,y,c)}_handleRemove(){this.dispatchEvent(new CustomEvent("hot-remove",{detail:{id:this.itemId},bubbles:!0,composed:!0}))}_handleKeyDown(c){(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),this._handleRemove())}render(){let c=this.showIcon&&this.icon;return l`
|
|
2
|
-
<div class="list-item" role="listitem">
|
|
3
|
-
${c?l`<wa-icon name=${this.icon} class="list-icon" aria-hidden="true"></wa-icon>`:""}
|
|
4
|
-
<div class="list-info">
|
|
5
|
-
<div class="list-title" id="title-${this.itemId}">${this.title}</div>
|
|
6
|
-
${this.subtitle?l`<div class="list-subtitle">${this.subtitle}</div>`:""}
|
|
7
|
-
</div>
|
|
8
|
-
${this.showRemove?l`
|
|
9
|
-
<button
|
|
10
|
-
type="button"
|
|
11
|
-
class="remove-button"
|
|
12
|
-
@click=${this._handleRemove}
|
|
13
|
-
@keydown=${this._handleKeyDown}
|
|
14
|
-
aria-label="Remove ${this.title}"
|
|
15
|
-
>
|
|
16
|
-
<wa-icon name="xmark" class="remove-icon" aria-hidden="true"></wa-icon>
|
|
17
|
-
</button>
|
|
18
|
-
`:""}
|
|
19
|
-
</div>
|
|
20
|
-
`}};h=new WeakMap,d=new WeakMap,m=new WeakMap,v=new WeakMap,u=new WeakMap,y=new WeakMap,e.styles=[r],t([n({type:String})],e.prototype,"title",1),t([n({type:String})],e.prototype,"subtitle",1),t([n({type:String})],e.prototype,"icon",1),t([n({type:String})],e.prototype,"itemId",1),t([n({type:Boolean})],e.prototype,"showRemove",1),t([n({type:Boolean})],e.prototype,"showIcon",1);var I=e;export{e as a,I as b};
|