@nysds/components 1.18.1 → 1.19.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 +799 -372
- package/dist/.vscode/vscode.html-custom-data.json +29 -24
- package/dist/custom-elements.json +799 -372
- package/dist/icons/ac_unit.svg +8 -0
- package/dist/icons/account_balance_filled.svg +8 -0
- package/dist/icons/account_circle.svg +8 -0
- package/dist/icons/add.svg +8 -0
- package/dist/icons/air.svg +8 -0
- package/dist/icons/arrow_back.svg +8 -0
- package/dist/icons/arrow_downward.svg +8 -0
- package/dist/icons/arrow_forward.svg +8 -0
- package/dist/icons/arrow_upward.svg +8 -0
- package/dist/icons/attach_file.svg +8 -0
- package/dist/icons/calendar_month.svg +8 -0
- package/dist/icons/cancel.svg +8 -0
- package/dist/icons/cancel_filled.svg +8 -0
- package/dist/icons/check.svg +8 -0
- package/dist/icons/check_circle.svg +8 -0
- package/dist/icons/chevron_down.svg +8 -0
- package/dist/icons/chevron_left.svg +8 -0
- package/dist/icons/chevron_right.svg +8 -0
- package/dist/icons/chevron_up.svg +8 -0
- package/dist/icons/clear_day.svg +8 -0
- package/dist/icons/close.svg +8 -0
- package/dist/icons/code.svg +8 -0
- package/dist/icons/content_copy.svg +8 -0
- package/dist/icons/coronavirus.svg +8 -0
- package/dist/icons/delete.svg +8 -0
- package/dist/icons/download.svg +8 -0
- package/dist/icons/download_done.svg +8 -0
- package/dist/icons/drive_folder_upload.svg +8 -0
- package/dist/icons/edit_square.svg +8 -0
- package/dist/icons/emergency_home.svg +8 -0
- package/dist/icons/error.svg +8 -0
- package/dist/icons/expand_all.svg +8 -0
- package/dist/icons/filter_alt.svg +8 -0
- package/dist/icons/filter_list.svg +8 -0
- package/dist/icons/height.svg +8 -0
- package/dist/icons/help.svg +8 -0
- package/dist/icons/info.svg +8 -0
- package/dist/icons/language.svg +8 -0
- package/dist/icons/language_filled.svg +8 -0
- package/dist/icons/link.svg +8 -0
- package/dist/icons/lock_filled.svg +8 -0
- package/dist/icons/mail.svg +8 -0
- package/dist/icons/manifest.json +84 -0
- package/dist/icons/menu.svg +8 -0
- package/dist/icons/more_vert.svg +8 -0
- package/dist/icons/notifications.svg +8 -0
- package/dist/icons/open_in_new.svg +8 -0
- package/dist/icons/phone_in_talk.svg +8 -0
- package/dist/icons/print.svg +8 -0
- package/dist/icons/progress_activity.svg +8 -0
- package/dist/icons/publish.svg +8 -0
- package/dist/icons/rainy.svg +8 -0
- package/dist/icons/refresh.svg +8 -0
- package/dist/icons/remove.svg +8 -0
- package/dist/icons/search.svg +8 -0
- package/dist/icons/share.svg +8 -0
- package/dist/icons/sms.svg +8 -0
- package/dist/icons/social_bluesky.svg +8 -0
- package/dist/icons/social_facebook.svg +8 -0
- package/dist/icons/social_flickr.svg +8 -0
- package/dist/icons/social_google_play.svg +8 -0
- package/dist/icons/social_instagram.svg +10 -0
- package/dist/icons/social_linkedin.svg +8 -0
- package/dist/icons/social_pinterest.svg +8 -0
- package/dist/icons/social_rss.svg +10 -0
- package/dist/icons/social_snapchat.svg +8 -0
- package/dist/icons/social_soundcloud.svg +21 -0
- package/dist/icons/social_threads.svg +9 -0
- package/dist/icons/social_tiktok.svg +8 -0
- package/dist/icons/social_tumblr.svg +8 -0
- package/dist/icons/social_vimeo.svg +8 -0
- package/dist/icons/social_x.svg +8 -0
- package/dist/icons/social_youtube.svg +8 -0
- package/dist/icons/sort.svg +8 -0
- package/dist/icons/straight.svg +8 -0
- package/dist/icons/thumb_down.svg +8 -0
- package/dist/icons/thumb_up.svg +8 -0
- package/dist/icons/upload_file.svg +8 -0
- package/dist/icons/visibility.svg +8 -0
- package/dist/icons/visibility_off.svg +8 -0
- package/dist/icons/warning.svg +8 -0
- package/dist/nysds.es.js +3762 -3630
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +342 -865
- package/dist/nysds.js.map +1 -1
- package/dist/packages/mcp-server/src/lib/token-parser.d.ts +19 -31
- package/dist/packages/mcp-server/src/tools/token-tools.d.ts +2 -3
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +2 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +3 -3
- package/dist/packages/nys-button/src/nys-button.d.ts +5 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +2 -1
- package/dist/packages/nys-divider/src/nys-divider.d.ts +2 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +1 -1
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +3 -0
- package/dist/packages/nys-icon/src/icon-cache.d.ts +11 -0
- package/dist/packages/nys-icon/src/icon-library-registry.d.ts +47 -0
- package/dist/packages/nys-icon/src/index.d.ts +3 -0
- package/dist/packages/nys-icon/src/nys-icon.d.ts +40 -11
- package/dist/packages/nys-modal/src/nys-modal.d.ts +1 -0
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +1 -38
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +17 -7
- package/dist/packages/nys-stepper/src/nys-step.d.ts +75 -23
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +81 -9
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +1 -0
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +1 -0
- package/package.json +12 -6
- package/packages/react/NysDivider.d.ts +3 -0
- package/packages/react/NysDivider.js +2 -1
- package/packages/react/NysIcon.d.ts +11 -2
- package/packages/react/NysIcon.js +26 -3
- package/packages/react/NysRadiobutton.d.ts +7 -23
- package/packages/react/NysRadiobutton.js +1 -3
- package/packages/react/NysRadiogroup.d.ts +18 -2
- package/packages/react/NysRadiogroup.js +17 -1
- package/packages/react/NysStep.d.ts +10 -12
- package/packages/react/NysStep.js +1 -12
- package/packages/react/NysStepper.d.ts +6 -6
- package/packages/react/nysds-jsx.d.ts +46 -36
- package/dist/packages/mcp-server/src/lib/format.d.ts +0 -21
package/custom-elements.json
CHANGED
|
@@ -893,6 +893,26 @@
|
|
|
893
893
|
"name": "_handleSlotChange",
|
|
894
894
|
"privacy": "private"
|
|
895
895
|
},
|
|
896
|
+
{
|
|
897
|
+
"kind": "field",
|
|
898
|
+
"name": "_cleanAriaLabel",
|
|
899
|
+
"type": {
|
|
900
|
+
"text": "string"
|
|
901
|
+
},
|
|
902
|
+
"privacy": "private",
|
|
903
|
+
"description": "Functions\n--------------------------------------------------------------------------",
|
|
904
|
+
"readonly": true
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"kind": "method",
|
|
908
|
+
"name": "_colorStyle",
|
|
909
|
+
"privacy": "private",
|
|
910
|
+
"return": {
|
|
911
|
+
"type": {
|
|
912
|
+
"text": "string"
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
},
|
|
896
916
|
{
|
|
897
917
|
"kind": "method",
|
|
898
918
|
"name": "getContrastForeground",
|
|
@@ -1058,7 +1078,7 @@
|
|
|
1058
1078
|
"declarations": [
|
|
1059
1079
|
{
|
|
1060
1080
|
"kind": "class",
|
|
1061
|
-
"description": "A floating \"Back to top\" button that appears after scrolling. Smooth-scrolls to page top when clicked.\n\nAuto-shows after scrolling 1.5 viewports on pages 4+ screens tall. Set `visible` to force display.\nRenders as circle button on mobile. Position with `position` prop (`left` or `right`).\n\n**Placement:** For best accessibility, place as the first focusable element in the page footer.\nIf no footer exists, place at the bottom of the body tag (after main content). Floating\npositioning allows it to overlay content without taking up layout space.\n\n**Focus Management:** When clicked, after scrolling to the top, focus is
|
|
1081
|
+
"description": "A floating \"Back to top\" button that appears after scrolling. Smooth-scrolls to page top when clicked.\n\nAuto-shows after scrolling 1.5 viewports on pages 4+ screens tall. Set `visible` to force display.\nRenders as circle button on mobile. Position with `position` prop (`left` or `right`).\n\n**Placement:** For best accessibility, place as the first focusable element in the page footer.\nIf no footer exists, place at the bottom of the body tag (after main content). Floating\npositioning allows it to overlay content without taking up layout space.\n\n**Focus Management:** When clicked, after scrolling to the top, focus is moved to `<body>`.\nThis places the user before the skip-navigation link so they can re-use it to jump directly\nback to main content — and works regardless of whether the page uses `<main>` or heading landmarks.",
|
|
1062
1082
|
"name": "NysBacktotop",
|
|
1063
1083
|
"members": [
|
|
1064
1084
|
{
|
|
@@ -2188,6 +2208,24 @@
|
|
|
2188
2208
|
},
|
|
2189
2209
|
"privacy": "private"
|
|
2190
2210
|
},
|
|
2211
|
+
{
|
|
2212
|
+
"kind": "field",
|
|
2213
|
+
"name": "_hasPrefixSlot",
|
|
2214
|
+
"type": {
|
|
2215
|
+
"text": "boolean"
|
|
2216
|
+
},
|
|
2217
|
+
"privacy": "private",
|
|
2218
|
+
"default": "false"
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
"kind": "field",
|
|
2222
|
+
"name": "_hasSuffixSlot",
|
|
2223
|
+
"type": {
|
|
2224
|
+
"text": "boolean"
|
|
2225
|
+
},
|
|
2226
|
+
"privacy": "private",
|
|
2227
|
+
"default": "false"
|
|
2228
|
+
},
|
|
2191
2229
|
{
|
|
2192
2230
|
"kind": "field",
|
|
2193
2231
|
"name": "formAssociated",
|
|
@@ -2204,6 +2242,32 @@
|
|
|
2204
2242
|
"privacy": "private",
|
|
2205
2243
|
"description": "Functions\n--------------------------------------------------------------------------"
|
|
2206
2244
|
},
|
|
2245
|
+
{
|
|
2246
|
+
"kind": "method",
|
|
2247
|
+
"name": "_onPrefixSlotChange",
|
|
2248
|
+
"privacy": "private",
|
|
2249
|
+
"parameters": [
|
|
2250
|
+
{
|
|
2251
|
+
"name": "e",
|
|
2252
|
+
"type": {
|
|
2253
|
+
"text": "Event"
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
]
|
|
2257
|
+
},
|
|
2258
|
+
{
|
|
2259
|
+
"kind": "method",
|
|
2260
|
+
"name": "_onSuffixSlotChange",
|
|
2261
|
+
"privacy": "private",
|
|
2262
|
+
"parameters": [
|
|
2263
|
+
{
|
|
2264
|
+
"name": "e",
|
|
2265
|
+
"type": {
|
|
2266
|
+
"text": "Event"
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
]
|
|
2270
|
+
},
|
|
2207
2271
|
{
|
|
2208
2272
|
"kind": "method",
|
|
2209
2273
|
"name": "_manageFormAction",
|
|
@@ -2246,6 +2310,19 @@
|
|
|
2246
2310
|
}
|
|
2247
2311
|
]
|
|
2248
2312
|
},
|
|
2313
|
+
{
|
|
2314
|
+
"kind": "method",
|
|
2315
|
+
"name": "_handleKeyup",
|
|
2316
|
+
"privacy": "private",
|
|
2317
|
+
"parameters": [
|
|
2318
|
+
{
|
|
2319
|
+
"name": "e",
|
|
2320
|
+
"type": {
|
|
2321
|
+
"text": "KeyboardEvent"
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
]
|
|
2325
|
+
},
|
|
2249
2326
|
{
|
|
2250
2327
|
"kind": "method",
|
|
2251
2328
|
"name": "_handleAnyAttributeFunction",
|
|
@@ -2777,6 +2854,11 @@
|
|
|
2777
2854
|
"default": "false",
|
|
2778
2855
|
"attribute": "showOtherError"
|
|
2779
2856
|
},
|
|
2857
|
+
{
|
|
2858
|
+
"kind": "field",
|
|
2859
|
+
"name": "_mobileQuery",
|
|
2860
|
+
"privacy": "private"
|
|
2861
|
+
},
|
|
2780
2862
|
{
|
|
2781
2863
|
"kind": "field",
|
|
2782
2864
|
"name": "isMobile",
|
|
@@ -2889,14 +2971,14 @@
|
|
|
2889
2971
|
},
|
|
2890
2972
|
{
|
|
2891
2973
|
"kind": "field",
|
|
2892
|
-
"name": "
|
|
2893
|
-
"privacy": "private"
|
|
2974
|
+
"name": "_handleMobileQuery",
|
|
2975
|
+
"privacy": "private",
|
|
2976
|
+
"description": "Event Handlers\n--------------------------------------------------------------------------"
|
|
2894
2977
|
},
|
|
2895
2978
|
{
|
|
2896
2979
|
"kind": "method",
|
|
2897
2980
|
"name": "_emitChangeEvent",
|
|
2898
|
-
"privacy": "private"
|
|
2899
|
-
"description": "Event Handlers\n--------------------------------------------------------------------------"
|
|
2981
|
+
"privacy": "private"
|
|
2900
2982
|
},
|
|
2901
2983
|
{
|
|
2902
2984
|
"kind": "method",
|
|
@@ -5299,6 +5381,17 @@
|
|
|
5299
5381
|
"attribute": "inverted",
|
|
5300
5382
|
"reflects": true
|
|
5301
5383
|
},
|
|
5384
|
+
{
|
|
5385
|
+
"kind": "field",
|
|
5386
|
+
"name": "subtle",
|
|
5387
|
+
"type": {
|
|
5388
|
+
"text": "boolean"
|
|
5389
|
+
},
|
|
5390
|
+
"default": "false",
|
|
5391
|
+
"description": "If true, the divider will use a lighter color.",
|
|
5392
|
+
"attribute": "subtle",
|
|
5393
|
+
"reflects": true
|
|
5394
|
+
},
|
|
5302
5395
|
{
|
|
5303
5396
|
"kind": "method",
|
|
5304
5397
|
"name": "_generateUniqueId",
|
|
@@ -5316,6 +5409,16 @@
|
|
|
5316
5409
|
"description": "Adjusts colors for dark backgrounds.",
|
|
5317
5410
|
"fieldName": "inverted",
|
|
5318
5411
|
"propName": "inverted"
|
|
5412
|
+
},
|
|
5413
|
+
{
|
|
5414
|
+
"name": "subtle",
|
|
5415
|
+
"type": {
|
|
5416
|
+
"text": "boolean"
|
|
5417
|
+
},
|
|
5418
|
+
"default": "false",
|
|
5419
|
+
"description": "If true, the divider will use a lighter color.",
|
|
5420
|
+
"fieldName": "subtle",
|
|
5421
|
+
"propName": "subtle"
|
|
5319
5422
|
}
|
|
5320
5423
|
],
|
|
5321
5424
|
"superclass": {
|
|
@@ -5461,6 +5564,15 @@
|
|
|
5461
5564
|
"readonly": true,
|
|
5462
5565
|
"default": "4"
|
|
5463
5566
|
},
|
|
5567
|
+
{
|
|
5568
|
+
"kind": "field",
|
|
5569
|
+
"name": "_resizeObserver",
|
|
5570
|
+
"type": {
|
|
5571
|
+
"text": "ResizeObserver | null"
|
|
5572
|
+
},
|
|
5573
|
+
"privacy": "private",
|
|
5574
|
+
"default": "null"
|
|
5575
|
+
},
|
|
5464
5576
|
{
|
|
5465
5577
|
"kind": "method",
|
|
5466
5578
|
"name": "_findTrigger",
|
|
@@ -5689,11 +5801,6 @@
|
|
|
5689
5801
|
"name": "_handleMenuKeydown",
|
|
5690
5802
|
"privacy": "private"
|
|
5691
5803
|
},
|
|
5692
|
-
{
|
|
5693
|
-
"kind": "field",
|
|
5694
|
-
"name": "_handleWindowResize",
|
|
5695
|
-
"privacy": "private"
|
|
5696
|
-
},
|
|
5697
5804
|
{
|
|
5698
5805
|
"kind": "field",
|
|
5699
5806
|
"name": "_handleWindowScroll",
|
|
@@ -7211,6 +7318,16 @@
|
|
|
7211
7318
|
"kind": "method",
|
|
7212
7319
|
"name": "_getNysLogo",
|
|
7213
7320
|
"privacy": "private"
|
|
7321
|
+
},
|
|
7322
|
+
{
|
|
7323
|
+
"kind": "field",
|
|
7324
|
+
"name": "_boundClickOutside",
|
|
7325
|
+
"privacy": "private"
|
|
7326
|
+
},
|
|
7327
|
+
{
|
|
7328
|
+
"kind": "field",
|
|
7329
|
+
"name": "_boundKeyDown",
|
|
7330
|
+
"privacy": "private"
|
|
7214
7331
|
}
|
|
7215
7332
|
],
|
|
7216
7333
|
"attributes": [
|
|
@@ -7292,99 +7409,423 @@
|
|
|
7292
7409
|
},
|
|
7293
7410
|
{
|
|
7294
7411
|
"kind": "javascript-module",
|
|
7295
|
-
"path": "packages/nys-icon/src/
|
|
7296
|
-
"declarations": [
|
|
7412
|
+
"path": "packages/nys-icon/src/icon-cache.ts",
|
|
7413
|
+
"declarations": [
|
|
7414
|
+
{
|
|
7415
|
+
"kind": "function",
|
|
7416
|
+
"name": "clearIconCache",
|
|
7417
|
+
"return": {
|
|
7418
|
+
"type": {
|
|
7419
|
+
"text": "void"
|
|
7420
|
+
}
|
|
7421
|
+
},
|
|
7422
|
+
"parameters": [
|
|
7423
|
+
{
|
|
7424
|
+
"name": "url",
|
|
7425
|
+
"optional": true,
|
|
7426
|
+
"type": {
|
|
7427
|
+
"text": "string"
|
|
7428
|
+
}
|
|
7429
|
+
}
|
|
7430
|
+
],
|
|
7431
|
+
"description": "Clear one or all entries from the cache."
|
|
7432
|
+
},
|
|
7433
|
+
{
|
|
7434
|
+
"kind": "function",
|
|
7435
|
+
"name": "fetchIcon",
|
|
7436
|
+
"return": {
|
|
7437
|
+
"type": {
|
|
7438
|
+
"text": "Promise<SVGElement>"
|
|
7439
|
+
}
|
|
7440
|
+
},
|
|
7441
|
+
"parameters": [
|
|
7442
|
+
{
|
|
7443
|
+
"name": "url",
|
|
7444
|
+
"type": {
|
|
7445
|
+
"text": "string"
|
|
7446
|
+
}
|
|
7447
|
+
}
|
|
7448
|
+
],
|
|
7449
|
+
"description": "Fetch and parse an SVG from a URL. Returns a cloned SVGElement (safe for multiple consumers)."
|
|
7450
|
+
}
|
|
7451
|
+
],
|
|
7297
7452
|
"exports": [
|
|
7298
7453
|
{
|
|
7299
7454
|
"kind": "js",
|
|
7300
|
-
"name": "
|
|
7455
|
+
"name": "clearIconCache",
|
|
7301
7456
|
"declaration": {
|
|
7302
|
-
"name": "
|
|
7303
|
-
"module": "packages/nys-icon/src/
|
|
7457
|
+
"name": "clearIconCache",
|
|
7458
|
+
"module": "packages/nys-icon/src/icon-cache.ts"
|
|
7459
|
+
}
|
|
7460
|
+
},
|
|
7461
|
+
{
|
|
7462
|
+
"kind": "js",
|
|
7463
|
+
"name": "fetchIcon",
|
|
7464
|
+
"declaration": {
|
|
7465
|
+
"name": "fetchIcon",
|
|
7466
|
+
"module": "packages/nys-icon/src/icon-cache.ts"
|
|
7304
7467
|
}
|
|
7305
7468
|
}
|
|
7306
7469
|
]
|
|
7307
7470
|
},
|
|
7308
7471
|
{
|
|
7309
7472
|
"kind": "javascript-module",
|
|
7310
|
-
"path": "packages/nys-icon/src/
|
|
7473
|
+
"path": "packages/nys-icon/src/icon-library-registry.ts",
|
|
7311
7474
|
"declarations": [
|
|
7312
7475
|
{
|
|
7313
|
-
"kind": "
|
|
7314
|
-
"
|
|
7315
|
-
"
|
|
7316
|
-
|
|
7476
|
+
"kind": "function",
|
|
7477
|
+
"name": "getIconLibrary",
|
|
7478
|
+
"return": {
|
|
7479
|
+
"type": {
|
|
7480
|
+
"text": "IconLibrary | undefined"
|
|
7481
|
+
}
|
|
7482
|
+
},
|
|
7483
|
+
"parameters": [
|
|
7317
7484
|
{
|
|
7318
|
-
"kind": "field",
|
|
7319
7485
|
"name": "name",
|
|
7320
7486
|
"type": {
|
|
7321
7487
|
"text": "string"
|
|
7322
|
-
}
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7488
|
+
}
|
|
7489
|
+
}
|
|
7490
|
+
],
|
|
7491
|
+
"description": "Get a registered icon library by name."
|
|
7492
|
+
},
|
|
7493
|
+
{
|
|
7494
|
+
"kind": "function",
|
|
7495
|
+
"name": "registerIconLibrary",
|
|
7496
|
+
"return": {
|
|
7497
|
+
"type": {
|
|
7498
|
+
"text": "void"
|
|
7499
|
+
}
|
|
7500
|
+
},
|
|
7501
|
+
"parameters": [
|
|
7328
7502
|
{
|
|
7329
|
-
"
|
|
7330
|
-
"name": "ariaLabel",
|
|
7503
|
+
"name": "name",
|
|
7331
7504
|
"type": {
|
|
7332
7505
|
"text": "string"
|
|
7333
|
-
}
|
|
7334
|
-
"default": "\"\"",
|
|
7335
|
-
"description": "Accessible label. When set, removes `aria-hidden` and adds `aria-label` to the SVG.",
|
|
7336
|
-
"attribute": "ariaLabel"
|
|
7506
|
+
}
|
|
7337
7507
|
},
|
|
7338
7508
|
{
|
|
7339
|
-
"
|
|
7340
|
-
"name": "rotate",
|
|
7509
|
+
"name": "library",
|
|
7341
7510
|
"type": {
|
|
7342
|
-
"text": "
|
|
7343
|
-
}
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7511
|
+
"text": "IconLibrary"
|
|
7512
|
+
}
|
|
7513
|
+
}
|
|
7514
|
+
],
|
|
7515
|
+
"description": "Register or replace a named icon library. All watching icons using this library will redraw.",
|
|
7516
|
+
"examples": [
|
|
7348
7517
|
{
|
|
7349
|
-
"
|
|
7350
|
-
"
|
|
7518
|
+
"title": "Register a Font Awesome library with a custom resolver:",
|
|
7519
|
+
"code": "registerIconLibrary(\"fa\", {\nresolver: (name) => `https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/svg/${name}.svg`\n});",
|
|
7520
|
+
"lang": "ts"
|
|
7521
|
+
}
|
|
7522
|
+
]
|
|
7523
|
+
},
|
|
7524
|
+
{
|
|
7525
|
+
"kind": "function",
|
|
7526
|
+
"name": "unregisterIconLibrary",
|
|
7527
|
+
"return": {
|
|
7528
|
+
"type": {
|
|
7529
|
+
"text": "void"
|
|
7530
|
+
}
|
|
7531
|
+
},
|
|
7532
|
+
"parameters": [
|
|
7533
|
+
{
|
|
7534
|
+
"name": "name",
|
|
7351
7535
|
"type": {
|
|
7352
7536
|
"text": "string"
|
|
7353
|
-
}
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7537
|
+
}
|
|
7538
|
+
}
|
|
7539
|
+
],
|
|
7540
|
+
"description": "Remove a registered icon library. All watching icons using this library will redraw."
|
|
7541
|
+
},
|
|
7542
|
+
{
|
|
7543
|
+
"kind": "function",
|
|
7544
|
+
"name": "unwatchIconLibrary",
|
|
7545
|
+
"return": {
|
|
7546
|
+
"type": {
|
|
7547
|
+
"text": "void"
|
|
7548
|
+
}
|
|
7549
|
+
},
|
|
7550
|
+
"parameters": [
|
|
7358
7551
|
{
|
|
7359
|
-
"
|
|
7360
|
-
"name": "color",
|
|
7552
|
+
"name": "name",
|
|
7361
7553
|
"type": {
|
|
7362
7554
|
"text": "string"
|
|
7363
|
-
}
|
|
7364
|
-
"default": "\"\"",
|
|
7365
|
-
"description": "Icon color. Accepts any CSS color value. Defaults to `currentcolor`.",
|
|
7366
|
-
"attribute": "color"
|
|
7555
|
+
}
|
|
7367
7556
|
},
|
|
7368
7557
|
{
|
|
7369
|
-
"
|
|
7370
|
-
"name": "size",
|
|
7558
|
+
"name": "watcher",
|
|
7371
7559
|
"type": {
|
|
7372
|
-
"text": "
|
|
7373
|
-
}
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7560
|
+
"text": "NysIconWatcher"
|
|
7561
|
+
}
|
|
7562
|
+
}
|
|
7563
|
+
],
|
|
7564
|
+
"description": "Unsubscribe an icon instance from library change notifications."
|
|
7565
|
+
},
|
|
7566
|
+
{
|
|
7567
|
+
"kind": "function",
|
|
7568
|
+
"name": "watchIconLibrary",
|
|
7569
|
+
"return": {
|
|
7570
|
+
"type": {
|
|
7571
|
+
"text": "void"
|
|
7572
|
+
}
|
|
7573
|
+
},
|
|
7574
|
+
"parameters": [
|
|
7575
|
+
{
|
|
7576
|
+
"name": "name",
|
|
7577
|
+
"type": {
|
|
7578
|
+
"text": "string"
|
|
7579
|
+
}
|
|
7580
|
+
},
|
|
7581
|
+
{
|
|
7582
|
+
"name": "watcher",
|
|
7583
|
+
"type": {
|
|
7584
|
+
"text": "NysIconWatcher"
|
|
7585
|
+
}
|
|
7586
|
+
}
|
|
7587
|
+
],
|
|
7588
|
+
"description": "Subscribe an icon instance to library change notifications."
|
|
7589
|
+
}
|
|
7590
|
+
],
|
|
7591
|
+
"exports": [
|
|
7592
|
+
{
|
|
7593
|
+
"kind": "js",
|
|
7594
|
+
"name": "getIconLibrary",
|
|
7595
|
+
"declaration": {
|
|
7596
|
+
"name": "getIconLibrary",
|
|
7597
|
+
"module": "packages/nys-icon/src/icon-library-registry.ts"
|
|
7598
|
+
}
|
|
7599
|
+
},
|
|
7600
|
+
{
|
|
7601
|
+
"kind": "js",
|
|
7602
|
+
"name": "registerIconLibrary",
|
|
7603
|
+
"declaration": {
|
|
7604
|
+
"name": "registerIconLibrary",
|
|
7605
|
+
"module": "packages/nys-icon/src/icon-library-registry.ts"
|
|
7606
|
+
}
|
|
7607
|
+
},
|
|
7608
|
+
{
|
|
7609
|
+
"kind": "js",
|
|
7610
|
+
"name": "unregisterIconLibrary",
|
|
7611
|
+
"declaration": {
|
|
7612
|
+
"name": "unregisterIconLibrary",
|
|
7613
|
+
"module": "packages/nys-icon/src/icon-library-registry.ts"
|
|
7614
|
+
}
|
|
7615
|
+
},
|
|
7616
|
+
{
|
|
7617
|
+
"kind": "js",
|
|
7618
|
+
"name": "unwatchIconLibrary",
|
|
7619
|
+
"declaration": {
|
|
7620
|
+
"name": "unwatchIconLibrary",
|
|
7621
|
+
"module": "packages/nys-icon/src/icon-library-registry.ts"
|
|
7622
|
+
}
|
|
7623
|
+
},
|
|
7624
|
+
{
|
|
7625
|
+
"kind": "js",
|
|
7626
|
+
"name": "watchIconLibrary",
|
|
7627
|
+
"declaration": {
|
|
7628
|
+
"name": "watchIconLibrary",
|
|
7629
|
+
"module": "packages/nys-icon/src/icon-library-registry.ts"
|
|
7630
|
+
}
|
|
7631
|
+
}
|
|
7632
|
+
]
|
|
7633
|
+
},
|
|
7634
|
+
{
|
|
7635
|
+
"kind": "javascript-module",
|
|
7636
|
+
"path": "packages/nys-icon/src/index.ts",
|
|
7637
|
+
"declarations": [],
|
|
7638
|
+
"exports": [
|
|
7639
|
+
{
|
|
7640
|
+
"kind": "js",
|
|
7641
|
+
"name": "*",
|
|
7642
|
+
"declaration": {
|
|
7643
|
+
"name": "*",
|
|
7644
|
+
"module": "packages/nys-icon/src/nys-icon"
|
|
7645
|
+
}
|
|
7646
|
+
},
|
|
7647
|
+
{
|
|
7648
|
+
"kind": "js",
|
|
7649
|
+
"name": "clearIconCache",
|
|
7650
|
+
"declaration": {
|
|
7651
|
+
"name": "clearIconCache",
|
|
7652
|
+
"module": "./icon-cache"
|
|
7653
|
+
}
|
|
7654
|
+
},
|
|
7655
|
+
{
|
|
7656
|
+
"kind": "js",
|
|
7657
|
+
"name": "IconLibrary",
|
|
7658
|
+
"declaration": {
|
|
7659
|
+
"name": "IconLibrary",
|
|
7660
|
+
"module": "./icon-library-registry"
|
|
7661
|
+
}
|
|
7662
|
+
},
|
|
7663
|
+
{
|
|
7664
|
+
"kind": "js",
|
|
7665
|
+
"name": "registerIconLibrary",
|
|
7666
|
+
"declaration": {
|
|
7667
|
+
"name": "registerIconLibrary",
|
|
7668
|
+
"module": "./icon-library-registry"
|
|
7669
|
+
}
|
|
7670
|
+
},
|
|
7671
|
+
{
|
|
7672
|
+
"kind": "js",
|
|
7673
|
+
"name": "unregisterIconLibrary",
|
|
7674
|
+
"declaration": {
|
|
7675
|
+
"name": "unregisterIconLibrary",
|
|
7676
|
+
"module": "./icon-library-registry"
|
|
7677
|
+
}
|
|
7678
|
+
}
|
|
7679
|
+
]
|
|
7680
|
+
},
|
|
7681
|
+
{
|
|
7682
|
+
"kind": "javascript-module",
|
|
7683
|
+
"path": "packages/nys-icon/src/nys-icon.ts",
|
|
7684
|
+
"declarations": [
|
|
7685
|
+
{
|
|
7686
|
+
"kind": "class",
|
|
7687
|
+
"description": "Renders SVG icons from a registered icon library. The built-in NYSDS icon\nlibrary (Material Symbols) is the default. Custom libraries (Font Awesome,\nMaterial Icons, etc.) can be registered via `registerIconLibrary()`.\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.",
|
|
7688
|
+
"name": "NysIcon",
|
|
7689
|
+
"members": [
|
|
7690
|
+
{
|
|
7691
|
+
"kind": "field",
|
|
7692
|
+
"name": "name",
|
|
7693
|
+
"type": {
|
|
7694
|
+
"text": "string"
|
|
7695
|
+
},
|
|
7696
|
+
"default": "\"\"",
|
|
7697
|
+
"description": "Icon name to resolve from the selected library. Required.",
|
|
7698
|
+
"attribute": "name",
|
|
7699
|
+
"reflects": true
|
|
7700
|
+
},
|
|
7701
|
+
{
|
|
7702
|
+
"kind": "field",
|
|
7703
|
+
"name": "library",
|
|
7704
|
+
"type": {
|
|
7705
|
+
"text": "string"
|
|
7706
|
+
},
|
|
7707
|
+
"default": "\"default\"",
|
|
7708
|
+
"description": "Which registered icon library to use. Defaults to the built-in NYSDS library.",
|
|
7709
|
+
"attribute": "library",
|
|
7710
|
+
"reflects": true
|
|
7711
|
+
},
|
|
7712
|
+
{
|
|
7713
|
+
"kind": "field",
|
|
7714
|
+
"name": "ariaLabel",
|
|
7715
|
+
"type": {
|
|
7716
|
+
"text": "string"
|
|
7717
|
+
},
|
|
7718
|
+
"default": "\"\"",
|
|
7719
|
+
"description": "Accessible label. When set, removes `aria-hidden` and adds `aria-label` to the SVG.",
|
|
7720
|
+
"attribute": "ariaLabel"
|
|
7721
|
+
},
|
|
7722
|
+
{
|
|
7723
|
+
"kind": "field",
|
|
7724
|
+
"name": "rotate",
|
|
7725
|
+
"type": {
|
|
7726
|
+
"text": "string"
|
|
7727
|
+
},
|
|
7728
|
+
"default": "\"0\"",
|
|
7729
|
+
"description": "Rotation in degrees. Applied via CSS `rotate`.",
|
|
7730
|
+
"attribute": "rotate"
|
|
7731
|
+
},
|
|
7732
|
+
{
|
|
7733
|
+
"kind": "field",
|
|
7734
|
+
"name": "flip",
|
|
7735
|
+
"type": {
|
|
7736
|
+
"text": "string"
|
|
7737
|
+
},
|
|
7738
|
+
"default": "\"\"",
|
|
7739
|
+
"description": "Flip direction: `horizontal`, `vertical`, or empty for none.",
|
|
7740
|
+
"attribute": "flip"
|
|
7741
|
+
},
|
|
7742
|
+
{
|
|
7743
|
+
"kind": "field",
|
|
7744
|
+
"name": "color",
|
|
7745
|
+
"type": {
|
|
7746
|
+
"text": "string"
|
|
7747
|
+
},
|
|
7748
|
+
"default": "\"\"",
|
|
7749
|
+
"description": "Icon color. Accepts any CSS color value. Defaults to `currentcolor`.",
|
|
7750
|
+
"attribute": "color"
|
|
7751
|
+
},
|
|
7752
|
+
{
|
|
7753
|
+
"kind": "field",
|
|
7754
|
+
"name": "size",
|
|
7755
|
+
"type": {
|
|
7756
|
+
"text": "| \"xs\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | \"2xl\"\n | \"3xl\"\n | \"4xl\"\n | \"5xl\"\n | \"12\"\n | \"14\"\n | \"16\"\n | \"18\"\n | \"20\"\n | \"24\"\n | \"32\"\n | \"40\"\n | \"50\""
|
|
7757
|
+
},
|
|
7758
|
+
"default": "\"md\"",
|
|
7759
|
+
"description": "Icon size. Semantic sizes: `xs`-`5xl`. Pixel sizes: `12`-`50`.",
|
|
7760
|
+
"attribute": "size"
|
|
7761
|
+
},
|
|
7762
|
+
{
|
|
7763
|
+
"kind": "field",
|
|
7764
|
+
"name": "_svg",
|
|
7765
|
+
"type": {
|
|
7766
|
+
"text": "SVGElement | null"
|
|
7767
|
+
},
|
|
7768
|
+
"privacy": "private",
|
|
7769
|
+
"default": "null"
|
|
7770
|
+
},
|
|
7771
|
+
{
|
|
7772
|
+
"kind": "field",
|
|
7773
|
+
"name": "_loadSeq",
|
|
7774
|
+
"type": {
|
|
7775
|
+
"text": "number"
|
|
7776
|
+
},
|
|
7777
|
+
"privacy": "private",
|
|
7778
|
+
"default": "0",
|
|
7779
|
+
"description": "Monotonically increasing token so stale async fetches are discarded."
|
|
7780
|
+
},
|
|
7781
|
+
{
|
|
7782
|
+
"kind": "field",
|
|
7783
|
+
"name": "_loadPromise",
|
|
7784
|
+
"type": {
|
|
7785
|
+
"text": "Promise<void> | null"
|
|
7786
|
+
},
|
|
7787
|
+
"privacy": "private",
|
|
7788
|
+
"default": "null",
|
|
7789
|
+
"description": "Promise for the in-flight icon load."
|
|
7790
|
+
},
|
|
7791
|
+
{
|
|
7792
|
+
"kind": "field",
|
|
7793
|
+
"name": "updateComplete",
|
|
7794
|
+
"type": {
|
|
7795
|
+
"text": "Promise<boolean>"
|
|
7796
|
+
},
|
|
7797
|
+
"description": "Resolves when the current icon load (if any) is complete.",
|
|
7798
|
+
"readonly": true
|
|
7799
|
+
},
|
|
7800
|
+
{
|
|
7801
|
+
"kind": "method",
|
|
7802
|
+
"name": "redraw",
|
|
7803
|
+
"description": "Called by the icon library registry when the current library changes."
|
|
7804
|
+
},
|
|
7805
|
+
{
|
|
7806
|
+
"kind": "field",
|
|
7807
|
+
"name": "_validName",
|
|
7808
|
+
"privacy": "private",
|
|
7809
|
+
"static": true,
|
|
7810
|
+
"default": "/^[a-zA-Z0-9_-]+$/"
|
|
7811
|
+
},
|
|
7812
|
+
{
|
|
7813
|
+
"kind": "method",
|
|
7814
|
+
"name": "_loadIcon",
|
|
7815
|
+
"privacy": "private"
|
|
7816
|
+
},
|
|
7817
|
+
{
|
|
7818
|
+
"kind": "method",
|
|
7819
|
+
"name": "_applyAttributes",
|
|
7820
|
+
"privacy": "private",
|
|
7821
|
+
"parameters": [
|
|
7822
|
+
{
|
|
7823
|
+
"name": "svg",
|
|
7824
|
+
"type": {
|
|
7825
|
+
"text": "SVGElement"
|
|
7826
|
+
}
|
|
7827
|
+
}
|
|
7828
|
+
]
|
|
7388
7829
|
}
|
|
7389
7830
|
],
|
|
7390
7831
|
"attributes": [
|
|
@@ -7394,10 +7835,20 @@
|
|
|
7394
7835
|
"text": "string"
|
|
7395
7836
|
},
|
|
7396
7837
|
"default": "\"\"",
|
|
7397
|
-
"description": "Icon name from
|
|
7838
|
+
"description": "Icon name to resolve from the selected library. Required.",
|
|
7398
7839
|
"fieldName": "name",
|
|
7399
7840
|
"propName": "name"
|
|
7400
7841
|
},
|
|
7842
|
+
{
|
|
7843
|
+
"name": "library",
|
|
7844
|
+
"type": {
|
|
7845
|
+
"text": "string"
|
|
7846
|
+
},
|
|
7847
|
+
"default": "\"default\"",
|
|
7848
|
+
"description": "Which registered icon library to use. Defaults to the built-in NYSDS library.",
|
|
7849
|
+
"fieldName": "library",
|
|
7850
|
+
"propName": "library"
|
|
7851
|
+
},
|
|
7401
7852
|
{
|
|
7402
7853
|
"name": "ariaLabel",
|
|
7403
7854
|
"type": {
|
|
@@ -7455,13 +7906,18 @@
|
|
|
7455
7906
|
},
|
|
7456
7907
|
"tagName": "nys-icon",
|
|
7457
7908
|
"customElement": true,
|
|
7458
|
-
"summary": "SVG icon
|
|
7909
|
+
"summary": "SVG icon with swappable library support, size, rotation, and color options.",
|
|
7459
7910
|
"examples": [
|
|
7460
7911
|
{
|
|
7461
|
-
"title": "Basic icon",
|
|
7912
|
+
"title": "Basic icon (default NYSDS library)",
|
|
7462
7913
|
"code": "<nys-icon name=\"check_circle\" size=\"lg\"></nys-icon>",
|
|
7463
7914
|
"lang": "html"
|
|
7464
7915
|
},
|
|
7916
|
+
{
|
|
7917
|
+
"title": "Font Awesome icon",
|
|
7918
|
+
"code": "<nys-icon name=\"house\" library=\"fa\" size=\"lg\"></nys-icon>",
|
|
7919
|
+
"lang": "html"
|
|
7920
|
+
},
|
|
7465
7921
|
{
|
|
7466
7922
|
"title": "Accessible icon with label",
|
|
7467
7923
|
"code": "<nys-icon name=\"warning\" ariaLabel=\"Warning\" color=\"var(--nys-color-warning)\"></nys-icon>",
|
|
@@ -7811,6 +8267,11 @@
|
|
|
7811
8267
|
"privacy": "private",
|
|
7812
8268
|
"default": "null"
|
|
7813
8269
|
},
|
|
8270
|
+
{
|
|
8271
|
+
"kind": "field",
|
|
8272
|
+
"name": "_mobileMedia",
|
|
8273
|
+
"privacy": "private"
|
|
8274
|
+
},
|
|
7814
8275
|
{
|
|
7815
8276
|
"kind": "field",
|
|
7816
8277
|
"name": "hasBodySlots",
|
|
@@ -7856,7 +8317,7 @@
|
|
|
7856
8317
|
"privacy": "private"
|
|
7857
8318
|
},
|
|
7858
8319
|
{
|
|
7859
|
-
"kind": "
|
|
8320
|
+
"kind": "field",
|
|
7860
8321
|
"name": "_handleBodySlotChange",
|
|
7861
8322
|
"privacy": "private"
|
|
7862
8323
|
},
|
|
@@ -8276,15 +8737,6 @@
|
|
|
8276
8737
|
}
|
|
8277
8738
|
],
|
|
8278
8739
|
"members": [
|
|
8279
|
-
{
|
|
8280
|
-
"kind": "field",
|
|
8281
|
-
"name": "shadowRootOptions",
|
|
8282
|
-
"type": {
|
|
8283
|
-
"text": "object"
|
|
8284
|
-
},
|
|
8285
|
-
"static": true,
|
|
8286
|
-
"default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }"
|
|
8287
|
-
},
|
|
8288
8740
|
{
|
|
8289
8741
|
"kind": "field",
|
|
8290
8742
|
"name": "checked",
|
|
@@ -8354,236 +8806,91 @@
|
|
|
8354
8806
|
"name": "name",
|
|
8355
8807
|
"type": {
|
|
8356
8808
|
"text": "string"
|
|
8357
|
-
},
|
|
8358
|
-
"default": "\"\"",
|
|
8359
|
-
"description": "Group name. Radios with same name are mutually exclusive.",
|
|
8360
|
-
"attribute": "name",
|
|
8361
|
-
"reflects": true
|
|
8362
|
-
},
|
|
8363
|
-
{
|
|
8364
|
-
"kind": "field",
|
|
8365
|
-
"name": "value",
|
|
8366
|
-
"type": {
|
|
8367
|
-
"text": "string"
|
|
8368
|
-
},
|
|
8369
|
-
"default": "\"\"",
|
|
8370
|
-
"description": "Value submitted when this radio is selected.",
|
|
8371
|
-
"attribute": "value"
|
|
8372
|
-
},
|
|
8373
|
-
{
|
|
8374
|
-
"kind": "field",
|
|
8375
|
-
"name": "form",
|
|
8376
|
-
"type": {
|
|
8377
|
-
"text": "string | null"
|
|
8378
|
-
},
|
|
8379
|
-
"default": "null",
|
|
8380
|
-
"description": "Form `id` to associate with.",
|
|
8381
|
-
"attribute": "form",
|
|
8382
|
-
"reflects": true
|
|
8383
|
-
},
|
|
8384
|
-
{
|
|
8385
|
-
"kind": "field",
|
|
8386
|
-
"name": "size",
|
|
8387
|
-
"type": {
|
|
8388
|
-
"text": "\"sm\" | \"md\""
|
|
8389
|
-
},
|
|
8390
|
-
"default": "\"md\"",
|
|
8391
|
-
"description": "Radio size: `sm` (24px) or `md` (32px, default).",
|
|
8392
|
-
"attribute": "size",
|
|
8393
|
-
"reflects": true
|
|
8394
|
-
},
|
|
8395
|
-
{
|
|
8396
|
-
"kind": "field",
|
|
8397
|
-
"name": "tile",
|
|
8398
|
-
"type": {
|
|
8399
|
-
"text": "boolean"
|
|
8400
|
-
},
|
|
8401
|
-
"default": "false",
|
|
8402
|
-
"description": "Renders as tile with larger clickable area.",
|
|
8403
|
-
"attribute": "tile",
|
|
8404
|
-
"reflects": true
|
|
8405
|
-
},
|
|
8406
|
-
{
|
|
8407
|
-
"kind": "field",
|
|
8408
|
-
"name": "other",
|
|
8409
|
-
"type": {
|
|
8410
|
-
"text": "boolean"
|
|
8411
|
-
},
|
|
8412
|
-
"default": "false",
|
|
8413
|
-
"attribute": "other",
|
|
8414
|
-
"reflects": true
|
|
8415
|
-
},
|
|
8416
|
-
{
|
|
8417
|
-
"kind": "field",
|
|
8418
|
-
"name": "showOtherError",
|
|
8419
|
-
"type": {
|
|
8420
|
-
"text": "boolean"
|
|
8421
|
-
},
|
|
8422
|
-
"default": "false",
|
|
8423
|
-
"attribute": "showOtherError"
|
|
8424
|
-
},
|
|
8425
|
-
{
|
|
8426
|
-
"kind": "field",
|
|
8427
|
-
"name": "isMobile",
|
|
8428
|
-
"privacy": "private"
|
|
8429
|
-
},
|
|
8430
|
-
{
|
|
8431
|
-
"kind": "field",
|
|
8432
|
-
"name": "_hasUserInteracted",
|
|
8433
|
-
"type": {
|
|
8434
|
-
"text": "boolean"
|
|
8435
|
-
},
|
|
8436
|
-
"privacy": "private",
|
|
8437
|
-
"default": "false"
|
|
8438
|
-
},
|
|
8439
|
-
{
|
|
8440
|
-
"kind": "field",
|
|
8441
|
-
"name": "buttonGroup",
|
|
8442
|
-
"type": {
|
|
8443
|
-
"text": "Record<string, NysRadiobutton>"
|
|
8444
|
-
},
|
|
8445
|
-
"static": true,
|
|
8446
|
-
"default": "{}"
|
|
8447
|
-
},
|
|
8448
|
-
{
|
|
8449
|
-
"kind": "method",
|
|
8450
|
-
"name": "getInputElement",
|
|
8451
|
-
"privacy": "public",
|
|
8452
|
-
"return": {
|
|
8453
|
-
"type": {
|
|
8454
|
-
"text": "Promise<HTMLInputElement | null>"
|
|
8455
|
-
}
|
|
8456
|
-
},
|
|
8457
|
-
"description": "Functions\n--------------------------------------------------------------------------"
|
|
8458
|
-
},
|
|
8459
|
-
{
|
|
8460
|
-
"kind": "method",
|
|
8461
|
-
"name": "formResetUpdate",
|
|
8462
|
-
"privacy": "public"
|
|
8463
|
-
},
|
|
8464
|
-
{
|
|
8465
|
-
"kind": "field",
|
|
8466
|
-
"name": "_handleResize",
|
|
8467
|
-
"privacy": "private"
|
|
8468
|
-
},
|
|
8469
|
-
{
|
|
8470
|
-
"kind": "method",
|
|
8471
|
-
"name": "_clearOtherState",
|
|
8472
|
-
"privacy": "private"
|
|
8473
|
-
},
|
|
8474
|
-
{
|
|
8475
|
-
"kind": "method",
|
|
8476
|
-
"name": "_dispatchClearErrorEvent",
|
|
8477
|
-
"privacy": "private"
|
|
8478
|
-
},
|
|
8479
|
-
{
|
|
8480
|
-
"kind": "method",
|
|
8481
|
-
"name": "_emitChangeEvent",
|
|
8482
|
-
"privacy": "private",
|
|
8483
|
-
"description": "Event Handlers\n--------------------------------------------------------------------------"
|
|
8484
|
-
},
|
|
8485
|
-
{
|
|
8486
|
-
"kind": "method",
|
|
8487
|
-
"name": "_emitOtherInputEvent",
|
|
8488
|
-
"privacy": "private"
|
|
8489
|
-
},
|
|
8490
|
-
{
|
|
8491
|
-
"kind": "method",
|
|
8492
|
-
"name": "_handleChange",
|
|
8493
|
-
"privacy": "private"
|
|
8494
|
-
},
|
|
8495
|
-
{
|
|
8496
|
-
"kind": "method",
|
|
8497
|
-
"name": "_handleFocus",
|
|
8498
|
-
"privacy": "private"
|
|
8499
|
-
},
|
|
8500
|
-
{
|
|
8501
|
-
"kind": "method",
|
|
8502
|
-
"name": "_handleBlur",
|
|
8503
|
-
"privacy": "private"
|
|
8504
|
-
},
|
|
8505
|
-
{
|
|
8506
|
-
"kind": "method",
|
|
8507
|
-
"name": "_callInputHandling",
|
|
8508
|
-
"privacy": "private"
|
|
8509
|
-
},
|
|
8510
|
-
{
|
|
8511
|
-
"kind": "method",
|
|
8512
|
-
"name": "_handleTextInput",
|
|
8513
|
-
"privacy": "private",
|
|
8514
|
-
"parameters": [
|
|
8515
|
-
{
|
|
8516
|
-
"name": "event",
|
|
8517
|
-
"type": {
|
|
8518
|
-
"text": "Event"
|
|
8519
|
-
}
|
|
8520
|
-
}
|
|
8521
|
-
]
|
|
8522
|
-
},
|
|
8523
|
-
{
|
|
8524
|
-
"kind": "method",
|
|
8525
|
-
"name": "_handleTextInputBlur",
|
|
8526
|
-
"privacy": "private"
|
|
8527
|
-
},
|
|
8528
|
-
{
|
|
8529
|
-
"kind": "method",
|
|
8530
|
-
"name": "_validateOtherAndEmitError",
|
|
8531
|
-
"privacy": "private"
|
|
8532
|
-
},
|
|
8533
|
-
{
|
|
8534
|
-
"kind": "method",
|
|
8535
|
-
"name": "_handleOtherKeydown",
|
|
8536
|
-
"privacy": "private",
|
|
8537
|
-
"parameters": [
|
|
8538
|
-
{
|
|
8539
|
-
"name": "e",
|
|
8540
|
-
"type": {
|
|
8541
|
-
"text": "KeyboardEvent"
|
|
8542
|
-
}
|
|
8543
|
-
}
|
|
8544
|
-
]
|
|
8545
|
-
}
|
|
8546
|
-
],
|
|
8547
|
-
"events": [
|
|
8809
|
+
},
|
|
8810
|
+
"default": "\"\"",
|
|
8811
|
+
"description": "Group name. Radios with same name are mutually exclusive.",
|
|
8812
|
+
"attribute": "name",
|
|
8813
|
+
"reflects": true
|
|
8814
|
+
},
|
|
8548
8815
|
{
|
|
8549
|
-
"
|
|
8816
|
+
"kind": "field",
|
|
8817
|
+
"name": "value",
|
|
8550
8818
|
"type": {
|
|
8551
|
-
"text": "
|
|
8552
|
-
}
|
|
8819
|
+
"text": "string"
|
|
8820
|
+
},
|
|
8821
|
+
"default": "\"\"",
|
|
8822
|
+
"description": "Value submitted when this radio is selected.",
|
|
8823
|
+
"attribute": "value"
|
|
8553
8824
|
},
|
|
8554
8825
|
{
|
|
8555
|
-
"
|
|
8826
|
+
"kind": "field",
|
|
8827
|
+
"name": "form",
|
|
8556
8828
|
"type": {
|
|
8557
|
-
"text": "
|
|
8829
|
+
"text": "string | null"
|
|
8558
8830
|
},
|
|
8559
|
-
"
|
|
8831
|
+
"default": "null",
|
|
8832
|
+
"description": "Form `id` to associate with.",
|
|
8833
|
+
"attribute": "form",
|
|
8834
|
+
"reflects": true
|
|
8560
8835
|
},
|
|
8561
8836
|
{
|
|
8562
|
-
"
|
|
8837
|
+
"kind": "field",
|
|
8838
|
+
"name": "size",
|
|
8563
8839
|
"type": {
|
|
8564
|
-
"text": "
|
|
8840
|
+
"text": "\"sm\" | \"md\""
|
|
8565
8841
|
},
|
|
8566
|
-
"
|
|
8842
|
+
"default": "\"md\"",
|
|
8843
|
+
"description": "Radio size: `sm` (24px) or `md` (32px, default).",
|
|
8844
|
+
"attribute": "size",
|
|
8845
|
+
"reflects": true
|
|
8567
8846
|
},
|
|
8568
8847
|
{
|
|
8569
|
-
"
|
|
8848
|
+
"kind": "field",
|
|
8849
|
+
"name": "tile",
|
|
8570
8850
|
"type": {
|
|
8571
|
-
"text": "
|
|
8851
|
+
"text": "boolean"
|
|
8572
8852
|
},
|
|
8573
|
-
"
|
|
8853
|
+
"default": "false",
|
|
8854
|
+
"description": "Renders as tile with larger clickable area.",
|
|
8855
|
+
"attribute": "tile",
|
|
8856
|
+
"reflects": true
|
|
8574
8857
|
},
|
|
8575
8858
|
{
|
|
8576
|
-
"
|
|
8859
|
+
"kind": "field",
|
|
8860
|
+
"name": "other",
|
|
8577
8861
|
"type": {
|
|
8578
|
-
"text": "
|
|
8862
|
+
"text": "boolean"
|
|
8579
8863
|
},
|
|
8580
|
-
"
|
|
8864
|
+
"default": "false",
|
|
8865
|
+
"attribute": "other",
|
|
8866
|
+
"reflects": true
|
|
8581
8867
|
},
|
|
8582
8868
|
{
|
|
8583
|
-
"
|
|
8869
|
+
"kind": "field",
|
|
8870
|
+
"name": "showOtherError",
|
|
8584
8871
|
"type": {
|
|
8585
|
-
"text": "
|
|
8586
|
-
}
|
|
8872
|
+
"text": "boolean"
|
|
8873
|
+
},
|
|
8874
|
+
"default": "false",
|
|
8875
|
+
"attribute": "showOtherError"
|
|
8876
|
+
}
|
|
8877
|
+
],
|
|
8878
|
+
"events": [
|
|
8879
|
+
{
|
|
8880
|
+
"description": "Fired when selection changes. Detail: `{id, checked, name, value}`.",
|
|
8881
|
+
"name": "nys-change"
|
|
8882
|
+
},
|
|
8883
|
+
{
|
|
8884
|
+
"description": "Fired when radio gains focus.",
|
|
8885
|
+
"name": "nys-focus"
|
|
8886
|
+
},
|
|
8887
|
+
{
|
|
8888
|
+
"description": "Fired when radio loses focus.",
|
|
8889
|
+
"name": "nys-blur"
|
|
8890
|
+
},
|
|
8891
|
+
{
|
|
8892
|
+
"description": "Fired when \"other\" text input value changes. Detail: `{id, name, value}`.",
|
|
8893
|
+
"name": "nys-other-input"
|
|
8587
8894
|
}
|
|
8588
8895
|
],
|
|
8589
8896
|
"attributes": [
|
|
@@ -8722,7 +9029,7 @@
|
|
|
8722
9029
|
},
|
|
8723
9030
|
"tagName": "nys-radiobutton",
|
|
8724
9031
|
"customElement": true,
|
|
8725
|
-
"summary": "Radio button for single selection from mutually exclusive options.",
|
|
9032
|
+
"summary": "Radio button for single selection from mutually exclusive options. This is a READONLY data component.",
|
|
8726
9033
|
"examples": [
|
|
8727
9034
|
{
|
|
8728
9035
|
"title": "Radio group",
|
|
@@ -8907,6 +9214,15 @@
|
|
|
8907
9214
|
"attribute": "size",
|
|
8908
9215
|
"reflects": true
|
|
8909
9216
|
},
|
|
9217
|
+
{
|
|
9218
|
+
"kind": "field",
|
|
9219
|
+
"name": "_showOtherError",
|
|
9220
|
+
"type": {
|
|
9221
|
+
"text": "boolean"
|
|
9222
|
+
},
|
|
9223
|
+
"default": "false",
|
|
9224
|
+
"attribute": "_showOtherError"
|
|
9225
|
+
},
|
|
8910
9226
|
{
|
|
8911
9227
|
"kind": "field",
|
|
8912
9228
|
"name": "selectedValue",
|
|
@@ -8925,6 +9241,49 @@
|
|
|
8925
9241
|
"privacy": "private",
|
|
8926
9242
|
"default": "\"\""
|
|
8927
9243
|
},
|
|
9244
|
+
{
|
|
9245
|
+
"kind": "field",
|
|
9246
|
+
"name": "_radios",
|
|
9247
|
+
"type": {
|
|
9248
|
+
"text": "NysRadiobutton[]"
|
|
9249
|
+
},
|
|
9250
|
+
"privacy": "private",
|
|
9251
|
+
"default": "[]"
|
|
9252
|
+
},
|
|
9253
|
+
{
|
|
9254
|
+
"kind": "field",
|
|
9255
|
+
"name": "_mobileQuery",
|
|
9256
|
+
"type": {
|
|
9257
|
+
"text": "MediaQueryList"
|
|
9258
|
+
},
|
|
9259
|
+
"privacy": "private"
|
|
9260
|
+
},
|
|
9261
|
+
{
|
|
9262
|
+
"kind": "field",
|
|
9263
|
+
"name": "isMobile",
|
|
9264
|
+
"type": {
|
|
9265
|
+
"text": "boolean"
|
|
9266
|
+
},
|
|
9267
|
+
"privacy": "private",
|
|
9268
|
+
"default": "false"
|
|
9269
|
+
},
|
|
9270
|
+
{
|
|
9271
|
+
"kind": "field",
|
|
9272
|
+
"name": "_hasUserInteracted",
|
|
9273
|
+
"type": {
|
|
9274
|
+
"text": "boolean"
|
|
9275
|
+
},
|
|
9276
|
+
"privacy": "private",
|
|
9277
|
+
"default": "false"
|
|
9278
|
+
},
|
|
9279
|
+
{
|
|
9280
|
+
"kind": "field",
|
|
9281
|
+
"name": "_childObserver",
|
|
9282
|
+
"type": {
|
|
9283
|
+
"text": "MutationObserver | undefined"
|
|
9284
|
+
},
|
|
9285
|
+
"privacy": "private"
|
|
9286
|
+
},
|
|
8928
9287
|
{
|
|
8929
9288
|
"kind": "field",
|
|
8930
9289
|
"name": "_internals",
|
|
@@ -8997,30 +9356,38 @@
|
|
|
8997
9356
|
"privacy": "public"
|
|
8998
9357
|
},
|
|
8999
9358
|
{
|
|
9000
|
-
"kind": "
|
|
9001
|
-
"name": "
|
|
9359
|
+
"kind": "field",
|
|
9360
|
+
"name": "_handleMobileQuery",
|
|
9002
9361
|
"privacy": "private",
|
|
9003
9362
|
"description": "Functions\n--------------------------------------------------------------------------"
|
|
9004
9363
|
},
|
|
9005
9364
|
{
|
|
9006
9365
|
"kind": "method",
|
|
9007
|
-
"name": "
|
|
9366
|
+
"name": "_handleSlotChange",
|
|
9008
9367
|
"privacy": "private"
|
|
9009
9368
|
},
|
|
9010
9369
|
{
|
|
9011
9370
|
"kind": "method",
|
|
9012
|
-
"name": "
|
|
9371
|
+
"name": "_initializeChildAttributes",
|
|
9013
9372
|
"privacy": "private"
|
|
9014
9373
|
},
|
|
9015
9374
|
{
|
|
9016
9375
|
"kind": "method",
|
|
9017
|
-
"name": "
|
|
9376
|
+
"name": "_updateRadioButtonsSize",
|
|
9018
9377
|
"privacy": "private"
|
|
9019
9378
|
},
|
|
9020
9379
|
{
|
|
9021
9380
|
"kind": "method",
|
|
9022
|
-
"name": "
|
|
9023
|
-
"privacy": "private"
|
|
9381
|
+
"name": "_selectRadio",
|
|
9382
|
+
"privacy": "private",
|
|
9383
|
+
"parameters": [
|
|
9384
|
+
{
|
|
9385
|
+
"name": "radiobtn",
|
|
9386
|
+
"type": {
|
|
9387
|
+
"text": "NysRadiobutton"
|
|
9388
|
+
}
|
|
9389
|
+
}
|
|
9390
|
+
]
|
|
9024
9391
|
},
|
|
9025
9392
|
{
|
|
9026
9393
|
"kind": "method",
|
|
@@ -9029,7 +9396,7 @@
|
|
|
9029
9396
|
},
|
|
9030
9397
|
{
|
|
9031
9398
|
"kind": "method",
|
|
9032
|
-
"name": "
|
|
9399
|
+
"name": "_handleInvalid",
|
|
9033
9400
|
"privacy": "private",
|
|
9034
9401
|
"parameters": [
|
|
9035
9402
|
{
|
|
@@ -9043,9 +9410,15 @@
|
|
|
9043
9410
|
},
|
|
9044
9411
|
{
|
|
9045
9412
|
"kind": "method",
|
|
9046
|
-
"name": "
|
|
9413
|
+
"name": "_handleTextInput",
|
|
9047
9414
|
"privacy": "private",
|
|
9048
9415
|
"parameters": [
|
|
9416
|
+
{
|
|
9417
|
+
"name": "radiobtn",
|
|
9418
|
+
"type": {
|
|
9419
|
+
"text": "NysRadiobutton"
|
|
9420
|
+
}
|
|
9421
|
+
},
|
|
9049
9422
|
{
|
|
9050
9423
|
"name": "event",
|
|
9051
9424
|
"type": {
|
|
@@ -9056,36 +9429,102 @@
|
|
|
9056
9429
|
},
|
|
9057
9430
|
{
|
|
9058
9431
|
"kind": "method",
|
|
9059
|
-
"name": "
|
|
9432
|
+
"name": "_handleTextInputBlur",
|
|
9060
9433
|
"privacy": "private",
|
|
9061
9434
|
"parameters": [
|
|
9062
9435
|
{
|
|
9063
|
-
"name": "
|
|
9436
|
+
"name": "radiobtn",
|
|
9064
9437
|
"type": {
|
|
9065
|
-
"text": "
|
|
9438
|
+
"text": "NysRadiobutton"
|
|
9066
9439
|
}
|
|
9067
9440
|
}
|
|
9068
9441
|
]
|
|
9069
9442
|
},
|
|
9070
9443
|
{
|
|
9071
9444
|
"kind": "method",
|
|
9072
|
-
"name": "
|
|
9073
|
-
"privacy": "private"
|
|
9445
|
+
"name": "_validateOtherAndEmitError",
|
|
9446
|
+
"privacy": "private",
|
|
9447
|
+
"parameters": [
|
|
9448
|
+
{
|
|
9449
|
+
"name": "radiobtn",
|
|
9450
|
+
"type": {
|
|
9451
|
+
"text": "NysRadiobutton"
|
|
9452
|
+
}
|
|
9453
|
+
}
|
|
9454
|
+
]
|
|
9074
9455
|
},
|
|
9075
9456
|
{
|
|
9076
9457
|
"kind": "method",
|
|
9077
|
-
"name": "
|
|
9458
|
+
"name": "_handleOtherKeydown",
|
|
9459
|
+
"privacy": "private",
|
|
9460
|
+
"parameters": [
|
|
9461
|
+
{
|
|
9462
|
+
"name": "e",
|
|
9463
|
+
"type": {
|
|
9464
|
+
"text": "KeyboardEvent"
|
|
9465
|
+
}
|
|
9466
|
+
}
|
|
9467
|
+
]
|
|
9468
|
+
},
|
|
9469
|
+
{
|
|
9470
|
+
"kind": "method",
|
|
9471
|
+
"name": "_handleGroupFocusout",
|
|
9078
9472
|
"privacy": "private",
|
|
9079
9473
|
"parameters": [
|
|
9080
9474
|
{
|
|
9081
9475
|
"name": "event",
|
|
9082
9476
|
"type": {
|
|
9083
|
-
"text": "
|
|
9477
|
+
"text": "FocusEvent"
|
|
9478
|
+
}
|
|
9479
|
+
}
|
|
9480
|
+
]
|
|
9481
|
+
},
|
|
9482
|
+
{
|
|
9483
|
+
"kind": "field",
|
|
9484
|
+
"name": "_handleRadiobtnClick",
|
|
9485
|
+
"privacy": "private"
|
|
9486
|
+
},
|
|
9487
|
+
{
|
|
9488
|
+
"kind": "method",
|
|
9489
|
+
"name": "_handleRadiobtnFocus",
|
|
9490
|
+
"privacy": "private",
|
|
9491
|
+
"parameters": [
|
|
9492
|
+
{
|
|
9493
|
+
"name": "radiobtn",
|
|
9494
|
+
"type": {
|
|
9495
|
+
"text": "NysRadiobutton"
|
|
9496
|
+
}
|
|
9497
|
+
}
|
|
9498
|
+
]
|
|
9499
|
+
},
|
|
9500
|
+
{
|
|
9501
|
+
"kind": "method",
|
|
9502
|
+
"name": "_handleRadiobtnBlur",
|
|
9503
|
+
"privacy": "private",
|
|
9504
|
+
"parameters": [
|
|
9505
|
+
{
|
|
9506
|
+
"name": "radiobtn",
|
|
9507
|
+
"type": {
|
|
9508
|
+
"text": "NysRadiobutton"
|
|
9084
9509
|
}
|
|
9085
9510
|
}
|
|
9086
9511
|
]
|
|
9087
9512
|
}
|
|
9088
9513
|
],
|
|
9514
|
+
"events": [
|
|
9515
|
+
{
|
|
9516
|
+
"name": "nys-change",
|
|
9517
|
+
"type": {
|
|
9518
|
+
"text": "CustomEvent"
|
|
9519
|
+
}
|
|
9520
|
+
},
|
|
9521
|
+
{
|
|
9522
|
+
"name": "nys-other-input",
|
|
9523
|
+
"type": {
|
|
9524
|
+
"text": "CustomEvent"
|
|
9525
|
+
}
|
|
9526
|
+
}
|
|
9527
|
+
],
|
|
9089
9528
|
"attributes": [
|
|
9090
9529
|
{
|
|
9091
9530
|
"name": "id",
|
|
@@ -9206,6 +9645,15 @@
|
|
|
9206
9645
|
"description": "Radio size for all children: `sm` (24px) or `md` (32px, default).",
|
|
9207
9646
|
"fieldName": "size",
|
|
9208
9647
|
"propName": "size"
|
|
9648
|
+
},
|
|
9649
|
+
{
|
|
9650
|
+
"name": "_showOtherError",
|
|
9651
|
+
"type": {
|
|
9652
|
+
"text": "boolean"
|
|
9653
|
+
},
|
|
9654
|
+
"default": "false",
|
|
9655
|
+
"fieldName": "_showOtherError",
|
|
9656
|
+
"propName": "_showothererror"
|
|
9209
9657
|
}
|
|
9210
9658
|
],
|
|
9211
9659
|
"superclass": {
|
|
@@ -10081,7 +10529,7 @@
|
|
|
10081
10529
|
"declarations": [
|
|
10082
10530
|
{
|
|
10083
10531
|
"kind": "class",
|
|
10084
|
-
"description": "A single step within `nys-stepper`. Represents one stage in a multi-step process.\n\nMark as `current` to indicate active progress point. Previous steps become clickable for navigation.\nSet `href` for page-based navigation or listen to `nys-step-click` for SPA routing.\n\n## Step
|
|
10532
|
+
"description": "A single step within `nys-stepper`. Represents one stage in a multi-step process.\n\nMark as `current` to indicate the active progress point. Previous steps become clickable for navigation.\nSet `href` for page-based navigation, or omit it and listen to `nys-step-click` for SPA/framework routing.\n\n## Step states\n\nThree boolean attributes control step appearance and behavior:\n\n- **`current`** — The furthest step the user has reached (the progress boundary). Only one step should\n have `current` at a time; if multiple are set the parent stepper keeps the first and removes the rest.\n Steps after `current` are not navigable and do not fire `nys-step-click`. Update `current` in your\n application state when the user advances.\n\n- **`selected`** — Which step's content is currently displayed. Defaults to the `current` step if not\n explicitly set. If `selected` is placed on a step after `current`, the stepper silently corrects it\n to match `current`. When managing state from a framework, always set `selected` explicitly — without\n it the stepper's fallback will reset in-sidebar navigation on every state update.\n\n- **`previous`** — Auto-applied by the parent stepper to every step before `current`. Do not set this\n manually. Steps with `previous` are clickable and fire `nys-step-click`.\n\n## `nys-step-click` firing conditions\n\nThe event fires only when ALL of the following are true:\n1. The step has `previous` or `current` (i.e. it is navigable).\n2. The step does NOT already have `selected` (clicking the already-viewed step is a no-op).\n\nSteps that are neither `previous` nor `current` (future steps) never fire the event.\n\n## `href` and navigation\n\nIf `href` is set, the stepper calls `window.location.href = href` after dispatching `nys-step-click`\n— but only if the event was **not canceled**. To handle navigation yourself (SPA routing, fetch, etc.),\nalways call `e.preventDefault()` in your listener. Omitting `href` entirely is simpler for SPAs.\n\n## `onClick` vs `nys-step-click`\n\nThe `onClick` property (a function reference, not a DOM attribute) is called **before** the\n`nys-step-click` event is dispatched. Use it for imperative pre-navigation logic. In React, pass it\nas the `onClick` prop on `NysStep`.\n\n## Accessibility\n- The step label renders with `role=\"button\"` and is keyboard-focusable (`tabindex=\"0\"`) for navigable\n steps (`current`, `previous`). Future steps get `tabindex=\"-1\"` and are not reachable by keyboard.\n- Enter and Space activate the step (same as click).\n- `aria-label` is set to `\"{label} Step\"` for screen reader announcement.\n\n## Common patterns\n\n**Initial state:** Set `current` on the first step. `selected` defaults to it.\n```html\n<nys-step label=\"Step 1\" current></nys-step>\n<nys-step label=\"Step 2\"></nys-step>\n```\n\n**User completed step 1, now on step 2:**\n```html\n<nys-step label=\"Step 1\"></nys-step>\n<nys-step label=\"Step 2\" current></nys-step>\n```\n\n**User went back to review step 1 (progress still at step 2):**\n```html\n<nys-step label=\"Step 1\" selected></nys-step>\n<nys-step label=\"Step 2\" current></nys-step>\n```",
|
|
10085
10533
|
"name": "NysStep",
|
|
10086
10534
|
"members": [
|
|
10087
10535
|
{
|
|
@@ -10091,7 +10539,7 @@
|
|
|
10091
10539
|
"text": "boolean"
|
|
10092
10540
|
},
|
|
10093
10541
|
"default": "false",
|
|
10094
|
-
"description": "
|
|
10542
|
+
"description": "Which step is currently being displayed. If not set, defaults to the `current` step.\nSetting this on a step after `current` is silently corrected to match `current`.\nWhen controlling state from a framework, always set this explicitly.",
|
|
10095
10543
|
"attribute": "selected",
|
|
10096
10544
|
"reflects": true
|
|
10097
10545
|
},
|
|
@@ -10102,7 +10550,7 @@
|
|
|
10102
10550
|
"text": "boolean"
|
|
10103
10551
|
},
|
|
10104
10552
|
"default": "false",
|
|
10105
|
-
"description": "
|
|
10553
|
+
"description": "The furthest step the user has reached (progress boundary). Steps before this are navigable.",
|
|
10106
10554
|
"attribute": "current",
|
|
10107
10555
|
"reflects": true
|
|
10108
10556
|
},
|
|
@@ -10123,36 +10571,16 @@
|
|
|
10123
10571
|
"text": "string"
|
|
10124
10572
|
},
|
|
10125
10573
|
"default": "\"\"",
|
|
10126
|
-
"description": "URL
|
|
10574
|
+
"description": "URL navigated to when the step is activated, via `window.location.href`.\nNavigation is suppressed if the `nys-step-click` listener calls `e.preventDefault()`.\nOmit for SPA/framework routing and handle navigation in the event listener instead.",
|
|
10127
10575
|
"attribute": "href"
|
|
10128
10576
|
},
|
|
10129
|
-
{
|
|
10130
|
-
"kind": "field",
|
|
10131
|
-
"name": "isCompactExpanded",
|
|
10132
|
-
"type": {
|
|
10133
|
-
"text": "boolean"
|
|
10134
|
-
},
|
|
10135
|
-
"default": "false",
|
|
10136
|
-
"description": "Internal: Whether parent stepper's compact view is expanded.",
|
|
10137
|
-
"attribute": "isCompactExpanded"
|
|
10138
|
-
},
|
|
10139
10577
|
{
|
|
10140
10578
|
"kind": "field",
|
|
10141
10579
|
"name": "onClick",
|
|
10142
10580
|
"type": {
|
|
10143
10581
|
"text": "(e: Event) => void | undefined"
|
|
10144
10582
|
},
|
|
10145
|
-
"description": "
|
|
10146
|
-
},
|
|
10147
|
-
{
|
|
10148
|
-
"kind": "field",
|
|
10149
|
-
"name": "stepNumber",
|
|
10150
|
-
"type": {
|
|
10151
|
-
"text": "number"
|
|
10152
|
-
},
|
|
10153
|
-
"default": "0",
|
|
10154
|
-
"description": "Step number (1-indexed). Auto-assigned by parent stepper.",
|
|
10155
|
-
"attribute": "stepNumber"
|
|
10583
|
+
"description": "Optional function called before `nys-step-click` is dispatched. Use for pre-navigation logic."
|
|
10156
10584
|
},
|
|
10157
10585
|
{
|
|
10158
10586
|
"kind": "method",
|
|
@@ -10183,7 +10611,7 @@
|
|
|
10183
10611
|
],
|
|
10184
10612
|
"events": [
|
|
10185
10613
|
{
|
|
10186
|
-
"description": "Fired when a navigable step is clicked. Detail: `{href, label}`. Cancelable.",
|
|
10614
|
+
"description": "Fired when a navigable (`previous` or `current`) non-selected step is clicked or activated by keyboard. Detail: `{ href: string, label: string }`. Cancelable — call `e.preventDefault()` to suppress `window.location.href` navigation.",
|
|
10187
10615
|
"name": "nys-step-click"
|
|
10188
10616
|
}
|
|
10189
10617
|
],
|
|
@@ -10194,7 +10622,7 @@
|
|
|
10194
10622
|
"text": "boolean"
|
|
10195
10623
|
},
|
|
10196
10624
|
"default": "false",
|
|
10197
|
-
"description": "
|
|
10625
|
+
"description": "Which step is currently being displayed. If not set, defaults to the `current` step.\nSetting this on a step after `current` is silently corrected to match `current`.\nWhen controlling state from a framework, always set this explicitly.",
|
|
10198
10626
|
"fieldName": "selected",
|
|
10199
10627
|
"propName": "selected"
|
|
10200
10628
|
},
|
|
@@ -10204,7 +10632,7 @@
|
|
|
10204
10632
|
"text": "boolean"
|
|
10205
10633
|
},
|
|
10206
10634
|
"default": "false",
|
|
10207
|
-
"description": "
|
|
10635
|
+
"description": "The furthest step the user has reached (progress boundary). Steps before this are navigable.",
|
|
10208
10636
|
"fieldName": "current",
|
|
10209
10637
|
"propName": "current"
|
|
10210
10638
|
},
|
|
@@ -10224,29 +10652,9 @@
|
|
|
10224
10652
|
"text": "string"
|
|
10225
10653
|
},
|
|
10226
10654
|
"default": "\"\"",
|
|
10227
|
-
"description": "URL
|
|
10655
|
+
"description": "URL navigated to when the step is activated, via `window.location.href`.\nNavigation is suppressed if the `nys-step-click` listener calls `e.preventDefault()`.\nOmit for SPA/framework routing and handle navigation in the event listener instead.",
|
|
10228
10656
|
"fieldName": "href",
|
|
10229
10657
|
"propName": "href"
|
|
10230
|
-
},
|
|
10231
|
-
{
|
|
10232
|
-
"name": "isCompactExpanded",
|
|
10233
|
-
"type": {
|
|
10234
|
-
"text": "boolean"
|
|
10235
|
-
},
|
|
10236
|
-
"default": "false",
|
|
10237
|
-
"description": "Internal: Whether parent stepper's compact view is expanded.",
|
|
10238
|
-
"fieldName": "isCompactExpanded",
|
|
10239
|
-
"propName": "iscompactexpanded"
|
|
10240
|
-
},
|
|
10241
|
-
{
|
|
10242
|
-
"name": "stepNumber",
|
|
10243
|
-
"type": {
|
|
10244
|
-
"text": "number"
|
|
10245
|
-
},
|
|
10246
|
-
"default": "0",
|
|
10247
|
-
"description": "Step number (1-indexed). Auto-assigned by parent stepper.",
|
|
10248
|
-
"fieldName": "stepNumber",
|
|
10249
|
-
"propName": "stepnumber"
|
|
10250
10658
|
}
|
|
10251
10659
|
],
|
|
10252
10660
|
"superclass": {
|
|
@@ -10258,9 +10666,14 @@
|
|
|
10258
10666
|
"summary": "Individual step for use within nys-stepper with navigation support.",
|
|
10259
10667
|
"examples": [
|
|
10260
10668
|
{
|
|
10261
|
-
"title": "Step with navigation",
|
|
10669
|
+
"title": "Step with page navigation",
|
|
10262
10670
|
"code": "<nys-step label=\"Personal Info\" href=\"/step-1\"></nys-step>",
|
|
10263
10671
|
"lang": "html"
|
|
10672
|
+
},
|
|
10673
|
+
{
|
|
10674
|
+
"title": "Step with SPA navigation (no href)",
|
|
10675
|
+
"code": "step.addEventListener('nys-step-click', (e) => {\ne.preventDefault(); // no href set, but good practice\nshowStepContent(e.detail.label);\n});",
|
|
10676
|
+
"lang": "js"
|
|
10264
10677
|
}
|
|
10265
10678
|
]
|
|
10266
10679
|
}
|
|
@@ -10290,15 +10703,15 @@
|
|
|
10290
10703
|
"declarations": [
|
|
10291
10704
|
{
|
|
10292
10705
|
"kind": "class",
|
|
10293
|
-
"description": "A multi-step progress indicator for forms or wizards. Manages `nys-step` children with selection and navigation.\n\nAdd `nys-step` elements as children. Mark one step as `current` to indicate progress;
|
|
10706
|
+
"description": "A multi-step progress indicator for forms or wizards. Manages `nys-step` children with selection and navigation.\n\nAdd `nys-step` elements as children. Mark one step as `current` to indicate the progress boundary; all steps\nbefore it become navigable. Compact view on mobile expands to show all steps. Use the `actions` slot for\npersistent navigation buttons (e.g., Save & Exit). Do not place the stepper inside a `<form>` element —\nput form fields in the main content area alongside it.\n\n## When to use\n- Linear, ordered forms or wizards with more than 2 sections.\n\n## When not to use\n- Forms with only 1 or 2 sections — use a simpler layout.\n- Non-linear forms where sections can be completed in any order.\n\n## Compact mode (mobile)\nOn small screens the stepper collapses to a compact view: step labels are hidden and progress\nis shown as a bar indicator with a \"Step x of y\" counter. Clicking or pressing Enter/Space on\nthe counter expands the full step list (counter text changes to \"Back to Form\"). Collapsing\nagain returns the user to the form view.\n\n## actions slot constraints\nThe `actions` slot must contain exactly one `<div>` as its direct child. That `<div>` may only\ncontain `<nys-button>` elements — any other element is removed with a console warning.\nThe stepper automatically forces `size=\"sm\"` on every button in the slot. Buttons with the\n`fullWidth` attribute get `flex: 1 1 0` injected so they share available width equally.\n\n## Multiple `current` conflict\nIf more than one `nys-step` has the `current` attribute, only the first one is kept; the rest\nare silently removed. Always mark exactly one step as `current`.\n\n## id auto-generation\nIf no `id` is provided, a unique id is generated automatically in the form\n`nys-stepper-{n}-{timestamp}`.\n\n## Accessibility\n- The compact counter is rendered as a `role=\"button\"` with `aria-expanded` and a descriptive\n `aria-label` that announces the current step (e.g., \"Expand step navigation. You are on Step 2 of 4\").\n- Keyboard: Enter or Space toggles the compact view.\n- Each `nys-step` label is keyboard-focusable and activatable for navigable steps.\n- Visual focus indicators are provided on all interactive elements.",
|
|
10294
10707
|
"name": "NysStepper",
|
|
10295
10708
|
"slots": [
|
|
10296
10709
|
{
|
|
10297
|
-
"description": "Default slot for `nys-step` elements.",
|
|
10710
|
+
"description": "Default slot for `nys-step` elements. Only `nys-step` children are accepted; others are removed.",
|
|
10298
10711
|
"name": ""
|
|
10299
10712
|
},
|
|
10300
10713
|
{
|
|
10301
|
-
"description": "
|
|
10714
|
+
"description": "Persistent navigation buttons. Must contain exactly one `<div>` wrapping only `<nys-button>` elements.",
|
|
10302
10715
|
"name": "actions"
|
|
10303
10716
|
}
|
|
10304
10717
|
],
|
|
@@ -10310,7 +10723,7 @@
|
|
|
10310
10723
|
"text": "string"
|
|
10311
10724
|
},
|
|
10312
10725
|
"default": "\"\"",
|
|
10313
|
-
"description": "Unique identifier.",
|
|
10726
|
+
"description": "Unique identifier. Auto-generated as `nys-stepper-{n}-{timestamp}` if not provided.",
|
|
10314
10727
|
"attribute": "id",
|
|
10315
10728
|
"reflects": true
|
|
10316
10729
|
},
|
|
@@ -10332,7 +10745,7 @@
|
|
|
10332
10745
|
"text": "string"
|
|
10333
10746
|
},
|
|
10334
10747
|
"default": "\"\"",
|
|
10335
|
-
"description": "Title displayed above the step counter.",
|
|
10748
|
+
"description": "Title displayed above the step list and compact counter.",
|
|
10336
10749
|
"attribute": "label"
|
|
10337
10750
|
},
|
|
10338
10751
|
{
|
|
@@ -10342,7 +10755,7 @@
|
|
|
10342
10755
|
"text": "string"
|
|
10343
10756
|
},
|
|
10344
10757
|
"default": "\"initial\"",
|
|
10345
|
-
"description": "Progress text (e.g., \"Step 2 of 5\"). Auto-
|
|
10758
|
+
"description": "Progress text displayed in compact mode (e.g., \"Step 2 of 5\"). Auto-managed — do not set manually.",
|
|
10346
10759
|
"attribute": "counterText"
|
|
10347
10760
|
},
|
|
10348
10761
|
{
|
|
@@ -10352,7 +10765,7 @@
|
|
|
10352
10765
|
"text": "boolean"
|
|
10353
10766
|
},
|
|
10354
10767
|
"default": "false",
|
|
10355
|
-
"description": "Whether compact mobile view is expanded to show all steps.",
|
|
10768
|
+
"description": "Whether compact mobile view is expanded to show all steps. Toggled by clicking the counter.",
|
|
10356
10769
|
"attribute": "isCompactExpanded",
|
|
10357
10770
|
"reflects": true
|
|
10358
10771
|
},
|
|
@@ -10419,7 +10832,7 @@
|
|
|
10419
10832
|
"text": "string"
|
|
10420
10833
|
},
|
|
10421
10834
|
"default": "\"\"",
|
|
10422
|
-
"description": "Unique identifier.",
|
|
10835
|
+
"description": "Unique identifier. Auto-generated as `nys-stepper-{n}-{timestamp}` if not provided.",
|
|
10423
10836
|
"fieldName": "id",
|
|
10424
10837
|
"propName": "id"
|
|
10425
10838
|
},
|
|
@@ -10439,7 +10852,7 @@
|
|
|
10439
10852
|
"text": "string"
|
|
10440
10853
|
},
|
|
10441
10854
|
"default": "\"\"",
|
|
10442
|
-
"description": "Title displayed above the step counter.",
|
|
10855
|
+
"description": "Title displayed above the step list and compact counter.",
|
|
10443
10856
|
"fieldName": "label",
|
|
10444
10857
|
"propName": "label"
|
|
10445
10858
|
},
|
|
@@ -10449,7 +10862,7 @@
|
|
|
10449
10862
|
"text": "string"
|
|
10450
10863
|
},
|
|
10451
10864
|
"default": "\"initial\"",
|
|
10452
|
-
"description": "Progress text (e.g., \"Step 2 of 5\"). Auto-
|
|
10865
|
+
"description": "Progress text displayed in compact mode (e.g., \"Step 2 of 5\"). Auto-managed — do not set manually.",
|
|
10453
10866
|
"fieldName": "counterText",
|
|
10454
10867
|
"propName": "countertext"
|
|
10455
10868
|
},
|
|
@@ -10459,7 +10872,7 @@
|
|
|
10459
10872
|
"text": "boolean"
|
|
10460
10873
|
},
|
|
10461
10874
|
"default": "false",
|
|
10462
|
-
"description": "Whether compact mobile view is expanded to show all steps.",
|
|
10875
|
+
"description": "Whether compact mobile view is expanded to show all steps. Toggled by clicking the counter.",
|
|
10463
10876
|
"fieldName": "isCompactExpanded",
|
|
10464
10877
|
"propName": "iscompactexpanded"
|
|
10465
10878
|
}
|
|
@@ -10486,6 +10899,11 @@
|
|
|
10486
10899
|
"title": "Navigation buttons in actions slot",
|
|
10487
10900
|
"code": "<nys-stepper label=\"Application\">\n<nys-step label=\"Step 1\"></nys-step>\n<nys-step label=\"Step 2\" current></nys-step>\n<nys-step label=\"Step 3\"></nys-step>\n<div slot=\"actions\">\n<nys-button label=\"Save and Exit\" variant=\"outline\" size=\"sm\" fullWidth></nys-button>\n</div>\n</nys-stepper>",
|
|
10488
10901
|
"lang": "html"
|
|
10902
|
+
},
|
|
10903
|
+
{
|
|
10904
|
+
"title": "SPA / programmatic navigation",
|
|
10905
|
+
"code": "let currentStep = 0; // furthest reached\nlet viewingStep = 0; // currently displayed\n\nfunction updateStepper(steps) {\nsteps.forEach((step, i) => {\nstep.toggleAttribute('current', i === currentStep);\nstep.toggleAttribute('selected', i === viewingStep);\n});\n}\n\ndocument.querySelector('nys-stepper').addEventListener('nys-step-click', (e) => {\ne.preventDefault();\nconst steps = Array.from(document.querySelectorAll('nys-step'));\nconst clicked = e.composedPath().find(el => el.tagName?.toLowerCase() === 'nys-step');\nconst index = steps.indexOf(clicked);\nif (index !== -1) { viewingStep = index; updateStepper(steps); }\n});\n\n// Advance to next step (call on form submit / \"Continue\" click)\nfunction advance(steps) {\nif (currentStep < steps.length - 1) {\ncurrentStep++;\nviewingStep = currentStep;\nupdateStepper(steps);\n}\n}",
|
|
10906
|
+
"lang": "js"
|
|
10489
10907
|
}
|
|
10490
10908
|
]
|
|
10491
10909
|
}
|
|
@@ -13424,6 +13842,15 @@
|
|
|
13424
13842
|
"privacy": "private",
|
|
13425
13843
|
"default": "null"
|
|
13426
13844
|
},
|
|
13845
|
+
{
|
|
13846
|
+
"kind": "field",
|
|
13847
|
+
"name": "_resizeObserver",
|
|
13848
|
+
"type": {
|
|
13849
|
+
"text": "ResizeObserver | null"
|
|
13850
|
+
},
|
|
13851
|
+
"privacy": "private",
|
|
13852
|
+
"default": "null"
|
|
13853
|
+
},
|
|
13427
13854
|
{
|
|
13428
13855
|
"kind": "field",
|
|
13429
13856
|
"name": "position",
|