@nysds/components 1.20.0-alpha-3 → 1.20.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.
Files changed (136) hide show
  1. package/custom-elements.json +9101 -5385
  2. package/dist/.vscode/vscode.css-custom-data.json +5 -0
  3. package/dist/.vscode/vscode.html-custom-data.json +332 -30
  4. package/dist/custom-elements.json +9101 -5385
  5. package/dist/nys-icon.library-Bu3noJqZ-1mvg_e5Y.js +706 -0
  6. package/dist/nys-icon.library-Bu3noJqZ-1mvg_e5Y.js.map +1 -0
  7. package/dist/nys-icon.library-eNVZmfkf.js +696 -0
  8. package/dist/nys-icon.library-eNVZmfkf.js.map +1 -0
  9. package/dist/nysds.es.js +10460 -5393
  10. package/dist/nysds.es.js.map +1 -1
  11. package/dist/nysds.js +2436 -472
  12. package/dist/nysds.js.map +1 -1
  13. package/dist/packages/internals/src/aria-associate.d.ts +41 -0
  14. package/dist/packages/internals/src/form-control-mixin.d.ts +34 -0
  15. package/dist/packages/internals/src/id.d.ts +8 -0
  16. package/dist/packages/internals/src/identified-mixin.d.ts +23 -0
  17. package/dist/packages/internals/src/index.d.ts +7 -0
  18. package/dist/packages/internals/src/reflects-aria-mixin.d.ts +33 -0
  19. package/dist/packages/internals/src/test-helpers.d.ts +29 -0
  20. package/dist/packages/internals/src/types.d.ts +9 -0
  21. package/dist/packages/nys-accordion/src/nys-accordion.d.ts +72 -10
  22. package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +63 -8
  23. package/dist/packages/nys-alert/src/nys-alert.d.ts +95 -20
  24. package/dist/packages/nys-avatar/src/nys-avatar.d.ts +100 -7
  25. package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +75 -5
  26. package/dist/packages/nys-badge/src/nys-badge.d.ts +63 -6
  27. package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +79 -10
  28. package/dist/packages/nys-button/src/nys-button.d.ts +132 -26
  29. package/dist/packages/nys-card/src/index.d.ts +1 -0
  30. package/dist/packages/nys-card/src/nys-card.d.ts +325 -0
  31. package/dist/packages/nys-card/src/nys-card.figma.d.ts +1 -0
  32. package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +36 -12
  33. package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +81 -6
  34. package/dist/packages/nys-combobox/src/nys-combobox.d.ts +174 -5
  35. package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +83 -13
  36. package/dist/packages/nys-divider/src/nys-divider.d.ts +33 -9
  37. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +24 -15
  38. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +3 -12
  39. package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +22 -0
  40. package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +101 -12
  41. package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +23 -2
  42. package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +99 -9
  43. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +189 -6
  44. package/dist/packages/nys-icon/src/icon-cache.d.ts +11 -4
  45. package/dist/packages/nys-icon/src/icon-library-registry.d.ts +33 -16
  46. package/dist/packages/nys-icon/src/index.d.ts +2 -2
  47. package/dist/packages/nys-icon/src/nys-icon.d.ts +98 -8
  48. package/dist/packages/nys-iconlist/src/index.d.ts +2 -0
  49. package/dist/packages/nys-iconlist/src/nys-iconlist.d.ts +92 -0
  50. package/dist/packages/nys-iconlist/src/nys-iconlist.figma.d.ts +1 -0
  51. package/dist/packages/nys-iconlist/src/nys-iconlistitem.d.ts +32 -0
  52. package/dist/packages/nys-label/src/nys-label.d.ts +37 -2
  53. package/dist/packages/nys-modal/src/nys-modal.d.ts +145 -13
  54. package/dist/packages/nys-pagination/src/nys-pagination.d.ts +67 -3
  55. package/dist/packages/nys-processlist/src/index.d.ts +2 -0
  56. package/dist/packages/nys-processlist/src/nys-processlist.d.ts +184 -0
  57. package/dist/packages/nys-processlist/src/nys-processlist.figma.d.ts +1 -0
  58. package/dist/packages/nys-processlist/src/nys-processlistitem.d.ts +41 -0
  59. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +201 -7
  60. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +88 -6
  61. package/dist/packages/nys-select/src/nys-option.d.ts +0 -8
  62. package/dist/packages/nys-select/src/nys-select.d.ts +150 -15
  63. package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +4 -4
  64. package/dist/packages/nys-stepper/src/nys-step.d.ts +26 -20
  65. package/dist/packages/nys-stepper/src/nys-stepper.d.ts +128 -75
  66. package/dist/packages/nys-tab/src/nys-tab.d.ts +19 -10
  67. package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +181 -39
  68. package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +15 -24
  69. package/dist/packages/nys-table/src/nys-table.d.ts +90 -3
  70. package/dist/packages/nys-textarea/src/nys-textarea.d.ts +60 -10
  71. package/dist/packages/nys-textinput/src/nys-textinput.d.ts +77 -14
  72. package/dist/packages/nys-toggle/src/nys-toggle.d.ts +47 -10
  73. package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +48 -8
  74. package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +45 -4
  75. package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +216 -11
  76. package/dist/packages/nys-verticalnav/src/index.d.ts +2 -0
  77. package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +572 -0
  78. package/dist/packages/nys-verticalnav/src/nys-verticalnav.figma.d.ts +1 -0
  79. package/dist/packages/nys-verticalnav/src/nys-verticalnavgroup.d.ts +24 -0
  80. package/dist/packages/nys-video/src/nys-video.d.ts +67 -7
  81. package/dist/src/index.d.ts +6 -2
  82. package/package.json +11 -6
  83. package/packages/react/NysAccordion.d.ts +10 -0
  84. package/packages/react/NysAccordion.js +2 -1
  85. package/packages/react/NysAccordionItem.d.ts +10 -0
  86. package/packages/react/NysAccordionItem.js +3 -1
  87. package/packages/react/NysAlert.d.ts +8 -10
  88. package/packages/react/NysAlert.js +0 -2
  89. package/packages/react/NysAvatar.d.ts +11 -1
  90. package/packages/react/NysBacktotop.d.ts +3 -0
  91. package/packages/react/NysBacktotop.js +2 -1
  92. package/packages/react/NysBreadcrumbs.d.ts +2 -2
  93. package/packages/react/NysButton.d.ts +38 -8
  94. package/packages/react/NysButton.js +6 -4
  95. package/packages/react/NysCard.d.ts +110 -0
  96. package/packages/react/NysCard.js +61 -0
  97. package/packages/react/NysCheckbox.d.ts +9 -0
  98. package/packages/react/NysCheckbox.js +4 -0
  99. package/packages/react/NysDropdownMenu.d.ts +4 -2
  100. package/packages/react/NysFileinput.d.ts +2 -2
  101. package/packages/react/NysGlobalFooter.d.ts +17 -0
  102. package/packages/react/NysGlobalFooter.js +10 -2
  103. package/packages/react/NysGlobalHeader.d.ts +17 -0
  104. package/packages/react/NysGlobalHeader.js +11 -2
  105. package/packages/react/NysIconlist.d.ts +54 -0
  106. package/packages/react/NysIconlist.js +22 -0
  107. package/packages/react/NysIconlistitem.d.ts +59 -0
  108. package/packages/react/NysIconlistitem.js +22 -0
  109. package/packages/react/NysLabel.d.ts +4 -1
  110. package/packages/react/NysModal.d.ts +8 -1
  111. package/packages/react/NysModal.js +11 -2
  112. package/packages/react/NysProcesslist.d.ts +65 -0
  113. package/packages/react/NysProcesslist.js +25 -0
  114. package/packages/react/NysProcesslistitem.d.ts +61 -0
  115. package/packages/react/NysProcesslistitem.js +35 -0
  116. package/packages/react/NysRadiobutton.d.ts +27 -3
  117. package/packages/react/NysRadiobutton.js +9 -1
  118. package/packages/react/NysSelect.d.ts +3 -0
  119. package/packages/react/NysSelect.js +2 -0
  120. package/packages/react/NysStepper.d.ts +1 -1
  121. package/packages/react/NysTabgroup.d.ts +5 -4
  122. package/packages/react/NysTable.d.ts +1 -1
  123. package/packages/react/NysTabpanel.d.ts +11 -4
  124. package/packages/react/NysTextarea.d.ts +4 -1
  125. package/packages/react/NysTextarea.js +2 -0
  126. package/packages/react/NysUnavFooter.d.ts +13 -0
  127. package/packages/react/NysUnavFooter.js +4 -1
  128. package/packages/react/NysUnavHeader.d.ts +24 -1
  129. package/packages/react/NysUnavHeader.js +17 -1
  130. package/packages/react/NysVerticalnav.d.ts +67 -0
  131. package/packages/react/NysVerticalnav.js +26 -0
  132. package/packages/react/NysVerticalnavGroup.d.ts +76 -0
  133. package/packages/react/NysVerticalnavGroup.js +43 -0
  134. package/packages/react/index.d.ts +7 -0
  135. package/packages/react/index.js +7 -0
  136. package/packages/react/nysds-jsx.d.ts +404 -46
