@nysds/components 1.18.3 → 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.
Files changed (106) hide show
  1. package/custom-elements.json +582 -191
  2. package/dist/.vscode/vscode.html-custom-data.json +16 -5
  3. package/dist/custom-elements.json +582 -191
  4. package/dist/icons/ac_unit.svg +8 -0
  5. package/dist/icons/account_balance_filled.svg +8 -0
  6. package/dist/icons/account_circle.svg +8 -0
  7. package/dist/icons/add.svg +8 -0
  8. package/dist/icons/air.svg +8 -0
  9. package/dist/icons/arrow_back.svg +8 -0
  10. package/dist/icons/arrow_downward.svg +8 -0
  11. package/dist/icons/arrow_forward.svg +8 -0
  12. package/dist/icons/arrow_upward.svg +8 -0
  13. package/dist/icons/attach_file.svg +8 -0
  14. package/dist/icons/calendar_month.svg +8 -0
  15. package/dist/icons/cancel.svg +8 -0
  16. package/dist/icons/cancel_filled.svg +8 -0
  17. package/dist/icons/check.svg +8 -0
  18. package/dist/icons/check_circle.svg +8 -0
  19. package/dist/icons/chevron_down.svg +8 -0
  20. package/dist/icons/chevron_left.svg +8 -0
  21. package/dist/icons/chevron_right.svg +8 -0
  22. package/dist/icons/chevron_up.svg +8 -0
  23. package/dist/icons/clear_day.svg +8 -0
  24. package/dist/icons/close.svg +8 -0
  25. package/dist/icons/code.svg +8 -0
  26. package/dist/icons/content_copy.svg +8 -0
  27. package/dist/icons/coronavirus.svg +8 -0
  28. package/dist/icons/delete.svg +8 -0
  29. package/dist/icons/download.svg +8 -0
  30. package/dist/icons/download_done.svg +8 -0
  31. package/dist/icons/drive_folder_upload.svg +8 -0
  32. package/dist/icons/edit_square.svg +8 -0
  33. package/dist/icons/emergency_home.svg +8 -0
  34. package/dist/icons/error.svg +8 -0
  35. package/dist/icons/expand_all.svg +8 -0
  36. package/dist/icons/filter_alt.svg +8 -0
  37. package/dist/icons/filter_list.svg +8 -0
  38. package/dist/icons/height.svg +8 -0
  39. package/dist/icons/help.svg +8 -0
  40. package/dist/icons/info.svg +8 -0
  41. package/dist/icons/language.svg +8 -0
  42. package/dist/icons/language_filled.svg +8 -0
  43. package/dist/icons/link.svg +8 -0
  44. package/dist/icons/lock_filled.svg +8 -0
  45. package/dist/icons/mail.svg +8 -0
  46. package/dist/icons/manifest.json +84 -0
  47. package/dist/icons/menu.svg +8 -0
  48. package/dist/icons/more_vert.svg +8 -0
  49. package/dist/icons/notifications.svg +8 -0
  50. package/dist/icons/open_in_new.svg +8 -0
  51. package/dist/icons/phone_in_talk.svg +8 -0
  52. package/dist/icons/print.svg +8 -0
  53. package/dist/icons/progress_activity.svg +8 -0
  54. package/dist/icons/publish.svg +8 -0
  55. package/dist/icons/rainy.svg +8 -0
  56. package/dist/icons/refresh.svg +8 -0
  57. package/dist/icons/remove.svg +8 -0
  58. package/dist/icons/search.svg +8 -0
  59. package/dist/icons/share.svg +8 -0
  60. package/dist/icons/sms.svg +8 -0
  61. package/dist/icons/social_bluesky.svg +8 -0
  62. package/dist/icons/social_facebook.svg +8 -0
  63. package/dist/icons/social_flickr.svg +8 -0
  64. package/dist/icons/social_google_play.svg +8 -0
  65. package/dist/icons/social_instagram.svg +10 -0
  66. package/dist/icons/social_linkedin.svg +8 -0
  67. package/dist/icons/social_pinterest.svg +8 -0
  68. package/dist/icons/social_rss.svg +10 -0
  69. package/dist/icons/social_snapchat.svg +8 -0
  70. package/dist/icons/social_soundcloud.svg +21 -0
  71. package/dist/icons/social_threads.svg +9 -0
  72. package/dist/icons/social_tiktok.svg +8 -0
  73. package/dist/icons/social_tumblr.svg +8 -0
  74. package/dist/icons/social_vimeo.svg +8 -0
  75. package/dist/icons/social_x.svg +8 -0
  76. package/dist/icons/social_youtube.svg +8 -0
  77. package/dist/icons/sort.svg +8 -0
  78. package/dist/icons/straight.svg +8 -0
  79. package/dist/icons/thumb_down.svg +8 -0
  80. package/dist/icons/thumb_up.svg +8 -0
  81. package/dist/icons/upload_file.svg +8 -0
  82. package/dist/icons/visibility.svg +8 -0
  83. package/dist/icons/visibility_off.svg +8 -0
  84. package/dist/icons/warning.svg +8 -0
  85. package/dist/nysds.es.js +3657 -3579
  86. package/dist/nysds.es.js.map +1 -1
  87. package/dist/nysds.js +316 -866
  88. package/dist/nysds.js.map +1 -1
  89. package/dist/packages/nys-button/src/nys-button.d.ts +4 -0
  90. package/dist/packages/nys-divider/src/nys-divider.d.ts +2 -0
  91. package/dist/packages/nys-icon/src/icon-cache.d.ts +11 -0
  92. package/dist/packages/nys-icon/src/icon-library-registry.d.ts +47 -0
  93. package/dist/packages/nys-icon/src/index.d.ts +3 -0
  94. package/dist/packages/nys-icon/src/nys-icon.d.ts +40 -11
  95. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +1 -38
  96. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +17 -7
  97. package/package.json +12 -8
  98. package/packages/react/NysDivider.d.ts +3 -0
  99. package/packages/react/NysDivider.js +2 -1
  100. package/packages/react/NysIcon.d.ts +11 -2
  101. package/packages/react/NysIcon.js +26 -3
  102. package/packages/react/NysRadiobutton.d.ts +7 -23
  103. package/packages/react/NysRadiobutton.js +1 -3
  104. package/packages/react/NysRadiogroup.d.ts +18 -2
  105. package/packages/react/NysRadiogroup.js +17 -1
  106. package/packages/react/nysds-jsx.d.ts +30 -20
