@nysds/components 1.19.2 → 1.19.3

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 (65) hide show
  1. package/custom-elements.json +1184 -195
  2. package/dist/.vscode/vscode.html-custom-data.json +10 -10
  3. package/dist/custom-elements.json +1184 -195
  4. package/dist/nys-icon.library-ChLRj3i-.js +696 -0
  5. package/dist/nys-icon.library-ChLRj3i-.js.map +1 -0
  6. package/dist/nysds.es.js +1811 -1724
  7. package/dist/nysds.es.js.map +1 -1
  8. package/dist/nysds.js +750 -147
  9. package/dist/nysds.js.map +1 -1
  10. package/dist/packages/nys-accordion/src/nys-accordion.d.ts +35 -6
  11. package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +8 -3
  12. package/dist/packages/nys-alert/src/nys-alert.d.ts +81 -4
  13. package/dist/packages/nys-avatar/src/nys-avatar.d.ts +44 -4
  14. package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +70 -3
  15. package/dist/packages/nys-badge/src/nys-badge.d.ts +54 -4
  16. package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +75 -7
  17. package/dist/packages/nys-button/src/nys-button.d.ts +62 -7
  18. package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +5 -7
  19. package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +78 -1
  20. package/dist/packages/nys-combobox/src/nys-combobox.d.ts +164 -0
  21. package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +64 -8
  22. package/dist/packages/nys-divider/src/nys-divider.d.ts +24 -1
  23. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +19 -12
  24. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +0 -10
  25. package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +10 -0
  26. package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +94 -4
  27. package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +50 -7
  28. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +65 -4
  29. package/dist/packages/nys-icon/src/icon-cache.d.ts +11 -4
  30. package/dist/packages/nys-icon/src/icon-library-registry.d.ts +33 -16
  31. package/dist/packages/nys-icon/src/index.d.ts +2 -2
  32. package/dist/packages/nys-icon/src/nys-icon.d.ts +83 -6
  33. package/dist/packages/nys-label/src/nys-label.d.ts +32 -2
  34. package/dist/packages/nys-modal/src/nys-modal.d.ts +130 -5
  35. package/dist/packages/nys-pagination/src/nys-pagination.d.ts +11 -1
  36. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +4 -3
  37. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +74 -1
  38. package/dist/packages/nys-select/src/nys-option.d.ts +0 -8
  39. package/dist/packages/nys-select/src/nys-select.d.ts +141 -10
  40. package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +2 -2
  41. package/dist/packages/nys-stepper/src/nys-step.d.ts +0 -13
  42. package/dist/packages/nys-stepper/src/nys-stepper.d.ts +119 -69
  43. package/dist/packages/nys-tab/src/nys-tab.d.ts +17 -8
  44. package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +77 -15
  45. package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +0 -17
  46. package/dist/packages/nys-table/src/nys-table.d.ts +71 -0
  47. package/dist/packages/nys-textarea/src/nys-textarea.d.ts +52 -5
  48. package/dist/packages/nys-textinput/src/nys-textinput.d.ts +63 -9
  49. package/dist/packages/nys-toggle/src/nys-toggle.d.ts +40 -4
  50. package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +38 -6
  51. package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +10 -2
  52. package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +54 -8
  53. package/dist/packages/nys-video/src/nys-video.d.ts +65 -3
  54. package/package.json +11 -5
  55. package/packages/react/NysBreadcrumbs.d.ts +1 -1
  56. package/packages/react/NysButton.d.ts +2 -1
  57. package/packages/react/NysDropdownMenu.d.ts +1 -1
  58. package/packages/react/NysFileinput.d.ts +24 -2
  59. package/packages/react/NysFileinput.js +8 -1
  60. package/packages/react/NysGlobalHeader.d.ts +6 -1
  61. package/packages/react/NysLabel.d.ts +4 -1
  62. package/packages/react/NysTextarea.d.ts +1 -1
  63. package/packages/react/NysUnavHeader.d.ts +11 -1
  64. package/packages/react/NysUnavHeader.js +15 -1
  65. package/packages/react/nysds-jsx.d.ts +47 -10
