@nysds/components 1.11.4 → 1.13.0
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/README.md +3 -1
- package/dist/.vscode/vscode.html-custom-data.json +183 -95
- package/dist/custom-elements.json +1570 -635
- package/dist/nysds.es.js +3414 -1837
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +286 -187
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +20 -5
- package/dist/packages/nys-accordion/src/nys-accordion.figma.d.ts +1 -0
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +20 -2
- package/dist/packages/nys-alert/src/nys-alert.d.ts +40 -8
- package/dist/packages/nys-alert/src/nys-alert.figma.d.ts +1 -0
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +25 -2
- package/dist/packages/nys-avatar/src/nys-avatar.figma.d.ts +1 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +19 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.figma.d.ts +1 -0
- package/dist/packages/nys-badge/src/nys-badge.d.ts +22 -8
- package/dist/packages/nys-badge/src/nys-badge.figma.d.ts +1 -0
- package/dist/packages/nys-button/src/nys-button.d.ts +28 -20
- package/dist/packages/nys-button/src/nys-button.figma.d.ts +1 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +35 -9
- package/dist/packages/nys-checkbox/src/nys-checkbox.figma.d.ts +1 -0
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +31 -8
- package/dist/packages/nys-datepicker/src/index.d.ts +1 -0
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +116 -0
- package/dist/packages/nys-datepicker/src/nys-datepicker.figma.d.ts +1 -0
- package/dist/packages/nys-divider/src/nys-divider.d.ts +4 -0
- package/dist/packages/nys-divider/src/nys-divider.figma.d.ts +1 -0
- package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +9 -1
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +34 -5
- package/dist/packages/nys-fileinput/src/nys-fileinput.figma.d.ts +1 -0
- package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +4 -0
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +20 -3
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.figma.d.ts +1 -0
- package/dist/packages/nys-globalheader/src/nys-global.logo.d.ts +2 -0
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +26 -8
- package/dist/packages/nys-globalheader/src/nys-globalheader.figma.d.ts +1 -0
- package/dist/packages/nys-icon/src/nys-icon.d.ts +12 -4
- package/dist/packages/nys-icon/src/nys-icon.figma.d.ts +1 -0
- package/dist/packages/nys-label/src/nys-label.d.ts +5 -0
- package/dist/packages/nys-modal/src/nys-modal.d.ts +25 -7
- package/dist/packages/nys-modal/src/nys-modal.figma.d.ts +1 -0
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +21 -3
- package/dist/packages/nys-pagination/src/nys-pagination.figma.d.ts +1 -0
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +28 -7
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.figma.d.ts +1 -0
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +32 -11
- package/dist/packages/nys-select/src/nys-select.d.ts +36 -10
- package/dist/packages/nys-select/src/nys-select.figma.d.ts +1 -0
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +13 -1
- package/dist/packages/nys-skipnav/src/nys-skipnav.figma.d.ts +1 -0
- package/dist/packages/nys-table/src/index.d.ts +1 -0
- package/dist/packages/nys-table/src/nys-table.d.ts +38 -0
- package/dist/packages/nys-table/src/nys-table.figma.d.ts +1 -0
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +32 -12
- package/dist/packages/nys-textarea/src/nys-textarea.figma.d.ts +1 -0
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +33 -12
- package/dist/packages/nys-textinput/src/nys-textinput.figma.d.ts +1 -0
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +24 -7
- package/dist/packages/nys-toggle/src/nys-toggle.figma.d.ts +1 -0
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +49 -9
- package/dist/packages/nys-tooltip/src/nys-tooltip.figma.d.ts +1 -0
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +12 -1
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.figma.d.ts +1 -0
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +20 -2
- package/dist/packages/nys-unavheader/src/nys-unavheader.figma.d.ts +1 -0
- package/dist/src/index.d.ts +2 -0
- package/package.json +19 -16
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* `<nys-table>` is a responsive table component that can display native HTML tables,
|
|
4
|
+
* supports striped and bordered styling, sortable columns, and CSV download.
|
|
5
|
+
*
|
|
6
|
+
* @slot - Accepts a `<table>` element. Only the first table is rendered.
|
|
7
|
+
*
|
|
8
|
+
* @fires nys-click - Fired when the download button or sortable headers are clicked.
|
|
9
|
+
*
|
|
10
|
+
* @method downloadFile - Triggers download of the CSV file if `download` is set.
|
|
11
|
+
*/
|
|
12
|
+
export declare class NysTable extends LitElement {
|
|
13
|
+
static styles: import("lit").CSSResult;
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
striped: boolean;
|
|
17
|
+
sortable: boolean;
|
|
18
|
+
bordered: boolean;
|
|
19
|
+
download: string;
|
|
20
|
+
private _sortColumn;
|
|
21
|
+
private _sortDirection;
|
|
22
|
+
private _captionText;
|
|
23
|
+
/**************** Lifecycle Methods ****************/
|
|
24
|
+
constructor();
|
|
25
|
+
connectedCallback(): void;
|
|
26
|
+
/******************** Functions ********************/
|
|
27
|
+
firstUpdated(): void;
|
|
28
|
+
_handleSlotChange(): void;
|
|
29
|
+
_normalizeTable(table: HTMLTableElement): void;
|
|
30
|
+
_addSortIcons(table: HTMLTableElement): void;
|
|
31
|
+
_updateSortIcons(table: HTMLTableElement): void;
|
|
32
|
+
_onSortClick(columnIndex: number, table: HTMLTableElement): void;
|
|
33
|
+
_sortTable(table: HTMLTableElement, columnIndex: number, direction: "asc" | "desc"): void;
|
|
34
|
+
_updateSortedColumnStyles(table: HTMLTableElement): void;
|
|
35
|
+
downloadFile(): void;
|
|
36
|
+
/****************** Event Handlers ******************/
|
|
37
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* `<nys-textarea>` is a form-enabled textarea with validation, accessibility support,
|
|
4
|
+
* and live error messages. Integrates with forms via ElementInternals.
|
|
5
|
+
*
|
|
6
|
+
* @slot description - Optional slot for custom description content below the label.
|
|
7
|
+
*
|
|
8
|
+
* @fires nys-input - Fired on input, detail: `{ id, value }`
|
|
9
|
+
* @fires nys-focus - Fired on focus.
|
|
10
|
+
* @fires nys-blur - Fired on blur.
|
|
11
|
+
* @fires nys-select - Fired on text selection, detail: `{ id, value }`
|
|
12
|
+
* @fires nys-selectionchange - Fired on selection change, detail: `{ id, value }`
|
|
13
|
+
*/
|
|
2
14
|
export declare class NysTextarea extends LitElement {
|
|
3
15
|
static styles: import("lit").CSSResult;
|
|
4
16
|
id: string;
|
|
@@ -11,38 +23,46 @@ export declare class NysTextarea extends LitElement {
|
|
|
11
23
|
readonly: boolean;
|
|
12
24
|
required: boolean;
|
|
13
25
|
optional: boolean;
|
|
14
|
-
|
|
26
|
+
tooltip: string;
|
|
15
27
|
inverted: boolean;
|
|
16
28
|
form: string | null;
|
|
17
29
|
maxlength: number | null;
|
|
18
|
-
|
|
19
|
-
width: (typeof NysTextarea.VALID_WIDTHS)[number];
|
|
30
|
+
width: "sm" | "md" | "lg" | "full";
|
|
20
31
|
rows: number;
|
|
21
|
-
|
|
22
|
-
private _resize;
|
|
23
|
-
get resize(): (typeof NysTextarea.VALID_RESIZE)[number];
|
|
24
|
-
set resize(value: string);
|
|
32
|
+
resize: "vertical" | "none";
|
|
25
33
|
showError: boolean;
|
|
26
34
|
errorMessage: string;
|
|
27
35
|
updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void>;
|
|
28
36
|
private _hasUserInteracted;
|
|
29
37
|
private _internals;
|
|
30
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Lifecycle methods
|
|
40
|
+
* --------------------------------------------------------------------------
|
|
41
|
+
*/
|
|
31
42
|
static formAssociated: boolean;
|
|
32
43
|
constructor();
|
|
33
44
|
connectedCallback(): void;
|
|
34
45
|
disconnectedCallback(): void;
|
|
35
46
|
firstUpdated(): void;
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Form Integration
|
|
49
|
+
* --------------------------------------------------------------------------
|
|
50
|
+
*/
|
|
38
51
|
private _setValue;
|
|
39
52
|
private _manageRequire;
|
|
40
53
|
private _setValidityMessage;
|
|
41
54
|
private _validate;
|
|
42
|
-
|
|
55
|
+
formResetCallback(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Functions
|
|
58
|
+
* --------------------------------------------------------------------------
|
|
59
|
+
*/
|
|
43
60
|
checkValidity(): boolean;
|
|
44
61
|
private _handleInvalid;
|
|
45
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Event Handlers
|
|
64
|
+
* --------------------------------------------------------------------------
|
|
65
|
+
*/
|
|
46
66
|
private _handleInput;
|
|
47
67
|
private _handleFocus;
|
|
48
68
|
private _handleBlur;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* `<nys-textinput>` is a form-enabled text input with validation, optional
|
|
4
|
+
* masking, password toggle, accessibility support, and live error messages.
|
|
5
|
+
* Works with forms via ElementInternals.
|
|
6
|
+
*
|
|
7
|
+
* @slot description - Optional custom description content below the label.
|
|
8
|
+
* @slot startButton - Slot for a single <nys-button> at the start of the input.
|
|
9
|
+
* @slot endButton - Slot for a single <nys-button> at the end of the input.
|
|
10
|
+
*
|
|
11
|
+
* @fires nys-input - Fired on input change. Detail: `{ id, value }`.
|
|
12
|
+
* @fires nys-focus - Fired when input receives focus.
|
|
13
|
+
* @fires nys-blur - Fired when input loses focus.
|
|
14
|
+
*/
|
|
2
15
|
export declare class NysTextinput extends LitElement {
|
|
3
16
|
static styles: import("lit").CSSResult;
|
|
4
17
|
id: string;
|
|
5
18
|
name: string;
|
|
6
|
-
|
|
7
|
-
private _type;
|
|
8
|
-
get type(): (typeof NysTextinput.VALID_TYPES)[number];
|
|
9
|
-
set type(value: string);
|
|
19
|
+
type: "email" | "number" | "password" | "search" | "tel" | "text" | "url";
|
|
10
20
|
label: string;
|
|
11
21
|
description: string;
|
|
12
22
|
placeholder: string;
|
|
@@ -15,12 +25,11 @@ export declare class NysTextinput extends LitElement {
|
|
|
15
25
|
readonly: boolean;
|
|
16
26
|
required: boolean;
|
|
17
27
|
optional: boolean;
|
|
18
|
-
|
|
28
|
+
tooltip: string;
|
|
19
29
|
form: string | null;
|
|
20
30
|
pattern: string;
|
|
21
31
|
maxlength: number | null;
|
|
22
|
-
|
|
23
|
-
width: (typeof NysTextinput.VALID_WIDTHS)[number];
|
|
32
|
+
width: "sm" | "md" | "lg" | "full";
|
|
24
33
|
step: number | null;
|
|
25
34
|
min: number | null;
|
|
26
35
|
max: number | null;
|
|
@@ -32,26 +41,38 @@ export declare class NysTextinput extends LitElement {
|
|
|
32
41
|
private _hasUserInteracted;
|
|
33
42
|
private _internals;
|
|
34
43
|
private _maskPatterns;
|
|
35
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Lifecycle methods
|
|
46
|
+
* --------------------------------------------------------------------------
|
|
47
|
+
*/
|
|
36
48
|
static formAssociated: boolean;
|
|
37
49
|
constructor();
|
|
38
50
|
connectedCallback(): void;
|
|
39
51
|
disconnectedCallback(): void;
|
|
40
52
|
firstUpdated(): void;
|
|
41
53
|
updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void>;
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Form Integration
|
|
56
|
+
* --------------------------------------------------------------------------
|
|
57
|
+
*/
|
|
44
58
|
private _setValue;
|
|
45
59
|
private _manageRequire;
|
|
46
60
|
private _setValidityMessage;
|
|
47
61
|
private _validate;
|
|
48
|
-
|
|
62
|
+
formResetCallback(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Functions
|
|
65
|
+
* --------------------------------------------------------------------------
|
|
66
|
+
*/
|
|
49
67
|
checkValidity(): boolean;
|
|
50
68
|
private _handleInvalid;
|
|
51
69
|
private _togglePasswordVisibility;
|
|
52
70
|
private _updateOverlay;
|
|
53
71
|
private _applyMask;
|
|
54
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Event Handlers
|
|
74
|
+
* --------------------------------------------------------------------------
|
|
75
|
+
*/
|
|
55
76
|
private _handleInput;
|
|
56
77
|
private _handleFocus;
|
|
57
78
|
private _handleBlur;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* `<nys-toggle>` is a form-associated toggle switch with label, description,
|
|
4
|
+
* size variants, inverted styles, and optional icons. Supports keyboard
|
|
5
|
+
* interaction and integrates with forms via ElementInternals.
|
|
6
|
+
*
|
|
7
|
+
* @slot description - Optional slot to provide additional description below the label.
|
|
8
|
+
*
|
|
9
|
+
* @fires nys-change - Fired when toggle changes state. Detail: `{ id, checked }`.
|
|
10
|
+
* @fires nys-focus - Fired when toggle receives focus.
|
|
11
|
+
* @fires nys-blur - Fired when toggle loses focus.
|
|
12
|
+
*/
|
|
2
13
|
export declare class NysToggle extends LitElement {
|
|
3
14
|
static styles: import("lit").CSSResult;
|
|
4
15
|
id: string;
|
|
@@ -11,18 +22,24 @@ export declare class NysToggle extends LitElement {
|
|
|
11
22
|
disabled: boolean;
|
|
12
23
|
noIcon: boolean;
|
|
13
24
|
inverted: boolean;
|
|
14
|
-
|
|
15
|
-
private _size;
|
|
16
|
-
get size(): (typeof NysToggle.VALID_SIZES)[number];
|
|
17
|
-
set size(value: string);
|
|
25
|
+
size: "sm" | "md";
|
|
18
26
|
private _internals;
|
|
19
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Lifecycle methods
|
|
29
|
+
* --------------------------------------------------------------------------
|
|
30
|
+
*/
|
|
20
31
|
static formAssociated: boolean;
|
|
21
32
|
constructor();
|
|
22
33
|
connectedCallback(): void;
|
|
23
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Form Integration
|
|
36
|
+
* --------------------------------------------------------------------------
|
|
37
|
+
*/
|
|
24
38
|
updated(changedProperties: Map<string, any>): void;
|
|
25
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Event Handlers
|
|
41
|
+
* --------------------------------------------------------------------------
|
|
42
|
+
*/
|
|
26
43
|
private _emitChangeEvent;
|
|
27
44
|
private _handleFocus;
|
|
28
45
|
private _handleBlur;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,37 +1,77 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* `<nys-tooltip>` is a custom tooltip component for NYS design system elements.
|
|
4
|
+
* It supports dynamic positioning, screen-reader accessibility, keyboard interaction,
|
|
5
|
+
* and viewport overflow handling.
|
|
6
|
+
*
|
|
7
|
+
* The tooltip automatically positions itself relative to a target element specified
|
|
8
|
+
* via the `for` attribute, but can also respect a user-defined position.
|
|
9
|
+
*
|
|
10
|
+
* @fires nys-focus - Dispatched when the reference element receives focus (via keyboard or programmatically).
|
|
11
|
+
* @fires nys-blur - Dispatched when the reference element loses focus or mouse leaves the tooltip.
|
|
12
|
+
*
|
|
13
|
+
* Notes:
|
|
14
|
+
* - Tooltip visibility is automatically managed on hover/focus of the reference element.
|
|
15
|
+
* - The component adjusts position dynamically to prevent overflow off-screen.
|
|
16
|
+
* - Supports keyboard dismissal with the Escape key.
|
|
17
|
+
*/
|
|
2
18
|
export declare class NysTooltip extends LitElement {
|
|
3
19
|
static styles: import("lit").CSSResult;
|
|
4
20
|
id: string;
|
|
5
21
|
text: string;
|
|
6
22
|
inverted: boolean;
|
|
7
|
-
|
|
23
|
+
for: string;
|
|
8
24
|
private _active;
|
|
9
25
|
private _userHasSetPosition;
|
|
10
26
|
private _originalUserPosition;
|
|
11
27
|
private _internallyUpdatingPosition;
|
|
12
|
-
|
|
28
|
+
private _hideTimeout;
|
|
13
29
|
private _position;
|
|
14
30
|
get position(): "right" | "top" | "bottom" | "left" | null;
|
|
15
31
|
set position(value: "right" | "top" | "bottom" | "left" | null);
|
|
16
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Lifecycle Methods
|
|
34
|
+
* --------------------------------------------------------------------------
|
|
35
|
+
*/
|
|
17
36
|
constructor();
|
|
18
37
|
connectedCallback(): void;
|
|
19
38
|
disconnectedCallback(): void;
|
|
20
|
-
|
|
21
|
-
firstUpdated(): void;
|
|
39
|
+
firstUpdated(): Promise<void>;
|
|
22
40
|
updated(changedProps: Map<string, unknown>): void;
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Event Handlers
|
|
43
|
+
* --------------------------------------------------------------------------
|
|
44
|
+
*/
|
|
45
|
+
private _showTooltip;
|
|
25
46
|
private _handleBlurOrMouseLeave;
|
|
47
|
+
private _triggerFadeOut;
|
|
48
|
+
private _cancelFadeOut;
|
|
26
49
|
private _addScrollListeners;
|
|
27
50
|
private _removeScrollListeners;
|
|
28
51
|
private _handleScrollOrResize;
|
|
29
52
|
private _handleEscapeKey;
|
|
30
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Functions
|
|
55
|
+
* --------------------------------------------------------------------------
|
|
56
|
+
*/
|
|
57
|
+
private _getReferenceElement;
|
|
31
58
|
private _passAria;
|
|
59
|
+
/**
|
|
60
|
+
* In React, the reference element found is often the native HTML element within the nys-component.
|
|
61
|
+
* Therefore, this function accounts for the closest NYS component ancestor that supports a tooltip prop.
|
|
62
|
+
*/
|
|
63
|
+
private _applyTooltipPropToFormComponent;
|
|
32
64
|
private _applyFocusBehavior;
|
|
65
|
+
/**
|
|
66
|
+
* Checks if the tooltip fits inside the viewport on the given side of the trigger.
|
|
67
|
+
* Used for auto-positioning. Ignores text overflow for now.
|
|
68
|
+
*/
|
|
33
69
|
private _doesPositionFit;
|
|
34
|
-
private
|
|
70
|
+
private _userPositionTooltip;
|
|
71
|
+
private _autoPositionTooltip;
|
|
72
|
+
private _positionStartingBase;
|
|
73
|
+
private _positionTooltipElement;
|
|
74
|
+
private applyInverseTransform;
|
|
35
75
|
private _setInternalPosition;
|
|
36
76
|
private _shiftTooltipIntoViewport;
|
|
37
77
|
private _resetTooltipPositioningStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* `<nys-unavfooter>` is a footer component for New York State websites.
|
|
4
|
+
* It displays the official NYS logo linking to ny.gov and a set of primary navigation links.
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Renders the NYS logo as an inline SVG linking to https://www.ny.gov
|
|
8
|
+
* - Provides key navigation links
|
|
9
|
+
*/
|
|
2
10
|
export declare class NysUnavFooter extends LitElement {
|
|
3
11
|
static styles: import("lit").CSSResult;
|
|
4
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Functions
|
|
14
|
+
* --------------------------------------------------------------------------
|
|
15
|
+
*/
|
|
5
16
|
private _getNysLogo;
|
|
6
17
|
render(): import("lit-html").TemplateResult<1>;
|
|
7
18
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* `<nys-unavheader>` is a universal header for New York State websites.
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Trust bar indicating official NYS site status, with expandable details
|
|
7
|
+
* - NYS logo linking to the homepage
|
|
8
|
+
* - Search bar with dropdown behavior for mobile and desktop
|
|
9
|
+
* - Language translation dropdown supporting multiple languages
|
|
10
|
+
* - Accessible interactions with ARIA attributes and keyboard handling
|
|
11
|
+
*/
|
|
2
12
|
export declare class NysUnavHeader extends LitElement {
|
|
3
13
|
static styles: import("lit").CSSResult;
|
|
4
14
|
trustbarVisible: boolean;
|
|
@@ -8,6 +18,16 @@ export declare class NysUnavHeader extends LitElement {
|
|
|
8
18
|
hideTranslate: boolean;
|
|
9
19
|
hideSearch: boolean;
|
|
10
20
|
private languages;
|
|
21
|
+
/**
|
|
22
|
+
* Lifecycle Methods
|
|
23
|
+
* --------------------------------------------------------------------------
|
|
24
|
+
*/
|
|
25
|
+
connectedCallback(): void;
|
|
26
|
+
disconnectedCallback(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Functions
|
|
29
|
+
* --------------------------------------------------------------------------
|
|
30
|
+
*/
|
|
11
31
|
private _getNysLogo;
|
|
12
32
|
private _toggleTrustbar;
|
|
13
33
|
private _toggleLanguageList;
|
|
@@ -17,7 +37,5 @@ export declare class NysUnavHeader extends LitElement {
|
|
|
17
37
|
private _handleSearchKeyup;
|
|
18
38
|
private _handleSearchButton;
|
|
19
39
|
private _handleSearch;
|
|
20
|
-
connectedCallback(): void;
|
|
21
|
-
disconnectedCallback(): void;
|
|
22
40
|
render(): import("lit-html").TemplateResult<1>;
|
|
23
41
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from "../packages/nys-backtotop/src/index";
|
|
|
5
5
|
export * from "../packages/nys-button/src/index";
|
|
6
6
|
export * from "../packages/nys-badge/src/index";
|
|
7
7
|
export * from "../packages/nys-checkbox/src/index";
|
|
8
|
+
export * from "../packages/nys-datepicker/src/index";
|
|
8
9
|
export * from "../packages/nys-divider/src/index";
|
|
9
10
|
export * from "../packages/nys-errormessage/src/index";
|
|
10
11
|
export * from "../packages/nys-fileinput/src/index";
|
|
@@ -16,6 +17,7 @@ export * from "../packages/nys-radiobutton/src/index";
|
|
|
16
17
|
export * from "../packages/nys-select/src/index";
|
|
17
18
|
export * from "../packages/nys-skipnav/src/index";
|
|
18
19
|
export * from "../packages/nys-stepper/src/index";
|
|
20
|
+
export * from "../packages/nys-table/src/index";
|
|
19
21
|
export * from "../packages/nys-textarea/src/index";
|
|
20
22
|
export * from "../packages/nys-textinput/src/index";
|
|
21
23
|
export * from "../packages/nys-toggle/src/index";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "New York State's design system and code component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"dev": "vite",
|
|
25
25
|
"gen": "plop",
|
|
26
|
-
"build": "
|
|
26
|
+
"build": "tsc --emitDeclarationOnly && vite build",
|
|
27
27
|
"build:umd": "tsc --emitDeclarationOnly && vite build --config vite.config.umd.js",
|
|
28
|
-
"build:packages": "
|
|
29
|
-
"build:all": "npm run clean:dist && NODE_ENV=production npm run build:packages && NODE_ENV=production npm run build && NODE_ENV=production npm run build:umd && npm run cem",
|
|
28
|
+
"build:packages": "node src/scripts/build-order.js",
|
|
29
|
+
"build:all": "npm run clean:dist && npm run lit-analyze && npm run lint && NODE_ENV=production npm run build:packages && NODE_ENV=production npm run build && NODE_ENV=production npm run build:umd && npm run cem",
|
|
30
30
|
"build:link": "npm run build:all && npm link",
|
|
31
|
-
"lint": "eslint
|
|
32
|
-
"lint:fix": "eslint
|
|
31
|
+
"lint": "eslint",
|
|
32
|
+
"lint:fix": "eslint --fix",
|
|
33
33
|
"lit-analyze": "lit-analyzer $(find ./packages -name '*.ts' ! -name '*.figma.*')",
|
|
34
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
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",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"storybook:build:all": "NODE_ENV=production npm run build:all && npm run storybook",
|
|
41
41
|
"build-storybook": "npm run build:packages && storybook build",
|
|
42
42
|
"storybook:cibuild": "storybook build",
|
|
43
|
-
"clean:node": "rm -rf node_modules && rm -rf packages/*/node_modules",
|
|
44
|
-
"clean:dist": "rm -rf dist && rm -rf packages/*/dist",
|
|
43
|
+
"clean:node": "rm -rf node_modules && rm -rf packages/*/node_modules && rm -rf packages/**/*/node_modules",
|
|
44
|
+
"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
45
|
"clean:all": "npm run clean:dist && npm run clean:node",
|
|
46
46
|
"code-connect": "dotenv -- npx figma connect publish",
|
|
47
47
|
"cem": "npx cem analyze --config 'custom-elements-manifest.config.mjs'"
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
},
|
|
58
58
|
"homepage": "https://designsystem.ny.gov/",
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@chromatic-com/storybook": "^
|
|
60
|
+
"@chromatic-com/storybook": "^5.0.0",
|
|
61
61
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
62
62
|
"@figma/code-connect": "^1.3.7",
|
|
63
63
|
"@floating-ui/dom": "^1.7.4",
|
|
64
64
|
"@open-wc/testing": "^4.0.0",
|
|
65
|
-
"@storybook/addon-a11y": "10.0
|
|
66
|
-
"@storybook/addon-docs": "10.0
|
|
67
|
-
"@storybook/addon-links": "10.0
|
|
68
|
-
"@storybook/web-components-vite": "10.0
|
|
65
|
+
"@storybook/addon-a11y": "10.2.0",
|
|
66
|
+
"@storybook/addon-docs": "10.2.0",
|
|
67
|
+
"@storybook/addon-links": "10.2.0",
|
|
68
|
+
"@storybook/web-components-vite": "10.2.0",
|
|
69
69
|
"@types/mocha": "^10.0.10",
|
|
70
70
|
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
|
71
71
|
"@typescript-eslint/parser": "^8.46.2",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"eslint": "^9.38.0",
|
|
81
81
|
"eslint-plugin-lit": "^2.1.1",
|
|
82
82
|
"eslint-plugin-prettier": "^5.5.4",
|
|
83
|
-
"eslint-plugin-storybook": "10.0
|
|
83
|
+
"eslint-plugin-storybook": "10.2.0",
|
|
84
84
|
"i": "^0.3.7",
|
|
85
85
|
"lit": "^3.3.1",
|
|
86
86
|
"lit-analyzer": "^2.0.3",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
91
91
|
"sass": "^1.94.0",
|
|
92
92
|
"sinon": "^21.0.0",
|
|
93
|
-
"storybook": "10.0
|
|
93
|
+
"storybook": "10.2.0",
|
|
94
94
|
"tslib": "^2.8.1",
|
|
95
95
|
"typescript": "^5.9.3",
|
|
96
96
|
"vite": "^7.2.2"
|
|
@@ -103,5 +103,8 @@
|
|
|
103
103
|
"overrides": {
|
|
104
104
|
"storybook": "$storybook"
|
|
105
105
|
},
|
|
106
|
-
"customElements": "dist/custom-elements.json"
|
|
106
|
+
"customElements": "dist/custom-elements.json",
|
|
107
|
+
"dependencies": {
|
|
108
|
+
"wc-datepicker": "^0.9.2"
|
|
109
|
+
}
|
|
107
110
|
}
|