@nysds/components 1.21.1-alpha-1 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/custom-elements.json +1794 -1170
  2. package/dist/.vscode/vscode.css-custom-data.json +115 -0
  3. package/dist/.vscode/vscode.html-custom-data.json +116 -61
  4. package/dist/custom-elements.json +1791 -1119
  5. package/dist/{nys-icon.library-CwuPZJAc.js → nys-icon.library-BZ3jVyhP.js} +2 -2
  6. package/dist/{nys-icon.library-D_YvOGLH.js.map → nys-icon.library-BZ3jVyhP.js.map} +1 -1
  7. package/dist/{nys-icon.library-Bi_7DKlD-BEL9M8Q4.js → nys-icon.library-DYsQ8Tiv-DYS-TkV2.js} +12 -4
  8. package/dist/nys-icon.library-DYsQ8Tiv-DYS-TkV2.js.map +1 -0
  9. package/dist/nysds.es.js +5422 -4579
  10. package/dist/nysds.es.js.map +1 -1
  11. package/dist/nysds.js +479 -457
  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 +14 -2
  40. package/dist/packages/nys-badge/src/nys-badge.d.ts +18 -0
  41. package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +29 -3
  42. package/dist/packages/nys-button/src/nys-button.d.ts +35 -4
  43. package/dist/packages/nys-card/src/nys-card.d.ts +72 -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 +17 -0
  50. package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +10 -0
  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 +18 -0
  55. package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +36 -55
  56. package/dist/packages/nys-icon/src/nys-icon.d.ts +18 -0
  57. package/dist/packages/nys-iconlist/src/nys-iconlist.d.ts +38 -1
  58. package/dist/packages/nys-iconlist/src/nys-iconlistitem.d.ts +6 -0
  59. package/dist/packages/nys-label/src/nys-label.d.ts +3 -1
  60. package/dist/packages/nys-modal/src/nys-modal.d.ts +26 -2
  61. package/dist/packages/nys-pagination/src/nys-pagination.d.ts +21 -2
  62. package/dist/packages/nys-processlist/src/nys-processlist.d.ts +16 -0
  63. package/dist/packages/nys-processlist/src/nys-processlistitem.d.ts +1 -1
  64. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +29 -5
  65. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +66 -4
  66. package/dist/packages/nys-select/src/nys-select.d.ts +22 -4
  67. package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +8 -0
  68. package/dist/packages/nys-stepper/src/nys-step.d.ts +8 -1
  69. package/dist/packages/nys-stepper/src/nys-stepper.d.ts +8 -0
  70. package/dist/packages/nys-tab/src/nys-tab.d.ts +22 -3
  71. package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +12 -0
  72. package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +2 -0
  73. package/dist/packages/nys-table/src/nys-table.d.ts +39 -2
  74. package/dist/packages/nys-textarea/src/nys-textarea.d.ts +47 -4
  75. package/dist/packages/nys-textinput/src/nys-textinput.d.ts +42 -4
  76. package/dist/packages/nys-toggle/src/nys-toggle.d.ts +37 -3
  77. package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +13 -0
  78. package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +13 -0
  79. package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +28 -19
  80. package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +14 -0
  81. package/dist/packages/nys-verticalnav/src/nys-verticalnavgroup.d.ts +11 -0
  82. package/dist/packages/nys-video/src/nys-video.d.ts +14 -1
  83. package/package.json +32 -27
  84. package/dist/nys-icon.library-Bi_7DKlD-BEL9M8Q4.js.map +0 -1
  85. package/dist/nys-icon.library-Bi_7DKlD-YSs5zqZy.js +0 -698
  86. package/dist/nys-icon.library-Bi_7DKlD-YSs5zqZy.js.map +0 -1
  87. package/dist/nys-icon.library-CwuPZJAc.js.map +0 -1
  88. package/dist/nys-icon.library-D_YvOGLH.js +0 -696
  89. package/packages/react/NysAccordion.d.ts +0 -75
  90. package/packages/react/NysAccordion.js +0 -24
  91. package/packages/react/NysAccordionItem.d.ts +0 -82
  92. package/packages/react/NysAccordionItem.js +0 -43
  93. package/packages/react/NysAlert.d.ts +0 -102
  94. package/packages/react/NysAlert.js +0 -61
  95. package/packages/react/NysAvatar.d.ts +0 -88
  96. package/packages/react/NysAvatar.js +0 -40
  97. package/packages/react/NysBacktotop.d.ts +0 -57
  98. package/packages/react/NysBacktotop.js +0 -23
  99. package/packages/react/NysBadge.d.ts +0 -78
  100. package/packages/react/NysBadge.js +0 -42
  101. package/packages/react/NysBreadcrumbItem.d.ts +0 -72
  102. package/packages/react/NysBreadcrumbItem.js +0 -42
  103. package/packages/react/NysBreadcrumbs.d.ts +0 -89
  104. package/packages/react/NysBreadcrumbs.js +0 -50
  105. package/packages/react/NysButton.d.ts +0 -171
  106. package/packages/react/NysButton.js +0 -83
  107. package/packages/react/NysCard.d.ts +0 -110
  108. package/packages/react/NysCard.js +0 -61
  109. package/packages/react/NysCheckbox.d.ts +0 -145
  110. package/packages/react/NysCheckbox.js +0 -78
  111. package/packages/react/NysCheckboxgroup.d.ts +0 -88
  112. package/packages/react/NysCheckboxgroup.js +0 -46
  113. package/packages/react/NysCombobox.d.ts +0 -126
  114. package/packages/react/NysCombobox.js +0 -66
  115. package/packages/react/NysDatepicker.d.ts +0 -128
  116. package/packages/react/NysDatepicker.js +0 -76
  117. package/packages/react/NysDivider.d.ts +0 -54
  118. package/packages/react/NysDivider.js +0 -22
  119. package/packages/react/NysDropdownMenu.d.ts +0 -59
  120. package/packages/react/NysDropdownMenu.js +0 -23
  121. package/packages/react/NysDropdownMenuItem.d.ts +0 -75
  122. package/packages/react/NysDropdownMenuItem.js +0 -47
  123. package/packages/react/NysErrorMessage.d.ts +0 -60
  124. package/packages/react/NysErrorMessage.js +0 -24
  125. package/packages/react/NysFileItem.d.ts +0 -69
  126. package/packages/react/NysFileItem.js +0 -37
  127. package/packages/react/NysFileinput.d.ts +0 -130
  128. package/packages/react/NysFileinput.js +0 -74
  129. package/packages/react/NysGlobalFooter.d.ts +0 -77
  130. package/packages/react/NysGlobalFooter.js +0 -32
  131. package/packages/react/NysGlobalHeader.d.ts +0 -85
  132. package/packages/react/NysGlobalHeader.js +0 -34
  133. package/packages/react/NysIcon.d.ts +0 -75
  134. package/packages/react/NysIcon.js +0 -50
  135. package/packages/react/NysIconlist.d.ts +0 -54
  136. package/packages/react/NysIconlist.js +0 -22
  137. package/packages/react/NysIconlistitem.d.ts +0 -59
  138. package/packages/react/NysIconlistitem.js +0 -22
  139. package/packages/react/NysLabel.d.ts +0 -81
  140. package/packages/react/NysLabel.js +0 -40
  141. package/packages/react/NysModal.d.ts +0 -90
  142. package/packages/react/NysModal.js +0 -50
  143. package/packages/react/NysOption.d.ts +0 -66
  144. package/packages/react/NysOption.js +0 -25
  145. package/packages/react/NysPagination.d.ts +0 -72
  146. package/packages/react/NysPagination.js +0 -45
  147. package/packages/react/NysProcesslist.d.ts +0 -65
  148. package/packages/react/NysProcesslist.js +0 -25
  149. package/packages/react/NysProcesslistitem.d.ts +0 -61
  150. package/packages/react/NysProcesslistitem.js +0 -35
  151. package/packages/react/NysRadiobutton.d.ts +0 -132
  152. package/packages/react/NysRadiobutton.js +0 -72
  153. package/packages/react/NysRadiogroup.d.ts +0 -104
  154. package/packages/react/NysRadiogroup.js +0 -62
  155. package/packages/react/NysSelect.d.ts +0 -119
  156. package/packages/react/NysSelect.js +0 -67
  157. package/packages/react/NysSkipnav.d.ts +0 -54
  158. package/packages/react/NysSkipnav.js +0 -22
  159. package/packages/react/NysStep.d.ts +0 -73
  160. package/packages/react/NysStep.js +0 -40
  161. package/packages/react/NysStepper.d.ts +0 -67
  162. package/packages/react/NysStepper.js +0 -26
  163. package/packages/react/NysTab.d.ts +0 -90
  164. package/packages/react/NysTab.js +0 -39
  165. package/packages/react/NysTabgroup.d.ts +0 -76
  166. package/packages/react/NysTabgroup.js +0 -22
  167. package/packages/react/NysTable.d.ts +0 -80
  168. package/packages/react/NysTable.js +0 -41
  169. package/packages/react/NysTabpanel.d.ts +0 -70
  170. package/packages/react/NysTabpanel.js +0 -21
  171. package/packages/react/NysTextarea.d.ts +0 -141
  172. package/packages/react/NysTextarea.js +0 -79
  173. package/packages/react/NysTextinput.d.ts +0 -144
  174. package/packages/react/NysTextinput.js +0 -83
  175. package/packages/react/NysToggle.d.ts +0 -102
  176. package/packages/react/NysToggle.js +0 -59
  177. package/packages/react/NysTooltip.d.ts +0 -60
  178. package/packages/react/NysTooltip.js +0 -24
  179. package/packages/react/NysUnavFooter.d.ts +0 -61
  180. package/packages/react/NysUnavFooter.js +0 -21
  181. package/packages/react/NysUnavHeader.d.ts +0 -98
  182. package/packages/react/NysUnavHeader.js +0 -56
  183. package/packages/react/NysVerticalnav.d.ts +0 -67
  184. package/packages/react/NysVerticalnav.js +0 -26
  185. package/packages/react/NysVerticalnavGroup.d.ts +0 -76
  186. package/packages/react/NysVerticalnavGroup.js +0 -43
  187. package/packages/react/NysVideo.d.ts +0 -83
  188. package/packages/react/NysVideo.js +0 -53
  189. package/packages/react/README.md +0 -92
  190. package/packages/react/index.d.ts +0 -49
  191. package/packages/react/index.js +0 -49
  192. package/packages/react/nysds-jsx.d.ts +0 -1998
  193. package/packages/react/react-utils.js +0 -40