@@ -23,25 +23,87 @@ import { LitElement } from "lit";
23
23
  * moved into internal shadow-DOM containers on `slotchange`; the slot
24
24
  * itself is not rendered visibly.
25
25
  *
26
- * @example Disable a tab using the `disabled` attribute on `<nys-tab>`.
26
+ * @example Basic
27
27
  * ```html
28
- * <nys-tabgroup name="Account Settings">
29
- * <nys-tab label="Profile"></nys-tab>
30
- * <nys-tab label="Security"></nys-tab>
31
- * <nys-tab label="Notifications" disabled></nys-tab>
32
- * <nys-tabpanel><p>Manage your profile information.</p></nys-tabpanel>
33
- * <nys-tabpanel><p>Update your password and 2FA settings.</p></nys-tabpanel>
34
- * <nys-tabpanel><p>Notification preferences (coming soon).</p></nys-tabpanel>
35
- * </nys-tabgroup>
28
+ * <nys-tabgroup>
29
+ * <nys-tab label="Marcy"></nys-tab>
30
+ * <nys-tab label="Algonquin"></nys-tab>
31
+ * <nys-tab label="Haystack"></nys-tab>
32
+ * // rest of tabs
33
+ * <nys-tabpanel
34
+ * >Mount Marcy is the tallest peak in the Adirondacks. It has an elevation
35
+ * of 5344 feet with 3166 feet of elevation gain. The roundtrip hike to the
36
+ * top is 14.8 miles and is an out-and-back route.
37
+ * </nys-tabpanel>
38
+ * <nys-tabpanel
39
+ * >Algonquin Peak is the 2nd tallest peak in the Adirondacks. It has an
40
+ * elevation of 5114 feet with 3050 feet of elevation gain. The roundtrip
41
+ * hike to the top is 7.8 miles and is an out-and-back route.</nys-tabpanel
42
+ * >
43
+ * <nys-tabpanel
44
+ * >Mount Haystack is the 3rd tallest peak in the Adirondacks. It has an
45
+ * elevation of 4960 feet with 4000 feet of elevation gain. The roundtrip
46
+ * hike to the top is 16.4 miles and is an out-and-back
47
+ * route.</nys-tabpanel
48
+ * >
49
+ * // rest of tab panel content
50
+ * </nys-tabgroup>
51
+ * ```
52
+ *
53
+ * @render Basic
54
+ * ```html
55
+ * <nys-tabgroup>
56
+ * <nys-tab label="Marcy"></nys-tab>
57
+ * <nys-tab label="Algonquin"></nys-tab>
58
+ * <nys-tab label="Haystack"></nys-tab>
59
+ * <nys-tab label="Skylight" id="tab4"></nys-tab>
60
+ * <nys-tab label="Whiteface" id="tab5"></nys-tab>
61
+ * <nys-tabpanel
62
+ * >Mount Marcy is the tallest peak in the Adirondacks. It has an elevation
63
+ * of 5344 feet with 3166 feet of elevation gain. The roundtrip hike to the
64
+ * top is 14.8 miles and is an out-and-back route.
65
+ * </nys-tabpanel>
66
+ * <nys-tabpanel
67
+ * >Algonquin Peak is the 2nd tallest peak in the Adirondacks. It has an
68
+ * elevation of 5114 feet with 3050 feet of elevation gain. The roundtrip
69
+ * hike to the top is 7.8 miles and is an out-and-back route.</nys-tabpanel
70
+ * >
71
+ * <nys-tabpanel
72
+ * >Mount Haystack is the 3rd tallest peak in the Adirondacks. It has an
73
+ * elevation of 4960 feet with 4000 feet of elevation gain. The roundtrip
74
+ * hike to the top is 16.4 miles and is an out-and-back
75
+ * route.</nys-tabpanel
76
+ * >
77
+ * <nys-tabpanel
78
+ * >Mount Skylight is the 4th tallest peak in the Adirondacks. It has an
79
+ * elevation of 4926 feet with 5100 feet of elevation gain. The roundtrip
80
+ * hike to the top is 16 miles and is an out-and-back route.</nys-tabpanel
81
+ * >
82
+ * <nys-tabpanel
83
+ * >Whiteface is the 5th tallest peak in the Adirondacks. It has an
84
+ * elevation of 4867 feet with 3050 feet of elevation gain. The roundtrip
85
+ * hike to the top is 7.2 miles and is an out-and-back route.</nys-tabpanel
86
+ * >
87
+ * <p style="padding: 1rem;">
88
+ * <strong>Note:</strong> The content in the tab panels was gathered from
89
+ * <a href="https://www.lakeplacid.com/do/outdoors/summerfall/hiking"
90
+ * >lakeplacid.com</a
91
+ * >
92
+ * and may not be completely accurate. This is meant to be a demo of how
93
+ * the component works, not a hiking guide.
94
+ * </p>
95
+ * </nys-tabgroup>
36
96
  * ```
