@nysds/nys-globalheader 1.19.1 → 1.19.2

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.
@@ -0,0 +1,54 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Agency-branded header with app/agency name, navigation, and responsive mobile menu.
4
+ *
5
+ * Place below `nys-unavheader`. Slot navigation links as `<ul><li><a>` elements; active links
6
+ * are auto-highlighted based on current URL. Mobile menu toggles automatically on narrow screens.
7
+ *
8
+ * @summary Agency header with navigation, mobile menu, and active link highlighting.
9
+ * @element nys-globalheader
10
+ *
11
+ * @slot - Navigation content (typically `<ul>` with `<li><a>` links). Auto-sanitized.
12
+ *
13
+ * @example Basic header
14
+ * ```html
15
+ * <nys-globalheader appName="My App" agencyName="Department of Health" homepageLink="/">
16
+ * <ul><li><a href="/about">About</a></li><li><a href="/contact">Contact</a></li></ul>
17
+ * </nys-globalheader>
18
+ * ```
19
+ */
20
+ export declare class NysGlobalHeader extends LitElement {
21
+ static styles: import("lit").CSSResult;
22
+ /** Application name displayed prominently. */
23
+ appName: string;
24
+ /** Agency name displayed below app name (or as main title if no appName). */
25
+ agencyName: string;
26
+ /** URL for the header title link. If empty, title is not clickable. */
27
+ homepageLink: string;
28
+ /** Toggles the NYS brand mark */
29
+ nysLogo: boolean;
30
+ /** Internal state to track mobile menu open/closed status. */
31
+ private _isMobileMenuOpen;
32
+ /** Internal state to track if any navigation links are present in the slot. */
33
+ private _hasLinkContent;
34
+ /**
35
+ * Lifecycle Methods
36
+ * --------------------------------------------------------------------------
37
+ */
38
+ firstUpdated(): void;
39
+ disconnectedCallback(): void;
40
+ /**
41
+ * Functions
42
+ * --------------------------------------------------------------------------
43
+ */
44
+ private _highlightActiveLink;
45
+ private _handleListSlotChange;
46
+ private _normalizePath;
47
+ private _toggleMobileMenu;
48
+ private _listenLinkClicks;
49
+ private _renderBrandMark;
50
+ private _getNysLogo;
51
+ private _boundClickOutside;
52
+ private _boundKeyDown;
53
+ render(): import("lit-html").TemplateResult<1>;
54
+ }
@@ -5,7 +5,7 @@ import { property as C, state as c } from "lit/decorators.js";
5
5
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
6
6
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
7
7
  *
8
- * Global Header Component v1.19.1
8
+ * Global Header Component v1.19.2
9
9
  * Part of the New York State Design System
10
10
  * Repository: https://github.com/its-hcd/nysds
11
11
  * License: MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/nys-globalheader",
3
- "version": "1.19.1",
3
+ "version": "1.19.2",
4
4
  "description": "The Globalheader component from the NYS Design System.",
5
5
  "module": "dist/nys-globalheader.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "lit-analyze": "lit-analyzer '**/*.ts'"
24
24
  },
25
25
  "dependencies": {
26
- "@nysds/nys-icon": "^1.19.1"
26
+ "@nysds/nys-icon": "^1.19.2"
27
27
  },
28
28
  "devDependencies": {
29
29
  "lit": "^3.3.1",
@@ -39,5 +39,6 @@
39
39
  "globalheader"
40
40
  ],
41
41
  "author": "New York State Design System Team",
42
- "license": "MIT"
42
+ "license": "MIT",
43
+ "sideEffects": true
43
44
  }