@nysds/components 1.23.1 → 1.24.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 (41) hide show
  1. package/custom-elements.json +547 -127
  2. package/dist/.vscode/vscode.html-custom-data.json +53 -43
  3. package/dist/custom-elements.json +547 -127
  4. package/dist/{nys-icon.library-BoTLZp1N.js → nys-icon.library-C3fdrsXK.js} +2 -2
  5. package/dist/{nys-icon.library-BoTLZp1N.js.map → nys-icon.library-C3fdrsXK.js.map} +1 -1
  6. package/dist/{nys-icon.library-CzPN4H8R-DCkPqUYP.js → nys-icon.library-CHrtmOCL-BdLMRCBm.js} +3 -3
  7. package/dist/{nys-icon.library-CzPN4H8R-DCkPqUYP.js.map → nys-icon.library-CHrtmOCL-BdLMRCBm.js.map} +1 -1
  8. package/dist/nysds.es.js +4090 -3834
  9. package/dist/nysds.es.js.map +1 -1
  10. package/dist/nysds.js +329 -335
  11. package/dist/nysds.js.map +1 -1
  12. package/dist/packages/mcp-server/src/lib/framework-snippets.d.ts +1 -1
  13. package/dist/packages/mcp-server/src/lib/framework-usage.d.ts +2 -1
  14. package/dist/packages/mcp-server/src/lib/icons.d.ts +18 -0
  15. package/dist/packages/mcp-server/src/lib/search.d.ts +1 -5
  16. package/dist/packages/mcp-server/src/lib/token-parser.d.ts +44 -1
  17. package/dist/packages/mcp-server/src/resources/components.d.ts +1 -1
  18. package/dist/packages/mcp-server/src/resources/guides.d.ts +1 -1
  19. package/dist/packages/mcp-server/src/tools/guide-tools.d.ts +10 -0
  20. package/dist/packages/mcp-server/src/tools/utility-tools.d.ts +36 -16
  21. package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +7 -27
  22. package/dist/packages/nys-button/src/nys-button.d.ts +6 -5
  23. package/dist/packages/nys-card/src/nys-card.d.ts +1 -1
  24. package/dist/packages/nys-combobox/src/nys-combobox.d.ts +1 -0
  25. package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +1 -0
  26. package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +9 -18
  27. package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +8 -0
  28. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +2 -1
  29. package/dist/packages/nys-icon/src/nys-icon.d.ts +6 -4
  30. package/dist/packages/nys-iconlist/src/nys-iconlistitem.d.ts +2 -2
  31. package/dist/packages/nys-modal/src/nys-modal.d.ts +1 -6
  32. package/dist/packages/nys-onthispage/src/index.d.ts +1 -0
  33. package/dist/packages/nys-onthispage/src/nys-onthispage.d.ts +418 -0
  34. package/dist/packages/nys-onthispage/src/nys-onthispage.figma.d.ts +1 -0
  35. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +1 -0
  36. package/dist/packages/nys-select/src/nys-select.d.ts +1 -0
  37. package/dist/packages/nys-stepper/src/nys-stepper.d.ts +2 -2
  38. package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +8 -8
  39. package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +11 -0
  40. package/dist/src/index.d.ts +1 -0
  41. package/package.json +2 -2
