@nysds/components 1.14.0 → 1.15.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/custom-elements.json +1709 -311
- package/dist/.vscode/vscode.html-custom-data.json +62 -6
- package/dist/custom-elements.json +1709 -311
- package/dist/nysds.es.js +2774 -1894
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +335 -112
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-button/src/nys-button.d.ts +8 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +10 -0
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +8 -0
- package/dist/packages/nys-combobox/src/index.d.ts +1 -0
- package/dist/packages/nys-combobox/src/nys-combobox.d.ts +118 -0
- package/dist/packages/nys-combobox/src/nys-combobox.figma.d.ts +1 -0
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +9 -0
- package/dist/packages/nys-dropdownmenu/src/index.d.ts +2 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +110 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.figma.d.ts +1 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +40 -0
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +8 -0
- package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +8 -0
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +10 -0
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +8 -0
- package/dist/packages/nys-select/src/nys-select.d.ts +8 -0
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +8 -0
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +8 -1
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +10 -1
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +10 -1
- package/dist/src/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/nys-stepper/newsletter.html +0 -4
- package/dist/nys-stepper/personal.html +0 -6
- package/dist/nys-stepper/survey.html +0 -5
- package/dist/nys-stepper/team.html +0 -6
|
@@ -59,6 +59,14 @@ import { LitElement } from "lit";
|
|
|
59
59
|
*/
|
|
60
60
|
export declare class NysButton extends LitElement {
|
|
61
61
|
static styles: import("lit").CSSResult;
|
|
62
|
+
static shadowRootOptions: {
|
|
63
|
+
delegatesFocus: boolean;
|
|
64
|
+
clonable?: boolean;
|
|
65
|
+
customElementRegistry?: CustomElementRegistry;
|
|
66
|
+
mode: ShadowRootMode;
|
|
67
|
+
serializable?: boolean;
|
|
68
|
+
slotAssignment?: SlotAssignmentMode;
|
|
69
|
+
};
|
|
62
70
|
/**
|
|
63
71
|
* Unique identifier. Auto-generated if not provided.
|
|
64
72
|
*/
|
|
@@ -15,6 +15,7 @@ import "./nys-checkboxgroup";
|
|
|
15
15
|
* @fires nys-change - Fired when checked state changes. Detail: `{id, checked, name, value}`.
|
|
16
16
|
* @fires nys-focus - Fired when checkbox gains focus.
|
|
17
17
|
* @fires nys-blur - Fired when checkbox loses focus.
|
|
18
|
+
* @fires nys-other-input - Fired when "other" text input value changes. Detail: `{id, name, value}`.
|
|
18
19
|
*
|
|
19
20
|
* @example Single checkbox
|
|
20
21
|
* ```html
|
|
@@ -31,6 +32,14 @@ import "./nys-checkboxgroup";
|
|
|
31
32
|
*/
|
|
32
33
|
export declare class NysCheckbox extends LitElement {
|
|
33
34
|
static styles: import("lit").CSSResult;
|
|
35
|
+
static shadowRootOptions: {
|
|
36
|
+
delegatesFocus: boolean;
|
|
37
|
+
clonable?: boolean;
|
|
38
|
+
customElementRegistry?: CustomElementRegistry;
|
|
39
|
+
mode: ShadowRootMode;
|
|
40
|
+
serializable?: boolean;
|
|
41
|
+
slotAssignment?: SlotAssignmentMode;
|
|
42
|
+
};
|
|
34
43
|
/** Whether checkbox is checked. */
|
|
35
44
|
checked: boolean;
|
|
36
45
|
/** Prevents interaction. */
|
|
@@ -104,6 +113,7 @@ export declare class NysCheckbox extends LitElement {
|
|
|
104
113
|
* --------------------------------------------------------------------------
|
|
105
114
|
*/
|
|
106
115
|
private _emitChangeEvent;
|
|
116
|
+
private _emitOtherInputEvent;
|
|
107
117
|
private _handleChange;
|
|
108
118
|
private _handleFocus;
|
|
109
119
|
private _handleBlur;
|
|
@@ -22,6 +22,14 @@ import { LitElement } from "lit";
|
|
|
22
22
|
*/
|
|
23
23
|
export declare class NysCheckboxgroup extends LitElement {
|
|
24
24
|
static styles: import("lit").CSSResult;
|
|
25
|
+
static shadowRootOptions: {
|
|
26
|
+
delegatesFocus: boolean;
|
|
27
|
+
clonable?: boolean;
|
|
28
|
+
customElementRegistry?: CustomElementRegistry;
|
|
29
|
+
mode: ShadowRootMode;
|
|
30
|
+
serializable?: boolean;
|
|
31
|
+
slotAssignment?: SlotAssignmentMode;
|
|
32
|
+
};
|
|
25
33
|
/** Unique identifier. Auto-generated if not provided. */
|
|
26
34
|
id: string;
|
|
27
35
|
/** Name for form submission. Set on group, not individual checkboxes. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./nys-combobox";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* `<nys-combobox>` is a form-enabled combo box combining text input with a filterable dropdown.
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Type to filter options
|
|
7
|
+
* - Keyboard navigation (Arrow keys, Enter, Escape)
|
|
8
|
+
* - Mouse and keyboard interaction
|
|
9
|
+
* - Clears non-selected text on blur
|
|
10
|
+
* - Clear button when value is selected
|
|
11
|
+
* - Integrates with forms via ElementInternals
|
|
12
|
+
* - Supports native <option> and <optgroup> elements
|
|
13
|
+
* - Accessible per W3C ARIA Authoring Practices
|
|
14
|
+
*
|
|
15
|
+
* @slot description - Optional custom description content below the label.
|
|
16
|
+
* @slot default - Options (<option>, <optgroup>) to populate the dropdown
|
|
17
|
+
*
|
|
18
|
+
* @fires nys-change - Fired when selection changes. Detail: `{ id, value }`.
|
|
19
|
+
* @fires nys-input - Fired on input change. Detail: `{ id, value }`.
|
|
20
|
+
* @fires nys-focus - Fired when combobox receives focus.
|
|
21
|
+
* @fires nys-blur - Fired when combobox loses focus.
|
|
22
|
+
*/
|
|
23
|
+
export declare class NysCombobox extends LitElement {
|
|
24
|
+
static styles: import("lit").CSSResult;
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
label: string;
|
|
28
|
+
description: string;
|
|
29
|
+
value: string;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
required: boolean;
|
|
32
|
+
optional: boolean;
|
|
33
|
+
tooltip: string;
|
|
34
|
+
form: string | null;
|
|
35
|
+
width: "md" | "lg" | "full";
|
|
36
|
+
inverted: boolean;
|
|
37
|
+
showError: boolean;
|
|
38
|
+
errorMessage: string;
|
|
39
|
+
private _isOpen;
|
|
40
|
+
private _filterText;
|
|
41
|
+
private _highlightedIndex;
|
|
42
|
+
private _options;
|
|
43
|
+
private _filteredOptions;
|
|
44
|
+
private _dropdownAbove;
|
|
45
|
+
private _announcement;
|
|
46
|
+
private _input;
|
|
47
|
+
private _listbox?;
|
|
48
|
+
private _originalErrorMessage;
|
|
49
|
+
private _hasUserInteracted;
|
|
50
|
+
private _internals;
|
|
51
|
+
private _selectedLabel;
|
|
52
|
+
private _defaultValue;
|
|
53
|
+
/**
|
|
54
|
+
* Lifecycle methods
|
|
55
|
+
* --------------------------------------------------------------------------
|
|
56
|
+
*/
|
|
57
|
+
static formAssociated: boolean;
|
|
58
|
+
constructor();
|
|
59
|
+
connectedCallback(): void;
|
|
60
|
+
disconnectedCallback(): void;
|
|
61
|
+
firstUpdated(): void;
|
|
62
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
63
|
+
/**
|
|
64
|
+
* Slot handling
|
|
65
|
+
* --------------------------------------------------------------------------
|
|
66
|
+
*/
|
|
67
|
+
private _handleSlotChange;
|
|
68
|
+
/**
|
|
69
|
+
* Form Integration
|
|
70
|
+
* --------------------------------------------------------------------------
|
|
71
|
+
*/
|
|
72
|
+
private _setValue;
|
|
73
|
+
private _manageRequire;
|
|
74
|
+
private _setValidityMessage;
|
|
75
|
+
private _validate;
|
|
76
|
+
formResetCallback(): void;
|
|
77
|
+
checkValidity(): boolean;
|
|
78
|
+
private _handleInvalid;
|
|
79
|
+
/**
|
|
80
|
+
* Dropdown positioning
|
|
81
|
+
* --------------------------------------------------------------------------
|
|
82
|
+
*/
|
|
83
|
+
private _positionDropdown;
|
|
84
|
+
/**
|
|
85
|
+
* Filtering
|
|
86
|
+
* --------------------------------------------------------------------------
|
|
87
|
+
*/
|
|
88
|
+
private _filterOptions;
|
|
89
|
+
/**
|
|
90
|
+
* Keyboard navigation
|
|
91
|
+
* --------------------------------------------------------------------------
|
|
92
|
+
*/
|
|
93
|
+
private _scrollToHighlighted;
|
|
94
|
+
private _handleKeyDown;
|
|
95
|
+
private _moveHighlight;
|
|
96
|
+
/**
|
|
97
|
+
* Event Handlers
|
|
98
|
+
* --------------------------------------------------------------------------
|
|
99
|
+
*/
|
|
100
|
+
private _handleInput;
|
|
101
|
+
private _handleFocus;
|
|
102
|
+
private _handleBlur;
|
|
103
|
+
private _handleDocumentClick;
|
|
104
|
+
private _handleIconClick;
|
|
105
|
+
private _handleClearClick;
|
|
106
|
+
private _handleOptionClick;
|
|
107
|
+
private _handleOptionMouseEnter;
|
|
108
|
+
private _selectOption;
|
|
109
|
+
private _handleChange;
|
|
110
|
+
private _openDropdown;
|
|
111
|
+
private _closeDropdown;
|
|
112
|
+
/**
|
|
113
|
+
* Render helpers
|
|
114
|
+
* --------------------------------------------------------------------------
|
|
115
|
+
*/
|
|
116
|
+
private _renderOptions;
|
|
117
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
118
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -44,6 +44,14 @@ import { LitElement } from "lit";
|
|
|
44
44
|
*/
|
|
45
45
|
export declare class NysDatepicker extends LitElement {
|
|
46
46
|
static styles: import("lit").CSSResult;
|
|
47
|
+
static shadowRootOptions: {
|
|
48
|
+
delegatesFocus: boolean;
|
|
49
|
+
clonable?: boolean;
|
|
50
|
+
customElementRegistry?: CustomElementRegistry;
|
|
51
|
+
mode: ShadowRootMode;
|
|
52
|
+
serializable?: boolean;
|
|
53
|
+
slotAssignment?: SlotAssignmentMode;
|
|
54
|
+
};
|
|
47
55
|
/** Unique identifier. Auto-generated if not provided. */
|
|
48
56
|
id: string;
|
|
49
57
|
/** Name for form submission. */
|
|
@@ -140,6 +148,7 @@ export declare class NysDatepicker extends LitElement {
|
|
|
140
148
|
private _parseLocalDate;
|
|
141
149
|
private _setTodayDate;
|
|
142
150
|
private _setFocusOnTodayDate;
|
|
151
|
+
private _dispatchInputEvent;
|
|
143
152
|
/**
|
|
144
153
|
* Event Handlers
|
|
145
154
|
* --------------------------------------------------------------------------
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./nys-dropdownmenuitem";
|
|
3
|
+
/**
|
|
4
|
+
* Dropdown menus enable users to select an action from a list of options.
|
|
5
|
+
* They’re commonly used to save space by grouping related actions, or to provide actions in a confined space.
|
|
6
|
+
*
|
|
7
|
+
* @summary Action menu with auto-positioning, keyboard support, and screen reader integration.
|
|
8
|
+
* @element nys-dropdownmenu
|
|
9
|
+
*
|
|
10
|
+
* @example Basic dropdown
|
|
11
|
+
* ```html
|
|
12
|
+
* <button id="my-trigger">Actions</button>
|
|
13
|
+
* <nys-dropdownmenu for="my-trigger">
|
|
14
|
+
* <nys-dropdownmenuitem label="Edit" link="/edit"></nys-dropdownmenuitem>
|
|
15
|
+
* <nys-dropdownmenuitem label="Delete" link="/delete"></nys-dropdownmenuitem>
|
|
16
|
+
* </nys-dropdownmenu>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example Positioned dropdown
|
|
20
|
+
* ```html
|
|
21
|
+
* <button id="settings-btn">Settings</button>
|
|
22
|
+
* <nys-dropdownmenu for="settings-btn" position="top-start">
|
|
23
|
+
* <nys-dropdownmenuitem label="Profile" link="/profile"></nys-dropdownmenuitem>
|
|
24
|
+
* <nys-dropdownmenuitem label="Logout" link="/logout"></nys-dropdownmenuitem>
|
|
25
|
+
* </nys-dropdownmenu>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
type Position = "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
29
|
+
export declare class NysDropdownMenu extends LitElement {
|
|
30
|
+
static styles: import("lit").CSSResult;
|
|
31
|
+
for: string;
|
|
32
|
+
showDropdown: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Preferred position relative to trigger.
|
|
35
|
+
* @default "bottom-start"
|
|
36
|
+
*/
|
|
37
|
+
position: Position | null;
|
|
38
|
+
private _trigger;
|
|
39
|
+
private _menuElement;
|
|
40
|
+
private _ariaTarget;
|
|
41
|
+
private readonly GAP;
|
|
42
|
+
/**
|
|
43
|
+
* Lifecycle Methods
|
|
44
|
+
* --------------------------------------------------------------------------
|
|
45
|
+
*/
|
|
46
|
+
constructor();
|
|
47
|
+
connectedCallback(): void;
|
|
48
|
+
disconnectedCallback(): void;
|
|
49
|
+
firstUpdated(): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Functions
|
|
52
|
+
* --------------------------------------------------------------------------
|
|
53
|
+
*/
|
|
54
|
+
private _findTrigger;
|
|
55
|
+
private _connectTrigger;
|
|
56
|
+
private _toggleDropdown;
|
|
57
|
+
private _closeDropdown;
|
|
58
|
+
private _getMenuItems;
|
|
59
|
+
private _handleDocumentClick;
|
|
60
|
+
private _focusOnFirstItem;
|
|
61
|
+
private applyInverseTransform;
|
|
62
|
+
/**
|
|
63
|
+
* Position Logic
|
|
64
|
+
* --------------------------------------------------------------------------
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
67
|
+
* The controller function for positioning the dropdown menu.
|
|
68
|
+
* The logic diverts to if user sets position or we auto position the dropdown menu
|
|
69
|
+
*/
|
|
70
|
+
private _positionMenu;
|
|
71
|
+
private _setUserPosition;
|
|
72
|
+
/**
|
|
73
|
+
* Auto Positioning of the dropdown menu relies on the best surrounding space available
|
|
74
|
+
* to select the desirable position.
|
|
75
|
+
*/
|
|
76
|
+
private _autoPosition;
|
|
77
|
+
/**
|
|
78
|
+
* Checks if the dropdown menu fits inside the viewport on the given side of the trigger.
|
|
79
|
+
* Overrides user set position for auto-positioning if user's desire space is not available
|
|
80
|
+
*/
|
|
81
|
+
private _checkSpaceAvailable;
|
|
82
|
+
private _checkPositionFits;
|
|
83
|
+
/**
|
|
84
|
+
* This position is called for when user's set position didn't fit OR auto positioning when default position doesn't fit
|
|
85
|
+
* We look for the best alternative positions in order of preference base on the set position (e.g. bottom-start => bottom-end).
|
|
86
|
+
* @param userPosition
|
|
87
|
+
* @param space
|
|
88
|
+
* @param menuRect
|
|
89
|
+
*/
|
|
90
|
+
private _findBestAlternative;
|
|
91
|
+
private _findMostAvailableSpace;
|
|
92
|
+
/**
|
|
93
|
+
* A valid ideal position has been chosen.
|
|
94
|
+
* This function calculates the coordinate of the trigger to properly position the dropdown menu.
|
|
95
|
+
* @param position
|
|
96
|
+
* @returns
|
|
97
|
+
*/
|
|
98
|
+
private _calculateCoordinates;
|
|
99
|
+
private _applyPosition;
|
|
100
|
+
/**
|
|
101
|
+
* Event Handlers
|
|
102
|
+
* --------------------------------------------------------------------------
|
|
103
|
+
*/
|
|
104
|
+
private _handleTriggerKeydown;
|
|
105
|
+
private _handleMenuKeydown;
|
|
106
|
+
private _handleWindowResize;
|
|
107
|
+
private _handleWindowScroll;
|
|
108
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
109
|
+
}
|
|
110
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* **Slotted component.** Displays an individual dropdown item within `nys-dropdown` with label.
|
|
4
|
+
*
|
|
5
|
+
* The `nys-dropdownitem` is used as customizable item within the dropdown so users don't have to raw code <ul>, <li>, <a href>
|
|
6
|
+
* and have the benefit of default customization.
|
|
7
|
+
*
|
|
8
|
+
* @summary Dropdown item to display label and provide href link.
|
|
9
|
+
* @element nys-dropdownmenuitem
|
|
10
|
+
*
|
|
11
|
+
* @example Basic item
|
|
12
|
+
* ```html
|
|
13
|
+
* <nys-dropdownmenuitem label="Edit" link="/edit"></nys-dropdownmenuitem>
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @example Disabled item
|
|
17
|
+
* ```html
|
|
18
|
+
* <nys-dropdownmenuitem label="Delete" link="/delete" disabled></nys-dropdownmenuitem>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare class NysDropdownMenuItem extends LitElement {
|
|
22
|
+
static styles: import("lit").CSSResult;
|
|
23
|
+
static shadowRootOptions: {
|
|
24
|
+
delegatesFocus: boolean;
|
|
25
|
+
clonable?: boolean;
|
|
26
|
+
customElementRegistry?: CustomElementRegistry;
|
|
27
|
+
mode: ShadowRootMode;
|
|
28
|
+
serializable?: boolean;
|
|
29
|
+
slotAssignment?: SlotAssignmentMode;
|
|
30
|
+
};
|
|
31
|
+
label: string;
|
|
32
|
+
href: string;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
target: string;
|
|
35
|
+
prefixIcon: string;
|
|
36
|
+
divider: string;
|
|
37
|
+
connectedCallback(): void;
|
|
38
|
+
private _handleClick;
|
|
39
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
40
|
+
}
|
|
@@ -25,6 +25,14 @@ import "./nys-fileitem";
|
|
|
25
25
|
*/
|
|
26
26
|
export declare class NysFileinput extends LitElement {
|
|
27
27
|
static styles: import("lit").CSSResult;
|
|
28
|
+
static shadowRootOptions: {
|
|
29
|
+
delegatesFocus: boolean;
|
|
30
|
+
clonable?: boolean;
|
|
31
|
+
customElementRegistry?: CustomElementRegistry;
|
|
32
|
+
mode: ShadowRootMode;
|
|
33
|
+
serializable?: boolean;
|
|
34
|
+
slotAssignment?: SlotAssignmentMode;
|
|
35
|
+
};
|
|
28
36
|
/** Unique identifier. Auto-generated if not provided. */
|
|
29
37
|
id: string;
|
|
30
38
|
/** Name for form submission. */
|
|
@@ -12,6 +12,14 @@ import { LitElement } from "lit";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class NysFileItem extends LitElement {
|
|
14
14
|
static styles: import("lit").CSSResult;
|
|
15
|
+
static shadowRootOptions: {
|
|
16
|
+
delegatesFocus: boolean;
|
|
17
|
+
clonable?: boolean;
|
|
18
|
+
customElementRegistry?: CustomElementRegistry;
|
|
19
|
+
mode: ShadowRootMode;
|
|
20
|
+
serializable?: boolean;
|
|
21
|
+
slotAssignment?: SlotAssignmentMode;
|
|
22
|
+
};
|
|
15
23
|
/** Name of the file being displayed. */
|
|
16
24
|
filename: string;
|
|
17
25
|
/**
|
|
@@ -14,6 +14,7 @@ import "./nys-radiogroup";
|
|
|
14
14
|
* @fires nys-change - Fired when selection changes. Detail: `{id, checked, name, value}`.
|
|
15
15
|
* @fires nys-focus - Fired when radio gains focus.
|
|
16
16
|
* @fires nys-blur - Fired when radio loses focus.
|
|
17
|
+
* @fires nys-other-input - Fired when "other" text input value changes. Detail: `{id, name, value}`.
|
|
17
18
|
*
|
|
18
19
|
* @example Radio group
|
|
19
20
|
* ```html
|
|
@@ -25,6 +26,14 @@ import "./nys-radiogroup";
|
|
|
25
26
|
*/
|
|
26
27
|
export declare class NysRadiobutton extends LitElement {
|
|
27
28
|
static styles: import("lit").CSSResult;
|
|
29
|
+
static shadowRootOptions: {
|
|
30
|
+
delegatesFocus: boolean;
|
|
31
|
+
clonable?: boolean;
|
|
32
|
+
customElementRegistry?: CustomElementRegistry;
|
|
33
|
+
mode: ShadowRootMode;
|
|
34
|
+
serializable?: boolean;
|
|
35
|
+
slotAssignment?: SlotAssignmentMode;
|
|
36
|
+
};
|
|
28
37
|
/** Whether this radio is selected. Only one per group can be checked. */
|
|
29
38
|
checked: boolean;
|
|
30
39
|
/** Prevents interaction. */
|
|
@@ -77,6 +86,7 @@ export declare class NysRadiobutton extends LitElement {
|
|
|
77
86
|
* --------------------------------------------------------------------------
|
|
78
87
|
*/
|
|
79
88
|
private _emitChangeEvent;
|
|
89
|
+
private _emitOtherInputEvent;
|
|
80
90
|
private _handleChange;
|
|
81
91
|
private _handleFocus;
|
|
82
92
|
private _handleBlur;
|
|
@@ -23,6 +23,14 @@ import { LitElement } from "lit";
|
|
|
23
23
|
*/
|
|
24
24
|
export declare class NysRadiogroup extends LitElement {
|
|
25
25
|
static styles: import("lit").CSSResult;
|
|
26
|
+
static shadowRootOptions: {
|
|
27
|
+
delegatesFocus: boolean;
|
|
28
|
+
clonable?: boolean;
|
|
29
|
+
customElementRegistry?: CustomElementRegistry;
|
|
30
|
+
mode: ShadowRootMode;
|
|
31
|
+
serializable?: boolean;
|
|
32
|
+
slotAssignment?: SlotAssignmentMode;
|
|
33
|
+
};
|
|
26
34
|
/** Unique identifier. Auto-generated if not provided. */
|
|
27
35
|
id: string;
|
|
28
36
|
/** Name for form submission. Auto-populated from child radiobuttons. */
|
|
@@ -37,6 +37,14 @@ import { LitElement } from "lit";
|
|
|
37
37
|
*/
|
|
38
38
|
export declare class NysSelect extends LitElement {
|
|
39
39
|
static styles: import("lit").CSSResult;
|
|
40
|
+
static shadowRootOptions: {
|
|
41
|
+
delegatesFocus: boolean;
|
|
42
|
+
clonable?: boolean;
|
|
43
|
+
customElementRegistry?: CustomElementRegistry;
|
|
44
|
+
mode: ShadowRootMode;
|
|
45
|
+
serializable?: boolean;
|
|
46
|
+
slotAssignment?: SlotAssignmentMode;
|
|
47
|
+
};
|
|
40
48
|
/** Unique identifier. Auto-generated if not provided. */
|
|
41
49
|
id: string;
|
|
42
50
|
/** Name for form submission. */
|
|
@@ -28,6 +28,14 @@ import { LitElement } from "lit";
|
|
|
28
28
|
*/
|
|
29
29
|
export declare class NysTextarea extends LitElement {
|
|
30
30
|
static styles: import("lit").CSSResult;
|
|
31
|
+
static shadowRootOptions: {
|
|
32
|
+
delegatesFocus: boolean;
|
|
33
|
+
clonable?: boolean;
|
|
34
|
+
customElementRegistry?: CustomElementRegistry;
|
|
35
|
+
mode: ShadowRootMode;
|
|
36
|
+
serializable?: boolean;
|
|
37
|
+
slotAssignment?: SlotAssignmentMode;
|
|
38
|
+
};
|
|
31
39
|
/** Unique identifier. Auto-generated if not provided. */
|
|
32
40
|
id: string;
|
|
33
41
|
/** Name for form submission. */
|
|
@@ -41,6 +41,14 @@ import { LitElement } from "lit";
|
|
|
41
41
|
*/
|
|
42
42
|
export declare class NysTextinput extends LitElement {
|
|
43
43
|
static styles: import("lit").CSSResult;
|
|
44
|
+
static shadowRootOptions: {
|
|
45
|
+
delegatesFocus: boolean;
|
|
46
|
+
clonable?: boolean;
|
|
47
|
+
customElementRegistry?: CustomElementRegistry;
|
|
48
|
+
mode: ShadowRootMode;
|
|
49
|
+
serializable?: boolean;
|
|
50
|
+
slotAssignment?: SlotAssignmentMode;
|
|
51
|
+
};
|
|
44
52
|
/** Unique identifier. Auto-generated if not provided. */
|
|
45
53
|
id: string;
|
|
46
54
|
/** Name for form submission. */
|
|
@@ -108,7 +116,6 @@ export declare class NysTextinput extends LitElement {
|
|
|
108
116
|
disconnectedCallback(): void;
|
|
109
117
|
firstUpdated(): void;
|
|
110
118
|
updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void>;
|
|
111
|
-
focus(): void;
|
|
112
119
|
/**
|
|
113
120
|
* Form Integration
|
|
114
121
|
* --------------------------------------------------------------------------
|
|
@@ -26,6 +26,14 @@ import { LitElement } from "lit";
|
|
|
26
26
|
*/
|
|
27
27
|
export declare class NysToggle extends LitElement {
|
|
28
28
|
static styles: import("lit").CSSResult;
|
|
29
|
+
static shadowRootOptions: {
|
|
30
|
+
delegatesFocus: boolean;
|
|
31
|
+
clonable?: boolean;
|
|
32
|
+
customElementRegistry?: CustomElementRegistry;
|
|
33
|
+
mode: ShadowRootMode;
|
|
34
|
+
serializable?: boolean;
|
|
35
|
+
slotAssignment?: SlotAssignmentMode;
|
|
36
|
+
};
|
|
29
37
|
/** Unique identifier. Auto-generated if not provided. */
|
|
30
38
|
id: string;
|
|
31
39
|
/** Name for form submission. */
|
|
@@ -72,7 +80,8 @@ export declare class NysToggle extends LitElement {
|
|
|
72
80
|
private _emitChangeEvent;
|
|
73
81
|
private _handleFocus;
|
|
74
82
|
private _handleBlur;
|
|
75
|
-
private
|
|
83
|
+
private _handleClick;
|
|
84
|
+
private _handleSliderClick;
|
|
76
85
|
private _handleKeyDown;
|
|
77
86
|
render(): import("lit-html").TemplateResult<1>;
|
|
78
87
|
}
|
|
@@ -20,6 +20,11 @@ import { LitElement } from "lit";
|
|
|
20
20
|
* <nys-unavheader hideSearch></nys-unavheader>
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
+
interface Language {
|
|
24
|
+
code: string;
|
|
25
|
+
label: string;
|
|
26
|
+
url?: string;
|
|
27
|
+
}
|
|
23
28
|
export declare class NysUnavHeader extends LitElement {
|
|
24
29
|
static styles: import("lit").CSSResult;
|
|
25
30
|
/** Internal: Whether trust bar panel is expanded. */
|
|
@@ -34,8 +39,10 @@ export declare class NysUnavHeader extends LitElement {
|
|
|
34
39
|
hideTranslate: boolean;
|
|
35
40
|
/** Hides the search functionality. */
|
|
36
41
|
hideSearch: boolean;
|
|
42
|
+
/** The URL endpoint of the search, make sure to include the query param. */
|
|
37
43
|
searchUrl: string;
|
|
38
|
-
|
|
44
|
+
/** The list of languages this site can be translated to, default to use Smartling */
|
|
45
|
+
languages: Language[];
|
|
39
46
|
/**
|
|
40
47
|
* Lifecycle Methods
|
|
41
48
|
* --------------------------------------------------------------------------
|
|
@@ -50,6 +57,7 @@ export declare class NysUnavHeader extends LitElement {
|
|
|
50
57
|
private _toggleTrustbar;
|
|
51
58
|
private _toggleLanguageList;
|
|
52
59
|
private _toggleSearchDropdown;
|
|
60
|
+
private _handleLanguageSelect;
|
|
53
61
|
private _handleSearchFocus;
|
|
54
62
|
private _handleSearchBlur;
|
|
55
63
|
private _handleSearchKeyup;
|
|
@@ -57,3 +65,4 @@ export declare class NysUnavHeader extends LitElement {
|
|
|
57
65
|
private _handleSearch;
|
|
58
66
|
render(): import("lit-html").TemplateResult<1>;
|
|
59
67
|
}
|
|
68
|
+
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,8 +5,10 @@ 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-combobox/src/index";
|
|
8
9
|
export * from "../packages/nys-datepicker/src/index";
|
|
9
10
|
export * from "../packages/nys-divider/src/index";
|
|
11
|
+
export * from "../packages/nys-dropdownmenu/src/index";
|
|
10
12
|
export * from "../packages/nys-errormessage/src/index";
|
|
11
13
|
export * from "../packages/nys-fileinput/src/index";
|
|
12
14
|
export * from "../packages/nys-icon/src/index";
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<div style="padding: 2rem;">
|
|
2
|
-
<h2>Personal Details</h2>
|
|
3
|
-
<p>This is the form to enter your personal information. Fill in your name, address, and contact details here.</p>
|
|
4
|
-
<nys-textinput label="Name" required width="md"></nys-textinput>
|
|
5
|
-
<nys-textinput label="Agency Email" required width="md"></nys-textinput>
|
|
6
|
-
</div>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<div style="padding: 2rem;">
|
|
2
|
-
<h2>Team Information</h2>
|
|
3
|
-
<p>Provide details about your team. Who are you working with? What is your role?</p>
|
|
4
|
-
<nys-textinput label="Agency Name" required width="md"></nys-textinput>
|
|
5
|
-
<nys-textinput label="Team Name" required width="md"></nys-textinput>
|
|
6
|
-
</div>
|