@nysds/components 1.23.1 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +547 -127
- package/dist/.vscode/vscode.html-custom-data.json +53 -43
- package/dist/custom-elements.json +547 -127
- package/dist/{nys-icon.library-BoTLZp1N.js → nys-icon.library-C3fdrsXK.js} +2 -2
- package/dist/{nys-icon.library-BoTLZp1N.js.map → nys-icon.library-C3fdrsXK.js.map} +1 -1
- package/dist/{nys-icon.library-CzPN4H8R-DCkPqUYP.js → nys-icon.library-CHrtmOCL-BdLMRCBm.js} +3 -3
- package/dist/{nys-icon.library-CzPN4H8R-DCkPqUYP.js.map → nys-icon.library-CHrtmOCL-BdLMRCBm.js.map} +1 -1
- package/dist/nysds.es.js +4090 -3834
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +329 -335
- package/dist/nysds.js.map +1 -1
- package/dist/packages/mcp-server/src/lib/framework-snippets.d.ts +1 -1
- package/dist/packages/mcp-server/src/lib/framework-usage.d.ts +2 -1
- package/dist/packages/mcp-server/src/lib/icons.d.ts +18 -0
- package/dist/packages/mcp-server/src/lib/search.d.ts +1 -5
- package/dist/packages/mcp-server/src/lib/token-parser.d.ts +44 -1
- package/dist/packages/mcp-server/src/resources/components.d.ts +1 -1
- package/dist/packages/mcp-server/src/resources/guides.d.ts +1 -1
- package/dist/packages/mcp-server/src/tools/guide-tools.d.ts +10 -0
- package/dist/packages/mcp-server/src/tools/utility-tools.d.ts +36 -16
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +7 -27
- package/dist/packages/nys-button/src/nys-button.d.ts +6 -5
- package/dist/packages/nys-card/src/nys-card.d.ts +1 -1
- package/dist/packages/nys-combobox/src/nys-combobox.d.ts +1 -0
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +1 -0
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +9 -18
- package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +8 -0
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +2 -1
- package/dist/packages/nys-icon/src/nys-icon.d.ts +6 -4
- package/dist/packages/nys-iconlist/src/nys-iconlistitem.d.ts +2 -2
- package/dist/packages/nys-modal/src/nys-modal.d.ts +1 -6
- package/dist/packages/nys-onthispage/src/index.d.ts +1 -0
- package/dist/packages/nys-onthispage/src/nys-onthispage.d.ts +418 -0
- package/dist/packages/nys-onthispage/src/nys-onthispage.figma.d.ts +1 -0
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +1 -0
- package/dist/packages/nys-select/src/nys-select.d.ts +1 -0
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +2 -2
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +8 -8
- package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +11 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +2 -2
package/custom-elements.json
CHANGED
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"declarations": [
|
|
234
234
|
{
|
|
235
235
|
"kind": "class",
|
|
236
|
-
"description": "A collapsible content panel used within `nys-accordion`. Supports keyboard navigation and smooth animations.\n\nPlace inside `nys-accordion`. Set `expanded` to open by default. The heading acts as a toggle button\naccessible via click, Enter, or Space. Parent accordion controls `bordered` and `singleSelect` behavior.\n\
|
|
236
|
+
"description": "A collapsible content panel used within `nys-accordion`. Supports keyboard navigation and smooth animations.\n\nPlace inside `nys-accordion`. Set `expanded` to open by default. The heading acts as a toggle button\naccessible via click, Enter, or Space. Parent accordion controls `bordered` and `singleSelect` behavior.\n\nThe toggle button sits inside a real heading (`h2`-`h6`). Set `headingLevel`\nhere or on the parent `nys-accordion` to match the surrounding page.",
|
|
237
237
|
"name": "NysAccordionItem",
|
|
238
238
|
"slots": [
|
|
239
239
|
{
|
|
@@ -267,10 +267,10 @@
|
|
|
267
267
|
"kind": "field",
|
|
268
268
|
"name": "headingLevel",
|
|
269
269
|
"type": {
|
|
270
|
-
"text": "| \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n |
|
|
270
|
+
"text": "| \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | undefined"
|
|
271
271
|
},
|
|
272
|
-
"default": "
|
|
273
|
-
"description": "Heading element that wraps the toggle button (`h2` through `h6`).\n\
|
|
272
|
+
"default": "undefined",
|
|
273
|
+
"description": "Heading element that wraps the toggle button (`h2` through `h6`).\n\nUse one level below the heading that introduces the accordion. If unset,\nthe item follows the parent `nys-accordion`, then falls back to `h3`.",
|
|
274
274
|
"attribute": "headingLevel",
|
|
275
275
|
"reflects": true
|
|
276
276
|
},
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
"text": "NysAccordionHeadingLevel"
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
|
-
"description": "The
|
|
308
|
+
"description": "The item's own level, else the parent accordion's, else `h3`."
|
|
309
309
|
},
|
|
310
310
|
{
|
|
311
311
|
"kind": "method",
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
],
|
|
358
|
-
"description": "
|
|
358
|
+
"description": "Wraps the toggle button in a real heading, per the WAI-ARIA accordion pattern."
|
|
359
359
|
}
|
|
360
360
|
],
|
|
361
361
|
"events": [
|
|
@@ -389,10 +389,10 @@
|
|
|
389
389
|
{
|
|
390
390
|
"name": "headingLevel",
|
|
391
391
|
"type": {
|
|
392
|
-
"text": "| \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n |
|
|
392
|
+
"text": "| \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | undefined"
|
|
393
393
|
},
|
|
394
|
-
"default": "
|
|
395
|
-
"description": "Heading element that wraps the toggle button (`h2` through `h6`).\n\
|
|
394
|
+
"default": "undefined",
|
|
395
|
+
"description": "Heading element that wraps the toggle button (`h2` through `h6`).\n\nUse one level below the heading that introduces the accordion. If unset,\nthe item follows the parent `nys-accordion`, then falls back to `h3`.",
|
|
396
396
|
"fieldName": "headingLevel"
|
|
397
397
|
},
|
|
398
398
|
{
|
|
@@ -1572,7 +1572,7 @@
|
|
|
1572
1572
|
},
|
|
1573
1573
|
"default": "null",
|
|
1574
1574
|
"description": "Icon shown before the label.",
|
|
1575
|
-
"attribute": "
|
|
1575
|
+
"attribute": "prefixIcon"
|
|
1576
1576
|
},
|
|
1577
1577
|
{
|
|
1578
1578
|
"kind": "field",
|
|
@@ -1582,7 +1582,7 @@
|
|
|
1582
1582
|
},
|
|
1583
1583
|
"default": "null",
|
|
1584
1584
|
"description": "Icon shown after the label.",
|
|
1585
|
-
"attribute": "
|
|
1585
|
+
"attribute": "suffixIcon"
|
|
1586
1586
|
},
|
|
1587
1587
|
{
|
|
1588
1588
|
"kind": "field",
|
|
@@ -1713,7 +1713,7 @@
|
|
|
1713
1713
|
"fieldName": "strong"
|
|
1714
1714
|
},
|
|
1715
1715
|
{
|
|
1716
|
-
"name": "
|
|
1716
|
+
"name": "prefixIcon",
|
|
1717
1717
|
"type": {
|
|
1718
1718
|
"text": "string | boolean | null"
|
|
1719
1719
|
},
|
|
@@ -1722,7 +1722,7 @@
|
|
|
1722
1722
|
"fieldName": "prefixIcon"
|
|
1723
1723
|
},
|
|
1724
1724
|
{
|
|
1725
|
-
"name": "
|
|
1725
|
+
"name": "suffixIcon",
|
|
1726
1726
|
"type": {
|
|
1727
1727
|
"text": "string | boolean | null"
|
|
1728
1728
|
},
|
|
@@ -2545,7 +2545,7 @@
|
|
|
2545
2545
|
"text": "string"
|
|
2546
2546
|
},
|
|
2547
2547
|
"default": "\"\"",
|
|
2548
|
-
"description": "
|
|
2548
|
+
"description": "NYSDS icon name (see `nys-icon`) shown before the label. Not shown for `circle` mode.",
|
|
2549
2549
|
"attribute": "prefixIcon"
|
|
2550
2550
|
},
|
|
2551
2551
|
{
|
|
@@ -2555,7 +2555,7 @@
|
|
|
2555
2555
|
"text": "string"
|
|
2556
2556
|
},
|
|
2557
2557
|
"default": "\"\"",
|
|
2558
|
-
"description": "
|
|
2558
|
+
"description": "NYSDS icon name (see `nys-icon`) shown after the label. Use `chevron_down` for dropdowns, `open_in_new` for external links. Not shown for `circle` mode.",
|
|
2559
2559
|
"attribute": "suffixIcon"
|
|
2560
2560
|
},
|
|
2561
2561
|
{
|
|
@@ -2613,13 +2613,13 @@
|
|
|
2613
2613
|
},
|
|
2614
2614
|
{
|
|
2615
2615
|
"kind": "field",
|
|
2616
|
-
"name": "
|
|
2616
|
+
"name": "ariaDescription",
|
|
2617
2617
|
"type": {
|
|
2618
2618
|
"text": "string"
|
|
2619
2619
|
},
|
|
2620
2620
|
"default": "\"\"",
|
|
2621
|
-
"description": "
|
|
2622
|
-
"attribute": "
|
|
2621
|
+
"description": "Aria description for the button's name. Useful for adding additional SR context\nsuch as hint texts from the nys-tooltip (since that cannot be resolved by `ariaDescribedBy`).",
|
|
2622
|
+
"attribute": "ariaDescription"
|
|
2623
2623
|
},
|
|
2624
2624
|
{
|
|
2625
2625
|
"kind": "field",
|
|
@@ -2656,7 +2656,7 @@
|
|
|
2656
2656
|
"kind": "field",
|
|
2657
2657
|
"name": "target",
|
|
2658
2658
|
"type": {
|
|
2659
|
-
"text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n |
|
|
2659
|
+
"text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | string"
|
|
2660
2660
|
},
|
|
2661
2661
|
"default": "\"_self\"",
|
|
2662
2662
|
"description": "Link target: `_self` (same tab), `_blank` (new tab—add `suffixIcon=\"open_in_new\"`), `_parent`, `_top`, or frame name.",
|
|
@@ -2926,7 +2926,7 @@
|
|
|
2926
2926
|
"text": "string"
|
|
2927
2927
|
},
|
|
2928
2928
|
"default": "\"\"",
|
|
2929
|
-
"description": "
|
|
2929
|
+
"description": "NYSDS icon name (see `nys-icon`) shown before the label. Not shown for `circle` mode.",
|
|
2930
2930
|
"fieldName": "prefixIcon"
|
|
2931
2931
|
},
|
|
2932
2932
|
{
|
|
@@ -2935,7 +2935,7 @@
|
|
|
2935
2935
|
"text": "string"
|
|
2936
2936
|
},
|
|
2937
2937
|
"default": "\"\"",
|
|
2938
|
-
"description": "
|
|
2938
|
+
"description": "NYSDS icon name (see `nys-icon`) shown after the label. Use `chevron_down` for dropdowns, `open_in_new` for external links. Not shown for `circle` mode.",
|
|
2939
2939
|
"fieldName": "suffixIcon"
|
|
2940
2940
|
},
|
|
2941
2941
|
{
|
|
@@ -2984,13 +2984,13 @@
|
|
|
2984
2984
|
"fieldName": "value"
|
|
2985
2985
|
},
|
|
2986
2986
|
{
|
|
2987
|
-
"name": "
|
|
2987
|
+
"name": "ariaDescription",
|
|
2988
2988
|
"type": {
|
|
2989
2989
|
"text": "string"
|
|
2990
2990
|
},
|
|
2991
2991
|
"default": "\"\"",
|
|
2992
|
-
"description": "
|
|
2993
|
-
"fieldName": "
|
|
2992
|
+
"description": "Aria description for the button's name. Useful for adding additional SR context\nsuch as hint texts from the nys-tooltip (since that cannot be resolved by `ariaDescribedBy`).",
|
|
2993
|
+
"fieldName": "ariaDescription"
|
|
2994
2994
|
},
|
|
2995
2995
|
{
|
|
2996
2996
|
"name": "type",
|
|
@@ -3013,7 +3013,7 @@
|
|
|
3013
3013
|
{
|
|
3014
3014
|
"name": "target",
|
|
3015
3015
|
"type": {
|
|
3016
|
-
"text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n |
|
|
3016
|
+
"text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | string"
|
|
3017
3017
|
},
|
|
3018
3018
|
"default": "\"_self\"",
|
|
3019
3019
|
"description": "Link target: `_self` (same tab), `_blank` (new tab—add `suffixIcon=\"open_in_new\"`), `_parent`, `_top`, or frame name.",
|
|
@@ -3337,7 +3337,7 @@
|
|
|
3337
3337
|
"kind": "field",
|
|
3338
3338
|
"name": "target",
|
|
3339
3339
|
"type": {
|
|
3340
|
-
"text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n |
|
|
3340
|
+
"text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | string"
|
|
3341
3341
|
},
|
|
3342
3342
|
"default": "\"_self\"",
|
|
3343
3343
|
"description": "Link target: `_self` (same tab), `_blank` (new tab), `_parent`, `_top`, or frame name. Only used with `href`.",
|
|
@@ -3608,7 +3608,7 @@
|
|
|
3608
3608
|
{
|
|
3609
3609
|
"name": "target",
|
|
3610
3610
|
"type": {
|
|
3611
|
-
"text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n |
|
|
3611
|
+
"text": "| \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | string"
|
|
3612
3612
|
},
|
|
3613
3613
|
"default": "\"_self\"",
|
|
3614
3614
|
"description": "Link target: `_self` (same tab), `_blank` (new tab), `_parent`, `_top`, or frame name. Only used with `href`.",
|
|
@@ -5361,6 +5361,11 @@
|
|
|
5361
5361
|
"privacy": "private",
|
|
5362
5362
|
"description": "Form Integration\n--------------------------------------------------------------------------"
|
|
5363
5363
|
},
|
|
5364
|
+
{
|
|
5365
|
+
"kind": "method",
|
|
5366
|
+
"name": "_isRequiredMissing",
|
|
5367
|
+
"privacy": "private"
|
|
5368
|
+
},
|
|
5364
5369
|
{
|
|
5365
5370
|
"kind": "method",
|
|
5366
5371
|
"name": "_manageRequire",
|
|
@@ -8005,11 +8010,20 @@
|
|
|
8005
8010
|
"privacy": "private",
|
|
8006
8011
|
"readonly": true
|
|
8007
8012
|
},
|
|
8013
|
+
{
|
|
8014
|
+
"kind": "field",
|
|
8015
|
+
"name": "_selectionSummary",
|
|
8016
|
+
"type": {
|
|
8017
|
+
"text": "string"
|
|
8018
|
+
},
|
|
8019
|
+
"privacy": "private",
|
|
8020
|
+
"readonly": true
|
|
8021
|
+
},
|
|
8008
8022
|
{
|
|
8009
8023
|
"kind": "method",
|
|
8010
8024
|
"name": "_syncControlErrorAssociation",
|
|
8011
8025
|
"privacy": "private",
|
|
8012
|
-
"description": "
|
|
8026
|
+
"description": "Sets the accessible description of the \"Choose file\" button.\n\nThe real button lives inside <nys-button>'s shadow root, so a normal\naria-describedby id can't reach elements out here. Instead we link the\nelements directly with associateControlRefs. The description is built, in\norder, from: the dropzone hint, the selected-files summary, and the error\nmessage. An aria-description string is also set for browsers that ignore\nelement references."
|
|
8013
8027
|
},
|
|
8014
8028
|
{
|
|
8015
8029
|
"kind": "method",
|
|
@@ -8603,6 +8617,16 @@
|
|
|
8603
8617
|
"description": "Stable id of the element that holds the error text. `aria-errormessage` and\n`aria-describedby` take an IDREF, so they must point at this — never at the\nmessage text itself. Derived from the host id (auto-generated by NysElement)\nrather than the filename, which is not id-safe and not stable.",
|
|
8604
8618
|
"readonly": true
|
|
8605
8619
|
},
|
|
8620
|
+
{
|
|
8621
|
+
"kind": "field",
|
|
8622
|
+
"name": "_removeAriaLabel",
|
|
8623
|
+
"type": {
|
|
8624
|
+
"text": "string"
|
|
8625
|
+
},
|
|
8626
|
+
"privacy": "private",
|
|
8627
|
+
"description": "Accessible name for the remove button. Includes the field label from `nys-fileinput` when set.",
|
|
8628
|
+
"readonly": true
|
|
8629
|
+
},
|
|
8606
8630
|
{
|
|
8607
8631
|
"kind": "method",
|
|
8608
8632
|
"name": "_handleRemove",
|
|
@@ -9305,6 +9329,11 @@
|
|
|
9305
9329
|
"privacy": "private",
|
|
9306
9330
|
"description": "Literal name for the banner: the author's override, or the \"Site\" default when\nthere is no visible title to reference. Undefined whenever `_bannerLabelledBy`\nhas something to point at, so the landmark never carries both.",
|
|
9307
9331
|
"readonly": true
|
|
9332
|
+
},
|
|
9333
|
+
{
|
|
9334
|
+
"kind": "method",
|
|
9335
|
+
"name": "_renderNames",
|
|
9336
|
+
"privacy": "private"
|
|
9308
9337
|
}
|
|
9309
9338
|
],
|
|
9310
9339
|
"attributes": [
|
|
@@ -9758,7 +9787,7 @@
|
|
|
9758
9787
|
"declarations": [
|
|
9759
9788
|
{
|
|
9760
9789
|
"kind": "class",
|
|
9761
|
-
"description": "Renders SVG icons from a registered icon library. The
|
|
9790
|
+
"description": "Renders SVG icons from a registered icon library. The default library is\nthe curated NYSDS icon set built into the package; only its names render\nwithout setup. Other libraries (Font Awesome, Material Icons, your own\nSVGs, etc.) can be registered via `registerIconLibrary()` and selected with\n`library`.\n\nPass `name` to select an icon. Use `library` to choose a registered library\n(defaults to `\"default\"` for NYSDS icons). Use `ariaLabel` to make the icon\naccessible (removes `aria-hidden`). Supports size presets, rotation,\nflipping, and custom colors.",
|
|
9762
9791
|
"name": "NysIcon",
|
|
9763
9792
|
"cssProperties": [
|
|
9764
9793
|
{
|
|
@@ -10040,7 +10069,7 @@
|
|
|
10040
10069
|
"Pair icons with a text label—few icons are universally understood alone.",
|
|
10041
10070
|
"Use icons consistently: same icon and label for the same meaning throughout your app.",
|
|
10042
10071
|
"Use `ariaLabel` when the icon conveys meaning, so screen readers can announce its purpose.",
|
|
10043
|
-
"Use icons from the NYS Design System library
|
|
10072
|
+
"Use icons from the NYS Design System library. If it doesn't have the icon you need, register another library with `registerIconLibrary()` and set `library`.",
|
|
10044
10073
|
"Match icon size and color to the design system.",
|
|
10045
10074
|
"Don't use an icon if its meaning isn't immediately clear—if you suspect users won't recognize it, remove it.",
|
|
10046
10075
|
"Don't use icons to compensate for unclear page hierarchy or confusing content organization.",
|
|
@@ -10293,7 +10322,7 @@
|
|
|
10293
10322
|
"text": "string"
|
|
10294
10323
|
},
|
|
10295
10324
|
"default": "\"\"",
|
|
10296
|
-
"description": "
|
|
10325
|
+
"description": "NYSDS icon name passed to `<nys-icon>`.",
|
|
10297
10326
|
"attribute": "icon"
|
|
10298
10327
|
},
|
|
10299
10328
|
{
|
|
@@ -10339,7 +10368,7 @@
|
|
|
10339
10368
|
"text": "string"
|
|
10340
10369
|
},
|
|
10341
10370
|
"default": "\"\"",
|
|
10342
|
-
"description": "
|
|
10371
|
+
"description": "NYSDS icon name passed to `<nys-icon>`.",
|
|
10343
10372
|
"fieldName": "icon"
|
|
10344
10373
|
},
|
|
10345
10374
|
{
|
|
@@ -10725,29 +10754,27 @@
|
|
|
10725
10754
|
},
|
|
10726
10755
|
{
|
|
10727
10756
|
"kind": "field",
|
|
10728
|
-
"name": "
|
|
10757
|
+
"name": "_actionButtonSlot",
|
|
10729
10758
|
"type": {
|
|
10730
|
-
"text": "
|
|
10759
|
+
"text": "HTMLSlotElement | null"
|
|
10731
10760
|
},
|
|
10732
|
-
"
|
|
10733
|
-
"
|
|
10734
|
-
"attribute": "width",
|
|
10735
|
-
"reflects": true
|
|
10761
|
+
"privacy": "private",
|
|
10762
|
+
"default": "null"
|
|
10736
10763
|
},
|
|
10737
10764
|
{
|
|
10738
10765
|
"kind": "field",
|
|
10739
|
-
"name": "
|
|
10766
|
+
"name": "_prevFocusedElement",
|
|
10740
10767
|
"type": {
|
|
10741
|
-
"text": "
|
|
10768
|
+
"text": "HTMLElement | null"
|
|
10742
10769
|
},
|
|
10743
10770
|
"privacy": "private",
|
|
10744
10771
|
"default": "null"
|
|
10745
10772
|
},
|
|
10746
10773
|
{
|
|
10747
10774
|
"kind": "field",
|
|
10748
|
-
"name": "
|
|
10775
|
+
"name": "_originalHtmlOverflow",
|
|
10749
10776
|
"type": {
|
|
10750
|
-
"text": "
|
|
10777
|
+
"text": "string | null"
|
|
10751
10778
|
},
|
|
10752
10779
|
"privacy": "private",
|
|
10753
10780
|
"default": "null"
|
|
@@ -10784,11 +10811,6 @@
|
|
|
10784
10811
|
"privacy": "private",
|
|
10785
10812
|
"default": "false"
|
|
10786
10813
|
},
|
|
10787
|
-
{
|
|
10788
|
-
"kind": "field",
|
|
10789
|
-
"name": "_boundHandleKeydown",
|
|
10790
|
-
"privacy": "private"
|
|
10791
|
-
},
|
|
10792
10814
|
{
|
|
10793
10815
|
"kind": "method",
|
|
10794
10816
|
"name": "_hideBodyScroll",
|
|
@@ -10826,7 +10848,7 @@
|
|
|
10826
10848
|
"privacy": "private"
|
|
10827
10849
|
},
|
|
10828
10850
|
{
|
|
10829
|
-
"kind": "
|
|
10851
|
+
"kind": "field",
|
|
10830
10852
|
"name": "_updateSlottedButtonWidth",
|
|
10831
10853
|
"privacy": "private"
|
|
10832
10854
|
},
|
|
@@ -10846,17 +10868,9 @@
|
|
|
10846
10868
|
"privacy": "private"
|
|
10847
10869
|
},
|
|
10848
10870
|
{
|
|
10849
|
-
"kind": "
|
|
10871
|
+
"kind": "field",
|
|
10850
10872
|
"name": "_handleKeydown",
|
|
10851
10873
|
"privacy": "private",
|
|
10852
|
-
"parameters": [
|
|
10853
|
-
{
|
|
10854
|
-
"name": "e",
|
|
10855
|
-
"type": {
|
|
10856
|
-
"text": "KeyboardEvent"
|
|
10857
|
-
}
|
|
10858
|
-
}
|
|
10859
|
-
],
|
|
10860
10874
|
"description": "Event Handlers\n--------------------------------------------------------------------------"
|
|
10861
10875
|
},
|
|
10862
10876
|
{
|
|
@@ -10935,15 +10949,6 @@
|
|
|
10935
10949
|
"default": "false",
|
|
10936
10950
|
"description": "Prevents dismissal via close button or Escape key. User must take an action.",
|
|
10937
10951
|
"fieldName": "mandatory"
|
|
10938
|
-
},
|
|
10939
|
-
{
|
|
10940
|
-
"name": "width",
|
|
10941
|
-
"type": {
|
|
10942
|
-
"text": "\"sm\" | \"md\" | \"lg\""
|
|
10943
|
-
},
|
|
10944
|
-
"default": "\"md\"",
|
|
10945
|
-
"description": "Modal width: `sm` (400px), `md` (600px), or `lg` (800px).",
|
|
10946
|
-
"fieldName": "width"
|
|
10947
10952
|
}
|
|
10948
10953
|
],
|
|
10949
10954
|
"superclass": {
|
|
@@ -11010,6 +11015,457 @@
|
|
|
11010
11015
|
}
|
|
11011
11016
|
]
|
|
11012
11017
|
},
|
|
11018
|
+
{
|
|
11019
|
+
"kind": "javascript-module",
|
|
11020
|
+
"path": "packages/nys-onthispage/src/index.ts",
|
|
11021
|
+
"declarations": [],
|
|
11022
|
+
"exports": [
|
|
11023
|
+
{
|
|
11024
|
+
"kind": "js",
|
|
11025
|
+
"name": "*",
|
|
11026
|
+
"declaration": {
|
|
11027
|
+
"name": "*",
|
|
11028
|
+
"module": "packages/nys-onthispage/src/nys-onthispage"
|
|
11029
|
+
}
|
|
11030
|
+
}
|
|
11031
|
+
]
|
|
11032
|
+
},
|
|
11033
|
+
{
|
|
11034
|
+
"kind": "javascript-module",
|
|
11035
|
+
"path": "packages/nys-onthispage/src/nys-onthispage.ts",
|
|
11036
|
+
"declarations": [
|
|
11037
|
+
{
|
|
11038
|
+
"kind": "class",
|
|
11039
|
+
"description": "In-page navigation that lists the headings on a page as links, so users can jump to a section.\nThe link for the section the user is currently reading is highlighted.\n\nThe component collects headings from the `scope` element (default `main`) at the `headingTracker`\nlevel (default `h2`). Headings without an `id` get one generated from their text. Headings inside\n`nys-accordion`, inside a `[hidden]` element, or marked with `data-nys-onthispage-ignore` are left out.\nNothing renders until at least two headings are found.\n\nClicking a link scrolls to the heading and moves focus to it.",
|
|
11040
|
+
"name": "NysOnthispage",
|
|
11041
|
+
"members": [
|
|
11042
|
+
{
|
|
11043
|
+
"kind": "field",
|
|
11044
|
+
"name": "id",
|
|
11045
|
+
"type": {
|
|
11046
|
+
"text": "string"
|
|
11047
|
+
},
|
|
11048
|
+
"default": "\"\"",
|
|
11049
|
+
"description": "Unique identifier. Auto-generated by the shared base if not provided.",
|
|
11050
|
+
"attribute": "id",
|
|
11051
|
+
"reflects": true
|
|
11052
|
+
},
|
|
11053
|
+
{
|
|
11054
|
+
"kind": "field",
|
|
11055
|
+
"name": "headingTracker",
|
|
11056
|
+
"type": {
|
|
11057
|
+
"text": "HeadingTag"
|
|
11058
|
+
},
|
|
11059
|
+
"default": "\"h2\"",
|
|
11060
|
+
"description": "Heading level to track and link. `h1` is excluded.",
|
|
11061
|
+
"attribute": "headingTracker"
|
|
11062
|
+
},
|
|
11063
|
+
{
|
|
11064
|
+
"kind": "field",
|
|
11065
|
+
"name": "heading",
|
|
11066
|
+
"type": {
|
|
11067
|
+
"text": "string"
|
|
11068
|
+
},
|
|
11069
|
+
"default": "\"On this page\"",
|
|
11070
|
+
"description": "Nav heading text.",
|
|
11071
|
+
"attribute": "heading"
|
|
11072
|
+
},
|
|
11073
|
+
{
|
|
11074
|
+
"kind": "field",
|
|
11075
|
+
"name": "scope",
|
|
11076
|
+
"type": {
|
|
11077
|
+
"text": "string"
|
|
11078
|
+
},
|
|
11079
|
+
"default": "\"main\"",
|
|
11080
|
+
"description": "CSS selector for the container whose headings are tracked.",
|
|
11081
|
+
"attribute": "scope"
|
|
11082
|
+
},
|
|
11083
|
+
{
|
|
11084
|
+
"kind": "field",
|
|
11085
|
+
"name": "disableSticky",
|
|
11086
|
+
"type": {
|
|
11087
|
+
"text": "boolean"
|
|
11088
|
+
},
|
|
11089
|
+
"default": "false",
|
|
11090
|
+
"description": "Turns off the sticky behavior, so the nav scrolls with the page.\nSticky only applies on viewports 480px wide or larger.",
|
|
11091
|
+
"attribute": "disableSticky",
|
|
11092
|
+
"reflects": true
|
|
11093
|
+
},
|
|
11094
|
+
{
|
|
11095
|
+
"kind": "field",
|
|
11096
|
+
"name": "offset",
|
|
11097
|
+
"type": {
|
|
11098
|
+
"text": "number"
|
|
11099
|
+
},
|
|
11100
|
+
"default": "80",
|
|
11101
|
+
"description": "Distance (px) from the viewport top to the trigger line. Also sets\n`scroll-margin-top` on tracked headings and the sticky `top` value.",
|
|
11102
|
+
"attribute": "offset"
|
|
11103
|
+
},
|
|
11104
|
+
{
|
|
11105
|
+
"kind": "field",
|
|
11106
|
+
"name": "disableSmoothScroll",
|
|
11107
|
+
"type": {
|
|
11108
|
+
"text": "boolean"
|
|
11109
|
+
},
|
|
11110
|
+
"default": "false",
|
|
11111
|
+
"description": "Turns off smooth scrolling. Already off for visitors with `prefers-reduced-motion`.",
|
|
11112
|
+
"attribute": "disableSmoothScroll",
|
|
11113
|
+
"reflects": true
|
|
11114
|
+
},
|
|
11115
|
+
{
|
|
11116
|
+
"kind": "field",
|
|
11117
|
+
"name": "hashBehavior",
|
|
11118
|
+
"type": {
|
|
11119
|
+
"text": "HashBehavior"
|
|
11120
|
+
},
|
|
11121
|
+
"default": "\"none\"",
|
|
11122
|
+
"description": "`hash` pushes history, `replace` updates the URL silently, `none` leaves it alone.",
|
|
11123
|
+
"attribute": "hashBehavior"
|
|
11124
|
+
},
|
|
11125
|
+
{
|
|
11126
|
+
"kind": "field",
|
|
11127
|
+
"name": "_items",
|
|
11128
|
+
"type": {
|
|
11129
|
+
"text": "TrackedHeading[]"
|
|
11130
|
+
},
|
|
11131
|
+
"privacy": "private",
|
|
11132
|
+
"default": "[]"
|
|
11133
|
+
},
|
|
11134
|
+
{
|
|
11135
|
+
"kind": "field",
|
|
11136
|
+
"name": "_activeId",
|
|
11137
|
+
"type": {
|
|
11138
|
+
"text": "string | null"
|
|
11139
|
+
},
|
|
11140
|
+
"privacy": "private",
|
|
11141
|
+
"default": "null"
|
|
11142
|
+
},
|
|
11143
|
+
{
|
|
11144
|
+
"kind": "field",
|
|
11145
|
+
"name": "_observer",
|
|
11146
|
+
"type": {
|
|
11147
|
+
"text": "MutationObserver | undefined"
|
|
11148
|
+
},
|
|
11149
|
+
"privacy": "private"
|
|
11150
|
+
},
|
|
11151
|
+
{
|
|
11152
|
+
"kind": "field",
|
|
11153
|
+
"name": "_scrollFrame",
|
|
11154
|
+
"type": {
|
|
11155
|
+
"text": "number"
|
|
11156
|
+
},
|
|
11157
|
+
"privacy": "private",
|
|
11158
|
+
"default": "0"
|
|
11159
|
+
},
|
|
11160
|
+
{
|
|
11161
|
+
"kind": "field",
|
|
11162
|
+
"name": "_rebuildFrame",
|
|
11163
|
+
"type": {
|
|
11164
|
+
"text": "number"
|
|
11165
|
+
},
|
|
11166
|
+
"privacy": "private",
|
|
11167
|
+
"default": "0"
|
|
11168
|
+
},
|
|
11169
|
+
{
|
|
11170
|
+
"kind": "field",
|
|
11171
|
+
"name": "_holdingActive",
|
|
11172
|
+
"type": {
|
|
11173
|
+
"text": "boolean"
|
|
11174
|
+
},
|
|
11175
|
+
"privacy": "private",
|
|
11176
|
+
"default": "false",
|
|
11177
|
+
"description": "True while a link-click scroll is in flight, so scroll events don't override the clicked link."
|
|
11178
|
+
},
|
|
11179
|
+
{
|
|
11180
|
+
"kind": "field",
|
|
11181
|
+
"name": "_holdTimer",
|
|
11182
|
+
"type": {
|
|
11183
|
+
"text": "number"
|
|
11184
|
+
},
|
|
11185
|
+
"privacy": "private",
|
|
11186
|
+
"default": "0"
|
|
11187
|
+
},
|
|
11188
|
+
{
|
|
11189
|
+
"kind": "method",
|
|
11190
|
+
"name": "_getScope",
|
|
11191
|
+
"privacy": "private",
|
|
11192
|
+
"description": "Functions\n--------------------------------------------------------------------------"
|
|
11193
|
+
},
|
|
11194
|
+
{
|
|
11195
|
+
"kind": "method",
|
|
11196
|
+
"name": "_isTrackable",
|
|
11197
|
+
"privacy": "private",
|
|
11198
|
+
"return": {
|
|
11199
|
+
"type": {
|
|
11200
|
+
"text": "boolean"
|
|
11201
|
+
}
|
|
11202
|
+
},
|
|
11203
|
+
"parameters": [
|
|
11204
|
+
{
|
|
11205
|
+
"name": "el",
|
|
11206
|
+
"type": {
|
|
11207
|
+
"text": "HTMLElement"
|
|
11208
|
+
}
|
|
11209
|
+
}
|
|
11210
|
+
],
|
|
11211
|
+
"description": "Checks if the header element is trackable:\nMeaning the element doesn't contain hidden data attribute, or is hidden, or is inside an accordion.\nVisibility must be true."
|
|
11212
|
+
},
|
|
11213
|
+
{
|
|
11214
|
+
"kind": "field",
|
|
11215
|
+
"name": "_scheduleRebuild",
|
|
11216
|
+
"privacy": "private"
|
|
11217
|
+
},
|
|
11218
|
+
{
|
|
11219
|
+
"kind": "method",
|
|
11220
|
+
"name": "_slugify",
|
|
11221
|
+
"privacy": "private",
|
|
11222
|
+
"return": {
|
|
11223
|
+
"type": {
|
|
11224
|
+
"text": "string"
|
|
11225
|
+
}
|
|
11226
|
+
},
|
|
11227
|
+
"parameters": [
|
|
11228
|
+
{
|
|
11229
|
+
"name": "text",
|
|
11230
|
+
"type": {
|
|
11231
|
+
"text": "string"
|
|
11232
|
+
}
|
|
11233
|
+
}
|
|
11234
|
+
]
|
|
11235
|
+
},
|
|
11236
|
+
{
|
|
11237
|
+
"kind": "method",
|
|
11238
|
+
"name": "_applyScrollMargin",
|
|
11239
|
+
"privacy": "private"
|
|
11240
|
+
},
|
|
11241
|
+
{
|
|
11242
|
+
"kind": "field",
|
|
11243
|
+
"name": "_rebuild",
|
|
11244
|
+
"privacy": "private",
|
|
11245
|
+
"description": "*\nCollects the headings, assigns ids where missing, and updates state if changed.\nRebuilds the content in this function."
|
|
11246
|
+
},
|
|
11247
|
+
{
|
|
11248
|
+
"kind": "method",
|
|
11249
|
+
"name": "_computeActive",
|
|
11250
|
+
"privacy": "private",
|
|
11251
|
+
"description": "Active item = the last tracked heading with the top edge at or above the trigger line. Not \"nearest to top\" since that would flicker at the boundaries"
|
|
11252
|
+
},
|
|
11253
|
+
{
|
|
11254
|
+
"kind": "method",
|
|
11255
|
+
"name": "_holdActive",
|
|
11256
|
+
"privacy": "private",
|
|
11257
|
+
"description": "Keeps the clicked link active until scrolling has been idle for 150ms."
|
|
11258
|
+
},
|
|
11259
|
+
{
|
|
11260
|
+
"kind": "field",
|
|
11261
|
+
"name": "_onScroll",
|
|
11262
|
+
"privacy": "private"
|
|
11263
|
+
},
|
|
11264
|
+
{
|
|
11265
|
+
"kind": "method",
|
|
11266
|
+
"name": "_handleClick",
|
|
11267
|
+
"privacy": "private",
|
|
11268
|
+
"parameters": [
|
|
11269
|
+
{
|
|
11270
|
+
"name": "e",
|
|
11271
|
+
"type": {
|
|
11272
|
+
"text": "MouseEvent"
|
|
11273
|
+
}
|
|
11274
|
+
},
|
|
11275
|
+
{
|
|
11276
|
+
"name": "item",
|
|
11277
|
+
"type": {
|
|
11278
|
+
"text": "TrackedHeading"
|
|
11279
|
+
}
|
|
11280
|
+
},
|
|
11281
|
+
{
|
|
11282
|
+
"name": "index",
|
|
11283
|
+
"type": {
|
|
11284
|
+
"text": "number"
|
|
11285
|
+
}
|
|
11286
|
+
}
|
|
11287
|
+
],
|
|
11288
|
+
"description": "Event Handlers\n--------------------------------------------------------------------------"
|
|
11289
|
+
}
|
|
11290
|
+
],
|
|
11291
|
+
"events": [
|
|
11292
|
+
{
|
|
11293
|
+
"type": {
|
|
11294
|
+
"text": "NysOnThisPageClickEvent"
|
|
11295
|
+
},
|
|
11296
|
+
"description": "Fired when a link is activated, by mouse or keyboard. Detail: `{id, label, index}`.",
|
|
11297
|
+
"name": "nys-click"
|
|
11298
|
+
}
|
|
11299
|
+
],
|
|
11300
|
+
"attributes": [
|
|
11301
|
+
{
|
|
11302
|
+
"name": "id",
|
|
11303
|
+
"type": {
|
|
11304
|
+
"text": "string"
|
|
11305
|
+
},
|
|
11306
|
+
"default": "\"\"",
|
|
11307
|
+
"description": "Unique identifier. Auto-generated by the shared base if not provided.",
|
|
11308
|
+
"fieldName": "id"
|
|
11309
|
+
},
|
|
11310
|
+
{
|
|
11311
|
+
"name": "headingTracker",
|
|
11312
|
+
"type": {
|
|
11313
|
+
"text": "HeadingTag"
|
|
11314
|
+
},
|
|
11315
|
+
"default": "\"h2\"",
|
|
11316
|
+
"description": "Heading level to track and link. `h1` is excluded.",
|
|
11317
|
+
"fieldName": "headingTracker"
|
|
11318
|
+
},
|
|
11319
|
+
{
|
|
11320
|
+
"name": "heading",
|
|
11321
|
+
"type": {
|
|
11322
|
+
"text": "string"
|
|
11323
|
+
},
|
|
11324
|
+
"default": "\"On this page\"",
|
|
11325
|
+
"description": "Nav heading text.",
|
|
11326
|
+
"fieldName": "heading"
|
|
11327
|
+
},
|
|
11328
|
+
{
|
|
11329
|
+
"name": "scope",
|
|
11330
|
+
"type": {
|
|
11331
|
+
"text": "string"
|
|
11332
|
+
},
|
|
11333
|
+
"default": "\"main\"",
|
|
11334
|
+
"description": "CSS selector for the container whose headings are tracked.",
|
|
11335
|
+
"fieldName": "scope"
|
|
11336
|
+
},
|
|
11337
|
+
{
|
|
11338
|
+
"name": "disableSticky",
|
|
11339
|
+
"type": {
|
|
11340
|
+
"text": "boolean"
|
|
11341
|
+
},
|
|
11342
|
+
"default": "false",
|
|
11343
|
+
"description": "Turns off the sticky behavior, so the nav scrolls with the page.\nSticky only applies on viewports 480px wide or larger.",
|
|
11344
|
+
"fieldName": "disableSticky"
|
|
11345
|
+
},
|
|
11346
|
+
{
|
|
11347
|
+
"name": "offset",
|
|
11348
|
+
"type": {
|
|
11349
|
+
"text": "number"
|
|
11350
|
+
},
|
|
11351
|
+
"default": "80",
|
|
11352
|
+
"description": "Distance (px) from the viewport top to the trigger line. Also sets\n`scroll-margin-top` on tracked headings and the sticky `top` value.",
|
|
11353
|
+
"fieldName": "offset"
|
|
11354
|
+
},
|
|
11355
|
+
{
|
|
11356
|
+
"name": "disableSmoothScroll",
|
|
11357
|
+
"type": {
|
|
11358
|
+
"text": "boolean"
|
|
11359
|
+
},
|
|
11360
|
+
"default": "false",
|
|
11361
|
+
"description": "Turns off smooth scrolling. Already off for visitors with `prefers-reduced-motion`.",
|
|
11362
|
+
"fieldName": "disableSmoothScroll"
|
|
11363
|
+
},
|
|
11364
|
+
{
|
|
11365
|
+
"name": "hashBehavior",
|
|
11366
|
+
"type": {
|
|
11367
|
+
"text": "HashBehavior"
|
|
11368
|
+
},
|
|
11369
|
+
"default": "\"none\"",
|
|
11370
|
+
"description": "`hash` pushes history, `replace` updates the URL silently, `none` leaves it alone.",
|
|
11371
|
+
"fieldName": "hashBehavior"
|
|
11372
|
+
}
|
|
11373
|
+
],
|
|
11374
|
+
"superclass": {
|
|
11375
|
+
"name": "NysElement",
|
|
11376
|
+
"package": "@nysds/internals"
|
|
11377
|
+
},
|
|
11378
|
+
"tagName": "nys-onthispage",
|
|
11379
|
+
"customElement": true,
|
|
11380
|
+
"summary": "In-page navigation that links to page headings and highlights the current section.",
|
|
11381
|
+
"examples": [
|
|
11382
|
+
{
|
|
11383
|
+
"title": "Basic",
|
|
11384
|
+
"code": "<div style=\"display: flex; gap: 2rem; align-items: flex-start;\">\n<nys-onthispage style=\"flex: 0 0 220px;\"></nys-onthispage>\n\n<main style=\"flex: 1; min-width: 0;\">\n<h1>Apply for a permit</h1>\n<p>Use this guide to find out if you qualify and how to apply.</p>\n\n<h2>Eligibility</h2>\n<p>You must be a New York State resident aged 18 or older.</p>\n<p>Additional eligibility requirements may apply.</p>\n<p>Review the requirements before submitting your application.</p>\n\n<h2>How to apply</h2>\n<p>Complete the online form and upload your supporting documents.</p>\n<p>Make sure all information is accurate before submitting.</p>\n<p>Keep a copy of your application for your records.</p>\n\n<h2>Required documents</h2>\n<p>Bring a valid proof of identity, proof of address, and any other supporting documentation.</p>\n<p>Additional documents may be requested during review.</p>\n<p>Ensure your documents are current and legible.</p>\n\n<h2>What happens next</h2>\n<p>We review applications within 10 business days.</p>\n<p>You may be contacted if additional information is needed.</p>\n<p>You will receive a notification when a decision has been made.</p>\n</main>\n</div>",
|
|
11385
|
+
"lang": "html"
|
|
11386
|
+
},
|
|
11387
|
+
{
|
|
11388
|
+
"title": "Turn off sticky",
|
|
11389
|
+
"code": "<div style=\"display: flex; gap: 2rem; align-items: flex-start;\">\n<nys-onthispage disableSticky offset=\"24\"></nys-onthispage>\n\n<main style=\"flex: 1; min-width: 0;\">\n<h1>Apply for a permit</h1>\n<p>Use this guide to find out if you qualify and how to apply.</p>\n\n<h2>Eligibility</h2>\n<p>You must be a New York State resident aged 18 or older.</p>\n<p style=\"min-height: 60vh;\">Review the requirements before submitting your application.</p>\n\n<h2>How to apply</h2>\n<p>Complete the online form and upload your supporting documents.</p>\n<p style=\"min-height: 60vh;\">Keep a copy of your application for your records.</p>\n\n<h2>Required documents</h2>\n<p>Bring a valid proof of identity, proof of address, and any other supporting documentation.</p>\n<p style=\"min-height: 60vh;\">Ensure your documents are current and legible.</p>\n\n<h2>What happens next</h2>\n<p>We review applications within 10 business days.</p>\n<p style=\"min-height: 60vh;\">You will receive a notification when a decision has been made.</p>\n</main>\n</div>",
|
|
11390
|
+
"lang": "html"
|
|
11391
|
+
},
|
|
11392
|
+
{
|
|
11393
|
+
"title": "Custom heading",
|
|
11394
|
+
"code": "<div style=\"display: flex; gap: 2rem; align-items: flex-start;\">\n<nys-onthispage\nheading=\"In this guide\"\n></nys-onthispage>\n\n<main style=\"flex: 1; min-width: 0;\">\n<h1>Apply for a permit</h1>\n\n<h2>Eligibility</h2>\n<p>You must be a New York State resident aged 18 or older.</p>\n\n<h2>How to apply</h2>\n<p>Complete the online form and upload your supporting documents.</p>\n\n<h2>What happens next</h2>\n<p>We review applications within 10 business days.</p>\n</main>\n</div>",
|
|
11395
|
+
"lang": "html"
|
|
11396
|
+
},
|
|
11397
|
+
{
|
|
11398
|
+
"title": "Track a different heading level",
|
|
11399
|
+
"code": "<nys-onthispage headingTracker=\"h3\" scope=\"#guide\"></nys-onthispage>\n\n<article id=\"guide\">\n<h1>Part 1 (h1 tag)</h1>\n<h2>Part 2 (h2 tag)</h2>\n<h3>Eligibility (h3 tag)</h3>\n<h3>How to apply (h3 tag)</h3>\n</article>",
|
|
11400
|
+
"lang": "html"
|
|
11401
|
+
},
|
|
11402
|
+
{
|
|
11403
|
+
"title": "Exclude a heading",
|
|
11404
|
+
"code": "<div style=\"display: flex; gap: 2rem; align-items: flex-start;\">\n<nys-onthispage></nys-onthispage>\n\n<main style=\"flex: 1; min-width: 0;\">\n<h1>Apply for a permit</h1>\n\n<h2>Eligibility</h2>\n<p>You must be a New York State resident aged 18 or older.</p>\n\n<h2>How to apply</h2>\n<p>Complete the online form and upload your supporting documents.</p>\n\n<h2 data-nys-onthispage-ignore>Related links</h2>\n<p>This heading does not appear in the list.</p>\n</main>\n</div>",
|
|
11405
|
+
"lang": "html"
|
|
11406
|
+
},
|
|
11407
|
+
{
|
|
11408
|
+
"title": "Use your own heading ids",
|
|
11409
|
+
"code": "<div style=\"display: flex; gap: 2rem; align-items: flex-start;\">\n<nys-onthispage style=\"flex: 0 0 220px;\"></nys-onthispage>\n\n<main style=\"flex: 1; min-width: 0;\">\n<h1>Apply for a permit</h1>\n\n<h2 id=\"eligibility\">Eligibility</h2>\n<p>The link uses your id: #eligibility.</p>\n\n<h2>How to apply</h2>\n<p>No id set, so one is generated: #how-to-apply.</p>\n\n<h2>How to apply</h2>\n<p>Same text, so the generated id gets a suffix: #how-to-apply-2.</p>\n</main>\n</div>",
|
|
11410
|
+
"lang": "html"
|
|
11411
|
+
},
|
|
11412
|
+
{
|
|
11413
|
+
"title": "Update the URL hash",
|
|
11414
|
+
"code": "<div style=\"display: flex; gap: 2rem; align-items: flex-start;\">\n<nys-onthispage\nhashBehavior=\"replace\"\nstyle=\"flex: 0 0 220px;\"\n></nys-onthispage>\n\n<main style=\"flex: 1; min-width: 0;\">\n<h1>Apply for a permit</h1>\n\n<h2>Eligibility</h2>\n<p style=\"min-height: 80vh;\">You must be a New York State resident.</p>\n\n<h2>How to apply</h2>\n<p style=\"min-height: 80vh;\">Complete the online form.</p>\n\n<h2>What happens next</h2>\n<p style=\"min-height: 80vh;\">We review applications within 10 business days.</p>\n</main>\n</div>",
|
|
11415
|
+
"lang": "html"
|
|
11416
|
+
},
|
|
11417
|
+
{
|
|
11418
|
+
"title": "Turn off smooth scrolling",
|
|
11419
|
+
"code": "<div style=\"display: flex; gap: 2rem; align-items: flex-start;\">\n<nys-onthispage\ndisableSmoothScroll\nstyle=\"flex: 0 0 220px;\"\n></nys-onthispage>\n\n<main style=\"flex: 1; min-width: 0;\">\n<h1>Apply for a permit</h1>\n\n<h2>Eligibility</h2>\n<p style=\"min-height: 80vh;\">You must be a New York State resident.</p>\n\n<h2>How to apply</h2>\n<p style=\"min-height: 80vh;\">Complete the online form.</p>\n\n<h2>What happens next</h2>\n<p style=\"min-height: 80vh;\">We review applications within 10 business days.</p>\n</main>\n</div>",
|
|
11420
|
+
"lang": "html"
|
|
11421
|
+
},
|
|
11422
|
+
{
|
|
11423
|
+
"title": "Page layout",
|
|
11424
|
+
"code": "<nys-unavheader></nys-unavheader>\n\n<nys-globalheader appName=\"NYS Design System\" homepageLink=\"/\">\n<ul>\n<li><a href=\"#\">Item 1</a></li>\n<li><a href=\"#\">Item 2</a></li>\n<li><a href=\"#\">Item 3</a></li>\n<li><a href=\"#\">Item 4</a></li>\n<li><a href=\"#\">Item 5</a></li>\n</ul>\n</nys-globalheader>\n\n<div class=\"nys-grid-container\">\n<div class=\"nys-grid-row nys-grid-gap\">\n<main class=\"nys-desktop:nys-grid-col-9\">\n<h1>Welcome to the Empire State of Mind</h1>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit? Nope. Here, we say: grab a bagel, check the Erie Canal, and see what the Adirondacks are up to today.</p>\n\n<h2>Apple picking season</h2>\n<p style=\"min-height: 60vh;\">Orchards from the Hudson Valley to the Finger Lakes are open. Bring a basket, a sweater, and a strong opinion about cider donuts. Honeycrisp is the correct answer, but we will hear other opinions.</p>\n\n<h2>Pizza by the slice</h2>\n<p style=\"min-height: 60vh;\">Fold it. Do not eat it with a fork. A proper slice is hot, floppy, and cheaper than your parking meter. Every borough believes theirs is the best, and every borough is slightly right.</p>\n\n<h2>Road trip to Niagara Falls</h2>\n<p style=\"min-height: 60vh;\">Pack snacks and head west on the Thruway. Rest stops are plentiful, the falls are loud, and the mist is free. Bring a poncho if you plan to get close.</p>\n\n<h2>Snow day survival guide</h2>\n<p style=\"min-height: 60vh;\">Upstate gets a lot of snow, and Upstate is not impressed. Shovel early, check on your neighbors, and keep the hot chocolate within reach.</p>\n</main>\n\n<aside class=\"nys-desktop:nys-grid-col-3 nys-order-first nys-desktop:nys-order-last\" style=\"margin-top: var(--nys-space-600)\">\n<nys-onthispage offset=\"24\"></nys-onthispage>\n</aside>\n</div>\n</div>\n\n<nys-globalfooter agencyName=\"NYS Design System\" homepageLink=\"/\">\n<ul>\n<li><a href=\"#\">Privacy Policy</a></li>\n<li><a href=\"#\">Terms of Use</a></li>\n</ul>\n</nys-globalfooter>\n<nys-unavfooter></nys-unavfooter>",
|
|
11425
|
+
"lang": "html"
|
|
11426
|
+
},
|
|
11427
|
+
{
|
|
11428
|
+
"title": "Listen for link activation",
|
|
11429
|
+
"code": "<div style=\"display: flex; gap: 2rem; align-items: flex-start;\">\n<nys-onthispage id=\"toc\" style=\"flex: 0 0 220px;\"></nys-onthispage>\n\n<main style=\"flex: 1; min-width: 0;\">\n<h1>Apply for a permit</h1>\n\n<h2>Eligibility</h2>\n<p>You must be a New York State resident aged 18 or older.</p>\n\n<h2>How to apply</h2>\n<p>Complete the online form and upload your supporting documents.</p>\n\n<h2>What happens next</h2>\n<p>We review applications within 10 business days.</p>\n</main>\n</div>\n\n<script>\ndocument.querySelector(\"#toc\").addEventListener(\"nys-click\", (e) => {\nconst { id, label, index } = e.detail;\nconsole.log(`Clicked \"${label}\" (#${id}, position ${index})`);\n});\n</script>",
|
|
11430
|
+
"lang": "html"
|
|
11431
|
+
}
|
|
11432
|
+
],
|
|
11433
|
+
"usage": [
|
|
11434
|
+
"Use as a table of contents on lengthy pages to give a structural overview and let users jump to a section.",
|
|
11435
|
+
"Use on pages with at least three distinct sections, or content longer than three screen heights.",
|
|
11436
|
+
"Keep the link order the same as the order of the section headings on the page.",
|
|
11437
|
+
"Use \"On this page\" as the heading so the nav is clearly labeled and stands apart from other links.",
|
|
11438
|
+
"Keep the link text identical to the heading it links to.",
|
|
11439
|
+
"Let link text wrap to a second line instead of truncating it.",
|
|
11440
|
+
"Clearly show the active link so users can track their position as they scroll or after they click a link.",
|
|
11441
|
+
"On desktop, place it in the left sidebar. If vertical navigation is on the left, place it in the right sidebar.",
|
|
11442
|
+
"On tablet and mobile, place it above the main content and below the page heading.",
|
|
11443
|
+
"Don't use on pages with minimal content or a small number of sections, where scrolling isn't an issue.",
|
|
11444
|
+
"Don't use to link to other pages. Use `<nys-verticalnav>` instead.",
|
|
11445
|
+
"Don't use for heading levels lower than H3, such as H4, H5, or H6.",
|
|
11446
|
+
"Don't shorten, rephrase, or summarize a heading for its link."
|
|
11447
|
+
]
|
|
11448
|
+
}
|
|
11449
|
+
],
|
|
11450
|
+
"exports": [
|
|
11451
|
+
{
|
|
11452
|
+
"kind": "custom-element-definition",
|
|
11453
|
+
"name": "nys-onthispage",
|
|
11454
|
+
"declaration": {
|
|
11455
|
+
"name": "NysOnthispage",
|
|
11456
|
+
"module": "packages/nys-onthispage/src/nys-onthispage.ts"
|
|
11457
|
+
}
|
|
11458
|
+
},
|
|
11459
|
+
{
|
|
11460
|
+
"kind": "js",
|
|
11461
|
+
"name": "NysOnthispage",
|
|
11462
|
+
"declaration": {
|
|
11463
|
+
"name": "NysOnthispage",
|
|
11464
|
+
"module": "packages/nys-onthispage/src/nys-onthispage.ts"
|
|
11465
|
+
}
|
|
11466
|
+
}
|
|
11467
|
+
]
|
|
11468
|
+
},
|
|
11013
11469
|
{
|
|
11014
11470
|
"kind": "javascript-module",
|
|
11015
11471
|
"path": "packages/nys-pagination/src/index.ts",
|
|
@@ -14086,13 +14542,13 @@
|
|
|
14086
14542
|
},
|
|
14087
14543
|
{
|
|
14088
14544
|
"kind": "field",
|
|
14089
|
-
"name": "
|
|
14545
|
+
"name": "_counterText",
|
|
14090
14546
|
"type": {
|
|
14091
14547
|
"text": "string"
|
|
14092
14548
|
},
|
|
14549
|
+
"privacy": "private",
|
|
14093
14550
|
"default": "\"initial\"",
|
|
14094
|
-
"description": "Progress text displayed in compact mode (e.g., \"Step 2 of 5\").
|
|
14095
|
-
"attribute": "counterText"
|
|
14551
|
+
"description": "Progress text displayed in compact mode (e.g., \"Step 2 of 5\"). Derived from the steps."
|
|
14096
14552
|
},
|
|
14097
14553
|
{
|
|
14098
14554
|
"kind": "field",
|
|
@@ -14189,15 +14645,6 @@
|
|
|
14189
14645
|
"description": "Title displayed above the step list and compact counter.",
|
|
14190
14646
|
"fieldName": "label"
|
|
14191
14647
|
},
|
|
14192
|
-
{
|
|
14193
|
-
"name": "counterText",
|
|
14194
|
-
"type": {
|
|
14195
|
-
"text": "string"
|
|
14196
|
-
},
|
|
14197
|
-
"default": "\"initial\"",
|
|
14198
|
-
"description": "Progress text displayed in compact mode (e.g., \"Step 2 of 5\"). Auto-managed — do not set manually.",
|
|
14199
|
-
"fieldName": "counterText"
|
|
14200
|
-
},
|
|
14201
14648
|
{
|
|
14202
14649
|
"name": "isCompactExpanded",
|
|
14203
14650
|
"type": {
|
|
@@ -18035,43 +18482,43 @@
|
|
|
18035
18482
|
"members": [
|
|
18036
18483
|
{
|
|
18037
18484
|
"kind": "field",
|
|
18038
|
-
"name": "
|
|
18485
|
+
"name": "_trustbarVisible",
|
|
18039
18486
|
"type": {
|
|
18040
18487
|
"text": "boolean"
|
|
18041
18488
|
},
|
|
18489
|
+
"privacy": "private",
|
|
18042
18490
|
"default": "false",
|
|
18043
|
-
"description": "
|
|
18044
|
-
"attribute": "trustbarVisible"
|
|
18491
|
+
"description": "Whether trust bar panel is expanded."
|
|
18045
18492
|
},
|
|
18046
18493
|
{
|
|
18047
18494
|
"kind": "field",
|
|
18048
|
-
"name": "
|
|
18495
|
+
"name": "_searchDropdownVisible",
|
|
18049
18496
|
"type": {
|
|
18050
18497
|
"text": "boolean"
|
|
18051
18498
|
},
|
|
18499
|
+
"privacy": "private",
|
|
18052
18500
|
"default": "false",
|
|
18053
|
-
"description": "
|
|
18054
|
-
"attribute": "searchDropdownVisible"
|
|
18501
|
+
"description": "Whether search dropdown is visible (mobile)."
|
|
18055
18502
|
},
|
|
18056
18503
|
{
|
|
18057
18504
|
"kind": "field",
|
|
18058
|
-
"name": "
|
|
18505
|
+
"name": "_languageVisible",
|
|
18059
18506
|
"type": {
|
|
18060
18507
|
"text": "boolean"
|
|
18061
18508
|
},
|
|
18509
|
+
"privacy": "private",
|
|
18062
18510
|
"default": "false",
|
|
18063
|
-
"description": "
|
|
18064
|
-
"attribute": "languageVisible"
|
|
18511
|
+
"description": "Whether language dropdown is visible."
|
|
18065
18512
|
},
|
|
18066
18513
|
{
|
|
18067
18514
|
"kind": "field",
|
|
18068
|
-
"name": "
|
|
18515
|
+
"name": "_isSearchFocused",
|
|
18069
18516
|
"type": {
|
|
18070
18517
|
"text": "boolean"
|
|
18071
18518
|
},
|
|
18519
|
+
"privacy": "private",
|
|
18072
18520
|
"default": "false",
|
|
18073
|
-
"description": "
|
|
18074
|
-
"attribute": "isSearchFocused"
|
|
18521
|
+
"description": "Whether search input is focused."
|
|
18075
18522
|
},
|
|
18076
18523
|
{
|
|
18077
18524
|
"kind": "field",
|
|
@@ -18573,42 +19020,6 @@
|
|
|
18573
19020
|
}
|
|
18574
19021
|
],
|
|
18575
19022
|
"attributes": [
|
|
18576
|
-
{
|
|
18577
|
-
"name": "trustbarVisible",
|
|
18578
|
-
"type": {
|
|
18579
|
-
"text": "boolean"
|
|
18580
|
-
},
|
|
18581
|
-
"default": "false",
|
|
18582
|
-
"description": "Internal: Whether trust bar panel is expanded.",
|
|
18583
|
-
"fieldName": "trustbarVisible"
|
|
18584
|
-
},
|
|
18585
|
-
{
|
|
18586
|
-
"name": "searchDropdownVisible",
|
|
18587
|
-
"type": {
|
|
18588
|
-
"text": "boolean"
|
|
18589
|
-
},
|
|
18590
|
-
"default": "false",
|
|
18591
|
-
"description": "Internal: Whether search dropdown is visible (mobile).",
|
|
18592
|
-
"fieldName": "searchDropdownVisible"
|
|
18593
|
-
},
|
|
18594
|
-
{
|
|
18595
|
-
"name": "languageVisible",
|
|
18596
|
-
"type": {
|
|
18597
|
-
"text": "boolean"
|
|
18598
|
-
},
|
|
18599
|
-
"default": "false",
|
|
18600
|
-
"description": "Internal: Whether language dropdown is visible.",
|
|
18601
|
-
"fieldName": "languageVisible"
|
|
18602
|
-
},
|
|
18603
|
-
{
|
|
18604
|
-
"name": "isSearchFocused",
|
|
18605
|
-
"type": {
|
|
18606
|
-
"text": "boolean"
|
|
18607
|
-
},
|
|
18608
|
-
"default": "false",
|
|
18609
|
-
"description": "Internal: Whether search input is focused.",
|
|
18610
|
-
"fieldName": "isSearchFocused"
|
|
18611
|
-
},
|
|
18612
19023
|
{
|
|
18613
19024
|
"name": "hideTranslate",
|
|
18614
19025
|
"type": {
|
|
@@ -18955,6 +19366,15 @@
|
|
|
18955
19366
|
"privacy": "private"
|
|
18956
19367
|
}
|
|
18957
19368
|
],
|
|
19369
|
+
"events": [
|
|
19370
|
+
{
|
|
19371
|
+
"type": {
|
|
19372
|
+
"text": "NysVerticalnavToggleEvent"
|
|
19373
|
+
},
|
|
19374
|
+
"description": "Fired when the mobile accordion opens or closes. Detail: `{id, expanded}`. Bubbles and composed.",
|
|
19375
|
+
"name": "nys-verticalnav-toggle"
|
|
19376
|
+
}
|
|
19377
|
+
],
|
|
18958
19378
|
"attributes": [
|
|
18959
19379
|
{
|
|
18960
19380
|
"name": "id",
|
|
@@ -19035,7 +19455,7 @@
|
|
|
19035
19455
|
},
|
|
19036
19456
|
{
|
|
19037
19457
|
"title": "Dropdown group",
|
|
19038
|
-
"code": "<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>",
|
|
19458
|
+
"code": "<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 <li><a href=\"\">Accordion Accessibility Checklist</a></li>\n <li><a href=\"\">Build an Accessible Accordion</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>",
|
|
19039
19459
|
"lang": "html"
|
|
19040
19460
|
},
|
|
19041
19461
|
{
|