@nysds/components 1.13.0 → 1.13.1
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/custom-elements.json +10506 -0
- package/dist/.vscode/vscode.css-custom-data.json +47 -1
- package/dist/.vscode/vscode.html-custom-data.json +1248 -275
- package/dist/custom-elements.json +829 -202
- package/dist/nys-stepper/newsletter.html +4 -0
- package/dist/nys-stepper/personal.html +6 -0
- package/dist/nys-stepper/survey.html +5 -0
- package/dist/nys-stepper/team.html +6 -0
- package/dist/nysds.es.js +623 -559
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +59 -47
- package/dist/nysds.js.map +1 -1
- package/dist/packages/mcp-server/src/index.d.ts +8 -0
- package/dist/packages/mcp-server/src/lib/cem-parser.d.ts +95 -0
- package/dist/packages/mcp-server/src/lib/search.d.ts +19 -0
- package/dist/packages/mcp-server/src/lib/token-parser.d.ts +139 -0
- package/dist/packages/mcp-server/src/prompts/nysds-mode.d.ts +7 -0
- package/dist/packages/mcp-server/src/resources/components.d.ts +11 -0
- package/dist/packages/mcp-server/src/resources/guides.d.ts +10 -0
- package/dist/packages/mcp-server/src/resources/index.d.ts +7 -0
- package/dist/packages/mcp-server/src/resources/tokens.d.ts +16 -0
- package/dist/packages/mcp-server/src/server.d.ts +10 -0
- package/dist/packages/mcp-server/src/tools/component-tools.d.ts +13 -0
- package/dist/packages/mcp-server/src/tools/index.d.ts +7 -0
- package/dist/packages/mcp-server/src/tools/token-tools.d.ts +16 -0
- package/dist/packages/mcp-server/src/tools/validation-tools.d.ts +11 -0
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +25 -8
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +19 -7
- package/dist/packages/nys-alert/src/nys-alert.d.ts +32 -9
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +26 -7
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +17 -7
- package/dist/packages/nys-badge/src/nys-badge.d.ts +30 -4
- package/dist/packages/nys-button/src/nys-button.d.ts +126 -9
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +43 -11
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +33 -12
- package/dist/packages/nys-divider/src/nys-divider.d.ts +20 -2
- package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +10 -3
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +37 -11
- package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +16 -2
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +16 -7
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +16 -10
- package/dist/packages/nys-icon/src/nys-icon.d.ts +25 -3
- package/dist/packages/nys-label/src/nys-label.d.ts +15 -3
- package/dist/packages/nys-modal/src/nys-modal.d.ts +30 -7
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +17 -5
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +35 -13
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +33 -8
- package/dist/packages/nys-select/src/nys-option.d.ts +24 -0
- package/dist/packages/nys-select/src/nys-select.d.ts +48 -12
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +19 -6
- package/dist/packages/nys-stepper/src/index.d.ts +2 -0
- package/dist/packages/nys-stepper/src/nys-step.d.ts +37 -0
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +48 -0
- package/dist/packages/nys-stepper/src/nys-stepper.figma.d.ts +1 -0
- package/dist/packages/nys-table/src/nys-table.d.ts +2 -1
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +51 -8
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +64 -9
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +35 -6
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +24 -11
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +12 -5
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +25 -7
- package/package.json +12 -10
|
@@ -1,36 +1,79 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* A multi-line text input for collecting longer responses like comments, descriptions, or feedback.
|
|
4
|
+
* Form-associated with validation support via ElementInternals.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Use for detailed responses needing multiple lines. For single-line input, use `nys-textinput`.
|
|
7
|
+
* For predefined options, use `nys-select`, `nys-radiobutton`, or `nys-checkbox`.
|
|
7
8
|
*
|
|
8
|
-
* @
|
|
9
|
-
* @
|
|
10
|
-
*
|
|
11
|
-
* @
|
|
12
|
-
*
|
|
9
|
+
* @summary Multi-line text input for comments, descriptions, and feedback.
|
|
10
|
+
* @element nys-textarea
|
|
11
|
+
*
|
|
12
|
+
* @slot description - Custom HTML description content below the label.
|
|
13
|
+
*
|
|
14
|
+
* @fires nys-input - Fired on input change. Detail: `{id, value}`.
|
|
15
|
+
* @fires nys-focus - Fired when textarea gains focus.
|
|
16
|
+
* @fires nys-blur - Fired when textarea loses focus. Triggers validation.
|
|
17
|
+
* @fires nys-select - Fired when user selects text. Detail: `{id, value}`.
|
|
18
|
+
*
|
|
19
|
+
* @example Basic textarea
|
|
20
|
+
* ```html
|
|
21
|
+
* <nys-textarea label="Comments" rows="4"></nys-textarea>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example Required with description
|
|
25
|
+
* ```html
|
|
26
|
+
* <nys-textarea label="Describe the incident" description="Please provide details" required></nys-textarea>
|
|
27
|
+
* ```
|
|
13
28
|
*/
|
|
14
29
|
export declare class NysTextarea extends LitElement {
|
|
15
30
|
static styles: import("lit").CSSResult;
|
|
31
|
+
/** Unique identifier. Auto-generated if not provided. */
|
|
16
32
|
id: string;
|
|
33
|
+
/** Name for form submission. */
|
|
17
34
|
name: string;
|
|
35
|
+
/** Visible label text. Required for accessibility. */
|
|
18
36
|
label: string;
|
|
37
|
+
/** Helper text below label. Use slot for custom HTML. */
|
|
19
38
|
description: string;
|
|
39
|
+
/** Placeholder text. Don't use as label replacement. */
|
|
20
40
|
placeholder: string;
|
|
41
|
+
/** Current textarea value. */
|
|
21
42
|
value: string;
|
|
43
|
+
/** Prevents interaction. */
|
|
22
44
|
disabled: boolean;
|
|
45
|
+
/** Makes textarea read-only but focusable. */
|
|
23
46
|
readonly: boolean;
|
|
47
|
+
/** Marks as required. Shows "Required" flag and validates on blur. */
|
|
24
48
|
required: boolean;
|
|
49
|
+
/** Shows "Optional" flag. Use when most fields are required. */
|
|
25
50
|
optional: boolean;
|
|
51
|
+
/** Tooltip text shown on hover/focus of info icon. */
|
|
26
52
|
tooltip: string;
|
|
53
|
+
/** Adjusts colors for dark backgrounds. */
|
|
27
54
|
inverted: boolean;
|
|
55
|
+
/** Form `id` to associate with when textarea is outside form element. */
|
|
28
56
|
form: string | null;
|
|
57
|
+
/** Maximum character length. */
|
|
29
58
|
maxlength: number | null;
|
|
59
|
+
/**
|
|
60
|
+
* Textarea width: `sm` (88px), `md` (200px), `lg` (384px), `full` (100%, default).
|
|
61
|
+
* @default "full"
|
|
62
|
+
*/
|
|
30
63
|
width: "sm" | "md" | "lg" | "full";
|
|
64
|
+
/**
|
|
65
|
+
* Visible height in lines.
|
|
66
|
+
* @default 4
|
|
67
|
+
*/
|
|
31
68
|
rows: number;
|
|
69
|
+
/**
|
|
70
|
+
* Resize behavior: `vertical` (default, user can resize height), `none` (fixed size).
|
|
71
|
+
* @default "vertical"
|
|
72
|
+
*/
|
|
32
73
|
resize: "vertical" | "none";
|
|
74
|
+
/** Shows error message when true. Set by validation or manually. */
|
|
33
75
|
showError: boolean;
|
|
76
|
+
/** Error message text. Shown only when `showError` is true. */
|
|
34
77
|
errorMessage: string;
|
|
35
78
|
updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void>;
|
|
36
79
|
private _hasUserInteracted;
|
|
@@ -1,40 +1,95 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Works with forms via ElementInternals.
|
|
3
|
+
* A text input for collecting short, single-line data. Supports validation, input masking (tel),
|
|
4
|
+
* password visibility toggle, and live error messaging. Form-associated via ElementInternals.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @slot endButton - Slot for a single <nys-button> at the end of the input.
|
|
6
|
+
* Use for names, emails, passwords, phone numbers. For multi-line input, use `nys-textarea` instead.
|
|
7
|
+
* For predefined options, use `nys-select`, `nys-radiobutton`, or `nys-checkbox`.
|
|
10
8
|
*
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
9
|
+
* @summary Text input for short single-line data with validation and masking support.
|
|
10
|
+
* @element nys-textinput
|
|
11
|
+
*
|
|
12
|
+
* @slot description - Custom HTML description content below the label.
|
|
13
|
+
* @slot startButton - Button at input start. Use single `nys-button` only.
|
|
14
|
+
* @slot endButton - Button at input end. Use single `nys-button` only.
|
|
15
|
+
*
|
|
16
|
+
* @fires nys-input - Fired on input change. Detail: `{id, value}`.
|
|
17
|
+
* @fires nys-focus - Fired when input gains focus.
|
|
18
|
+
* @fires nys-blur - Fired when input loses focus. Triggers validation.
|
|
19
|
+
*
|
|
20
|
+
* @example Basic text input
|
|
21
|
+
* ```html
|
|
22
|
+
* <nys-textinput label="Full Name" required></nys-textinput>
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example Email with validation
|
|
26
|
+
* ```html
|
|
27
|
+
* <nys-textinput type="email" label="Email Address" required></nys-textinput>
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example Phone with masking
|
|
31
|
+
* ```html
|
|
32
|
+
* <nys-textinput type="tel" label="Phone Number"></nys-textinput>
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @example Search with button
|
|
36
|
+
* ```html
|
|
37
|
+
* <nys-textinput type="search" placeholder="Search">
|
|
38
|
+
* <nys-button slot="endButton" label="Search" prefixIcon="search"></nys-button>
|
|
39
|
+
* </nys-textinput>
|
|
40
|
+
* ```
|
|
14
41
|
*/
|
|
15
42
|
export declare class NysTextinput extends LitElement {
|
|
16
43
|
static styles: import("lit").CSSResult;
|
|
44
|
+
/** Unique identifier. Auto-generated if not provided. */
|
|
17
45
|
id: string;
|
|
46
|
+
/** Name for form submission. */
|
|
18
47
|
name: string;
|
|
48
|
+
/**
|
|
49
|
+
* Input type: `text` (default), `email`, `number`, `password`, `search`, `tel` (auto-masked), `url`.
|
|
50
|
+
* @default "text"
|
|
51
|
+
*/
|
|
19
52
|
type: "email" | "number" | "password" | "search" | "tel" | "text" | "url";
|
|
53
|
+
/** Visible label text. Required for accessibility. */
|
|
20
54
|
label: string;
|
|
55
|
+
/** Helper text below label. Use slot for custom HTML. */
|
|
21
56
|
description: string;
|
|
57
|
+
/** Placeholder text. Don't use as label replacement. */
|
|
22
58
|
placeholder: string;
|
|
59
|
+
/** Current input value. */
|
|
23
60
|
value: string;
|
|
61
|
+
/** Prevents interaction. */
|
|
24
62
|
disabled: boolean;
|
|
63
|
+
/** Makes input read-only but focusable. */
|
|
25
64
|
readonly: boolean;
|
|
65
|
+
/** Marks as required. Shows "Required" flag and validates on blur. */
|
|
26
66
|
required: boolean;
|
|
67
|
+
/** Shows "Optional" flag. Use when most fields are required. */
|
|
27
68
|
optional: boolean;
|
|
69
|
+
/** Tooltip text shown on hover/focus of info icon. */
|
|
28
70
|
tooltip: string;
|
|
71
|
+
/** Form `id` to associate with when input is outside form element. */
|
|
29
72
|
form: string | null;
|
|
73
|
+
/** Regex pattern for validation. Shows error on mismatch. */
|
|
30
74
|
pattern: string;
|
|
75
|
+
/** Maximum character length. */
|
|
31
76
|
maxlength: number | null;
|
|
77
|
+
/**
|
|
78
|
+
* Input width: `sm` (88px), `md` (200px), `lg` (384px), `full` (100%, default).
|
|
79
|
+
* @default "full"
|
|
80
|
+
*/
|
|
32
81
|
width: "sm" | "md" | "lg" | "full";
|
|
82
|
+
/** Step increment for `type="number"`. */
|
|
33
83
|
step: number | null;
|
|
84
|
+
/** Minimum value for `type="number"`. */
|
|
34
85
|
min: number | null;
|
|
86
|
+
/** Maximum value for `type="number"`. */
|
|
35
87
|
max: number | null;
|
|
88
|
+
/** Adjusts colors for dark backgrounds. */
|
|
36
89
|
inverted: boolean;
|
|
90
|
+
/** Shows error message when true. Set by validation or manually. */
|
|
37
91
|
showError: boolean;
|
|
92
|
+
/** Error message text. Shown only when `showError` is true. */
|
|
38
93
|
errorMessage: string;
|
|
39
94
|
private showPassword;
|
|
40
95
|
private _originalErrorMessage;
|
|
@@ -1,27 +1,55 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* size variants, inverted styles, and optional icons. Supports keyboard
|
|
5
|
-
* interaction and integrates with forms via ElementInternals.
|
|
3
|
+
* A toggle switch for binary settings with immediate effect. Form-associated via ElementInternals.
|
|
6
4
|
*
|
|
7
|
-
*
|
|
5
|
+
* Use when changing a setting takes effect immediately (e.g., dark mode, notifications).
|
|
6
|
+
* For binary choices in forms that submit later, use `nys-checkbox` instead.
|
|
8
7
|
*
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
8
|
+
* @summary Toggle switch for binary settings with immediate effect.
|
|
9
|
+
* @element nys-toggle
|
|
10
|
+
*
|
|
11
|
+
* @slot description - Custom HTML description content.
|
|
12
|
+
*
|
|
13
|
+
* @fires nys-change - Fired when toggle state changes. Detail: `{id, checked}`.
|
|
14
|
+
* @fires nys-focus - Fired when toggle gains focus.
|
|
11
15
|
* @fires nys-blur - Fired when toggle loses focus.
|
|
16
|
+
*
|
|
17
|
+
* @example Basic toggle
|
|
18
|
+
* ```html
|
|
19
|
+
* <nys-toggle label="Enable notifications" name="notifications"></nys-toggle>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example Dark mode toggle
|
|
23
|
+
* ```html
|
|
24
|
+
* <nys-toggle label="Dark mode" description="Adjust display for low light" checked></nys-toggle>
|
|
25
|
+
* ```
|
|
12
26
|
*/
|
|
13
27
|
export declare class NysToggle extends LitElement {
|
|
14
28
|
static styles: import("lit").CSSResult;
|
|
29
|
+
/** Unique identifier. Auto-generated if not provided. */
|
|
15
30
|
id: string;
|
|
31
|
+
/** Name for form submission. */
|
|
16
32
|
name: string;
|
|
33
|
+
/** Value submitted when toggle is on. */
|
|
17
34
|
value: string;
|
|
35
|
+
/** Visible label text. */
|
|
18
36
|
label: string;
|
|
37
|
+
/** Helper text below label. Use slot for custom HTML. */
|
|
19
38
|
description: string;
|
|
39
|
+
/** Form `id` to associate with. */
|
|
20
40
|
form: string | null;
|
|
41
|
+
/** Whether toggle is on. */
|
|
21
42
|
checked: boolean;
|
|
43
|
+
/** Prevents interaction. */
|
|
22
44
|
disabled: boolean;
|
|
45
|
+
/** Hides check/close icon inside toggle knob. */
|
|
23
46
|
noIcon: boolean;
|
|
47
|
+
/** Adjusts colors for dark backgrounds. */
|
|
24
48
|
inverted: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Toggle size: `sm` or `md` (default).
|
|
51
|
+
* @default "md"
|
|
52
|
+
*/
|
|
25
53
|
size: "sm" | "md";
|
|
26
54
|
private _internals;
|
|
27
55
|
/**
|
|
@@ -36,6 +64,7 @@ export declare class NysToggle extends LitElement {
|
|
|
36
64
|
* --------------------------------------------------------------------------
|
|
37
65
|
*/
|
|
38
66
|
updated(changedProperties: Map<string, any>): void;
|
|
67
|
+
formResetCallback(): void;
|
|
39
68
|
/**
|
|
40
69
|
* Event Handlers
|
|
41
70
|
* --------------------------------------------------------------------------
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* It supports dynamic positioning, screen-reader accessibility, keyboard interaction,
|
|
5
|
-
* and viewport overflow handling.
|
|
3
|
+
* Shows contextual help text on hover/focus. Auto-positions to stay within viewport and supports keyboard dismiss.
|
|
6
4
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Link to a trigger element via `for` attribute matching the trigger's `id`. Tooltip appears on hover or focus
|
|
6
|
+
* and dismisses on blur, mouse leave, or Escape key. Use for supplementary info only—not critical content.
|
|
9
7
|
*
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
8
|
+
* @summary Contextual tooltip with auto-positioning, keyboard support, and screen reader integration.
|
|
9
|
+
* @element nys-tooltip
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* -
|
|
16
|
-
* -
|
|
11
|
+
* @example Tooltip for button
|
|
12
|
+
* ```html
|
|
13
|
+
* <nys-button id="help-btn" label="Help" circle icon="help"></nys-button>
|
|
14
|
+
* <nys-tooltip for="help-btn" text="Click for assistance"></nys-tooltip>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @example Positioned tooltip
|
|
18
|
+
* ```html
|
|
19
|
+
* <nys-icon id="info-icon" name="info"></nys-icon>
|
|
20
|
+
* <nys-tooltip for="info-icon" text="Additional details" position="right"></nys-tooltip>
|
|
21
|
+
* ```
|
|
17
22
|
*/
|
|
18
23
|
export declare class NysTooltip extends LitElement {
|
|
19
24
|
static styles: import("lit").CSSResult;
|
|
25
|
+
/** Unique identifier. Auto-generated if not provided. */
|
|
20
26
|
id: string;
|
|
27
|
+
/** Tooltip content text. Required. */
|
|
21
28
|
text: string;
|
|
29
|
+
/** Adjusts colors for dark backgrounds. */
|
|
22
30
|
inverted: boolean;
|
|
31
|
+
/** ID of the trigger element to attach this tooltip to. Required. */
|
|
23
32
|
for: string;
|
|
24
33
|
private _active;
|
|
25
34
|
private _userHasSetPosition;
|
|
@@ -27,6 +36,10 @@ export declare class NysTooltip extends LitElement {
|
|
|
27
36
|
private _internallyUpdatingPosition;
|
|
28
37
|
private _hideTimeout;
|
|
29
38
|
private _position;
|
|
39
|
+
/**
|
|
40
|
+
* Preferred position relative to trigger. Auto-adjusts if space is insufficient.
|
|
41
|
+
* @default null (auto-positioned based on available space)
|
|
42
|
+
*/
|
|
30
43
|
get position(): "right" | "top" | "bottom" | "left" | null;
|
|
31
44
|
set position(value: "right" | "top" | "bottom" | "left" | null);
|
|
32
45
|
/**
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* It displays the official NYS logo linking to ny.gov and a set of primary navigation links.
|
|
3
|
+
* Universal NYS footer with logo and statewide navigation links. Required on all NYS sites.
|
|
5
4
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Place as the last element before `</body>`. Displays NY.gov logo and links to Agencies,
|
|
6
|
+
* App Directory, Counties, Events, Programs, and Services. No configuration needed.
|
|
7
|
+
*
|
|
8
|
+
* @summary Universal NYS footer with logo and statewide links. Required site-wide.
|
|
9
|
+
* @element nys-unavfooter
|
|
10
|
+
*
|
|
11
|
+
* @example Standard usage
|
|
12
|
+
* ```html
|
|
13
|
+
* <nys-globalfooter>...</nys-globalfooter>
|
|
14
|
+
* <nys-unavfooter></nys-unavfooter>
|
|
15
|
+
* ```
|
|
9
16
|
*/
|
|
10
17
|
export declare class NysUnavFooter extends LitElement {
|
|
11
18
|
static styles: import("lit").CSSResult;
|
|
@@ -1,22 +1,40 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Universal NYS header with trust bar, logo, search, and language translation. Required on all NYS sites.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
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
|
+
* ```
|
|
11
22
|
*/
|
|
12
23
|
export declare class NysUnavHeader extends LitElement {
|
|
13
24
|
static styles: import("lit").CSSResult;
|
|
25
|
+
/** Internal: Whether trust bar panel is expanded. */
|
|
14
26
|
trustbarVisible: boolean;
|
|
27
|
+
/** Internal: Whether search dropdown is visible (mobile). */
|
|
15
28
|
searchDropdownVisible: boolean;
|
|
29
|
+
/** Internal: Whether language dropdown is visible. */
|
|
16
30
|
languageVisible: boolean;
|
|
31
|
+
/** Internal: Whether search input is focused. */
|
|
17
32
|
isSearchFocused: boolean;
|
|
33
|
+
/** Hides the translation dropdown. */
|
|
18
34
|
hideTranslate: boolean;
|
|
35
|
+
/** Hides the search functionality. */
|
|
19
36
|
hideSearch: boolean;
|
|
37
|
+
searchUrl: string;
|
|
20
38
|
private languages;
|
|
21
39
|
/**
|
|
22
40
|
* Lifecycle Methods
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/components",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "New York State's design system and code component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"files": [
|
|
10
10
|
"dist/",
|
|
11
|
-
"
|
|
11
|
+
"custom-elements.json"
|
|
12
12
|
],
|
|
13
13
|
"main": "dist/nysds.js",
|
|
14
14
|
"module": "dist/nysds.es.js",
|
|
@@ -20,31 +20,33 @@
|
|
|
20
20
|
"require": "./dist/nysds.js"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
+
"customElements": "custom-elements.json",
|
|
23
24
|
"scripts": {
|
|
24
25
|
"dev": "vite",
|
|
25
26
|
"gen": "plop",
|
|
26
27
|
"build": "tsc --emitDeclarationOnly && vite build",
|
|
27
28
|
"build:umd": "tsc --emitDeclarationOnly && vite build --config vite.config.umd.js",
|
|
28
29
|
"build:packages": "node src/scripts/build-order.js",
|
|
29
|
-
"build:all": "npm run clean:dist && npm run
|
|
30
|
+
"build:all": "npm run clean:dist && npm run lint && cross-env NODE_ENV=production npm run build:packages && cross-env NODE_ENV=production npm run build && cross-env NODE_ENV=production npm run build:umd && npm run lit-analyze || true && npm run cem && npm run cem:copy",
|
|
30
31
|
"build:link": "npm run build:all && npm link",
|
|
31
32
|
"lint": "eslint",
|
|
32
33
|
"lint:fix": "eslint --fix",
|
|
33
|
-
"lit-analyze": "
|
|
34
|
-
"release": "NODE_ENV=production npm run build:all && NODE_ENV=production npm run test && npm run cem && NODE_ENV=production npm publish --workspaces --access public && NODE_ENV=production npm publish --access public",
|
|
35
|
-
"release:dry-run": "NODE_ENV=production npm run build:all && NODE_ENV=production npm run test && npm run cem && node src/scripts/publish-dry-run.js",
|
|
34
|
+
"lit-analyze": "find ./packages/nys-*/ -name '*.ts' ! -name '*.figma.*' | xargs lit-analyzer {}",
|
|
35
|
+
"release": "cross-env NODE_ENV=production npm run build:all && cross-env NODE_ENV=production npm run test && npm run cem && cross-env NODE_ENV=production npm publish --workspaces --access public && cross-env NODE_ENV=production npm publish --access public",
|
|
36
|
+
"release:dry-run": "cross-env NODE_ENV=production npm run build:all && cross-env NODE_ENV=production npm run test && npm run cem && node src/scripts/publish-dry-run.js",
|
|
36
37
|
"release:alpha": "npm run build && npm run build:umd && npm publish --tag next",
|
|
37
38
|
"test": "npx playwright install && wtr --node-resolve",
|
|
38
39
|
"test:build": "npm run build:all && npm run test",
|
|
39
|
-
"storybook": "NODE_ENV=production storybook dev -p 6006",
|
|
40
|
-
"storybook:build:all": "NODE_ENV=production npm run build:all && npm run storybook",
|
|
40
|
+
"storybook": "cross-env NODE_ENV=production storybook dev -p 6006",
|
|
41
|
+
"storybook:build:all": "cross-env NODE_ENV=production npm run build:all && npm run storybook",
|
|
41
42
|
"build-storybook": "npm run build:packages && storybook build",
|
|
42
43
|
"storybook:cibuild": "storybook build",
|
|
43
44
|
"clean:node": "rm -rf node_modules && rm -rf packages/*/node_modules && rm -rf packages/**/*/node_modules",
|
|
44
45
|
"clean:dist": "rm -rf storybook-static && rm -rf coverage && rm -rf packages/*/coverage && rm -rf dist && rm -rf packages/*/dist && rm -rf packages/**/*/dist",
|
|
45
46
|
"clean:all": "npm run clean:dist && npm run clean:node",
|
|
46
47
|
"code-connect": "dotenv -- npx figma connect publish",
|
|
47
|
-
"cem": "npx cem analyze --config
|
|
48
|
+
"cem": "npx cem analyze --config ./custom-elements-manifest.config.mjs",
|
|
49
|
+
"cem:copy": "cp ./custom-elements.json dist/"
|
|
48
50
|
},
|
|
49
51
|
"repository": {
|
|
50
52
|
"type": "git",
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
"@web/test-runner": "^0.20.2",
|
|
75
77
|
"@web/test-runner-commands": "^0.9.0",
|
|
76
78
|
"@web/test-runner-playwright": "^0.11.1",
|
|
79
|
+
"cross-env": "^10.1.0",
|
|
77
80
|
"custom-element-react-wrappers": "^1.7.3",
|
|
78
81
|
"custom-element-vs-code-integration": "^1.5.0",
|
|
79
82
|
"dotenv-cli": "^10.0.0",
|
|
@@ -103,7 +106,6 @@
|
|
|
103
106
|
"overrides": {
|
|
104
107
|
"storybook": "$storybook"
|
|
105
108
|
},
|
|
106
|
-
"customElements": "dist/custom-elements.json",
|
|
107
109
|
"dependencies": {
|
|
108
110
|
"wc-datepicker": "^0.9.2"
|
|
109
111
|
}
|