@nysds/components 1.17.0 → 1.18.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 (41) hide show
  1. package/custom-elements.json +731 -194
  2. package/dist/.vscode/vscode.html-custom-data.json +62 -21
  3. package/dist/custom-elements.json +731 -194
  4. package/dist/nysds.es.js +2235 -1854
  5. package/dist/nysds.es.js.map +1 -1
  6. package/dist/nysds.js +232 -210
  7. package/dist/nysds.js.map +1 -1
  8. package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +15 -3
  9. package/dist/packages/nys-badge/src/nys-badge.d.ts +2 -0
  10. package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +0 -2
  11. package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +1 -4
  12. package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +0 -2
  13. package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +1 -4
  14. package/dist/packages/nys-tab/src/index.d.ts +3 -0
  15. package/dist/packages/nys-tab/src/nys-tab.d.ts +116 -0
  16. package/dist/packages/nys-tab/src/nys-tab.figma.d.ts +1 -0
  17. package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +197 -0
  18. package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +46 -0
  19. package/dist/packages/nys-table/src/nys-table.d.ts +10 -7
  20. package/dist/src/index.d.ts +1 -0
  21. package/package.json +1 -1
  22. package/packages/react/NysBacktotop.d.ts +1 -1
  23. package/packages/react/NysBadge.d.ts +3 -0
  24. package/packages/react/NysBadge.js +2 -0
  25. package/packages/react/NysCheckbox.d.ts +0 -3
  26. package/packages/react/NysCheckbox.js +0 -2
  27. package/packages/react/NysCheckboxgroup.d.ts +0 -3
  28. package/packages/react/NysCheckboxgroup.js +0 -2
  29. package/packages/react/NysRadiobutton.d.ts +0 -3
  30. package/packages/react/NysRadiobutton.js +0 -2
  31. package/packages/react/NysRadiogroup.d.ts +0 -3
  32. package/packages/react/NysRadiogroup.js +0 -2
  33. package/packages/react/NysTab.d.ts +90 -0
  34. package/packages/react/NysTab.js +39 -0
  35. package/packages/react/NysTabgroup.d.ts +75 -0
  36. package/packages/react/NysTabgroup.js +22 -0
  37. package/packages/react/NysTabpanel.d.ts +63 -0
  38. package/packages/react/NysTabpanel.js +21 -0
  39. package/packages/react/index.d.ts +3 -0
  40. package/packages/react/index.js +3 -0
  41. package/packages/react/nysds-jsx.d.ts +108 -9
