@nysds/components 1.22.1 → 1.23.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/custom-elements.json +492 -314
- package/dist/.vscode/vscode.html-custom-data.json +16 -3
- package/dist/custom-elements.json +492 -314
- package/dist/{nys-icon.library-C0_LOBWi.js → nys-icon.library-B1pGtdv1.js} +2 -2
- package/dist/{nys-icon.library-C0_LOBWi.js.map → nys-icon.library-B1pGtdv1.js.map} +1 -1
- package/dist/{nys-icon.library-715cAMBp-BmiCym2_.js → nys-icon.library-dR8B2cmh-D2cWTOx2.js} +3 -3
- package/dist/{nys-icon.library-715cAMBp-BmiCym2_.js.map → nys-icon.library-dR8B2cmh-D2cWTOx2.js.map} +1 -1
- package/dist/nysds.es.js +3529 -3188
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +163 -141
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +7 -9
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +1 -1
- package/dist/packages/nys-alert/src/nys-alert.d.ts +10 -12
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +6 -8
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +3 -5
- package/dist/packages/nys-badge/src/nys-badge.d.ts +12 -16
- package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +6 -8
- package/dist/packages/nys-button/src/nys-button.d.ts +4 -6
- package/dist/packages/nys-card/src/nys-card.d.ts +9 -11
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +4 -7
- package/dist/packages/nys-combobox/src/nys-combobox.d.ts +3 -5
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +5 -7
- package/dist/packages/nys-divider/src/nys-divider.d.ts +4 -6
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +6 -8
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +6 -8
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +5 -7
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +5 -7
- package/dist/packages/nys-icon/src/nys-icon.d.ts +8 -10
- package/dist/packages/nys-iconlist/src/nys-iconlist.d.ts +5 -7
- package/dist/packages/nys-modal/src/nys-modal.d.ts +5 -7
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +4 -6
- package/dist/packages/nys-processlist/src/nys-processlist.d.ts +5 -7
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +4 -6
- package/dist/packages/nys-select/src/nys-select.d.ts +4 -6
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +3 -5
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +3 -5
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +6 -8
- package/dist/packages/nys-table/src/nys-table.d.ts +5 -7
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +3 -5
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +19 -7
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +6 -8
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +6 -8
- package/dist/packages/nys-unavbundle/src/index.d.ts +34 -0
- package/dist/packages/nys-unavbundle/src/tokens.d.ts +10 -0
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +56 -5
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +64 -10
- package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +7 -8
- package/dist/packages/nys-video/src/nys-video.d.ts +4 -6
- package/package.json +21 -10
|
@@ -182,12 +182,12 @@
|
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
184
|
"title": "Single Select",
|
|
185
|
-
"code": "<nys-accordion singleSelect>\n<nys-accordionitem heading=\"FAQ 1\">Answer 1</nys-accordionitem>\n<nys-accordionitem heading=\"FAQ 2\">Answer 2</nys-accordionitem>\n</nys-accordion>",
|
|
185
|
+
"code": "<nys-accordion singleSelect>\n<nys-accordionitem heading=\"FAQ 1\" expanded>Answer 1</nys-accordionitem>\n<nys-accordionitem heading=\"FAQ 2\">Answer 2</nys-accordionitem>\n</nys-accordion>",
|
|
186
186
|
"lang": "html"
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
"title": "Bordered",
|
|
190
|
-
"code": "<nys-accordion bordered>\n<nys-accordionitem heading=\"We are a group of accordions\">\n<p>Stronger together! Learn more at\n<a href=\"https://www.ny.gov\" target=\"_blank\">ny.gov</a>\n</p>\n</nys-accordionitem>\n<nys-accordionitem heading=\"Liberty Ipsum: Bridges & Boroughs\">\n<p>Empire ipsum dolor sit amet, across the Brooklyn Bridge to Central Park, consectetur adipiscing elit.</p>\n</nys-accordionitem>\n<nys-accordionitem heading=\"Hudson Ipsum: Riverfront Stories\">\n<p>From the banks of the Hudson to the peaks of the Adirondacks, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>\n</nys-accordionitem>\n</nys-accordion>",
|
|
190
|
+
"code": "<nys-accordion bordered>\n<nys-accordionitem heading=\"We are a group of accordions\" expanded>\n<p>Stronger together! Learn more at\n<a href=\"https://www.ny.gov\" target=\"_blank\">ny.gov</a>\n</p>\n</nys-accordionitem>\n<nys-accordionitem heading=\"Liberty Ipsum: Bridges & Boroughs\">\n<p>Empire ipsum dolor sit amet, across the Brooklyn Bridge to Central Park, consectetur adipiscing elit.</p>\n</nys-accordionitem>\n<nys-accordionitem heading=\"Hudson Ipsum: Riverfront Stories\">\n<p>From the banks of the Hudson to the peaks of the Adirondacks, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>\n</nys-accordionitem>\n</nys-accordion>",
|
|
191
191
|
"lang": "html"
|
|
192
192
|
},
|
|
193
193
|
{
|
|
@@ -196,17 +196,15 @@
|
|
|
196
196
|
"lang": "html"
|
|
197
197
|
}
|
|
198
198
|
],
|
|
199
|
-
"
|
|
199
|
+
"usage": [
|
|
200
200
|
"Use accordions for FAQs on state services like DMV procedures or benefits information.",
|
|
201
201
|
"Break up long program descriptions or supplemental details (such as optional steps, extra instructions, or secondary eligibility notes) into manageable sections without overwhelming the reader.",
|
|
202
202
|
"Label headings clearly so users understand the content before expanding.",
|
|
203
|
-
"Consider accordions in mobile layouts to keep pages compact while still allowing access to full details."
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
"
|
|
207
|
-
"
|
|
208
|
-
"Overuse accordions for content that is short enough to display fully on the page.",
|
|
209
|
-
"Use an accordion when users need to compare details from multiple sections at once. Consider a table or side-by-side layout instead."
|
|
203
|
+
"Consider accordions in mobile layouts to keep pages compact while still allowing access to full details.",
|
|
204
|
+
"Don't hide time-sensitive deadlines, required steps, or critical eligibility criteria in a collapsed section. Keep essential information visible by default.",
|
|
205
|
+
"Don't use vague or unclear headings that make it hard to know what is inside.",
|
|
206
|
+
"Don't overuse accordions for content that is short enough to display fully on the page.",
|
|
207
|
+
"Don't use an accordion when users need to compare details from multiple sections at once. Consider a table or side-by-side layout instead."
|
|
210
208
|
]
|
|
211
209
|
}
|
|
212
210
|
],
|
|
@@ -426,7 +424,7 @@
|
|
|
426
424
|
"examples": [
|
|
427
425
|
{
|
|
428
426
|
"title": "Expanded item",
|
|
429
|
-
"code": "<nys-accordion>\n<nys-accordionitem heading=\"How do I apply?\" expanded>\n<p>Visit ny.gov and complete the online application.</p>\n</nys-accordionitem>\n<nys-accordionitem heading=\"What documents do I need?\">\n<p>You will need a valid ID and proof of residency.</p>\n</nys-accordionitem>\n</nys-accordion>",
|
|
427
|
+
"code": "<nys-accordion bordered>\n<nys-accordionitem heading=\"How do I apply?\" expanded>\n<p>Visit ny.gov and complete the online application.</p>\n</nys-accordionitem>\n<nys-accordionitem heading=\"What documents do I need?\">\n<p>You will need a valid ID and proof of residency.</p>\n</nys-accordionitem>\n</nys-accordion>",
|
|
430
428
|
"lang": "html"
|
|
431
429
|
},
|
|
432
430
|
{
|
|
@@ -866,7 +864,7 @@
|
|
|
866
864
|
"lang": "html"
|
|
867
865
|
}
|
|
868
866
|
],
|
|
869
|
-
"
|
|
867
|
+
"usage": [
|
|
870
868
|
"Communicate important, time-sensitive information to users in a visually prominent way.",
|
|
871
869
|
"Use for messages such as success notifications, danger alerts, warnings, or informational updates.",
|
|
872
870
|
"Use for dismissible or temporary alerts when the message is not critical to user workflow.",
|
|
@@ -876,18 +874,16 @@
|
|
|
876
874
|
"Limit alerts to one per page.",
|
|
877
875
|
"Use success type to confirm a positive system status to users such as saving a form.",
|
|
878
876
|
"Use danger type to display system status error messages.",
|
|
879
|
-
"Only use emergency for real emergencies (e.g., missing person, severe weather). Remember to swap icon if a more relevant one exists."
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
"
|
|
883
|
-
"
|
|
884
|
-
"
|
|
885
|
-
"
|
|
886
|
-
"
|
|
887
|
-
"
|
|
888
|
-
"
|
|
889
|
-
"Use alerts as toasts. Place them at the top of the page content.",
|
|
890
|
-
"Add any shadows to alerts."
|
|
877
|
+
"Only use emergency for real emergencies (e.g., missing person, severe weather). Remember to swap icon if a more relevant one exists.",
|
|
878
|
+
"Don't use alerts for information that is not time-sensitive or critical; consider using an inline message instead.",
|
|
879
|
+
"Don't use alerts for repetitive or non-actionable content that could frustrate users.",
|
|
880
|
+
"Don't remove the left icon, it is required for accessibility.",
|
|
881
|
+
"Don't use alerts to highlight actions that should be clear in the UI itself.",
|
|
882
|
+
"Don't use error messages to communicate form field validation issues; use field error states instead.",
|
|
883
|
+
"Don't include more than two link actions in an alert.",
|
|
884
|
+
"Don't overuse alerts for low-priority info. This can desensitize users.",
|
|
885
|
+
"Don't use alerts as toasts. Place them at the top of the page content.",
|
|
886
|
+
"Don't add any shadows to alerts."
|
|
891
887
|
]
|
|
892
888
|
}
|
|
893
889
|
],
|
|
@@ -1240,19 +1236,17 @@
|
|
|
1240
1236
|
"lang": "html"
|
|
1241
1237
|
}
|
|
1242
1238
|
],
|
|
1243
|
-
"
|
|
1239
|
+
"usage": [
|
|
1244
1240
|
"Use for clear, simple user or entity representation in UIs such as profiles, account settings, or comment threads.",
|
|
1245
1241
|
"Prefer showing the full name next to the avatar on tablets and larger breakpoints.",
|
|
1246
1242
|
"Place the full name of the user or entity to the right of the avatar.",
|
|
1247
1243
|
"Ensure the text of initial avatars meets WCAG 2.1 contrast ratio against the avatar's background.",
|
|
1248
|
-
"Use the `<nys-icon>` slot only when the icon prop isn't sufficient."
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
"
|
|
1252
|
-
"
|
|
1253
|
-
"
|
|
1254
|
-
"Use an avatar when a large visual representation is needed; use a photo instead.",
|
|
1255
|
-
"Replace an avatar with a simple label or text when that would communicate the information more clearly."
|
|
1244
|
+
"Use the `<nys-icon>` slot only when the icon prop isn't sufficient.",
|
|
1245
|
+
"Don't skip the `ariaLabel` attribute for screen reader users.",
|
|
1246
|
+
"Don't use the `<nys-icon>` as a slot when the icon prop can satisfy your use.",
|
|
1247
|
+
"Don't overload the avatar with unnecessary customizations or override default avatar icons unless additional context is essential. Doing so creates inconsistency across NYS interfaces.",
|
|
1248
|
+
"Don't use an avatar when a large visual representation is needed; use a photo instead.",
|
|
1249
|
+
"Don't replace an avatar with a simple label or text when that would communicate the information more clearly."
|
|
1256
1250
|
]
|
|
1257
1251
|
}
|
|
1258
1252
|
],
|
|
@@ -1421,22 +1415,20 @@
|
|
|
1421
1415
|
"title": "Basic",
|
|
1422
1416
|
"code": "<footer>\n<nys-backtotop></nys-backtotop>\n<!-- Other footer content -->\n</footer>",
|
|
1423
1417
|
"lang": "html",
|
|
1424
|
-
"render": "<style>\ncode {\nwhite-space: nowrap;\npadding: var(--nys-space-1px) var(--nys-space-2px);\nborder-radius: var(--nys-radius-md);\ncolor: var(--nys-color-red-600);\nbackground: var(--nys-color-neutral-10);\nfont-size: var(--nys-font-size-sm);\n}\n</style>\n<nys-unavheader
|
|
1418
|
+
"render": "<style>\ncode {\nwhite-space: nowrap;\npadding: var(--nys-space-1px) var(--nys-space-2px);\nborder-radius: var(--nys-radius-md);\ncolor: var(--nys-color-red-600);\nbackground: var(--nys-color-neutral-10);\nfont-size: var(--nys-font-size-sm);\n}\n</style>\n<nys-unavheader translateKey=\"MY_TRANSLATE_KEY\"></nys-unavheader>\n<nys-globalheader appName=\"Back to Top Example\"></nys-globalheader>\n<main style=\"padding: 0 2rem\">\n<h1>Sample Content on page</h1>\n<p>\nThis is a sample content area used to demonstrate the functionality of\nthe Back to Top button. In an actual application,\n<code>nys-backtotop</code> would not be visible until the user scrolls\ndown the page.\n</p>\n</main>\n<footer>\n<nys-backtotop visible></nys-backtotop>\n<nys-unavfooter></nys-unavfooter>\n</footer>"
|
|
1425
1419
|
},
|
|
1426
1420
|
{
|
|
1427
1421
|
"title": "Left",
|
|
1428
1422
|
"code": "<footer>\n<nys-backtotop position=\"left\"></nys-backtotop>\n<!-- Other footer content -->\n</footer>",
|
|
1429
1423
|
"lang": "html",
|
|
1430
|
-
"render": "<style>\ncode {\nwhite-space: nowrap;\npadding: var(--nys-space-1px) var(--nys-space-2px);\nborder-radius: var(--nys-radius-md);\ncolor: var(--nys-color-red-600);\nbackground: var(--nys-color-neutral-10);\nfont-size: var(--nys-font-size-sm);\n}\nnys-button {\nposition: fixed;\nbottom: 1rem;\nright: 1rem;\n--_nys-button-border-radius: var(--nys-radius-round);\n}\n</style>\n<nys-unavheader
|
|
1424
|
+
"render": "<style>\ncode {\nwhite-space: nowrap;\npadding: var(--nys-space-1px) var(--nys-space-2px);\nborder-radius: var(--nys-radius-md);\ncolor: var(--nys-color-red-600);\nbackground: var(--nys-color-neutral-10);\nfont-size: var(--nys-font-size-sm);\n}\nnys-button {\nposition: fixed;\nbottom: 1rem;\nright: 1rem;\n--_nys-button-border-radius: var(--nys-radius-round);\n}\n</style>\n<nys-unavheader translateKey=\"MY_TRANSLATE_KEY\"></nys-unavheader>\n<nys-globalheader appName=\"Back to Top Example\"></nys-globalheader>\n<main style=\"padding: 0 2rem\">\n<h1>Sample Content on page</h1>\n<p>\nThis is a sample content area used to demonstrate the functionality of\nthe Back to Top button. In an actual application,\n<code>nys-backtotop</code> would not be visible until the user scrolls\ndown the page.\n</p>\n</main>\n<footer>\n<nys-backtotop visible position=\"left\"></nys-backtotop>\n<nys-button prefixIcon=\"sms\" variant=\"outline\" label=\"Chat with us\" size=\"sm\"></nys-button>\n<nys-unavfooter></nys-unavfooter>\n</footer>"
|
|
1431
1425
|
}
|
|
1432
1426
|
],
|
|
1433
|
-
"
|
|
1427
|
+
"usage": [
|
|
1434
1428
|
"Place exactly one `<nys-backtotop>` per page, above the `<nys-globalfooter>` in your markup.",
|
|
1435
1429
|
"Use on long-form content pages such as state policy documents, agency service directories, program eligibility guides, extensive search results, or data tables.",
|
|
1436
1430
|
"Set `position=\"left\"` when the bottom-right corner is occupied by another floating element, such as a chatbot button.",
|
|
1437
|
-
"Let the component manage its own visibility. The auto-show behavior activates after 1.5 viewport heights on pages that are at least 4 screens tall."
|
|
1438
|
-
],
|
|
1439
|
-
"usagedonts": [
|
|
1431
|
+
"Let the component manage its own visibility. The auto-show behavior activates after 1.5 viewport heights on pages that are at least 4 screens tall.",
|
|
1440
1432
|
"Don't add multiple `<nys-backtotop>` components to a single page.",
|
|
1441
1433
|
"Don't use on pages where content fits within a single viewport without scrolling.",
|
|
1442
1434
|
"Don't use if your page already has anchor-based in-page navigation such as a table of contents. A back-to-top button is likely redundant.",
|
|
@@ -1572,38 +1564,24 @@
|
|
|
1572
1564
|
"attribute": "strong",
|
|
1573
1565
|
"reflects": true
|
|
1574
1566
|
},
|
|
1575
|
-
{
|
|
1576
|
-
"kind": "field",
|
|
1577
|
-
"name": "_prefixIcon",
|
|
1578
|
-
"type": {
|
|
1579
|
-
"text": "string | boolean"
|
|
1580
|
-
},
|
|
1581
|
-
"privacy": "private",
|
|
1582
|
-
"default": "\"\""
|
|
1583
|
-
},
|
|
1584
1567
|
{
|
|
1585
1568
|
"kind": "field",
|
|
1586
1569
|
"name": "prefixIcon",
|
|
1587
1570
|
"type": {
|
|
1588
|
-
"text": "string | boolean"
|
|
1571
|
+
"text": "string | boolean | null"
|
|
1589
1572
|
},
|
|
1573
|
+
"default": "null",
|
|
1574
|
+
"description": "Icon shown before the label.",
|
|
1590
1575
|
"attribute": "prefixicon"
|
|
1591
1576
|
},
|
|
1592
|
-
{
|
|
1593
|
-
"kind": "field",
|
|
1594
|
-
"name": "_suffixIcon",
|
|
1595
|
-
"type": {
|
|
1596
|
-
"text": "string | boolean"
|
|
1597
|
-
},
|
|
1598
|
-
"privacy": "private",
|
|
1599
|
-
"default": "\"\""
|
|
1600
|
-
},
|
|
1601
1577
|
{
|
|
1602
1578
|
"kind": "field",
|
|
1603
1579
|
"name": "suffixIcon",
|
|
1604
1580
|
"type": {
|
|
1605
|
-
"text": "string | boolean"
|
|
1581
|
+
"text": "string | boolean | null"
|
|
1606
1582
|
},
|
|
1583
|
+
"default": "null",
|
|
1584
|
+
"description": "Icon shown after the label.",
|
|
1607
1585
|
"attribute": "suffixicon"
|
|
1608
1586
|
},
|
|
1609
1587
|
{
|
|
@@ -1653,7 +1631,7 @@
|
|
|
1653
1631
|
{
|
|
1654
1632
|
"name": "icon",
|
|
1655
1633
|
"type": {
|
|
1656
|
-
"text": "string | boolean"
|
|
1634
|
+
"text": "string | boolean | null"
|
|
1657
1635
|
},
|
|
1658
1636
|
"description": "The icon property value (string or boolean)"
|
|
1659
1637
|
}
|
|
@@ -1737,15 +1715,19 @@
|
|
|
1737
1715
|
{
|
|
1738
1716
|
"name": "prefixicon",
|
|
1739
1717
|
"type": {
|
|
1740
|
-
"text": "string | boolean"
|
|
1718
|
+
"text": "string | boolean | null"
|
|
1741
1719
|
},
|
|
1720
|
+
"default": "null",
|
|
1721
|
+
"description": "Icon shown before the label.",
|
|
1742
1722
|
"fieldName": "prefixIcon"
|
|
1743
1723
|
},
|
|
1744
1724
|
{
|
|
1745
1725
|
"name": "suffixicon",
|
|
1746
1726
|
"type": {
|
|
1747
|
-
"text": "string | boolean"
|
|
1727
|
+
"text": "string | boolean | null"
|
|
1748
1728
|
},
|
|
1729
|
+
"default": "null",
|
|
1730
|
+
"description": "Icon shown after the label.",
|
|
1749
1731
|
"fieldName": "suffixIcon"
|
|
1750
1732
|
}
|
|
1751
1733
|
],
|
|
@@ -1833,23 +1815,21 @@
|
|
|
1833
1815
|
"lang": "html"
|
|
1834
1816
|
}
|
|
1835
1817
|
],
|
|
1836
|
-
"
|
|
1818
|
+
"usage": [
|
|
1837
1819
|
"Indicate the status of an item, such as \"new\", \"updated\", or \"beta\".",
|
|
1838
1820
|
"Provide additional context or information about an item without cluttering the interface.",
|
|
1839
1821
|
"Keep badge labels short -- one or two words like \"New\", \"Beta\", or \"Updated\".",
|
|
1840
1822
|
"Use the `intent` property to match the badge's visual style to its meaning (e.g., `success` for positive statuses, `warning` for caution).",
|
|
1841
1823
|
"Place badges near the element they describe so the relationship is clear.",
|
|
1842
1824
|
"Use the `prefixIcon` or `suffixIcon` attributes to reinforce meaning when the label alone may be ambiguous.",
|
|
1843
|
-
"Apply the `strong` variant when the badge appears on a raised surface or needs extra emphasis."
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
"
|
|
1847
|
-
"
|
|
1848
|
-
"
|
|
1849
|
-
"
|
|
1850
|
-
"
|
|
1851
|
-
"Rely on color alone to convey meaning; always include a text label.",
|
|
1852
|
-
"Stack multiple badges on a single element unless each communicates a distinct, necessary status."
|
|
1825
|
+
"Apply the `strong` variant when the badge appears on a raised surface or needs extra emphasis.",
|
|
1826
|
+
"Don't use badges when the information is too complex to be conveyed in a small badge.",
|
|
1827
|
+
"Don't use badges when they would not add significant value to the user experience.",
|
|
1828
|
+
"Don't use badges as interactive elements -- they are not buttons or links.",
|
|
1829
|
+
"Don't pack long sentences or multiple values into a single badge label.",
|
|
1830
|
+
"Don't mix badge sizes within the same group; pick either `md` or `sm` and stay consistent.",
|
|
1831
|
+
"Don't rely on color alone to convey meaning; always include a text label.",
|
|
1832
|
+
"Don't stack multiple badges on a single element unless each communicates a distinct, necessary status."
|
|
1853
1833
|
]
|
|
1854
1834
|
}
|
|
1855
1835
|
],
|
|
@@ -2319,18 +2299,16 @@
|
|
|
2319
2299
|
"lang": "html"
|
|
2320
2300
|
}
|
|
2321
2301
|
],
|
|
2322
|
-
"
|
|
2302
|
+
"usage": [
|
|
2323
2303
|
"Use on pages at level 2 and deeper in a site hierarchy. If a level 2 page has child pages, all pages starting at that level should include a breadcrumb.",
|
|
2324
2304
|
"Place breadcrumb below the header and above the main content.",
|
|
2325
2305
|
"Show the site hierarchy, not the path a user took.",
|
|
2326
|
-
"For the home page of a site, use a specific label rather than a generic \"Home.\" This differentiates the main site home from other landing pages (e.g., \"myBenefits Home\" instead of just \"Home\")."
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
"
|
|
2330
|
-
"
|
|
2331
|
-
"
|
|
2332
|
-
"Use breadcrumbs for sequential processes like multi-step forms or wizards. Use a stepper instead.",
|
|
2333
|
-
"Add breadcrumbs when they don't provide meaningful context or navigation value."
|
|
2306
|
+
"For the home page of a site, use a specific label rather than a generic \"Home.\" This differentiates the main site home from other landing pages (e.g., \"myBenefits Home\" instead of just \"Home\").",
|
|
2307
|
+
"Don't use on top-level pages, or on sites with only one or two levels of hierarchy.",
|
|
2308
|
+
"Don't make the current page clickable.",
|
|
2309
|
+
"Don't use breadcrumbs as the only navigation method.",
|
|
2310
|
+
"Don't use breadcrumbs for sequential processes like multi-step forms or wizards. Use a stepper instead.",
|
|
2311
|
+
"Don't add breadcrumbs when they don't provide meaningful context or navigation value."
|
|
2334
2312
|
]
|
|
2335
2313
|
}
|
|
2336
2314
|
],
|
|
@@ -3132,7 +3110,7 @@
|
|
|
3132
3110
|
"lang": "html"
|
|
3133
3111
|
}
|
|
3134
3112
|
],
|
|
3135
|
-
"
|
|
3113
|
+
"usage": [
|
|
3136
3114
|
"Use for the most important actions you want users to take, such as \"Download\", \"Sign up\", or \"Log out\".",
|
|
3137
3115
|
"Use `variant=\"fill\"` for the primary action on the page. There should be only one primary action per page.",
|
|
3138
3116
|
"Use `variant=\"outline\"` for secondary actions, placed next to the primary Fill button.",
|
|
@@ -3140,12 +3118,10 @@
|
|
|
3140
3118
|
"Use `variant=\"text\"` buttons when an action needs to appear within a text block. If clicking takes the user somewhere else, use a Link instead.",
|
|
3141
3119
|
"Always set the `type` attribute (`submit`, `button`, or `reset`). The default is `button`.",
|
|
3142
3120
|
"Use sentence case for button labels, only capitalizing the first word.",
|
|
3143
|
-
"Place a `chevron_down icon` on the right for buttons that open a dropdown."
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
"
|
|
3147
|
-
"Use icons in buttons without a text label. Very few icons are universally understood.",
|
|
3148
|
-
"Create custom button styles (color, shape, size). Consistency helps users recognize buttons and predict behavior."
|
|
3121
|
+
"Place a `chevron_down icon` on the right for buttons that open a dropdown.",
|
|
3122
|
+
"Don't use buttons for navigation. Use an `<a>` element or Text button for links that take users somewhere else.",
|
|
3123
|
+
"Don't use icons in buttons without a text label. Very few icons are universally understood.",
|
|
3124
|
+
"Don't create custom button styles (color, shape, size). Consistency helps users recognize buttons and predict behavior."
|
|
3149
3125
|
]
|
|
3150
3126
|
}
|
|
3151
3127
|
],
|
|
@@ -3738,7 +3714,7 @@
|
|
|
3738
3714
|
"lang": "html"
|
|
3739
3715
|
}
|
|
3740
3716
|
],
|
|
3741
|
-
"
|
|
3717
|
+
"usage": [
|
|
3742
3718
|
"Use a card to group content and actions about a single subject, such as one program, event, or news item.",
|
|
3743
3719
|
"Set `headingLevel` so the card heading fits the surrounding page hierarchy.",
|
|
3744
3720
|
"Keep headings short and specific, so a card is understandable on its own.",
|
|
@@ -3746,17 +3722,15 @@
|
|
|
3746
3722
|
"Use `href` or `onClick` when the whole card leads to one destination or performs one action, and add an icon to the footer slot so the interaction is visible.",
|
|
3747
3723
|
"Keep cards in the same group consistent in structure, so they are easy to scan and compare.",
|
|
3748
3724
|
"Repeat any information shown in the `media` or the `media-accent` slot in the card's text.",
|
|
3749
|
-
"Place each card in a grid column to control its width, and set `--nys-card-height: 100%` when a row of cards should share one height."
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
"
|
|
3753
|
-
"
|
|
3754
|
-
"
|
|
3755
|
-
"
|
|
3756
|
-
"
|
|
3757
|
-
"
|
|
3758
|
-
"Skip heading levels to get a particular text size. Use `headingLevel` for structure, not for styling.",
|
|
3759
|
-
"Use cards for long-form content that a user needs to read in order."
|
|
3725
|
+
"Place each card in a grid column to control its width, and set `--nys-card-height: 100%` when a row of cards should share one height.",
|
|
3726
|
+
"Don't use a card as a substitute for a page section heading or for content that belongs in the page flow.",
|
|
3727
|
+
"Don't put buttons, links, or other interactive elements in the slots of a card that has `href` or a click handler. That card is already a single control.",
|
|
3728
|
+
"Don't set both `href` and a click handler on the same card.",
|
|
3729
|
+
"Don't put more than one primary action in a card.",
|
|
3730
|
+
"Don't rely on the `media` image or the `media-accent` slot to convey information that appears nowhere else.",
|
|
3731
|
+
"Don't mix `elevated` and non-elevated cards within the same group.",
|
|
3732
|
+
"Don't skip heading levels to get a particular text size. Use `headingLevel` for structure, not for styling.",
|
|
3733
|
+
"Don't use cards for long-form content that a user needs to read in order."
|
|
3760
3734
|
]
|
|
3761
3735
|
}
|
|
3762
3736
|
],
|
|
@@ -4415,16 +4389,13 @@
|
|
|
4415
4389
|
"lang": "html"
|
|
4416
4390
|
}
|
|
4417
4391
|
],
|
|
4418
|
-
"
|
|
4392
|
+
"usage": [
|
|
4419
4393
|
"Use for binary decisions (agree/disagree), confirmation, or multi-select lists.",
|
|
4420
4394
|
"Use for selecting multiple options from a list of up to 10 choices.",
|
|
4421
|
-
"Use `nys-checkboxgroup` to group checkboxes with a shared label and description."
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
"
|
|
4425
|
-
"Use a checkbox when changing its state immediately affects the system. Use a `<nys-toggle>` instead (e.g., enabling Dark Mode).",
|
|
4426
|
-
"Use when you have more than 10 options to choose from.",
|
|
4427
|
-
"Change the state of one checkbox based on another being clicked."
|
|
4395
|
+
"Use `nys-checkboxgroup` to group checkboxes with a shared label and description.",
|
|
4396
|
+
"Don't use when users need to select only one option. Use a `<nys-radiobutton>` for 1–6 choices or a <nys-select> for 7 or more.",
|
|
4397
|
+
"Don't use when you have more than 10 options to choose from.",
|
|
4398
|
+
"Don't change the state of one checkbox based on another being clicked."
|
|
4428
4399
|
],
|
|
4429
4400
|
"formControl": {
|
|
4430
4401
|
"kind": "checked",
|
|
@@ -5834,14 +5805,12 @@
|
|
|
5834
5805
|
],
|
|
5835
5806
|
"tagName": "nys-combobox",
|
|
5836
5807
|
"customElement": true,
|
|
5837
|
-
"
|
|
5808
|
+
"usage": [
|
|
5838
5809
|
"Use when there are more than 15 options to choose from.",
|
|
5839
5810
|
"Use when screen real estate is limited.",
|
|
5840
|
-
"Use when users can predict or recognize the value they're looking for."
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
"Use when the number of options is small. Use `<nys-select>` or `<nys-radiobutton>` instead.",
|
|
5844
|
-
"Use when options are unfamiliar to users and browsing the full list is necessary."
|
|
5811
|
+
"Use when users can predict or recognize the value they're looking for.",
|
|
5812
|
+
"Don't use when the number of options is small. Use `<nys-select>` or `<nys-radiobutton>` instead.",
|
|
5813
|
+
"Don't use when options are unfamiliar to users and browsing the full list is necessary."
|
|
5845
5814
|
],
|
|
5846
5815
|
"formControl": {
|
|
5847
5816
|
"kind": "value",
|
|
@@ -6756,19 +6725,17 @@
|
|
|
6756
6725
|
"lang": "html"
|
|
6757
6726
|
}
|
|
6758
6727
|
],
|
|
6759
|
-
"
|
|
6728
|
+
"usage": [
|
|
6760
6729
|
"Use when users need to select a single calendar date, such as scheduling an appointment or choosing a filing deadline, especially when the day of the week matters.",
|
|
6761
6730
|
"Set the `label` property to clearly describe what date is being collected. Every datepicker needs one for accessibility.",
|
|
6762
6731
|
"Add `description` text to specify the expected format or provide context.",
|
|
6763
6732
|
"Set `required` when the date is mandatory for form submission; don't set both `required` and `optional` on the same component.",
|
|
6764
6733
|
"Use `startDate` to open the calendar to a relevant month when the expected date is far from today.",
|
|
6765
|
-
"Pass date values as ISO strings (`\"YYYY-MM-DD\"`) rather than `Date` objects to avoid timezone issues."
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
"
|
|
6769
|
-
"
|
|
6770
|
-
"Rely on the calendar popup alone. Safari and mobile browsers use the native date picker instead.",
|
|
6771
|
-
"Use `hideTodayButton` and `hideClearButton` together unless users must select a specific date and cannot be allowed to clear it."
|
|
6734
|
+
"Pass date values as ISO strings (`\"YYYY-MM-DD\"`) rather than `Date` objects to avoid timezone issues.",
|
|
6735
|
+
"Don't use for dates users know from memory, such as date of birth or document issue dates. A text input with separate month/day/year fields is more efficient.",
|
|
6736
|
+
"Don't use when users need to select multiple dates or a date range, or when time selection is required alongside the date.",
|
|
6737
|
+
"Don't rely on the calendar popup alone. Safari and mobile browsers use the native date picker instead.",
|
|
6738
|
+
"Don't use `hideTodayButton` and `hideClearButton` together unless users must select a specific date and cannot be allowed to clear it."
|
|
6772
6739
|
],
|
|
6773
6740
|
"formControl": {
|
|
6774
6741
|
"kind": "value",
|
|
@@ -6906,14 +6873,12 @@
|
|
|
6906
6873
|
"lang": "html"
|
|
6907
6874
|
}
|
|
6908
6875
|
],
|
|
6909
|
-
"
|
|
6876
|
+
"usage": [
|
|
6910
6877
|
"Ensure consistent padding/margin above and below dividers to avoid crowding.",
|
|
6911
|
-
"Use the `inverted` option on dark backgrounds."
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
"
|
|
6915
|
-
"Use the divider to separate content appearing side bys side.",
|
|
6916
|
-
"Use the `inverted` option on light backgrounds."
|
|
6878
|
+
"Use the `inverted` option on dark backgrounds.",
|
|
6879
|
+
"Don't overuse dividers and clutter the interface, reducing scannability.",
|
|
6880
|
+
"Don't use the divider to separate content appearing side by side.",
|
|
6881
|
+
"Don't use the `inverted` option on light backgrounds."
|
|
6917
6882
|
]
|
|
6918
6883
|
}
|
|
6919
6884
|
],
|
|
@@ -7368,19 +7333,17 @@
|
|
|
7368
7333
|
"render": "<div style=\"margin: 200px; display: flex; justify-content: center; align-items: center;\">\n<nys-button id=\"my-trigger-id\" label=\"Open Menu\"></nys-button>\n<nys-dropdownmenu id=\"my-dropdownmenu\" for=\"my-trigger-id\">\n<nys-dropdownmenuitem label=\"Profile\" href=\"/profile\" prefixIcon=\"account_circle\"></nys-dropdownmenuitem>\n<nys-dropdownmenuitem label=\"Repositories & Github Pages\" href=\"/repos\" prefixIcon=\"drive_folder_upload\" suffixIcon=\"open_in_new\"></nys-dropdownmenuitem>\n<nys-dropdownmenuitem label=\"Organizations\" href=\"/organizations\" prefixIcon=\"account_balance_filled\" suffixIcon=\"chevron_right\"></nys-dropdownmenuitem>\n<nys-dropdownmenuitem label=\"Sign out\" href=\"/logout\" suffixIcon=\"lock_filled\"></nys-dropdownmenuitem>\n</nys-dropdownmenu>\n</div>"
|
|
7369
7334
|
}
|
|
7370
7335
|
],
|
|
7371
|
-
"
|
|
7336
|
+
"usage": [
|
|
7372
7337
|
"Use to display a list of 5–15 actions or links under a single trigger, such as navigation, commands, or user profile access.",
|
|
7373
7338
|
"Keep to 3–7 actions when possible.",
|
|
7374
7339
|
"Order actions by frequency or importance.",
|
|
7375
7340
|
"Separate destructive actions with a divider.",
|
|
7376
|
-
"Use clear, specific labels (e.g., \"Profile\", \"Account Settings\", \"Sign out\")."
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
"
|
|
7380
|
-
"
|
|
7381
|
-
"
|
|
7382
|
-
"Nest dropdown menus inside other dropdown menus.",
|
|
7383
|
-
"Use vague labels like \"Manage\" or \"Options\"."
|
|
7341
|
+
"Use clear, specific labels (e.g., \"Profile\", \"Account Settings\", \"Sign out\").",
|
|
7342
|
+
"Don't use for form inputs or selectable values. Use `<nys-select>` for standard selection or `<nys-combobox>` when users need to filter or search through many options.",
|
|
7343
|
+
"Don't use when the action is always visible and frequently used. Use `<nys-button>` instead.",
|
|
7344
|
+
"Don't use without a label or accessible description on the trigger.",
|
|
7345
|
+
"Don't nest dropdown menus inside other dropdown menus.",
|
|
7346
|
+
"Don't use vague labels like \"Manage\" or \"Options\"."
|
|
7384
7347
|
]
|
|
7385
7348
|
}
|
|
7386
7349
|
],
|
|
@@ -8519,15 +8482,13 @@
|
|
|
8519
8482
|
"lang": "html"
|
|
8520
8483
|
}
|
|
8521
8484
|
],
|
|
8522
|
-
"
|
|
8523
|
-
"Use when a form requires file upload, including when multiple file selection or drag-and-drop is needed."
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
"
|
|
8527
|
-
"
|
|
8528
|
-
"
|
|
8529
|
-
"Use when file preview of uploaded content is needed.",
|
|
8530
|
-
"Use when file upload is not necessary for the task."
|
|
8485
|
+
"usage": [
|
|
8486
|
+
"Use when a form requires file upload, including when multiple file selection or drag-and-drop is needed.",
|
|
8487
|
+
"Don't use when uploading large files that require resumable upload logic.",
|
|
8488
|
+
"Don't use when selecting only from camera input or other device-native features.",
|
|
8489
|
+
"Don't use when uploading sensitive data without encryption.",
|
|
8490
|
+
"Don't use when file preview of uploaded content is needed.",
|
|
8491
|
+
"Don't use when file upload is not necessary for the task."
|
|
8531
8492
|
],
|
|
8532
8493
|
"formControl": {
|
|
8533
8494
|
"kind": "files",
|
|
@@ -9001,20 +8962,18 @@
|
|
|
9001
8962
|
"lang": "html"
|
|
9002
8963
|
}
|
|
9003
8964
|
],
|
|
9004
|
-
"
|
|
8965
|
+
"usage": [
|
|
9005
8966
|
"Use on every agency site and application. The Global Footer is a required page element.",
|
|
9006
8967
|
"Use to surface essential site-wide links such as contact information, privacy policies, accessibility statements, and related program pages.",
|
|
9007
8968
|
"Set `agencyName` to your agency's full official name (e.g., \"Office of Information Technology Services\").",
|
|
9008
8969
|
"Set `homepageLink` to make the agency name a clickable link back to your site's homepage.",
|
|
9009
8970
|
"Keep footer link lists concise. Group related links under `<span>` headings when you have more than 5–6 links.",
|
|
9010
8971
|
"Use slotted `<ul>` content for single-list links, or nested `<ul>` with `<span>` headings for multi-column layouts.",
|
|
9011
|
-
"Place `<nys-globalfooter>` above `<nys-unavfooter>` and below your page content and `<nys-backtotop>`."
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
"
|
|
9015
|
-
"
|
|
9016
|
-
"Use for statewide universal links (Agencies, Services, Counties). Those belong in `<nys-unavfooter>`, which renders below this component.",
|
|
9017
|
-
"Embed `<script>`, `<iframe>`, `<object>`, or `<img>` elements in slotted content. These are sanitized and removed by the component for security."
|
|
8972
|
+
"Place `<nys-globalfooter>` above `<nys-unavfooter>` and below your page content and `<nys-backtotop>`.",
|
|
8973
|
+
"Don't use for primary navigation. That belongs in `<nys-globalheader>`.",
|
|
8974
|
+
"Don't include page-specific content or calls to action. Footer content should be relevant site-wide.",
|
|
8975
|
+
"Don't use for statewide universal links (Agencies, Services, Counties). Those belong in `<nys-unavfooter>`, which renders below this component.",
|
|
8976
|
+
"Don't embed `<script>`, `<iframe>`, `<object>`, or `<img>` elements in slotted content. These are sanitized and removed by the component for security."
|
|
9018
8977
|
]
|
|
9019
8978
|
}
|
|
9020
8979
|
],
|
|
@@ -9444,7 +9403,7 @@
|
|
|
9444
9403
|
"lang": "html"
|
|
9445
9404
|
}
|
|
9446
9405
|
],
|
|
9447
|
-
"
|
|
9406
|
+
"usage": [
|
|
9448
9407
|
"Use on every agency site and application. The Global Header is a required page element.",
|
|
9449
9408
|
"Place below `<nys-unavheader>` when using the Universal Navigation Header.",
|
|
9450
9409
|
"Use `agencyName` alone for public-facing agency websites not tied to a specific application; omit it for statewide portals that aren't agency-specific.",
|
|
@@ -9453,13 +9412,11 @@
|
|
|
9453
9412
|
"Set `homepageLink` to make the header title clickable. On public-facing sites, this is the primary path back to the homepage.",
|
|
9454
9413
|
"Use the `user-actions` slot for authenticated applications that need log-out buttons or user profile controls.",
|
|
9455
9414
|
"Keep navigation link lists to 6 items or fewer. On mobile, these collapse into a full-width menu.",
|
|
9456
|
-
"Add the `nysLogo` property to display the NYS brand mark for internal applications that don't require public-facing agency branding."
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
"
|
|
9460
|
-
"
|
|
9461
|
-
"Place secondary or utility navigation in the Global Header. Use `<nys-globalfooter>` for secondary links.",
|
|
9462
|
-
"Use the `nysLogo` property on public-facing sites, instead use the `<nys-unavheader>` for statewide branding."
|
|
9415
|
+
"Add the `nysLogo` property to display the NYS brand mark for internal applications that don't require public-facing agency branding.",
|
|
9416
|
+
"Don't use `appName` for an agency name. Use the `agencyName` prop instead.",
|
|
9417
|
+
"Don't add navigation links to application headers where users should remain focused on a task (e.g., a multi-step form).",
|
|
9418
|
+
"Don't place secondary or utility navigation in the Global Header. Use `<nys-globalfooter>` for secondary links.",
|
|
9419
|
+
"Don't use the `nysLogo` property on public-facing sites, instead use the `<nys-unavheader>` for statewide branding."
|
|
9463
9420
|
]
|
|
9464
9421
|
}
|
|
9465
9422
|
],
|
|
@@ -10078,21 +10035,19 @@
|
|
|
10078
10035
|
"render": "<nys-icon name=\"favorite\" library=\"material\"></nys-icon>\n<script data-scope=\"module\">\nregisterIconLibrary(\"material\", {\nresolver: (name) =>\n`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/${name}/default/24px.svg`,\nmutator: (svg) => {\nsvg.setAttribute(\"fill\", \"currentColor\");\n},\n});\n</script>"
|
|
10079
10036
|
}
|
|
10080
10037
|
],
|
|
10081
|
-
"
|
|
10038
|
+
"usage": [
|
|
10082
10039
|
"Use icons to draw attention to actions, help users scan for key information, or enhance recognizable common actions (e.g., search, download, share).",
|
|
10083
10040
|
"Pair icons with a text label—few icons are universally understood alone.",
|
|
10084
10041
|
"Use icons consistently: same icon and label for the same meaning throughout your app.",
|
|
10085
10042
|
"Use `ariaLabel` when the icon conveys meaning, so screen readers can announce its purpose.",
|
|
10086
10043
|
"Use icons from the NYS Design System library; if unavailable, use Google Material Symbols (rounded, unfilled).",
|
|
10087
|
-
"Match icon size and color to the design system."
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
"
|
|
10091
|
-
"
|
|
10092
|
-
"
|
|
10093
|
-
"
|
|
10094
|
-
"Overuse icons—too many create visual noise and reduce focus.",
|
|
10095
|
-
"Use excessive icon customization that breaks design consistency."
|
|
10044
|
+
"Match icon size and color to the design system.",
|
|
10045
|
+
"Don't use an icon if its meaning isn't immediately clear—if you suspect users won't recognize it, remove it.",
|
|
10046
|
+
"Don't use icons to compensate for unclear page hierarchy or confusing content organization.",
|
|
10047
|
+
"Don't use standalone icons for actions—use `<nys-button>` with an icon inside instead.",
|
|
10048
|
+
"Don't replace meaningful text with icons unless the icon is universally recognized or paired with a label.",
|
|
10049
|
+
"Don't overuse icons—too many create visual noise and reduce focus.",
|
|
10050
|
+
"Don't use excessive icon customization that breaks design consistency."
|
|
10096
10051
|
]
|
|
10097
10052
|
}
|
|
10098
10053
|
],
|
|
@@ -10280,18 +10235,16 @@
|
|
|
10280
10235
|
"lang": "html"
|
|
10281
10236
|
}
|
|
10282
10237
|
],
|
|
10283
|
-
"
|
|
10238
|
+
"usage": [
|
|
10284
10239
|
"Use an icon list to highlight key attributes, features, requirements, or metadata that help users quickly scan content.",
|
|
10285
10240
|
"Keep list items short and concise—ideally a single line of text or a brief phrase.",
|
|
10286
10241
|
"Limit the number of items shown (typically 3–5) to maintain scannability and keep the list from becoming overly dense.",
|
|
10287
10242
|
"Order items by importance, placing the most relevant information first.",
|
|
10288
|
-
"Make sure icons add meaning and are not purely decorative. If all items use the same icon, consider whether a standard list would communicate the content just as effectively."
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
"
|
|
10292
|
-
"
|
|
10293
|
-
"Mix icon styles within a single list, which makes the list harder to scan.",
|
|
10294
|
-
"Place interactive controls such as buttons inside list items."
|
|
10243
|
+
"Make sure icons add meaning and are not purely decorative. If all items use the same icon, consider whether a standard list would communicate the content just as effectively.",
|
|
10244
|
+
"Don't use an icon list when the items represent steps in a process. Use the `<nys-stepper>` instead.",
|
|
10245
|
+
"Don't use an icon list for long descriptions, complex instructions, or content that requires hierarchy. Use standard lists or body text instead.",
|
|
10246
|
+
"Don't mix icon styles within a single list, which makes the list harder to scan.",
|
|
10247
|
+
"Don't place interactive controls such as buttons inside list items."
|
|
10295
10248
|
]
|
|
10296
10249
|
}
|
|
10297
10250
|
],
|
|
@@ -11026,17 +10979,15 @@
|
|
|
11026
10979
|
"render": "<div id=\"modal-wrapper4\">\n<nys-button label=\"Open Modal\" onclick=\"document.querySelector('.modal4').open = true; document.getElementById('modal-wrapper4').style.padding = '100px 0'\"></nys-button>\n<nys-modal\nclass=\"modal4\"\nid=\"modal4\"\nheading=\"There is no way to X out of here\"\nsubheading=\"Don't use this prop unless you add in the actions slot so the user does not get stuck in here.\"\nmandatory\n>\n<div slot=\"actions\">\n<nys-button label=\"Get me out\" onclick=\"alert('Ok, ok. You can go now.'); document.querySelector('.modal4').open = false; document.getElementById('modal-wrapper4').style.padding = '0'\"></nys-button>\n</div>\n</nys-modal>\n</div>"
|
|
11027
10980
|
}
|
|
11028
10981
|
],
|
|
11029
|
-
"
|
|
10982
|
+
"usage": [
|
|
11030
10983
|
"Use to confirm important actions, present focused forms (e.g., login, feedback), or require acknowledgment of alerts without navigating away from the page.",
|
|
11031
10984
|
"Keep content short and focused. Use a dedicated page for long or complex content.",
|
|
11032
10985
|
"Keep the `subheading` short and use `<p>` tags within the modal for longer information.",
|
|
11033
|
-
"Use the `mandatory` prop to disable the dismiss button only when the user must make a critical decision or acknowledge essential information."
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
"
|
|
11037
|
-
"
|
|
11038
|
-
"Use for quick hints on form fields. Use `<nys-tooltip>` instead.",
|
|
11039
|
-
"Force the `mandatory` prop unnecessarily."
|
|
10986
|
+
"Use the `mandatory` prop to disable the dismiss button only when the user must make a critical decision or acknowledge essential information.",
|
|
10987
|
+
"Don't stack multiple modals.",
|
|
10988
|
+
"Don't use for trivial information or inline status messages. Use `<nys-alert>` instead.",
|
|
10989
|
+
"Don't use for quick hints on form fields. Use `<nys-tooltip>` instead.",
|
|
10990
|
+
"Don't force the `mandatory` prop unnecessarily."
|
|
11040
10991
|
]
|
|
11041
10992
|
}
|
|
11042
10993
|
],
|
|
@@ -11339,18 +11290,16 @@
|
|
|
11339
11290
|
"lang": "html"
|
|
11340
11291
|
}
|
|
11341
11292
|
],
|
|
11342
|
-
"
|
|
11293
|
+
"usage": [
|
|
11343
11294
|
"Use for large result sets such as search results, data tables, or directory listings where loading everything at once would hurt performance or usability.",
|
|
11344
11295
|
"Use when users need to navigate to a specific part of a result set.",
|
|
11345
11296
|
"Set `totalPages` based on your data set and page size; update `currentPage` in response to `nys-change` events.",
|
|
11346
11297
|
"Don't set `currentPage` to a value greater than `totalPages`. The component clamps the value automatically, but your application logic should prevent this.",
|
|
11347
11298
|
"Position the pagination component below the content it controls.",
|
|
11348
|
-
"Scroll users to the top of the results area when they change pages."
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
"
|
|
11352
|
-
"Use for step-based workflows where users complete tasks in order. Use `<nys-stepper>` instead.",
|
|
11353
|
-
"Use for infinite-scroll patterns such as a news feed."
|
|
11299
|
+
"Scroll users to the top of the results area when they change pages.",
|
|
11300
|
+
"Don't use when content fits on a single page (fewer than 3–4 screen heights). Show all items instead.",
|
|
11301
|
+
"Don't use for step-based workflows where users complete tasks in order. Use `<nys-stepper>` instead.",
|
|
11302
|
+
"Don't use for infinite-scroll patterns such as a news feed."
|
|
11354
11303
|
]
|
|
11355
11304
|
}
|
|
11356
11305
|
],
|
|
@@ -11593,18 +11542,16 @@
|
|
|
11593
11542
|
"lang": "html"
|
|
11594
11543
|
}
|
|
11595
11544
|
],
|
|
11596
|
-
"
|
|
11545
|
+
"usage": [
|
|
11597
11546
|
"Use a process list to explain a sequence of steps a user will take, such as how to apply for a benefit or renew a license.",
|
|
11598
11547
|
"Keep step labels short and action-oriented, and put supporting detail in the `description`.",
|
|
11599
11548
|
"Give the list an accessible name with `aria-labelledby` or `aria-label` so its purpose is clear.",
|
|
11600
11549
|
"Use `initialstep` to continue the numbering when one process is split across multiple lists.",
|
|
11601
|
-
"Keep styling consistent across all process lists on the same page."
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
"
|
|
11605
|
-
"
|
|
11606
|
-
"Number the steps yourself in the `label`. The list owns the numbering.",
|
|
11607
|
-
"Place interactive controls such as buttons inside a step."
|
|
11550
|
+
"Keep styling consistent across all process lists on the same page.",
|
|
11551
|
+
"Don't use a process list to show a user's progress through a multi-step form. Use the [Stepper](/components/stepper/) instead.",
|
|
11552
|
+
"Don't use a process list for items with no inherent order. Use the [Icon List](/components/iconlist/) or a standard list instead.",
|
|
11553
|
+
"Don't number the steps yourself in the `label`. The list owns the numbering.",
|
|
11554
|
+
"Don't place interactive controls such as buttons inside a step."
|
|
11608
11555
|
]
|
|
11609
11556
|
}
|
|
11610
11557
|
],
|
|
@@ -13745,14 +13692,12 @@
|
|
|
13745
13692
|
"code": "<nys-select label=\"Select your favorite borough\" id=\"borough\" errorMessage=\"You did not select a borough\" showError>\n<option value=\"bronx\" label=\"The Bronx\"></option>\n<option value=\"brooklyn\" label=\"Brooklyn\"></option>\n<option value=\"manhattan\" label=\"Manhattan\"></option>\n<option value=\"staten_island\" label=\"Staten Island\"></option>\n<option value=\"queens\" label=\"Queens\"></option>\n</nys-select>"
|
|
13746
13693
|
}
|
|
13747
13694
|
],
|
|
13748
|
-
"
|
|
13695
|
+
"usage": [
|
|
13749
13696
|
"Use when a user needs to select a single item from a dropdown list.",
|
|
13750
|
-
"Use the `<option>` element to define options and the native `<optgroup>` to group them."
|
|
13751
|
-
|
|
13752
|
-
|
|
13753
|
-
"
|
|
13754
|
-
"Use the custom `<nys-option>` element. It will be deprecated in the 2.0 release.",
|
|
13755
|
-
"Use `<nys-select multiple>`. Use a checkbox group instead."
|
|
13697
|
+
"Use the `<option>` element to define options and the native `<optgroup>` to group them.",
|
|
13698
|
+
"Don't use when users need to select multiple items. Use a checkbox group instead.",
|
|
13699
|
+
"Don't use the custom `<nys-option>` element. It will be deprecated in the 2.0 release.",
|
|
13700
|
+
"Don't use `<nys-select multiple>`. Use a checkbox group instead."
|
|
13756
13701
|
],
|
|
13757
13702
|
"formControl": {
|
|
13758
13703
|
"kind": "value",
|
|
@@ -13880,13 +13825,11 @@
|
|
|
13880
13825
|
"lang": "html"
|
|
13881
13826
|
}
|
|
13882
13827
|
],
|
|
13883
|
-
"
|
|
13828
|
+
"usage": [
|
|
13884
13829
|
"Use on pages with a large header, navigation, or other repeated content before the main section.",
|
|
13885
|
-
"Ensure the `href` on `<nys-skipnav>` matches the `id` of the main content container."
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
"Use if your layout already starts with the main content and there is nothing to skip over.",
|
|
13889
|
-
"Mismatch the `href` and target `id`."
|
|
13830
|
+
"Ensure the `href` on `<nys-skipnav>` matches the `id` of the main content container.",
|
|
13831
|
+
"Don't use if your layout already starts with the main content and there is nothing to skip over.",
|
|
13832
|
+
"Don't mismatch the `href` and target `id`."
|
|
13890
13833
|
]
|
|
13891
13834
|
}
|
|
13892
13835
|
],
|
|
@@ -14286,13 +14229,11 @@
|
|
|
14286
14229
|
"render": "<div class=\"nys-grid-row\">\n<nys-stepper\nid=\"stepper\"\nname=\"stepper\"\nlabel=\"Register for Design System Office Hours\"\nclass=\"nys-desktop:nys-grid-col-3\"\n>\n<nys-step label=\"Personal Details\" href=\"/nys-stepper/personal.html\"></nys-step>\n<nys-step label=\"Team Info\" selected href=\"/nys-stepper/team.html\"></nys-step>\n<nys-step label=\"Usage Survey\" current href=\"/nys-stepper/survey.html\"></nys-step>\n<nys-step label=\"Newsletter Opt-In\" href=\"/nys-stepper/newsletter.html\"></nys-step>\n<div slot=\"actions\">\n<nys-button variant=\"outline\" label=\"Save & Exit\" fullWidth></nys-button>\n</div>\n</nys-stepper>\n<div class=\"nys-desktop:nys-grid-col-9\" id=\"nys-stepper-content\">\nLoading...\n</div>\n</div>\n<script>\ndocument.addEventListener(\"DOMContentLoaded\", async () => {\nconst stepper = document.querySelector(\"nys-stepper\");\nif (stepper?.updateComplete) await stepper.updateComplete;\nconst selectedStep = document.querySelector(\"nys-step[selected]\");\nconst href = selectedStep?.getAttribute(\"href\");\nif (!href) return;\nconst res = await fetch(href);\nif (!res.ok) return;\nconst container = document.querySelector(\"#nys-stepper-content\");\nif (container) container.innerHTML = await res.text();\n});\n\ndocument.addEventListener(\"nys-step-click\", async (e) => {\nconst href = e.detail?.href;\nif (!href) return;\ne.preventDefault();\nconst res = await fetch(href);\nif (!res.ok) return;\nconst container = document.querySelector(\"#nys-stepper-content\");\nif (container) container.innerHTML = await res.text();\n});\n</script>"
|
|
14287
14230
|
}
|
|
14288
14231
|
],
|
|
14289
|
-
"
|
|
14232
|
+
"usage": [
|
|
14290
14233
|
"Use for linear, ordered forms with more than 2 sections to show progress through a multi-step process.",
|
|
14291
|
-
"Ensure users can navigate back to previous steps to review or change information."
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
"Use when a form has only 1 or 2 sections.",
|
|
14295
|
-
"Use for forms that are nonlinear and can be completed in any order."
|
|
14234
|
+
"Ensure users can navigate back to previous steps to review or change information.",
|
|
14235
|
+
"Don't use when a form has only 1 or 2 sections.",
|
|
14236
|
+
"Don't use for forms that are nonlinear and can be completed in any order."
|
|
14296
14237
|
]
|
|
14297
14238
|
}
|
|
14298
14239
|
],
|
|
@@ -14838,17 +14779,15 @@
|
|
|
14838
14779
|
"lang": "html"
|
|
14839
14780
|
}
|
|
14840
14781
|
],
|
|
14841
|
-
"
|
|
14782
|
+
"usage": [
|
|
14842
14783
|
"Use to organize related content into distinct sections within the same context (e.g., Overview, Specs, Reviews), especially when a page would otherwise be overwhelmingly long.",
|
|
14843
14784
|
"Keep tab labels short and clear, limited to 2–9 tabs and one row. Avoid wrapping.",
|
|
14844
|
-
"Only one tab should ever be in the active state."
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
"
|
|
14848
|
-
"
|
|
14849
|
-
"
|
|
14850
|
-
"Nest tabs inside other tabs.",
|
|
14851
|
-
"Use tabs for page navigation."
|
|
14785
|
+
"Only one tab should ever be in the active state.",
|
|
14786
|
+
"Don't use when users need to compare information across sections simultaneously. Tabs require clicking back and forth.",
|
|
14787
|
+
"Don't use for linear, step-by-step processes. Use a stepper instead.",
|
|
14788
|
+
"Don't use when you only have two small pieces of content. Display them consecutively instead.",
|
|
14789
|
+
"Don't nest tabs inside other tabs.",
|
|
14790
|
+
"Don't use tabs for page navigation."
|
|
14852
14791
|
]
|
|
14853
14792
|
}
|
|
14854
14793
|
],
|
|
@@ -15391,14 +15330,12 @@
|
|
|
15391
15330
|
"lang": "html"
|
|
15392
15331
|
}
|
|
15393
15332
|
],
|
|
15394
|
-
"
|
|
15395
|
-
"Use to display tabular data such as statistical information or directories of locations and resources with consistent structure."
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
"
|
|
15399
|
-
"
|
|
15400
|
-
"Use when cell content is long-form; table cells should be brief and scannable. If you need multiple bullet points or paragraphs in a cell, consider page headers or an accordion instead.",
|
|
15401
|
-
"Add `rowspan` or `colspan` with the `sortable` property."
|
|
15333
|
+
"usage": [
|
|
15334
|
+
"Use to display tabular data such as statistical information or directories of locations and resources with consistent structure.",
|
|
15335
|
+
"Don't use in place of a layout grid. Table content should follow a consistent structure using headers and logical columns and rows.",
|
|
15336
|
+
"Don't use for non-tabular content. Consider definition lists or hierarchical lists instead.",
|
|
15337
|
+
"Don't use when cell content is long-form; table cells should be brief and scannable. If you need multiple bullet points or paragraphs in a cell, consider page headers or an accordion instead.",
|
|
15338
|
+
"Don't add `rowspan` or `colspan` with the `sortable` property."
|
|
15402
15339
|
]
|
|
15403
15340
|
}
|
|
15404
15341
|
],
|
|
@@ -16092,12 +16029,10 @@
|
|
|
16092
16029
|
"lang": "html"
|
|
16093
16030
|
}
|
|
16094
16031
|
],
|
|
16095
|
-
"
|
|
16096
|
-
"Use to collect multiple lines of open-ended text input (e.g., comments, descriptions, feedback)."
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
"Use for short or single-line input. Use `<nys-textinput>` instead.",
|
|
16100
|
-
"Use when input should be selected from predefined options. Use `<nys-select>`, `<nys-radiobutton>`, or `<nys-checkbox>` instead."
|
|
16032
|
+
"usage": [
|
|
16033
|
+
"Use to collect multiple lines of open-ended text input (e.g., comments, descriptions, feedback).",
|
|
16034
|
+
"Don't use for short or single-line input. Use `<nys-textinput>` instead.",
|
|
16035
|
+
"Don't use when input should be selected from predefined options. Use `<nys-select>`, `<nys-radiobutton>`, or `<nys-checkbox>` instead."
|
|
16101
16036
|
],
|
|
16102
16037
|
"formControl": {
|
|
16103
16038
|
"kind": "value",
|
|
@@ -16923,19 +16858,22 @@
|
|
|
16923
16858
|
"title": "Suffix Button",
|
|
16924
16859
|
"code": "<nys-textinput id=\"search-demo\" type=\"search\" placeholder=\"Search\">\n<nys-button\nslot=\"endButton\"\nariaLabel=\"Search\"\nprefixIcon=\"search\"\nonclick=\"alert('searching for: ' + document.getElementById('search-demo').value)\"\n></nys-button>\n</nys-textinput>",
|
|
16925
16860
|
"lang": "html"
|
|
16861
|
+
},
|
|
16862
|
+
{
|
|
16863
|
+
"title": "Suffix Button (RTL)",
|
|
16864
|
+
"code": "<div dir=\"rtl\">\n<nys-textinput id=\"search-demo\" type=\"search\" placeholder=\"Search\">\n<nys-button\nslot=\"endButton\"\nariaLabel=\"Search\"\nprefixIcon=\"search\"\nonclick=\"alert('searching for: ' + document.getElementById('search-demo').value)\"\n></nys-button>\n</nys-textinput>\n</div>",
|
|
16865
|
+
"lang": "html"
|
|
16926
16866
|
}
|
|
16927
16867
|
],
|
|
16928
|
-
"
|
|
16868
|
+
"usage": [
|
|
16929
16869
|
"Use to collect short, single-line, open-ended text input (e.g., names, email addresses, or short descriptions).",
|
|
16930
16870
|
"Use clear, concise labels that describe the expected input.",
|
|
16931
16871
|
"Add helper text with the `description` property for context.",
|
|
16932
|
-
"Validate input live to catch errors early (e.g., invalid email formats)."
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
"
|
|
16936
|
-
"
|
|
16937
|
-
"Overwhelm users with too many fields. Group related inputs.",
|
|
16938
|
-
"Use placeholders as labels."
|
|
16872
|
+
"Validate input live to catch errors early (e.g., invalid email formats).",
|
|
16873
|
+
"Don't use for long or multi-line responses. Use `<nys-textarea>` instead.",
|
|
16874
|
+
"Don't use when input can be chosen from predefined options. Use `<nys-select>`, `<nys-radiobutton>`, or `<nys-checkbox>` instead.",
|
|
16875
|
+
"Don't overwhelm users with too many fields. Group related inputs.",
|
|
16876
|
+
"Don't use placeholders as labels."
|
|
16939
16877
|
],
|
|
16940
16878
|
"formControl": {
|
|
16941
16879
|
"kind": "value",
|
|
@@ -17340,17 +17278,15 @@
|
|
|
17340
17278
|
"lang": "html"
|
|
17341
17279
|
}
|
|
17342
17280
|
],
|
|
17343
|
-
"
|
|
17281
|
+
"usage": [
|
|
17344
17282
|
"Provide a clear label and optional description to explain what the toggle controls.",
|
|
17345
17283
|
"Ensure the page clearly reflects the toggle's on/off state through visible changes.",
|
|
17346
|
-
"Use when the state change will be implemented immediately."
|
|
17347
|
-
|
|
17348
|
-
|
|
17349
|
-
"
|
|
17350
|
-
"
|
|
17351
|
-
"
|
|
17352
|
-
"Overuse for minor settings that don't affect the user experience.",
|
|
17353
|
-
"Hide labels unless an accessible alternative is in place."
|
|
17284
|
+
"Use when the state change will be implemented immediately.",
|
|
17285
|
+
"Don't use for forms where immediate action isn't expected. Use `<nys-checkbox>` instead.",
|
|
17286
|
+
"Don't use for selecting one or more options from a list. Use `<nys-checkbox>` or `<nys-radiobutton>` instead.",
|
|
17287
|
+
"Don't use for complex or multi-state choices.",
|
|
17288
|
+
"Don't overuse for minor settings that don't affect the user experience.",
|
|
17289
|
+
"Don't hide labels unless an accessible alternative is in place."
|
|
17354
17290
|
],
|
|
17355
17291
|
"formControl": {
|
|
17356
17292
|
"kind": "checked",
|
|
@@ -17790,18 +17726,16 @@
|
|
|
17790
17726
|
"lang": "html"
|
|
17791
17727
|
}
|
|
17792
17728
|
],
|
|
17793
|
-
"
|
|
17729
|
+
"usage": [
|
|
17794
17730
|
"Use to provide supplemental hints on form fields (e.g., explaining what \"FEIN\" means) or on icon buttons that need additional context.",
|
|
17795
17731
|
"Use on NYSDS form components (`<nys-textinput>`, `<nys-select>`, `<nys-checkbox>`, etc.) where the tooltip automatically renders as a hint icon next to the label.",
|
|
17796
17732
|
"Keep tooltip content brief and helpful.",
|
|
17797
|
-
"Position tooltips so they don't block related content."
|
|
17798
|
-
|
|
17799
|
-
|
|
17800
|
-
"
|
|
17801
|
-
"
|
|
17802
|
-
"
|
|
17803
|
-
"Rely on tooltips when you have room to provide inline explanation.",
|
|
17804
|
-
"Use when mobile users are a primary audience. Tooltips rely on hover, which is unavailable on touch devices."
|
|
17733
|
+
"Position tooltips so they don't block related content.",
|
|
17734
|
+
"Don't use for information critical to task completion. Use inline description text instead, as tooltips are easy to miss.",
|
|
17735
|
+
"Don't use when content is long or includes links, actions, or structured content.",
|
|
17736
|
+
"Don't use interactive elements such as links or buttons inside a tooltip.",
|
|
17737
|
+
"Don't rely on tooltips when you have room to provide inline explanation.",
|
|
17738
|
+
"Don't use when mobile users are a primary audience. Tooltips rely on hover, which is unavailable on touch devices."
|
|
17805
17739
|
]
|
|
17806
17740
|
}
|
|
17807
17741
|
],
|
|
@@ -17843,6 +17777,31 @@
|
|
|
17843
17777
|
"kind": "javascript-module",
|
|
17844
17778
|
"path": "packages/nys-unavfooter/src/nys-unavfooter.ts",
|
|
17845
17779
|
"declarations": [
|
|
17780
|
+
{
|
|
17781
|
+
"kind": "variable",
|
|
17782
|
+
"name": "NYS_CTA_URL",
|
|
17783
|
+
"type": {
|
|
17784
|
+
"text": "string"
|
|
17785
|
+
},
|
|
17786
|
+
"default": "\"https://alerts-cta.static-assets.ny.gov/cta.json\"",
|
|
17787
|
+
"description": "Statewide CTA endpoint. Sites don't opt in or out and never author the\ncontent, so a CTA reads identically everywhere it appears.\n\nWhich one is read is chosen by the page's `<body data-environment=\"...\">`:\n`dev` → development, `stage` → stage, anything else (or absent) → production.\n\nPRODUCTION: https://alerts-cta.static-assets.ny.gov/cta.json\n\nDEVELOPMENT: https://alerts-cta-dev.static-assets.ny.gov/cta.json\n\nSTAGE: https://alerts-cta-stage.static-assets.ny.gov/cta.json"
|
|
17788
|
+
},
|
|
17789
|
+
{
|
|
17790
|
+
"kind": "variable",
|
|
17791
|
+
"name": "NYS_CTA_URL_DEV",
|
|
17792
|
+
"type": {
|
|
17793
|
+
"text": "string"
|
|
17794
|
+
},
|
|
17795
|
+
"default": "\"https://alerts-cta-dev.static-assets.ny.gov/cta.json\""
|
|
17796
|
+
},
|
|
17797
|
+
{
|
|
17798
|
+
"kind": "variable",
|
|
17799
|
+
"name": "NYS_CTA_URL_STAGE",
|
|
17800
|
+
"type": {
|
|
17801
|
+
"text": "string"
|
|
17802
|
+
},
|
|
17803
|
+
"default": "\"https://alerts-cta-stage.static-assets.ny.gov/cta.json\""
|
|
17804
|
+
},
|
|
17846
17805
|
{
|
|
17847
17806
|
"kind": "class",
|
|
17848
17807
|
"description": "Universal NYS footer with logo and statewide navigation links. Required on all NYS sites.\n\nPlace as the last element before `</body>`. Displays NY.gov logo and links to Agencies,\nApp Directory, Counties, Events, Programs, and Services. No configuration needed.",
|
|
@@ -17864,6 +17823,26 @@
|
|
|
17864
17823
|
"text": "string"
|
|
17865
17824
|
}
|
|
17866
17825
|
},
|
|
17826
|
+
{
|
|
17827
|
+
"kind": "field",
|
|
17828
|
+
"name": "_cta",
|
|
17829
|
+
"type": {
|
|
17830
|
+
"text": "FeedCta | null"
|
|
17831
|
+
},
|
|
17832
|
+
"privacy": "private",
|
|
17833
|
+
"default": "null",
|
|
17834
|
+
"description": "The published CTA, or `null` when nothing is published (or the feed failed)."
|
|
17835
|
+
},
|
|
17836
|
+
{
|
|
17837
|
+
"kind": "field",
|
|
17838
|
+
"name": "_ctaRequest",
|
|
17839
|
+
"type": {
|
|
17840
|
+
"text": "AbortController | null"
|
|
17841
|
+
},
|
|
17842
|
+
"privacy": "private",
|
|
17843
|
+
"default": "null",
|
|
17844
|
+
"description": "In-flight feed request, aborted if the footer leaves the page first."
|
|
17845
|
+
},
|
|
17867
17846
|
{
|
|
17868
17847
|
"kind": "method",
|
|
17869
17848
|
"name": "_getNysLogo",
|
|
@@ -17879,6 +17858,43 @@
|
|
|
17879
17858
|
"privacy": "private",
|
|
17880
17859
|
"description": "The contentinfo's accessible name. A blank override would put the page back\nwhere #1795 found it — two unnamed contentinfo landmarks — so it falls back\nto the default.",
|
|
17881
17860
|
"readonly": true
|
|
17861
|
+
},
|
|
17862
|
+
{
|
|
17863
|
+
"kind": "method",
|
|
17864
|
+
"name": "_loadCta",
|
|
17865
|
+
"privacy": "private",
|
|
17866
|
+
"description": "Statewide CTA\n--------------------------------------------------------------------------\nContent comes from the CTA feed, never from the consuming page, so the same\ncall to action renders identically everywhere it is shown. A missing,\nmalformed, or unreachable feed leaves the footer untouched — a CTA failing\nto load must never take a site's navigation down with it."
|
|
17867
|
+
},
|
|
17868
|
+
{
|
|
17869
|
+
"kind": "method",
|
|
17870
|
+
"name": "_readCtaFeed",
|
|
17871
|
+
"privacy": "private",
|
|
17872
|
+
"parameters": [
|
|
17873
|
+
{
|
|
17874
|
+
"name": "request",
|
|
17875
|
+
"type": {
|
|
17876
|
+
"text": "AbortController"
|
|
17877
|
+
}
|
|
17878
|
+
},
|
|
17879
|
+
{
|
|
17880
|
+
"name": "url",
|
|
17881
|
+
"type": {
|
|
17882
|
+
"text": "string"
|
|
17883
|
+
}
|
|
17884
|
+
}
|
|
17885
|
+
],
|
|
17886
|
+
"description": "Fetches the CTA feed. Resolves to null on any failure."
|
|
17887
|
+
},
|
|
17888
|
+
{
|
|
17889
|
+
"kind": "method",
|
|
17890
|
+
"name": "_syncCtaButtonAria",
|
|
17891
|
+
"privacy": "private",
|
|
17892
|
+
"description": "`nys-button` has no `ariaLabel` prop, and the host itself carries no role\n(ARIA placed there never reaches the real control) — so a `textAria` that\ndiffers from the button's visible `buttonText` has to be written directly\nonto the real inner `<button>`/`<a>` once nys-button renders, the same way\n`nys-unavheader` syncs ARIA onto its own buttons."
|
|
17893
|
+
},
|
|
17894
|
+
{
|
|
17895
|
+
"kind": "method",
|
|
17896
|
+
"name": "_renderCta",
|
|
17897
|
+
"privacy": "private"
|
|
17882
17898
|
}
|
|
17883
17899
|
],
|
|
17884
17900
|
"attributes": [
|
|
@@ -17908,20 +17924,42 @@
|
|
|
17908
17924
|
"lang": "html"
|
|
17909
17925
|
}
|
|
17910
17926
|
],
|
|
17911
|
-
"
|
|
17927
|
+
"usage": [
|
|
17912
17928
|
"Place the `<nys-unavfooter>` as the last element on every public-facing page, immediately after `<nys-globalfooter>`.",
|
|
17913
17929
|
"Use on every page of every NYS site and application. This component is required per NYS web policy, including on error pages, login screens, and landing pages.",
|
|
17914
17930
|
"Place as the very last element on the page, immediately after `<nys-globalfooter>`.",
|
|
17915
|
-
"Use as-is with no configuration. The component handles its own content and styling."
|
|
17916
|
-
],
|
|
17917
|
-
"usagedonts": [
|
|
17931
|
+
"Use as-is with no configuration. The component handles its own content and styling.",
|
|
17918
17932
|
"Don't use on back office applications or internal sites that are not public-facing.",
|
|
17919
|
-
"
|
|
17920
|
-
"
|
|
17933
|
+
"Don't place anywhere other than the absolute bottom of the page.",
|
|
17934
|
+
"Don't customize, restyle, or override the component's content or appearance. Consistency across all state sites is the purpose of this component."
|
|
17921
17935
|
]
|
|
17922
17936
|
}
|
|
17923
17937
|
],
|
|
17924
17938
|
"exports": [
|
|
17939
|
+
{
|
|
17940
|
+
"kind": "js",
|
|
17941
|
+
"name": "NYS_CTA_URL",
|
|
17942
|
+
"declaration": {
|
|
17943
|
+
"name": "NYS_CTA_URL",
|
|
17944
|
+
"module": "packages/nys-unavfooter/src/nys-unavfooter.ts"
|
|
17945
|
+
}
|
|
17946
|
+
},
|
|
17947
|
+
{
|
|
17948
|
+
"kind": "js",
|
|
17949
|
+
"name": "NYS_CTA_URL_DEV",
|
|
17950
|
+
"declaration": {
|
|
17951
|
+
"name": "NYS_CTA_URL_DEV",
|
|
17952
|
+
"module": "packages/nys-unavfooter/src/nys-unavfooter.ts"
|
|
17953
|
+
}
|
|
17954
|
+
},
|
|
17955
|
+
{
|
|
17956
|
+
"kind": "js",
|
|
17957
|
+
"name": "NYS_CTA_URL_STAGE",
|
|
17958
|
+
"declaration": {
|
|
17959
|
+
"name": "NYS_CTA_URL_STAGE",
|
|
17960
|
+
"module": "packages/nys-unavfooter/src/nys-unavfooter.ts"
|
|
17961
|
+
}
|
|
17962
|
+
},
|
|
17925
17963
|
{
|
|
17926
17964
|
"kind": "custom-element-definition",
|
|
17927
17965
|
"name": "nys-unavfooter",
|
|
@@ -17966,7 +18004,23 @@
|
|
|
17966
18004
|
"text": "string"
|
|
17967
18005
|
},
|
|
17968
18006
|
"default": "\"https://alerts-cta.static-assets.ny.gov/alerts.json\"",
|
|
17969
|
-
"description": "Statewide alert endpoint, read once per page load. Sites don't opt in or out and\nnever author the content, so an alert reads identically everywhere it appears.\n\nProduction is https://alerts-cta.static-assets.ny.gov/alerts.json.\
|
|
18007
|
+
"description": "Statewide alert endpoint, read once per page load. Sites don't opt in or out and\nnever author the content, so an alert reads identically everywhere it appears.\n\nWhich one is read is chosen by the page's `<body data-environment=\"...\">`:\n`dev` → development, `stage` → stage, anything else (or absent) → production.\n\nProduction is https://alerts-cta.static-assets.ny.gov/alerts.json.\nDevelopment is https://alerts-cta-dev.static-assets.ny.gov/alerts.json\nStage is https://alerts-cta-stage.static-assets.ny.gov/alerts.json"
|
|
18008
|
+
},
|
|
18009
|
+
{
|
|
18010
|
+
"kind": "variable",
|
|
18011
|
+
"name": "NYS_ALERT_URL_DEV",
|
|
18012
|
+
"type": {
|
|
18013
|
+
"text": "string"
|
|
18014
|
+
},
|
|
18015
|
+
"default": "\"https://alerts-cta-dev.static-assets.ny.gov/alerts.json\""
|
|
18016
|
+
},
|
|
18017
|
+
{
|
|
18018
|
+
"kind": "variable",
|
|
18019
|
+
"name": "NYS_ALERT_URL_STAGE",
|
|
18020
|
+
"type": {
|
|
18021
|
+
"text": "string"
|
|
18022
|
+
},
|
|
18023
|
+
"default": "\"https://alerts-cta-stage.static-assets.ny.gov/alerts.json\""
|
|
17970
18024
|
},
|
|
17971
18025
|
{
|
|
17972
18026
|
"kind": "class",
|
|
@@ -18049,6 +18103,16 @@
|
|
|
18049
18103
|
"description": "The URL endpoint of the search, make sure to include the query param.",
|
|
18050
18104
|
"attribute": "searchUrl"
|
|
18051
18105
|
},
|
|
18106
|
+
{
|
|
18107
|
+
"kind": "field",
|
|
18108
|
+
"name": "translateKey",
|
|
18109
|
+
"type": {
|
|
18110
|
+
"text": "string"
|
|
18111
|
+
},
|
|
18112
|
+
"default": "\"\"",
|
|
18113
|
+
"description": "Localize project key. If provided, the component will load and initialize LocalizeJS automatically.",
|
|
18114
|
+
"attribute": "translateKey"
|
|
18115
|
+
},
|
|
18052
18116
|
{
|
|
18053
18117
|
"kind": "field",
|
|
18054
18118
|
"name": "landmarkLabel",
|
|
@@ -18065,8 +18129,8 @@
|
|
|
18065
18129
|
"type": {
|
|
18066
18130
|
"text": "Language[]"
|
|
18067
18131
|
},
|
|
18068
|
-
"default": "[ { code: \"en\", label: \"English\" }, { code: \"es\", label: \"Español\" }, { code: \"zh\", label: \"中文\" }, { code: \"zh-
|
|
18069
|
-
"description": "The list of languages this site can be translated to, default to use
|
|
18132
|
+
"default": "[ { code: \"en\", label: \"English\", nativeText: \"English\" }, { code: \"es\", label: \"Español\", nativeText: \"Spanish\", disclaimer: `Las traducciones automáticas no son perfectas y no pretenden reemplazar a los traductores humanos. Es posible que algunas páginas o parte del contenido no estén traducidos de forma precisa debido a las limitaciones del software de traducción. <a href=\"https://ny.gov/web-translation-services\">Lea la exención de responsabilidad completa</a>`, }, { code: \"zh-cn\", label: \"中文\", nativeText: \"Chinese\", disclaimer: `自動翻譯並不完美、也不是為了取代人工翻譯。由於翻譯軟體限制、某些頁面或內容可能無法準確翻譯。<a href=\"https://ny.gov/web-translation-services\">閱讀完整的免責聲明</a>`, }, { code: \"zh-hk\", label: \"繁體中文\", nativeText: \"Traditional Chinese\", disclaimer: `自動翻譯並不完美、也不是為了取代人工翻譯。由於翻譯軟體限制、某些頁面或內容可能無法準確翻譯。<a href=\"https://ny.gov/web-translation-services\">閱讀完整的免責聲明</a>`, }, { code: \"yi\", label: \"יידיש\", nativeText: \"Yiddish\", disclaimer: `קיין איין אויטאמאטישע איבערזעצונג איז נישט אינגאנצן פארלעסליך, און עס איז נישט געמאכט צו ערזעצן א מענטשליכע איבערזעצער. טייל בלעטער אדער אינהאלט זענען מעגליך נישט פונקטליך איבערגעזעצט צוליב די באגרעניצטע מעגליכקייטן פון די איבערזעצונג טעכנאלאגיע. <a href=\"https://ny.gov/web-translation-services\">לייענט די פולע אויסקלארונג</a>`, }, { code: \"ru\", label: \"Русский\", nativeText: \"Russian\", disclaimer: `Автоматический перевод не является безупречным и не может заменить переводчика-человека. Некоторые страницы или их содержимое могут быть переведены неточно из-за ограничений программного обеспечения для перевода. <a href=\"https://ny.gov/web-translation-services\">Ознакомьтесь с полным текстом отказа от ответственности</a>`, }, { code: \"bn\", label: \"বাংলা\", nativeText: \"Bengali\", disclaimer: `কোন স্বয়ংক্রিয় অনুবাদ নিখুঁत নয়, না এর উদ্দেশ্য মানুষ অনুবাদকদের প্রতিস্থাপন করা। অনুবাদ সফ্টওয়্যারের সীমাবদ্ধতার কারণে কিছু পৃষ্ঠা বা বিষয়বস্তু সঠিকভাবে অনুবাদ নাও করা হতে পারে। <a href=\"https://ny.gov/web-translation-services\">اসম্পূর্ণ দায়-পরিত্যাগকারী বিজ্ঞপ্তিটি পড়ুন</a>`, }, { code: \"ko\", label: \"한국어\", nativeText: \"Korean\", disclaimer: `자동 번역은 완벽하지 않으며, 번역가를 대체하기 위해 의도된 것도 아닙니다. 번역 소프트웨어의 한계로 인해 일부 페이지 또는 내용이 정확하게 번역되지 않을 수 있습니다 <a href=\"https://ny.gov/web-translation-services\">면책 조항 전문 읽기</a>`, }, { code: \"ht\", label: \"Kreyòl Ayisyen\", nativeText: \"Haitian Creole\", disclaimer: `Okenn tradiksyon otomatik pa pafè, ni pa gen entansyon pou ranplase tradiktè imen. Gen kèk paj oswa kontni ki ka pa tradui avèk presizyon akòz limit nan lojisyèl tradiksyon an. <a href=\"https://ny.gov/web-translation-services\">Li Tout Avi sou Dechaj Responsabilite a</a>`, }, { code: \"it\", label: \"Italiano\", nativeText: \"Italian\", disclaimer: `Nessuna traduzione automatica è perfetta, né è destinata a sostituire i traduttori umani. Alcune pagine o contenuti potrebbero non essere tradotti accuratamente a causa delle limitazioni del software di traduzione. <a href=\"https://ny.gov/web-translation-services\">Leggere l’intera liberatoria</a>`, }, { code: \"ar\", label: \"العربية\", nativeText: \"Arabic\", disclaimer: `الترجمة الآلية لا تكون مثالية بأي حال من الأحوال، ولا يقصد بها أن تحل محل المترجمين من بني البشر. قد تكون ترجمة بعض المحتويات أو الصفحات غير دقيقة بسبب محددات برمجية الترجمة. <a href=\"https://ny.gov/web-translation-services\">اقرأ بيان إخلاء المسؤولية بالكامل</a>`, }, { code: \"pl\", label: \"Polski\", nativeText: \"Polish\", disclaimer: `Żadne tłumaczenie automatyczne nie jest doskonałe, ani też nie ma na celu zastąpienia tłumaczeń wykonywanych przez ludzi. Niektóre strony lub treści mogą być niedokładnie przetłumaczone z powodu ograniczeń oprogramowania do wykonywania tłumaczeń <a href=\"https://ny.gov/web-translation-services\">Przeczytaj pełną klauzulę wyłączenia odpowiedzialności</a>`, }, { code: \"fr\", label: \"Français\", nativeText: \"French\", disclaimer: `Aucune traduction automatique n'est parfaite, ni n'est destinée à remplacer les traducteurs humains. Certaines pages ou du contenu peuvent ne pas être traduits exactement en raison des limitations du logiciel de traduction. <a href=\"https://ny.gov/web-translation-services\">Lire entièrement la clause de non-responsabilité</a>`, }, { code: \"ur\", label: \"اردو\", nativeText: \"Urdu\", disclaimer: `کوئی بھی خود کار ترجمہ بالکل درست نہیں ہوتا ہے، نہ ہی اس کا مقصد انسانی ترجمہ نگاروں کی جگہ لینا ہوتا ہے۔ ممکن ہے کہ ترجمہ سافٹ ویئر کی محدود صلاحیتوں کی وجہ سے کچھ صفحات یا مواد کا ترجمہ بالکل درست نہ ہو پائے۔ <a href=\"https://ny.gov/web-translation-services\">مکمل براءت نامہ پڑھیں</a>`, }, ]",
|
|
18133
|
+
"description": "The list of languages this site can be translated to, default to use Localize",
|
|
18070
18134
|
"attribute": "languages"
|
|
18071
18135
|
},
|
|
18072
18136
|
{
|
|
@@ -18139,12 +18203,6 @@
|
|
|
18139
18203
|
"privacy": "private",
|
|
18140
18204
|
"description": "Closes the menu and puts focus back on the trigger. The open list is the only\nthing keeping the language buttons focusable, so closing it while focus sits on\none would drop focus to the top of the page (WCAG 2.4.3)."
|
|
18141
18205
|
},
|
|
18142
|
-
{
|
|
18143
|
-
"kind": "method",
|
|
18144
|
-
"name": "_syncTranslateTriggerAria",
|
|
18145
|
-
"privacy": "private",
|
|
18146
|
-
"description": "`nys-button` renders the real `<button>` inside its own shadow root, so an\n`aria-expanded` written on the host never reaches the element that carries the\nbutton role — assistive tech was never told the translate menu collapses. Mirror\nthe state onto the inner control, the same way `nys-dropdownmenu` does for its\ntrigger (WCAG 4.1.2)."
|
|
18147
|
-
},
|
|
18148
18206
|
{
|
|
18149
18207
|
"kind": "method",
|
|
18150
18208
|
"name": "_languageOptions",
|
|
@@ -18176,16 +18234,103 @@
|
|
|
18176
18234
|
],
|
|
18177
18235
|
"description": "Moves both focus and the tab stop to an option, wrapping at either end. Index\n-1 is the last option, so \"previous from the first\" and \"End\" are the same call."
|
|
18178
18236
|
},
|
|
18237
|
+
{
|
|
18238
|
+
"kind": "method",
|
|
18239
|
+
"name": "_stripLanguagePrefix",
|
|
18240
|
+
"privacy": "private",
|
|
18241
|
+
"return": {
|
|
18242
|
+
"type": {
|
|
18243
|
+
"text": "string"
|
|
18244
|
+
}
|
|
18245
|
+
},
|
|
18246
|
+
"parameters": [
|
|
18247
|
+
{
|
|
18248
|
+
"name": "hostname",
|
|
18249
|
+
"type": {
|
|
18250
|
+
"text": "string"
|
|
18251
|
+
}
|
|
18252
|
+
}
|
|
18253
|
+
],
|
|
18254
|
+
"description": "Removes a leading language-code subdomain label (e.g. \"es.\") if present."
|
|
18255
|
+
},
|
|
18256
|
+
{
|
|
18257
|
+
"kind": "method",
|
|
18258
|
+
"name": "_smartlingUrl",
|
|
18259
|
+
"privacy": "private",
|
|
18260
|
+
"return": {
|
|
18261
|
+
"type": {
|
|
18262
|
+
"text": "string"
|
|
18263
|
+
}
|
|
18264
|
+
},
|
|
18265
|
+
"parameters": [
|
|
18266
|
+
{
|
|
18267
|
+
"name": "languageCode",
|
|
18268
|
+
"type": {
|
|
18269
|
+
"text": "string"
|
|
18270
|
+
}
|
|
18271
|
+
}
|
|
18272
|
+
],
|
|
18273
|
+
"description": "Builds the Smartling redirect URL for `languageCode`, preserving path/query/hash."
|
|
18274
|
+
},
|
|
18275
|
+
{
|
|
18276
|
+
"kind": "method",
|
|
18277
|
+
"name": "_languageHref",
|
|
18278
|
+
"privacy": "private",
|
|
18279
|
+
"return": {
|
|
18280
|
+
"type": {
|
|
18281
|
+
"text": "string | undefined"
|
|
18282
|
+
}
|
|
18283
|
+
},
|
|
18284
|
+
"parameters": [
|
|
18285
|
+
{
|
|
18286
|
+
"name": "language",
|
|
18287
|
+
"type": {
|
|
18288
|
+
"text": "Language"
|
|
18289
|
+
}
|
|
18290
|
+
}
|
|
18291
|
+
],
|
|
18292
|
+
"description": "The navigation target for a language option's `href`, or `undefined` when\nthe option isn't a link — Localize handles that case via `setLanguage`\nfrom a click on a plain button instead.\n\nAn explicit per-language `url` always wins, even with a `translateKey`\nconfigured. Otherwise: no `translateKey` means Localize can't run at all,\nso every option is a Smartling subdomain link."
|
|
18293
|
+
},
|
|
18294
|
+
{
|
|
18295
|
+
"kind": "method",
|
|
18296
|
+
"name": "_initGoogletagmanager",
|
|
18297
|
+
"privacy": "private"
|
|
18298
|
+
},
|
|
18299
|
+
{
|
|
18300
|
+
"kind": "method",
|
|
18301
|
+
"name": "_initLocalize",
|
|
18302
|
+
"privacy": "private"
|
|
18303
|
+
},
|
|
18179
18304
|
{
|
|
18180
18305
|
"kind": "method",
|
|
18181
18306
|
"name": "_toggleSearchDropdown",
|
|
18182
18307
|
"privacy": "private"
|
|
18183
18308
|
},
|
|
18309
|
+
{
|
|
18310
|
+
"kind": "method",
|
|
18311
|
+
"name": "_updateTranslateDisclaimer",
|
|
18312
|
+
"privacy": "private",
|
|
18313
|
+
"parameters": [
|
|
18314
|
+
{
|
|
18315
|
+
"name": "languageCode",
|
|
18316
|
+
"type": {
|
|
18317
|
+
"text": "string"
|
|
18318
|
+
}
|
|
18319
|
+
}
|
|
18320
|
+
],
|
|
18321
|
+
"description": "Shows, replaces, or removes the translation disclaimer banner for the\ngiven language code.\n\nCalled only from `_handleLanguageSelect`, i.e. only as the direct result of\na user clicking a language in the dropdown. Deliberately not wired to\nLocalize's own \"setLanguage\" event, which also fires for reasons that\naren't a user picking a language on this page load — restoring a\nremembered language chief among them — and the disclaimer must not appear\nunprompted."
|
|
18322
|
+
},
|
|
18184
18323
|
{
|
|
18185
18324
|
"kind": "method",
|
|
18186
18325
|
"name": "_handleLanguageSelect",
|
|
18187
18326
|
"privacy": "private",
|
|
18188
18327
|
"parameters": [
|
|
18328
|
+
{
|
|
18329
|
+
"name": "e",
|
|
18330
|
+
"type": {
|
|
18331
|
+
"text": "Event"
|
|
18332
|
+
}
|
|
18333
|
+
},
|
|
18189
18334
|
{
|
|
18190
18335
|
"name": "language",
|
|
18191
18336
|
"type": {
|
|
@@ -18405,6 +18550,15 @@
|
|
|
18405
18550
|
"privacy": "private",
|
|
18406
18551
|
"description": "The banner's accessible name. A blank override would put the page back where\n#1795 found it — two unnamed banners — so it falls back to the default.",
|
|
18407
18552
|
"readonly": true
|
|
18553
|
+
},
|
|
18554
|
+
{
|
|
18555
|
+
"kind": "field",
|
|
18556
|
+
"name": "_locale",
|
|
18557
|
+
"type": {
|
|
18558
|
+
"text": "string"
|
|
18559
|
+
},
|
|
18560
|
+
"privacy": "private",
|
|
18561
|
+
"readonly": true
|
|
18408
18562
|
}
|
|
18409
18563
|
],
|
|
18410
18564
|
"events": [
|
|
@@ -18487,6 +18641,15 @@
|
|
|
18487
18641
|
"description": "The URL endpoint of the search, make sure to include the query param.",
|
|
18488
18642
|
"fieldName": "searchUrl"
|
|
18489
18643
|
},
|
|
18644
|
+
{
|
|
18645
|
+
"name": "translateKey",
|
|
18646
|
+
"type": {
|
|
18647
|
+
"text": "string"
|
|
18648
|
+
},
|
|
18649
|
+
"default": "\"\"",
|
|
18650
|
+
"description": "Localize project key. If provided, the component will load and initialize LocalizeJS automatically.",
|
|
18651
|
+
"fieldName": "translateKey"
|
|
18652
|
+
},
|
|
18490
18653
|
{
|
|
18491
18654
|
"name": "landmarkLabel",
|
|
18492
18655
|
"default": "DEFAULT_LANDMARK_LABEL",
|
|
@@ -18498,8 +18661,8 @@
|
|
|
18498
18661
|
"type": {
|
|
18499
18662
|
"text": "Language[]"
|
|
18500
18663
|
},
|
|
18501
|
-
"default": "[ { code: \"en\", label: \"English\" }, { code: \"es\", label: \"Español\" }, { code: \"zh\", label: \"中文\" }, { code: \"zh-
|
|
18502
|
-
"description": "The list of languages this site can be translated to, default to use
|
|
18664
|
+
"default": "[ { code: \"en\", label: \"English\", nativeText: \"English\" }, { code: \"es\", label: \"Español\", nativeText: \"Spanish\", disclaimer: `Las traducciones automáticas no son perfectas y no pretenden reemplazar a los traductores humanos. Es posible que algunas páginas o parte del contenido no estén traducidos de forma precisa debido a las limitaciones del software de traducción. <a href=\"https://ny.gov/web-translation-services\">Lea la exención de responsabilidad completa</a>`, }, { code: \"zh-cn\", label: \"中文\", nativeText: \"Chinese\", disclaimer: `自動翻譯並不完美、也不是為了取代人工翻譯。由於翻譯軟體限制、某些頁面或內容可能無法準確翻譯。<a href=\"https://ny.gov/web-translation-services\">閱讀完整的免責聲明</a>`, }, { code: \"zh-hk\", label: \"繁體中文\", nativeText: \"Traditional Chinese\", disclaimer: `自動翻譯並不完美、也不是為了取代人工翻譯。由於翻譯軟體限制、某些頁面或內容可能無法準確翻譯。<a href=\"https://ny.gov/web-translation-services\">閱讀完整的免責聲明</a>`, }, { code: \"yi\", label: \"יידיש\", nativeText: \"Yiddish\", disclaimer: `קיין איין אויטאמאטישע איבערזעצונג איז נישט אינגאנצן פארלעסליך, און עס איז נישט געמאכט צו ערזעצן א מענטשליכע איבערזעצער. טייל בלעטער אדער אינהאלט זענען מעגליך נישט פונקטליך איבערגעזעצט צוליב די באגרעניצטע מעגליכקייטן פון די איבערזעצונג טעכנאלאגיע. <a href=\"https://ny.gov/web-translation-services\">לייענט די פולע אויסקלארונג</a>`, }, { code: \"ru\", label: \"Русский\", nativeText: \"Russian\", disclaimer: `Автоматический перевод не является безупречным и не может заменить переводчика-человека. Некоторые страницы или их содержимое могут быть переведены неточно из-за ограничений программного обеспечения для перевода. <a href=\"https://ny.gov/web-translation-services\">Ознакомьтесь с полным текстом отказа от ответственности</a>`, }, { code: \"bn\", label: \"বাংলা\", nativeText: \"Bengali\", disclaimer: `কোন স্বয়ংক্রিয় অনুবাদ নিখুঁत নয়, না এর উদ্দেশ্য মানুষ অনুবাদকদের প্রতিস্থাপন করা। অনুবাদ সফ্টওয়্যারের সীমাবদ্ধতার কারণে কিছু পৃষ্ঠা বা বিষয়বস্তু সঠিকভাবে অনুবাদ নাও করা হতে পারে। <a href=\"https://ny.gov/web-translation-services\">اসম্পূর্ণ দায়-পরিত্যাগকারী বিজ্ঞপ্তিটি পড়ুন</a>`, }, { code: \"ko\", label: \"한국어\", nativeText: \"Korean\", disclaimer: `자동 번역은 완벽하지 않으며, 번역가를 대체하기 위해 의도된 것도 아닙니다. 번역 소프트웨어의 한계로 인해 일부 페이지 또는 내용이 정확하게 번역되지 않을 수 있습니다 <a href=\"https://ny.gov/web-translation-services\">면책 조항 전문 읽기</a>`, }, { code: \"ht\", label: \"Kreyòl Ayisyen\", nativeText: \"Haitian Creole\", disclaimer: `Okenn tradiksyon otomatik pa pafè, ni pa gen entansyon pou ranplase tradiktè imen. Gen kèk paj oswa kontni ki ka pa tradui avèk presizyon akòz limit nan lojisyèl tradiksyon an. <a href=\"https://ny.gov/web-translation-services\">Li Tout Avi sou Dechaj Responsabilite a</a>`, }, { code: \"it\", label: \"Italiano\", nativeText: \"Italian\", disclaimer: `Nessuna traduzione automatica è perfetta, né è destinata a sostituire i traduttori umani. Alcune pagine o contenuti potrebbero non essere tradotti accuratamente a causa delle limitazioni del software di traduzione. <a href=\"https://ny.gov/web-translation-services\">Leggere l’intera liberatoria</a>`, }, { code: \"ar\", label: \"العربية\", nativeText: \"Arabic\", disclaimer: `الترجمة الآلية لا تكون مثالية بأي حال من الأحوال، ولا يقصد بها أن تحل محل المترجمين من بني البشر. قد تكون ترجمة بعض المحتويات أو الصفحات غير دقيقة بسبب محددات برمجية الترجمة. <a href=\"https://ny.gov/web-translation-services\">اقرأ بيان إخلاء المسؤولية بالكامل</a>`, }, { code: \"pl\", label: \"Polski\", nativeText: \"Polish\", disclaimer: `Żadne tłumaczenie automatyczne nie jest doskonałe, ani też nie ma na celu zastąpienia tłumaczeń wykonywanych przez ludzi. Niektóre strony lub treści mogą być niedokładnie przetłumaczone z powodu ograniczeń oprogramowania do wykonywania tłumaczeń <a href=\"https://ny.gov/web-translation-services\">Przeczytaj pełną klauzulę wyłączenia odpowiedzialności</a>`, }, { code: \"fr\", label: \"Français\", nativeText: \"French\", disclaimer: `Aucune traduction automatique n'est parfaite, ni n'est destinée à remplacer les traducteurs humains. Certaines pages ou du contenu peuvent ne pas être traduits exactement en raison des limitations du logiciel de traduction. <a href=\"https://ny.gov/web-translation-services\">Lire entièrement la clause de non-responsabilité</a>`, }, { code: \"ur\", label: \"اردو\", nativeText: \"Urdu\", disclaimer: `کوئی بھی خود کار ترجمہ بالکل درست نہیں ہوتا ہے، نہ ہی اس کا مقصد انسانی ترجمہ نگاروں کی جگہ لینا ہوتا ہے۔ ممکن ہے کہ ترجمہ سافٹ ویئر کی محدود صلاحیتوں کی وجہ سے کچھ صفحات یا مواد کا ترجمہ بالکل درست نہ ہو پائے۔ <a href=\"https://ny.gov/web-translation-services\">مکمل براءت نامہ پڑھیں</a>`, }, ]",
|
|
18665
|
+
"description": "The list of languages this site can be translated to, default to use Localize",
|
|
18503
18666
|
"fieldName": "languages"
|
|
18504
18667
|
}
|
|
18505
18668
|
],
|
|
@@ -18513,6 +18676,11 @@
|
|
|
18513
18676
|
"examples": [
|
|
18514
18677
|
{
|
|
18515
18678
|
"title": "Basic",
|
|
18679
|
+
"code": "<nys-unavheader translateKey=\"MY_TRANSLATE_KEY\"></nys-unavheader>",
|
|
18680
|
+
"lang": "html"
|
|
18681
|
+
},
|
|
18682
|
+
{
|
|
18683
|
+
"title": "Basic - Smartling",
|
|
18516
18684
|
"code": "<nys-unavheader></nys-unavheader>",
|
|
18517
18685
|
"lang": "html"
|
|
18518
18686
|
},
|
|
@@ -18547,15 +18715,13 @@
|
|
|
18547
18715
|
"lang": "html"
|
|
18548
18716
|
}
|
|
18549
18717
|
],
|
|
18550
|
-
"
|
|
18718
|
+
"usage": [
|
|
18551
18719
|
"Place at the top of every public-facing page.",
|
|
18552
18720
|
"Toggle search (`hideSearch`) and translate (`hideTranslate`) on/off depending on your needs.",
|
|
18553
|
-
"Design your page so content below the header can shift down, since a statewide alert can appear at any time and adds height to the header."
|
|
18554
|
-
|
|
18555
|
-
|
|
18556
|
-
"
|
|
18557
|
-
"Place anywhere other than the top of the page.",
|
|
18558
|
-
"Modify the universal header."
|
|
18721
|
+
"Design your page so content below the header can shift down, since a statewide alert can appear at any time and adds height to the header.",
|
|
18722
|
+
"Don't use on back office applications or internal sites that are not public-facing, instead use the `<nys-globalheader>` with the `nysLogo` property applied.",
|
|
18723
|
+
"Don't place anywhere other than the top of the page.",
|
|
18724
|
+
"Don't modify the universal header."
|
|
18559
18725
|
]
|
|
18560
18726
|
}
|
|
18561
18727
|
],
|
|
@@ -18568,6 +18734,22 @@
|
|
|
18568
18734
|
"module": "packages/nys-unavheader/src/nys-unavheader.ts"
|
|
18569
18735
|
}
|
|
18570
18736
|
},
|
|
18737
|
+
{
|
|
18738
|
+
"kind": "js",
|
|
18739
|
+
"name": "NYS_ALERT_URL_DEV",
|
|
18740
|
+
"declaration": {
|
|
18741
|
+
"name": "NYS_ALERT_URL_DEV",
|
|
18742
|
+
"module": "packages/nys-unavheader/src/nys-unavheader.ts"
|
|
18743
|
+
}
|
|
18744
|
+
},
|
|
18745
|
+
{
|
|
18746
|
+
"kind": "js",
|
|
18747
|
+
"name": "NYS_ALERT_URL_STAGE",
|
|
18748
|
+
"declaration": {
|
|
18749
|
+
"name": "NYS_ALERT_URL_STAGE",
|
|
18750
|
+
"module": "packages/nys-unavheader/src/nys-unavheader.ts"
|
|
18751
|
+
}
|
|
18752
|
+
},
|
|
18571
18753
|
{
|
|
18572
18754
|
"kind": "custom-element-definition",
|
|
18573
18755
|
"name": "nys-unavheader",
|
|
@@ -18880,22 +19062,20 @@
|
|
|
18880
19062
|
"title": "Page layout",
|
|
18881
19063
|
"code": "<div class=\"story-page\">\n<nys-unavheader></nys-unavheader>\n\n<nys-globalheader\nhomepageLink=\"https://ny.gov\"\nagencyName=\"Office of Information Technology Services\"\n>\n<ul>\n<li><a href=\"https://its.ny.gov/services\">Services</a></li>\n<li><a href=\"https://its.ny.gov/get-help\">Help Center</a></li>\n<li><a href=\"https://its.ny.gov/cybersecurity\">Cybersecurity</a></li>\n<li><a href=\"https://its.ny.gov/policies\">Policies and Laws</a></li>\n<li><a href=\"https://its.ny.gov/procurement\">Procurement</a></li>\n<li><a href=\"https://its.ny.gov/about-us\">About Us</a></li>\n</ul>\n</nys-globalheader>\n\n<div class=\"story-page__body\">\n<div class=\"story-page__body--side\">\n<nys-verticalnav heading=\"NYS Design System\" headingLevel=\"h2\">\n<ul>\n <li><a href=\"/\">Foundations</a></li>\n <li><a href=\"/components\" aria-current=\"page\">Components</a></li>\n <li>\n <nys-verticalnavgroup label=\"Accessibility\">\n <ul>\n <li><a href=\"\">WCAG Guidelines</a></li>\n <li><a href=\"\">Screen Readers</a></li>\n <li><a href=\"\">Color Contrast</a></li>\n </ul>\n </nys-verticalnavgroup>\n </li>\n <li>\n <h3>Resources</h3>\n <ul>\n <li><a href=\"\">Design Tokens</a></li>\n <li><a href=\"\">Utilities</a></li>\n <li><a href=\"\">Learn</a></li>\n <li><a href=\"\">What's New</a></li>\n </ul>\n </li>\n</ul>\n</nys-verticalnav>\n</div>\n\n<main class=\"story-page__body--main\">\n<p>Place content here.</p>\n<nys-button\nlabel=\"Toggle Expand/Collapse for vertical nav (mobile)\"\nonclick=\"document.querySelector('nys-verticalnav').toggle()\"\n></nys-button>\n</main>\n</div>\n\n<nys-globalfooter agencyName=\"{agencyName}\" homepageLink=\"https://\">\n<ul>\n<li><a href=\"https://\">Privacy Policy</a></li>\n<li><a href=\"https://\">Terms of Service</a></li>\n</ul>\n</nys-globalfooter>\n\n<nys-unavfooter></nys-unavfooter>\n</div>",
|
|
18882
19064
|
"lang": "html",
|
|
18883
|
-
"render": "<style>\n.page-layout__body {\nbackground-color: var(--nys-color-white, #ffffff);\n}\n.page-layout__nav {\npadding: var(--nys-space-300, 24px) var(--nys-space-50, 4px) var(--nys-space-300, 24px) 0;\n}\n.page-layout__main {\npadding: var(--nys-space-400, 32px);\n}\n</style>\n<div>\n<nys-unavheader></nys-unavheader>\n<nys-globalheader homepageLink=\"https://ny.gov\" agencyName=\"Office of Information Technology Services\">\n<ul>\n<li><a href=\"https://its.ny.gov/services\">Services</a></li>\n<li><a href=\"https://its.ny.gov/get-help\">Help Center</a></li>\n</ul>\n</nys-globalheader>\n<div class=\"page-layout__body\">\n<div class=\"nys-grid-container nys-grid-gap-400\">\n<div class=\"nys-grid-row\">\n<div class=\"nys-desktop:nys-grid-col page-layout__nav\">\n <nys-verticalnav heading=\"NYS Design System\" headingLevel=\"h2\">\n <ul>\n <li><a href=\"/\">Foundations</a></li>\n <li><a href=\"/components\">Components</a></li>\n <li>\n <nys-verticalnavgroup label=\"Accessibility\">\n <ul>\n <li><a href=\"\">WCAG Guidelines</a></li>\n <li><a href=\"\">Screen Readers</a></li>\n <li><a href=\"\">Color Contrast</a></li>\n </ul>\n </nys-verticalnavgroup>\n </li>\n <li>\n <h3>Resources</h3>\n <ul>\n <li><a href=\"\">Design Tokens</a></li>\n <li><a href=\"\">Utilities</a></li>\n </ul>\n </li>\n </ul>\n </nys-verticalnav>\n</div>\n<main class=\"nys-desktop:nys-grid-col page-layout__main\">\n <p>Place content here.</p>\n</main>\n</div>\n</div>\n</div>\n<nys-globalfooter agencyName=\"Agency Name\" homepageLink=\"https://ny.gov\">\n<ul>\n<li><a href=\"https://\"> Privacy Policy </a></li>\n<li><a href=\"https://\"> Terms of Service </a></li>\n</ul>\n</nys-globalfooter>\n<nys-unavfooter></nys-unavfooter>\n</div
|
|
19065
|
+
"render": "<style>\n.page-layout__body {\nbackground-color: var(--nys-color-white, #ffffff);\n}\n.page-layout__nav {\npadding: var(--nys-space-300, 24px) var(--nys-space-50, 4px) var(--nys-space-300, 24px) 0;\n}\n.page-layout__main {\npadding: var(--nys-space-400, 32px);\n}\n</style>\n<div>\n<nys-unavheader></nys-unavheader>\n<nys-globalheader homepageLink=\"https://ny.gov\" agencyName=\"Office of Information Technology Services\">\n<ul>\n<li><a href=\"https://its.ny.gov/services\">Services</a></li>\n<li><a href=\"https://its.ny.gov/get-help\">Help Center</a></li>\n</ul>\n</nys-globalheader>\n<div class=\"page-layout__body\">\n<div class=\"nys-grid-container nys-grid-gap-400\">\n<div class=\"nys-grid-row\">\n<div class=\"nys-desktop:nys-grid-col page-layout__nav\">\n <nys-verticalnav heading=\"NYS Design System\" headingLevel=\"h2\">\n <ul>\n <li><a href=\"/\">Foundations</a></li>\n <li><a href=\"/components\">Components</a></li>\n <li>\n <nys-verticalnavgroup label=\"Accessibility\">\n <ul>\n <li><a href=\"\">WCAG Guidelines</a></li>\n <li><a href=\"\">Screen Readers</a></li>\n <li><a href=\"\">Color Contrast</a></li>\n </ul>\n </nys-verticalnavgroup>\n </li>\n <li>\n <h3>Resources</h3>\n <ul>\n <li><a href=\"\">Design Tokens</a></li>\n <li><a href=\"\">Utilities</a></li>\n </ul>\n </li>\n </ul>\n </nys-verticalnav>\n</div>\n<main class=\"nys-desktop:nys-grid-col page-layout__main\">\n <p>Place content here.</p>\n</main>\n</div>\n</div>\n</div>\n<nys-globalfooter agencyName=\"Agency Name\" homepageLink=\"https://ny.gov\">\n<ul>\n<li><a href=\"https://\"> Privacy Policy </a></li>\n<li><a href=\"https://\"> Terms of Service </a></li>\n</ul>\n</nys-globalfooter>\n<nys-unavfooter></nys-unavfooter>\n</div>"
|
|
18884
19066
|
}
|
|
18885
19067
|
],
|
|
18886
|
-
"
|
|
19068
|
+
"usage": [
|
|
18887
19069
|
"Use for navigation where every item links to a different page.",
|
|
18888
19070
|
"Use for section-level navigation within a site.",
|
|
18889
19071
|
"Support up to two levels of navigation: top-level links and one level of nested links.",
|
|
18890
19072
|
"Set `aria-current=\"page\"` on the active link so the component can apply active styles and expand the current group.",
|
|
18891
|
-
"Avoid excessive use of icons, colors, or badges in navigation items."
|
|
18892
|
-
|
|
18893
|
-
|
|
18894
|
-
"
|
|
18895
|
-
"
|
|
18896
|
-
"
|
|
18897
|
-
"Nest more than one level of sub-items.",
|
|
18898
|
-
"Overload with excessive use of icons, colors, or badges in navigation items."
|
|
19073
|
+
"Avoid excessive use of icons, colors, or badges in navigation items.",
|
|
19074
|
+
"Don't use for in-page navigation, such as scrolling to sections on the same page.",
|
|
19075
|
+
"Don't use for linear task flows, such as multi-step forms or wizards.",
|
|
19076
|
+
"Don't use for filtering, tab switching, or other in-page interactions.",
|
|
19077
|
+
"Don't nest more than one level of sub-items.",
|
|
19078
|
+
"Don't overload with excessive use of icons, colors, or badges in navigation items."
|
|
18899
19079
|
]
|
|
18900
19080
|
}
|
|
18901
19081
|
],
|
|
@@ -19400,18 +19580,16 @@
|
|
|
19400
19580
|
"lang": "html"
|
|
19401
19581
|
}
|
|
19402
19582
|
],
|
|
19403
|
-
"
|
|
19583
|
+
"usage": [
|
|
19404
19584
|
"Use when motion or audio communicates something better than text or images alone.",
|
|
19405
19585
|
"Keep `titleText` to 50–60 characters.",
|
|
19406
19586
|
"Use a clear, high-quality thumbnail so users recognize it as a video.",
|
|
19407
19587
|
"Maintain the default `lazy` loading for better page performance.",
|
|
19408
19588
|
"Reserve space for the 16:9 ratio box to prevent layout shift.",
|
|
19409
|
-
"Let users choose to start the video; avoid `autoplay` unless necessary."
|
|
19410
|
-
|
|
19411
|
-
|
|
19412
|
-
"
|
|
19413
|
-
"Rely on video alone to convey critical information. Always provide a text alternative.",
|
|
19414
|
-
"Set `autoplay` without understanding that the video will be muted. `nys-video` enforces this automatically to protect users from unexpected noise."
|
|
19589
|
+
"Let users choose to start the video; avoid `autoplay` unless necessary.",
|
|
19590
|
+
"Don't use video if the same message can be delivered clearly with text or a static image.",
|
|
19591
|
+
"Don't rely on video alone to convey critical information. Always provide a text alternative.",
|
|
19592
|
+
"Don't set `autoplay` without understanding that the video will be muted. `nys-video` enforces this automatically to protect users from unexpected noise."
|
|
19415
19593
|
]
|
|
19416
19594
|
}
|
|
19417
19595
|
],
|