@hotosm/ui 0.10.2 → 1.0.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/LICENSE.md +521 -587
- package/README.md +69 -99
- package/dist/chunks/chunk.M2F6Z3GI.js +36 -0
- package/dist/chunks/chunk.SOBALH23.js +23 -0
- package/dist/chunks/{chunk.V7C4W6GD.js → chunk.THIZOVTW.js} +1 -1
- package/dist/components/tool-menu/tool-menu.component.d.ts +0 -2
- 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/hotosm-ui.js +1 -1
- package/dist/style-core.css +1 -1
- package/dist/style.css +1 -1
- package/dist/themes/hot-wa.css +2 -2
- package/dist/webawesome-all.d.ts +1 -0
- package/dist/webawesome-all.js +70 -0
- package/package.json +8 -4
- package/dist/chunks/chunk.24HG5LKA.js +0 -32
- package/dist/chunks/chunk.DCR6GEE6.js +0 -58
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import "@awesome.me/webawesome/dist/components/accordion/accordion.js";
|
|
2
|
+
import "@awesome.me/webawesome/dist/components/accordion-item/accordion-item.js";
|
|
3
|
+
import "@awesome.me/webawesome/dist/components/animated-image/animated-image.js";
|
|
4
|
+
import "@awesome.me/webawesome/dist/components/animation/animation.js";
|
|
5
|
+
import "@awesome.me/webawesome/dist/components/avatar/avatar.js";
|
|
6
|
+
import "@awesome.me/webawesome/dist/components/badge/badge.js";
|
|
7
|
+
import "@awesome.me/webawesome/dist/components/breadcrumb/breadcrumb.js";
|
|
8
|
+
import "@awesome.me/webawesome/dist/components/breadcrumb-item/breadcrumb-item.js";
|
|
9
|
+
import "@awesome.me/webawesome/dist/components/button/button.js";
|
|
10
|
+
import "@awesome.me/webawesome/dist/components/button-group/button-group.js";
|
|
11
|
+
import "@awesome.me/webawesome/dist/components/callout/callout.js";
|
|
12
|
+
import "@awesome.me/webawesome/dist/components/card/card.js";
|
|
13
|
+
import "@awesome.me/webawesome/dist/components/carousel/carousel.js";
|
|
14
|
+
import "@awesome.me/webawesome/dist/components/carousel-item/carousel-item.js";
|
|
15
|
+
import "@awesome.me/webawesome/dist/components/checkbox/checkbox.js";
|
|
16
|
+
import "@awesome.me/webawesome/dist/components/checkbox-group/checkbox-group.js";
|
|
17
|
+
import "@awesome.me/webawesome/dist/components/color-picker/color-picker.js";
|
|
18
|
+
import "@awesome.me/webawesome/dist/components/comparison/comparison.js";
|
|
19
|
+
import "@awesome.me/webawesome/dist/components/copy-button/copy-button.js";
|
|
20
|
+
import "@awesome.me/webawesome/dist/components/details/details.js";
|
|
21
|
+
import "@awesome.me/webawesome/dist/components/dialog/dialog.js";
|
|
22
|
+
import "@awesome.me/webawesome/dist/components/divider/divider.js";
|
|
23
|
+
import "@awesome.me/webawesome/dist/components/drawer/drawer.js";
|
|
24
|
+
import "@awesome.me/webawesome/dist/components/dropdown/dropdown.js";
|
|
25
|
+
import "@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js";
|
|
26
|
+
import "@awesome.me/webawesome/dist/components/format-bytes/format-bytes.js";
|
|
27
|
+
import "@awesome.me/webawesome/dist/components/format-date/format-date.js";
|
|
28
|
+
import "@awesome.me/webawesome/dist/components/format-number/format-number.js";
|
|
29
|
+
import "@awesome.me/webawesome/dist/components/icon/icon.js";
|
|
30
|
+
import "@awesome.me/webawesome/dist/components/include/include.js";
|
|
31
|
+
import "@awesome.me/webawesome/dist/components/input/input.js";
|
|
32
|
+
import "@awesome.me/webawesome/dist/components/intersection-observer/intersection-observer.js";
|
|
33
|
+
import "@awesome.me/webawesome/dist/components/known-date/known-date.js";
|
|
34
|
+
import "@awesome.me/webawesome/dist/components/markdown/markdown.js";
|
|
35
|
+
import "@awesome.me/webawesome/dist/components/mutation-observer/mutation-observer.js";
|
|
36
|
+
import "@awesome.me/webawesome/dist/components/number-input/number-input.js";
|
|
37
|
+
import "@awesome.me/webawesome/dist/components/option/option.js";
|
|
38
|
+
import "@awesome.me/webawesome/dist/components/otp-input/otp-input.js";
|
|
39
|
+
import "@awesome.me/webawesome/dist/components/page/page.js";
|
|
40
|
+
import "@awesome.me/webawesome/dist/components/pagination/pagination.js";
|
|
41
|
+
import "@awesome.me/webawesome/dist/components/popover/popover.js";
|
|
42
|
+
import "@awesome.me/webawesome/dist/components/popup/popup.js";
|
|
43
|
+
import "@awesome.me/webawesome/dist/components/progress-bar/progress-bar.js";
|
|
44
|
+
import "@awesome.me/webawesome/dist/components/progress-ring/progress-ring.js";
|
|
45
|
+
import "@awesome.me/webawesome/dist/components/qr-code/qr-code.js";
|
|
46
|
+
import "@awesome.me/webawesome/dist/components/radio/radio.js";
|
|
47
|
+
import "@awesome.me/webawesome/dist/components/radio-group/radio-group.js";
|
|
48
|
+
import "@awesome.me/webawesome/dist/components/random-content/random-content.js";
|
|
49
|
+
import "@awesome.me/webawesome/dist/components/rating/rating.js";
|
|
50
|
+
import "@awesome.me/webawesome/dist/components/relative-time/relative-time.js";
|
|
51
|
+
import "@awesome.me/webawesome/dist/components/resize-observer/resize-observer.js";
|
|
52
|
+
import "@awesome.me/webawesome/dist/components/scroller/scroller.js";
|
|
53
|
+
import "@awesome.me/webawesome/dist/components/select/select.js";
|
|
54
|
+
import "@awesome.me/webawesome/dist/components/skeleton/skeleton.js";
|
|
55
|
+
import "@awesome.me/webawesome/dist/components/slider/slider.js";
|
|
56
|
+
import "@awesome.me/webawesome/dist/components/spinner/spinner.js";
|
|
57
|
+
import "@awesome.me/webawesome/dist/components/split-panel/split-panel.js";
|
|
58
|
+
import "@awesome.me/webawesome/dist/components/switch/switch.js";
|
|
59
|
+
import "@awesome.me/webawesome/dist/components/tab/tab.js";
|
|
60
|
+
import "@awesome.me/webawesome/dist/components/tab-group/tab-group.js";
|
|
61
|
+
import "@awesome.me/webawesome/dist/components/tab-panel/tab-panel.js";
|
|
62
|
+
import "@awesome.me/webawesome/dist/components/tag/tag.js";
|
|
63
|
+
import "@awesome.me/webawesome/dist/components/textarea/textarea.js";
|
|
64
|
+
import "@awesome.me/webawesome/dist/components/time-input/time-input.js";
|
|
65
|
+
import "@awesome.me/webawesome/dist/components/toast/toast.js";
|
|
66
|
+
import "@awesome.me/webawesome/dist/components/toast-item/toast-item.js";
|
|
67
|
+
import "@awesome.me/webawesome/dist/components/tooltip/tooltip.js";
|
|
68
|
+
import "@awesome.me/webawesome/dist/components/tree/tree.js";
|
|
69
|
+
import "@awesome.me/webawesome/dist/components/tree-item/tree-item.js";
|
|
70
|
+
import "@awesome.me/webawesome/dist/components/zoomable-frame/zoomable-frame.js";
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotosm/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Shared UI components with HOT theming.",
|
|
5
5
|
"homepage": "https://github.com/hotosm/ui#readme",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "GPL-3.0-only",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "HOTOSM",
|
|
9
9
|
"email": "sysadmin@hotosm.org"
|
|
@@ -45,13 +45,17 @@
|
|
|
45
45
|
"import": "./dist/hotosm-ui.js"
|
|
46
46
|
},
|
|
47
47
|
"./dist/hotosm-ui.js": "./dist/hotosm-ui.js",
|
|
48
|
+
"./dist/webawesome-all.js": {
|
|
49
|
+
"types": "./dist/webawesome-all.d.ts",
|
|
50
|
+
"import": "./dist/webawesome-all.js"
|
|
51
|
+
},
|
|
48
52
|
"./dist/components/*": "./dist/components/*",
|
|
49
53
|
"./dist/themes/*": "./dist/themes/*",
|
|
50
54
|
"./dist/style.css": "./dist/style.css",
|
|
51
55
|
"./dist/style-core.css": "./dist/style-core.css"
|
|
52
56
|
},
|
|
53
57
|
"devDependencies": {
|
|
54
|
-
"@awesome.me/webawesome": "3.
|
|
58
|
+
"@awesome.me/webawesome": "3.11.0",
|
|
55
59
|
"@storybook/addon-docs": "^9.0.18",
|
|
56
60
|
"@storybook/addon-links": "^9.0.18",
|
|
57
61
|
"@storybook/web-components-vite": "^9.0.18",
|
|
@@ -74,7 +78,7 @@
|
|
|
74
78
|
"vitest": "^4.0.10"
|
|
75
79
|
},
|
|
76
80
|
"peerDependencies": {
|
|
77
|
-
"@awesome.me/webawesome": "3.
|
|
81
|
+
"@awesome.me/webawesome": "3.11.0"
|
|
78
82
|
},
|
|
79
83
|
"engines": {
|
|
80
84
|
"node": ">=18.0.0"
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import{a as f}from"./chunk.DCR6GEE6.js";import{a as l}from"./chunk.ZETV7TDG.js";import{d as a,f as n}from"./chunk.QABMDRWR.js";import{d as s}from"./chunk.N2W26RCT.js";var h='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 m='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <rect width="64" height="64" rx="12" fill="%230f766e" />%0A <text%0A x="32"%0A y="40"%0A text-anchor="middle"%0A font-size="22"%0A font-family="Arial, sans-serif"%0A font-weight="700"%0A fill="%23ffffff"%0A >%0A DR%0A </text>%0A</svg>%0A';var g='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <rect width="64" height="64" rx="12" fill="%230f766e" />%0A <text%0A x="32"%0A y="39"%0A text-anchor="middle"%0A font-size="17"%0A font-family="Arial, sans-serif"%0A font-weight="700"%0A fill="%23ffffff"%0A >%0A OAM%0A </text>%0A</svg>%0A';var d='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <rect width="64" height="64" rx="12" fill="%23ea580c" />%0A <text%0A x="32"%0A y="40"%0A text-anchor="middle"%0A font-size="24"%0A font-family="Arial, sans-serif"%0A font-weight="700"%0A fill="%23ffffff"%0A >%0A TM%0A </text>%0A</svg>%0A';var p='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <rect width="64" height="64" rx="12" fill="%239333ea" />%0A <text%0A x="32"%0A y="40"%0A text-anchor="middle"%0A font-size="22"%0A font-family="Arial, sans-serif"%0A font-weight="700"%0A fill="%23ffffff"%0A >%0A AI%0A </text>%0A</svg>%0A';var c='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <rect width="64" height="64" rx="12" fill="%232563eb" />%0A <text%0A x="32"%0A y="40"%0A text-anchor="middle"%0A font-size="22"%0A font-family="Arial, sans-serif"%0A font-weight="700"%0A fill="%23ffffff"%0A >%0A FM%0A </text>%0A</svg>%0A';var w='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <rect width="64" height="64" rx="12" fill="%23dc2626" />%0A <text%0A x="32"%0A y="40"%0A text-anchor="middle"%0A font-size="22"%0A font-family="Arial, sans-serif"%0A font-weight="700"%0A fill="%23ffffff"%0A >%0A CM%0A </text>%0A</svg>%0A';var x='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <rect width="64" height="64" rx="12" fill="%234f46e5" />%0A <text%0A x="32"%0A y="40"%0A text-anchor="middle"%0A font-size="22"%0A font-family="Arial, sans-serif"%0A font-weight="700"%0A fill="%23ffffff"%0A >%0A EX%0A </text>%0A</svg>%0A';var v='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <rect width="64" height="64" rx="12" fill="%23be185d" />%0A <text%0A x="32"%0A y="40"%0A text-anchor="middle"%0A font-size="22"%0A font-family="Arial, sans-serif"%0A font-weight="700"%0A fill="%23ffffff"%0A >%0A UM%0A </text>%0A</svg>%0A';Promise.allSettled([import("@awesome.me/webawesome/dist/components/dropdown/dropdown.js"),import("@awesome.me/webawesome/dist/components/button/button.js"),import("@awesome.me/webawesome/dist/components/icon/icon.js")]);var $=[{id:"imagery",title:"Imagery"},{id:"mapping",title:"Mapping"},{id:"field",title:"Field"},{id:"data",title:"Data"}],S=[{id:"drone",title:"Drone Tasking Manager",href:"https://dronetm.org/",icon:m,section:"imagery"},{id:"oam",title:"OpenAerialMap",href:"https://openaerialmap.org/",icon:g,section:"imagery"},{id:"tasking-manager",title:"Tasking Manager",href:"https://tasks.hotosm.org/",icon:d,section:"mapping"},{id:"fair",title:"fAIr",href:"https://fair.hotosm.org/",icon:p,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:w,section:"field"},{id:"export-tool",title:"Export Tool",href:"https://export.hotosm.org/",icon:x,section:"data"},{id:"umap",title:"Maps",href:"https://umap.hotosm.org/",icon:v,section:"data"}],r=class extends n{constructor(){super(...arguments);this.showLogos=!1;this.tools=S}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="${h}" class="menu-icon"></wa-icon>
|
|
9
|
-
</wa-button>
|
|
10
|
-
|
|
11
|
-
${$.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=f,s([l({type:Boolean,attribute:"show-logos",reflect:!1})],r.prototype,"showLogos",2);var Z=r;export{r as a,Z as b};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk.QABMDRWR.js";var a=o`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-block;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
wa-dropdown-item {
|
|
7
|
-
--wa-dropdown-item-padding: var(--hot-spacing-small) var(--hot-spacing-medium);
|
|
8
|
-
--wa-dropdown-item-min-height: 60px;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
wa-dropdown-item:hover {
|
|
13
|
-
background-color: var(--hot-color-neutral-50);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.tool-content {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
gap: var(--hot-spacing-2x-small);
|
|
20
|
-
text-align: left;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.section-divider {
|
|
24
|
-
margin-top: var(--hot-spacing-x-small);
|
|
25
|
-
padding-top: var(--hot-spacing-x-small);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
wa-dropdown-label {
|
|
29
|
-
font-weight: var(--hot-font-weight-semibold);
|
|
30
|
-
font-size: var(--hot-font-size-small);
|
|
31
|
-
padding: var(--hot-spacing-x-small) var(--hot-spacing-medium) var(--hot-spacing-2x-small)
|
|
32
|
-
var(--hot-spacing-medium);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.tool-title {
|
|
36
|
-
font-weight: var(--hot-font-weight-light);
|
|
37
|
-
font-size: var(--hot-font-size-small);
|
|
38
|
-
color: var(--hot-color-neutral-950);
|
|
39
|
-
line-height: 1.3;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
wa-button[slot="trigger"] {
|
|
43
|
-
--wa-button-padding: var(--hot-spacing-x-small);
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.menu-icon {
|
|
48
|
-
color: var(--hot-color-neutral-800);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* Dropdown positioning - FIXED SELECTOR */
|
|
52
|
-
wa-dropdown::part(menu) {
|
|
53
|
-
/* anchor the right edge of the panel to the right edge of the trigger (0 offset).
|
|
54
|
-
*/
|
|
55
|
-
right: 0 !important;
|
|
56
|
-
left: auto !important; /* Ensures 'right' takes precedence */
|
|
57
|
-
}
|
|
58
|
-
`;export{a};
|