@nysds/components 1.21.1 → 1.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/custom-elements.json +1562 -1029
  2. package/dist/.vscode/vscode.css-custom-data.json +75 -0
  3. package/dist/.vscode/vscode.html-custom-data.json +129 -60
  4. package/dist/custom-elements.json +1562 -1029
  5. package/dist/{nys-icon.library-BxwfG3ym-D4Dl8jc_.js → nys-icon.library-715cAMBp-BmiCym2_.js} +3 -3
  6. package/dist/{nys-icon.library-BxwfG3ym-D4Dl8jc_.js.map → nys-icon.library-715cAMBp-BmiCym2_.js.map} +1 -1
  7. package/dist/{nys-icon.library-C02yNW9R.js → nys-icon.library-C0_LOBWi.js} +2 -2
  8. package/dist/{nys-icon.library-C02yNW9R.js.map → nys-icon.library-C0_LOBWi.js.map} +1 -1
  9. package/dist/nysds.es.js +5074 -3645
  10. package/dist/nysds.es.js.map +1 -1
  11. package/dist/nysds.js +252 -248
  12. package/dist/nysds.js.map +1 -1
  13. package/dist/packages/codegen/src/index.d.ts +16 -0
  14. package/dist/packages/codegen/src/manifest/components.d.ts +5 -0
  15. package/dist/packages/codegen/src/manifest/filters.d.ts +5 -0
  16. package/dist/packages/codegen/src/manifest/form-control.d.ts +5 -0
  17. package/dist/packages/codegen/src/manifest/load.d.ts +10 -0
  18. package/dist/packages/codegen/src/manifest/naming.d.ts +6 -0
  19. package/dist/packages/codegen/src/manifest/packages.d.ts +5 -0
  20. package/dist/packages/codegen/src/manifest/types.d.ts +6 -0
  21. package/dist/packages/codegen/src/transform/index.d.ts +19 -0
  22. package/dist/packages/codegen/src/transform/parse.d.ts +18 -0
  23. package/dist/packages/codegen/src/transform/shared.d.ts +61 -0
  24. package/dist/packages/codegen/src/transform/to-angular.d.ts +6 -0
  25. package/dist/packages/codegen/src/transform/to-jsx.d.ts +6 -0
  26. package/dist/packages/internals/src/form-control-mixin.d.ts +16 -0
  27. package/dist/packages/internals/src/form-events.d.ts +22 -0
  28. package/dist/packages/internals/src/index.d.ts +2 -1
  29. package/dist/packages/internals/src/types.d.ts +6 -0
  30. package/dist/packages/mcp-server/src/lib/cem-parser.d.ts +12 -0
  31. package/dist/packages/mcp-server/src/lib/framework-snippets.d.ts +35 -0
  32. package/dist/packages/mcp-server/src/lib/framework-usage.d.ts +19 -0
  33. package/dist/packages/mcp-server/src/lib/frameworks-data.d.ts +18 -0
  34. package/dist/packages/mcp-server/src/resources/frameworks.d.ts +14 -0
  35. package/dist/packages/nys-accordion/src/nys-accordion.d.ts +12 -0
  36. package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +9 -1
  37. package/dist/packages/nys-alert/src/nys-alert.d.ts +39 -1
  38. package/dist/packages/nys-avatar/src/nys-avatar.d.ts +16 -0
  39. package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +12 -0
  40. package/dist/packages/nys-badge/src/nys-badge.d.ts +18 -0
  41. package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +22 -1
  42. package/dist/packages/nys-button/src/nys-button.d.ts +35 -4
  43. package/dist/packages/nys-card/src/nys-card.d.ts +20 -0
  44. package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +77 -7
  45. package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +46 -0
  46. package/dist/packages/nys-combobox/src/nys-combobox.d.ts +51 -6
  47. package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +44 -2
  48. package/dist/packages/nys-divider/src/nys-divider.d.ts +9 -0
  49. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +43 -0
  50. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +21 -1
  51. package/dist/packages/nys-fileinput/src/index.d.ts +1 -0
  52. package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +42 -6
  53. package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +9 -1
  54. package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +17 -0
  55. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +18 -0
  56. package/dist/packages/nys-icon/src/nys-icon.d.ts +18 -0
  57. package/dist/packages/nys-iconlist/src/nys-iconlist.d.ts +16 -0
  58. package/dist/packages/nys-label/src/nys-label.d.ts +3 -1
  59. package/dist/packages/nys-modal/src/nys-modal.d.ts +26 -2
  60. package/dist/packages/nys-pagination/src/nys-pagination.d.ts +21 -2
  61. package/dist/packages/nys-processlist/src/nys-processlist.d.ts +16 -0
  62. package/dist/packages/nys-processlist/src/nys-processlistitem.d.ts +1 -1
  63. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +29 -5
  64. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +66 -4
  65. package/dist/packages/nys-select/src/nys-select.d.ts +22 -4
  66. package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +8 -0
  67. package/dist/packages/nys-stepper/src/nys-step.d.ts +8 -1
  68. package/dist/packages/nys-stepper/src/nys-stepper.d.ts +8 -0
  69. package/dist/packages/nys-tab/src/nys-tab.d.ts +22 -3
  70. package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +12 -0
  71. package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +2 -0
  72. package/dist/packages/nys-table/src/nys-table.d.ts +39 -2
  73. package/dist/packages/nys-textarea/src/nys-textarea.d.ts +47 -4
  74. package/dist/packages/nys-textinput/src/nys-textinput.d.ts +42 -4
  75. package/dist/packages/nys-toggle/src/nys-toggle.d.ts +37 -3
  76. package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +13 -0
  77. package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +13 -0
  78. package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +26 -4
  79. package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +14 -0
  80. package/dist/packages/nys-verticalnav/src/nys-verticalnavgroup.d.ts +11 -0
  81. package/dist/packages/nys-video/src/nys-video.d.ts +14 -1
  82. package/package.json +31 -26
  83. package/packages/react/.turbo/turbo-build.log +0 -59
  84. package/packages/react/NysAccordion.d.ts +0 -75
  85. package/packages/react/NysAccordion.js +0 -24
  86. package/packages/react/NysAccordionItem.d.ts +0 -82
  87. package/packages/react/NysAccordionItem.js +0 -43
  88. package/packages/react/NysAlert.d.ts +0 -102
  89. package/packages/react/NysAlert.js +0 -61
  90. package/packages/react/NysAvatar.d.ts +0 -88
  91. package/packages/react/NysAvatar.js +0 -40
  92. package/packages/react/NysBacktotop.d.ts +0 -57
  93. package/packages/react/NysBacktotop.js +0 -23
  94. package/packages/react/NysBadge.d.ts +0 -78
  95. package/packages/react/NysBadge.js +0 -42
  96. package/packages/react/NysBreadcrumbItem.d.ts +0 -72
  97. package/packages/react/NysBreadcrumbItem.js +0 -42
  98. package/packages/react/NysBreadcrumbs.d.ts +0 -89
  99. package/packages/react/NysBreadcrumbs.js +0 -50
  100. package/packages/react/NysButton.d.ts +0 -171
  101. package/packages/react/NysButton.js +0 -83
  102. package/packages/react/NysCard.d.ts +0 -121
  103. package/packages/react/NysCard.js +0 -63
  104. package/packages/react/NysCheckbox.d.ts +0 -145
  105. package/packages/react/NysCheckbox.js +0 -78
  106. package/packages/react/NysCheckboxgroup.d.ts +0 -88
  107. package/packages/react/NysCheckboxgroup.js +0 -46
  108. package/packages/react/NysCombobox.d.ts +0 -126
  109. package/packages/react/NysCombobox.js +0 -66
  110. package/packages/react/NysDatepicker.d.ts +0 -128
  111. package/packages/react/NysDatepicker.js +0 -76
  112. package/packages/react/NysDivider.d.ts +0 -54
  113. package/packages/react/NysDivider.js +0 -22
  114. package/packages/react/NysDropdownMenu.d.ts +0 -59
  115. package/packages/react/NysDropdownMenu.js +0 -23
  116. package/packages/react/NysDropdownMenuItem.d.ts +0 -75
  117. package/packages/react/NysDropdownMenuItem.js +0 -47
  118. package/packages/react/NysErrorMessage.d.ts +0 -60
  119. package/packages/react/NysErrorMessage.js +0 -24
  120. package/packages/react/NysFileItem.d.ts +0 -69
  121. package/packages/react/NysFileItem.js +0 -37
  122. package/packages/react/NysFileinput.d.ts +0 -130
  123. package/packages/react/NysFileinput.js +0 -74
  124. package/packages/react/NysGlobalFooter.d.ts +0 -77
  125. package/packages/react/NysGlobalFooter.js +0 -32
  126. package/packages/react/NysGlobalHeader.d.ts +0 -82
  127. package/packages/react/NysGlobalHeader.js +0 -32
  128. package/packages/react/NysIcon.d.ts +0 -75
  129. package/packages/react/NysIcon.js +0 -50
  130. package/packages/react/NysIconlist.d.ts +0 -57
  131. package/packages/react/NysIconlist.js +0 -23
  132. package/packages/react/NysIconlistitem.d.ts +0 -63
  133. package/packages/react/NysIconlistitem.js +0 -23
  134. package/packages/react/NysLabel.d.ts +0 -81
  135. package/packages/react/NysLabel.js +0 -40
  136. package/packages/react/NysModal.d.ts +0 -90
  137. package/packages/react/NysModal.js +0 -50
  138. package/packages/react/NysOption.d.ts +0 -66
  139. package/packages/react/NysOption.js +0 -25
  140. package/packages/react/NysPagination.d.ts +0 -72
  141. package/packages/react/NysPagination.js +0 -45
  142. package/packages/react/NysProcesslist.d.ts +0 -65
  143. package/packages/react/NysProcesslist.js +0 -25
  144. package/packages/react/NysProcesslistitem.d.ts +0 -61
  145. package/packages/react/NysProcesslistitem.js +0 -35
  146. package/packages/react/NysRadiobutton.d.ts +0 -132
  147. package/packages/react/NysRadiobutton.js +0 -72
  148. package/packages/react/NysRadiogroup.d.ts +0 -104
  149. package/packages/react/NysRadiogroup.js +0 -62
  150. package/packages/react/NysSelect.d.ts +0 -119
  151. package/packages/react/NysSelect.js +0 -67
  152. package/packages/react/NysSkipnav.d.ts +0 -54
  153. package/packages/react/NysSkipnav.js +0 -22
  154. package/packages/react/NysStep.d.ts +0 -73
  155. package/packages/react/NysStep.js +0 -40
  156. package/packages/react/NysStepper.d.ts +0 -67
  157. package/packages/react/NysStepper.js +0 -26
  158. package/packages/react/NysTab.d.ts +0 -90
  159. package/packages/react/NysTab.js +0 -39
  160. package/packages/react/NysTabgroup.d.ts +0 -76
  161. package/packages/react/NysTabgroup.js +0 -22
  162. package/packages/react/NysTable.d.ts +0 -80
  163. package/packages/react/NysTable.js +0 -41
  164. package/packages/react/NysTabpanel.d.ts +0 -70
  165. package/packages/react/NysTabpanel.js +0 -21
  166. package/packages/react/NysTextarea.d.ts +0 -141
  167. package/packages/react/NysTextarea.js +0 -79
  168. package/packages/react/NysTextinput.d.ts +0 -144
  169. package/packages/react/NysTextinput.js +0 -83
  170. package/packages/react/NysToggle.d.ts +0 -102
  171. package/packages/react/NysToggle.js +0 -59
  172. package/packages/react/NysTooltip.d.ts +0 -60
  173. package/packages/react/NysTooltip.js +0 -24
  174. package/packages/react/NysUnavFooter.d.ts +0 -61
  175. package/packages/react/NysUnavFooter.js +0 -21
  176. package/packages/react/NysUnavHeader.d.ts +0 -95
  177. package/packages/react/NysUnavHeader.js +0 -54
  178. package/packages/react/NysVerticalnav.d.ts +0 -67
  179. package/packages/react/NysVerticalnav.js +0 -26
  180. package/packages/react/NysVerticalnavGroup.d.ts +0 -76
  181. package/packages/react/NysVerticalnavGroup.js +0 -43
  182. package/packages/react/NysVideo.d.ts +0 -83
  183. package/packages/react/NysVideo.js +0 -53
  184. package/packages/react/README.md +0 -92
  185. package/packages/react/index.d.ts +0 -49
  186. package/packages/react/index.js +0 -49
  187. package/packages/react/nysds-jsx.d.ts +0 -2009
  188. package/packages/react/react-utils.js +0 -40
