@nysds/components 1.12.0 → 1.13.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.
- package/README.md +3 -1
- package/dist/.vscode/vscode.html-custom-data.json +71 -30
- package/dist/custom-elements.json +1524 -300
- package/dist/nysds.es.js +3237 -1540
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +262 -158
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +20 -3
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +20 -0
- package/dist/packages/nys-alert/src/nys-alert.d.ts +39 -1
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +25 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +19 -0
- package/dist/packages/nys-badge/src/nys-badge.d.ts +20 -0
- package/dist/packages/nys-button/src/nys-button.d.ts +24 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +33 -1
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +29 -0
- package/dist/packages/nys-datepicker/src/index.d.ts +1 -0
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +116 -0
- package/dist/packages/nys-datepicker/src/nys-datepicker.figma.d.ts +1 -0
- package/dist/packages/nys-divider/src/nys-divider.d.ts +4 -0
- package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +9 -0
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +33 -0
- package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +4 -0
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +20 -0
- package/dist/packages/nys-globalheader/src/nys-global.logo.d.ts +2 -0
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +26 -5
- package/dist/packages/nys-icon/src/nys-icon.d.ts +11 -0
- package/dist/packages/nys-label/src/nys-label.d.ts +5 -0
- package/dist/packages/nys-modal/src/nys-modal.d.ts +24 -0
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +21 -0
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +27 -0
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +30 -1
- package/dist/packages/nys-select/src/nys-select.d.ts +34 -1
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +13 -0
- package/dist/packages/nys-table/src/index.d.ts +1 -0
- package/dist/packages/nys-table/src/nys-table.d.ts +38 -0
- package/dist/packages/nys-table/src/nys-table.figma.d.ts +1 -0
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +29 -1
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +30 -1
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +23 -0
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +28 -0
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +12 -0
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +20 -2
- package/dist/src/index.d.ts +2 -0
- package/package.json +12 -9
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# New York State Design System
|
|
2
2
|
|
|
3
|
+
 
