diff --git a/.gitignore b/.gitignore
index a8f803db..b2682ece 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,3 +35,6 @@ site
**/**/*.js
**/**/*.js.map
**/**/*.d.ts
+
+# Common system files
+.DS_Store
diff --git a/.storybook/stories/header.stories.ts b/.storybook/stories/header.stories.ts
index 6545fb35..bbe3a994 100644
--- a/.storybook/stories/header.stories.ts
+++ b/.storybook/stories/header.stories.ts
@@ -3,7 +3,7 @@ import { hrefTo } from '@storybook/addon-links';
import "../../components/header/header.ts";
import { html } from "lit";
-const defaultLogo = new URL('../../theme/logo.png', import.meta.url).href;
+const defaultLogo = "";
const meta: Meta = {
title: "Header",
@@ -99,9 +99,17 @@ export const Template: StoryObj = {
.tabs=${args.tabs}
>
-
Page Content
-
- Text on the page
+
+ Page Content
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing
+ elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
+ dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
+ sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
+ laborum.
+
`;
},
};
diff --git a/.storybook/stories/logo.stories.ts b/.storybook/stories/logo.stories.ts
new file mode 100644
index 00000000..fd3e09ba
--- /dev/null
+++ b/.storybook/stories/logo.stories.ts
@@ -0,0 +1,19 @@
+// The HOT logo
+
+import type { Meta, StoryObj } from "@storybook/web-components";
+import "../../components/index";
+import { html } from "lit";
+
+const meta: Meta = {
+ title: "Logo",
+ component: "hot-logo",
+};
+export default meta;
+
+export const Template: StoryObj = {
+ render: (args, { parameters }) => {
+ return html`
+
+ `;
+ },
+};
diff --git a/components/header/header.ts b/components/header/header.ts
index 17081426..b36641b9 100644
--- a/components/header/header.ts
+++ b/components/header/header.ts
@@ -1,115 +1,32 @@
-import "../../theme/sl-custom.css";
+import "../../theme/hot.css";
import "@shoelace-style/shoelace/dist/components/icon-button/icon-button.js";
import "@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js";
import "@shoelace-style/shoelace/dist/components/tab-group/tab-group.js";
import "@shoelace-style/shoelace/dist/components/tab/tab.js";
-import { LitElement, css, html } from "lit";
+import { LitElement, html } from "lit";
import { property, state } from "lit/decorators.js";
-import { cva } from "class-variance-authority";
+import { headerVariants, type sizes, styles} from "./styles";
import registerBundledIcons from "../../components/icons";
registerBundledIcons();
-const headerVariants = cva(
- // Defaults to include in all variants
- `
- flex flex-row bg-[var(--hot-white)] items-center justify-between
- sm:justify-around p-2 border-b-2 border-b-gray-100 border-b-solid
- `,
- {
- variants: {
- size: {
- small: "h-8",
- large: "h-14",
- },
- },
- }
-);
-type sizes = "small" | "large";
-
interface MenuItem {
label: string;
clickEvent: () => void;
}
export class Header extends LitElement {
+
@property() name = "hot-header";
/** Use a text-based title in the header. */
@property({ type: String }) title: string = "";
/** Display a logo on the left of the header. */
- @property({ type: String }) logo: string | URL = `
- data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAB9CAMAAAAvBq6hAAAAbFBMVEX
- ////XPz/ke3vura3++vr32dn76+vYRET65eX10ND88PDxurrkfX3cVlb99PTkf3/zxMThb2/tqKjv
- sbHfZWXlhIT439/cWVnyv7/rn5/idHT0ysrplpbaTU3qnJzZSEjni4veYWHgaWnokpKZE/dBAAAOH
- ElEQVR4nO1cabuqvA6lMsggCCgzKOD//483SQvitiDoOfe4n7frw2YDHVfTJE2LmqagoKCgoKCgoK
- CgoKCgoKCgoKCgoKCgoKCgoKDwhEu0+wzJW9Wmu0Mg/q127Uc9iHcVXlxj5n21iz8qfwKHfYronWo
- rxlzxb8HYRz3w2U3TjNqfI+vG/I/KnyL9mK13ZMth+4Es/cPOXPqcypt7n/eXj8p/QPUxW2805g+S
- RUj/oPgswvuYrdPmOp/Ici2aRobl0o2mmbmDD+ywGpSb5eSVTf8F8N6qQn5jgLYyQua7VKBh5rkpi
- jI0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JmQlNaG4pJrdMHYt6+rw9WQt
- ulvrsN7dGsnKppl68Stg7feTpcmWMtuwOo41kpUIy2CfI0MbIo/ZLyBLWxNOWMTqONbUdaDwWU9Hp
- /jT+vt1lvYn3K2132Y2o4IDP2qnx9nwu2tFeOrAG03QKaVDLvx3o8SvqHwVrFcfFrzEylXJZLlTkI
- vXoeoy+OGO3EF/XueH175WssAF1D/EZR1ZoXdfTTr14SB+I8iNj+UNaPNOhmZ7pPotj9bQrrcUj1R
- QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ+Gf4H5j7yuOYiAtqAAAAAElFTkSuQmCC
- `;
+ @property({ type: String }) logo: string | URL = "";
/** Add a drawer icon with a click event to e.g. open a sidebar. */
@property({ type: Boolean }) drawer: boolean = true;
@@ -122,45 +39,7 @@ export class Header extends LitElement {
@state() private selectedTab: number = 0;
- static styles = [
- css`
- @unocss-placeholder;
- `,
- css`
- #right-section {
- display: flex;
- align-items: center;
- }
-
- sl-tab-group {
- display: flex;
- }
-
- sl-tab::part(base) {
- font-size: 1rem;
- border-bottom: 2px solid transparent;
- }
-
- sl-tab[selected]::part(base) {
- border-bottom: 2px solid white;
- }
-
- #drawer-block {
- display: flex;
- align-items: center;
- padding-right: 30px;
- }
-
- @media (prefers-color-scheme: light) {
- header {
- color: black;
- }
- #break {
- background-color: black;
- }
- }
- `,
- ];
+ static styles = styles;
protected render() {
const logoSrc =
@@ -172,20 +51,25 @@ export class Header extends LitElement {
return html`