@nysds/components 1.21.1-alpha-1 → 1.22.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 +1794 -1170
- package/dist/.vscode/vscode.css-custom-data.json +115 -0
- package/dist/.vscode/vscode.html-custom-data.json +116 -61
- package/dist/custom-elements.json +1791 -1119
- package/dist/{nys-icon.library-CwuPZJAc.js → nys-icon.library-BZ3jVyhP.js} +2 -2
- package/dist/{nys-icon.library-D_YvOGLH.js.map → nys-icon.library-BZ3jVyhP.js.map} +1 -1
- package/dist/{nys-icon.library-Bi_7DKlD-BEL9M8Q4.js → nys-icon.library-DYsQ8Tiv-DYS-TkV2.js} +12 -4
- package/dist/nys-icon.library-DYsQ8Tiv-DYS-TkV2.js.map +1 -0
- package/dist/nysds.es.js +5422 -4579
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +479 -457
- package/dist/nysds.js.map +1 -1
- package/dist/packages/codegen/src/index.d.ts +16 -0
- package/dist/packages/codegen/src/manifest/components.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/filters.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/form-control.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/load.d.ts +10 -0
- package/dist/packages/codegen/src/manifest/naming.d.ts +6 -0
- package/dist/packages/codegen/src/manifest/packages.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/types.d.ts +6 -0
- package/dist/packages/codegen/src/transform/index.d.ts +19 -0
- package/dist/packages/codegen/src/transform/parse.d.ts +18 -0
- package/dist/packages/codegen/src/transform/shared.d.ts +61 -0
- package/dist/packages/codegen/src/transform/to-angular.d.ts +6 -0
- package/dist/packages/codegen/src/transform/to-jsx.d.ts +6 -0
- package/dist/packages/internals/src/form-control-mixin.d.ts +16 -0
- package/dist/packages/internals/src/form-events.d.ts +22 -0
- package/dist/packages/internals/src/index.d.ts +2 -1
- package/dist/packages/internals/src/types.d.ts +6 -0
- package/dist/packages/mcp-server/src/lib/cem-parser.d.ts +12 -0
- package/dist/packages/mcp-server/src/lib/framework-snippets.d.ts +35 -0
- package/dist/packages/mcp-server/src/lib/framework-usage.d.ts +19 -0
- package/dist/packages/mcp-server/src/lib/frameworks-data.d.ts +18 -0
- package/dist/packages/mcp-server/src/resources/frameworks.d.ts +14 -0
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +12 -0
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +9 -1
- package/dist/packages/nys-alert/src/nys-alert.d.ts +39 -1
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +16 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +14 -2
- package/dist/packages/nys-badge/src/nys-badge.d.ts +18 -0
- package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +29 -3
- package/dist/packages/nys-button/src/nys-button.d.ts +35 -4
- package/dist/packages/nys-card/src/nys-card.d.ts +72 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +77 -7
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +46 -0
- package/dist/packages/nys-combobox/src/nys-combobox.d.ts +51 -6
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +44 -2
- package/dist/packages/nys-divider/src/nys-divider.d.ts +9 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +17 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +10 -0
- package/dist/packages/nys-fileinput/src/index.d.ts +1 -0
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +42 -6
- package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +9 -1
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +18 -0
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +36 -55
- package/dist/packages/nys-icon/src/nys-icon.d.ts +18 -0
- package/dist/packages/nys-iconlist/src/nys-iconlist.d.ts +38 -1
- package/dist/packages/nys-iconlist/src/nys-iconlistitem.d.ts +6 -0
- package/dist/packages/nys-label/src/nys-label.d.ts +3 -1
- package/dist/packages/nys-modal/src/nys-modal.d.ts +26 -2
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +21 -2
- package/dist/packages/nys-processlist/src/nys-processlist.d.ts +16 -0
- package/dist/packages/nys-processlist/src/nys-processlistitem.d.ts +1 -1
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +29 -5
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +66 -4
- package/dist/packages/nys-select/src/nys-select.d.ts +22 -4
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +8 -0
- package/dist/packages/nys-stepper/src/nys-step.d.ts +8 -1
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +8 -0
- package/dist/packages/nys-tab/src/nys-tab.d.ts +22 -3
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +12 -0
- package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +2 -0
- package/dist/packages/nys-table/src/nys-table.d.ts +39 -2
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +47 -4
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +42 -4
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +37 -3
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +13 -0
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +13 -0
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +28 -19
- package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +14 -0
- package/dist/packages/nys-verticalnav/src/nys-verticalnavgroup.d.ts +11 -0
- package/dist/packages/nys-video/src/nys-video.d.ts +14 -1
- package/package.json +32 -27
- package/dist/nys-icon.library-Bi_7DKlD-BEL9M8Q4.js.map +0 -1
- package/dist/nys-icon.library-Bi_7DKlD-YSs5zqZy.js +0 -698
- package/dist/nys-icon.library-Bi_7DKlD-YSs5zqZy.js.map +0 -1
- package/dist/nys-icon.library-CwuPZJAc.js.map +0 -1
- package/dist/nys-icon.library-D_YvOGLH.js +0 -696
- package/packages/react/NysAccordion.d.ts +0 -75
- package/packages/react/NysAccordion.js +0 -24
- package/packages/react/NysAccordionItem.d.ts +0 -82
- package/packages/react/NysAccordionItem.js +0 -43
- package/packages/react/NysAlert.d.ts +0 -102
- package/packages/react/NysAlert.js +0 -61
- package/packages/react/NysAvatar.d.ts +0 -88
- package/packages/react/NysAvatar.js +0 -40
- package/packages/react/NysBacktotop.d.ts +0 -57
- package/packages/react/NysBacktotop.js +0 -23
- package/packages/react/NysBadge.d.ts +0 -78
- package/packages/react/NysBadge.js +0 -42
- package/packages/react/NysBreadcrumbItem.d.ts +0 -72
- package/packages/react/NysBreadcrumbItem.js +0 -42
- package/packages/react/NysBreadcrumbs.d.ts +0 -89
- package/packages/react/NysBreadcrumbs.js +0 -50
- package/packages/react/NysButton.d.ts +0 -171
- package/packages/react/NysButton.js +0 -83
- package/packages/react/NysCard.d.ts +0 -110
- package/packages/react/NysCard.js +0 -61
- package/packages/react/NysCheckbox.d.ts +0 -145
- package/packages/react/NysCheckbox.js +0 -78
- package/packages/react/NysCheckboxgroup.d.ts +0 -88
- package/packages/react/NysCheckboxgroup.js +0 -46
- package/packages/react/NysCombobox.d.ts +0 -126
- package/packages/react/NysCombobox.js +0 -66
- package/packages/react/NysDatepicker.d.ts +0 -128
- package/packages/react/NysDatepicker.js +0 -76
- package/packages/react/NysDivider.d.ts +0 -54
- package/packages/react/NysDivider.js +0 -22
- package/packages/react/NysDropdownMenu.d.ts +0 -59
- package/packages/react/NysDropdownMenu.js +0 -23
- package/packages/react/NysDropdownMenuItem.d.ts +0 -75
- package/packages/react/NysDropdownMenuItem.js +0 -47
- package/packages/react/NysErrorMessage.d.ts +0 -60
- package/packages/react/NysErrorMessage.js +0 -24
- package/packages/react/NysFileItem.d.ts +0 -69
- package/packages/react/NysFileItem.js +0 -37
- package/packages/react/NysFileinput.d.ts +0 -130
- package/packages/react/NysFileinput.js +0 -74
- package/packages/react/NysGlobalFooter.d.ts +0 -77
- package/packages/react/NysGlobalFooter.js +0 -32
- package/packages/react/NysGlobalHeader.d.ts +0 -85
- package/packages/react/NysGlobalHeader.js +0 -34
- package/packages/react/NysIcon.d.ts +0 -75
- package/packages/react/NysIcon.js +0 -50
- package/packages/react/NysIconlist.d.ts +0 -54
- package/packages/react/NysIconlist.js +0 -22
- package/packages/react/NysIconlistitem.d.ts +0 -59
- package/packages/react/NysIconlistitem.js +0 -22
- package/packages/react/NysLabel.d.ts +0 -81
- package/packages/react/NysLabel.js +0 -40
- package/packages/react/NysModal.d.ts +0 -90
- package/packages/react/NysModal.js +0 -50
- package/packages/react/NysOption.d.ts +0 -66
- package/packages/react/NysOption.js +0 -25
- package/packages/react/NysPagination.d.ts +0 -72
- package/packages/react/NysPagination.js +0 -45
- package/packages/react/NysProcesslist.d.ts +0 -65
- package/packages/react/NysProcesslist.js +0 -25
- package/packages/react/NysProcesslistitem.d.ts +0 -61
- package/packages/react/NysProcesslistitem.js +0 -35
- package/packages/react/NysRadiobutton.d.ts +0 -132
- package/packages/react/NysRadiobutton.js +0 -72
- package/packages/react/NysRadiogroup.d.ts +0 -104
- package/packages/react/NysRadiogroup.js +0 -62
- package/packages/react/NysSelect.d.ts +0 -119
- package/packages/react/NysSelect.js +0 -67
- package/packages/react/NysSkipnav.d.ts +0 -54
- package/packages/react/NysSkipnav.js +0 -22
- package/packages/react/NysStep.d.ts +0 -73
- package/packages/react/NysStep.js +0 -40
- package/packages/react/NysStepper.d.ts +0 -67
- package/packages/react/NysStepper.js +0 -26
- package/packages/react/NysTab.d.ts +0 -90
- package/packages/react/NysTab.js +0 -39
- package/packages/react/NysTabgroup.d.ts +0 -76
- package/packages/react/NysTabgroup.js +0 -22
- package/packages/react/NysTable.d.ts +0 -80
- package/packages/react/NysTable.js +0 -41
- package/packages/react/NysTabpanel.d.ts +0 -70
- package/packages/react/NysTabpanel.js +0 -21
- package/packages/react/NysTextarea.d.ts +0 -141
- package/packages/react/NysTextarea.js +0 -79
- package/packages/react/NysTextinput.d.ts +0 -144
- package/packages/react/NysTextinput.js +0 -83
- package/packages/react/NysToggle.d.ts +0 -102
- package/packages/react/NysToggle.js +0 -59
- package/packages/react/NysTooltip.d.ts +0 -60
- package/packages/react/NysTooltip.js +0 -24
- package/packages/react/NysUnavFooter.d.ts +0 -61
- package/packages/react/NysUnavFooter.js +0 -21
- package/packages/react/NysUnavHeader.d.ts +0 -98
- package/packages/react/NysUnavHeader.js +0 -56
- package/packages/react/NysVerticalnav.d.ts +0 -67
- package/packages/react/NysVerticalnav.js +0 -26
- package/packages/react/NysVerticalnavGroup.d.ts +0 -76
- package/packages/react/NysVerticalnavGroup.js +0 -43
- package/packages/react/NysVideo.d.ts +0 -83
- package/packages/react/NysVideo.js +0 -53
- package/packages/react/README.md +0 -92
- package/packages/react/index.d.ts +0 -49
- package/packages/react/index.js +0 -49
- package/packages/react/nysds-jsx.d.ts +0 -1998
- package/packages/react/react-utils.js +0 -40
|
@@ -2,6 +2,29 @@ import { NysFormControlElement } from "@nysds/internals";
|
|
|
2
2
|
import "@nysds/nys-label";
|
|
3
3
|
import "@nysds/nys-errormessage";
|
|
4
4
|
import "@nysds/nys-textinput";
|
|
5
|
+
/** Detail payload for the `nys-change` event fired by `nys-radiogroup`. */
|
|
6
|
+
export interface NysRadiogroupChangeDetail {
|
|
7
|
+
/** Id of the selected child radiobutton (kept for 1.x compatibility). */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Checked state of the selected child radiobutton (always `true`). */
|
|
10
|
+
checked: boolean;
|
|
11
|
+
/** Name of the selected child radiobutton, which the group adopts. */
|
|
12
|
+
name: string;
|
|
13
|
+
/** The group's selected value. */
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
/** The `nys-change` event fired by `nys-radiogroup`. */
|
|
17
|
+
export type NysRadiogroupChangeEvent = CustomEvent<NysRadiogroupChangeDetail>;
|
|
18
|
+
/** Detail payload for the `nys-other-input` event fired by `nys-radiogroup`. */
|
|
19
|
+
export interface NysRadiogroupOtherInputDetail {
|
|
20
|
+
/** Id of the "other" child radiobutton. */
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
/** Current text of the "other" free-text field. */
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
/** The `nys-other-input` event fired by `nys-radiogroup`. */
|
|
27
|
+
export type NysRadiogroupOtherInputEvent = CustomEvent<NysRadiogroupOtherInputDetail>;
|
|
5
28
|
/**
|
|
6
29
|
* A container for grouping `nys-radiobutton` elements as a single form control with enforced single selection.
|
|
7
30
|
* Handles keyboard navigation (arrow keys), validation, required constraints, and form integration.
|
|
@@ -11,10 +34,16 @@ import "@nysds/nys-textinput";
|
|
|
11
34
|
*
|
|
12
35
|
* @summary Container for grouping radio buttons as a single form control.
|
|
13
36
|
* @element nys-radiogroup
|
|
37
|
+
* @formControl value nys-change
|
|
14
38
|
*
|
|
15
39
|
* @slot - Default slot for `nys-radiobutton` elements.
|
|
16
40
|
* @slot description - Custom HTML description content.
|
|
17
41
|
*
|
|
42
|
+
* @fires {NysRadiogroupChangeEvent} nys-change - Fired when the selection changes. Detail: `{id, checked, name, value}` — `value` is the selected value; `id`, `checked`, and `name` echo the selected child radio for compatibility. Bubbles and composed.
|
|
43
|
+
* @fires {NysRadiogroupOtherInputEvent} nys-other-input - Fired as the "other" free-text input changes. Detail: `{id, name, value}`. Bubbles and composed.
|
|
44
|
+
* @fires {Event} nys-focus - Fired on the group when focus enters it from outside; also re-dispatched targeted at the focused child radio for compatibility. Bubbles and composed.
|
|
45
|
+
* @fires {Event} nys-blur - Fired on the group when focus leaves it; also re-dispatched targeted at the blurred child radio for compatibility. Bubbles and composed.
|
|
46
|
+
*
|
|
18
47
|
* @example Basic
|
|
19
48
|
* ```html
|
|
20
49
|
* <nys-radiogroup label="Select borough" required>
|
|
@@ -138,8 +167,16 @@ export declare class NysRadiogroup extends NysFormControlElement {
|
|
|
138
167
|
* @default "md"
|
|
139
168
|
*/
|
|
140
169
|
size: "sm" | "md";
|
|
141
|
-
_showOtherError
|
|
142
|
-
private
|
|
170
|
+
private _showOtherError;
|
|
171
|
+
private _value;
|
|
172
|
+
private _syncingValueFromChildren;
|
|
173
|
+
/**
|
|
174
|
+
* Value of the selected child radiobutton, or `""` when none is selected.
|
|
175
|
+
* Setting it programmatically checks the matching child and updates the
|
|
176
|
+
* form value without firing `nys-change`. Setting `""` clears the selection.
|
|
177
|
+
*/
|
|
178
|
+
get value(): string;
|
|
179
|
+
set value(next: string);
|
|
143
180
|
private _slottedDescriptionText;
|
|
144
181
|
private _radios;
|
|
145
182
|
private _mobileQuery;
|
|
@@ -163,10 +200,25 @@ export declare class NysRadiogroup extends NysFormControlElement {
|
|
|
163
200
|
* --------------------------------------------------------------------------
|
|
164
201
|
*/
|
|
165
202
|
private _setValue;
|
|
203
|
+
/**
|
|
204
|
+
* Set `value` from a child selection without pushing the same state back
|
|
205
|
+
* down (and without firing `nys-change`).
|
|
206
|
+
*/
|
|
207
|
+
private _setValueFromChild;
|
|
208
|
+
/**
|
|
209
|
+
* Apply a programmatically set `value` to the child radiobuttons and the
|
|
210
|
+
* form value. Setting `checked` on a child never fires `nys-change` (only
|
|
211
|
+
* user interaction does), so no change events echo back.
|
|
212
|
+
*/
|
|
213
|
+
private _applyValueToChildren;
|
|
214
|
+
/**
|
|
215
|
+
* Derive `value` from the currently checked child. Runs off the default
|
|
216
|
+
* slot's `slotchange`, so it covers first render and dynamically added
|
|
217
|
+
* radios without scheduling work inside the update cycle.
|
|
218
|
+
*/
|
|
219
|
+
private _syncValueFromChildren;
|
|
166
220
|
private _setRadioButtonRequire;
|
|
167
221
|
private _manageRequire;
|
|
168
|
-
checkValidity(): boolean;
|
|
169
|
-
private _initializeCheckedRadioValue;
|
|
170
222
|
private _getAllRadios;
|
|
171
223
|
private _handleKeyDown;
|
|
172
224
|
private _updateGroupTabIndex;
|
|
@@ -193,6 +245,16 @@ export declare class NysRadiogroup extends NysFormControlElement {
|
|
|
193
245
|
private _handleOtherKeydown;
|
|
194
246
|
private _handleGroupFocusout;
|
|
195
247
|
private _handleRadiobtnClick;
|
|
248
|
+
/** True when `node` is inside this group, including its shadow DOM. */
|
|
249
|
+
private _containsFocus;
|
|
250
|
+
/**
|
|
251
|
+
* Group-level focus: fired only when focus enters from outside the group,
|
|
252
|
+
* so moving between the radios stays silent. The per-radio `nys-focus`
|
|
253
|
+
* re-dispatches (targeted at the child) are kept for compatibility.
|
|
254
|
+
*/
|
|
255
|
+
private _handleHostFocusIn;
|
|
256
|
+
/** Group-level blur: fired only when focus leaves the group entirely. */
|
|
257
|
+
private _handleHostFocusOut;
|
|
196
258
|
private _handleRadiobtnFocus;
|
|
197
259
|
private _handleRadiobtnBlur;
|
|
198
260
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -2,6 +2,14 @@ import { NysFormControlElement } from "@nysds/internals";
|
|
|
2
2
|
import "@nysds/nys-label";
|
|
3
3
|
import "@nysds/nys-errormessage";
|
|
4
4
|
import "@nysds/nys-icon";
|
|
5
|
+
/** Detail payload for the `nys-change` event. */
|
|
6
|
+
export interface NysSelectChangeDetail {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
/** The `nys-change` event, fired when the selection changes. */
|
|
12
|
+
export type NysSelectChangeEvent = CustomEvent<NysSelectChangeDetail>;
|
|
5
13
|
/**
|
|
6
14
|
* A dropdown for selecting a single option from a list. Supports native `<option>` and `<optgroup>` elements.
|
|
7
15
|
* Form-associated with validation via ElementInternals.
|
|
@@ -15,9 +23,20 @@ import "@nysds/nys-icon";
|
|
|
15
23
|
* @slot - Default slot for `<option>` and `<optgroup>` elements.
|
|
16
24
|
* @slot description - Custom HTML description content below the label.
|
|
17
25
|
*
|
|
18
|
-
* @
|
|
19
|
-
*
|
|
20
|
-
* @fires nys-
|
|
26
|
+
* @formControl value nys-change
|
|
27
|
+
*
|
|
28
|
+
* @fires {NysSelectChangeEvent} nys-change - Fired when the selection changes. Detail: `{id, name, value}`.
|
|
29
|
+
* @fires {Event} nys-focus - Fired when the select gains focus.
|
|
30
|
+
* @fires {Event} nys-blur - Fired when the select loses focus. Triggers validation.
|
|
31
|
+
*
|
|
32
|
+
* @usagedos
|
|
33
|
+
* - Use when a user needs to select a single item from a dropdown list.
|
|
34
|
+
* - Use the `<option>` element to define options and the native `<optgroup>` to group them.
|
|
35
|
+
*
|
|
36
|
+
* @usagedonts
|
|
37
|
+
* - Use when users need to select multiple items. Use a checkbox group instead.
|
|
38
|
+
* - Use the custom `<nys-option>` element. It will be deprecated in the 2.0 release.
|
|
39
|
+
* - Use `<nys-select multiple>`. Use a checkbox group instead.
|
|
21
40
|
*
|
|
22
41
|
* @example Basic
|
|
23
42
|
* ```html
|
|
@@ -212,7 +231,6 @@ export declare class NysSelect extends NysFormControlElement {
|
|
|
212
231
|
* @default "full"
|
|
213
232
|
*/
|
|
214
233
|
width: "sm" | "md" | "lg" | "full";
|
|
215
|
-
private _originalErrorMessage;
|
|
216
234
|
private _hasUserInteracted;
|
|
217
235
|
/**
|
|
218
236
|
* Lifecycle methods
|
|
@@ -8,6 +8,14 @@ import { NysElement } from "@nysds/internals";
|
|
|
8
8
|
* @summary Skip navigation link for keyboard accessibility. Hidden until focused.
|
|
9
9
|
* @element nys-skipnav
|
|
10
10
|
*
|
|
11
|
+
* @usagedos
|
|
12
|
+
* - Use on pages with a large header, navigation, or other repeated content before the main section.
|
|
13
|
+
* - Ensure the `href` on `<nys-skipnav>` matches the `id` of the main content container.
|
|
14
|
+
*
|
|
15
|
+
* @usagedonts
|
|
16
|
+
* - Use if your layout already starts with the main content and there is nothing to skip over.
|
|
17
|
+
* - Mismatch the `href` and target `id`.
|
|
18
|
+
*
|
|
11
19
|
* @example Basic
|
|
12
20
|
* ```html
|
|
13
21
|
* <nys-skipnav></nys-skipnav>
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { NysElement } from "@nysds/internals";
|
|
2
|
+
/** Detail payload for the `nys-step-click` event fired by `nys-step`. */
|
|
3
|
+
export interface NysStepClickDetail {
|
|
4
|
+
href: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
/** The `nys-step-click` event fired by `nys-step`. */
|
|
8
|
+
export type NysStepClickEvent = CustomEvent<NysStepClickDetail>;
|
|
2
9
|
/**
|
|
3
10
|
* A single step within `nys-stepper`. Represents one stage in a multi-step process.
|
|
4
11
|
*
|
|
@@ -79,7 +86,7 @@ import { NysElement } from "@nysds/internals";
|
|
|
79
86
|
* @summary Individual step for use within nys-stepper with navigation support.
|
|
80
87
|
* @element nys-step
|
|
81
88
|
*
|
|
82
|
-
* @fires nys-step-click - Fired when a navigable (`previous` or `current`) non-selected step is clicked
|
|
89
|
+
* @fires {NysStepClickEvent} nys-step-click - Fired when a navigable (`previous` or `current`) non-selected step is clicked
|
|
83
90
|
* or activated by keyboard. Detail: `{ href: string, label: string }`. Cancelable — call
|
|
84
91
|
* `e.preventDefault()` to suppress `window.location.href` navigation.
|
|
85
92
|
*/
|
|
@@ -52,6 +52,14 @@ import "./nys-step";
|
|
|
52
52
|
* @slot - Default slot for `nys-step` elements. Only `nys-step` children are accepted; others are removed.
|
|
53
53
|
* @slot actions - Persistent navigation buttons. Must contain exactly one `<div>` wrapping only `<nys-button>` elements.
|
|
54
54
|
*
|
|
55
|
+
* @usagedos
|
|
56
|
+
* - Use for linear, ordered forms with more than 2 sections to show progress through a multi-step process.
|
|
57
|
+
* - Ensure users can navigate back to previous steps to review or change information.
|
|
58
|
+
*
|
|
59
|
+
* @usagedonts
|
|
60
|
+
* - Use when a form has only 1 or 2 sections.
|
|
61
|
+
* - Use for forms that are nonlinear and can be completed in any order.
|
|
62
|
+
*
|
|
55
63
|
* @example Basic
|
|
56
64
|
* ```html
|
|
57
65
|
* <div class="nys-grid-row">
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { NysElement } from "@nysds/internals";
|
|
2
|
+
/** Detail payload for the `nys-tab-select` event fired by `nys-tab`. */
|
|
3
|
+
export interface NysTabSelectDetail {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
/** The `nys-tab-select` event fired by `nys-tab`. */
|
|
8
|
+
export type NysTabSelectEvent = CustomEvent<NysTabSelectDetail>;
|
|
9
|
+
/** Detail payload for the `nys-tab-focus` event fired by `nys-tab`. */
|
|
10
|
+
export interface NysTabFocusDetail {
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
/** The `nys-tab-focus` event fired by `nys-tab`. */
|
|
14
|
+
export type NysTabFocusEvent = CustomEvent<NysTabFocusDetail>;
|
|
15
|
+
/** Detail payload for the `nys-tab-blur` event fired by `nys-tab`. */
|
|
16
|
+
export interface NysTabBlurDetail {
|
|
17
|
+
id: string;
|
|
18
|
+
}
|
|
19
|
+
/** The `nys-tab-blur` event fired by `nys-tab`. */
|
|
20
|
+
export type NysTabBlurEvent = CustomEvent<NysTabBlurDetail>;
|
|
2
21
|
/**
|
|
3
22
|
* `<nys-tab>` is a single tab within a `<nys-tabgroup>`.
|
|
4
23
|
*
|
|
@@ -10,12 +29,12 @@ import { NysElement } from "@nysds/internals";
|
|
|
10
29
|
*
|
|
11
30
|
* @element nys-tab
|
|
12
31
|
*
|
|
13
|
-
* @fires nys-tab-select - Dispatched when the tab is activated via click or
|
|
32
|
+
* @fires {NysTabSelectEvent} nys-tab-select - Dispatched when the tab is activated via click or
|
|
14
33
|
* Enter / Space. Bubbles and crosses shadow DOM boundaries.
|
|
15
34
|
* `detail: { id: string, label: string }`
|
|
16
|
-
* @fires nys-tab-focus - Dispatched when the host receives focus. Bubbles and
|
|
35
|
+
* @fires {NysTabFocusEvent} nys-tab-focus - Dispatched when the host receives focus. Bubbles and
|
|
17
36
|
* crosses shadow DOM boundaries. `detail: { id: string }`
|
|
18
|
-
* @fires nys-tab-blur - Dispatched when the host loses focus. Bubbles and
|
|
37
|
+
* @fires {NysTabBlurEvent} nys-tab-blur - Dispatched when the host loses focus. Bubbles and
|
|
19
38
|
* crosses shadow DOM boundaries. `detail: { id: string }`
|
|
20
39
|
*
|
|
21
40
|
* @slot - No slots; content is derived from the `label` property.
|
|
@@ -25,6 +25,18 @@ import { NysElement } from "@nysds/internals";
|
|
|
25
25
|
* tablist and panel containers; they stay in the light DOM. Any other
|
|
26
26
|
* children remain in the default slot, rendered below the panels.
|
|
27
27
|
*
|
|
28
|
+
* @usagedos
|
|
29
|
+
* - Use to organize related content into distinct sections within the same context (e.g., Overview, Specs, Reviews), especially when a page would otherwise be overwhelmingly long.
|
|
30
|
+
* - Keep tab labels short and clear, limited to 2–9 tabs and one row. Avoid wrapping.
|
|
31
|
+
* - Only one tab should ever be in the active state.
|
|
32
|
+
*
|
|
33
|
+
* @usagedonts
|
|
34
|
+
* - Use when users need to compare information across sections simultaneously. Tabs require clicking back and forth.
|
|
35
|
+
* - Use for linear, step-by-step processes. Use a stepper instead.
|
|
36
|
+
* - Use when you only have two small pieces of content. Display them consecutively instead.
|
|
37
|
+
* - Nest tabs inside other tabs.
|
|
38
|
+
* - Use tabs for page navigation.
|
|
39
|
+
*
|
|
28
40
|
* @example Basic
|
|
29
41
|
* ```html
|
|
30
42
|
* <nys-tabgroup>
|
|
@@ -17,6 +17,8 @@ import { NysElement } from "@nysds/internals";
|
|
|
17
17
|
*
|
|
18
18
|
* @element nys-tabpanel
|
|
19
19
|
*
|
|
20
|
+
* @cssprop [--nys-tabpanel-max-height] - Maximum height of the tab panel content area.
|
|
21
|
+
*
|
|
20
22
|
* @slot - Default slot for panel content. Rendered directly under the host,
|
|
21
23
|
* which is the scrollable, focusable (`tabindex="0"`) `role="tabpanel"`
|
|
22
24
|
* region.
|
|
@@ -1,22 +1,43 @@
|
|
|
1
1
|
import { NysElement } from "@nysds/internals";
|
|
2
2
|
import "@nysds/nys-icon";
|
|
3
3
|
import "@nysds/nys-button";
|
|
4
|
+
/** Detail payload for the `nys-column-sort` event fired by `nys-table`. */
|
|
5
|
+
export interface NysTableColumnSortDetail {
|
|
6
|
+
columnIndex: number;
|
|
7
|
+
columnLabel: string;
|
|
8
|
+
sortDirection: "asc" | "desc" | "none";
|
|
9
|
+
}
|
|
10
|
+
/** The `nys-column-sort` event fired by `nys-table`. */
|
|
11
|
+
export type NysTableColumnSortEvent = CustomEvent<NysTableColumnSortDetail>;
|
|
4
12
|
/**
|
|
5
13
|
* `<nys-table>` is a responsive table component that can display native HTML tables,
|
|
6
14
|
* supports striped and bordered styling, sortable columns, and CSV download.
|
|
7
15
|
*
|
|
16
|
+
* @element nys-table
|
|
17
|
+
*
|
|
18
|
+
* @cssprop [--nys-table-padding--cell--y] - Vertical padding for table cells
|
|
19
|
+
*
|
|
8
20
|
* @slot - Accepts a `<table>` element. Only the first table is used. The table
|
|
9
21
|
* is enhanced in place and stays in the light DOM (projected through a slot,
|
|
10
22
|
* never cloned), so embedded components remain interactive and reachable by
|
|
11
23
|
* consumer CSS/JS. Its cell styling is applied from `nys-table.light.scss`,
|
|
12
24
|
* adopted once onto `document.adoptedStyleSheets`.
|
|
13
25
|
*
|
|
14
|
-
* @fires nys-click - Fired when the download button or sortable headers are clicked.
|
|
15
|
-
* @fires nys-column-sort - Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior.
|
|
26
|
+
* @fires {Event} nys-click - Fired when the download button or sortable headers are clicked.
|
|
27
|
+
* @fires {NysTableColumnSortEvent} nys-column-sort - Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior.
|
|
16
28
|
* Detail: { columnIndex: number, columnLabel: string, sortDirection: "asc" | "desc" | "none" }
|
|
17
29
|
*
|
|
18
30
|
* @method downloadFile - Triggers download of the CSV file if `download` is set.
|
|
19
31
|
*
|
|
32
|
+
* @usagedos
|
|
33
|
+
* - Use to display tabular data such as statistical information or directories of locations and resources with consistent structure.
|
|
34
|
+
*
|
|
35
|
+
* @usagedonts
|
|
36
|
+
* - Use in place of a layout grid. Table content should follow a consistent structure using headers and logical columns and rows.
|
|
37
|
+
* - Use for non-tabular content. Consider definition lists or hierarchical lists instead.
|
|
38
|
+
* - Use when cell content is long-form; table cells should be brief and scannable. If you need multiple bullet points or paragraphs in a cell, consider page headers or an accordion instead.
|
|
39
|
+
* - Add `rowspan` or `colspan` with the `sortable` property.
|
|
40
|
+
*
|
|
20
41
|
* @example Basic
|
|
21
42
|
* ```html
|
|
22
43
|
* <nys-table id="table1" name="table1">
|
|
@@ -87,6 +108,22 @@ import "@nysds/nys-button";
|
|
|
87
108
|
* </table>
|
|
88
109
|
* </nys-table>
|
|
89
110
|
* ```
|
|
111
|
+
*
|
|
112
|
+
* @example Sortable Numbers
|
|
113
|
+
* ```html
|
|
114
|
+
* <nys-table id="numb-sort-test" name="numb-sort-test" sortable>
|
|
115
|
+
* <table>
|
|
116
|
+
* <caption>Testing Sorting Number Logic</caption>
|
|
117
|
+
* <tr><th>Number</th><th>Word Form</th></tr>
|
|
118
|
+
* <tr><td>1</td><td>One</td></tr>
|
|
119
|
+
* <tr><td>100</td><td>One Hundred</td></tr>
|
|
120
|
+
* <tr><td>1,000</td><td>One Thousand</td></tr>
|
|
121
|
+
* <tr><td>11</td><td>Eleven</td></tr>
|
|
122
|
+
* <tr><td>40</td><td>Forty</td></tr>
|
|
123
|
+
* <tr><td>5</td><td>Five</td></tr>
|
|
124
|
+
* </table>
|
|
125
|
+
* </nys-table>
|
|
126
|
+
* ```
|
|
90
127
|
*/
|
|
91
128
|
export declare class NysTable extends NysElement {
|
|
92
129
|
static styles: import("lit").CSSResult;
|
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
import { NysFormControlElement } from "@nysds/internals";
|
|
2
2
|
import "@nysds/nys-label";
|
|
3
3
|
import "@nysds/nys-errormessage";
|
|
4
|
+
/** Detail payload for the `nys-input` event. */
|
|
5
|
+
export interface NysTextareaInputDetail {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
/** The `nys-input` event, fired on each keystroke. */
|
|
11
|
+
export type NysTextareaInputEvent = CustomEvent<NysTextareaInputDetail>;
|
|
12
|
+
/** Detail payload for the `nys-change` event. */
|
|
13
|
+
export interface NysTextareaChangeDetail {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
/** The `nys-change` event, fired when the value is committed. */
|
|
19
|
+
export type NysTextareaChangeEvent = CustomEvent<NysTextareaChangeDetail>;
|
|
20
|
+
/** Detail payload for the `nys-select` event. */
|
|
21
|
+
export interface NysTextareaSelectDetail {
|
|
22
|
+
id: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
/** The `nys-select` event, fired when the user selects text. */
|
|
26
|
+
export type NysTextareaSelectEvent = CustomEvent<NysTextareaSelectDetail>;
|
|
27
|
+
/** Detail payload for the `nys-selectionchange` event. */
|
|
28
|
+
export interface NysTextareaSelectionchangeDetail {
|
|
29
|
+
id: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}
|
|
32
|
+
/** The `nys-selectionchange` event, fired when the text selection changes. */
|
|
33
|
+
export type NysTextareaSelectionchangeEvent = CustomEvent<NysTextareaSelectionchangeDetail>;
|
|
4
34
|
/**
|
|
5
35
|
* A multi-line text input for collecting longer responses like comments, descriptions, or feedback.
|
|
6
36
|
* Form-associated with validation support via ElementInternals.
|
|
@@ -13,10 +43,21 @@ import "@nysds/nys-errormessage";
|
|
|
13
43
|
*
|
|
14
44
|
* @slot description - Custom HTML description content below the label.
|
|
15
45
|
*
|
|
16
|
-
* @
|
|
17
|
-
*
|
|
18
|
-
* @fires nys-
|
|
19
|
-
* @fires nys-
|
|
46
|
+
* @formControl value nys-change nys-input
|
|
47
|
+
*
|
|
48
|
+
* @fires {NysTextareaInputEvent} nys-input - Fired on each input. Detail: `{id, name, value}`.
|
|
49
|
+
* @fires {NysTextareaChangeEvent} nys-change - Fired when the value is committed (native `change`). Detail: `{id, name, value}`.
|
|
50
|
+
* @fires {Event} nys-focus - Fired when the textarea gains focus.
|
|
51
|
+
* @fires {Event} nys-blur - Fired when the textarea loses focus. Triggers validation.
|
|
52
|
+
* @fires {NysTextareaSelectEvent} nys-select - Fired when the user selects text. Detail: `{id, value}`.
|
|
53
|
+
* @fires {NysTextareaSelectionchangeEvent} nys-selectionchange - Fired when the text selection changes. Detail: `{id, value}`.
|
|
54
|
+
*
|
|
55
|
+
* @usagedos
|
|
56
|
+
* - Use to collect multiple lines of open-ended text input (e.g., comments, descriptions, feedback).
|
|
57
|
+
*
|
|
58
|
+
* @usagedonts
|
|
59
|
+
* - Use for short or single-line input. Use `<nys-textinput>` instead.
|
|
60
|
+
* - Use when input should be selected from predefined options. Use `<nys-select>`, `<nys-radiobutton>`, or `<nys-checkbox>` instead.
|
|
20
61
|
*
|
|
21
62
|
* @example Basic
|
|
22
63
|
* ```html
|
|
@@ -144,6 +185,7 @@ export declare class NysTextarea extends NysFormControlElement {
|
|
|
144
185
|
connectedCallback(): void;
|
|
145
186
|
disconnectedCallback(): void;
|
|
146
187
|
firstUpdated(): void;
|
|
188
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
147
189
|
updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void>;
|
|
148
190
|
/**
|
|
149
191
|
* Form Integration
|
|
@@ -165,6 +207,7 @@ export declare class NysTextarea extends NysFormControlElement {
|
|
|
165
207
|
* --------------------------------------------------------------------------
|
|
166
208
|
*/
|
|
167
209
|
private _handleInput;
|
|
210
|
+
private _handleChange;
|
|
168
211
|
private _handleFocus;
|
|
169
212
|
private _handleBlur;
|
|
170
213
|
private _handleSelect;
|
|
@@ -3,6 +3,28 @@ import "@nysds/nys-label";
|
|
|
3
3
|
import "@nysds/nys-errormessage";
|
|
4
4
|
import "@nysds/nys-button";
|
|
5
5
|
import "@nysds/nys-icon";
|
|
6
|
+
/** Detail for the `nys-input` event. */
|
|
7
|
+
export interface NysTextinputInputDetail {
|
|
8
|
+
/** The component's `id`. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** The component's `name`. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** The current value. */
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
/** Fired once per user input. */
|
|
16
|
+
export type NysTextinputInputEvent = CustomEvent<NysTextinputInputDetail>;
|
|
17
|
+
/** Detail for the `nys-change` event. */
|
|
18
|
+
export interface NysTextinputChangeDetail {
|
|
19
|
+
/** The component's `id`. */
|
|
20
|
+
id: string;
|
|
21
|
+
/** The component's `name`. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** The committed value. */
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
/** Fired when the value is committed, on blur or Enter. */
|
|
27
|
+
export type NysTextinputChangeEvent = CustomEvent<NysTextinputChangeDetail>;
|
|
6
28
|
/**
|
|
7
29
|
* A text input for collecting short, single-line data. Supports validation, input masking (tel),
|
|
8
30
|
* password visibility toggle, and live error messaging. Form-associated via ElementInternals.
|
|
@@ -17,9 +39,24 @@ import "@nysds/nys-icon";
|
|
|
17
39
|
* @slot startButton - Button at input start. Use single `nys-button` only.
|
|
18
40
|
* @slot endButton - Button at input end. Use single `nys-button` only.
|
|
19
41
|
*
|
|
20
|
-
* @
|
|
21
|
-
*
|
|
22
|
-
* @fires nys-
|
|
42
|
+
* @formControl value nys-change nys-input
|
|
43
|
+
*
|
|
44
|
+
* @fires {NysTextinputInputEvent} nys-input - Fired once per user input. Detail: `{id, name, value}`.
|
|
45
|
+
* @fires {NysTextinputChangeEvent} nys-change - Fired when the value is committed, on blur or Enter. Detail: `{id, name, value}`.
|
|
46
|
+
* @fires {Event} nys-focus - Fired when the input gains focus.
|
|
47
|
+
* @fires {Event} nys-blur - Fired when the input loses focus. Triggers validation.
|
|
48
|
+
*
|
|
49
|
+
* @usagedos
|
|
50
|
+
* - Use to collect short, single-line, open-ended text input (e.g., names, email addresses, or short descriptions).
|
|
51
|
+
* - Use clear, concise labels that describe the expected input.
|
|
52
|
+
* - Add helper text with the `description` property for context.
|
|
53
|
+
* - Validate input live to catch errors early (e.g., invalid email formats).
|
|
54
|
+
*
|
|
55
|
+
* @usagedonts
|
|
56
|
+
* - Use for long or multi-line responses. Use `<nys-textarea>` instead.
|
|
57
|
+
* - Use when input can be chosen from predefined options. Use `<nys-select>`, `<nys-radiobutton>`, or `<nys-checkbox>` instead.
|
|
58
|
+
* - Overwhelm users with too many fields. Group related inputs.
|
|
59
|
+
* - Use placeholders as labels.
|
|
23
60
|
*
|
|
24
61
|
* @example Basic
|
|
25
62
|
* ```html
|
|
@@ -166,7 +203,6 @@ export declare class NysTextinput extends NysFormControlElement {
|
|
|
166
203
|
errorMessage: string;
|
|
167
204
|
private _inputEl;
|
|
168
205
|
private showPassword;
|
|
169
|
-
private _originalErrorMessage;
|
|
170
206
|
private _hasUserInteracted;
|
|
171
207
|
private _maskPatterns;
|
|
172
208
|
/**
|
|
@@ -203,6 +239,8 @@ export declare class NysTextinput extends NysFormControlElement {
|
|
|
203
239
|
* --------------------------------------------------------------------------
|
|
204
240
|
*/
|
|
205
241
|
private _handleInput;
|
|
242
|
+
private _emitInput;
|
|
243
|
+
private _handleChange;
|
|
206
244
|
private _handleFocus;
|
|
207
245
|
private _handleBlur;
|
|
208
246
|
private _validateButtonSlot;
|
|
@@ -1,20 +1,54 @@
|
|
|
1
1
|
import { NysFormControlElement } from "@nysds/internals";
|
|
2
2
|
import "@nysds/nys-label";
|
|
3
3
|
import "@nysds/nys-icon";
|
|
4
|
+
/** Detail for the `nys-change` event. */
|
|
5
|
+
export interface NysToggleChangeDetail {
|
|
6
|
+
/** The component's `id`. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** The component's `name`. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Whether the toggle is on. */
|
|
11
|
+
checked: boolean;
|
|
12
|
+
/** The component's `value` (submitted when the toggle is on). */
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
/** Fired when the user toggles the switch. */
|
|
16
|
+
export type NysToggleChangeEvent = CustomEvent<NysToggleChangeDetail>;
|
|
4
17
|
/**
|
|
5
18
|
* A toggle switch for binary settings with immediate effect. Form-associated via ElementInternals.
|
|
6
19
|
*
|
|
7
20
|
* Use when changing a setting takes effect immediately (e.g., dark mode, notifications).
|
|
8
21
|
* For binary choices in forms that submit later, use `nys-checkbox` instead.
|
|
9
22
|
*
|
|
23
|
+
* A toggle has no validation surface: it exposes no `required`, `showError`,
|
|
24
|
+
* or `errorMessage` and never reports invalid state. Framework adapters (for
|
|
25
|
+
* example an Angular ControlValueAccessor) must not try to sync errors to it.
|
|
26
|
+
*
|
|
27
|
+
* Setting `checked` programmatically updates the form value but does not fire
|
|
28
|
+
* `nys-change`; the event fires only on user interaction.
|
|
29
|
+
*
|
|
10
30
|
* @summary Toggle switch for binary settings with immediate effect.
|
|
11
31
|
* @element nys-toggle
|
|
12
32
|
*
|
|
33
|
+
* @formControl checked nys-change
|
|
34
|
+
*
|
|
13
35
|
* @slot description - Custom HTML description content.
|
|
14
36
|
*
|
|
15
|
-
* @fires nys-change
|
|
16
|
-
* @fires nys-focus
|
|
17
|
-
* @fires nys-blur
|
|
37
|
+
* @fires {NysToggleChangeEvent} nys-change Fired when the user toggles the switch. Detail: `{id, name, checked, value}`.
|
|
38
|
+
* @fires {Event} nys-focus Fired when toggle gains focus.
|
|
39
|
+
* @fires {Event} nys-blur Fired when toggle loses focus.
|
|
40
|
+
*
|
|
41
|
+
* @usagedos
|
|
42
|
+
* - Provide a clear label and optional description to explain what the toggle controls.
|
|
43
|
+
* - Ensure the page clearly reflects the toggle's on/off state through visible changes.
|
|
44
|
+
* - Use when the state change will be implemented immediately.
|
|
45
|
+
*
|
|
46
|
+
* @usagedonts
|
|
47
|
+
* - Use for forms where immediate action isn't expected. Use `<nys-checkbox>` instead.
|
|
48
|
+
* - Use for selecting one or more options from a list. Use `<nys-checkbox>` or `<nys-radiobutton>` instead.
|
|
49
|
+
* - Use for complex or multi-state choices.
|
|
50
|
+
* - Overuse for minor settings that don't affect the user experience.
|
|
51
|
+
* - Hide labels unless an accessible alternative is in place.
|
|
18
52
|
*
|
|
19
53
|
* @example Basic
|
|
20
54
|
* ```html
|
|
@@ -16,6 +16,19 @@ import { NysElement } from "@nysds/internals";
|
|
|
16
16
|
* @summary Contextual tooltip with auto-positioning, keyboard support, and screen reader integration.
|
|
17
17
|
* @element nys-tooltip
|
|
18
18
|
*
|
|
19
|
+
* @usagedos
|
|
20
|
+
* - Use to provide supplemental hints on form fields (e.g., explaining what "FEIN" means) or on icon buttons that need additional context.
|
|
21
|
+
* - Use on NYSDS form components (`<nys-textinput>`, `<nys-select>`, `<nys-checkbox>`, etc.) where the tooltip automatically renders as a hint icon next to the label.
|
|
22
|
+
* - Keep tooltip content brief and helpful.
|
|
23
|
+
* - Position tooltips so they don't block related content.
|
|
24
|
+
*
|
|
25
|
+
* @usagedonts
|
|
26
|
+
* - Use for information critical to task completion. Use inline description text instead, as tooltips are easy to miss.
|
|
27
|
+
* - Use when content is long or includes links, actions, or structured content.
|
|
28
|
+
* - Use interactive elements such as links or buttons inside a tooltip.
|
|
29
|
+
* - Rely on tooltips when you have room to provide inline explanation.
|
|
30
|
+
* - Use when mobile users are a primary audience. Tooltips rely on hover, which is unavailable on touch devices.
|
|
31
|
+
*
|
|
19
32
|
* @example Basic
|
|
20
33
|
* ```html
|
|
21
34
|
* <div style="display: flex; justify-content: center; gap: 5px; padding: 40px;">
|
|
@@ -17,6 +17,19 @@ import { NysElement } from "@nysds/internals";
|
|
|
17
17
|
* @summary Universal NYS footer with logo and statewide links. Required site-wide.
|
|
18
18
|
* @element nys-unavfooter
|
|
19
19
|
*
|
|
20
|
+
* @cssprop [--nys-max-width--content] - Overrides the inner content max width across the grid, header, footer, and breadcrumb. Set at a higher level like `:root` to apply to all instances. Takes priority over the size-specific variable.
|
|
21
|
+
*
|
|
22
|
+
* @usagedos
|
|
23
|
+
* - Place the `<nys-unavfooter>` as the last element on every public-facing page, immediately after `<nys-globalfooter>`.
|
|
24
|
+
* - Use on every page of every NYS site and application. This component is required per NYS web policy, including on error pages, login screens, and landing pages.
|
|
25
|
+
* - Place as the very last element on the page, immediately after `<nys-globalfooter>`.
|
|
26
|
+
* - Use as-is with no configuration. The component handles its own content and styling.
|
|
27
|
+
*
|
|
28
|
+
* @usagedonts
|
|
29
|
+
* - Don't use on back office applications or internal sites that are not public-facing.
|
|
30
|
+
* - Place anywhere other than the absolute bottom of the page.
|
|
31
|
+
* - Customize, restyle, or override the component's content or appearance. Consistency across all state sites is the purpose of this component.
|
|
32
|
+
*
|
|
20
33
|
* @example Basic
|
|
21
34
|
* ```html
|
|
22
35
|
* <nys-unavfooter></nys-unavfooter>
|