@@ -0,0 +1,572 @@
1
+ import { NysElement } from "@nysds/internals";
2
+ import "./nys-verticalnavgroup";
3
+ import "@nysds/nys-accordion";
4
+ type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
5
+ /**
6
+ * Vertical navigation component with responsive desktop/mobile behavior.
7
+ *
8
+ * Renders as a side navigation on desktop and collapses into a
9
+ * `<nys-accordion>` on tablet and mobile. The default slot accepts a
10
+ * `<ul>` of links with optional section headings (`<h2>` to `<h6>`) or
11
+ * `<nys-verticalnavgroup>` elements. Use the `heading` slot to replace the
12
+ * generated heading and the `footer` slot for additional content below the
13
+ * navigation.
14
+ *
15
+ * @summary Responsive navigation that becomes an accordion on smaller screens.
16
+ * @element nys-verticalnav
17
+ *
18
+ * @example Basic
19
+ * ```html
20
+ * <nys-verticalnav heading="Freshwater Fishing" headingLevel="h2">
21
+ * <ul>
22
+ * <li><a href="/">Home</a></li>
23
+ * <li><a href="/services">Services</a></li>
24
+ * <li>
25
+ * <h3>Freshwater Fishing Regulations</h3>
26
+ * <ul>
27
+ * <li><a href="">Places to Fish</a></li>
28
+ * <li><a href="">Learn to Fish</a></li>
29
+ * <li><a href="">Ice Fishing</a></li>
30
+ * </ul>
31
+ * </li>
32
+ * </ul>
33
+ * </nys-verticalnav>
34
+ * ```
35
+ *
36
+ * @example Header slot
37
+ * ```html
38
+ * <nys-verticalnav heading="Freshwater Fishing" headingLevel="h2">
39
+ * <div slot="header">
40
+ * <h2>Freshwater Fishing</h2>
41
+ * <p>2026 Season Open</p>
42
+ * </div>
43
+ * <ul>
44
+ * <li><a href="/">Home</a></li>
45
+ * <li><a href="/services">Services</a></li>
46
+ * <li>
47
+ * <h3>Freshwater Fishing Regulations</h3>
48
+ * <ul>
49
+ * <li><a href="">Places to Fish</a></li>
50
+ * <li><a href="">Learn to Fish</a></li>
51
+ * <li><a href="">Ice Fishing</a></li>
52
+ * </ul>
53
+ * </li>
54
+ * </ul>
55
+ * </nys-verticalnav>
56
+ * ```
57
+ *
58
+ * @render Header slot
59
+ * ```html
60
+ * <style>
61
+ * [slot="header"] p {
62
+ * margin: 0;
63
+ * font-size: var(--nys-font-size-xs, 0.75rem);
64
+ * font-weight: 500;
65
+ * letter-spacing: 0.08em;
66
+ * color: var(--nys-color-success, #2e7d32);
67
+ * }
68
+ * [slot="header"] h2 {
69
+ * margin: 0;
70
+ * font-size: var(--nys-font-size-h4, 1.25rem);
71
+ * color: var(--nys-color-theme, #154973);
72
+ * }
73
+ * </style>
74
+ *
75
+ * <nys-verticalnav heading="Freshwater Fishing" headingLevel="h2">
76
+ * <div slot="header">
77
+ * <h2>Freshwater Fishing</h2>
78
+ * <p>2026 Season Open</p>
79
+ * </div>
80
+ * <ul>
81
+ * <li><a href="/">Home</a></li>
82
+ * <li><a href="/services">Services</a></li>
83
+ * <li>
84
+ * <h3>Freshwater Fishing Regulations</h3>
85
+ * <ul>
86
+ * <li><a href="">Places to Fish</a></li>
87
+ * <li><a href="">Learn to Fish</a></li>
88
+ * <li><a href="">Ice Fishing</a></li>
89
+ * </ul>
90
+ * </li>
91
+ * </ul>
92
+ * </nys-verticalnav>
93
+ * ```
94
+ *
95
+ * @example Footer slot
96
+ * ```html
97
+ * <nys-verticalnav heading="Freshwater Fishing" headingLevel="h2">
98
+ * <ul>
99
+ * <li><a href="/">Home</a></li>
100
+ * <li><a href="/services">Services</a></li>
101
+ * <li>
102
+ * <h3>Freshwater Fishing Regulations</h3>
103
+ * <ul>
104
+ * <li><a href="">Places to Fish</a></li>
105
+ * <li><a href="">Learn to Fish</a></li>
106
+ * <li><a href="">Ice Fishing</a></li>
107
+ * </ul>
108
+ * </li>
109
+ * </ul>
110
+ * <div slot="footer" style="font-size:0.875rem;color:#555;padding-top:0.5rem">
111
+ * <nys-divider></nys-divider>
112
+ * <p>Regulations last updated: January 2026</p>
113
+ * <a href="/contact-dec">Contact the DEC for fishing inquiries</a>
114
+ * </div>
115
+ * </nys-verticalnav>
116
+ * ```
117
+ *
118
+ * @render Footer slot
119
+ * ```html
120
+ * <style>
121
+ * [slot="footer"] {
122
+ * display: flex;
123
+ * flex-direction: column;
124
+ * gap: var(--nys-space-100, 8px);
125
+ * }
126
+ * [slot="footer"] p {
127
+ * margin: 0;
128
+ * font-size: var(--nys-font-size-xs, 0.75rem);
129
+ * color: var(--nys-color-text-weak, #4a4d4f);
130
+ * }
131
+ * [slot="footer"] a {
132
+ * font-size: var(--nys-font-size-sm, 0.875rem);
133
+ * color: var(--nys-color-theme, #154973);
134
+ * }
135
+ * </style>
136
+ *
137
+ * <nys-verticalnav heading="Freshwater Fishing" headingLevel="h2">
138
+ * <ul>
139
+ * <li><a href="/">Home</a></li>
140
+ * <li><a href="/services">Services</a></li>
141
+ * <li>
142
+ * <h3>Freshwater Fishing Regulations</h3>
143
+ * <ul>
144
+ * <li><a href="">Places to Fish</a></li>
145
+ * <li><a href="">Learn to Fish</a></li>
146
+ * <li><a href="">Ice Fishing</a></li>
147
+ * </ul>
148
+ * </li>
149
+ * </ul>
150
+ *
151
+ * <div slot="footer" style="font-size:0.875rem;color:#555;padding-top:0.5rem">
152
+ * <nys-divider></nys-divider>
153
+ * <p>Regulations last updated: January 2026</p>
154
+ * <a href="/contact-dec">Contact the DEC for fishing inquiries</a>
155
+ * </div>
156
+ * </nys-verticalnav>
157
+ * ```
158
+ *
159
+ * @example Header and footer slot
160
+ * ```html
161
+ * <nys-verticalnav heading="Freshwater Fishing" headingLevel="h2">
162
+ * <div slot="header">
163
+ * <h2>Freshwater Fishing</h2>
164
+ * <p>2026 Season Open</p>
165
+ * </div>
166
+ * <ul>
167
+ * <li><a href="/">Home</a></li>
168
+ * <li><a href="/services">Services</a></li>
169
+ * <li>
170
+ * <h3>Freshwater Fishing Regulations</h3>
171
+ * <ul>
172
+ * <li><a href="">Places to Fish</a></li>
173
+ * <li><a href="">Learn to Fish</a></li>
174
+ * <li><a href="">Ice Fishing</a></li>
175
+ * </ul>
176
+ * </li>
177
+ * </ul>
178
+ * <div slot="footer">
179
+ * <nys-divider></nys-divider>
180
+ * <p>Regulations last updated: January 2026</p>
181
+ * <a href="/contact-dec">Contact the DEC for fishing inquiries</a>
182
+ * </div>
183
+ * </nys-verticalnav>
184
+ * ```
185
+ *
186
+ * @render Header and footer slot
187
+ * ```html
188
+ * <style>
189
+ * [slot="header"] p {
190
+ * margin: 0;
191
+ * font-size: var(--nys-font-size-xs, 0.75rem);
192
+ * letter-spacing: 0.08em;
193
+ * color: var(--nys-color-success, #2e7d32);
194
+ * font-weight: 500;
195
+ * }
196
+ * [slot="header"] h2 {
197
+ * margin: 0;
198
+ * font-size: var(--nys-font-size-h4, 1.25rem);
199
+ * color: var(--nys-color-theme, #154973);
200
+ * }
201
+ * [slot="footer"] {
202
+ * display: flex;
203
+ * flex-direction: column;
204
+ * gap: var(--nys-space-100, 8px);
205
+ * }
206
+ * [slot="footer"] p {
207
+ * margin: 0;
208
+ * font-size: var(--nys-font-size-xs, 0.75rem);
209
+ * color: var(--nys-color-text-weak, #4a4d4f);
210
+ * }
211
+ * [slot="footer"] a {
212
+ * font-size: var(--nys-font-size-sm, 0.875rem);
213
+ * color: var(--nys-color-theme, #154973);
214
+ * }
215
+ * </style>
216
+ *
217
+ * <nys-verticalnav heading="Freshwater Fishing" headingLevel="h2">
218
+ * <div slot="header">
219
+ * <h2>Freshwater Fishing</h2>
220
+ * <p>2026 Season Open</p>
221
+ * </div>
222
+ * <ul>
223
+ * <li><a href="/">Home</a></li>
224
+ * <li><a href="/services">Services</a></li>
225
+ * <li>
226
+ * <h3>Freshwater Fishing Regulations</h3>
227
+ * <ul>
228
+ * <li><a href="">Places to Fish</a></li>
229
+ * <li><a href="">Learn to Fish</a></li>
230
+ * <li><a href="">Ice Fishing</a></li>
231
+ * </ul>
232
+ * </li>
233
+ * </ul>
234
+ *
235
+ * <div slot="footer">
236
+ * <nys-divider></nys-divider>
237
+ * <p>Regulations last updated: January 2026</p>
238
+ * <a href="/contact-dec">Contact the DEC for fishing inquiries</a>
239
+ * </div>
240
+ * </nys-verticalnav>
241
+ * ```
242
+ *
243
+ * @example Dropdown group
244
+ * ```html
245
+ * <nys-verticalnav heading="NYS Design System" headingLevel="h2">
246
+ * <ul>
247
+ * <li><a href="/">Foundations</a></li>
248
+ * <li><a href="/components">Components</a></li>
249
+ * <li>
250
+ * <nys-verticalnavgroup label="Accessibility">
251
+ * <ul>
252
+ * <li><a href="">WCAG Guidelines</a></li>
253
+ * <li><a href="">Screen Readers</a></li>
254
+ * <li><a href="">Color Contrast</a></li>
255
+ * </ul>
256
+ * </nys-verticalnavgroup>
257
+ * </li>
258
+ * <li>
259
+ * <h3>Resources</h3>
260
+ * <ul>
261
+ * <li><a href="">Design Tokens</a></li>
262
+ * <li><a href="">Utilities</a></li>
263
+ * </ul>
264
+ * </li>
265
+ * </ul>
266
+ * </nys-verticalnav>
267
+ * ```
268
+ *
269
+ * @example Active state
270
+ * ```html
271
+ * <nys-verticalnav heading="NYS Design System" headingLevel="h2">
272
+ * <ul>
273
+ * <li><a href="/">Foundations</a></li>
274
+ * <li><a href="/components">Components</a></li>
275
+ * <li>
276
+ * <nys-verticalnavgroup label="Accessibility">
277
+ * <ul>
278
+ * <li>
279
+ * <a aria-current="page" href="">
280
+ * WCAG Guidelines
281
+ * </a>
282
+ * </li>
283
+ * <li><a href="">Screen Readers</a></li>
284
+ * <li><a href="">Color Contrast</a></li>
285
+ * </ul>
286
+ * </nys-verticalnavgroup>
287
+ * </li>
288
+ * <li>
289
+ * <h3>Resources</h3>
290
+ * <ul>
291
+ * <li><a href="">Design Tokens</a></li>
292
+ * <li><a href="">Utilities</a></li>
293
+ * </ul>
294
+ * </li>
295
+ * </ul>
296
+ * </nys-verticalnav>
297
+ * ```
298
+ *
299
+ * @example Disabled state
300
+ * An `<a>` without `href` is not a link and is not focusable, so a disabled item
301
+ * marked only with `aria-disabled` would be conveyed by color alone and skipped by
302
+ * keyboard users. Author disabled items with `role="link"` and `tabindex="0"` so the
303
+ * state is reachable and announced; the component adds both automatically if omitted.
304
+ * ```html
305
+ * <nys-verticalnav heading="NYS Design System" headingLevel="h2">
306
+ * <ul>
307
+ * <li><a href="/">Foundations</a></li>
308
+ * <li><a href="/components">Components</a></li>
309
+ * <li>
310
+ * <nys-verticalnavgroup disabled label="Accessibility">
311
+ * <ul>
312
+ * <li>
313
+ * <a role="link" tabindex="0" aria-disabled="true">WCAG Guidelines</a>
314
+ * </li>
315
+ * <li><a href="">Screen Readers</a></li>
316
+ * <li><a href="">Color Contrast</a></li>
317
+ * </ul>
318
+ * </nys-verticalnavgroup>
319
+ * </li>
320
+ * <li>
321
+ * <h3>Resources</h3>
322
+ * <ul>
323
+ * <li>
324
+ * <a role="link" tabindex="0" aria-disabled="true">Design Tokens</a>
325
+ * </li>
326
+ * <li><a href="">Utilities</a></li>
327
+ * </ul>
328
+ * </li>
329
+ * </ul>
330
+ * </nys-verticalnav>
331
+ * ```
332
+ *
333
+ * @example Hidden heading
334
+ * ```html
335
+ * <nys-verticalnav heading="NYS Design System" hideHeading>
336
+ * <ul>
337
+ * <li><a href="/">Foundations</a></li>
338
+ * <li><a href="/components">Components</a></li>
339
+ * <li>
340
+ * <nys-verticalnavgroup disabled label="Accessibility">
341
+ * <ul>
342
+ * <li>
343
+ * <a role="link" tabindex="0" aria-disabled="true">WCAG Guidelines</a>
344
+ * </li>
345
+ * <li><a href="">Screen Readers</a></li>
346
+ * <li><a href="">Color Contrast</a></li>
347
+ * </ul>
348
+ * </nys-verticalnavgroup>
349
+ * </li>
350
+ * <li>
351
+ * <h3>Resources</h3>
352
+ * <ul>
353
+ * <li>
354
+ * <a role="link" tabindex="0" aria-disabled="true">Design Tokens</a>
355
+ * </li>
356
+ * <li><a href="">Utilities</a></li>
357
+ * </ul>
358
+ * </li>
359
+ * </ul>
360
+ * </nys-verticalnav>
361
+ * ```
362
+ *
363
+ * @example Page layout
364
+ * ```html
365
+ * <div class="story-page">
366
+ * <nys-unavheader></nys-unavheader>
367
+ *
368
+ * <nys-globalheader
369
+ * homepageLink="https://ny.gov"
370
+ * agencyName="Office of Information Technology Services"
371
+ * >
372
+ * <ul>
373
+ * <li><a href="https://its.ny.gov/services">Services</a></li>
374
+ * <li><a href="https://its.ny.gov/get-help">Help Center</a></li>
375
+ * <li><a href="https://its.ny.gov/cybersecurity">Cybersecurity</a></li>
376
+ * <li><a href="https://its.ny.gov/policies">Policies and Laws</a></li>
377
+ * <li><a href="https://its.ny.gov/procurement">Procurement</a></li>
378
+ * <li><a href="https://its.ny.gov/about-us">About Us</a></li>
379
+ * </ul>
380
+ * </nys-globalheader>
381
+ *
382
+ * <div class="story-page__body">
383
+ * <div class="story-page__body--side">
384
+ * <nys-verticalnav heading="NYS Design System" headingLevel="h2">
385
+ * <ul>
386
+ * <li><a href="/">Foundations</a></li>
387
+ * <li><a href="/components" aria-current="page">Components</a></li>
388
+ * <li>
389
+ * <nys-verticalnavgroup label="Accessibility">
390
+ * <ul>
391
+ * <li><a href="">WCAG Guidelines</a></li>
392
+ * <li><a href="">Screen Readers</a></li>
393
+ * <li><a href="">Color Contrast</a></li>
394
+ * </ul>
395
+ * </nys-verticalnavgroup>
396
+ * </li>
397
+ * <li>
398
+ * <h3>Resources</h3>
399
+ * <ul>
400
+ * <li><a href="">Design Tokens</a></li>
401
+ * <li><a href="">Utilities</a></li>
402
+ * <li><a href="">Learn</a></li>
403
+ * <li><a href="">What's New</a></li>
404
+ * </ul>
405
+ * </li>
406
+ * </ul>
407
+ * </nys-verticalnav>
408
+ * </div>
409
+ *
410
+ * <main class="story-page__body--main">
411
+ * <p>Place content here.</p>
412
+ * <nys-button
413
+ * label="Toggle Expand/Collapse for vertical nav (mobile)"
414
+ * onclick="document.querySelector('nys-verticalnav').toggle()"
415
+ * ></nys-button>
416
+ * </main>
417
+ * </div>
418
+ *
419
+ * <nys-globalfooter agencyName="{agencyName}" homepageLink="https://">
420
+ * <ul>
421
+ * <li><a href="https://">Privacy Policy</a></li>
422
+ * <li><a href="https://">Terms of Service</a></li>
423
+ * </ul>
424
+ * </nys-globalfooter>
425
+ *
426
+ * <nys-unavfooter></nys-unavfooter>
427
+ * </div>
428
+ * ```
429
+ *
430
+ * @render Page layout
431
+ * <style>
432
+ * .page-layout__body {
433
+ * background-color: var(--nys-color-white, #ffffff);
434
+ * }
435
+ * .page-layout__nav {
436
+ * padding: var(--nys-space-300, 24px) var(--nys-space-50, 4px) var(--nys-space-300, 24px) 0;
437
+ * }
438
+ * .page-layout__main {
439
+ * padding: var(--nys-space-400, 32px);
440
+ * }
441
+ *</style>
442
+ *<div>
443
+ * <nys-unavheader></nys-unavheader>
444
+ * <nys-globalheader homepageLink="https://ny.gov" agencyName="Office of Information Technology Services">
445
+ * <ul>
446
+ * <li><a href="https://its.ny.gov/services">Services</a></li>
447
+ * <li><a href="https://its.ny.gov/get-help">Help Center</a></li>
448
+ * </ul>
449
+ * </nys-globalheader>
450
+ * <div class="page-layout__body">
451
+ * <div class="nys-grid-container nys-grid-gap-400">
452
+ * <div class="nys-grid-row">
453
+ * <div class="nys-desktop:nys-grid-col page-layout__nav">
454
+ * <nys-verticalnav heading="NYS Design System" headingLevel="h2">
455
+ * <ul>
456
+ * <li><a href="/">Foundations</a></li>
457
+ * <li><a href="/components">Components</a></li>
458
+ * <li>
459
+ * <nys-verticalnavgroup label="Accessibility">
460
+ * <ul>
461
+ * <li><a href="">WCAG Guidelines</a></li>
462
+ * <li><a href="">Screen Readers</a></li>
463
+ * <li><a href="">Color Contrast</a></li>
464
+ * </ul>
465
+ * </nys-verticalnavgroup>
466
+ * </li>
467
+ * <li>
468
+ * <h3>Resources</h3>
469
+ * <ul>
470
+ * <li><a href="">Design Tokens</a></li>
471
+ * <li><a href="">Utilities</a></li>
472
+ * </ul>
473
+ * </li>
474
+ * </ul>
475
+ * </nys-verticalnav>
476
+ * </div>
477
+ * <main class="nys-desktop:nys-grid-col page-layout__main">
478
+ * <p>Place content here.</p>
479
+ * </main>
480
+ * </div>
481
+ * </div>
482
+ * </div>
483
+ * <nys-globalfooter agencyName="Agency Name" homepageLink="https://ny.gov">
484
+ * <ul>
485
+ * <li><a href="https://"> Privacy Policy </a></li>
486
+ * <li><a href="https://"> Terms of Service </a></li>
487
+ * </ul>
488
+ * </nys-globalfooter>
489
+ * <nys-unavfooter></nys-unavfooter>
490
+ *</div>
491
+ * ```
492
+ */
493
+ export declare class NysVerticalnav extends NysElement {
494
+ static styles: import("lit").CSSResult;
495
+ /** ID for the navigation. Generated automatically if not provided. */
496
+ id: string;
497
+ /** Heading text displayed at the top of the navigation. Defaults to "Page navigation". */
498
+ heading: string;
499
+ /** Hides the visible heading while keeping an accessible label for the navigation. */
500
+ hideHeading: boolean;
501
+ /** Heading level used for the navigation heading (`h1` through `h6`). */
502
+ headingLevel: HeadingLevel;
503
+ /** Expands or collapses the navigation on mobile. */
504
+ expanded: boolean;
505
+ private _isMobile;
506
+ private _mediaQuery;
507
+ /**
508
+ * Lifecycle methods
509
+ * --------------------------------------------------------------------------
510
+ */
511
+ connectedCallback(): void;
512
+ disconnectedCallback(): void;
513
+ updated(): void;
514
+ /**
515
+ * Public API for controlling the mobile accordion from outside the component
516
+ * --------------------------------------------------------------------------
517
+ */
518
+ open(): void;
519
+ close(): void;
520
+ toggle(): void;
521
+ /**
522
+ * Functions
523
+ * --------------------------------------------------------------------------
524
+ */
525
+ private _handleAccordionToggle;
526
+ private _handleResize;
527
+ private _handleSlotChange;
528
+ private _handleHeaderSlotChange;
529
+ /**
530
+ * The element a consumer supplied to the `header` slot, or null when the slot is
531
+ * empty (in which case the generated heading renders as the slot's fallback).
532
+ */
533
+ private _slottedHeader;
534
+ /**
535
+ * Give the <nav> landmark an accessible name.
536
+ *
537
+ * The generated heading is the header slot's FALLBACK content, so it does not
538
+ * exist once a consumer fills that slot — an `aria-labelledby` IDREF pointing at
539
+ * it would dangle and leave the landmark unnamed (WCAG 4.1.2 / 2.4.1). When the
540
+ * slot is filled, the name comes from the consumer's heading, which lives in the
541
+ * light DOM and cannot be reached by an IDREF from inside the shadow root:
542
+ * `associateControlRefs` sets the nav's own `ariaLabelledByElements` (element
543
+ * references may point into an enclosing scope) plus a string fallback for engines
544
+ * that do not yet honor them. The `heading` property is the intended name, so it
545
+ * overrides the fallback string derived from the slotted content's full text.
546
+ *
547
+ * When the slot is empty the same-root IDREF to the generated heading is used, and
548
+ * a hidden heading falls back to `aria-label`. All of this is applied imperatively
549
+ * (never as template bindings) so Lit cannot fight the attributes written here.
550
+ */
551
+ private _syncNavLabel;
552
+ private _applyActiveState;
553
+ /**
554
+ * Helper Render Functions
555
+ * --------------------------------------------------------------------------
556
+ */
557
+ private _renderHeading;
558
+ private renderContentDesktop;
559
+ /**
560
+ * The heading level for the mobile disclosure trigger.
561
+ *
562
+ * Below 1024px the navigation heading IS the accordion trigger, so it has to
563
+ * land at the same outline position the desktop heading occupies — otherwise
564
+ * the nav's place in the outline changes with the viewport. `nys-accordion`
565
+ * runs h2-h6 (a disclosure trigger is never a page title), so the one level
566
+ * this nav offers that it does not, `h1`, maps to the next valid level.
567
+ */
568
+ private _accordionHeadingLevel;
569
+ private renderContentMobile;
570
+ render(): import("lit-html").TemplateResult<1>;
571
+ }
572
+ export {};
@@ -0,0 +1,24 @@
1
+ import { NysElement } from "@nysds/internals";
2
+ import "@nysds/nys-icon";
3
+ /**
4
+ * Collapsible dropdown group for use inside `<nys-verticalnav>`.
5
+ *
6
+ * Renders a toggle button and an expandable panel for a nested `<ul>` of links.
7
+ * Designed to be placed as a direct child of a `<li>` inside the vertical nav's
8
+ * default slot. Use `expanded` to open it by default, and `disabled` to prevent
9
+ * interaction. Set `aria-current="page"` on an `<a>` inside to automatically
10
+ * expand the group and apply the active state.
11
+ *
12
+ * @summary Collapsible link group for use within `<nys-verticalnav>`.
13
+ * @element nys-verticalnavgroup
14
+ * */
15
+ export declare class NysVerticalnavGroup extends NysElement {
16
+ static styles: import("lit").CSSResult;
17
+ id: string;
18
+ label: string;
19
+ expanded: boolean;
20
+ disabled: boolean;
21
+ active: boolean;
22
+ private _toggle;
23
+ render(): import("lit-html").TemplateResult<1>;
24
+ }