@@ -1058,7 +1058,7 @@
1058
1058
  "declarations": [
1059
1059
  {
1060
1060
  "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`).",
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 automatically moved\nto the `<main>` element (if present), the first heading (`<h1>` or `<h2>`), or the document element.\nThis ensures keyboard navigation continues naturally from the top of the page.",
1062
1062
  "name": "NysBacktotop",
1063
1063
  "members": [
1064
1064
  {
@@ -1119,6 +1119,11 @@
1119
1119
  "name": "_scrollToTop",
1120
1120
  "privacy": "private"
1121
1121
  },
1122
+ {
1123
+ "kind": "method",
1124
+ "name": "_moveFocusToTop",
1125
+ "privacy": "private"
1126
+ },
1122
1127
  {
1123
1128
  "kind": "method",
1124
1129
  "name": "_handleResize",
@@ -1153,11 +1158,11 @@
1153
1158
  },
1154
1159
  "tagName": "nys-backtotop",
1155
1160
  "customElement": true,
1156
- "summary": "Floating back-to-top button with auto-show behavior and smooth scroll.",
1161
+ "summary": "Floating back-to-top button with auto-show behavior, smooth scroll, and focus management.",
1157
1162
  "examples": [
1158
1163
  {
1159
- "title": "Auto-appearing button",
1160
- "code": "<nys-backtotop></nys-backtotop>",
1164
+ "title": "Auto-appearing button in footer",
1165
+ "code": "<footer>\n<nys-backtotop></nys-backtotop>\n<!-- Other footer content -->\n</footer>",
1161
1166
  "lang": "html"
1162
1167
  },
1163
1168
  {
@@ -1275,6 +1280,16 @@
1275
1280
  "description": "Primary label text displayed in the badge.",
1276
1281
  "attribute": "label"
1277
1282
  },
1283
+ {
1284
+ "kind": "field",
1285
+ "name": "srText",
1286
+ "type": {
1287
+ "text": "string"
1288
+ },
1289
+ "default": "\"\"",
1290
+ "description": "Screen reader text appended after the label for additional context.",
1291
+ "attribute": "srText"
1292
+ },
1278
1293
  {
1279
1294
  "kind": "field",
1280
1295
  "name": "variant",
@@ -1413,6 +1428,16 @@
1413
1428
  "fieldName": "label",
1414
1429
  "propName": "label"
1415
1430
  },
1431
+ {
1432
+ "name": "srText",
1433
+ "type": {
1434
+ "text": "string"
1435
+ },
1436
+ "default": "\"\"",
1437
+ "description": "Screen reader text appended after the label for additional context.",
1438
+ "fieldName": "srText",
1439
+ "propName": "srtext"
1440
+ },
1416
1441
  {
1417
1442
  "name": "variant",
1418
1443
  "type": {
@@ -2712,17 +2737,6 @@
2712
2737
  "attribute": "tile",
2713
2738
  "reflects": true
2714
2739
  },
2715
- {
2716
- "kind": "field",
2717
- "name": "inverted",
2718
- "type": {
2719
- "text": "boolean"
2720
- },
2721
- "default": "false",
2722
- "description": "Adjusts colors for dark backgrounds.",
2723
- "attribute": "inverted",
2724
- "reflects": true
2725
- },
2726
2740
  {
2727
2741
  "kind": "field",
2728
2742
  "name": "tooltip",
@@ -3127,16 +3141,6 @@
3127
3141
  "fieldName": "tile",
3128
3142
  "propName": "tile"
3129
3143
  },
3130
- {
3131
- "name": "inverted",
3132
- "type": {
3133
- "text": "boolean"
3134
- },
3135
- "default": "false",
3136
- "description": "Adjusts colors for dark backgrounds.",
3137
- "fieldName": "inverted",
3138
- "propName": "inverted"
3139
- },
3140
3144
  {
3141
3145
  "name": "tooltip",
3142
3146
  "type": {
@@ -3222,7 +3226,7 @@
3222
3226
  "declarations": [
3223
3227
  {
3224
3228
  "kind": "class",
3225
- "description": "A container for grouping multiple `nys-checkbox` components as a single form control.\nHandles validation, required constraints, and submits comma-separated values.\n\nUse to allow users to select multiple options from a list. Apply `tile`, `size`, and `inverted` to the group\nand all children inherit these styles automatically.",
3229
+ "description": "A container for grouping multiple `nys-checkbox` components as a single form control.\nHandles validation, required constraints, and submits comma-separated values.\n\nUse to allow users to select multiple options from a list. Apply `tile` and `size` to the group\nand all children inherit these styles automatically.",
3226
3230
  "name": "NysCheckboxgroup",
3227
3231
  "slots": [
3228
3232
  {
@@ -3350,17 +3354,6 @@
3350
3354
  "description": "Tooltip text shown on hover/focus of info icon.",
3351
3355
  "attribute": "tooltip"
3352
3356
  },
3353
- {
3354
- "kind": "field",
3355
- "name": "inverted",
3356
- "type": {
3357
- "text": "boolean"
3358
- },
3359
- "default": "false",
3360
- "description": "Adjusts colors for dark backgrounds. Applied to all children.",
3361
- "attribute": "inverted",
3362
- "reflects": true
3363
- },
3364
3357
  {
3365
3358
  "kind": "field",
3366
3359
  "name": "form",
@@ -3464,11 +3457,6 @@
3464
3457
  "name": "_updateCheckboxTile",
3465
3458
  "privacy": "private"
3466
3459
  },
3467
- {
3468
- "kind": "method",
3469
- "name": "_updateCheckboxInvert",
3470
- "privacy": "private"
3471
- },
3472
3460
  {
3473
3461
  "kind": "method",
3474
3462
  "name": "_updateCheckboxShowError",
@@ -3662,16 +3650,6 @@
3662
3650
  "fieldName": "tooltip",
3663
3651
  "propName": "tooltip"
3664
3652
  },
3665
- {
3666
- "name": "inverted",
3667
- "type": {
3668
- "text": "boolean"
3669
- },
3670
- "default": "false",
3671
- "description": "Adjusts colors for dark backgrounds. Applied to all children.",
3672
- "fieldName": "inverted",
3673
- "propName": "inverted"
3674
- },
3675
3653
  {
3676
3654
  "name": "form",
3677
3655
  "type": {
@@ -8392,17 +8370,6 @@
8392
8370
  "description": "Value submitted when this radio is selected.",
8393
8371
  "attribute": "value"
8394
8372
  },
8395
- {
8396
- "kind": "field",
8397
- "name": "inverted",
8398
- "type": {
8399
- "text": "boolean"
8400
- },
8401
- "default": "false",
8402
- "description": "Adjusts colors for dark backgrounds.",
8403
- "attribute": "inverted",
8404
- "reflects": true
8405
- },
8406
8373
  {
8407
8374
  "kind": "field",
8408
8375
  "name": "form",
@@ -8700,16 +8667,6 @@
8700
8667
  "fieldName": "value",
8701
8668
  "propName": "value"
8702
8669
  },
8703
- {
8704
- "name": "inverted",
8705
- "type": {
8706
- "text": "boolean"
8707
- },
8708
- "default": "false",
8709
- "description": "Adjusts colors for dark backgrounds.",
8710
- "fieldName": "inverted",
8711
- "propName": "inverted"
8712
- },
8713
8670
  {
8714
8671
  "name": "form",
8715
8672
  "type": {
@@ -8800,7 +8757,7 @@
8800
8757
  "declarations": [
8801
8758
  {
8802
8759
  "kind": "class",
8803
- "description": "A container for grouping `nys-radiobutton` elements as a single form control with enforced single selection.\nHandles keyboard navigation (arrow keys), validation, required constraints, and form integration.\n\nUse to let users select exactly one option from 2-6 choices. Apply `tile`, `size`, and `inverted` to the group\nand all children inherit these styles automatically. For 7+ options, use `nys-select`.",
8760
+ "description": "A container for grouping `nys-radiobutton` elements as a single form control with enforced single selection.\nHandles keyboard navigation (arrow keys), validation, required constraints, and form integration.\n\nUse to let users select exactly one option from 2-6 choices. Apply `tile` and `size` to the group\nand all children inherit these styles automatically. For 7+ options, use `nys-select`.",
8804
8761
  "name": "NysRadiogroup",
8805
8762
  "slots": [
8806
8763
  {
@@ -8928,17 +8885,6 @@
8928
8885
  "description": "Tooltip text shown on hover/focus of info icon.",
8929
8886
  "attribute": "tooltip"
8930
8887
  },
8931
- {
8932
- "kind": "field",
8933
- "name": "inverted",
8934
- "type": {
8935
- "text": "boolean"
8936
- },
8937
- "default": "false",
8938
- "description": "Adjusts colors for dark backgrounds. Applied to all children.",
8939
- "attribute": "inverted",
8940
- "reflects": true
8941
- },
8942
8888
  {
8943
8889
  "kind": "field",
8944
8890
  "name": "form",
@@ -9066,11 +9012,6 @@
9066
9012
  "name": "_updateRadioButtonsTile",
9067
9013
  "privacy": "private"
9068
9014
  },
9069
- {
9070
- "kind": "method",
9071
- "name": "_updateRadioButtonsInvert",
9072
- "privacy": "private"
9073
- },
9074
9015
  {
9075
9016
  "kind": "method",
9076
9017
  "name": "_updateRadioButtonsShowError",
@@ -9246,16 +9187,6 @@
9246
9187
  "fieldName": "tooltip",
9247
9188
  "propName": "tooltip"
9248
9189
  },
9249
- {
9250
- "name": "inverted",
9251
- "type": {
9252
- "text": "boolean"
9253
- },
9254
- "default": "false",
9255
- "description": "Adjusts colors for dark backgrounds. Applied to all children.",
9256
- "fieldName": "inverted",
9257
- "propName": "inverted"
9258
- },
9259
9190
  {
9260
9191
  "name": "form",
9261
9192
  "type": {
@@ -10580,7 +10511,7 @@
10580
10511
  },
10581
10512
  {
10582
10513
  "kind": "javascript-module",
10583
- "path": "packages/nys-table/src/index.ts",
10514
+ "path": "packages/nys-tab/src/index.ts",
10584
10515
  "declarations": [],
10585
10516
  "exports": [
10586
10517
  {
@@ -10588,22 +10519,38 @@
10588
10519
  "name": "*",
10589
10520
  "declaration": {
10590
10521
  "name": "*",
10591
- "module": "packages/nys-table/src/nys-table"
10522
+ "module": "packages/nys-tab/src/nys-tab"
10523
+ }
10524
+ },
10525
+ {
10526
+ "kind": "js",
10527
+ "name": "*",
10528
+ "declaration": {
10529
+ "name": "*",
10530
+ "module": "packages/nys-tab/src/nys-tabgroup"
10531
+ }
10532
+ },
10533
+ {
10534
+ "kind": "js",
10535
+ "name": "*",
10536
+ "declaration": {
10537
+ "name": "*",
10538
+ "module": "packages/nys-tab/src/nys-tabpanel"
10592
10539
  }
10593
10540
  }
10594
10541
  ]
10595
10542
  },
10596
10543
  {
10597
10544
  "kind": "javascript-module",
10598
- "path": "packages/nys-table/src/nys-table.ts",
10545
+ "path": "packages/nys-tab/src/nys-tab.ts",
10599
10546
  "declarations": [
10600
10547
  {
10601
10548
  "kind": "class",
10602
- "description": "`<nys-table>` is a responsive table component that can display native HTML tables,\nsupports striped and bordered styling, sortable columns, and CSV download.",
10603
- "name": "NysTable",
10549
+ "description": "`<nys-tab>` is a single tab within a `<nys-tabgroup>`.\n\nThe host element carries `role=\"tab\"`, `tabindex`, `aria-selected`,\n`aria-controls`, and `aria-disabled` so assistive technologies see the\ncorrect ARIA tab semantics on the element that is actually focused.\n`<nys-tabgroup>` manages `tabindex`, `aria-selected`, and `aria-controls`\nvia `_applySelection`; do not set them directly on this element.",
10550
+ "name": "NysTab",
10604
10551
  "slots": [
10605
10552
  {
10606
- "description": "Accepts a `<table>` element. Only the first table is rendered.",
10553
+ "description": "No slots; content is derived from the `label` property.",
10607
10554
  "name": ""
10608
10555
  }
10609
10556
  ],
@@ -10615,148 +10562,736 @@
10615
10562
  "text": "string"
10616
10563
  },
10617
10564
  "default": "\"\"",
10565
+ "description": "Unique identifier for the tab element.\nReflected to the DOM attribute so `aria-controls` references resolve.",
10618
10566
  "attribute": "id",
10619
10567
  "reflects": true
10620
10568
  },
10621
10569
  {
10622
10570
  "kind": "field",
10623
- "name": "name",
10571
+ "name": "label",
10624
10572
  "type": {
10625
10573
  "text": "string"
10626
10574
  },
10627
10575
  "default": "\"\"",
10628
- "attribute": "name",
10629
- "reflects": true
10576
+ "description": "Visible text label rendered inside the inner `<span>`.",
10577
+ "attribute": "label"
10630
10578
  },
10631
10579
  {
10632
10580
  "kind": "field",
10633
- "name": "striped",
10581
+ "name": "selected",
10634
10582
  "type": {
10635
10583
  "text": "boolean"
10636
10584
  },
10637
10585
  "default": "false",
10638
- "attribute": "striped",
10586
+ "description": "Whether this tab is the currently active tab.\nManaged by `<nys-tabgroup>`; reflected for CSS attribute selectors.",
10587
+ "attribute": "selected",
10639
10588
  "reflects": true
10640
10589
  },
10641
10590
  {
10642
10591
  "kind": "field",
10643
- "name": "sortable",
10592
+ "name": "disabled",
10644
10593
  "type": {
10645
10594
  "text": "boolean"
10646
10595
  },
10647
10596
  "default": "false",
10648
- "attribute": "sortable",
10597
+ "description": "Whether this tab is disabled.\nReflected to the DOM attribute for CSS styling.",
10598
+ "attribute": "disabled",
10649
10599
  "reflects": true
10650
10600
  },
10651
10601
  {
10652
- "kind": "field",
10653
- "name": "bordered",
10654
- "type": {
10655
- "text": "boolean"
10602
+ "kind": "method",
10603
+ "name": "focus",
10604
+ "privacy": "public",
10605
+ "return": {
10606
+ "type": {
10607
+ "text": "void"
10608
+ }
10656
10609
  },
10657
- "default": "false",
10658
- "attribute": "bordered",
10659
- "reflects": true
10610
+ "parameters": [
10611
+ {
10612
+ "name": "options",
10613
+ "optional": true,
10614
+ "type": {
10615
+ "text": "FocusOptions"
10616
+ }
10617
+ }
10618
+ ],
10619
+ "description": "Focuses the host element. The host carries `role=\"tab\"` and `tabindex`,\nso it is the correct element for AT to land on."
10660
10620
  },
10661
10621
  {
10662
10622
  "kind": "field",
10663
- "name": "download",
10664
- "type": {
10665
- "text": "string"
10666
- },
10667
- "default": "\"\"",
10668
- "attribute": "download",
10669
- "reflects": true
10623
+ "name": "_onKeydown",
10624
+ "privacy": "private",
10625
+ "description": "Enter / Space on the focused host activate the tab.\nArrow-key navigation is handled one level up by `<nys-tabgroup>`."
10670
10626
  },
10671
10627
  {
10672
10628
  "kind": "field",
10673
- "name": "_sortColumn",
10674
- "type": {
10675
- "text": "number | null"
10676
- },
10629
+ "name": "_onFocus",
10677
10630
  "privacy": "private",
10678
- "default": "null"
10631
+ "description": "Host focus → dispatch `nys-tab-focus` for external observers."
10679
10632
  },
10680
10633
  {
10681
10634
  "kind": "field",
10682
- "name": "_sortDirection",
10683
- "type": {
10684
- "text": "\"asc\" | \"desc\" | \"none\""
10685
- },
10635
+ "name": "_onBlur",
10686
10636
  "privacy": "private",
10687
- "default": "\"none\""
10637
+ "description": "Host blur → dispatch `nys-tab-blur` for external observers."
10688
10638
  },
10689
10639
  {
10690
10640
  "kind": "field",
10691
- "name": "_captionText",
10692
- "type": {
10693
- "text": "string"
10694
- },
10641
+ "name": "_onClick",
10695
10642
  "privacy": "private",
10696
- "default": "\"\""
10697
- },
10698
- {
10699
- "kind": "method",
10700
- "name": "_handleSlotChange"
10643
+ "description": "Host-level click handler. Activates the tab regardless of whether the\nclick landed on the inner element (normal pointer/keyboard tap, which\nbubbles up) or directly on the host (iOS VoiceOver double-tap dispatches\n`click` on the element with `role=\"tab\"`, bypassing shadow-DOM children)."
10701
10644
  },
10702
10645
  {
10703
10646
  "kind": "method",
10704
- "name": "_normalizeTableDOM",
10705
- "parameters": [
10706
- {
10707
- "name": "table",
10708
- "type": {
10709
- "text": "HTMLTableElement"
10710
- }
10647
+ "name": "_handleClick",
10648
+ "privacy": "private",
10649
+ "return": {
10650
+ "type": {
10651
+ "text": "void"
10711
10652
  }
10712
- ]
10713
- },
10653
+ },
10654
+ "description": "Focuses the host then dispatches `nys-tab-select`. Called from both the\nclick handler and the keydown handler."
10655
+ }
10656
+ ],
10657
+ "events": [
10714
10658
  {
10715
- "kind": "method",
10716
- "name": "_addSortIcons",
10717
- "parameters": [
10718
- {
10719
- "name": "table",
10720
- "type": {
10721
- "text": "HTMLTableElement"
10722
- }
10723
- }
10724
- ]
10659
+ "name": "nys-tab-select",
10660
+ "type": {
10661
+ "text": "CustomEvent"
10662
+ },
10663
+ "description": "Dispatched when the tab is activated via click or Enter / Space. Bubbles and crosses shadow DOM boundaries. `detail: { id: string, label: string }`"
10725
10664
  },
10726
10665
  {
10727
- "kind": "method",
10728
- "name": "_updateSortIcons",
10729
- "parameters": [
10730
- {
10731
- "name": "table",
10732
- "type": {
10733
- "text": "HTMLTableElement"
10734
- }
10735
- }
10736
- ]
10666
+ "description": "Dispatched when the host receives focus. Bubbles and crosses shadow DOM boundaries. `detail: { id: string }`",
10667
+ "name": "nys-tab-focus"
10737
10668
  },
10738
10669
  {
10739
- "kind": "method",
10740
- "name": "_onSortClick",
10741
- "privacy": "private",
10742
- "parameters": [
10743
- {
10744
- "name": "columnIndex",
10745
- "type": {
10746
- "text": "number"
10747
- }
10748
- },
10749
- {
10750
- "name": "table",
10751
- "type": {
10752
- "text": "HTMLTableElement"
10753
- }
10754
- }
10755
- ]
10670
+ "description": "Dispatched when the host loses focus. Bubbles and crosses shadow DOM boundaries. `detail: { id: string }`",
10671
+ "name": "nys-tab-blur"
10672
+ }
10673
+ ],
10674
+ "attributes": [
10675
+ {
10676
+ "name": "id",
10677
+ "type": {
10678
+ "text": "string"
10679
+ },
10680
+ "default": "\"\"",
10681
+ "description": "Unique identifier for the tab element.\nReflected to the DOM attribute so `aria-controls` references resolve.",
10682
+ "fieldName": "id",
10683
+ "attribute": "id",
10684
+ "propName": "id"
10756
10685
  },
10757
10686
  {
10758
- "kind": "method",
10687
+ "name": "label",
10688
+ "type": {
10689
+ "text": "string"
10690
+ },
10691
+ "default": "\"\"",
10692
+ "description": "Visible text label rendered inside the inner `<span>`.",
10693
+ "fieldName": "label",
10694
+ "attribute": "label",
10695
+ "propName": "label"
10696
+ },
10697
+ {
10698
+ "name": "selected",
10699
+ "type": {
10700
+ "text": "boolean"
10701
+ },
10702
+ "default": "false",
10703
+ "description": "Whether this tab is the currently active tab.\nManaged by `<nys-tabgroup>`; reflected for CSS attribute selectors.",
10704
+ "fieldName": "selected",
10705
+ "attribute": "selected",
10706
+ "propName": "selected"
10707
+ },
10708
+ {
10709
+ "name": "disabled",
10710
+ "type": {
10711
+ "text": "boolean"
10712
+ },
10713
+ "default": "false",
10714
+ "description": "Whether this tab is disabled.\nReflected to the DOM attribute for CSS styling.",
10715
+ "fieldName": "disabled",
10716
+ "attribute": "disabled",
10717
+ "propName": "disabled"
10718
+ }
10719
+ ],
10720
+ "superclass": {
10721
+ "name": "LitElement",
10722
+ "package": "lit"
10723
+ },
10724
+ "tagName": "nys-tab",
10725
+ "customElement": true,
10726
+ "examples": [
10727
+ {
10728
+ "title": "`<nys-tab>` and `<nys-tabpanel>` should always be wrapped by `<nys-tabgroup>`",
10729
+ "code": "<!-- Always place <nys-tab> elements inside a <nys-tabgroup>. -->\n<nys-tabgroup name=\"My Tabs\">\n<nys-tab label=\"Overview\"></nys-tab>\n<nys-tab label=\"Details\" selected></nys-tab>\n<nys-tab label=\"Archived\" disabled></nys-tab>\n<nys-tabpanel><p>Overview content</p></nys-tabpanel>\n<nys-tabpanel><p>Details content (shown by default)</p></nys-tabpanel>\n<nys-tabpanel><p>Archived content</p></nys-tabpanel>\n</nys-tabgroup>",
10730
+ "lang": "html"
10731
+ }
10732
+ ]
10733
+ }
10734
+ ],
10735
+ "exports": [
10736
+ {
10737
+ "kind": "custom-element-definition",
10738
+ "name": "nys-tab",
10739
+ "declaration": {
10740
+ "name": "NysTab",
10741
+ "module": "packages/nys-tab/src/nys-tab.ts"
10742
+ }
10743
+ },
10744
+ {
10745
+ "kind": "js",
10746
+ "name": "NysTab",
10747
+ "declaration": {
10748
+ "name": "NysTab",
10749
+ "module": "packages/nys-tab/src/nys-tab.ts"
10750
+ }
10751
+ }
10752
+ ]
10753
+ },
10754
+ {
10755
+ "kind": "javascript-module",
10756
+ "path": "packages/nys-tab/src/nys-tabgroup.ts",
10757
+ "declarations": [
10758
+ {
10759
+ "kind": "class",
10760
+ "description": "`<nys-tabgroup>` is the container for `<nys-tab>` and `<nys-tabpanel>`\nelements.\n\nAccepts tabs and panels as flat light-DOM children in any order (interleaved\nor grouped). On slot change, children are sorted into dedicated shadow-DOM\ncontainers, ARIA relationships are wired, and the first selected (or first)\ntab is activated.\n\nScroll shadows are rendered on either side of the tab list and toggled via\n`ResizeObserver` and a `scroll` listener so they accurately reflect whether\noverflow content exists in each direction.\n\nKeyboard navigation follows the\nhttps://www.w3.org/WAI/ARIA/apg/patterns/tabs/ ARIA Tabs Pattern:\n- Arrow keys move focus without changing selection.\n- Enter / Space confirm selection on the focused tab.",
10761
+ "name": "NysTabgroup",
10762
+ "slots": [
10763
+ {
10764
+ "description": "Accepts `<nys-tab>` and `<nys-tabpanel>` children. Elements are moved into internal shadow-DOM containers on `slotchange`; the slot itself is not rendered visibly.",
10765
+ "name": ""
10766
+ }
10767
+ ],
10768
+ "members": [
10769
+ {
10770
+ "kind": "field",
10771
+ "name": "id",
10772
+ "type": {
10773
+ "text": "string"
10774
+ },
10775
+ "default": "\"\"",
10776
+ "description": "Unique identifier for the tabgroup element.\nIf not provided, one is auto-generated in `connectedCallback`.\nReflected to the DOM attribute.",
10777
+ "attribute": "id",
10778
+ "reflects": true
10779
+ },
10780
+ {
10781
+ "kind": "field",
10782
+ "name": "name",
10783
+ "type": {
10784
+ "text": "string"
10785
+ },
10786
+ "default": "\"\"",
10787
+ "description": "The name of the tab group.\nUsed for form submission and accessibility purposes.",
10788
+ "attribute": "name"
10789
+ },
10790
+ {
10791
+ "kind": "field",
10792
+ "name": "_tabsEl",
10793
+ "type": {
10794
+ "text": "HTMLElement"
10795
+ },
10796
+ "privacy": "private",
10797
+ "description": "Cached in `firstUpdated` and used by `_updateScrollShadows` to read\nscroll position and dimensions."
10798
+ },
10799
+ {
10800
+ "kind": "field",
10801
+ "name": "_shadowLeft",
10802
+ "type": {
10803
+ "text": "HTMLElement"
10804
+ },
10805
+ "privacy": "private",
10806
+ "description": "Reference to the left scroll-shadow overlay element.\nReceives the `is-visible` class when the tab list is scrolled away from\nits leftmost position."
10807
+ },
10808
+ {
10809
+ "kind": "field",
10810
+ "name": "_shadowRight",
10811
+ "type": {
10812
+ "text": "HTMLElement"
10813
+ },
10814
+ "privacy": "private",
10815
+ "description": "Reference to the right scroll-shadow overlay element.\nReceives the `is-visible` class when overflow content exists to the right\nof the current scroll position."
10816
+ },
10817
+ {
10818
+ "kind": "field",
10819
+ "name": "_resizeObserver",
10820
+ "type": {
10821
+ "text": "ResizeObserver | undefined"
10822
+ },
10823
+ "privacy": "private",
10824
+ "description": "`ResizeObserver` instance watching `_tabsEl` for size changes.\nRe-evaluates scroll shadow visibility whenever the tab list is resized\n(e.g. viewport resize, dynamic tab additions).\nStored so it can be disconnected if needed."
10825
+ },
10826
+ {
10827
+ "kind": "field",
10828
+ "name": "_updateScrollShadows",
10829
+ "privacy": "private",
10830
+ "description": "Reads the current scroll state of `_tabsEl` and toggles the `is-visible`\nclass on the left and right shadow overlays accordingly.\n\n- Left shadow is visible when `scrollLeft > 0`.\n- Right shadow is visible when `scrollLeft + clientWidth < scrollWidth`\n (i.e. content exists beyond the right edge).\n\nDefined as an arrow function so it can be passed directly as an event\nlistener without losing `this` context.",
10831
+ "return": {
10832
+ "type": {
10833
+ "text": ""
10834
+ }
10835
+ }
10836
+ },
10837
+ {
10838
+ "kind": "method",
10839
+ "name": "_getTabs",
10840
+ "privacy": "private",
10841
+ "return": {
10842
+ "type": {
10843
+ "text": ""
10844
+ }
10845
+ },
10846
+ "description": "Returns all `<nys-tab>` elements currently residing in the shadow-DOM\ntabs container, in DOM order."
10847
+ },
10848
+ {
10849
+ "kind": "method",
10850
+ "name": "_getPanels",
10851
+ "privacy": "private",
10852
+ "return": {
10853
+ "type": {
10854
+ "text": ""
10855
+ }
10856
+ },
10857
+ "description": "Returns all `<nys-tabpanel>` elements currently residing in the\nshadow-DOM panels container, in DOM order."
10858
+ },
10859
+ {
10860
+ "kind": "method",
10861
+ "name": "_applySelection",
10862
+ "privacy": "private",
10863
+ "return": {
10864
+ "type": {
10865
+ "text": ""
10866
+ }
10867
+ },
10868
+ "parameters": [
10869
+ {
10870
+ "name": "tabs",
10871
+ "type": {
10872
+ "text": "HTMLElement[]"
10873
+ },
10874
+ "description": "Ordered array of `<nys-tab>` elements to update."
10875
+ },
10876
+ {
10877
+ "name": "panels",
10878
+ "type": {
10879
+ "text": "HTMLElement[]"
10880
+ },
10881
+ "description": "Ordered array of `<nys-tabpanel>` elements to update.\nMust be the same length as `tabs` for correct pairing."
10882
+ },
10883
+ {
10884
+ "name": "selectedIndex",
10885
+ "type": {
10886
+ "text": "number"
10887
+ },
10888
+ "description": "Zero-based index of the tab/panel pair to activate."
10889
+ }
10890
+ ],
10891
+ "description": "Single source of truth for ARIA wiring, `tabindex`, and panel visibility.\n\nFor each index `i`:\n- Sets `selected` / removes `selected` attribute on `tabs[i]`.\n- Sets `aria-controls` on `tabs[i]` to the `id` of `panels[i]`.\n- Sets `aria-labelledby` on `panels[i]` to the `id` of `tabs[i]`.\n- Removes `hidden` from `panels[selectedIndex]`; adds it to all others.\n\nMust be called any time the selected tab changes (initial render and\nsubsequent user interactions)."
10892
+ },
10893
+ {
10894
+ "kind": "method",
10895
+ "name": "_sortChildren",
10896
+ "privacy": "private",
10897
+ "return": {
10898
+ "type": {
10899
+ "text": ""
10900
+ }
10901
+ },
10902
+ "parameters": [
10903
+ {
10904
+ "name": "e",
10905
+ "type": {
10906
+ "text": "Event"
10907
+ },
10908
+ "description": "The `Event` fired by the `<slot>` element on slot change."
10909
+ }
10910
+ ],
10911
+ "description": "Handles `slotchange` on the default slot.\n\nIterates over all assigned elements and moves each `<nys-tab>` into\n`.nys-tabgroup__tabs` and each `<nys-tabpanel>` into\n`.nys-tabgroup__panels`, preserving relative order. After sorting,\ncalls `_applySelection` using the first element that already has a\n`selected` attribute, or index `0` if none is found."
10912
+ },
10913
+ {
10914
+ "kind": "method",
10915
+ "name": "_handleTabSelect",
10916
+ "privacy": "private",
10917
+ "return": {
10918
+ "type": {
10919
+ "text": ""
10920
+ }
10921
+ },
10922
+ "parameters": [
10923
+ {
10924
+ "name": "e",
10925
+ "type": {
10926
+ "text": "Event"
10927
+ },
10928
+ "description": "The `Event` (cast to `CustomEvent`) dispatched by `<nys-tab>`."
10929
+ }
10930
+ ],
10931
+ "description": "Handles the `nys-tab-select` custom event bubbled up from a child\n`<nys-tab>`.\n\nResolves the originating `<nys-tab>` via `composedPath()` (required\nbecause the event crosses shadow DOM boundaries), determines its index\namong the current tab list, and delegates to `_applySelection`."
10932
+ },
10933
+ {
10934
+ "kind": "method",
10935
+ "name": "_handleKeydown",
10936
+ "privacy": "private",
10937
+ "return": {
10938
+ "type": {
10939
+ "text": ""
10940
+ }
10941
+ },
10942
+ "parameters": [
10943
+ {
10944
+ "name": "e",
10945
+ "type": {
10946
+ "text": "KeyboardEvent"
10947
+ },
10948
+ "description": "The `KeyboardEvent` from the tablist `keydown` listener."
10949
+ }
10950
+ ],
10951
+ "description": "Implements the ARIA radio-button keyboard pattern:\n- `ArrowRight` — moves focus to the next enabled tab (wraps).\n- `ArrowLeft` — moves focus to the previous enabled tab (wraps).\n\nFocus is moved without changing selection; Enter / Space on the newly\nfocused tab (handled by `<nys-tab>._handleKeydown`) confirm selection.\n\nThe currently focused tab is resolved via `composedPath()` because focus\nmay sit on a shadow-DOM descendant of `<nys-tab>` rather than the host\nitself.\n\nDisabled tabs are excluded from navigation and will never receive focus\nvia arrow keys."
10952
+ },
10953
+ {
10954
+ "kind": "field",
10955
+ "name": "_handleWheel",
10956
+ "privacy": "private"
10957
+ }
10958
+ ],
10959
+ "attributes": [
10960
+ {
10961
+ "name": "id",
10962
+ "type": {
10963
+ "text": "string"
10964
+ },
10965
+ "default": "\"\"",
10966
+ "description": "Unique identifier for the tabgroup element.\nIf not provided, one is auto-generated in `connectedCallback`.\nReflected to the DOM attribute.",
10967
+ "fieldName": "id",
10968
+ "attribute": "id",
10969
+ "propName": "id"
10970
+ },
10971
+ {
10972
+ "name": "name",
10973
+ "type": {
10974
+ "text": "string"
10975
+ },
10976
+ "default": "\"\"",
10977
+ "description": "The name of the tab group.\nUsed for form submission and accessibility purposes.",
10978
+ "fieldName": "name",
10979
+ "attribute": "name",
10980
+ "propName": "name"
10981
+ }
10982
+ ],
10983
+ "superclass": {
10984
+ "name": "LitElement",
10985
+ "package": "lit"
10986
+ },
10987
+ "tagName": "nys-tabgroup",
10988
+ "customElement": true,
10989
+ "examples": [
10990
+ {
10991
+ "title": "Disable a tab using the `disabled` attribute on `<nys-tab>`.",
10992
+ "code": "<nys-tabgroup name=\"Account Settings\">\n<nys-tab label=\"Profile\"></nys-tab>\n<nys-tab label=\"Security\"></nys-tab>\n<nys-tab label=\"Notifications\" disabled></nys-tab>\n<nys-tabpanel><p>Manage your profile information.</p></nys-tabpanel>\n<nys-tabpanel><p>Update your password and 2FA settings.</p></nys-tabpanel>\n<nys-tabpanel><p>Notification preferences (coming soon).</p></nys-tabpanel>\n</nys-tabgroup>",
10993
+ "lang": "html"
10994
+ },
10995
+ {
10996
+ "title": "Pre-select a tab using the `selected` attribute on `<nys-tab>`.",
10997
+ "code": "<nys-tabgroup name=\"Reports\">\n<nys-tab label=\"Summary\"></nys-tab>\n<nys-tab label=\"Details\" selected></nys-tab>\n<nys-tabpanel><p>Summary view</p></nys-tabpanel>\n<nys-tabpanel><p>Detailed view (shown by default)</p></nys-tabpanel>\n</nys-tabgroup>",
10998
+ "lang": "html"
10999
+ }
11000
+ ]
11001
+ }
11002
+ ],
11003
+ "exports": [
11004
+ {
11005
+ "kind": "custom-element-definition",
11006
+ "name": "nys-tabgroup",
11007
+ "declaration": {
11008
+ "name": "NysTabgroup",
11009
+ "module": "packages/nys-tab/src/nys-tabgroup.ts"
11010
+ }
11011
+ },
11012
+ {
11013
+ "kind": "js",
11014
+ "name": "NysTabgroup",
11015
+ "declaration": {
11016
+ "name": "NysTabgroup",
11017
+ "module": "packages/nys-tab/src/nys-tabgroup.ts"
11018
+ }
11019
+ }
11020
+ ]
11021
+ },
11022
+ {
11023
+ "kind": "javascript-module",
11024
+ "path": "packages/nys-tab/src/nys-tabpanel.ts",
11025
+ "declarations": [
11026
+ {
11027
+ "kind": "class",
11028
+ "description": "`<nys-tabpanel>` is a content panel paired with a `<nys-tab>` inside a\n`<nys-tabgroup>`.\n\nPairing is determined by render order: the Nth `<nys-tabpanel>` child of a\n`<nys-tabgroup>` corresponds to the Nth `<nys-tab>` child.\n`aria-labelledby` and the `hidden` attribute are managed externally by\n`<nys-tabgroup>` via `_applySelection`; do not set them directly.",
11029
+ "name": "NysTabpanel",
11030
+ "slots": [
11031
+ {
11032
+ "description": "Default slot for panel content. Rendered inside a wrapper `<div>` with the `.nys-tabpanel` class for styling.",
11033
+ "name": ""
11034
+ }
11035
+ ],
11036
+ "members": [
11037
+ {
11038
+ "kind": "field",
11039
+ "name": "id",
11040
+ "type": {
11041
+ "text": "string"
11042
+ },
11043
+ "default": "\"\"",
11044
+ "description": "Unique identifier for the panel element.\nIf not provided, one is auto-generated in `connectedCallback`.\nReflected to the DOM attribute so `aria-controls` references on sibling\n`<nys-tab>` elements resolve correctly.",
11045
+ "attribute": "id",
11046
+ "reflects": true
11047
+ }
11048
+ ],
11049
+ "attributes": [
11050
+ {
11051
+ "name": "id",
11052
+ "type": {
11053
+ "text": "string"
11054
+ },
11055
+ "default": "\"\"",
11056
+ "description": "Unique identifier for the panel element.\nIf not provided, one is auto-generated in `connectedCallback`.\nReflected to the DOM attribute so `aria-controls` references on sibling\n`<nys-tab>` elements resolve correctly.",
11057
+ "fieldName": "id",
11058
+ "attribute": "id",
11059
+ "propName": "id"
11060
+ }
11061
+ ],
11062
+ "superclass": {
11063
+ "name": "LitElement",
11064
+ "package": "lit"
11065
+ },
11066
+ "tagName": "nys-tabpanel",
11067
+ "customElement": true,
11068
+ "examples": [
11069
+ {
11070
+ "title": "Panel content is wrapped by `<nys-tabpanel>`.",
11071
+ "code": "<!-- Panels are paired by position with <nys-tab> elements in the same <nys-tabgroup>. -->\n<nys-tabgroup name=\"Steps\">\n<nys-tab label=\"Step 1\"></nys-tab>\n<nys-tab label=\"Step 2\"></nys-tab>\n<nys-tabpanel>\n<h2>Step 1: Enter your information</h2>\n<p>Fill out the form below.</p>\n</nys-tabpanel>\n<nys-tabpanel>\n<h2>Step 2: Review and submit</h2>\n<p>Confirm your details before submitting.</p>\n</nys-tabpanel>\n</nys-tabgroup>",
11072
+ "lang": "html"
11073
+ }
11074
+ ]
11075
+ }
11076
+ ],
11077
+ "exports": [
11078
+ {
11079
+ "kind": "custom-element-definition",
11080
+ "name": "nys-tabpanel",
11081
+ "declaration": {
11082
+ "name": "NysTabpanel",
11083
+ "module": "packages/nys-tab/src/nys-tabpanel.ts"
11084
+ }
11085
+ },
11086
+ {
11087
+ "kind": "js",
11088
+ "name": "NysTabpanel",
11089
+ "declaration": {
11090
+ "name": "NysTabpanel",
11091
+ "module": "packages/nys-tab/src/nys-tabpanel.ts"
11092
+ }
11093
+ }
11094
+ ]
11095
+ },
11096
+ {
11097
+ "kind": "javascript-module",
11098
+ "path": "packages/nys-table/src/index.ts",
11099
+ "declarations": [],
11100
+ "exports": [
11101
+ {
11102
+ "kind": "js",
11103
+ "name": "*",
11104
+ "declaration": {
11105
+ "name": "*",
11106
+ "module": "packages/nys-table/src/nys-table"
11107
+ }
11108
+ }
11109
+ ]
11110
+ },
11111
+ {
11112
+ "kind": "javascript-module",
11113
+ "path": "packages/nys-table/src/nys-table.ts",
11114
+ "declarations": [
11115
+ {
11116
+ "kind": "class",
11117
+ "description": "`<nys-table>` is a responsive table component that can display native HTML tables,\nsupports striped and bordered styling, sortable columns, and CSV download.",
11118
+ "name": "NysTable",
11119
+ "slots": [
11120
+ {
11121
+ "description": "Accepts a `<table>` element. Only the first table is rendered.",
11122
+ "name": ""
11123
+ }
11124
+ ],
11125
+ "members": [
11126
+ {
11127
+ "kind": "field",
11128
+ "name": "id",
11129
+ "type": {
11130
+ "text": "string"
11131
+ },
11132
+ "default": "\"\"",
11133
+ "attribute": "id",
11134
+ "reflects": true
11135
+ },
11136
+ {
11137
+ "kind": "field",
11138
+ "name": "name",
11139
+ "type": {
11140
+ "text": "string"
11141
+ },
11142
+ "default": "\"\"",
11143
+ "attribute": "name",
11144
+ "reflects": true
11145
+ },
11146
+ {
11147
+ "kind": "field",
11148
+ "name": "striped",
11149
+ "type": {
11150
+ "text": "boolean"
11151
+ },
11152
+ "default": "false",
11153
+ "attribute": "striped",
11154
+ "reflects": true
11155
+ },
11156
+ {
11157
+ "kind": "field",
11158
+ "name": "sortable",
11159
+ "type": {
11160
+ "text": "boolean"
11161
+ },
11162
+ "default": "false",
11163
+ "attribute": "sortable",
11164
+ "reflects": true
11165
+ },
11166
+ {
11167
+ "kind": "field",
11168
+ "name": "bordered",
11169
+ "type": {
11170
+ "text": "boolean"
11171
+ },
11172
+ "default": "false",
11173
+ "attribute": "bordered",
11174
+ "reflects": true
11175
+ },
11176
+ {
11177
+ "kind": "field",
11178
+ "name": "download",
11179
+ "type": {
11180
+ "text": "string"
11181
+ },
11182
+ "default": "\"\"",
11183
+ "attribute": "download",
11184
+ "reflects": true
11185
+ },
11186
+ {
11187
+ "kind": "field",
11188
+ "name": "_sortColumn",
11189
+ "type": {
11190
+ "text": "number | null"
11191
+ },
11192
+ "privacy": "private",
11193
+ "default": "null"
11194
+ },
11195
+ {
11196
+ "kind": "field",
11197
+ "name": "_sortDirection",
11198
+ "type": {
11199
+ "text": "\"asc\" | \"desc\" | \"none\""
11200
+ },
11201
+ "privacy": "private",
11202
+ "default": "\"none\""
11203
+ },
11204
+ {
11205
+ "kind": "field",
11206
+ "name": "_captionText",
11207
+ "type": {
11208
+ "text": "string"
11209
+ },
11210
+ "privacy": "private",
11211
+ "default": "\"\""
11212
+ },
11213
+ {
11214
+ "kind": "field",
11215
+ "name": "_observer",
11216
+ "type": {
11217
+ "text": "MutationObserver | null"
11218
+ },
11219
+ "privacy": "private",
11220
+ "default": "null"
11221
+ },
11222
+ {
11223
+ "kind": "method",
11224
+ "name": "_handleSlotChange",
11225
+ "privacy": "private",
11226
+ "description": "****************** Functions *******************"
11227
+ },
11228
+ {
11229
+ "kind": "method",
11230
+ "name": "_setupMutationObserver",
11231
+ "privacy": "private"
11232
+ },
11233
+ {
11234
+ "kind": "method",
11235
+ "name": "_normalizeTableDOM",
11236
+ "privacy": "private",
11237
+ "parameters": [
11238
+ {
11239
+ "name": "table",
11240
+ "type": {
11241
+ "text": "HTMLTableElement"
11242
+ }
11243
+ }
11244
+ ]
11245
+ },
11246
+ {
11247
+ "kind": "method",
11248
+ "name": "_addSortIcons",
11249
+ "privacy": "private",
11250
+ "parameters": [
11251
+ {
11252
+ "name": "table",
11253
+ "type": {
11254
+ "text": "HTMLTableElement"
11255
+ }
11256
+ }
11257
+ ]
11258
+ },
11259
+ {
11260
+ "kind": "method",
11261
+ "name": "_updateSortIcons",
11262
+ "privacy": "private",
11263
+ "parameters": [
11264
+ {
11265
+ "name": "table",
11266
+ "type": {
11267
+ "text": "HTMLTableElement"
11268
+ }
11269
+ }
11270
+ ]
11271
+ },
11272
+ {
11273
+ "kind": "method",
11274
+ "name": "_onSortClick",
11275
+ "privacy": "private",
11276
+ "parameters": [
11277
+ {
11278
+ "name": "columnIndex",
11279
+ "type": {
11280
+ "text": "number"
11281
+ }
11282
+ },
11283
+ {
11284
+ "name": "table",
11285
+ "type": {
11286
+ "text": "HTMLTableElement"
11287
+ }
11288
+ }
11289
+ ]
11290
+ },
11291
+ {
11292
+ "kind": "method",
10759
11293
  "name": "_sortTable",
11294
+ "privacy": "private",
10760
11295
  "parameters": [
10761
11296
  {
10762
11297
  "name": "table",
@@ -10781,6 +11316,7 @@
10781
11316
  {
10782
11317
  "kind": "method",
10783
11318
  "name": "_updateSortedColumnStyles",
11319
+ "privacy": "private",
10784
11320
  "parameters": [
10785
11321
  {
10786
11322
  "name": "table",
@@ -10792,7 +11328,8 @@
10792
11328
  },
10793
11329
  {
10794
11330
  "kind": "method",
10795
- "name": "downloadFile"
11331
+ "name": "downloadFile",
11332
+ "privacy": "public"
10796
11333
  },
10797
11334
  {
10798
11335
  "kind": "method",