@nysds/nys-unavheader 1.19.0 → 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.
- package/dist/nys-unavheader.d.ts +68 -0
- package/dist/nys-unavheader.js +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* Universal NYS header with trust bar, logo, search, and language translation. Required on all NYS sites.
|
|
4
|
+
*
|
|
5
|
+
* Place as the first element in `<body>`. Includes "official site" trust indicator, NY.gov logo,
|
|
6
|
+
* site search (searches ny.gov), and 14-language translation dropdown. Use `hideSearch` or `hideTranslate`
|
|
7
|
+
* to remove features if not applicable.
|
|
8
|
+
*
|
|
9
|
+
* @summary Universal NYS header with trust bar, search, and translation. Required site-wide.
|
|
10
|
+
* @element nys-unavheader
|
|
11
|
+
*
|
|
12
|
+
* @example Standard usage
|
|
13
|
+
* ```html
|
|
14
|
+
* <nys-unavheader></nys-unavheader>
|
|
15
|
+
* <nys-globalheader>...</nys-globalheader>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example Without search
|
|
19
|
+
* ```html
|
|
20
|
+
* <nys-unavheader hideSearch></nys-unavheader>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
interface Language {
|
|
24
|
+
code: string;
|
|
25
|
+
label: string;
|
|
26
|
+
url?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class NysUnavHeader extends LitElement {
|
|
29
|
+
static styles: import("lit").CSSResult;
|
|
30
|
+
/** Internal: Whether trust bar panel is expanded. */
|
|
31
|
+
trustbarVisible: boolean;
|
|
32
|
+
/** Internal: Whether search dropdown is visible (mobile). */
|
|
33
|
+
searchDropdownVisible: boolean;
|
|
34
|
+
/** Internal: Whether language dropdown is visible. */
|
|
35
|
+
languageVisible: boolean;
|
|
36
|
+
/** Internal: Whether search input is focused. */
|
|
37
|
+
isSearchFocused: boolean;
|
|
38
|
+
/** Hides the translation dropdown. */
|
|
39
|
+
hideTranslate: boolean;
|
|
40
|
+
/** Hides the search functionality. */
|
|
41
|
+
hideSearch: boolean;
|
|
42
|
+
/** The URL endpoint of the search, make sure to include the query param. */
|
|
43
|
+
searchUrl: string;
|
|
44
|
+
/** The list of languages this site can be translated to, default to use Smartling */
|
|
45
|
+
languages: Language[];
|
|
46
|
+
/**
|
|
47
|
+
* Lifecycle Methods
|
|
48
|
+
* --------------------------------------------------------------------------
|
|
49
|
+
*/
|
|
50
|
+
connectedCallback(): void;
|
|
51
|
+
disconnectedCallback(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Functions
|
|
54
|
+
* --------------------------------------------------------------------------
|
|
55
|
+
*/
|
|
56
|
+
private _getNysLogo;
|
|
57
|
+
private _toggleTrustbar;
|
|
58
|
+
private _toggleLanguageList;
|
|
59
|
+
private _toggleSearchDropdown;
|
|
60
|
+
private _handleLanguageSelect;
|
|
61
|
+
private _handleSearchFocus;
|
|
62
|
+
private _handleSearchBlur;
|
|
63
|
+
private _handleSearchKeyup;
|
|
64
|
+
private _handleSearchButton;
|
|
65
|
+
private _handleSearch;
|
|
66
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
package/dist/nys-unavheader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { property as t } from "lit/decorators.js";
|
|
|
5
5
|
* █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
|
|
6
6
|
* █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
|
|
7
7
|
*
|
|
8
|
-
* Unav Header Component v1.19.
|
|
8
|
+
* Unav 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-unavheader",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.2",
|
|
4
4
|
"description": "The Unavheader component from the NYS Design System.",
|
|
5
5
|
"module": "dist/nys-unavheader.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"lit-analyze": "lit-analyzer '**/*.ts'"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@nysds/nys-icon": "^1.19.
|
|
27
|
-
"@nysds/nys-button": "^1.19.
|
|
28
|
-
"@nysds/nys-textinput": "^1.19.
|
|
26
|
+
"@nysds/nys-icon": "^1.19.2",
|
|
27
|
+
"@nysds/nys-button": "^1.19.2",
|
|
28
|
+
"@nysds/nys-textinput": "^1.19.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"lit": "^3.3.1",
|
|
@@ -42,5 +42,6 @@
|
|
|
42
42
|
"unavheader"
|
|
43
43
|
],
|
|
44
44
|
"author": "New York State Design System Team",
|
|
45
|
-
"license": "MIT"
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"sideEffects": true
|
|
46
47
|
}
|