|
|
4
|
+
|
|
3
5
|
This repository contains a library of reusable code components for building New York State applications and websites. These components are built using LitElement and styled with custom CSS properties (variables) for easy customization.
|
|
4
6
|
|
|
5
7
|
## About the New York State Design System
|
|
@@ -30,4 +32,4 @@ npm install @nysds/components @nysds/styles
|
|
|
30
32
|
```html
|
|
31
33
|
<script type="module" src="[path-to-dir]/nysds.js"></script>
|
|
32
34
|
<link rel="stylesheet" href="[path-to-dir]/nysds-full.min.css" />
|
|
33
|
-
```
|
|
35
|
+
```
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tags": [
|
|
5
5
|
{
|
|
6
6
|
"name": "nys-accordion",
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "`<nys-accordion>` groups one or more `<nys-accordionitem>` elements.\n\nFeatures:\n- Optionally enforces single-expanded-item behavior via `singleSelect`.\n- Propagates shared visual `bordered` property to child items.\n- Generates a stable unique identifier if none is provided.\n---\n\n\n### **Events:**\n - **nys-accordionitem-toggle** - Fired when a child `<nys-accordionitem>` is toggled. Event detail includes `{ id: string, heading: string, expanded: boolean }`.\n\n### **Slots:**\n - **default** - Place one or more `<nys-accordionitem>` components here.",
|
|
8
8
|
"attributes": [
|
|
9
9
|
{ "name": "id", "values": [] },
|
|
10
10
|
{ "name": "singleSelect", "values": [] },
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "nys-accordionitem",
|
|
17
|
-
"description": "
|
|
17
|
+
"description": "`<nys-accordionitem>` represents a single collapsible item inside a `<nys-accordion>`.\n---\n\n\n### **Events:**\n - **nys-accordionitem-toggle** - Fired when the item is expanded or collapsed.\n\n### **Slots:**\n - _default_ - Default slot for the content inside the accordion panel.",
|
|
18
18
|
"attributes": [
|
|
19
19
|
{ "name": "id", "values": [] },
|
|
20
20
|
{ "name": "heading", "values": [] },
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "nys-alert",
|
|
28
|
-
"description": "
|
|
28
|
+
"description": "`<nys-alert>` renders an informational, success, warning, or error alert.\n---\n\n\n### **Events:**\n - **nys-close** - Fired when alert is dismissed (manual or timeout).\n\n### **Slots:**\n - _default_ - Default slot for additional alert content.",
|
|
29
29
|
"attributes": [
|
|
30
30
|
{ "name": "id", "values": [] },
|
|
31
31
|
{ "name": "heading", "values": [] },
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"name": "nys-avatar",
|
|
57
|
-
"description": "
|
|
57
|
+
"description": "`<nys-avatar>` displays a user avatar as an image, initials, or icon.\n---\n\n\n### **Slots:**\n - _default_ - Default slot for custom icon content. Fallback icon is used if slot is empty. Features: - Computes foreground color for sufficient contrast based on background. - Supports interactive avatars with button role. - Fallback to icon when image or initials are missing. - Lazy loading for performance optimization.",
|
|
58
58
|
"attributes": [
|
|
59
59
|
{ "name": "id", "values": [] },
|
|
60
60
|
{ "name": "ariaLabel", "values": [] },
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
"name": "nys-backtotop",
|
|
73
|
-
"description": "\n---\n",
|
|
73
|
+
"description": "`<nys-backtotop>` renders a button that scrolls the page to the top.\n\nFeatures:\n- Automatically appears after scrolling past 1.5 viewport heights\n if the page is at least 4 screens tall.\n- Adapts to mobile screens (renders as a circle button when narrow).\n- Can be explicitly shown with the `visible` attribute.\n---\n\n\n### **Events:**\n - **nys-click** - Fired when the button is clicked (scrolls page to top).",
|
|
74
74
|
"attributes": [
|
|
75
75
|
{ "name": "position", "values": [] },
|
|
76
76
|
{ "name": "visible", "values": [] }
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"name": "nys-badge",
|
|
82
|
-
"description": "\n---\n",
|
|
82
|
+
"description": "`<nys-badge>` displays a badge with optional prefix/suffix icons and labels.\n\nFeatures:\n- Conveys an intent (`neutral`, `error`, `success`, `warning`) which affects default icons and styling.\n- Supports custom prefix and suffix icons.\n---\n",
|
|
83
83
|
"attributes": [
|
|
84
84
|
{ "name": "id", "values": [] },
|
|
85
85
|
{ "name": "name", "values": [] },
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"name": "nys-button",
|
|
106
|
-
"description": "\n---\n\n\n### **Events:**\n - **nys-focus
|
|
106
|
+
"description": "`<nys-button>` is a versatile button component supporting:\n- Multiple variants (`filled`, `outline`, `ghost`, `text`)\n- Sizes (`sm`, `md`, `lg`) and full-width layout\n- Icons (prefix, suffix, or circle) and optional labels\n- Native `<button>` or link `<a>` behavior with form association\n- Keyboard and accessibility support (`aria-label`, `aria-controls`, `aria-description`)\n---\n\n\n### **Events:**\n - **nys-focus** - Fired when button receives focus\n- **nys-blur** - Fired when button loses focus\n- **nys-click** - Fired on button click",
|
|
107
107
|
"attributes": [
|
|
108
108
|
{ "name": "id", "values": [] },
|
|
109
109
|
{ "name": "name", "values": [] },
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
"name": "nys-checkbox",
|
|
163
|
-
"description": "\n---\n\n\n### **Events:**\n - **nys-change
|
|
163
|
+
"description": "`<nys-checkbox>` is an accessible, form-associated checkbox component.\nCan be used standalone or within a `<nys-checkboxgroup>`.\n\nFeatures:\n- Supports labels, descriptions, and tooltips\n- Displays error messages with `showError` and `errorMessage`\n- Keyboard interaction with spacebar toggle\n- Form integration via ElementInternals (`checked` value submitted)\n---\n\n\n### **Events:**\n - **nys-change** - Fired when checkbox value changes\n- **nys-focus** - Fired on focus\n- **nys-blur** - Fired on blur\n\n### **Methods:**\n - **checkValidity(): _boolean_** - Functions\n--------------------------------------------------------------------------\n\n### **Slots:**\n - **description** - Slot to provide a custom description element",
|
|
164
164
|
"attributes": [
|
|
165
165
|
{ "name": "checked", "values": [] },
|
|
166
166
|
{ "name": "disabled", "values": [] },
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
"name": "nys-checkboxgroup",
|
|
186
|
-
"description": "\n---\n",
|
|
186
|
+
"description": "`<nys-checkboxgroup>` is a form-associated container for multiple `<nys-checkbox>` components.\nHandles grouping, validation, required constraints, form submission, and accessibility.\n\nFeatures:\n- Manages multiple checkboxes as a single form field\n- Supports required/optional flags and error messages\n- Propagates size, tile, and inverted styling to child checkboxes\n- Keyboard and screen reader accessible via fieldset/legend\n---\n\n\n### **Events:**\n - **nys-change** - Fired when any child checkbox changes\n- **nys-focus** - Fired when any child checkbox gains focus\n- **nys-blur** - Fired when any child checkbox loses focus\n\n### **Slots:**\n - **default** - Slot for child `<nys-checkbox>` elements\n- **description** - Slot for custom description content",
|
|
187
187
|
"attributes": [
|
|
188
188
|
{ "name": "id", "values": [] },
|
|
189
189
|
{ "name": "name", "values": [] },
|
|
@@ -201,15 +201,43 @@
|
|
|
201
201
|
],
|
|
202
202
|
"references": []
|
|
203
203
|
},
|
|
204
|
+
{
|
|
205
|
+
"name": "nys-datepicker",
|
|
206
|
+
"description": "`<nys-datepicker>` is a form-associated, accessible date picker component.\nOptionally wraps a `<wc-datepicker>` for custom calendar UI.\n\nEvents:\n---\n\n\n### **Events:**\n - **nys-blur** - Dispatched when input or calendar loses focus\n- **nys-input** - Dispatched when user selects or types a valid date Notes: - Uses native date input on Safari or mobile devices (custom calendar removed for these scenarios)\n\n### **Methods:**\n - **checkValidity(): _boolean_** - Passive check of validity:\n- Returns true/false\n- Does NOT update UI or show errors\n- Used in form submission checks",
|
|
207
|
+
"attributes": [
|
|
208
|
+
{ "name": "id", "values": [] },
|
|
209
|
+
{ "name": "name", "values": [] },
|
|
210
|
+
{
|
|
211
|
+
"name": "width",
|
|
212
|
+
"values": [{ "name": "md" }, { "name": "lg" }, { "name": "full" }]
|
|
213
|
+
},
|
|
214
|
+
{ "name": "hideTodayButton", "values": [] },
|
|
215
|
+
{ "name": "hideClearButton", "values": [] },
|
|
216
|
+
{ "name": "disabled", "values": [] },
|
|
217
|
+
{ "name": "required", "values": [] },
|
|
218
|
+
{ "name": "optional", "values": [] },
|
|
219
|
+
{ "name": "showError", "values": [] },
|
|
220
|
+
{ "name": "errorMessage", "values": [] },
|
|
221
|
+
{ "name": "form", "values": [] },
|
|
222
|
+
{ "name": "tooltip", "values": [] },
|
|
223
|
+
{ "name": "type", "values": [] },
|
|
224
|
+
{ "name": "label", "values": [] },
|
|
225
|
+
{ "name": "description", "values": [] },
|
|
226
|
+
{ "name": "startDate", "values": [] },
|
|
227
|
+
{ "name": "inverted", "values": [] },
|
|
228
|
+
{ "name": "value", "values": [{ "name": "Date" }] }
|
|
229
|
+
],
|
|
230
|
+
"references": []
|
|
231
|
+
},
|
|
204
232
|
{
|
|
205
233
|
"name": "nys-divider",
|
|
206
|
-
"description": "
|
|
234
|
+
"description": "`<nys-divider>` renders a horizontal rule `<hr>` element with optional styling.\nCan be inverted for dark backgrounds.\n---\n",
|
|
207
235
|
"attributes": [{ "name": "inverted", "values": [] }],
|
|
208
236
|
"references": []
|
|
209
237
|
},
|
|
210
238
|
{
|
|
211
239
|
"name": "nys-errormessage",
|
|
212
|
-
"description": "
|
|
240
|
+
"description": "THIS IS A PRIVATE COMPONENT!\n`<nys-errormessage>` displays an error message for form elements.\nCan optionally show a divider and supports native form validation messages.\n---\n",
|
|
213
241
|
"attributes": [
|
|
214
242
|
{ "name": "showError", "values": [] },
|
|
215
243
|
{ "name": "errorMessage", "values": [] },
|
|
@@ -219,7 +247,7 @@
|
|
|
219
247
|
},
|
|
220
248
|
{
|
|
221
249
|
"name": "nys-fileinput",
|
|
222
|
-
"description": "\n---\n\n\n### **Events:**\n - **nys-change**",
|
|
250
|
+
"description": "`<nys-fileinput>` provides accessible file selection with optional\ndrag-and-drop support, progress tracking, validation, and form submission.\n\nFeatures:\n- Supports single or multiple file uploads\n- Optional drag-and-drop dropzone\n- File type validation and upload progress\n- Form-associated with native validation behavior\n- Keyboard and screen reader accessible\n---\n\n\n### **Events:**\n - **nys-change** - Fired when files are added or removed\n\n### **Slots:**\n - **description** - Custom description content under the label",
|
|
223
251
|
"attributes": [
|
|
224
252
|
{ "name": "id", "values": [] },
|
|
225
253
|
{ "name": "name", "values": [] },
|
|
@@ -242,7 +270,7 @@
|
|
|
242
270
|
},
|
|
243
271
|
{
|
|
244
272
|
"name": "nys-fileitem",
|
|
245
|
-
"description": "
|
|
273
|
+
"description": "`<nys-fileitem>` displays an individual file in a file input component.\nIt shows the file name, upload status, progress bar, and error messages.\n---\n\n\n### **Events:**\n - **nys-fileRemove**",
|
|
246
274
|
"attributes": [
|
|
247
275
|
{ "name": "filename", "values": [] },
|
|
248
276
|
{
|
|
@@ -262,7 +290,7 @@
|
|
|
262
290
|
},
|
|
263
291
|
{
|
|
264
292
|
"name": "nys-globalfooter",
|
|
265
|
-
"description": "\n---\n",
|
|
293
|
+
"description": "`<nys-globalfooter>` renders a New York State–style global footer.\n\nDisplays an agency name with an optional homepage link and supports\nstructured footer content via slots.\n---\n\n\n### **Slots:**\n - **default** - Footer content such as headings, links, or groups Layout behavior: - Multiple `<h4>` elements trigger a multi-column layout - Single group content renders in a compact layout",
|
|
266
294
|
"attributes": [
|
|
267
295
|
{ "name": "agencyName", "values": [] },
|
|
268
296
|
{ "name": "homepageLink", "values": [] }
|
|
@@ -271,7 +299,7 @@
|
|
|
271
299
|
},
|
|
272
300
|
{
|
|
273
301
|
"name": "nys-globalheader",
|
|
274
|
-
"description": "\n---\n",
|
|
302
|
+
"description": "`<nys-globalheader>` renders a New York State–style global header.\n\nDisplays an optional application name, agency name, and homepage link.\nSupports slotted navigation content with automatic active-link detection\nand a responsive mobile menu.\n---\n\n\n### **Slots:**\n - **default** - Primary navigation list, typically a `<ul>` with links\n- **user-actions** - Optional user action elements such as login or profile Behavior: - Automatically highlights the best matching link based on the current URL - Duplicates navigation content for desktop and mobile layouts - Provides a toggleable mobile menu when navigation content exists",
|
|
275
303
|
"attributes": [
|
|
276
304
|
{ "name": "appName", "values": [] },
|
|
277
305
|
{ "name": "agencyName", "values": [] },
|
|
@@ -281,7 +309,7 @@
|
|
|
281
309
|
},
|
|
282
310
|
{
|
|
283
311
|
"name": "nys-icon",
|
|
284
|
-
"description": "\n---\n",
|
|
312
|
+
"description": "`<nys-icon>` renders an SVG icon from the internal icon library.\n\nIcons are inline SVGs and support sizing, rotation, flipping, color,\nand accessibility labeling.\n---\n",
|
|
285
313
|
"attributes": [
|
|
286
314
|
{ "name": "name", "values": [] },
|
|
287
315
|
{ "name": "ariaLabel", "values": [] },
|
|
@@ -317,7 +345,7 @@
|
|
|
317
345
|
},
|
|
318
346
|
{
|
|
319
347
|
"name": "nys-label",
|
|
320
|
-
"description": "\n---\n",
|
|
348
|
+
"description": "THIS IS A PRIVATE COMPONENT!\n`NysLabel` is a component for rendering form labels with optional\ndescriptions, flags (required/optional), and tooltips.\n---\n",
|
|
321
349
|
"attributes": [
|
|
322
350
|
{ "name": "for", "values": [] },
|
|
323
351
|
{ "name": "label", "values": [] },
|
|
@@ -330,7 +358,7 @@
|
|
|
330
358
|
},
|
|
331
359
|
{
|
|
332
360
|
"name": "nys-modal",
|
|
333
|
-
"description": "\n---\n\n\n### **Events:**\n - **nys-open
|
|
361
|
+
"description": "`<nys-modal>` renders an accessible modal dialog.\n\nSupports headings, optional subheading, body content, and action buttons.\nManages focus trapping, escape key handling, and body scroll locking.\n---\n\n\n### **Events:**\n - **nys-open** - Emitted when the modal opens\n- **nys-close** - Emitted when the modal closes\n\n### **Slots:**\n - _default_ - Modal body content\n- **actions** - Action buttons shown in the footer",
|
|
334
362
|
"attributes": [
|
|
335
363
|
{ "name": "id", "values": [] },
|
|
336
364
|
{ "name": "heading", "values": [] },
|
|
@@ -346,7 +374,7 @@
|
|
|
346
374
|
},
|
|
347
375
|
{
|
|
348
376
|
"name": "nys-pagination",
|
|
349
|
-
"description": "\n---\n\n\n### **Events:**\n - **nys-change**",
|
|
377
|
+
"description": "`<nys-pagination>` renders page navigation controls.\n\nDisplays previous and next buttons, page numbers, and ellipses\nwhen pages are skipped. Handles page bounds automatically.\n---\n\n\n### **Events:**\n - **nys-change** - Fired when the page changes detail: { page: number }",
|
|
350
378
|
"attributes": [
|
|
351
379
|
{ "name": "id", "values": [] },
|
|
352
380
|
{ "name": "name", "values": [] },
|
|
@@ -358,7 +386,7 @@
|
|
|
358
386
|
},
|
|
359
387
|
{
|
|
360
388
|
"name": "nys-radiobutton",
|
|
361
|
-
"description": "\n---\n\n\n### **Events:**\n - **nys-change
|
|
389
|
+
"description": "`<nys-radiobutton>` represents a single radio button for use in a `<nys-radiogroup>`.\n\nFeatures:\n- Single selection per group\n- Supports labels, descriptions, tile layout, inverted style, and size variants\n- Integrates with forms and dispatches `nys-change` events on selection\n---\n\n\n### **Events:**\n - **nys-change** - Fired when the radio is selected or deselected detail: { id: string, checked: boolean, name: string, value: string }\n- **nys-focus** - Fired when the radio gains focus\n- **nys-blur** - Fired when the radio loses focus\n\n### **Methods:**\n - **checkValidity(): _boolean_** - Functions\n--------------------------------------------------------------------------\n\n### **Slots:**\n - **description** - Optional description text announced to screen readers",
|
|
362
390
|
"attributes": [
|
|
363
391
|
{ "name": "checked", "values": [] },
|
|
364
392
|
{ "name": "disabled", "values": [] },
|
|
@@ -377,7 +405,7 @@
|
|
|
377
405
|
},
|
|
378
406
|
{
|
|
379
407
|
"name": "nys-radiogroup",
|
|
380
|
-
"description": "\n---\n",
|
|
408
|
+
"description": "`<nys-radiogroup>` groups `<nys-radiobutton>` elements into a single\nselectable control.\n\nSupports keyboard navigation, validation, and native form submission\nthrough ElementInternals.\n---\n\n\n### **Events:**\n - **nys-change** - Fired when selection changes detail: { name: string; value: string }\n\n### **Slots:**\n - **default** - One or more `<nys-radiobutton>` elements\n- **description** - Optional descriptive text announced to screen readers",
|
|
381
409
|
"attributes": [
|
|
382
410
|
{ "name": "id", "values": [] },
|
|
383
411
|
{ "name": "name", "values": [] },
|
|
@@ -409,7 +437,7 @@
|
|
|
409
437
|
},
|
|
410
438
|
{
|
|
411
439
|
"name": "nys-select",
|
|
412
|
-
"description": "\n---\n\n\n### **Events:**\n - **nys-change
|
|
440
|
+
"description": "`<nys-select>` is a custom select/dropdown component.\n\nFeatures:\n- Supports slotted `<nys-option>` elements, native `<option>` and `<optgroup>`\n- Integrates with forms via ElementInternals\n- Handles validation, error messages, and required/optional states\n- Inverted style and width variants supported\n---\n\n\n### **Events:**\n - **nys-change** - Fired when the selected value changes detail: { id: string, value: string }\n- **nys-focus** - Fired when the select gains focus\n- **nys-blur** - Fired when the select loses focus\n\n### **Methods:**\n - **checkValidity(): _boolean_** - Functions\n--------------------------------------------------------------------------\n\n### **Slots:**\n - **description** - Optional description text announced to screen readers\n- **default** - Options (<nys-option>, <option>, <optgroup>) to populate the dropdown",
|
|
413
441
|
"attributes": [
|
|
414
442
|
{ "name": "id", "values": [] },
|
|
415
443
|
{ "name": "name", "values": [] },
|
|
@@ -439,7 +467,7 @@
|
|
|
439
467
|
},
|
|
440
468
|
{
|
|
441
469
|
"name": "nys-skipnav",
|
|
442
|
-
"description": "\n---\n",
|
|
470
|
+
"description": "`<nys-skipnav>` provides an accessible skip navigation link for keyboard\nand screen reader users to jump directly to the main content of a page.\n\nFeatures:\n- Default target is `#main-content` if `href` is not provided\n- Link becomes visible on focus and hides on blur\n- Ensures the target element is focusable for accessibility\n---\n",
|
|
443
471
|
"attributes": [
|
|
444
472
|
{ "name": "id", "values": [] },
|
|
445
473
|
{ "name": "href", "values": [] }
|
|
@@ -461,7 +489,7 @@
|
|
|
461
489
|
},
|
|
462
490
|
{
|
|
463
491
|
"name": "nys-stepper",
|
|
464
|
-
"description": "\n---\n",
|
|
492
|
+
"description": "`<nys-stepper>` manages a sequence of `<nys-step>` elements, providing\nmulti-step navigation for forms or workflows.\n\nFeatures:\n- Tracks selected and current steps\n- Displays a step counter (e.g., \"Step 2 of 5\")\n- Supports compact/expanded view toggle\n- Validates that only `<nys-step>` or `<div slot=\"actions\">` children are used\n---\n\n\n### **Events:**\n - **nys-step-click** - Fired when a step is clicked; bubbles with the event path",
|
|
465
493
|
"attributes": [
|
|
466
494
|
{ "name": "id", "values": [] },
|
|
467
495
|
{ "name": "name", "values": [] },
|
|
@@ -471,9 +499,22 @@
|
|
|
471
499
|
],
|
|
472
500
|
"references": []
|
|
473
501
|
},
|
|
502
|
+
{
|
|
503
|
+
"name": "nys-table",
|
|
504
|
+
"description": "`<nys-table>` is a responsive table component that can display native HTML tables,\nsupports striped and bordered styling, sortable columns, and CSV download.\n---\n\n\n### **Events:**\n - **nys-click** - Fired when the download button or sortable headers are clicked.\n\n### **Slots:**\n - _default_ - Accepts a `<table>` element. Only the first table is rendered.",
|
|
505
|
+
"attributes": [
|
|
506
|
+
{ "name": "id", "values": [] },
|
|
507
|
+
{ "name": "name", "values": [] },
|
|
508
|
+
{ "name": "striped", "values": [] },
|
|
509
|
+
{ "name": "sortable", "values": [] },
|
|
510
|
+
{ "name": "bordered", "values": [] },
|
|
511
|
+
{ "name": "download", "values": [] }
|
|
512
|
+
],
|
|
513
|
+
"references": []
|
|
514
|
+
},
|
|
474
515
|
{
|
|
475
516
|
"name": "nys-textarea",
|
|
476
|
-
"description": "
|
|
517
|
+
"description": "`<nys-textarea>` is a form-enabled textarea with validation, accessibility support,\nand live error messages. Integrates with forms via ElementInternals.\n---\n\n\n### **Events:**\n - **nys-input** - Fired on input, detail: `{ id, value }`\n- **nys-focus** - Fired on focus.\n- **nys-blur** - Fired on blur.\n- **nys-select** - Fired on text selection, detail: `{ id, value }`\n- **nys-selectionchange** - Fired on selection change, detail: `{ id, value }`\n\n### **Methods:**\n - **checkValidity(): _boolean_** - Functions\n--------------------------------------------------------------------------\n\n### **Slots:**\n - **description** - Optional slot for custom description content below the label.",
|
|
477
518
|
"attributes": [
|
|
478
519
|
{ "name": "id", "values": [] },
|
|
479
520
|
{ "name": "name", "values": [] },
|
|
@@ -511,7 +552,7 @@
|
|
|
511
552
|
},
|
|
512
553
|
{
|
|
513
554
|
"name": "nys-textinput",
|
|
514
|
-
"description": "\n---\n\n\n### **Events:**\n - **nys-input
|
|
555
|
+
"description": "`<nys-textinput>` is a form-enabled text input with validation, optional\nmasking, password toggle, accessibility support, and live error messages.\nWorks with forms via ElementInternals.\n---\n\n\n### **Events:**\n - **nys-input** - Fired on input change. Detail: `{ id, value }`.\n- **nys-focus** - Fired when input receives focus.\n- **nys-blur** - Fired when input loses focus.\n\n### **Methods:**\n - **checkValidity(): _boolean_** - Functions\n--------------------------------------------------------------------------\n\n### **Slots:**\n - **description** - Optional custom description content below the label.\n- **startButton** - Slot for a single <nys-button> at the start of the input.\n- **endButton** - Slot for a single <nys-button> at the end of the input.",
|
|
515
556
|
"attributes": [
|
|
516
557
|
{ "name": "id", "values": [] },
|
|
517
558
|
{ "name": "name", "values": [] },
|
|
@@ -561,7 +602,7 @@
|
|
|
561
602
|
},
|
|
562
603
|
{
|
|
563
604
|
"name": "nys-toggle",
|
|
564
|
-
"description": "\n---\n\n\n### **Events:**\n - **nys-change
|
|
605
|
+
"description": "`<nys-toggle>` is a form-associated toggle switch with label, description,\nsize variants, inverted styles, and optional icons. Supports keyboard\ninteraction and integrates with forms via ElementInternals.\n---\n\n\n### **Events:**\n - **nys-change** - Fired when toggle changes state. Detail: `{ id, checked }`.\n- **nys-focus** - Fired when toggle receives focus.\n- **nys-blur** - Fired when toggle loses focus.\n\n### **Slots:**\n - **description** - Optional slot to provide additional description below the label.",
|
|
565
606
|
"attributes": [
|
|
566
607
|
{ "name": "id", "values": [] },
|
|
567
608
|
{ "name": "name", "values": [] },
|
|
@@ -579,7 +620,7 @@
|
|
|
579
620
|
},
|
|
580
621
|
{
|
|
581
622
|
"name": "nys-tooltip",
|
|
582
|
-
"description": "\n---\n",
|
|
623
|
+
"description": "`<nys-tooltip>` is a custom tooltip component for NYS design system elements.\nIt supports dynamic positioning, screen-reader accessibility, keyboard interaction,\nand viewport overflow handling.\n\nThe tooltip automatically positions itself relative to a target element specified\nvia the `for` attribute, but can also respect a user-defined position.\n---\n\n\n### **Events:**\n - **nys-focus** - Dispatched when the reference element receives focus (via keyboard or programmatically).\n- **nys-blur** - Dispatched when the reference element loses focus or mouse leaves the tooltip. Notes: - Tooltip visibility is automatically managed on hover/focus of the reference element. - The component adjusts position dynamically to prevent overflow off-screen. - Supports keyboard dismissal with the Escape key.",
|
|
583
624
|
"attributes": [
|
|
584
625
|
{ "name": "id", "values": [] },
|
|
585
626
|
{ "name": "text", "values": [] },
|
|
@@ -591,13 +632,13 @@
|
|
|
591
632
|
},
|
|
592
633
|
{
|
|
593
634
|
"name": "nys-unavfooter",
|
|
594
|
-
"description": "\n---\n",
|
|
635
|
+
"description": "`<nys-unavfooter>` is a footer component for New York State websites.\nIt displays the official NYS logo linking to ny.gov and a set of primary navigation links.\n\nFeatures:\n- Renders the NYS logo as an inline SVG linking to https://www.ny.gov\n- Provides key navigation links\n---\n",
|
|
595
636
|
"attributes": [],
|
|
596
637
|
"references": []
|
|
597
638
|
},
|
|
598
639
|
{
|
|
599
640
|
"name": "nys-unavheader",
|
|
600
|
-
"description": "\n---\n",
|
|
641
|
+
"description": "`<nys-unavheader>` is a universal header for New York State websites.\n\nFeatures:\n- Trust bar indicating official NYS site status, with expandable details\n- NYS logo linking to the homepage\n- Search bar with dropdown behavior for mobile and desktop\n- Language translation dropdown supporting multiple languages\n- Accessible interactions with ARIA attributes and keyboard handling\n---\n",
|
|
601
642
|
"attributes": [
|
|
602
643
|
{ "name": "trustbarVisible", "values": [] },
|
|
603
644
|
{ "name": "searchDropdownVisible", "values": [] },
|