37
97
  *
38
- * @example Pre-select a tab using the `selected` attribute on `<nys-tab>`.
98
+ * @example Explicit Ordering
39
99
  * ```html
40
- * <nys-tabgroup name="Reports">
41
- * <nys-tab label="Summary"></nys-tab>
42
- * <nys-tab label="Details" selected></nys-tab>
43
- * <nys-tabpanel><p>Summary view</p></nys-tabpanel>
44
- * <nys-tabpanel><p>Detailed view (shown by default)</p></nys-tabpanel>
100
+ * <nys-tabgroup id="explicit-ordering">
101
+ * <nys-tab label="1st Tab" id="tab1"></nys-tab>
102
+ * <nys-tab label="2nd Tab" id="tab2"></nys-tab>
103
+ * <nys-tab label="3rd Tab" id="tab3"></nys-tab>
104
+ * <nys-tabpanel aria-labelledby="tab2">Content for tab 2</nys-tabpanel>
105
+ * <nys-tabpanel aria-labelledby="tab3">Content for tab 3</nys-tabpanel>
106
+ * <nys-tabpanel aria-labelledby="tab1">Content for tab 1</nys-tabpanel>
45
107
  * </nys-tabgroup>
46
108
  * ```
47
109
  */
@@ -12,23 +12,6 @@ import { LitElement } from "lit";
12
12
  *
13
13
  * @slot - Default slot for panel content. Rendered inside a wrapper `<div>`
14
14
  * with the `.nys-tabpanel` class for styling.
15
- *
16
- * @example Panel content is wrapped by `<nys-tabpanel>`.
17
- * ```html
18
- * <!-- Panels are paired by position with <nys-tab> elements in the same <nys-tabgroup>. -->
19
- * <nys-tabgroup name="Steps">
20
- * <nys-tab label="Step 1"></nys-tab>
21
- * <nys-tab label="Step 2"></nys-tab>
22
- * <nys-tabpanel>
23
- * <h2>Step 1: Enter your information</h2>
24
- * <p>Fill out the form below.</p>
25
- * </nys-tabpanel>
26
- * <nys-tabpanel>
27
- * <h2>Step 2: Review and submit</h2>
28
- * <p>Confirm your details before submitting.</p>
29
- * </nys-tabpanel>
30
- * </nys-tabgroup>
31
- * ```
32
15
  */