@@ -0,0 +1,418 @@
1
+ import { nothing } from "lit";
2
+ import { NysElement } from "@nysds/internals";
3
+ type HeadingTag = "h2" | "h3" | "h4" | "h5" | "h6";
4
+ type HashBehavior = "none" | "hash" | "replace";
5
+ /** Detail payload for the `nys-click` event. */
6
+ interface NysOnThisPageClickDetail {
7
+ id: string;
8
+ label: string;
9
+ index: number;
10
+ }
11
+ /** The `nys-click` event, fired on a committed selection. */
12
+ export type NysOnThisPageClickEvent = CustomEvent<NysOnThisPageClickDetail>;
13
+ /**
14
+ * In-page navigation that lists the headings on a page as links, so users can jump to a section.
15
+ * The link for the section the user is currently reading is highlighted.
16
+ *
17
+ * The component collects headings from the `scope` element (default `main`) at the `headingTracker`
18
+ * level (default `h2`). Headings without an `id` get one generated from their text. Headings inside
19
+ * `nys-accordion`, inside a `[hidden]` element, or marked with `data-nys-onthispage-ignore` are left out.
20
+ * Nothing renders until at least two headings are found.
21
+ *
22
+ * Clicking a link scrolls to the heading and moves focus to it.
23
+ *
24
+ * @summary In-page navigation that links to page headings and highlights the current section.
25
+ * @element nys-onthispage
26
+ *
27
+ * @fires {NysOnThisPageClickEvent} nys-click - Fired when a link is activated, by mouse or keyboard. Detail: `{id, label, index}`.
28
+ *
29
+ * @usage
30
+ * - Use as a table of contents on lengthy pages to give a structural overview and let users jump to a section.
31
+ * - Use on pages with at least three distinct sections, or content longer than three screen heights.
32
+ * - Keep the link order the same as the order of the section headings on the page.
33
+ * - Use "On this page" as the heading so the nav is clearly labeled and stands apart from other links.
34
+ * - Keep the link text identical to the heading it links to.
35
+ * - Let link text wrap to a second line instead of truncating it.
36
+ * - Clearly show the active link so users can track their position as they scroll or after they click a link.
37
+ * - On desktop, place it in the left sidebar. If vertical navigation is on the left, place it in the right sidebar.
38
+ * - On tablet and mobile, place it above the main content and below the page heading.
39
+ * - Don't use on pages with minimal content or a small number of sections, where scrolling isn't an issue.
40
+ * - Don't use to link to other pages. Use `<nys-verticalnav>` instead.
41
+ * - Don't use for heading levels lower than H3, such as H4, H5, or H6.
42
+ * - Don't shorten, rephrase, or summarize a heading for its link.
43
+ *
44
+ * @example Basic
45
+ * ```html
46
+ * <div style="display: flex; gap: 2rem; align-items: flex-start;">
47
+ * <nys-onthispage style="flex: 0 0 220px;"></nys-onthispage>
48
+ *
49
+ * <main style="flex: 1; min-width: 0;">
50
+ * <h1>Apply for a permit</h1>
51
+ * <p>Use this guide to find out if you qualify and how to apply.</p>
52
+ *
53
+ * <h2>Eligibility</h2>
54
+ * <p>You must be a New York State resident aged 18 or older.</p>
55
+ * <p>Additional eligibility requirements may apply.</p>
56
+ * <p>Review the requirements before submitting your application.</p>
57
+ *
58
+ * <h2>How to apply</h2>
59
+ * <p>Complete the online form and upload your supporting documents.</p>
60
+ * <p>Make sure all information is accurate before submitting.</p>
61
+ * <p>Keep a copy of your application for your records.</p>
62
+ *
63
+ * <h2>Required documents</h2>
64
+ * <p>Bring a valid proof of identity, proof of address, and any other supporting documentation.</p>
65
+ * <p>Additional documents may be requested during review.</p>
66
+ * <p>Ensure your documents are current and legible.</p>
67
+ *
68
+ * <h2>What happens next</h2>
69
+ * <p>We review applications within 10 business days.</p>
70
+ * <p>You may be contacted if additional information is needed.</p>
71
+ * <p>You will receive a notification when a decision has been made.</p>
72
+ * </main>
73
+ * </div>
74
+ * ```
75
+ *
76
+ * @example Turn off sticky
77
+ * ```html
78
+ * <div style="display: flex; gap: 2rem; align-items: flex-start;">
79
+ * <nys-onthispage disableSticky offset="24"></nys-onthispage>
80
+ *
81
+ * <main style="flex: 1; min-width: 0;">
82
+ * <h1>Apply for a permit</h1>
83
+ * <p>Use this guide to find out if you qualify and how to apply.</p>
84
+ *
85
+ * <h2>Eligibility</h2>
86
+ * <p>You must be a New York State resident aged 18 or older.</p>
87
+ * <p style="min-height: 60vh;">Review the requirements before submitting your application.</p>
88
+ *
89
+ * <h2>How to apply</h2>
90
+ * <p>Complete the online form and upload your supporting documents.</p>
91
+ * <p style="min-height: 60vh;">Keep a copy of your application for your records.</p>
92
+ *
93
+ * <h2>Required documents</h2>
94
+ * <p>Bring a valid proof of identity, proof of address, and any other supporting documentation.</p>
95
+ * <p style="min-height: 60vh;">Ensure your documents are current and legible.</p>
96
+ *
97
+ * <h2>What happens next</h2>
98
+ * <p>We review applications within 10 business days.</p>
99
+ * <p style="min-height: 60vh;">You will receive a notification when a decision has been made.</p>
100
+ * </main>
101
+ * </div>
102
+ * ```
103
+ *
104
+ * @example Custom heading
105
+ * ```html
106
+ * <div style="display: flex; gap: 2rem; align-items: flex-start;">
107
+ * <nys-onthispage
108
+ * heading="In this guide"
109
+ * ></nys-onthispage>
110
+ *
111
+ * <main style="flex: 1; min-width: 0;">
112
+ * <h1>Apply for a permit</h1>
113
+ *
114
+ * <h2>Eligibility</h2>
115
+ * <p>You must be a New York State resident aged 18 or older.</p>
116
+ *
117
+ * <h2>How to apply</h2>
118
+ * <p>Complete the online form and upload your supporting documents.</p>
119
+ *
120
+ * <h2>What happens next</h2>
121
+ * <p>We review applications within 10 business days.</p>
122
+ * </main>
123
+ * </div>
124
+ * ```
125
+ *
126
+ * @example Track a different heading level
127
+ * ```html
128
+ * <nys-onthispage headingTracker="h3" scope="#guide"></nys-onthispage>
129
+ *
130
+ * <article id="guide">
131
+ * <h1>Part 1 (h1 tag)</h1>
132
+ * <h2>Part 2 (h2 tag)</h2>
133
+ * <h3>Eligibility (h3 tag)</h3>
134
+ * <h3>How to apply (h3 tag)</h3>
135
+ * </article>
136
+ * ```
137
+ *
138
+ * @example Exclude a heading
139
+ * ```html
140
+ * <div style="display: flex; gap: 2rem; align-items: flex-start;">
141
+ * <nys-onthispage></nys-onthispage>
142
+ *
143
+ * <main style="flex: 1; min-width: 0;">
144
+ * <h1>Apply for a permit</h1>
145
+ *
146
+ * <h2>Eligibility</h2>
147
+ * <p>You must be a New York State resident aged 18 or older.</p>
148
+ *
149
+ * <h2>How to apply</h2>
150
+ * <p>Complete the online form and upload your supporting documents.</p>
151
+ *
152
+ * <h2 data-nys-onthispage-ignore>Related links</h2>
153
+ * <p>This heading does not appear in the list.</p>
154
+ * </main>
155
+ * </div>
156
+ * ```
157
+ *
158
+ * @example Use your own heading ids
159
+ * ```html
160
+ * <div style="display: flex; gap: 2rem; align-items: flex-start;">
161
+ * <nys-onthispage style="flex: 0 0 220px;"></nys-onthispage>
162
+ *
163
+ * <main style="flex: 1; min-width: 0;">
164
+ * <h1>Apply for a permit</h1>
165
+ *
166
+ * <h2 id="eligibility">Eligibility</h2>
167
+ * <p>The link uses your id: #eligibility.</p>
168
+ *
169
+ * <h2>How to apply</h2>
170
+ * <p>No id set, so one is generated: #how-to-apply.</p>
171
+ *
172
+ * <h2>How to apply</h2>
173
+ * <p>Same text, so the generated id gets a suffix: #how-to-apply-2.</p>
174
+ * </main>
175
+ * </div>
176
+ * ```
177
+ *
178
+ * @example Update the URL hash
179
+ * ```html
180
+ * <div style="display: flex; gap: 2rem; align-items: flex-start;">
181
+ * <nys-onthispage
182
+ * hashBehavior="replace"
183
+ * style="flex: 0 0 220px;"
184
+ * ></nys-onthispage>
185
+ *
186
+ * <main style="flex: 1; min-width: 0;">
187
+ * <h1>Apply for a permit</h1>
188
+ *
189
+ * <h2>Eligibility</h2>
190
+ * <p style="min-height: 80vh;">You must be a New York State resident.</p>
191
+ *
192
+ * <h2>How to apply</h2>
193
+ * <p style="min-height: 80vh;">Complete the online form.</p>
194
+ *
195
+ * <h2>What happens next</h2>
196
+ * <p style="min-height: 80vh;">We review applications within 10 business days.</p>
197
+ * </main>
198
+ * </div>
199
+ * ```
200
+ * Clicking a link updates the URL to `#how-to-apply`, for example.
201
+ * `hash` adds a history entry per click, `replace` does not, and `none`
202
+ * (the default) leaves the URL alone.
203
+ *
204
+ * @example Turn off smooth scrolling
205
+ * ```html
206
+ * <div style="display: flex; gap: 2rem; align-items: flex-start;">
207
+ * <nys-onthispage
208
+ * disableSmoothScroll
209
+ * style="flex: 0 0 220px;"
210
+ * ></nys-onthispage>
211
+ *
212
+ * <main style="flex: 1; min-width: 0;">
213
+ * <h1>Apply for a permit</h1>
214
+ *
215
+ * <h2>Eligibility</h2>
216
+ * <p style="min-height: 80vh;">You must be a New York State resident.</p>
217
+ *
218
+ * <h2>How to apply</h2>
219
+ * <p style="min-height: 80vh;">Complete the online form.</p>
220
+ *
221
+ * <h2>What happens next</h2>
222
+ * <p style="min-height: 80vh;">We review applications within 10 business days.</p>
223
+ * </main>
224
+ * </div>
225
+ * ```
226
+ * Smooth scrolling is also turned off automatically for visitors who have
227
+ * `prefers-reduced-motion` enabled.
228
+ *
229
+ * @example Page layout
230
+ * ```html
231
+ * <nys-unavheader></nys-unavheader>
232
+ *
233
+ * <nys-globalheader appName="NYS Design System" homepageLink="/">
234
+ * <ul>
235
+ * <li><a href="#">Item 1</a></li>
236
+ * <li><a href="#">Item 2</a></li>
237
+ * <li><a href="#">Item 3</a></li>
238
+ * <li><a href="#">Item 4</a></li>
239
+ * <li><a href="#">Item 5</a></li>
240
+ * </ul>
241
+ * </nys-globalheader>
242
+ *
243
+ * <div class="nys-grid-container">
244
+ * <div class="nys-grid-row nys-grid-gap">
245
+ * <main class="nys-desktop:nys-grid-col-9">
246
+ * <h1>Welcome to the Empire State of Mind</h1>
247
+ * <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit? Nope. Here, we say: grab a bagel, check the Erie Canal, and see what the Adirondacks are up to today.</p>
248
+ *
249
+ * <h2>Apple picking season</h2>
250
+ * <p style="min-height: 60vh;">Orchards from the Hudson Valley to the Finger Lakes are open. Bring a basket, a sweater, and a strong opinion about cider donuts. Honeycrisp is the correct answer, but we will hear other opinions.</p>
251
+ *
252
+ * <h2>Pizza by the slice</h2>
253
+ * <p style="min-height: 60vh;">Fold it. Do not eat it with a fork. A proper slice is hot, floppy, and cheaper than your parking meter. Every borough believes theirs is the best, and every borough is slightly right.</p>
254
+ *
255
+ * <h2>Road trip to Niagara Falls</h2>
256
+ * <p style="min-height: 60vh;">Pack snacks and head west on the Thruway. Rest stops are plentiful, the falls are loud, and the mist is free. Bring a poncho if you plan to get close.</p>
257
+ *
258
+ * <h2>Snow day survival guide</h2>
259
+ * <p style="min-height: 60vh;">Upstate gets a lot of snow, and Upstate is not impressed. Shovel early, check on your neighbors, and keep the hot chocolate within reach.</p>
260
+ * </main>
261
+ *
262
+ * <aside class="nys-desktop:nys-grid-col-3 nys-order-first nys-desktop:nys-order-last" style="margin-top: var(--nys-space-600)">
263
+ * <nys-onthispage offset="24"></nys-onthispage>
264
+ * </aside>
265
+ * </div>
266
+ * </div>
267
+ *
268
+ * <nys-globalfooter agencyName="NYS Design System" homepageLink="/">
269
+ * <ul>
270
+ * <li><a href="#">Privacy Policy</a></li>
271
+ * <li><a href="#">Terms of Use</a></li>
272
+ * </ul>
273
+ * </nys-globalfooter>
274
+ * <nys-unavfooter></nys-unavfooter>
275
+ * ```
276
+ * On mobile and tablet, the nav sits above the content. On desktop, this
277
+ * example puts it in the right column, but it can go on the left too.
278
+ *
279
+ * In your HTML, put `main` before the `aside` so screen readers read the
280
+ * content first. Then use order classes on the `aside` to change where it
281
+ * shows up on screen:
282
+ * - `nys-order-first` puts the nav on top for mobile and tablet.
283
+ * - `nys-desktop:nys-order-last` moves it to the right on desktop. Leave this
284
+ * class off to keep it on the left.
285
+ *
286
+ * The grid classes set the widths. Here, `main` uses
287
+ * `nys-desktop:nys-grid-col-9` and the `aside` uses
288
+ * `nys-desktop:nys-grid-col-3`. See the grid utility docs for more.
289
+ *
290
+ * @example Listen for link activation
291
+ * ```html
292
+ * <div style="display: flex; gap: 2rem; align-items: flex-start;">
293
+ * <nys-onthispage id="toc" style="flex: 0 0 220px;"></nys-onthispage>
294
+ *
295
+ * <main style="flex: 1; min-width: 0;">
296
+ * <h1>Apply for a permit</h1>
297
+ *
298
+ * <h2>Eligibility</h2>
299
+ * <p>You must be a New York State resident aged 18 or older.</p>
300
+ *
301
+ * <h2>How to apply</h2>
302
+ * <p>Complete the online form and upload your supporting documents.</p>
303
+ *
304
+ * <h2>What happens next</h2>
305
+ * <p>We review applications within 10 business days.</p>
306
+ * </main>
307
+ * </div>
308
+ *
309
+ * <script>
310
+ * document.querySelector("#toc").addEventListener("nys-click", (e) => {
311
+ * const { id, label, index } = e.detail;
312
+ * console.log(`Clicked "${label}" (#${id}, position ${index})`);
313
+ * });
314
+ * </script>
315
+ * ```
316
+ * For example, clicking "How to apply" logs: `Clicked "How to apply" (#how-to-apply, position 1)`.
317
+ */
318
+ export declare class NysOnthispage extends NysElement {
319
+ static styles: import("lit").CSSResult;
320
+ /** Unique identifier. Auto-generated by the shared base if not provided. */
321
+ id: string;
322
+ /** Heading level to track and link. `h1` is excluded.
323
+ * @default "h2"
324
+ */
325
+ headingTracker: HeadingTag;
326
+ /** Nav heading text.
327
+ * @default "On this page"
328
+ */
329
+ heading: string;
330
+ /** CSS selector for the container whose headings are tracked.
331
+ * @default "main"
332
+ */
333
+ scope: string;
334
+ /**
335
+ * Turns off the sticky behavior, so the nav scrolls with the page.
336
+ * Sticky only applies on viewports 480px wide or larger.
337
+ * @default false
338
+ */
339
+ disableSticky: boolean;
340
+ /**
341
+ * Distance (px) from the viewport top to the trigger line. Also sets
342
+ * `scroll-margin-top` on tracked headings and the sticky `top` value.
343
+ * @default 80
344
+ */
345
+ offset: number;
346
+ /** Turns off smooth scrolling. Already off for visitors with `prefers-reduced-motion`.
347
+ * @default false
348
+ */
349
+ disableSmoothScroll: boolean;
350
+ /** `hash` pushes history, `replace` updates the URL silently, `none` leaves it alone.
351
+ * @default "none"
352
+ */
353
+ hashBehavior: HashBehavior;
354
+ private _items;
355
+ private _activeId;
356
+ private _observer?;
357
+ private _scrollFrame;
358
+ private _rebuildFrame;
359
+ /** True while a link-click scroll is in flight, so scroll events don't override the clicked link. */
360
+ private _holdingActive;
361
+ private _holdTimer;
362
+ /**
363
+ * Lifecycle methods
364
+ * --------------------------------------------------------------------------
365
+ * Automatic id generation is provided by NysElement (@nysds/internals).
366
+ */
367
+ connectedCallback(): void;
368
+ disconnectedCallback(): void;
369
+ /**
370
+ * Derive state BEFORE rendering.
371
+ *
372
+ * Anything computed from another property — a `@state`, a formatted label, a
373
+ * filtered list — belongs here. Setting a reactive property in `updated()`
374
+ * lands after the render finished, so Lit has to schedule a second one and
375
+ * warns about it (see https://lit.dev/msg/change-in-update).
376
+ *
377
+ * Reserve `updated()` for work that needs the rendered DOM: measuring
378
+ * layout, syncing a native element, or `ElementInternals` calls.
379
+ */
380
+ willUpdate(changeProperties: Map<string | number | symbol, unknown>): void;
381
+ /**
382
+ * Functions
383
+ * --------------------------------------------------------------------------
384
+ */
385
+ private _getScope;
386
+ /**
387
+ * Checks if the header element is trackable:
388
+ * Meaning the element doesn't contain hidden data attribute, or is hidden, or is inside an accordion.
389
+ * Visibility must be true.
390
+ *
391
+ * @returns {boolean} True if the element is trackable
392
+ */
393
+ private _isTrackable;
394
+ private _scheduleRebuild;
395
+ private _slugify;
396
+ private _applyScrollMargin;
397
+ /***
398
+ * Collects the headings, assigns ids where missing, and updates state if changed.
399
+ * Rebuilds the content in this function.
400
+ */
401
+ private _rebuild;
402
+ /**
403
+ * Active item = the last tracked heading with the top edge at or above the trigger line. Not "nearest to top" since that would flicker at the boundaries
404
+ */
405
+ private _computeActive;
406
+ /**
407
+ * Keeps the clicked link active until scrolling has been idle for 150ms.
408
+ */
409
+ private _holdActive;
410
+ private _onScroll;
411
+ /**
412
+ * Event Handlers
413
+ * --------------------------------------------------------------------------
414
+ */
415
+ private _handleClick;
416
+ render(): import("lit-html").TemplateResult<1> | typeof nothing;
417
+ }
418
+ export {};
@@ -194,6 +194,7 @@ export declare class NysRadiogroup extends NysFormControlElement {
194
194
  connectedCallback(): void;
195
195
  disconnectedCallback(): void;
196
196
  firstUpdated(): Promise<void>;
197
+ willUpdate(changedProperties: Map<string | symbol, unknown>): void;
197
198
  updated(changedProperties: Map<string | symbol, unknown>): void;
198
199
  /**
199
200
  * Form Integration
@@ -262,6 +262,7 @@ export declare class NysSelect extends NysFormControlElement {
262
262
  private _handleChange;
263
263
  private _handleFocus;
264
264
  private _handleBlur;
265
+ willUpdate(changedProperties: Map<string, unknown>): void;
265
266
  updated(changedProperties: Map<string, unknown>): void;
266
267
  render(): import("lit-html").TemplateResult<1>;
267
268
  }
@@ -199,8 +199,8 @@ export declare class NysStepper extends NysElement {
199
199
  name: string;
200
200
  /** Title displayed above the step list and compact counter. */
201
201
  label: string;
202
- /** Progress text displayed in compact mode (e.g., "Step 2 of 5"). Auto-managed — do not set manually. */
203
- counterText: string;
202
+ /** Progress text displayed in compact mode (e.g., "Step 2 of 5"). Derived from the steps. */
203
+ private _counterText;
204
204
  /** Whether compact mobile view is expanded to show all steps. Toggled by clicking the counter. */
205
205
  isCompactExpanded: boolean;
206
206
  private _stepsNumbered;
@@ -144,14 +144,14 @@ export declare const NYS_ALERT_URL_STAGE = "https://alerts-cta-stage.static-asse
144
144
  */
145
145
  export declare class NysUnavHeader extends NysElement {
146
146
  static styles: import("lit").CSSResult;
147
- /** Internal: Whether trust bar panel is expanded. */
148
- trustbarVisible: boolean;
149
- /** Internal: Whether search dropdown is visible (mobile). */
150
- searchDropdownVisible: boolean;
151
- /** Internal: Whether language dropdown is visible. */
152
- languageVisible: boolean;
153
- /** Internal: Whether search input is focused. */
154
- isSearchFocused: boolean;
147
+ /** Whether trust bar panel is expanded. */
148
+ private _trustbarVisible;
149
+ /** Whether search dropdown is visible (mobile). */
150
+ private _searchDropdownVisible;
151
+ /** Whether language dropdown is visible. */
152
+ private _languageVisible;
153
+ /** Whether search input is focused. */
154
+ private _isSearchFocused;
155
155
  /** Hides the translation dropdown. */
156
156
  hideTranslate: boolean;
157
157
  /** Hides the search functionality. */
@@ -2,6 +2,13 @@ import { NysElement } from "@nysds/internals";
2
2
  import "./nys-verticalnavgroup";
3
3
  import "@nysds/nys-accordion";
4
4
  type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
5
+ /** Detail payload for the `nys-verticalnav-toggle` event fired by `nys-verticalnav`. */
6
+ export interface NysVerticalnavToggleDetail {
7
+ id: string;
8
+ expanded: boolean;
9
+ }
10
+ /** The `nys-verticalnav-toggle` event fired by `nys-verticalnav`. */
11
+ export type NysVerticalnavToggleEvent = CustomEvent<NysVerticalnavToggleDetail>;
5
12
  /**
6
13
  * Vertical navigation component with responsive desktop/mobile behavior.
7
14
  *
@@ -15,6 +22,8 @@ type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
15
22
  * @summary Responsive navigation that becomes an accordion on smaller screens.
16
23
  * @element nys-verticalnav
17
24
  *
25
+ * @fires {NysVerticalnavToggleEvent} nys-verticalnav-toggle - Fired when the mobile accordion opens or closes. Detail: `{id, expanded}`. Bubbles and composed.
26
+ *
18
27
  * @usage
19
28
  * - Use for navigation where every item links to a different page.
20
29
  * - Use for section-level navigation within a site.
@@ -264,6 +273,8 @@ type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
264
273
  * <li><a href="">WCAG Guidelines</a></li>
265
274
  * <li><a href="">Screen Readers</a></li>
266
275
  * <li><a href="">Color Contrast</a></li>
276
+ * <li><a href="">Accordion Accessibility Checklist</a></li>
277
+ * <li><a href="">Build an Accessible Accordion</a></li>
267
278
  * </ul>
268
279
  * </nys-verticalnavgroup>
269
280
  * </li>
@@ -19,6 +19,7 @@ export * from "../packages/nys-icon/src/index";
19
19
  export * from "../packages/nys-iconlist/src/index";
20
20
  export * from "../packages/nys-label/src/index";
21
21
  export * from "../packages/nys-modal/src/index";
22
+ export * from "../packages/nys-onthispage/src/index";
22
23
  export * from "../packages/nys-pagination/src/index";
23
24
  export * from "../packages/nys-processlist/src/index";
24
25
  export * from "../packages/nys-radiobutton/src/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/components",
3
- "version": "1.23.1",
3
+ "version": "1.24.0",
4
4
  "description": "New York State's design system and code component library.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -149,7 +149,7 @@
149
149
  },
150
150
  "dependencies": {
151
151
  "dompurify": "^3.4.7",
152
- "wc-datepicker": "^0.10.0"
152
+ "wc-datepicker": "^0.13.0"
153
153
  },
154
154
  "sideEffects": true,
155
155
  "peerDependencies": {