@@ -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
- * @fires nys-input - Fired on input change. Detail: `{id, value}`.
17
- * @fires nys-focus - Fired when textarea gains focus.
18
- * @fires nys-blur - Fired when textarea loses focus. Triggers validation.
19
- * @fires nys-select - Fired when user selects text. Detail: `{id, value}`.
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
- * @fires nys-input - Fired on input change. Detail: `{id, value}`.
21
- * @fires nys-focus - Fired when input gains focus.
22
- * @fires nys-blur - Fired when input loses focus. Triggers validation.
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 - Fired when toggle state changes. Detail: `{id, checked}`.
16
- * @fires nys-focus - Fired when toggle gains focus.
17
- * @fires nys-blur - Fired when toggle loses focus.
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>
@@ -4,11 +4,23 @@ import "@nysds/nys-button";
4
4
  import "@nysds/nys-icon";
5
5
  import "@nysds/nys-textinput";
6
6
  import "@nysds/nys-alert";
7
- interface Language {
7
+ export interface Language {
8
8
  code: string;
9
9
  label: string;
10
10
  url?: string;
11
11
  }
12
+ /** Detail payload for the `nys-language-select` event fired by `nys-unavheader`. */
13
+ export interface NysUnavheaderLanguageSelectDetail {
14
+ language: Language;
15
+ }
16
+ /** The `nys-language-select` event fired by `nys-unavheader`. */
17
+ export type NysUnavheaderLanguageSelectEvent = CustomEvent<NysUnavheaderLanguageSelectDetail>;
18
+ /** Detail payload for the `nys-search-submit` event fired by `nys-unavheader`. */
19
+ export interface NysUnavheaderSearchSubmitDetail {
20
+ query: string;
21
+ }
22
+ /** The `nys-search-submit` event fired by `nys-unavheader`. */
23
+ export type NysUnavheaderSearchSubmitEvent = CustomEvent<NysUnavheaderSearchSubmitDetail>;
12
24
  /**
13
25
  * Statewide alert endpoint, read once per page load. Sites don't opt in or out and
14
26
  * never author the content, so an alert reads identically everywhere it appears.
@@ -51,8 +63,19 @@ export declare const NYS_ALERT_URL = "https://alerts-cta.static-assets.ny.gov/al
51
63
  * reaches every NYS site with no per-site work. If the endpoint is unreachable or nothing
52
64
  * is published, the header renders normally. It takes no children.
53
65
  *
54
- * @fires nys-language-select - Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect.
55
- * @fires nys-search-submit - Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect.
66
+ * @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.
67
+ * @fires {NysUnavheaderLanguageSelectEvent} nys-language-select - Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect.
68
+ * @fires {NysUnavheaderSearchSubmitEvent} nys-search-submit - Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect.
69
+ *
70
+ * @usagedos
71
+ * - Place at the top of every public-facing page.
72
+ * - Toggle search (`hideSearch`) and translate (`hideTranslate`) on/off depending on your needs.
73
+ * - Design your page so content below the header can shift down, since a statewide alert can appear at any time and adds height to the header.
74
+ *
75
+ * @usagedonts
76
+ * - Use on back office applications or internal sites that are not public-facing, instead use the `<nys-globalheader>` with the `nysLogo` property applied.
77
+ * - Place anywhere other than the top of the page.
78
+ * - Modify the universal header.
56
79
  *
57
80
  * @example Basic
58
81
  * ```html
@@ -274,4 +297,3 @@ export declare class NysUnavHeader extends NysElement {
274
297
  private get _landmarkLabel();
275
298
  render(): import("lit-html").TemplateResult<1>;
276
299
  }
277
- export {};
@@ -15,6 +15,20 @@ type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
15
15
  * @summary Responsive navigation that becomes an accordion on smaller screens.
16
16
  * @element nys-verticalnav
17
17
  *
18
+ * @usagedos
19
+ * - Use for navigation where every item links to a different page.
20
+ * - Use for section-level navigation within a site.
21
+ * - Support up to two levels of navigation: top-level links and one level of nested links.
22
+ * - Set `aria-current="page"` on the active link so the component can apply active styles and expand the current group.
23
+ * - Avoid excessive use of icons, colors, or badges in navigation items.
24
+ *
25
+ * @usagedonts
26
+ * - Use for in-page navigation, such as scrolling to sections on the same page.
27
+ * - Use for linear task flows, such as multi-step forms or wizards.
28
+ * - Use for filtering, tab switching, or other in-page interactions.
29
+ * - Nest more than one level of sub-items.
30
+ * - Overload with excessive use of icons, colors, or badges in navigation items.
31
+ *
18
32
  * @example Basic
19
33
  * ```html
20
34
  * <nys-verticalnav heading="Freshwater Fishing" headingLevel="h2">
@@ -1,5 +1,13 @@
1
1
  import { NysElement } from "@nysds/internals";
2
2
  import "@nysds/nys-icon";
3
+ /** Detail payload for the `nys-verticalnavgroup-toggle` event fired by `nys-verticalnavgroup`. */
4
+ export interface NysVerticalnavgroupToggleDetail {
5
+ id: string;
6
+ label: string;
7
+ expanded: boolean;
8
+ }
9
+ /** The `nys-verticalnavgroup-toggle` event fired by `nys-verticalnavgroup`. */
10
+ export type NysVerticalnavgroupToggleEvent = CustomEvent<NysVerticalnavgroupToggleDetail>;
3
11
  /**
4
12
  * Collapsible dropdown group for use inside `<nys-verticalnav>`.
5
13
  *
@@ -11,6 +19,9 @@ import "@nysds/nys-icon";
11
19
  *
12
20
  * @summary Collapsible link group for use within `<nys-verticalnav>`.
13
21
  * @element nys-verticalnavgroup
22
+ *
23
+ * @fires {Event} nys-child-resize - Fired when the group toggles so ancestor containers (for example nys-accordionitem) can resize. No detail. Bubbles and composed.
24
+ * @fires {NysVerticalnavgroupToggleEvent} nys-verticalnavgroup-toggle - Fired when the group is expanded or collapsed. Detail: `{id, label, expanded}`. Bubbles and composed.
14
25
  * */
15
26
  export declare class NysVerticalnavGroup extends NysElement {
16
27
  static styles: import("lit").CSSResult;
@@ -24,7 +24,20 @@ declare global {
24
24
  * @summary YouTube video player with thumbnail preview and accessibility announcements.
25
25
  * @element nys-video
26
26
  *
27
- * @fires nys-video-play - Fired when the user clicks the thumbnail to load the player.
27
+ * @fires {Event} nys-video-play - Fired when the user clicks the thumbnail to load the player.
28
+ *
29
+ * @usagedos
30
+ * - Use when motion or audio communicates something better than text or images alone.
31
+ * - Keep `titleText` to 50–60 characters.
32
+ * - Use a clear, high-quality thumbnail so users recognize it as a video.
33
+ * - Maintain the default `lazy` loading for better page performance.
34
+ * - Reserve space for the 16:9 ratio box to prevent layout shift.
35
+ * - Let users choose to start the video; avoid `autoplay` unless necessary.
36
+ *
37
+ * @usagedonts
38
+ * - Use video if the same message can be delivered clearly with text or a static image.
39
+ * - Rely on video alone to convey critical information. Always provide a text alternative.
40
+ * - Set `autoplay` without understanding that the video will be muted. `nys-video` enforces this automatically to protect users from unexpected noise.
28
41
  *
29
42
  * @example Basic
30
43
  * ```html