- ${this.drawer ? html`
-
- ` : null}
+
+
{ this._handleLogin(e)}}
+ >
+
+
+ ${this.drawer ? html`
+
+ ` : null}
+
`;
@@ -163,6 +178,10 @@ export class Header extends LitElement {
this.selectedTab = index;
clickAction();
}
+
+ private _handleLogin(_e: MouseEvent) {
+ console.log("Login button clicked");
+ }
}
export default Header;
diff --git a/components/icons.ts b/components/icons.ts
index 7191213..64ece21 100644
--- a/components/icons.ts
+++ b/components/icons.ts
@@ -60,6 +60,12 @@ const icons = {
`,
+ 'person-circle': `
+
+ `
};
const libraryResolver: IconLibraryResolver = (name: string) => {
diff --git a/components/index.ts b/components/index.ts
index d9335d7..5a9c8af 100644
--- a/components/index.ts
+++ b/components/index.ts
@@ -1,7 +1,14 @@
// Index to import all components together
// import '@hotosm/ui/components';
-export { default as Button } from './Button';
-export { default as Header } from './Header';
-export { default as Toolbar } from './Toolbar';
-export { default as Tracking } from './Tracking';
+// NOTE Must be included or rollup-plugin-css-only does not pick them up
+// NOTE the light theme must be imported before the sl-custom override!
+import '../theme/hot.css';
+import '@shoelace-style/shoelace/dist/themes/light.css';
+// import '@shoelace-style/shoelace/dist/themes/dark.css';
+import "../theme/sl-custom.css";
+
+export { default as Button } from './button/button';
+export { default as Header } from './header/header';
+export { default as Toolbar } from './toolbar/toolbar';
+export { default as Tracking } from './tracking/tracking';
diff --git a/components/Toolbar.ts b/components/toolbar/toolbar.ts
similarity index 95%
rename from components/Toolbar.ts
rename to components/toolbar/toolbar.ts
index ad04018..989a541 100644
--- a/components/Toolbar.ts
+++ b/components/toolbar/toolbar.ts
@@ -1,6 +1,4 @@
-import "../theme/hot.css";
-import '@shoelace-style/shoelace/dist/themes/light.css';
-import '@shoelace-style/shoelace/dist/themes/dark.css';
+import "../../theme/sl-custom.css";
import '@shoelace-style/shoelace/dist/components/button/button.js';
import '@shoelace-style/shoelace/dist/components/button-group/button-group.js';
@@ -10,7 +8,7 @@ import '@shoelace-style/shoelace/dist/components/tooltip/tooltip.js';
import { LitElement, css, html, unsafeCSS } from "lit";
import { property } from "lit/decorators.js";
-import registerBundledIcons from '../components/icons';
+import registerBundledIcons from '../../components/icons';
registerBundledIcons();
diff --git a/components/Tracking.ts b/components/tracking/tracking.ts
similarity index 95%
rename from components/Tracking.ts
rename to components/tracking/tracking.ts
index 43ec75b..e839a0f 100644
--- a/components/Tracking.ts
+++ b/components/tracking/tracking.ts
@@ -1,13 +1,11 @@
-import "../theme/hot.css";
-import '@shoelace-style/shoelace/dist/themes/light.css';
-import '@shoelace-style/shoelace/dist/themes/dark.css';
+import "../../theme/sl-custom.css";
import '@shoelace-style/shoelace/dist/components/alert/alert.js';
import { LitElement, css, html, unsafeCSS } from "lit";
import { property, state } from "lit/decorators.js";
-import registerBundledIcons from '../components/icons';
+import registerBundledIcons from '../../components/icons';
registerBundledIcons();
@@ -41,7 +39,6 @@ export class Tracking extends LitElement {
#tracking-header {
font-weight: var(--sl-font-weight-bold);
font-size: var(--sl-font-size-large);
- color: #d63f3f;
text-align: center;
}
sl-alert::part(base) {
diff --git a/docs/components/hot-button.md b/docs/components/hot-button.md
index 236f634..1580e52 100644
--- a/docs/components/hot-button.md
+++ b/docs/components/hot-button.md
@@ -2,11 +2,12 @@
## Properties
-| Property | Attribute | Type | Default | Description |
-|------------|------------|----------------------------|--------------|------------------------------------------------|
-| `disabled` | `disabled` | `boolean` | false | Disable the button, greyed out, not clickable. |
-| `name` | `name` | `string` | "hot-button" | |
-| `variant` | `variant` | `"primary" \| "secondary"` | "primary" | CVA button type. |
+| Property | Attribute | Type | Default | Description |
+|--------------|---------------|------------|---------------|------------------------------------------------|
+| `classGroup` | `class-group` | `variants` | "classGroup1" | CVA button class group. |
+| `disabled` | `disabled` | `boolean` | false | Disable the button, greyed out, not clickable. |
+| `name` | `name` | `string` | "hot-button" | |
+| `variant` | `variant` | `string` | "default" | Type of button. |
## Events
diff --git a/docs/components/hot-header.md b/docs/components/hot-header.md
index 9c596fc..62e1db2 100644
--- a/docs/components/hot-header.md
+++ b/docs/components/hot-header.md
@@ -7,4 +7,5 @@
| `drawer` | `drawer` | `boolean` | true |
| `logo` | `logo` | `string \| URL` | "hotLogo" |
| `name` | `name` | `string` | "hot-header" |
+| `tabs` | `tabs` | `MenuItem[]` | [] |
| `title` | `title` | `string` | "" |
diff --git a/examples/svelte/src/App.svelte b/examples/svelte/src/App.svelte
index 08eaf26..80b1bb7 100644
--- a/examples/svelte/src/App.svelte
+++ b/examples/svelte/src/App.svelte
@@ -1,5 +1,5 @@