33
16
  export declare class NysTabpanel extends LitElement {
34
17
  static styles: import("lit").CSSResult;
@@ -10,6 +10,77 @@ import { LitElement } from "lit";
10
10
  * Detail: { columnIndex: number, columnLabel: string, sortDirection: "asc" | "desc" | "none" }
11
11
  *
12
12
  * @method downloadFile - Triggers download of the CSV file if `download` is set.
13
+ *
14
+ * @example Basic
15
+ * ```html
16
+ * <nys-table id="table1" name="table1">
17
+ * <table>
18
+ * <caption>New York State High Peaks and Popular Hikes</caption>
19
+ * <tr><th>Mountain</th><th>Peak Height (ft)</th><th>Hike Name</th></tr>
20
+ * <tr><td>Marcy</td><td>5,344</td><td>Van Hoevenberg Trail</td></tr>
21
+ * <tr><td>Algonquin</td><td>5,114</td><td>Northeast Trail</td></tr>
22
+ * <tr><td>Haystack</td><td>4,960</td><td>Johns Brook Trail</td></tr>
23
+ * <tr><td>Skylight</td><td>4,926</td><td>Lake Tear Trail</td></tr>
24
+ * <tr><td>Whiteface</td><td>4,867</td><td>Whiteface Mountain Trail</td></tr>
25
+ * </table>
26
+ * </nys-table>
27
+ * ```
28
+ *
29
+ * @example Striped
30
+ * ```html
31
+ * <nys-table id="table2" name="table2" striped>
32
+ * <table>
33
+ * <caption>New York State High Peaks and Popular Hikes</caption>
34
+ * <tr><th>Mountain</th><th>Peak Height (ft)</th><th>Hike Name</th></tr>
35
+ * <tr><td>Marcy</td><td>5,344</td><td>Van Hoevenberg Trail</td></tr>
36
+ * <tr><td>Haystack</td><td>4,960</td><td>Johns Brook Trail</td></tr>
37
+ * <tr><td>Skylight</td><td>4,926</td><td>Lake Tear Trail</td></tr>
38
+ * <tr><td>Whiteface</td><td>4,867</td><td>Whiteface Mountain Trail</td></tr>
39
+ * </table>
40
+ * </nys-table>
41
+ * ```
42
+ *
43
+ * @example Bordered
44
+ * ```html
45
+ * <nys-table id="table3" name="table3" bordered>
46
+ * <table>
47
+ * <caption>New York State High Peaks and Popular Hikes</caption>
48
+ * <tr><th>Mountain</th><th>Peak Height (ft)</th><th>Hike Name</th></tr>
49
+ * <tr><td>Marcy</td><td>5,344</td><td>Van Hoevenberg Trail</td></tr>
50
+ * <tr><td>Haystack</td><td>4,960</td><td>Johns Brook Trail</td></tr>
51
+ * <tr><td>Skylight</td><td>4,926</td><td>Lake Tear Trail</td></tr>
52
+ * <tr><td>Whiteface</td><td>4,867</td><td>Whiteface Mountain Trail</td></tr>
53
+ * </table>
54
+ * </nys-table>
55
+ * ```
56
+ *
57
+ * @example Sortable
58
+ * ```html
59
+ * <nys-table id="table4" name="table4" sortable>
60
+ * <table>
61
+ * <caption>New York State High Peaks and Popular Hikes</caption>
62
+ * <tr><th>Mountain</th><th>Peak Height (ft)</th><th>Hike Name</th></tr>
63
+ * <tr><td>Marcy</td><td>5,344</td><td>Van Hoevenberg Trail</td></tr>
64
+ * <tr><td>Haystack</td><td>4,960</td><td>Johns Brook Trail</td></tr>
65
+ * <tr><td>Skylight</td><td>4,926</td><td>Lake Tear Trail</td></tr>
66
+ * <tr><td>Whiteface</td><td>4,867</td><td>Whiteface Mountain Trail</td></tr>
67
+ * </table>
68
+ * </nys-table>
69
+ * ```
70
+ *
71
+ * @example Downloadable
72
+ * ```html
73
+ * <nys-table id="table5" name="table5" download="path/to/downloadable/version/of/table.filetype">
74
+ * <table>
75
+ * <caption>New York State High Peaks and Popular Hikes</caption>
76
+ * <tr><th>Mountain</th><th>Peak Height (ft)</th><th>Hike Name</th></tr>
77
+ * <tr><td>Marcy</td><td>5,344</td><td>Van Hoevenberg Trail</td></tr>
78
+ * <tr><td>Haystack</td><td>4,960</td><td>Johns Brook Trail</td></tr>
79
+ * <tr><td>Skylight</td><td>4,926</td><td>Lake Tear Trail</td></tr>
80
+ * <tr><td>Whiteface</td><td>4,867</td><td>Whiteface Mountain Trail</td></tr>
81
+ * </table>
82
+ * </nys-table>
83
+ * ```
13
84
  */
14
85
  export declare class NysTable extends LitElement {
15
86
  static styles: import("lit").CSSResult;
@@ -16,14 +16,61 @@ import { LitElement } from "lit";
16
16
  * @fires nys-blur - Fired when textarea loses focus. Triggers validation.
17
17
  * @fires nys-select - Fired when user selects text. Detail: `{id, value}`.
18
18
  *
19
- * @example Basic textarea
19
+ * @example Basic
20
20
  * ```html
21
- * <nys-textarea label="Comments" rows="4"></nys-textarea>
21
+ * <nys-textarea label="Comments"></nys-textarea>
22
22
  * ```
23
23
  *
24
- * @example Required with description
24
+ * @example Disabled
25
25
  * ```html
26
- * <nys-textarea label="Describe the incident" description="Please provide details" required></nys-textarea>
26
+ * <nys-textarea label="Comments" disabled></nys-textarea>
27
+ * ```
28
+ *
29
+ * @example Readonly
30
+ * ```html
31
+ * <nys-textarea label="Comments" readonly value="You can see me but not edit me"></nys-textarea>
32
+ * ```
33
+ *
34
+ * @example Required
35
+ * ```html
36
+ * <nys-textarea label="Describe the incident" required></nys-textarea>
37
+ * ```
38
+ *
39
+ * @example Optional
40
+ * ```html
41
+ * <nys-textarea label="Comments" optional></nys-textarea>
42
+ * ```
43
+ *
44
+ * @example Max length
45
+ * ```html
46
+ * <nys-textarea label="Comments" maxlength="100"></nys-textarea>
47
+ * ```
48
+ *
49
+ * @example Width Small
50
+ * ```html
51
+ * <nys-textarea label="Comments" width="sm"></nys-textarea>
52
+ * ```
53
+ *
54
+ * @example Width Medium
55
+ * ```html
56
+ * <nys-textarea label="Comments" width="md"></nys-textarea>
57
+ * ```
58
+ *
59
+ * @example Width Large
60
+ * ```html
61
+ * <nys-textarea label="Comments" width="lg"></nys-textarea>
62
+ * ```
63
+ *
64
+ * @example Description
65
+ * ```html
66
+ * <nys-textarea label="Describe the incident" description="Please provide details"></nys-textarea>
67
+ * ```
68
+ *
69
+ * @example Description Slot
70
+ * ```html
71
+ * <nys-textarea label="Describe the incident">
72
+ * <div slot="description">Please provide details</div>
73
+ * </nys-textarea>
27
74
  * ```
28
75
  */
29
76
  export declare class NysTextarea extends LitElement {
@@ -50,7 +97,7 @@ export declare class NysTextarea extends LitElement {
50
97
  value: string;
51
98
  /** Prevents interaction. */
52
99
  disabled: boolean;
53
- /** Makes textarea read-only but focusable. */
100
+ /** Makes textarea readonly but focusable. */
54
101
  readonly: boolean;
55
102
  /** Marks as required. Shows "Required" flag and validates on blur. */
56
103
  required: boolean;
@@ -17,25 +17,79 @@ import { LitElement } from "lit";
17
17
  * @fires nys-focus - Fired when input gains focus.
18
18
  * @fires nys-blur - Fired when input loses focus. Triggers validation.
19
19
  *
20
- * @example Basic text input
20
+ * @example Basic
21
21
  * ```html
22
- * <nys-textinput label="Full Name" required></nys-textinput>
22
+ * <nys-textinput label="Full Name"></nys-textinput>
23
23
  * ```
24
24
  *
25
- * @example Required Email
25
+ * @example Disabled
26
26
  * ```html
27
- * <nys-textinput type="email" label="Email Address" required></nys-textinput>
27
+ * <nys-textinput label="Email Address" disabled></nys-textinput>
28
28
  * ```
29
29
  *
30
- * @example Phone with masking
30
+ * @example Readonly
31
31
  * ```html
32
- * <nys-textinput type="tel" label="Phone Number"></nys-textinput>
32
+ * <nys-textinput label="Email Address" readonly value="You can see me but not edit me"></nys-textinput>
33
33
  * ```
34
34
  *
35
- * @example Search with button
35
+ * @example Required
36
36
  * ```html
37
- * <nys-textinput type="search" placeholder="Search">
38
- * <nys-button slot="endButton" label="Search" prefixIcon="search"></nys-button>
37
+ * <nys-textinput label="Email Address" required></nys-textinput>
38
+ * ```
39
+ *
40
+ * @example Optional
41
+ * ```html
42
+ * <nys-textinput label="Email Address" optional></nys-textinput>
43
+ * ```
44
+ *
45
+ * @example Width Small
46
+ * ```html
47
+ * <nys-textinput label="Zip Code" width="sm"></nys-textinput>
48
+ * ```
49
+ *
50
+ * @example Width Medium
51
+ * ```html
52
+ * <nys-textinput label="City" width="md"></nys-textinput>
53
+ * ```
54
+ *
55
+ * @example Width Large
56
+ * ```html
57
+ * <nys-textinput label="Email Address" width="lg"></nys-textinput>
58
+ * ```
59
+ *
60
+ * @example Description
61
+ * ```html
62
+ * <nys-textinput label="Email Address" description="Only valid ny.gov emails are accepted."></nys-textinput>
63
+ * ```
64
+ *
65
+ * @example Description Slot
66
+ * ```html
67
+ * <nys-textinput label="Email Address">
68
+ * <div slot="description">Only valid <strong>ny.gov</strong> emails are accepted.</div>
69
+ * </nys-textinput>
70
+ * ```
71
+ *
72
+ * @example Masking
73
+ * ```html
74
+ * <nys-textinput type="tel" label="Phone Number">
75
+ * <div slot="description">Some types, such as <code>tel</code> have automatic masking available.</div>
76
+ * </nys-textinput>
77
+ * ```
78
+ *
79
+ * @example Max Min Values
80
+ * ```html
81
+ * <nys-textinput type="number" label="Age" min="18" max="99" width="sm"></nys-textinput>
82
+ * ```
83
+ *
84
+ * @example Suffix Button
85
+ * ```html
86
+ * <nys-textinput id="search-demo" type="search" placeholder="Search">
87
+ * <nys-button
88
+ * slot="endButton"
89
+ * ariaLabel="Search"
90
+ * prefixIcon="search"
91
+ * onclick="alert('searching for: ' + document.getElementById('search-demo').value)"
92
+ * ></nys-button>
39
93
  * </nys-textinput>
40
94
  * ```
41
95
  */
@@ -14,14 +14,50 @@ import { LitElement } from "lit";
14
14
  * @fires nys-focus - Fired when toggle gains focus.
15
15
  * @fires nys-blur - Fired when toggle loses focus.
16
16
  *
17
- * @example Basic toggle
17
+ * @example Basic
18
18
  * ```html
19
- * <nys-toggle label="Enable notifications" name="notifications"></nys-toggle>
19
+ * <nys-toggle label="Enable notifications" name="notifications" value="enabled-notifications"></nys-toggle>
20
20
  * ```
21
21
  *
22
- * @example Dark mode toggle
22
+ * @example Checked
23
23
  * ```html
24
- * <nys-toggle label="Dark mode" description="Adjust display for low light" checked></nys-toggle>
24
+ * <nys-toggle label="Dark Mode" name="theme" value="dark" checked></nys-toggle>
25
+ * ```
26
+ *
27
+ * @example Disabled
28
+ * ```html
29
+ * <nys-toggle label="Opt Out of emails" name="toggle-switch" value="emails" disabled></nys-toggle>
30
+ * ```
31
+ *
32
+ * @example Hide Icon
33
+ * ```html
34
+ * <nys-toggle label="No icon on the toggle knob" name="icon" value="no-icon" noIcon></nys-toggle>
35
+ * ```
36
+ *
37
+ * @example Size small
38
+ * ```html
39
+ * <nys-toggle label="Tiny but mighty" name="sm-size" value="sm-size" size="sm"></nys-toggle>
40
+ * ```
41
+ *
42
+ * @example Description
43
+ * ```html
44
+ * <nys-toggle
45
+ * label="Opt Out of emails"
46
+ * description="An email address is recommended to be on file for contact information."
47
+ * name="toggle-switch"
48
+ * value="emails"
49
+ * ></nys-toggle>
50
+ * ```
51
+ *
52
+ * @example Description Slot
53
+ * ```html
54
+ * <nys-toggle
55
+ * label="Opt Out of emails"
56
+ * name="toggle-switch"
57
+ * value="emails"
58
+ * >
59
+ * <p slot="description">We <strong>REALLY</strong> encourage you to keep emails enabled for contact purposes.</p>
60
+ * </nys-toggle>
25
61
  * ```
26
62
  */
27
63
  export declare class NysToggle extends LitElement {
@@ -5,19 +5,51 @@ import { LitElement } from "lit";
5
5
  * Link to a trigger element via `for` attribute matching the trigger's `id`. Tooltip appears on hover or focus
6
6
  * and dismisses on blur, mouse leave, or Escape key. Use for supplementary info only—not critical content.
7
7
  *
8
+ * @accessibility
9
+ * - Linked to trigger element via `for` attribute (must match trigger's `id`).
10
+ * - `role="tooltip"` with dynamic `aria-hidden` based on visibility.
11
+ * - Keyboard accessible: Tab to trigger, Enter/Space shows tooltip, Escape dismisses.
12
+ * - Screen readers announce tooltip text when visible.
13
+ * - Visual focus indicators on trigger elements meet WCAG 2.2 AA standards.
14
+ * - Auto-positioning respects viewport bounds to prevent content loss.
15
+ *
8
16
  * @summary Contextual tooltip with auto-positioning, keyboard support, and screen reader integration.
9
17
  * @element nys-tooltip
10
18
  *
11
- * @example Tooltip for button
19
+ * @example Basic
20
+ * ```html
21
+ * <div style="display: flex; justify-content: center; gap: 5px; padding: 40px;">
22
+ * <nys-tooltip for="my-button" text="I am a tooltip."></nys-tooltip>
23
+ * <nys-button id="my-button" label="Hover Me"></nys-button>
24
+ * </div>
25
+ * ```
26
+ *
27
+ * @example Position
12
28
  * ```html
13
- * <nys-button id="help-btn" label="Help" circle icon="help"></nys-button>
14
- * <nys-tooltip for="help-btn" text="Click for assistance"></nys-tooltip>
29
+ * <div style="display: flex; justify-content: center; gap: 5px; padding: 40px;">
30
+ * <p>Hover over the icon</p>
31
+ * <nys-tooltip
32
+ * for="my-icon2"
33
+ * text="I am a tooltip."
34
+ * position="right"
35
+ * >
36
+ * </nys-tooltip>
37
+ * <nys-icon id="my-icon2" name="info" size="3xl"></nys-icon>
38
+ * </div>
15
39
  * ```
16
40
  *
17
- * @example Positioned tooltip
41
+ * @example Inverted
18
42
  * ```html
19
- * <nys-icon id="info-icon" name="info"></nys-icon>
20
- * <nys-tooltip for="info-icon" text="Additional details" position="right"></nys-tooltip>
43
+ * <div style="background-color: #1b1b1b; color: #ffffff; padding: 40px; display: flex; gap: 5px">
44
+ * <p>Hover over the icon</p>
45
+ * <nys-tooltip
46
+ * for="my-tooltip3"
47
+ * text="I am a tooltip."
48
+ * inverted
49
+ * >
50
+ * </nys-tooltip>
51
+ * <nys-icon id="my-tooltip3" name="info" size="3xl"></nys-icon>
52
+ * </div>
21
53
  * ```
22
54
  */
23
55
  export declare class NysTooltip extends LitElement {
@@ -5,12 +5,20 @@ import { LitElement } from "lit";
5
5
  * Place as the last element before `</body>`. Displays NY.gov logo and links to Agencies,
6
6
  * App Directory, Counties, Events, Programs, and Services. No configuration needed.
7
7
  *
8
+ * @accessibility
9
+ * - Uses semantic `<footer>` element for assistive technology recognition.
10
+ * - All links are keyboard-navigable via Tab.
11
+ * - Proper link text for screen reader users.
12
+ * - Links open in same window (no target="_blank") unless external policy requires otherwise.
13
+ * - Visual design meets WCAG 2.2 AA contrast and focus indicator standards.
14
+ * - Footer is not hidden from screen readers and is announced as navigation.
15
+ *
16
+ *
8
17
  * @summary Universal NYS footer with logo and statewide links. Required site-wide.
9
18
  * @element nys-unavfooter
10
19
  *
11
- * @example Standard usage
20
+ * @example Basic
12
21
  * ```html
13
- * <nys-globalfooter>...</nys-globalfooter>
14
22
  * <nys-unavfooter></nys-unavfooter>
15
23
  * ```
16
24
  */
@@ -1,4 +1,9 @@
1
1
  import { LitElement } from "lit";
2
+ interface Language {
3
+ code: string;
4
+ label: string;
5
+ url?: string;
6
+ }
2
7
  /**
3
8
  * Universal NYS header with trust bar, logo, search, and language translation. Required on all NYS sites.
4
9
  *
@@ -6,25 +11,66 @@ import { LitElement } from "lit";
6
11
  * site search (searches ny.gov), and 14-language translation dropdown. Use `hideSearch` or `hideTranslate`
7
12
  * to remove features if not applicable.
8
13
  *
14
+ * @accessibility
15
+ * - Semantic `<header>` element ensures assistive technology recognition.
16
+ * - Trust bar button: `role="button"`, `aria-expanded`, descriptive `aria-label`.
17
+ * - All links and buttons are keyboard-navigable via Tab.
18
+ * - Language dropdown announces current language and list on focus.
19
+ * - Search input announces field purpose and keyboard shortcuts (Enter to submit, Escape to dismiss).
20
+ * - Visual focus indicators meet WCAG 2.2 AA standards.
21
+ * - All text has sufficient color contrast (4.5:1 minimum).
22
+ * - Icons have text labels or `aria-label` attributes.
23
+ *
9
24
  * @summary Universal NYS header with trust bar, search, and translation. Required site-wide.
10
25
  * @element nys-unavheader
11
26
  *
12
- * @example Standard usage
27
+ * @fires nys-language-select - Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect.
28
+ * @fires nys-search-submit - Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect.
29
+ *
30
+ * @example Basic
13
31
  * ```html
14
32
  * <nys-unavheader></nys-unavheader>
15
- * <nys-globalheader>...</nys-globalheader>
16
33
  * ```
17
34
  *
18
- * @example Without search
35
+ * @example Hide search
19
36
  * ```html
20
37
  * <nys-unavheader hideSearch></nys-unavheader>
21
38
  * ```
39
+ *
40
+ * @example Hide translate
41
+ * ```html
42
+ * <nys-unavheader hideTranslate></nys-unavheader>
43
+ * ```
44
+ *
45
+ * @example Custom Search URL
46
+ * ```html
47
+ * <nys-unavheader searchUrl="https://designsystem.ny.gov/search/?q="></nys-unavheader>
48
+ * ```
49
+ *
50
+ * @example Custom Language List
51
+ * ```html
52
+ * <nys-unavheader id="my-header"></nys-unavheader>
53
+ * <script>
54
+ * const header = document.querySelector('#my-header');
55
+ * header.languages = [
56
+ * { code: 'en', label: 'English' },
57
+ * { code: 'es', label: 'Español' , url: '"https://ny.gov/?lang=es"'},
58
+ * { code: 'fr', label: 'Français', url: '"https://ny.gov/?lang=fr"'},
59
+ * ];
60
+ * </script>
61
+ * ```
62
+ *
63
+ * @example Custom Language List JS
64
+ * ```html
65
+ * <nys-unavheader id="my-header2"></nys-unavheader>
66
+ * <script>
67
+ * document.querySelector('#my-header2').addEventListener('nys-language-select', (event) => {
68
+ * event.preventDefault();
69
+ * const selectedLanguage = event.detail.language.label;
70
+ * });
71
+ * </script>
72
+ * ```
22
73
  */
23
- interface Language {
24
- code: string;
25
- label: string;
26
- url?: string;
27
- }
28
74
  export declare class NysUnavHeader extends LitElement {
29
75
  static styles: import("lit").CSSResult;
30
76
  /** Internal: Whether trust bar panel is expanded. */