@@ -1,1998 +0,0 @@
1
- /**
2
- * This type can be used to create scoped tags for your components.
3
- *
4
- * Usage:
5
- *
6
- * ```ts
7
- * import type { ScopedElements } from "path/to/library/jsx-integration";
8
- *
9
- * declare module "my-library" {
10
- * namespace JSX {
11
- * interface IntrinsicElements
12
- * extends ScopedElements<'test-', ''> {}
13
- * }
14
- * }
15
- * ```
16
- *
17
- */
18
- export type ScopedElements<Prefix extends string = "", Suffix extends string = ""> = {
19
- [Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
20
- };
21
-
22
- type BaseProps = {
23
- /** Content added between the opening and closing tags of the element */
24
- children?: any;
25
- /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
26
- class?: string;
27
- /** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
28
- className?: string;
29
- /** Takes an object where the key is the class name(s) and the value is a boolean expression. When true, the class is applied, and when false, it is removed. */
30
- classList?: Record<string, boolean | undefined>;
31
- /** Specifies the text direction of the element. */
32
- dir?: "ltr" | "rtl";
33
- /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
34
- exportparts?: string;
35
- /** For <label> and <output>, lets you associate the label with some control. */
36
- htmlFor?: string;
37
- /** Specifies whether the element should be hidden. */
38
- hidden?: boolean | string;
39
- /** A unique identifier for the element. */
40
- id?: string;
41
- /** Keys tell React which array item each component corresponds to */
42
- key?: string | number;
43
- /** Specifies the language of the element. */
44
- lang?: string;
45
- /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
46
- part?: string;
47
- /** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
48
- ref?: unknown | ((e: unknown) => void);
49
- /** Adds a reference for a custom element slot */
50
- slot?: string;
51
- /** Prop for setting inline styles */
52
- style?: Record<string, string | number>;
53
- /** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
54
- tabIndex?: number;
55
- /** Specifies the tooltip text for the element. */
56
- title?: string;
57
- /** Passing 'no' excludes the element content from being translated. */
58
- translate?: "yes" | "no";
59
- };
60
-
61
- type BaseEvents = {};
62
-
63
- export type NysAccordionProps = {
64
- /** Unique identifier. Auto-generated if not provided. */
65
- id?: string;
66
- /** Only one item can be expanded at a time. Expanding one collapses others. */
67
- singleSelect?: boolean;
68
- /** Adds borders around each accordion item. Propagates to all children. */
69
- bordered?: boolean;
70
- /** Heading element wrapping every item's toggle button (`h2` through `h6`).
71
-
72
- Each item's trigger is a real heading, so this is what places the accordion
73
- in the page outline: choose one level below the heading that introduces the
74
- accordion (an accordion under an `h2` section heading uses the `h3`
75
- default). An individual `nys-accordionitem` can override it with its own
76
- `headingLevel`. `h1` is not offered because an accordion trigger is never
77
- the page title. */
78
- headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6";
79
- };
80
-
81
- export type NysAccordionItemProps = {
82
- /** Unique identifier. Auto-generated if not provided. */
83
- id?: string;
84
- /** Heading text displayed in the clickable toggle button. */
85
- heading?: string;
86
- /** Heading element that wraps the toggle button (`h2` through `h6`).
87
-
88
- Pick the level that puts the trigger in the right place in the page
89
- outline — one level below the heading that introduces the accordion. Leave
90
- it empty to follow the `headingLevel` of the enclosing `nys-accordion`,
91
- which is the usual way to set it for a whole group; `h3` applies when
92
- neither is specified. `h1` is not offered because an accordion trigger is
93
- never the page title. */
94
- headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6" | "";
95
- /** Whether the content panel is visible. Toggle via click or keyboard. */
96
- expanded?: boolean;
97
- /** Adds border styling. Set by parent `nys-accordion`, not directly. */
98
- bordered?: boolean;
99
-
100
- /** Fired when expanded state changes. Detail: `{id, heading, expanded}`. */
101
- "onnys-accordionitem-toggle"?: (e: CustomEvent<CustomEvent>) => void;
102
- };
103
-
104
- export type NysAlertProps = {
105
- /** Unique identifier. Auto-generated if not provided. */
106
- id?: string;
107
- /** Bold heading text displayed at the top of the alert. */
108
- heading?: string;
109
- /** Custom icon name. Defaults to type-appropriate icon if not set. */
110
- icon?: string;
111
- /** Shows close button allowing users to dismiss the alert. */
112
- dismissible?: boolean;
113
- /** Auto-dismiss after specified milliseconds. Set to 0 to disable. */
114
- duration?: number;
115
- /** Body text content. Ignored if slot content is provided. */
116
- text?: string;
117
- /** URL for the primary action link. */
118
- primaryAction?: string;
119
- /** URL for the secondary action link. */
120
- secondaryAction?: string;
121
- /** Label text for primary action link. */
122
- primaryLabel?: string;
123
- /** Label text for secondary action link. */
124
- secondaryLabel?: string;
125
- /** Semantic alert type affecting color and ARIA role. `warning`/`danger`/`emergency` use
126
- `role="alert"` (assertive live region); `base`/`info`/`success` use `role="status"` (polite). */
127
- type?: "base" | "info" | "success" | "warning" | "danger" | "emergency";
128
- /** Returns the ARIA role and aria-live setting for the alert's live region based on type.
129
- - `warning`/`danger`/`emergency` => role="alert", aria-live="assertive" (urgent, interrupts)
130
- - `base`/`info`/`success` => role="status", aria-live="polite" (waits its turn)
131
-
132
- `aria-live` is set explicitly alongside `role` (rather than relying on the role's implicit
133
- live-region semantics) for more consistent behavior across browser/AT combinations. */
134
- ariaAttributes?: {
135
- role: "alert" | "status";
136
- ariaLive: "polite" | "assertive";
137
- };
138
- /** Fired when alert is dismissed. Detail: `{id, type, label}`. */
139
- "onnys-close"?: (e: CustomEvent<CustomEvent>) => void;
140
- };
141
-
142
- export type NysAvatarProps = {
143
- /** Unique identifier. Auto-generated if not provided. */
144
- id?: string;
145
- /** Accessible name for the avatar — who or what it represents ("Jane Smith"),
146
- not what it is ("avatar").
147
-
148
- Leave it unset for a decorative avatar and the whole thing is hidden from
149
- assistive tech, which is the right outcome next to a visible name. Set it
150
- whenever the avatar is the only thing identifying the person, and always when
151
- `interactive` is set: that renders a `<button>`, and a nameless button cannot
152
- be operated by screen reader or voice-control users (WCAG 4.1.2). An
153
- interactive avatar without a name logs a console warning.
154
-
155
- Whitespace-only values — including a non-breaking space — count as no name. */
156
- ariaLabel?: string;
157
- /** Image URL. Takes priority over initials and icon. */
158
- image?: string;
159
- /** 1-2 character initials. Used when no image is provided. */
160
- initials?: string;
161
- /** Custom icon name. Falls back to `account_circle` if not set. */
162
- icon?: string;
163
- /** Background color. Foreground auto-adjusts for contrast. Accepts CSS values or variables. */
164
- color?: string;
165
- /** Makes avatar clickable with button role and focus ring. */
166
- interactive?: boolean;
167
- /** Prevents interaction when `interactive` is true. */
168
- disabled?: boolean;
169
- /** Enables lazy loading for the image. */
170
- lazy?: boolean;
171
- };
172
-
173
- export type NysBacktotopProps = {
174
- /** Unique identifier. Auto-generated if not provided. */
175
- id?: string;
176
- /** Horizontal position: `left` or `right`. */
177
- position?: string;
178
- /** Force button visibility. Overrides auto-show scroll behavior. */
179
- visible?: boolean;
180
- };
181
-
182
- export type NysBadgeProps = {
183
- /** Unique identifier. */
184
- id?: string;
185
- /** Name attribute for form association. */
186
- name?: string;
187
- /** Badge size: `sm` (smaller text) or `md` (default). */
188
- size?: "sm" | "md";
189
- /** Semantic intent affecting color: `base`, `info`, `success`, `warning` `danger`, `emergency`. `error` has been deprecated and support will be removed in a future release. Use `danger` instead */
190
- intent?: "base" | "info" | "success" | "warning" | "danger" | "error" | "emergency";
191
- /** Secondary label displayed before the main label. */
192
- prefixLabel?: string;
193
- /** Primary label text displayed in the badge. */
194
- label?: string;
195
- /** Screen reader text appended after the label for additional context. */
196
- srText?: string;
197
- /** Strong visual intent with bolder text and background. */
198
- strong?: boolean;
199
- /** */
200
- prefixicon?: string | boolean;
201
- /** */
202
- suffixicon?: string | boolean;
203
- };
204
-
205
- export type NysBreadcrumbsProps = {
206
- /** Unique identifier. Auto-generated if not provided. */
207
- id?: string;
208
- /** Accessible label for the `<nav>` landmark. Defaults to "Breadcrumb" if not set.
209
- Override when multiple crumbs exist on the same page. */
210
- ariaLabel?: string;
211
- /** Controls the visual size of the breadcrumb text and spacing: `sm` for dense layouts, `md` (default) for standard use. */
212
- size?: "sm" | "md";
213
- /** On mobile, renders the trail as a single back-to-parent link pointing to the item before the current page.
214
- Has no effect on desktop or when only one item is present (which always renders as a back link). */
215
- backToParent?: boolean;
216
- /** Forces the trail into its collapsed state.
217
- It shows only the first item, an ellipsis, and the last two items.
218
- The user can still expand the trail by clicking the ellipsis. */
219
- collapsed?: boolean;
220
- /** Renders a filled light theme background bar behind the breadcrumb trail. */
221
- backgroundBar?: boolean;
222
- /** Prevents interaction. */
223
- disabled?: boolean;
224
-
225
- /** */
226
- "onnys-expand"?: (e: CustomEvent<CustomEvent>) => void;
227
- /** Fired when the user clicks the ellipsis to expand the trail. */
228
- "onnys-breadcrumbs-expand"?: (e: CustomEvent<never>) => void;
229
- };
230
-
231
- export type NysButtonProps = {
232
- /** Unique identifier. Auto-generated if not provided. */
233
- id?: string;
234
- /** Name for form submission. */
235
- name?: string;
236
- /** Button height: `sm` (40px) for dense UIs, `md` (48px, default) for standard use, `lg` (56px) for prominent CTAs. */
237
- size?: "sm" | "md" | "lg";
238
- /** Expands button to fill container width. Use for mobile layouts or stacked button groups. */
239
- fullWidth?: boolean;
240
- /** Visual style: `filled` for primary (one per section), `outline` for secondary, `ghost` for tertiary, `text` for inline actions. Avoid `text` for navigation. */
241
- variant?: "filled" | "outline" | "ghost" | "text";
242
- /** Adjusts colors for dark backgrounds. */
243
- inverted?: boolean;
244
- /** Visible button text. Use sentence case, action-oriented text (e.g., "Save Draft"). In `circle` mode it is visually hidden but still exposed to assistive tech as the accessible name. */
245
- label?: string;
246
- /** ID of controlled element (e.g., dropdown or modal). Sets `aria-controls`.
247
-
248
- Set this on `<nys-button>` rather than putting `aria-controls` on the host:
249
- the host has no role, so ARIA placed there is not mapped into the
250
- accessibility tree and never reaches the internal `<button>`. */
251
- ariaControls?: string;
252
- /** Disclosure state for buttons that show/hide content. Sets `aria-expanded`
253
- on the internal `<button>`/`<a>`.
254
-
255
- Use `"false"` when the controlled content is collapsed and `"true"` when it
256
- is expanded, updating it every time the content toggles. Leave unset for
257
- buttons that are not disclosure triggers — an `aria-expanded` that never
258
- changes is worse than none. Pair with `ariaControls` pointing at the
259
- element being shown or hidden.
260
-
261
- Setting `aria-expanded` directly on the `<nys-button>` host does nothing:
262
- a custom element with no role does not map its ARIA attributes into the
263
- accessibility tree, and host ARIA does not cross into the shadow root. */
264
- ariaExpanded?: "true" | "false" | "";
265
- /** Marks this button as the current item within a set of related controls — the current
266
- page of a pagination control, the current step of a wizard. Sets `aria-current` on the
267
- internal `<button>`/`<a>`.
268
-
269
- Use `"page"` inside a pagination landmark, `"step"` inside a step indicator, and
270
- `"true"` when no more specific token fits. Only one control in a set is ever current:
271
- leave the property unset on all the others rather than setting `"false"`, which the
272
- spec reads as "explicitly not current" and adds nothing.
273
-
274
- Setting `aria-current` directly on the `<nys-button>` host does nothing: a custom
275
- element with no role does not map its ARIA attributes into the accessibility tree,
276
- and host ARIA does not cross into the shadow root. */
277
- ariaCurrent?: "page" | "step" | "location" | "date" | "time" | "true" | "false" | "";
278
- /** Material Symbol icon before label. Not shown for `circle` mode. */
279
- prefixIcon?: string;
280
- /** Material Symbol icon after label. Use `chevron_down` for dropdowns, `open_in_new` for external links. Not shown for `circle` mode. */
281
- suffixIcon?: string;
282
- /** Renders circular icon-only button. Requires `icon` prop. `label` is rendered as visually-hidden text for the accessible name. */
283
- circle?: boolean;
284
- /** Icon for circle mode. Required when `circle` is true. Scales with size (sm=24px, md=32px, lg=40px). */
285
- icon?: string;
286
- /** Prevents interaction. Avoid disabling without explanation—show validation errors instead. */
287
- disabled?: boolean;
288
- /** Form `id` to associate with. Use when button is outside the form element. */
289
- form?: string | null;
290
- /** Value submitted with form data. Only used when `type="submit"`. */
291
- value?: string;
292
- /** ID(s) of element(s) describing this button. Sets `aria-describedby`. */
293
- ariaDescribedBy?: string;
294
- /** Form behavior: `button` (default, no form action), `submit` (submits form), `reset` (resets form). Always set explicitly to avoid unintended submissions. */
295
- type?: "submit" | "reset" | "button";
296
- /** URL to navigate to. Renders as `<a>` tag. Omit for action buttons. */
297
- href?: string;
298
- /** Link target: `_self` (same tab), `_blank` (new tab—add `suffixIcon="open_in_new"`), `_parent`, `_top`, or frame name. */
299
- target?: "_self" | "_blank" | "_parent" | "_top" | "framename";
300
- /** Click handler. Use instead of `@click` to ensure keyboard accessibility. */
301
- onClick?: ((event: Event) => void) | null;
302
- /** Fired when the button receives focus. */
303
- "onnys-focus"?: (e: CustomEvent<Event>) => void;
304
- /** Fired when the button loses focus. */
305
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
306
- /** Fired when the button is clicked (mouse or keyboard). Not fired when disabled. */
307
- "onnys-click"?: (e: CustomEvent<Event>) => void;
308
- };
309
-
310
- export type NysCardProps = {
311
- /** Unique identifier. Auto-generated if not provided. */
312
- id?: string;
313
- /** Appears above the heading text. */
314
- preheading?: string;
315
- /** Heading text in the card. */
316
- heading?: string;
317
- /** Heading level used for the card heading (`h1` through `h6`). */
318
- headingLevel?: HeadingLevel;
319
- /** Appears below the heading text. */
320
- subheading?: string;
321
- /** Appears below the subheading text. Takes in plain text. Use the main slot if the description requires rich text or more content. */
322
- description?: string;
323
- /** When true, adds padding around the media to visually contain it. */
324
- inset?: boolean;
325
- /** When true, adds a drop shadow to the card, giving it a raised appearance. */
326
- elevated?: boolean;
327
- /** URL to navigate to. Makes the whole card a single `<a>`. Keep the card's slots
328
- free of other interactive elements when using this — nesting them inside the
329
- card control is invalid HTML and unreachable for keyboard and screen reader users. */
330
- href?: string;
331
- /** Link target: `_self` (same tab), `_blank` (new tab), `_parent`, `_top`, or frame name. Only used with `href`. */
332
- target?: "_self" | "_blank" | "_parent" | "_top" | "framename";
333
- /** Click handler. Makes the whole card a single `<button>`. Use instead of
334
- `@click` to ensure keyboard accessibility. Keep the card's slots free of
335
- other interactive elements when using this — nesting them inside the card
336
- control is invalid HTML and unreachable for keyboard and screen reader users. */
337
- onClick?: ((event: Event) => void) | null;
338
- /** Fired when an interactive card is activated (mouse or keyboard). */
339
- "onnys-click"?: (e: CustomEvent<Event>) => void;
340
- /** Fired when an interactive card receives focus. */
341
- "onnys-focus"?: (e: CustomEvent<Event>) => void;
342
- /** Fired when an interactive card loses focus. */
343
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
344
- };
345
-
346
- export type NysCheckboxProps = {
347
- /** Whether checkbox is checked. */
348
- checked?: boolean;
349
- /** Prevents interaction. */
350
- disabled?: boolean;
351
- /** Marks as required. Validates that checkbox is checked. */
352
- required?: boolean;
353
- /** Visible label text. Required for accessibility. */
354
- label?: string;
355
- /** Helper text below label. Use slot for custom HTML. */
356
- description?: string;
357
- /** Unique identifier. Auto-generated if not provided. */
358
- id?: string;
359
- /** Name for form submission. Use same name for grouped checkboxes. */
360
- name?: string;
361
- /** Value submitted when checked. */
362
- value?: string;
363
- /** Form `id` to associate with when checkbox is outside form element. */
364
- form?: string | null;
365
- /** Shows error message when true. */
366
- showError?: boolean;
367
- /** Error message text. Shown only when `showError` is true. */
368
- errorMessage?: string;
369
- /** Internal: Set by parent checkboxgroup. Do not set manually. */
370
- groupExist?: boolean;
371
- /** Renders as tile with larger clickable area. Apply to group for consistency. */
372
- tile?: boolean;
373
- /** Tooltip text shown on hover/focus of info icon. */
374
- tooltip?: string;
375
- /** Checkbox size: `sm` (24px) or `md` (32px, default). */
376
- size?: "sm" | "md";
377
- /** */
378
- other?: boolean;
379
- /** */
380
- showOtherError?: boolean;
381
- /** Id of an element in the host's light-DOM tree to borrow the accessible name
382
- from (e.g. a table column `<th>`). Enables labelling a checkbox that has no
383
- visible label of its own. */
384
- labelledby?: string;
385
- /** Suppress the internal visible `<nys-label>` (use with `labelledby` for
386
- table cells). */
387
- hideLabel?: boolean;
388
- /** */
389
- _hasDescription?: string;
390
- /** */
391
- _isStandalone?: string;
392
- /** Fired when checked state changes. Detail: `{id, checked, name, value}`. */
393
- "onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
394
- /** Fired when "other" text input value changes. Detail: `{id, name, value}`. */
395
- "onnys-other-input"?: (e: CustomEvent<CustomEvent>) => void;
396
- /** Fired when checkbox gains focus. */
397
- "onnys-focus"?: (e: CustomEvent<Event>) => void;
398
- /** Fired when checkbox loses focus. */
399
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
400
- /** */
401
- "onnys-error"?: (e: CustomEvent<CustomEvent>) => void;
402
- /** */
403
- "onnys-error-clear"?: (e: CustomEvent<CustomEvent>) => void;
404
- };
405
-
406
- export type NysCheckboxgroupProps = {
407
- /** Unique identifier. Auto-generated if not provided. */
408
- id?: string;
409
- /** Name for form submission. Set on group, not individual checkboxes. */
410
- name?: string;
411
- /** Requires at least one checkbox to be checked. */
412
- required?: boolean;
413
- /** Shows "Optional" flag. */
414
- optional?: boolean;
415
- /** Shows error message when true. */
416
- showError?: boolean;
417
- /** Error message text. Shown only when `showError` is true. */
418
- errorMessage?: string;
419
- /** Visible label text for the group. */
420
- label?: string;
421
- /** Helper text below label. Use slot for custom HTML. */
422
- description?: string;
423
- /** Renders all checkboxes as tiles with larger clickable area. */
424
- tile?: boolean;
425
- /** Tooltip text shown on hover/focus of info icon. */
426
- tooltip?: string;
427
- /** Form `id` to associate with. Applied to all children. */
428
- form?: string | null;
429
- /** Checkbox size for all children: `sm` (24px) or `md` (32px, default). */
430
- size?: "sm" | "md";
431
- };
432
-
433
- export type NysComboboxProps = {
434
- /** */
435
- id?: string;
436
- /** */
437
- name?: string;
438
- /** */
439
- label?: string;
440
- /** */
441
- description?: string;
442
- /** */
443
- value?: string;
444
- /** */
445
- disabled?: boolean;
446
- /** */
447
- required?: boolean;
448
- /** */
449
- optional?: boolean;
450
- /** */
451
- tooltip?: string;
452
- /** */
453
- form?: string | null;
454
- /** */
455
- width?: "md" | "lg" | "full";
456
- /** */
457
- inverted?: boolean;
458
- /** */
459
- showError?: boolean;
460
- /** */
461
- errorMessage?: string;
462
-
463
- /** Fired on input change. Detail: `{ id, value }`. */
464
- "onnys-input"?: (e: CustomEvent<CustomEvent>) => void;
465
- /** Fired when combobox receives focus. */
466
- "onnys-focus"?: (e: CustomEvent<Event>) => void;
467
- /** Fired when combobox loses focus. */
468
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
469
- /** Fired when selection changes. Detail: `{ id, value }`. */
470
- "onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
471
- };
472
-
473
- export type NysDatepickerProps = {
474
- /** Unique identifier. Auto-generated if not provided. */
475
- id?: string;
476
- /** Name for form submission. */
477
- name?: string;
478
- /** Input width: `md` (200px), `lg` (384px), `full` (100%). */
479
- width?: "md" | "lg" | "full";
480
- /** Hide the "Today" button in calendar popup. */
481
- hideTodayButton?: boolean;
482
- /** Hide the "Clear" button in calendar popup. */
483
- hideClearButton?: boolean;
484
- /** Disable interaction. */
485
- disabled?: boolean;
486
- /** Mark as required. Shows "Required" flag and validates on blur. */
487
- required?: boolean;
488
- /** Show "Optional" flag. Use when most fields are required. */
489
- optional?: boolean;
490
- /** Show error state. */
491
- showError?: boolean;
492
- /** Error message text. */
493
- errorMessage?: string;
494
- /** Form `id` to associate with when input is outside form. */
495
- form?: string | null;
496
- /** Tooltip text on info icon hover. */
497
- tooltip?: string;
498
- /** Input type. Currently only supports `date`. */
499
- type?: string;
500
- /** Label text. Required for accessibility. */
501
- label?: string;
502
- /** Helper text below label. */
503
- description?: string;
504
- /** Initial date when calendar opens (YYYY-MM-DD). */
505
- startDate?: string;
506
- /** The earliest selectable date (YYYY-MM-DD). */
507
- minDate?: string;
508
- /** The latest selectable date (YYYY-MM-DD). */
509
- maxDate?: string;
510
- /** Dark background mode. */
511
- inverted?: boolean;
512
- /** Selected date. Accepts Date object or ISO string (YYYY-MM-DD). */
513
- value?: string | Date | undefined;
514
-
515
- /** Fired on date selection. Detail: `{id, value}`. */
516
- "onnys-input"?: (e: CustomEvent<CustomEvent>) => void;
517
- /** Fired when input or calendar loses focus. Triggers validation. */
518
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
519
- };
520
-
521
- export type NysDividerProps = {
522
- /** Adjusts colors for dark backgrounds. */
523
- inverted?: boolean;
524
- /** If true, the divider will use a lighter color. */
525
- subtle?: boolean;
526
- };
527
-
528
- export type NysDropdownMenuProps = {
529
- /** */
530
- for?: string;
531
- /** */
532
- showDropdown?: boolean;
533
- /** Accessible label for the menu (`role="menu"`) container. Used as `aria-label`
534
- on the `<ul role="menu">` element. When empty, falls back to "Menu" so the
535
- menu always has an accessible name for screen readers. */
536
- label?: string;
537
- /** Preferred position relative to trigger. */
538
- position?: Position | null;
539
- };
540
-
541
- export type NysDropdownMenuItemProps = {
542
- /** */
543
- label?: string;
544
- /** */
545
- href?: string;
546
- /** */
547
- disabled?: boolean;
548
- /** */
549
- target?: string;
550
- /** */
551
- prefixIcon?: string;
552
- /** */
553
- divider?: string;
554
-
555
- /** */
556
- "onnys-click"?: (e: CustomEvent<CustomEvent>) => void;
557
- };
558
-
559
- export type NysErrorMessageProps = {
560
- /** The "id" of the error message. */
561
- id?: string;
562
- /** Whether to display the error message. */
563
- showError?: boolean;
564
- /** Error text to display. Falls back to native validation message if available. */
565
- errorMessage?: string;
566
- /** Shows a divider line above the error message. */
567
- showDivider?: boolean;
568
- };
569
-
570
- export type NysFileinputProps = {
571
- /** Unique identifier. Auto-generated if not provided. */
572
- id?: string;
573
- /** Name for form submission. */
574
- name?: string;
575
- /** Visible label text. */
576
- label?: string;
577
- /** Helper text below label. Use slot for custom HTML. */
578
- description?: string;
579
- /** Allows selecting multiple files. */
580
- multiple?: boolean;
581
- /** Form `id` to associate with. */
582
- form?: string | null;
583
- /** Tooltip text shown on hover/focus of info icon. */
584
- tooltip?: string;
585
- /** Accepted file types. Use MIME types (`image/*`) or extensions (`.pdf`). Validated via magic bytes. */
586
- accept?: string;
587
- /** Prevents interaction. */
588
- disabled?: boolean;
589
- /** Requires at least one file to be uploaded. */
590
- required?: boolean;
591
- /** Shows "Optional" flag. */
592
- optional?: boolean;
593
- /** Shows error message when true. */
594
- showError?: boolean;
595
- /** Error message text. Shown only when `showError` is true. */
596
- errorMessage?: string;
597
- /** Enables drag-and-drop zone UI. */
598
- dropzone?: boolean;
599
- /** Component width: `lg` (384px) or `full` (100%, default). */
600
- width?: "lg" | "full";
601
- /** Adjusts colors for dark backgrounds. */
602
- inverted?: boolean;
603
- /** The currently selected files. Read to get the current selection; set to
604
- replace it (e.g. rehydrating state after navigation, or binding from a
605
- framework form model). Property-only — a `File[]` cannot round-trip through
606
- an HTML attribute. Setting this is silent (does not emit `nys-change`),
607
- matching native input behavior and avoiding feedback loops in two-way bindings. */
608
- files?: File[];
609
- /** Single-file convenience accessor (parity with `nys-textinput`'s `value`).
610
- Reads the first selected file (or `null`); setting replaces the selection. */
611
- value?: File | null;
612
- /** Fired when focus leaves the component. Triggers validation. */
613
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
614
- /** Fired once per user action (file selection, drop, or removal). Detail: `{id, files, changedFiles}`. The `files` is the full current selection Whereas `changedFiles` is the entries this action added or removed. Both `changedFiles` and each entry in `files` are `{ file: File, progress: number, status: "pending" | "processing" | "done" | "error", errorMsg?: string }`. */
615
- "onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
616
- };
617
-
618
- export type NysFileItemProps = {
619
- /** Name of the file being displayed. */
620
- filename?: string;
621
- /** Upload status: `pending` (queued), `processing` (uploading), `done` (complete), `error` (failed). */
622
- status?: "pending" | "processing" | "done" | "error";
623
- /** Upload progress percentage (0-100). Only shown when status is `processing`. */
624
- progress?: number;
625
- /** Error message displayed when status is `error`. */
626
- errorMessage?: string;
627
-
628
- /** Fired when remove button is clicked. Detail: `{filename}`. */
629
- "onnys-fileRemove"?: (e: CustomEvent<CustomEvent>) => void;
630
- };
631
-
632
- export type NysGlobalFooterProps = {
633
- /** Unique identifier. Auto-generated if not provided. */
634
- id?: string;
635
- /** Agency name displayed as the footer heading. */
636
- agencyName?: string;
637
- /** Optional subheading displayed below the agency name. */
638
- agencySubheading?: string;
639
- /** URL for the agency name link. If empty, name is not clickable. */
640
- homepageLink?: string;
641
- /** Accessible name for the `contentinfo` landmark this footer renders.
642
-
643
- Leave it unset and the landmark is named after the visible `agencyName`
644
- heading, which cannot drift out of sync and is translated with the rest of
645
- the page. Falls back to `"Site"` when there is no agency name to reference.
646
-
647
- Set this only when the agency name is not right for your audience. A page
648
- pairing this with `nys-unavfooter` carries two `contentinfo` landmarks, so
649
- the name must stay distinct from that footer's (`"New York State"` by
650
- default) or landmark navigation stops distinguishing them.
651
-
652
- An explicit name replaces the reference to the visible heading. */
653
- landmarkLabel?: string;
654
- };
655
-
656
- export type NysGlobalHeaderProps = {
657
- /** Unique identifier. Auto-generated if not provided. */
658
- id?: string;
659
- /** Application name displayed prominently. */
660
- appName?: string;
661
- /** Agency name displayed below app name (or as main title if no appName). */
662
- agencyName?: string;
663
- /** URL for the header title link. If empty, title is not clickable. */
664
- homepageLink?: string;
665
- /** Displays the NYS brand mark in the header. Off by default.
666
-
667
- Enable only for internal, state-employee (back-office) applications that omit
668
- `nys-unavheader`. Any resident-facing app — even one requiring login — should
669
- keep `nys-unavheader` for trust and leave this off. */
670
- nysLogo?: boolean;
671
- /** Accessible name for the `banner` landmark this header renders.
672
-
673
- Leave it unset and the banner is named after the visible `appName` or
674
- `agencyName`, which cannot drift out of sync and is translated with the rest
675
- of the page. Falls back to `"Site"` when there is no title to reference.
676
-
677
- Set this only when neither is right for your audience. A page pairing this
678
- with `nys-unavheader` carries two `banner` landmarks, so the name must stay
679
- distinct from that header's (`"New York State"` by default) or landmark
680
- navigation stops distinguishing them.
681
-
682
- An explicit name replaces the reference to the visible title. */
683
- landmarkLabel?: string;
684
- };
685
-
686
- export type NysIconProps = {
687
- /** Icon name to resolve from the selected library. Required. */
688
- name?: string;
689
- /** Which registered icon library to use. Defaults to the built-in NYSDS library. */
690
- library?: string;
691
- /** Accessible label. When set, removes `aria-hidden` and adds `aria-label` to the SVG. */
692
- ariaLabel?: string;
693
- /** Rotation in degrees. Applied via CSS `rotate`. */
694
- rotate?: string;
695
- /** Flip direction: `horizontal`, `vertical`, or empty for none. */
696
- flip?: string;
697
- /** Icon color. Accepts any CSS color value. Defaults to `currentcolor`. */
698
- color?: string;
699
- /** Icon size. Semantic sizes: `xs`-`5xl`. Pixel sizes: `12`-`50`. */
700
- size?:
701
- | "xs"
702
- | "sm"
703
- | "md"
704
- | "lg"
705
- | "xl"
706
- | "2xl"
707
- | "3xl"
708
- | "4xl"
709
- | "5xl"
710
- | "12"
711
- | "14"
712
- | "16"
713
- | "18"
714
- | "20"
715
- | "24"
716
- | "32"
717
- | "40"
718
- | "50";
719
- /** Resolves when the current icon load (if any) is complete. */
720
- updateComplete?: Promise<boolean>;
721
- };
722
-
723
- export type NysIconlistProps = {
724
- /** Unique identifier. Auto-generated if not provided. */
725
- id?: string;
726
- /** Draws a divider between items. No divider is drawn after the last item. */
727
- divider?: boolean;
728
- };
729
-
730
- export type NysIconlistitemProps = {
731
- /** Material Symbols icon name passed to `<nys-icon>`. */
732
- icon?: string;
733
- /** Draws a rule below the item. Set by the parent `<nys-iconlist divider>`; not intended to be
734
- set directly. */
735
- divider?: boolean;
736
- };
737
-
738
- export type NysLabelProps = {
739
- /** The ID of the label. */
740
- id?: string;
741
- /** Label text displayed above the form field. */
742
- label?: string;
743
- /** Helper text displayed below the label. */
744
- description?: string;
745
- /** Flag type: `required` shows asterisk, `optional` shows "(Optional)". */
746
- flag?: string;
747
- /** Adjusts colors for dark backgrounds. */
748
- inverted?: boolean;
749
- /** Tooltip text shown on hover/focus of info icon next to label. */
750
- tooltip?: string;
751
- /** */
752
- _hasDescription?: string;
753
- /** */
754
- "onnys-label-click"?: (e: CustomEvent<CustomEvent>) => void;
755
- };
756
-
757
- export type NysModalProps = {
758
- /** Unique identifier. Auto-generated if not provided. */
759
- id?: string;
760
- /** Modal heading text. Required for accessibility — it becomes the dialog's
761
- accessible name via `aria-labelledby`. */
762
- heading?: string;
763
- /** Accessible name for the dialog, used only when no `heading` is set.
764
- Prefer a visible `heading`: a visible label satisfies WCAG 2.5.3 (Label in
765
- Name) and gives sighted users the same information. Use `ariaLabel` for the
766
- rare headless dialog so it still exposes a name (WCAG 4.1.2). */
767
- ariaLabel?: string;
768
- /** Secondary heading below the main heading. */
769
- subheading?: string;
770
- /** Controls modal visibility. Set to `true` to show. */
771
- open?: boolean;
772
- /** Prevents dismissal via close button or Escape key. User must take an action. */
773
- mandatory?: boolean;
774
- /** Modal width: `sm` (400px), `md` (600px), or `lg` (800px). */
775
- width?: "sm" | "md" | "lg";
776
-
777
- /** Fired when modal opens. Detail: `{id}`. */
778
- "onnys-open"?: (e: CustomEvent<CustomEvent>) => void;
779
- /** Fired when modal closes. Detail: `{id}`. */
780
- "onnys-close"?: (e: CustomEvent<CustomEvent>) => void;
781
- };
782
-
783
- export type NysPaginationProps = {
784
- /** Unique identifier. Auto-generated if not provided. */
785
- id?: string;
786
- /** Name attribute for form association. */
787
- name?: string;
788
- /** Currently active page (1-indexed). Clamped to valid range. */
789
- currentPage?: number;
790
- /** Total number of pages. Must be at least 1. */
791
- totalPages?: number;
792
- /** Internal state for layout adjustments near the end. */
793
- _twoBeforeLast?: boolean;
794
-
795
- /** Fired when page changes. Detail: `{page}`. */
796
- "onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
797
- };
798
-
799
- export type NysProcesslistProps = {
800
- /** Unique identifier. Auto-generated if not provided. */
801
- id?: string;
802
- /** Renders each step number in a bolder, higher-emphasis color. */
803
- strong?: boolean;
804
- /** Renders each step number using neutral (grayscale) coloring instead of the theme color. */
805
- neutral?: boolean;
806
- /** Step marker size: `sm` (smaller) or `md` (default). */
807
- size?: "md" | "sm";
808
- /** Number given to the first step. Subsequent steps count up from it. Use this when one
809
- process is split across several lists so the later lists continue the count instead of
810
- restarting at 1. */
811
- initialStep?: number;
812
- };
813
-
814
- export type NysProcesslistitemProps = {
815
- /** Step heading text. */
816
- label?: string;
817
- /** Supporting information displayed below the label. Use the `description` slot for rich text. */
818
- description?: string;
819
- /** A description is shown when either the property or the slot has content, so an item with
820
- neither renders no empty paragraph. */
821
- _hasDescription?: string;
822
- };
823
-
824
- export type NysRadiobuttonProps = {
825
- /** Whether this radio is selected. Only one per group can be checked. */
826
- checked?: boolean;
827
- /** Prevents interaction. */
828
- disabled?: boolean;
829
- /** Marks group as required. Set on radiogroup, not individual radios. */
830
- required?: boolean;
831
- /** Visible label text. Required for accessibility. */
832
- label?: string;
833
- /** Helper text below label. Use slot for custom HTML. */
834
- description?: string;
835
- /** Unique identifier. Auto-generated if not provided. */
836
- id?: string;
837
- /** Group name. Radios with same name are mutually exclusive. */
838
- name?: string;
839
- /** Value submitted when this radio is selected. */
840
- value?: string;
841
- /** Form `id` to associate with. */
842
- form?: string | null;
843
- /** Radio size: `sm` (24px) or `md` (32px, default). */
844
- size?: "sm" | "md";
845
- /** Renders as tile with larger clickable area. */
846
- tile?: boolean;
847
- /** */
848
- other?: boolean;
849
- /** */
850
- showOtherError?: boolean;
851
- /** Id of an element in the host's light-DOM tree to borrow the accessible name
852
- from (e.g. a table row `<th>`). Enables labelling a radio button that has no
853
- visible label of its own.
854
-
855
- Standalone radios only: inside a `nys-radiogroup` the group renders the
856
- native inputs and names them from the group's own labels. */
857
- labelledby?: string;
858
- /** Suppress the internal visible `<nys-label>` (use with `labelledby` for
859
- table cells). Without `labelledby` there is no visible element left to name
860
- the radio from, so the accessible name falls back to the `label` string —
861
- pair `hideLabel` with `labelledby` wherever a visible element exists. */
862
- hideLabel?: boolean;
863
- /** Public validation API (Form Association)
864
- -------------------------------------------------------------------------- */
865
- validity?: ValidityState | undefined;
866
- /** */
867
- validationMessage?: string;
868
- /** Fired when selection changes. Detail: `{id, checked, name, value}`. */
869
- "onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
870
- /** Fired when radio gains focus. */
871
- "onnys-focus"?: (e: CustomEvent<never>) => void;
872
- /** Fired when radio loses focus. */
873
- "onnys-blur"?: (e: CustomEvent<never>) => void;
874
- /** Fired when "other" text input value changes. Detail: `{id, name, value}`. */
875
- "onnys-other-input"?: (e: CustomEvent<never>) => void;
876
- };
877
-
878
- export type NysRadiogroupProps = {
879
- /** Unique identifier. Auto-generated if not provided. */
880
- id?: string;
881
- /** Name for form submission. Auto-populated from child radiobuttons. */
882
- name?: string;
883
- /** Requires a selection before form submission. */
884
- required?: boolean;
885
- /** Shows "Optional" flag. */
886
- optional?: boolean;
887
- /** Shows error message when true. */
888
- showError?: boolean;
889
- /** Error message text. Shown only when `showError` is true. */
890
- errorMessage?: string;
891
- /** Visible label text for the group. */
892
- label?: string;
893
- /** Helper text below label. Use slot for custom HTML. */
894
- description?: string;
895
- /** Renders all radiobuttons as tiles with larger clickable area. */
896
- tile?: boolean;
897
- /** Tooltip text shown on hover/focus of info icon. */
898
- tooltip?: string;
899
- /** Form `id` to associate with. Applied to all children. */
900
- form?: string | null;
901
- /** Radio size for all children: `sm` (24px) or `md` (32px, default). */
902
- size?: "sm" | "md";
903
- /** */
904
- _showOtherError?: boolean;
905
-
906
- /** */
907
- "onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
908
- /** */
909
- "onnys-other-input"?: (e: CustomEvent<CustomEvent>) => void;
910
- };
911
-
912
- export type NysOptionProps = {
913
- /** Prevents selection of this option. */
914
- disabled?: boolean;
915
- /** Pre-selects this option. */
916
- selected?: boolean;
917
- /** Value submitted when this option is selected. */
918
- value?: string;
919
- /** Display text for the option. Auto-populated from slot content if not set. */
920
- label?: string;
921
- /** Hides the option from the dropdown list. */
922
- hidden?: boolean;
923
- };
924
-
925
- export type NysSelectProps = {
926
- /** Unique identifier. Auto-generated if not provided. */
927
- id?: string;
928
- /** Name for form submission. */
929
- name?: string;
930
- /** Visible label text. Required for accessibility. */
931
- label?: string;
932
- /** Helper text below label. Use slot for custom HTML. */
933
- description?: string;
934
- /** Accessible label. Used as a fallback when `label` is not provided. */
935
- ariaLabel?: string;
936
- /** Currently selected option value. */
937
- value?: string;
938
- /** Prevents interaction. */
939
- disabled?: boolean;
940
- /** Marks as required. Shows "Required" flag and validates on blur. */
941
- required?: boolean;
942
- /** Shows "Optional" flag. Use when most fields are required. */
943
- optional?: boolean;
944
- /** Tooltip text shown on hover/focus of info icon. */
945
- tooltip?: string;
946
- /** Form `id` to associate with when select is outside form element. */
947
- form?: string | null;
948
- /** Adjusts colors for dark backgrounds. */
949
- inverted?: boolean;
950
- /** Shows error message when true. Set by validation or manually. */
951
- showError?: boolean;
952
- /** Error message text. Shown only when `showError` is true. */
953
- errorMessage?: string;
954
- /** Select width: `sm` (88px), `md` (200px), `lg` (384px), `full` (100%, default). */
955
- width?: "sm" | "md" | "lg" | "full";
956
-
957
- /** Fired when selection changes. Detail: `{id, value}`. */
958
- "onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
959
- /** Fired when select gains focus. */
960
- "onnys-focus"?: (e: CustomEvent<Event>) => void;
961
- /** Fired when select loses focus. Triggers validation. */
962
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
963
- };
964
-
965
- export type NysSkipnavProps = {
966
- /** Unique identifier. Auto-generated if not provided. */
967
- id?: string;
968
- /** Target element ID (with `#`). Defaults to `#main-content`. */
969
- href?: string;
970
- };
971
-
972
- export type NysStepProps = {
973
- /** Which step is currently being displayed. If not set, defaults to the `current` step.
974
- Setting this on a step after `current` is silently corrected to match `current`.
975
- When controlling state from a framework, always set this explicitly. */
976
- selected?: boolean;
977
- /** The furthest step the user has reached (progress boundary). Steps before this are navigable. */
978
- current?: boolean;
979
- /** Step label text displayed alongside the step number. */
980
- label?: string;
981
- /** URL navigated to when the step is activated, via `window.location.href`.
982
- Navigation is suppressed if the `nys-step-click` listener calls `e.preventDefault()`.
983
- Omit for SPA/framework routing and handle navigation in the event listener instead. */
984
- href?: string;
985
- /** Optional function called before `nys-step-click` is dispatched. Use for pre-navigation logic. */
986
- onClick?: (e: Event) => void | undefined;
987
- /** Fired when a navigable (`previous` or `current`) non-selected step is clicked or activated by keyboard. Detail: `{ href: string, label: string }`. Cancelable — call `e.preventDefault()` to suppress `window.location.href` navigation. */
988
- "onnys-step-click"?: (e: CustomEvent<never>) => void;
989
- };
990
-
991
- export type NysStepperProps = {
992
- /** Unique identifier. Auto-generated as `nys-stepper-{timestamp}-{n}` if not provided. */
993
- id?: string;
994
- /** Name attribute for form association. */
995
- name?: string;
996
- /** Title displayed above the step list and compact counter. */
997
- label?: string;
998
- /** Progress text displayed in compact mode (e.g., "Step 2 of 5"). Auto-managed — do not set manually. */
999
- counterText?: string;
1000
- /** Whether compact mobile view is expanded to show all steps. Toggled by clicking the counter. */
1001
- isCompactExpanded?: boolean;
1002
- };
1003
-
1004
- export type NysTabProps = {
1005
- /** Unique identifier for the tab element.
1006
- Reflected to the DOM attribute so `aria-controls` references resolve. */
1007
- id?: string;
1008
- /** Visible text label rendered inside the inner `<span>`. */
1009
- label?: string;
1010
- /** Whether this tab is the currently active tab.
1011
- Managed by `<nys-tabgroup>`; reflected for CSS attribute selectors. */
1012
- selected?: boolean;
1013
- /** Whether this tab is disabled.
1014
- Reflected to the DOM attribute for CSS styling. */
1015
- disabled?: boolean;
1016
-
1017
- /** Dispatched when the tab is activated via click or Enter / Space. Bubbles and crosses shadow DOM boundaries. `detail: { id: string, label: string }` */
1018
- "onnys-tab-select"?: (e: CustomEvent<CustomEvent>) => void;
1019
- /** Dispatched when the host receives focus. Bubbles and crosses shadow DOM boundaries. `detail: { id: string }` */
1020
- "onnys-tab-focus"?: (e: CustomEvent<never>) => void;
1021
- /** Dispatched when the host loses focus. Bubbles and crosses shadow DOM boundaries. `detail: { id: string }` */
1022
- "onnys-tab-blur"?: (e: CustomEvent<never>) => void;
1023
- };
1024
-
1025
- export type NysTabgroupProps = {
1026
- /** Unique identifier for the tabgroup element.
1027
- If not provided, one is auto-generated in `connectedCallback`.
1028
- Reflected to the DOM attribute. */
1029
- id?: string;
1030
- /** The name of the tab group.
1031
- Used for form submission and accessibility purposes. */
1032
- name?: string;
1033
- };
1034
-
1035
- export type NysTabpanelProps = {
1036
- /** Unique identifier for the panel element.
1037
- If not provided, one is auto-generated in `connectedCallback`.
1038
- Reflected to the DOM attribute so `aria-controls` references on sibling
1039
- `<nys-tab>` elements resolve correctly. */
1040
- id?: string;
1041
- };
1042
-
1043
- export type NysTableProps = {
1044
- /** */
1045
- id?: string;
1046
- /** */
1047
- name?: string;
1048
- /** */
1049
- striped?: boolean;
1050
- /** */
1051
- sortable?: boolean;
1052
- /** */
1053
- bordered?: boolean;
1054
- /** */
1055
- download?: string;
1056
-
1057
- /** Fired when the download button or sortable headers are clicked. */
1058
- "onnys-click"?: (e: CustomEvent<never>) => void;
1059
- /** Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior. Detail: { columnIndex: number, columnLabel: string, sortDirection: "asc" | "desc" | "none" } */
1060
- "onnys-column-sort"?: (e: CustomEvent<never>) => void;
1061
- };
1062
-
1063
- export type NysTextareaProps = {
1064
- /** Unique identifier. Auto-generated if not provided. */
1065
- id?: string;
1066
- /** Name for form submission. */
1067
- name?: string;
1068
- /** Visible label text. Required for accessibility. */
1069
- label?: string;
1070
- /** Helper text below label. Use slot for custom HTML. */
1071
- description?: string;
1072
- /** Placeholder text. Don't use as label replacement. */
1073
- placeholder?: string;
1074
- /** Current textarea value. */
1075
- value?: string;
1076
- /** Prevents interaction. */
1077
- disabled?: boolean;
1078
- /** Makes textarea readonly but focusable. */
1079
- readonly?: boolean;
1080
- /** Marks as required. Shows "Required" flag and validates on blur. */
1081
- required?: boolean;
1082
- /** Shows "Optional" flag. Use when most fields are required. */
1083
- optional?: boolean;
1084
- /** Tooltip text shown on hover/focus of info icon. */
1085
- tooltip?: string;
1086
- /** Adjusts colors for dark backgrounds. */
1087
- inverted?: boolean;
1088
- /** Form `id` to associate with when textarea is outside form element. */
1089
- form?: string | null;
1090
- /** Maximum character length. */
1091
- maxlength?: number | null;
1092
- /** Textarea width: `sm` (88px), `md` (200px), `lg` (384px), `full` (100%, default). */
1093
- width?: "sm" | "md" | "lg" | "full";
1094
- /** Visible height in lines. */
1095
- rows?: number;
1096
- /** Resize behavior: `vertical` (default, user can resize height), `none` (fixed size). */
1097
- resize?: "vertical" | "none";
1098
- /** Shows error message when true. Set by validation or manually. */
1099
- showError?: boolean;
1100
- /** Error message text. Shown only when `showError` is true. */
1101
- errorMessage?: string;
1102
- /** Accessible label used only when no visible `label` is provided. */
1103
- ariaLabel?: string;
1104
-
1105
- /** Fired on input change. Detail: `{id, value}`. */
1106
- "onnys-input"?: (e: CustomEvent<CustomEvent>) => void;
1107
- /** Fired when textarea gains focus. */
1108
- "onnys-focus"?: (e: CustomEvent<Event>) => void;
1109
- /** Fired when textarea loses focus. Triggers validation. */
1110
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
1111
- /** Fired when user selects text. Detail: `{id, value}`. */
1112
- "onnys-select"?: (e: CustomEvent<CustomEvent>) => void;
1113
- /** */
1114
- "onnys-selectionchange"?: (e: CustomEvent<CustomEvent>) => void;
1115
- };
1116
-
1117
- export type NysTextinputProps = {
1118
- /** Unique identifier. Auto-generated if not provided. */
1119
- id?: string;
1120
- /** Name for form submission. */
1121
- name?: string;
1122
- /** Input type: `text` (default), `email`, `number`, `password`, `search`, `tel` (auto-masked), `url`. */
1123
- type?: "email" | "number" | "password" | "search" | "tel" | "text" | "url";
1124
- /** Visible label text. Required for accessibility. */
1125
- label?: string;
1126
- /** Helper text below label. Use slot for custom HTML. */
1127
- description?: string;
1128
- /** Placeholder text. Don't use as label replacement. */
1129
- placeholder?: string;
1130
- /** Current input value. */
1131
- value?: string;
1132
- /** Prevents interaction. */
1133
- disabled?: boolean;
1134
- /** Makes input read-only but focusable. */
1135
- readonly?: boolean;
1136
- /** Marks as required. Shows "Required" flag and validates on blur. */
1137
- required?: boolean;
1138
- /** Shows "Optional" flag. Use when most fields are required. */
1139
- optional?: boolean;
1140
- /** Tooltip text shown on hover/focus of info icon. */
1141
- tooltip?: string;
1142
- /** Form `id` to associate with when input is outside form element. */
1143
- form?: string | null;
1144
- /** Regex pattern for validation. Shows error on mismatch. */
1145
- pattern?: string;
1146
- /** Maximum character length. */
1147
- maxlength?: number | null;
1148
- /** Accessible label. When set, assuming "label" isn't provided for private special cases (i.e., <checkbox other>). */
1149
- ariaLabel?: string;
1150
- /** Input width: `sm` (88px), `md` (200px), `lg` (384px), `full` (100%, default). */
1151
- width?: "sm" | "md" | "lg" | "full";
1152
- /** Step increment for `type="number"`. */
1153
- step?: number | null;
1154
- /** Minimum value for `type="number"`. */
1155
- min?: number | null;
1156
- /** Maximum value for `type="number"`. */
1157
- max?: number | null;
1158
- /** Adjusts colors for dark backgrounds. */
1159
- inverted?: boolean;
1160
- /** Shows error message when true. Set by validation or manually. */
1161
- showError?: boolean;
1162
- /** Error message text. Shown only when `showError` is true. */
1163
- errorMessage?: string;
1164
-
1165
- /** Fired on input change. Detail: `{id, value}`. */
1166
- "onnys-input"?: (e: CustomEvent<CustomEvent>) => void;
1167
- /** Fired when input gains focus. */
1168
- "onnys-focus"?: (e: CustomEvent<Event>) => void;
1169
- /** Fired when input loses focus. Triggers validation. */
1170
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
1171
- };
1172
-
1173
- export type NysToggleProps = {
1174
- /** Unique identifier. Auto-generated if not provided. */
1175
- id?: string;
1176
- /** Name for form submission. */
1177
- name?: string;
1178
- /** Value submitted when toggle is on. */
1179
- value?: string;
1180
- /** Visible label text. */
1181
- label?: string;
1182
- /** Helper text below label. Use slot for custom HTML. */
1183
- description?: string;
1184
- /** Form `id` to associate with. */
1185
- form?: string | null;
1186
- /** Whether toggle is on. */
1187
- checked?: boolean;
1188
- /** Prevents interaction. */
1189
- disabled?: boolean;
1190
- /** Hides check/close icon inside toggle knob. */
1191
- noIcon?: boolean;
1192
- /** Adjusts colors for dark backgrounds. */
1193
- inverted?: boolean;
1194
- /** Toggle size: `sm` or `md` (default). */
1195
- size?: "sm" | "md";
1196
-
1197
- /** Fired when toggle state changes. Detail: `{id, checked}`. */
1198
- "onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
1199
- /** Fired when toggle gains focus. */
1200
- "onnys-focus"?: (e: CustomEvent<Event>) => void;
1201
- /** Fired when toggle loses focus. */
1202
- "onnys-blur"?: (e: CustomEvent<Event>) => void;
1203
- };
1204
-
1205
- export type NysTooltipProps = {
1206
- /** Unique identifier. Auto-generated if not provided. */
1207
- id?: string;
1208
- /** Tooltip content text. Required. */
1209
- text?: string;
1210
- /** Adjusts colors for dark backgrounds. */
1211
- inverted?: boolean;
1212
- /** ID of the trigger element to attach this tooltip to. Required. */
1213
- for?: string;
1214
- /** Preferred position relative to trigger. Auto-adjusts if space is insufficient. */
1215
- position?: string;
1216
- };
1217
-
1218
- export type NysUnavFooterProps = {
1219
- /** Accessible name for the `contentinfo` landmark this footer renders.
1220
- Defaults to `"New York State"`.
1221
-
1222
- A page pairing this footer with `nys-globalfooter` carries two `contentinfo`
1223
- landmarks; distinct names are what keep landmark navigation useful instead of
1224
- announcing "content information" twice. Override only when your wording is
1225
- clearer for your audience — and keep it distinct from the agency footer's
1226
- name, which comes from that footer's visible heading.
1227
-
1228
- A blank value falls back to the default rather than leaving the landmark
1229
- unnamed. */
1230
- landmarkLabel?: string;
1231
- };
1232
-
1233
- export type NysUnavHeaderProps = {
1234
- /** Internal: Whether trust bar panel is expanded. */
1235
- trustbarVisible?: boolean;
1236
- /** Internal: Whether search dropdown is visible (mobile). */
1237
- searchDropdownVisible?: boolean;
1238
- /** Internal: Whether language dropdown is visible. */
1239
- languageVisible?: boolean;
1240
- /** Internal: Whether search input is focused. */
1241
- isSearchFocused?: boolean;
1242
- /** Hides the translation dropdown. */
1243
- hideTranslate?: boolean;
1244
- /** Hides the search functionality. */
1245
- hideSearch?: boolean;
1246
- /** The URL endpoint of the search, make sure to include the query param. */
1247
- searchUrl?: string;
1248
- /** Localize project key. If provided, the component will load and initialize LocalizeJS automatically. */
1249
- translateKey?: string;
1250
- /** Accessible name for the `banner` landmark this header renders.
1251
- Defaults to `"New York State"`.
1252
-
1253
- A page pairing this header with `nys-globalheader` carries two `banner`
1254
- landmarks; distinct names are what keep landmark navigation useful instead of
1255
- announcing "banner, banner". Override only when your wording is clearer for
1256
- your audience — and keep it distinct from the agency header's name, which
1257
- comes from that header's visible title.
1258
-
1259
- A blank value falls back to the default rather than leaving the landmark
1260
- unnamed. */
1261
- landmarkLabel?: string;
1262
- /** The list of languages this site can be translated to, default to use Localize */
1263
- languages?: Language[];
1264
-
1265
- /** Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Localize integration. */
1266
- "onnys-language-select"?: (e: CustomEvent<never>) => void;
1267
- /** Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect. */
1268
- "onnys-search-submit"?: (e: CustomEvent<never>) => void;
1269
- };
1270
-
1271
- export type NysVerticalnavProps = {
1272
- /** ID for the navigation. Generated automatically if not provided. */
1273
- id?: string;
1274
- /** Heading text displayed at the top of the navigation. Defaults to "Page navigation". */
1275
- heading?: string;
1276
- /** Hides the visible heading while keeping an accessible label for the navigation. */
1277
- hideHeading?: boolean;
1278
- /** Heading level used for the navigation heading (`h1` through `h6`). */
1279
- headingLevel?: HeadingLevel;
1280
- /** Expands or collapses the navigation on mobile. */
1281
- expanded?: boolean;
1282
- };
1283
-
1284
- export type NysVerticalnavGroupProps = {
1285
- /** */
1286
- id?: string;
1287
- /** */
1288
- label?: string;
1289
- /** */
1290
- expanded?: boolean;
1291
- /** */
1292
- disabled?: boolean;
1293
- /** */
1294
- active?: boolean;
1295
-
1296
- /** */
1297
- "onnys-child-resize"?: (e: CustomEvent<CustomEvent>) => void;
1298
- /** */
1299
- "onnys-verticalnavgroup-toggle"?: (e: CustomEvent<CustomEvent>) => void;
1300
- };
1301
-
1302
- export type NysVideoProps = {
1303
- /** Full YouTube URL — required. Component will not render if invalid. */
1304
- id?: string;
1305
- /** Title text for the thumbnail of the video */
1306
- titleText?: string;
1307
- /** Full YouTube URL — required. Component will not render if invalid. */
1308
- videourl?: string;
1309
- /** Largest size for the video player.
1310
- If not set, size is determined automatically by viewport width. */
1311
- size?: "full" | "md" | "sm" | "";
1312
- /** */
1313
- loading?: "lazy" | "eager";
1314
- /** Time in seconds where playback begins. * */
1315
- starttime?: number;
1316
- /** Custom thumbnail image path.
1317
- Falls back to YouTube's auto-generated thumbnail if not provided. */
1318
- thumbnail?: string | null;
1319
- /** Triggers autoplay when the iframe loads */
1320
- autoplay?: boolean;
1321
- /** Prevents the video from being played */
1322
- disabled?: boolean;
1323
-
1324
- /** Fired when the user clicks the thumbnail to load the player. */
1325
- "onnys-video-play"?: (e: CustomEvent<never>) => void;
1326
- };
1327
-
1328
- export type CustomElements = {
1329
- /**
1330
- * Container for accordion items with optional single-select and bordered styling.
1331
- * ---
1332
- *
1333
- *
1334
- * ### **Slots:**
1335
- * - _default_ - Default slot for `nys-accordionitem` elements.
1336
- *
1337
- * ### **CSS Properties:**
1338
- * - **--nys-accordion-background-color--header** - Background color of the accordion header. _(default: undefined)_
1339
- * - **--nys-accordion-background-color--header--hover** - Background hover color of the accordion header. _(default: undefined)_
1340
- * - **--nys-accordion-content-max-width** - Maximum readable width of accordion content. Defaults to a character-based width (80ch) for readability. _(default: undefined)_
1341
- */
1342
- "nys-accordion": Partial<NysAccordionProps & BaseProps & BaseEvents>;
1343
-
1344
- /**
1345
- * Collapsible panel for use within nys-accordion with keyboard support.
1346
- * ---
1347
- *
1348
- *
1349
- * ### **Events:**
1350
- * - **nys-accordionitem-toggle** - Fired when expanded state changes. Detail: `{id, heading, expanded}`.
1351
- *
1352
- * ### **Slots:**
1353
- * - _default_ - Default slot for panel content shown when expanded.
1354
- */
1355
- "nys-accordionitem": Partial<NysAccordionItemProps & BaseProps & BaseEvents>;
1356
-
1357
- /**
1358
- * Alert for contextual feedback with semantic types and live region support.
1359
- * ---
1360
- *
1361
- *
1362
- * ### **Events:**
1363
- * - **nys-close** - Fired when alert is dismissed. Detail: `{id, type, label}`.
1364
- *
1365
- * ### **Slots:**
1366
- * - _default_ - Default slot for custom body content. Overrides `text` prop when provided.
1367
- */
1368
- "nys-alert": Partial<NysAlertProps & BaseProps & BaseEvents>;
1369
-
1370
- /**
1371
- * User avatar with image, initials, or icon fallback and contrast-aware colors.
1372
- * ---
1373
- *
1374
- *
1375
- * ### **Slots:**
1376
- * - _default_ - Custom icon content. Overrides default icon when no image or initials.
1377
- */
1378
- "nys-avatar": Partial<NysAvatarProps & BaseProps & BaseEvents>;
1379
-
1380
- /**
1381
- * Floating back-to-top button with auto-show behavior, smooth scroll, and focus management.
1382
- * ---
1383
- *
1384
- */
1385
- "nys-backtotop": Partial<NysBacktotopProps & BaseProps & BaseEvents>;
1386
-
1387
- /**
1388
- * Compact label for status, counts, or categorization with semantic styling.
1389
- * ---
1390
- *
1391
- */
1392
- "nys-badge": Partial<NysBadgeProps & BaseProps & BaseEvents>;
1393
-
1394
- /**
1395
- * Breadcrumb navigation trail with responsive collapse support.
1396
- * ---
1397
- *
1398
- *
1399
- * ### **Events:**
1400
- * - **nys-expand**
1401
- * - **nys-breadcrumbs-expand** - Fired when the user clicks the ellipsis to expand the trail.
1402
- *
1403
- * ### **Slots:**
1404
- * - _default_ - One or more `li` elements defining the trail.
1405
- */
1406
- "nys-breadcrumbs": Partial<NysBreadcrumbsProps & BaseProps & BaseEvents>;
1407
-
1408
- /**
1409
- * Button for actions and CTAs with variants, sizes, and icon support.
1410
- * ---
1411
- *
1412
- *
1413
- * ### **Events:**
1414
- * - **nys-focus** - Fired when the button receives focus.
1415
- * - **nys-blur** - Fired when the button loses focus.
1416
- * - **nys-click** - Fired when the button is clicked (mouse or keyboard). Not fired when disabled.
1417
- *
1418
- * ### **Slots:**
1419
- * - _default_ - Button label text. Use as fallback when `label` prop is not provided.
1420
- * - **prefix-icon** - Icon before label. Not shown for `text` variant.
1421
- * - **suffix-icon** - Icon after label. Not shown for `text` variant.
1422
- * - **circle-icon** - Icon for circle mode. Overrides `icon` prop.
1423
- *
1424
- * ### **CSS Properties:**
1425
- * - **--nys-button-color** - Text color of the button label. _(default: undefined)_
1426
- * - **--nys-button-color--hover** - Text color when hovered. _(default: undefined)_
1427
- * - **--nys-button-color--active** - Text color when active/pressed. _(default: undefined)_
1428
- * - **--nys-button-background-color** - Background color of the button. _(default: undefined)_
1429
- * - **--nys-button-background-color--hover** - Background color when hovered. _(default: undefined)_
1430
- * - **--nys-button-background-color--active** - Background color when active/pressed. _(default: undefined)_
1431
- * - **--nys-button-border-color** - Border color of the button. _(default: undefined)_
1432
- * - **--nys-button-border-color--hover** - Border color when hovered. _(default: undefined)_
1433
- * - **--nys-button-border-color--active** - Border color when active/pressed. _(default: undefined)_
1434
- */
1435
- "nys-button": Partial<NysButtonProps & BaseProps & BaseEvents>;
1436
-
1437
- /**
1438
- * Flexible container that groups related content and actions about a single subject.
1439
- * ---
1440
- *
1441
- *
1442
- * ### **Events:**
1443
- * - **nys-click** - Fired when an interactive card is activated (mouse or keyboard).
1444
- * - **nys-focus** - Fired when an interactive card receives focus.
1445
- * - **nys-blur** - Fired when an interactive card loses focus.
1446
- *
1447
- * ### **Slots:**
1448
- * - **preheading** - Content rendered above the heading block (e.g. a badge or label).
1449
- * - _default_ - Default slot for the card's main body. Use for rich content when the `description` property is not enough.
1450
- * - **footer** - Content rendered at the footer of the card, typically actions like buttons or links.
1451
- * - **media** - Visual content displayed at the top of the card, typically an `<img>`.
1452
- * - **media-accent** - Text for the accent badge displayed over the media, typically a date. Pass a wrapper holding two elements: the first is rendered as the month line, the second as the day line. Only renders when the `media` slot has content. The card becomes a single interactive control when it is given something to do: an `href` renders it as an `<a>`, a click handler (`onClick` or an inline `onclick`) renders it as a `<button>`.
1453
- *
1454
- * ### **CSS Properties:**
1455
- * - **--nys-card-height** - Height of the card. Set to `100%` to stretch the card to its container's height, so a row of cards renders at an equal height. The extra height is absorbed by the main content area, keeping the `footer` slot pinned to the bottom of the card. Requires the container to give the card a height to fill (e.g. a grid column with `nys-display-flex`). _(default: fit-content)_
1456
- */
1457
- "nys-card": Partial<NysCardProps & BaseProps & BaseEvents>;
1458
-
1459
- /**
1460
- * Checkbox for binary choices or multi-select options.
1461
- * ---
1462
- *
1463
- *
1464
- * ### **Events:**
1465
- * - **nys-change** - Fired when checked state changes. Detail: `{id, checked, name, value}`.
1466
- * - **nys-other-input** - Fired when "other" text input value changes. Detail: `{id, name, value}`.
1467
- * - **nys-focus** - Fired when checkbox gains focus.
1468
- * - **nys-blur** - Fired when checkbox loses focus.
1469
- * - **nys-error**
1470
- * - **nys-error-clear**
1471
- *
1472
- * ### **Methods:**
1473
- * - **checkValidity(): _boolean_** - Functions
1474
- * --------------------------------------------------------------------------
1475
- *
1476
- * ### **Slots:**
1477
- * - **description** - Custom HTML description content.
1478
- */
1479
- "nys-checkbox": Partial<NysCheckboxProps & BaseProps & BaseEvents>;
1480
-
1481
- /**
1482
- * Container for grouping checkboxes as a single form control.
1483
- * ---
1484
- *
1485
- *
1486
- * ### **Slots:**
1487
- * - _default_ - Default slot for `nys-checkbox` elements.
1488
- * - **description** - Custom HTML description content.
1489
- */
1490
- "nys-checkboxgroup": Partial<NysCheckboxgroupProps & BaseProps & BaseEvents>;
1491
-
1492
- /**
1493
- * `<nys-combobox>` is a form-enabled combo box combining text input with a filterable dropdown.
1494
- *
1495
- * Features:
1496
- * - Type to filter options
1497
- * - Keyboard navigation (Arrow keys, Enter, Escape)
1498
- * - Mouse and keyboard interaction
1499
- * - Clears non-selected text on blur
1500
- * - Clear button when value is selected
1501
- * - Integrates with forms via ElementInternals
1502
- * - Supports native <option> and <optgroup> elements
1503
- * - Accessible per W3C ARIA Authoring Practices
1504
- * ---
1505
- *
1506
- *
1507
- * ### **Events:**
1508
- * - **nys-input** - Fired on input change. Detail: `{ id, value }`.
1509
- * - **nys-focus** - Fired when combobox receives focus.
1510
- * - **nys-blur** - Fired when combobox loses focus.
1511
- * - **nys-change** - Fired when selection changes. Detail: `{ id, value }`.
1512
- *
1513
- * ### **Slots:**
1514
- * - **description** - Optional custom description content below the label.
1515
- * - **default** - Options (<option>, <optgroup>) to populate the dropdown
1516
- */
1517
- "nys-combobox": Partial<NysComboboxProps & BaseProps & BaseEvents>;
1518
-
1519
- /**
1520
- * Date picker with calendar popup and native fallback.
1521
- * ---
1522
- *
1523
- *
1524
- * ### **Events:**
1525
- * - **nys-input** - Fired on date selection. Detail: `{id, value}`.
1526
- * - **nys-blur** - Fired when input or calendar loses focus. Triggers validation.
1527
- *
1528
- * ### **Methods:**
1529
- * - **checkValidity(): _boolean_** - Passive check of validity:
1530
- * - Returns true/false
1531
- * - Does NOT update UI or show errors
1532
- * - Used in form submission checks
1533
- */
1534
- "nys-datepicker": Partial<NysDatepickerProps & BaseProps & BaseEvents>;
1535
-
1536
- /**
1537
- * Horizontal divider for visual separation of content sections.
1538
- * ---
1539
- *
1540
- */
1541
- "nys-divider": Partial<NysDividerProps & BaseProps & BaseEvents>;
1542
-
1543
- /**
1544
- * Action menu with auto-positioning, keyboard support, and screen reader integration.
1545
- * ---
1546
- *
1547
- */
1548
- "nys-dropdownmenu": Partial<NysDropdownMenuProps & BaseProps & BaseEvents>;
1549
-
1550
- /**
1551
- * Dropdown item to display label and provide href link.
1552
- * ---
1553
- *
1554
- *
1555
- * ### **Events:**
1556
- * - **nys-click**
1557
- */
1558
- "nys-dropdownmenuitem": Partial<NysDropdownMenuItemProps & BaseProps & BaseEvents>;
1559
-
1560
- /**
1561
- * Internal error message display with icon and ARIA alert support.
1562
- * ---
1563
- *
1564
- */
1565
- "nys-errormessage": Partial<NysErrorMessageProps & BaseProps & BaseEvents>;
1566
-
1567
- /**
1568
- * File input with drag-and-drop, validation, and progress tracking.
1569
- * ---
1570
- *
1571
- *
1572
- * ### **Events:**
1573
- * - **nys-blur** - Fired when focus leaves the component. Triggers validation.
1574
- * - **nys-change** - Fired once per user action (file selection, drop, or removal). Detail: `{id, files, changedFiles}`. The `files` is the full current selection Whereas `changedFiles` is the entries this action added or removed. Both `changedFiles` and each entry in `files` are `{ file: File, progress: number, status: "pending" | "processing" | "done" | "error", errorMsg?: string }`.
1575
- *
1576
- * ### **Methods:**
1577
- * - **setFiles(incoming: _File[]_): _Promise<void>_** - Programmatically set the selection and await async validation/processing.
1578
- * Same as assigning `files`, but resolves once every file has finished its
1579
- * magic-byte validation and read — use when you need to read `checkValidity()`
1580
- * or the settled selection immediately after.
1581
- *
1582
- * ### **Slots:**
1583
- * - **description** - Custom HTML description content.
1584
- */
1585
- "nys-fileinput": Partial<NysFileinputProps & BaseProps & BaseEvents>;
1586
-
1587
- /**
1588
- * Internal file item display with status, progress bar, and remove action.
1589
- * ---
1590
- *
1591
- *
1592
- * ### **Events:**
1593
- * - **nys-fileRemove** - Fired when remove button is clicked. Detail: `{filename}`.
1594
- */
1595
- "nys-fileitem": Partial<NysFileItemProps & BaseProps & BaseEvents>;
1596
-
1597
- /**
1598
- * Agency footer with auto-layout for contact info and link sections.
1599
- * ---
1600
- *
1601
- *
1602
- * ### **Slots:**
1603
- * - _default_ - Footer content (links, contact info). Use `<h4>` for column headings.
1604
- */
1605
- "nys-globalfooter": Partial<NysGlobalFooterProps & BaseProps & BaseEvents>;
1606
-
1607
- /**
1608
- * Agency header with navigation, mobile menu, and active link highlighting.
1609
- * ---
1610
- *
1611
- *
1612
- * ### **Slots:**
1613
- * - _default_ - Navigation content (typically `<ul>` with `<li><a>` links). Auto-sanitized.
1614
- * - **user-actions** - User-account controls (e.g. profile link, settings, log-out button) shown in the header.
1615
- */
1616
- "nys-globalheader": Partial<NysGlobalHeaderProps & BaseProps & BaseEvents>;
1617
-
1618
- /**
1619
- * SVG icon with swappable library support, size, rotation, and color options.
1620
- * ---
1621
- *
1622
- *
1623
- * ### **Methods:**
1624
- * - **redraw()** - Called by the icon library registry when the current library changes.
1625
- */
1626
- "nys-icon": Partial<NysIconProps & BaseProps & BaseEvents>;
1627
-
1628
- /**
1629
- * A scannable list of icon + text items, with an optional divider between rows.
1630
- * ---
1631
- *
1632
- */
1633
- "nys-iconlist": Partial<NysIconlistProps & BaseProps & BaseEvents>;
1634
-
1635
- /**
1636
- * An icon-paired list item for use inside `<nys-iconlist>`.
1637
- * ---
1638
- *
1639
- *
1640
- * ### **Slots:**
1641
- * - _default_ - Primary label text.
1642
- * - **secondary** - Optional second line of text rendered below the primary label.
1643
- */
1644
- "nys-iconlistitem": Partial<NysIconlistitemProps & BaseProps & BaseEvents>;
1645
-
1646
- /**
1647
- * **Internal component.** Renders form labels with description, required/optional flag, and tooltip.
1648
- *
1649
- * Used internally by form components (textinput, select, checkbox, etc.). Not intended for direct use.
1650
- * Handles label association via `for`, displays asterisk for required fields, and integrates tooltips.
1651
- * ---
1652
- *
1653
- *
1654
- * ### **Events:**
1655
- * - **nys-label-click**
1656
- *
1657
- * ### **Slots:**
1658
- * - **description** - Custom HTML description content below the label.
1659
- */
1660
- "nys-label": Partial<NysLabelProps & BaseProps & BaseEvents>;
1661
-
1662
- /**
1663
- * Accessible modal dialog with focus trap, keyboard support, and action slots.
1664
- * ---
1665
- *
1666
- *
1667
- * ### **Events:**
1668
- * - **nys-open** - Fired when modal opens. Detail: `{id}`.
1669
- * - **nys-close** - Fired when modal closes. Detail: `{id}`.
1670
- *
1671
- * ### **Slots:**
1672
- * - _default_ - Default slot for body content.
1673
- * - **actions** - Action buttons displayed in footer. Buttons auto-resize on mobile.
1674
- */
1675
- "nys-modal": Partial<NysModalProps & BaseProps & BaseEvents>;
1676
-
1677
- /**
1678
- * Page navigation with numbered links, prev/next buttons, and responsive layout.
1679
- * ---
1680
- *
1681
- *
1682
- * ### **Events:**
1683
- * - **nys-change** - Fired when page changes. Detail: `{page}`.
1684
- */
1685
- "nys-pagination": Partial<NysPaginationProps & BaseProps & BaseEvents>;
1686
-
1687
- /**
1688
- * An ordered list of numbered process steps.
1689
- * ---
1690
- *
1691
- */
1692
- "nys-processlist": Partial<NysProcesslistProps & BaseProps & BaseEvents>;
1693
-
1694
- /**
1695
- * A numbered step for use inside `<nys-processlist>`.
1696
- * ---
1697
- *
1698
- *
1699
- * ### **Slots:**
1700
- * - **description** - Custom HTML description content below the label. Overrides the `description` property.
1701
- */
1702
- "nys-processlistitem": Partial<NysProcesslistitemProps & BaseProps & BaseEvents>;
1703
-
1704
- /**
1705
- * Radio button for single selection from mutually exclusive options.
1706
- * This is a READONLY data component when there is no `nys-radiogroup` wrapping the `nys-radiobutton`.
1707
- * Otherwise this radiobutton mockup the native grouping of radio buttons via "name" attribute.
1708
- * Since we can't do that naturally, we have supporting functions to keep track of keyboard navigation, a11y VO, and single radiobutton checked at all times.
1709
- * ---
1710
- *
1711
- *
1712
- * ### **Events:**
1713
- * - **nys-change** - Fired when selection changes. Detail: `{id, checked, name, value}`.
1714
- * - **nys-focus** - Fired when radio gains focus.
1715
- * - **nys-blur** - Fired when radio loses focus.
1716
- * - **nys-other-input** - Fired when "other" text input value changes. Detail: `{id, name, value}`.
1717
- *
1718
- * ### **Slots:**
1719
- * - **description** - Custom HTML description content.
1720
- */
1721
- "nys-radiobutton": Partial<NysRadiobuttonProps & BaseProps & BaseEvents>;
1722
-
1723
- /**
1724
- * Container for grouping radio buttons as a single form control.
1725
- * ---
1726
- *
1727
- *
1728
- * ### **Events:**
1729
- * - **nys-change**
1730
- * - **nys-other-input**
1731
- *
1732
- * ### **Slots:**
1733
- * - _default_ - Default slot for `nys-radiobutton` elements.
1734
- * - **description** - Custom HTML description content.
1735
- */
1736
- "nys-radiogroup": Partial<NysRadiogroupProps & BaseProps & BaseEvents>;
1737
-
1738
- /**
1739
- * Option item for nys-select dropdown.
1740
- * ---
1741
- *
1742
- *
1743
- * ### **Slots:**
1744
- * - _default_ - Option label text. Auto-populates the `label` prop if provided.
1745
- */
1746
- "nys-option": Partial<NysOptionProps & BaseProps & BaseEvents>;
1747
-
1748
- /**
1749
- * Dropdown select for choosing one option from a list.
1750
- * ---
1751
- *
1752
- *
1753
- * ### **Events:**
1754
- * - **nys-change** - Fired when selection changes. Detail: `{id, value}`.
1755
- * - **nys-focus** - Fired when select gains focus.
1756
- * - **nys-blur** - Fired when select loses focus. Triggers validation.
1757
- *
1758
- * ### **Methods:**
1759
- * - **checkValidity(): _boolean_** - Functions
1760
- * --------------------------------------------------------------------------
1761
- *
1762
- * ### **Slots:**
1763
- * - _default_ - Default slot for `<option>` and `<optgroup>` elements.
1764
- * - **description** - Custom HTML description content below the label.
1765
- */
1766
- "nys-select": Partial<NysSelectProps & BaseProps & BaseEvents>;
1767
-
1768
- /**
1769
- * Skip navigation link for keyboard accessibility. Hidden until focused.
1770
- * ---
1771
- *
1772
- */
1773
- "nys-skipnav": Partial<NysSkipnavProps & BaseProps & BaseEvents>;
1774
-
1775
- /**
1776
- * Individual step for use within nys-stepper with navigation support.
1777
- * ---
1778
- *
1779
- *
1780
- * ### **Events:**
1781
- * - **nys-step-click** - Fired when a navigable (`previous` or `current`) non-selected step is clicked or activated by keyboard. Detail: `{ href: string, label: string }`. Cancelable — call `e.preventDefault()` to suppress `window.location.href` navigation.
1782
- */
1783
- "nys-step": Partial<NysStepProps & BaseProps & BaseEvents>;
1784
-
1785
- /**
1786
- * Multi-step progress indicator with navigation and mobile-friendly compact view.
1787
- * ---
1788
- *
1789
- *
1790
- * ### **Slots:**
1791
- * - _default_ - Default slot for `nys-step` elements. Only `nys-step` children are accepted; others are removed.
1792
- * - **actions** - Persistent navigation buttons. Must contain exactly one `<div>` wrapping only `<nys-button>` elements.
1793
- */
1794
- "nys-stepper": Partial<NysStepperProps & BaseProps & BaseEvents>;
1795
-
1796
- /**
1797
- * `<nys-tab>` is a single tab within a `<nys-tabgroup>`.
1798
- *
1799
- * The host element carries `role="tab"`, `tabindex`, `aria-selected`,
1800
- * `aria-controls`, and `aria-disabled` so assistive technologies see the
1801
- * correct ARIA tab semantics on the element that is actually focused.
1802
- * `<nys-tabgroup>` manages `tabindex`, `aria-selected`, and `aria-controls`
1803
- * via `_applySelection`; do not set them directly on this element.
1804
- * ---
1805
- *
1806
- *
1807
- * ### **Events:**
1808
- * - **nys-tab-select** - Dispatched when the tab is activated via click or Enter / Space. Bubbles and crosses shadow DOM boundaries. `detail: { id: string, label: string }`
1809
- * - **nys-tab-focus** - Dispatched when the host receives focus. Bubbles and crosses shadow DOM boundaries. `detail: { id: string }`
1810
- * - **nys-tab-blur** - Dispatched when the host loses focus. Bubbles and crosses shadow DOM boundaries. `detail: { id: string }`
1811
- *
1812
- * ### **Methods:**
1813
- * - **focus(options: _FocusOptions_): _void_** - Focuses the host element. The host carries `role="tab"` and `tabindex`,
1814
- * so it is the correct element for AT to land on.
1815
- *
1816
- * ### **Slots:**
1817
- * - _default_ - No slots; content is derived from the `label` property.
1818
- */
1819
- "nys-tab": Partial<NysTabProps & BaseProps & BaseEvents>;
1820
-
1821
- /**
1822
- * `<nys-tabgroup>` is the container for `<nys-tab>` and `<nys-tabpanel>`
1823
- * elements.
1824
- *
1825
- * Accepts tabs and panels as flat light-DOM children in any order (interleaved
1826
- * or grouped). On slot change, each child is assigned `slot="tab"` or
1827
- * `slot="panel"` so it is projected into the correct shadow-DOM container
1828
- * while remaining in the light DOM, ARIA relationships are wired, and the
1829
- * first selected (or first) tab is activated.
1830
- *
1831
- * Scroll shadows are rendered on either side of the tab list and toggled via
1832
- * `ResizeObserver` and a `scroll` listener so they accurately reflect whether
1833
- * overflow content exists in each direction.
1834
- *
1835
- * Keyboard navigation follows the
1836
- * https://www.w3.org/WAI/ARIA/apg/patterns/tabs/ ARIA Tabs Pattern:
1837
- * - Arrow keys move focus without changing selection.
1838
- * - Enter / Space confirm selection on the focused tab.
1839
- * ---
1840
- *
1841
- *
1842
- * ### **Slots:**
1843
- * - _default_ - Accepts `<nys-tab>` and `<nys-tabpanel>` children. On `slotchange` they are assigned `slot="tab"` / `slot="panel"` and projected into the tablist and panel containers; they stay in the light DOM. Any other children remain in the default slot, rendered below the panels.
1844
- */
1845
- "nys-tabgroup": Partial<NysTabgroupProps & BaseProps & BaseEvents>;
1846
-
1847
- /**
1848
- * `<nys-tabpanel>` is a content panel paired with a `<nys-tab>` inside a
1849
- * `<nys-tabgroup>`.
1850
- *
1851
- * Pairing is determined by render order: the Nth `<nys-tabpanel>` child of a
1852
- * `<nys-tabgroup>` corresponds to the Nth `<nys-tab>` child (or by explicit
1853
- * `aria-labelledby`). `aria-labelledby` and the `hidden` attribute are managed
1854
- * externally by `<nys-tabgroup>` via `_applySelection`; do not set them
1855
- * directly.
1856
- *
1857
- * The panel container is styled from the light DOM (`nys-tabpanel.light.scss`,
1858
- * adopted on the document) rather than a shadow-DOM wrapper. This keeps the
1859
- * slotted panel content in the light DOM — reachable by consumer CSS and
1860
- * JavaScript — and lets consumers override the panel's own styling (e.g.
1861
- * `nys-tabpanel { padding: 0 }`), which a shadow wrapper would prevent.
1862
- * ---
1863
- *
1864
- *
1865
- * ### **Slots:**
1866
- * - _default_ - Default slot for panel content. Rendered directly under the host, which is the scrollable, focusable (`tabindex="0"`) `role="tabpanel"` region.
1867
- */
1868
- "nys-tabpanel": Partial<NysTabpanelProps & BaseProps & BaseEvents>;
1869
-
1870
- /**
1871
- * `<nys-table>` is a responsive table component that can display native HTML tables,
1872
- * supports striped and bordered styling, sortable columns, and CSV download.
1873
- * ---
1874
- *
1875
- *
1876
- * ### **Events:**
1877
- * - **nys-click** - Fired when the download button or sortable headers are clicked.
1878
- * - **nys-column-sort** - Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior. Detail: { columnIndex: number, columnLabel: string, sortDirection: "asc" | "desc" | "none" }
1879
- *
1880
- * ### **Slots:**
1881
- * - _default_ - Accepts a `<table>` element. Only the first table is used. The table is enhanced in place and stays in the light DOM (projected through a slot, never cloned), so embedded components remain interactive and reachable by consumer CSS/JS. Its cell styling is applied from `nys-table.light.scss`, adopted once onto `document.adoptedStyleSheets`.
1882
- */
1883
- "nys-table": Partial<NysTableProps & BaseProps & BaseEvents>;
1884
-
1885
- /**
1886
- * Multi-line text input for comments, descriptions, and feedback.
1887
- * ---
1888
- *
1889
- *
1890
- * ### **Events:**
1891
- * - **nys-input** - Fired on input change. Detail: `{id, value}`.
1892
- * - **nys-focus** - Fired when textarea gains focus.
1893
- * - **nys-blur** - Fired when textarea loses focus. Triggers validation.
1894
- * - **nys-select** - Fired when user selects text. Detail: `{id, value}`.
1895
- * - **nys-selectionchange**
1896
- *
1897
- * ### **Methods:**
1898
- * - **checkValidity(): _boolean_** - Functions
1899
- * --------------------------------------------------------------------------
1900
- *
1901
- * ### **Slots:**
1902
- * - **description** - Custom HTML description content below the label.
1903
- */
1904
- "nys-textarea": Partial<NysTextareaProps & BaseProps & BaseEvents>;
1905
-
1906
- /**
1907
- * Text input for short single-line data with validation and masking support.
1908
- * ---
1909
- *
1910
- *
1911
- * ### **Events:**
1912
- * - **nys-input** - Fired on input change. Detail: `{id, value}`.
1913
- * - **nys-focus** - Fired when input gains focus.
1914
- * - **nys-blur** - Fired when input loses focus. Triggers validation.
1915
- *
1916
- * ### **Methods:**
1917
- * - **checkValidity(): _boolean_** - Functions
1918
- * --------------------------------------------------------------------------
1919
- *
1920
- * ### **Slots:**
1921
- * - **description** - Custom HTML description content below the label.
1922
- * - **startButton** - Button at input start. Use single `nys-button` only.
1923
- * - **endButton** - Button at input end. Use single `nys-button` only.
1924
- */
1925
- "nys-textinput": Partial<NysTextinputProps & BaseProps & BaseEvents>;
1926
-
1927
- /**
1928
- * Toggle switch for binary settings with immediate effect.
1929
- * ---
1930
- *
1931
- *
1932
- * ### **Events:**
1933
- * - **nys-change** - Fired when toggle state changes. Detail: `{id, checked}`.
1934
- * - **nys-focus** - Fired when toggle gains focus.
1935
- * - **nys-blur** - Fired when toggle loses focus.
1936
- *
1937
- * ### **Slots:**
1938
- * - **description** - Custom HTML description content.
1939
- */
1940
- "nys-toggle": Partial<NysToggleProps & BaseProps & BaseEvents>;
1941
-
1942
- /**
1943
- * Contextual tooltip with auto-positioning, keyboard support, and screen reader integration.
1944
- * ---
1945
- *
1946
- */
1947
- "nys-tooltip": Partial<NysTooltipProps & BaseProps & BaseEvents>;
1948
-
1949
- /**
1950
- * Universal NYS footer with logo and statewide links. Required site-wide.
1951
- * ---
1952
- *
1953
- */
1954
- "nys-unavfooter": Partial<NysUnavFooterProps & BaseProps & BaseEvents>;
1955
-
1956
- /**
1957
- * Universal NYS header with trust bar, search, and translation. Required site-wide.
1958
- * ---
1959
- *
1960
- *
1961
- * ### **Events:**
1962
- * - **nys-language-select** - Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Localize integration.
1963
- * - **nys-search-submit** - Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect.
1964
- */
1965
- "nys-unavheader": Partial<NysUnavHeaderProps & BaseProps & BaseEvents>;
1966
-
1967
- /**
1968
- * Responsive navigation that becomes an accordion on smaller screens.
1969
- * ---
1970
- *
1971
- *
1972
- * ### **Methods:**
1973
- * - **open()** - Public API for controlling the mobile accordion from outside the component
1974
- * --------------------------------------------------------------------------
1975
- */
1976
- "nys-verticalnav": Partial<NysVerticalnavProps & BaseProps & BaseEvents>;
1977
-
1978
- /**
1979
- * Collapsible link group for use within `<nys-verticalnav>`.
1980
- * ---
1981
- *
1982
- *
1983
- * ### **Events:**
1984
- * - **nys-child-resize**
1985
- * - **nys-verticalnavgroup-toggle**
1986
- */
1987
- "nys-verticalnavgroup": Partial<NysVerticalnavGroupProps & BaseProps & BaseEvents>;
1988
-
1989
- /**
1990
- * YouTube video player with thumbnail preview and accessibility announcements.
1991
- * ---
1992
- *
1993
- *
1994
- * ### **Events:**
1995
- * - **nys-video-play** - Fired when the user clicks the thumbnail to load the player.
1996
- */
1997
- "nys-video": Partial<NysVideoProps & BaseProps & BaseEvents>;
1998
- };