@@ -2208,6 +2208,24 @@
2208
2208
  },
2209
2209
  "privacy": "private"
2210
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
+ },
2211
2229
  {
2212
2230
  "kind": "field",
2213
2231
  "name": "formAssociated",
@@ -2224,6 +2242,32 @@
2224
2242
  "privacy": "private",
2225
2243
  "description": "Functions\n--------------------------------------------------------------------------"
2226
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
+ },
2227
2271
  {
2228
2272
  "kind": "method",
2229
2273
  "name": "_manageFormAction",
@@ -5337,6 +5381,17 @@
5337
5381
  "attribute": "inverted",
5338
5382
  "reflects": true
5339
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
+ },
5340
5395
  {
5341
5396
  "kind": "method",
5342
5397
  "name": "_generateUniqueId",
@@ -5354,6 +5409,16 @@
5354
5409
  "description": "Adjusts colors for dark backgrounds.",
5355
5410
  "fieldName": "inverted",
5356
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"
5357
5422
  }
5358
5423
  ],
5359
5424
  "superclass": {
@@ -7342,6 +7407,230 @@
7342
7407
  }
7343
7408
  ]
7344
7409
  },
7410
+ {
7411
+ "kind": "javascript-module",
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
+ ],
7452
+ "exports": [
7453
+ {
7454
+ "kind": "js",
7455
+ "name": "clearIconCache",
7456
+ "declaration": {
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"
7467
+ }
7468
+ }
7469
+ ]
7470
+ },
7471
+ {
7472
+ "kind": "javascript-module",
7473
+ "path": "packages/nys-icon/src/icon-library-registry.ts",
7474
+ "declarations": [
7475
+ {
7476
+ "kind": "function",
7477
+ "name": "getIconLibrary",
7478
+ "return": {
7479
+ "type": {
7480
+ "text": "IconLibrary | undefined"
7481
+ }
7482
+ },
7483
+ "parameters": [
7484
+ {
7485
+ "name": "name",
7486
+ "type": {
7487
+ "text": "string"
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": [
7502
+ {
7503
+ "name": "name",
7504
+ "type": {
7505
+ "text": "string"
7506
+ }
7507
+ },
7508
+ {
7509
+ "name": "library",
7510
+ "type": {
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": [
7517
+ {
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",
7535
+ "type": {
7536
+ "text": "string"
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": [
7551
+ {
7552
+ "name": "name",
7553
+ "type": {
7554
+ "text": "string"
7555
+ }
7556
+ },
7557
+ {
7558
+ "name": "watcher",
7559
+ "type": {
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
+ },
7345
7634
  {
7346
7635
  "kind": "javascript-module",
7347
7636
  "path": "packages/nys-icon/src/index.ts",
@@ -7354,6 +7643,38 @@
7354
7643
  "name": "*",
7355
7644
  "module": "packages/nys-icon/src/nys-icon"
7356
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
+ }
7357
7678
  }
7358
7679
  ]
7359
7680
  },
@@ -7363,7 +7684,7 @@
7363
7684
  "declarations": [
7364
7685
  {
7365
7686
  "kind": "class",
7366
- "description": "Renders SVG icons from the NYSDS icon library (Material Symbols). Decorative by default (`aria-hidden`).\n\nPass `name` to select an icon from the library. Use `ariaLabel` to make the icon accessible\n(removes `aria-hidden`). Supports size presets, rotation, flipping, and custom colors.",
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.",
7367
7688
  "name": "NysIcon",
7368
7689
  "members": [
7369
7690
  {
@@ -7373,10 +7694,21 @@
7373
7694
  "text": "string"
7374
7695
  },
7375
7696
  "default": "\"\"",
7376
- "description": "Icon name from Material Symbols library. Required.",
7697
+ "description": "Icon name to resolve from the selected library. Required.",
7377
7698
  "attribute": "name",
7378
7699
  "reflects": true
7379
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
+ },
7380
7712
  {
7381
7713
  "kind": "field",
7382
7714
  "name": "ariaLabel",
@@ -7428,15 +7760,72 @@
7428
7760
  "attribute": "size"
7429
7761
  },
7430
7762
  {
7431
- "kind": "method",
7432
- "name": "getIcon",
7763
+ "kind": "field",
7764
+ "name": "_svg",
7765
+ "type": {
7766
+ "text": "SVGElement | null"
7767
+ },
7433
7768
  "privacy": "private",
7434
- "return": {
7435
- "type": {
7436
- "text": ""
7437
- }
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"
7438
7786
  },
7439
- "description": "Retrieves the SVG element for the given icon name and applies\naccessibility, rotation, flip, color, and size classes."
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
+ ]
7440
7829
  }
7441
7830
  ],
7442
7831
  "attributes": [
@@ -7446,10 +7835,20 @@
7446
7835
  "text": "string"
7447
7836
  },
7448
7837
  "default": "\"\"",
7449
- "description": "Icon name from Material Symbols library. Required.",
7838
+ "description": "Icon name to resolve from the selected library. Required.",
7450
7839
  "fieldName": "name",
7451
7840
  "propName": "name"
7452
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
+ },
7453
7852
  {
7454
7853
  "name": "ariaLabel",
7455
7854
  "type": {
@@ -7507,13 +7906,18 @@
7507
7906
  },
7508
7907
  "tagName": "nys-icon",
7509
7908
  "customElement": true,
7510
- "summary": "SVG icon from Material Symbols library with size, rotation, and color options.",
7909
+ "summary": "SVG icon with swappable library support, size, rotation, and color options.",
7511
7910
  "examples": [
7512
7911
  {
7513
- "title": "Basic icon",
7912
+ "title": "Basic icon (default NYSDS library)",
7514
7913
  "code": "<nys-icon name=\"check_circle\" size=\"lg\"></nys-icon>",
7515
7914
  "lang": "html"
7516
7915
  },
7916
+ {
7917
+ "title": "Font Awesome icon",
7918
+ "code": "<nys-icon name=\"house\" library=\"fa\" size=\"lg\"></nys-icon>",
7919
+ "lang": "html"
7920
+ },
7517
7921
  {
7518
7922
  "title": "Accessible icon with label",
7519
7923
  "code": "<nys-icon name=\"warning\" ariaLabel=\"Warning\" color=\"var(--nys-color-warning)\"></nys-icon>",
@@ -8333,15 +8737,6 @@
8333
8737
  }
8334
8738
  ],
8335
8739
  "members": [
8336
- {
8337
- "kind": "field",
8338
- "name": "shadowRootOptions",
8339
- "type": {
8340
- "text": "object"
8341
- },
8342
- "static": true,
8343
- "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }"
8344
- },
8345
8740
  {
8346
8741
  "kind": "field",
8347
8742
  "name": "checked",
@@ -8478,169 +8873,24 @@
8478
8873
  },
8479
8874
  "default": "false",
8480
8875
  "attribute": "showOtherError"
8481
- },
8482
- {
8483
- "kind": "field",
8484
- "name": "isMobile",
8485
- "privacy": "private"
8486
- },
8487
- {
8488
- "kind": "field",
8489
- "name": "_hasUserInteracted",
8490
- "type": {
8491
- "text": "boolean"
8492
- },
8493
- "privacy": "private",
8494
- "default": "false"
8495
- },
8496
- {
8497
- "kind": "field",
8498
- "name": "buttonGroup",
8499
- "type": {
8500
- "text": "Record<string, NysRadiobutton>"
8501
- },
8502
- "static": true,
8503
- "default": "{}"
8504
- },
8505
- {
8506
- "kind": "method",
8507
- "name": "getInputElement",
8508
- "privacy": "public",
8509
- "return": {
8510
- "type": {
8511
- "text": "Promise<HTMLInputElement | null>"
8512
- }
8513
- },
8514
- "description": "Functions\n--------------------------------------------------------------------------"
8515
- },
8516
- {
8517
- "kind": "method",
8518
- "name": "formResetUpdate",
8519
- "privacy": "public"
8520
- },
8521
- {
8522
- "kind": "field",
8523
- "name": "_handleResize",
8524
- "privacy": "private"
8525
- },
8526
- {
8527
- "kind": "method",
8528
- "name": "_clearOtherState",
8529
- "privacy": "private"
8530
- },
8531
- {
8532
- "kind": "method",
8533
- "name": "_dispatchClearErrorEvent",
8534
- "privacy": "private"
8535
- },
8536
- {
8537
- "kind": "method",
8538
- "name": "_emitChangeEvent",
8539
- "privacy": "private",
8540
- "description": "Event Handlers\n--------------------------------------------------------------------------"
8541
- },
8542
- {
8543
- "kind": "method",
8544
- "name": "_emitOtherInputEvent",
8545
- "privacy": "private"
8546
- },
8547
- {
8548
- "kind": "method",
8549
- "name": "_handleChange",
8550
- "privacy": "private"
8551
- },
8552
- {
8553
- "kind": "method",
8554
- "name": "_handleFocus",
8555
- "privacy": "private"
8556
- },
8557
- {
8558
- "kind": "method",
8559
- "name": "_handleBlur",
8560
- "privacy": "private"
8561
- },
8562
- {
8563
- "kind": "method",
8564
- "name": "_callInputHandling",
8565
- "privacy": "private"
8566
- },
8567
- {
8568
- "kind": "method",
8569
- "name": "_handleTextInput",
8570
- "privacy": "private",
8571
- "parameters": [
8572
- {
8573
- "name": "event",
8574
- "type": {
8575
- "text": "Event"
8576
- }
8577
- }
8578
- ]
8579
- },
8580
- {
8581
- "kind": "method",
8582
- "name": "_handleTextInputBlur",
8583
- "privacy": "private"
8584
- },
8585
- {
8586
- "kind": "method",
8587
- "name": "_validateOtherAndEmitError",
8588
- "privacy": "private"
8589
- },
8590
- {
8591
- "kind": "method",
8592
- "name": "_handleOtherKeydown",
8593
- "privacy": "private",
8594
- "parameters": [
8595
- {
8596
- "name": "e",
8597
- "type": {
8598
- "text": "KeyboardEvent"
8599
- }
8600
- }
8601
- ]
8602
8876
  }
8603
8877
  ],
8604
8878
  "events": [
8605
8879
  {
8606
- "name": "nys-error-clear",
8607
- "type": {
8608
- "text": "CustomEvent"
8609
- }
8610
- },
8611
- {
8612
- "name": "nys-change",
8613
- "type": {
8614
- "text": "CustomEvent"
8615
- },
8616
- "description": "Fired when selection changes. Detail: `{id, checked, name, value}`."
8617
- },
8618
- {
8619
- "name": "nys-other-input",
8620
- "type": {
8621
- "text": "CustomEvent"
8622
- },
8623
- "description": "Fired when \"other\" text input value changes. Detail: `{id, name, value}`."
8880
+ "description": "Fired when selection changes. Detail: `{id, checked, name, value}`.",
8881
+ "name": "nys-change"
8624
8882
  },
8625
8883
  {
8626
- "name": "nys-focus",
8627
- "type": {
8628
- "text": "Event"
8629
- },
8630
- "description": "Fired when radio gains focus."
8884
+ "description": "Fired when radio gains focus.",
8885
+ "name": "nys-focus"
8631
8886
  },
8632
8887
  {
8633
- "name": "nys-blur",
8634
- "type": {
8635
- "text": "Event"
8636
- },
8637
- "description": "Fired when radio loses focus."
8888
+ "description": "Fired when radio loses focus.",
8889
+ "name": "nys-blur"
8638
8890
  },
8639
8891
  {
8640
- "name": "nys-error",
8641
- "type": {
8642
- "text": "CustomEvent"
8643
- }
8892
+ "description": "Fired when \"other\" text input value changes. Detail: `{id, name, value}`.",
8893
+ "name": "nys-other-input"
8644
8894
  }
8645
8895
  ],
8646
8896
  "attributes": [
@@ -8779,7 +9029,7 @@
8779
9029
  },
8780
9030
  "tagName": "nys-radiobutton",
8781
9031
  "customElement": true,
8782
- "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.",
8783
9033
  "examples": [
8784
9034
  {
8785
9035
  "title": "Radio group",
@@ -8964,6 +9214,15 @@
8964
9214
  "attribute": "size",
8965
9215
  "reflects": true
8966
9216
  },
9217
+ {
9218
+ "kind": "field",
9219
+ "name": "_showOtherError",
9220
+ "type": {
9221
+ "text": "boolean"
9222
+ },
9223
+ "default": "false",
9224
+ "attribute": "_showOtherError"
9225
+ },
8967
9226
  {
8968
9227
  "kind": "field",
8969
9228
  "name": "selectedValue",
@@ -8982,6 +9241,49 @@
8982
9241
  "privacy": "private",
8983
9242
  "default": "\"\""
8984
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
+ },
8985
9287
  {
8986
9288
  "kind": "field",
8987
9289
  "name": "_internals",
@@ -9054,30 +9356,38 @@
9054
9356
  "privacy": "public"
9055
9357
  },
9056
9358
  {
9057
- "kind": "method",
9058
- "name": "_initializeChildAttributes",
9359
+ "kind": "field",
9360
+ "name": "_handleMobileQuery",
9059
9361
  "privacy": "private",
9060
9362
  "description": "Functions\n--------------------------------------------------------------------------"
9061
9363
  },
9062
9364
  {
9063
9365
  "kind": "method",
9064
- "name": "_updateRadioButtonsSize",
9366
+ "name": "_handleSlotChange",
9065
9367
  "privacy": "private"
9066
9368
  },
9067
9369
  {
9068
9370
  "kind": "method",
9069
- "name": "_updateRadioButtonsTile",
9371
+ "name": "_initializeChildAttributes",
9070
9372
  "privacy": "private"
9071
9373
  },
9072
9374
  {
9073
9375
  "kind": "method",
9074
- "name": "_updateRadioButtonsShowError",
9376
+ "name": "_updateRadioButtonsSize",
9075
9377
  "privacy": "private"
9076
9378
  },
9077
9379
  {
9078
9380
  "kind": "method",
9079
- "name": "_updateRadioButtonsForm",
9080
- "privacy": "private"
9381
+ "name": "_selectRadio",
9382
+ "privacy": "private",
9383
+ "parameters": [
9384
+ {
9385
+ "name": "radiobtn",
9386
+ "type": {
9387
+ "text": "NysRadiobutton"
9388
+ }
9389
+ }
9390
+ ]
9081
9391
  },
9082
9392
  {
9083
9393
  "kind": "method",
@@ -9086,7 +9396,7 @@
9086
9396
  },
9087
9397
  {
9088
9398
  "kind": "method",
9089
- "name": "_handleRadioButtonChange",
9399
+ "name": "_handleInvalid",
9090
9400
  "privacy": "private",
9091
9401
  "parameters": [
9092
9402
  {
@@ -9100,9 +9410,15 @@
9100
9410
  },
9101
9411
  {
9102
9412
  "kind": "method",
9103
- "name": "_handleInvalid",
9413
+ "name": "_handleTextInput",
9104
9414
  "privacy": "private",
9105
9415
  "parameters": [
9416
+ {
9417
+ "name": "radiobtn",
9418
+ "type": {
9419
+ "text": "NysRadiobutton"
9420
+ }
9421
+ },
9106
9422
  {
9107
9423
  "name": "event",
9108
9424
  "type": {
@@ -9113,36 +9429,102 @@
9113
9429
  },
9114
9430
  {
9115
9431
  "kind": "method",
9116
- "name": "_handleChildError",
9432
+ "name": "_handleTextInputBlur",
9117
9433
  "privacy": "private",
9118
9434
  "parameters": [
9119
9435
  {
9120
- "name": "event",
9436
+ "name": "radiobtn",
9121
9437
  "type": {
9122
- "text": "Event"
9438
+ "text": "NysRadiobutton"
9123
9439
  }
9124
9440
  }
9125
9441
  ]
9126
9442
  },
9127
9443
  {
9128
9444
  "kind": "method",
9129
- "name": "_handleChildErrorClear",
9130
- "privacy": "private"
9445
+ "name": "_validateOtherAndEmitError",
9446
+ "privacy": "private",
9447
+ "parameters": [
9448
+ {
9449
+ "name": "radiobtn",
9450
+ "type": {
9451
+ "text": "NysRadiobutton"
9452
+ }
9453
+ }
9454
+ ]
9131
9455
  },
9132
9456
  {
9133
9457
  "kind": "method",
9134
- "name": "_handleOtherInput",
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",
9135
9472
  "privacy": "private",
9136
9473
  "parameters": [
9137
9474
  {
9138
9475
  "name": "event",
9139
9476
  "type": {
9140
- "text": "Event"
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"
9141
9509
  }
9142
9510
  }
9143
9511
  ]
9144
9512
  }
9145
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
+ ],
9146
9528
  "attributes": [
9147
9529
  {
9148
9530
  "name": "id",
@@ -9263,6 +9645,15 @@
9263
9645
  "description": "Radio size for all children: `sm` (24px) or `md` (32px, default).",
9264
9646
  "fieldName": "size",
9265
9647
  "propName": "size"
9648
+ },
9649
+ {
9650
+ "name": "_showOtherError",
9651
+ "type": {
9652
+ "text": "boolean"
9653
+ },
9654
+ "default": "false",
9655
+ "fieldName": "_showOtherError",
9656
+ "propName": "_showothererror"
9266
9657
  }
9267
9658
  ],
9268
9659
  "superclass": {