@hotosm/ui 0.3.2-b7 → 0.3.2-b9
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/dist/assets/logo/hamburger.svg +1 -0
- package/dist/chunks/{chunk.OSUPNFJP.js → chunk.2ULJ7GOD.js} +1 -1
- package/dist/chunks/chunk.D4UQX7IV.js +146 -0
- package/dist/chunks/chunk.JWXDWX4U.js +1 -0
- package/dist/chunks/{chunk.NQSLFHXC.js → chunk.NA5VYRZH.js} +1 -1
- package/dist/chunks/chunk.PDA7Y3OG.js +1253 -0
- package/dist/chunks/chunk.TTXUWWW4.js +1 -0
- package/dist/chunks/chunk.UOUAH7BX.js +1 -0
- package/dist/chunks/chunk.XV3ZU53D.js +1 -0
- package/dist/components/button/button.component.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/consent/consent.component.js +1 -1
- package/dist/components/consent/consent.js +1 -1
- package/dist/components/header/header.component.d.ts +8 -16
- 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/icons.d.ts +9 -0
- package/dist/components/icons.js +1 -1
- package/dist/hotosm-ui.d.ts +1 -0
- package/dist/hotosm-ui.js +1 -1
- package/dist/themes/hot.css +0 -7
- package/dist/utils/shadow-dom-css.d.ts +22 -16
- package/package.json +1 -1
- package/dist/chunks/chunk.6YNKD56X.js +0 -934
- package/dist/chunks/chunk.GGX6E7QF.js +0 -179
- package/dist/chunks/chunk.KO4EOD3I.js +0 -1
- package/dist/chunks/chunk.KWRSAL43.js +0 -1
- package/dist/chunks/chunk.NTH75J37.js +0 -1
- package/dist/chunks/chunk.SMFWK2VT.js +0 -1
- package/dist/utils/shadow-dom-config.d.ts +0 -58
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk.2ULJ7GOD.js";var n=e;customElements.define("hot-consent",e);export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as t}from"./chunk.NA5VYRZH.js";var o=t;customElements.define("hot-button",t);export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>%20';function n(){let e=()=>{window.WebAwesome&&window.WebAwesome.iconRegistry?window.WebAwesome.iconRegistry.addIcon("hot-icons","list",o):setTimeout(e,100)};e()}var s=n;export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.NA5VYRZH.js";import"../../chunks/chunk.O6I2TNK3.js";import"../../chunks/chunk.O2GMJYSL.js";import"../../chunks/chunk.2FEIL35F.js";import"../../chunks/chunk.6Y3X2E2V.js";import"../../chunks/chunk.XV3ZU53D.js";import"../../chunks/chunk.TNLBUOUK.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Button,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.UOUAH7BX.js";import"../../chunks/chunk.NA5VYRZH.js";import"../../chunks/chunk.O6I2TNK3.js";import"../../chunks/chunk.O2GMJYSL.js";import"../../chunks/chunk.2FEIL35F.js";import"../../chunks/chunk.6Y3X2E2V.js";import"../../chunks/chunk.XV3ZU53D.js";import"../../chunks/chunk.TNLBUOUK.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.2ULJ7GOD.js";import"../../chunks/chunk.34D2LPI2.js";import"../../chunks/chunk.O2GMJYSL.js";import"../../chunks/chunk.2FEIL35F.js";import"../../chunks/chunk.6Y3X2E2V.js";import"../../chunks/chunk.XV3ZU53D.js";import"../../chunks/chunk.GTNRNZDH.js";import"../../chunks/chunk.TNLBUOUK.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Consent,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.TTXUWWW4.js";import"../../chunks/chunk.2ULJ7GOD.js";import"../../chunks/chunk.34D2LPI2.js";import"../../chunks/chunk.O2GMJYSL.js";import"../../chunks/chunk.2FEIL35F.js";import"../../chunks/chunk.6Y3X2E2V.js";import"../../chunks/chunk.XV3ZU53D.js";import"../../chunks/chunk.GTNRNZDH.js";import"../../chunks/chunk.TNLBUOUK.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as default};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@awesome.me/webawesome/dist/components/tab-group/tab-group.js';
|
|
2
2
|
import '@awesome.me/webawesome/dist/components/dialog/dialog.js';
|
|
3
3
|
import '@awesome.me/webawesome/dist/components/icon/icon.js';
|
|
4
|
+
import '@awesome.me/webawesome/dist/components/drawer/drawer.js';
|
|
4
5
|
import { LitElement } from "lit";
|
|
5
6
|
import type { CSSResultGroup } from 'lit';
|
|
6
7
|
import { type sizes } from './header.styles.js';
|
|
@@ -10,8 +11,6 @@ interface MenuItem {
|
|
|
10
11
|
}
|
|
11
12
|
export declare class Header extends LitElement {
|
|
12
13
|
static styles: CSSResultGroup;
|
|
13
|
-
static shadowRootOptions: ShadowRootInit;
|
|
14
|
-
createRenderRoot(): DocumentFragment | HTMLElement;
|
|
15
14
|
name: string;
|
|
16
15
|
/** Use a text-based title in the header. */
|
|
17
16
|
accessor title: string;
|
|
@@ -21,6 +20,11 @@ export declare class Header extends LitElement {
|
|
|
21
20
|
accessor drawer: boolean;
|
|
22
21
|
/** Array of menu items to include as navigation tabs. */
|
|
23
22
|
accessor tabs: MenuItem[];
|
|
23
|
+
/** Array of links to include in the drawer. */
|
|
24
|
+
accessor drawerLinks: Array<{
|
|
25
|
+
label: string;
|
|
26
|
+
href: string;
|
|
27
|
+
}>;
|
|
24
28
|
/** Size of toolbar vertically. */
|
|
25
29
|
accessor size: sizes;
|
|
26
30
|
/** Border bottom. */
|
|
@@ -33,25 +37,13 @@ export declare class Header extends LitElement {
|
|
|
33
37
|
accessor loginModalOpen: boolean;
|
|
34
38
|
/** Default fallback icon for providers without custom icons. */
|
|
35
39
|
accessor defaultLoginIcon: string;
|
|
36
|
-
private mutationObserver?;
|
|
37
40
|
connectedCallback(): Promise<void>;
|
|
38
|
-
disconnectedCallback(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Injects HOT theme CSS into the shadow DOM of wa-button components
|
|
41
|
-
*/
|
|
42
|
-
private injectCSSIntoShadowDOM;
|
|
43
|
-
/**
|
|
44
|
-
* Sets up mutation observer to automatically inject CSS into new wa-button components
|
|
45
|
-
*/
|
|
46
|
-
private setupMutationObserver;
|
|
47
|
-
/**
|
|
48
|
-
* Override updated() to inject CSS when new wa-button elements are added
|
|
49
|
-
*/
|
|
50
|
-
updated(changedProperties: Map<string, unknown>): void;
|
|
51
41
|
selectTab(index: number): void;
|
|
52
42
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
53
43
|
private _tabClick;
|
|
44
|
+
private _handleTabShow;
|
|
54
45
|
private _handleLogin;
|
|
55
46
|
private _handleModalClose;
|
|
47
|
+
private _handleDrawerOpen;
|
|
56
48
|
}
|
|
57
49
|
export default Header;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{d as a,e as b}from"../../chunks/chunk.PDA7Y3OG.js";import"../../chunks/chunk.D4UQX7IV.js";import"../../chunks/chunk.2FEIL35F.js";import"../../chunks/chunk.6Y3X2E2V.js";import"../../chunks/chunk.XV3ZU53D.js";import"../../chunks/chunk.TNLBUOUK.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as Header,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.JWXDWX4U.js";import"../../chunks/chunk.PDA7Y3OG.js";import"../../chunks/chunk.D4UQX7IV.js";import"../../chunks/chunk.2FEIL35F.js";import"../../chunks/chunk.6Y3X2E2V.js";import"../../chunks/chunk.XV3ZU53D.js";import"../../chunks/chunk.TNLBUOUK.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunks/chunk.
|
|
1
|
+
import{a,b}from"../../chunks/chunk.D4UQX7IV.js";import"../../chunks/chunk.TNLBUOUK.js";import"../../chunks/chunk.NI7UJOOZ.js";export{a as headerVariants,b as styles};
|
package/dist/components/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunks/chunk.
|
|
1
|
+
import{a}from"../chunks/chunk.XV3ZU53D.js";import"../chunks/chunk.NI7UJOOZ.js";export{a as default};
|
package/dist/hotosm-ui.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ import HotLogo from './components/logo/logo.js';
|
|
|
3
3
|
import HotTracking from './components/tracking/tracking.js';
|
|
4
4
|
import HotConsent from './components/consent/consent.js';
|
|
5
5
|
import HotButton from './components/button/button.js';
|
|
6
|
+
export { setupAutoInjection, injectHOTThemeIntoButtons, injectCSSIntoShadowDOM } from './utils/shadow-dom-css.js';
|
|
6
7
|
export { HotHeader as Header, HotLogo as Logo, HotConsent as Consent, HotTracking as Tracking, HotButton as Button, };
|
package/dist/hotosm-ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as n}from"./chunks/chunk.JWXDWX4U.js";import{a as o,b as t,c as r}from"./chunks/chunk.PDA7Y3OG.js";import"./chunks/chunk.D4UQX7IV.js";import{a as e}from"./chunks/chunk.MCLA4YSC.js";import"./chunks/chunk.CFJBM2JT.js";import"./chunks/chunk.W65BP3JY.js";import{a as m}from"./chunks/chunk.3P72BRDN.js";import"./chunks/chunk.2E5B6OR3.js";import{a as i}from"./chunks/chunk.UOUAH7BX.js";import"./chunks/chunk.NA5VYRZH.js";import"./chunks/chunk.O6I2TNK3.js";import{a}from"./chunks/chunk.TTXUWWW4.js";import"./chunks/chunk.2ULJ7GOD.js";import"./chunks/chunk.34D2LPI2.js";import"./chunks/chunk.O2GMJYSL.js";import"./chunks/chunk.2FEIL35F.js";import"./chunks/chunk.6Y3X2E2V.js";import"./chunks/chunk.XV3ZU53D.js";import"./chunks/chunk.GTNRNZDH.js";import"./chunks/chunk.TNLBUOUK.js";import"./chunks/chunk.NI7UJOOZ.js";export{i as Button,a as Consent,n as Header,e as Logo,m as Tracking,o as injectCSSIntoShadowDOM,t as injectHOTThemeIntoButtons,r as setupAutoInjection};
|
package/dist/themes/hot.css
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Utility
|
|
2
|
+
* Utility to inject CSS into shadow DOM elements
|
|
3
|
+
* This is needed because WebAwesome components use shadow DOM and CSS variables
|
|
4
|
+
* from the global scope are not accessible within the shadow DOM
|
|
3
5
|
*/
|
|
6
|
+
export interface CSSInjectionOptions {
|
|
7
|
+
/** The CSS string to inject */
|
|
8
|
+
css: string;
|
|
9
|
+
/** CSS selector to find elements to inject into */
|
|
10
|
+
selector?: string;
|
|
11
|
+
/** Whether to inject into all matching elements or just the first */
|
|
12
|
+
all?: boolean;
|
|
13
|
+
/** Custom style ID to avoid duplicate injections */
|
|
14
|
+
styleId?: string;
|
|
15
|
+
}
|
|
4
16
|
/**
|
|
5
|
-
*
|
|
17
|
+
* Injects CSS into the shadow DOM of WebAwesome components
|
|
18
|
+
* @param options Configuration options for CSS injection
|
|
6
19
|
*/
|
|
7
|
-
export declare
|
|
20
|
+
export declare function injectCSSIntoShadowDOM(options: CSSInjectionOptions): void;
|
|
8
21
|
/**
|
|
9
|
-
* Injects HOT theme CSS into
|
|
10
|
-
*
|
|
11
|
-
* @param styleId Optional ID for the style element (defaults to 'hot-theme-injection')
|
|
22
|
+
* Injects HOT theme CSS variables into wa-button shadow DOM
|
|
23
|
+
* This makes the HOT theme variables available within the shadow DOM
|
|
12
24
|
*/
|
|
13
|
-
export declare function
|
|
25
|
+
export declare function injectHOTThemeIntoButtons(): void;
|
|
14
26
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
27
|
+
* Sets up a mutation observer to automatically inject CSS into new wa-button elements
|
|
28
|
+
* This ensures that dynamically added buttons also get the HOT theme
|
|
17
29
|
*/
|
|
18
|
-
export declare function
|
|
19
|
-
/**
|
|
20
|
-
* Creates a MutationObserver to automatically inject CSS into new wa-button components
|
|
21
|
-
* @param container The container element or shadow root to observe
|
|
22
|
-
* @param callback Optional callback to run after injection
|
|
23
|
-
*/
|
|
24
|
-
export declare function observeAndInjectCSS(container: Element | ShadowRoot, callback?: () => void): MutationObserver;
|
|
30
|
+
export declare function setupAutoInjection(): void;
|