@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
@@ -5,12 +5,23 @@ import { LitElement } from "lit";
5
5
  * Auto-shows after scrolling 1.5 viewports on pages 4+ screens tall. Set `visible` to force display.
6
6
  * Renders as circle button on mobile. Position with `position` prop (`left` or `right`).
7
7
  *
8
- * @summary Floating back-to-top button with auto-show behavior and smooth scroll.
8
+ * **Placement:** For best accessibility, place as the first focusable element in the page footer.
9
+ * If no footer exists, place at the bottom of the body tag (after main content). Floating
10
+ * positioning allows it to overlay content without taking up layout space.
11
+ *
12
+ * **Focus Management:** When clicked, after scrolling to the top, focus is automatically moved
13
+ * to the `<main>` element (if present), the first heading (`<h1>` or `<h2>`), or the document element.
14
+ * This ensures keyboard navigation continues naturally from the top of the page.
15
+ *
16
+ * @summary Floating back-to-top button with auto-show behavior, smooth scroll, and focus management.
9
17
  * @element nys-backtotop
10
18
  *
11
- * @example Auto-appearing button
19
+ * @example Auto-appearing button in footer
12
20
  * ```html
13
- * <nys-backtotop></nys-backtotop>
21
+ * <footer>
22
+ * <nys-backtotop></nys-backtotop>
23
+ * <!-- Other footer content -->
24
+ * </footer>
14
25
  * ```
15
26
  *
16
27
  * @example Always visible, left position
@@ -40,6 +51,7 @@ export declare class NysBacktotop extends LitElement {
40
51
  */
41
52
  private _handleScroll;
42
53
  private _scrollToTop;
54
+ private _moveFocusToTop;
43
55
  private _handleResize;
44
56
  render(): import("lit-html").TemplateResult<1>;
45
57
  }
@@ -39,6 +39,8 @@ export declare class NysBadge extends LitElement {
39
39
  prefixLabel: string;
40
40
  /** Primary label text displayed in the badge. */
41
41
  label: string;
42
+ /** Screen reader text appended after the label for additional context. */
43
+ srText: string;
42
44
  variant: "strong" | "";
43
45
  private _prefixIcon;
44
46
  get prefixIcon(): string | boolean;
@@ -66,8 +66,6 @@ export declare class NysCheckbox extends LitElement {
66
66
  groupExist: boolean;
67
67
  /** Renders as tile with larger clickable area. Apply to group for consistency. */
68
68
  tile: boolean;
69
- /** Adjusts colors for dark backgrounds. */
70
- inverted: boolean;
71
69
  /** Tooltip text shown on hover/focus of info icon. */
72
70
  tooltip: string;
73
71
  /**
@@ -3,7 +3,7 @@ import { LitElement } from "lit";
3
3
  * A container for grouping multiple `nys-checkbox` components as a single form control.
4
4
  * Handles validation, required constraints, and submits comma-separated values.
5
5
  *
6
- * Use to allow users to select multiple options from a list. Apply `tile`, `size`, and `inverted` to the group
6
+ * Use to allow users to select multiple options from a list. Apply `tile` and `size` to the group
7
7
  * and all children inherit these styles automatically.
8
8
  *
9
9
  * @summary Container for grouping checkboxes as a single form control.
@@ -50,8 +50,6 @@ export declare class NysCheckboxgroup extends LitElement {
50
50
  tile: boolean;
51
51
  /** Tooltip text shown on hover/focus of info icon. */
52
52
  tooltip: string;
53
- /** Adjusts colors for dark backgrounds. Applied to all children. */
54
- inverted: boolean;
55
53
  /** Form `id` to associate with. Applied to all children. */
56
54
  form: string | null;
57
55
  /**
@@ -84,7 +82,6 @@ export declare class NysCheckboxgroup extends LitElement {
84
82
  private _setCustomOtherError;
85
83
  private _updateCheckboxSize;
86
84
  private _updateCheckboxTile;
87
- private _updateCheckboxInvert;
88
85
  private _updateCheckboxShowError;
89
86
  private _updateCheckboxForm;
90
87
  private _getSlotDescriptionForAria;
@@ -50,8 +50,6 @@ export declare class NysRadiobutton extends LitElement {
50
50
  name: string;
51
51
  /** Value submitted when this radio is selected. */
52
52
  value: string;
53
- /** Adjusts colors for dark backgrounds. */
54
- inverted: boolean;
55
53
  /** Form `id` to associate with. */
56
54
  form: string | null;
57
55
  /**
@@ -3,7 +3,7 @@ import { LitElement } from "lit";
3
3
  * A container for grouping `nys-radiobutton` elements as a single form control with enforced single selection.
4
4
  * Handles keyboard navigation (arrow keys), validation, required constraints, and form integration.
5
5
  *
6
- * Use to let users select exactly one option from 2-6 choices. Apply `tile`, `size`, and `inverted` to the group
6
+ * Use to let users select exactly one option from 2-6 choices. Apply `tile` and `size` to the group
7
7
  * and all children inherit these styles automatically. For 7+ options, use `nys-select`.
8
8
  *
9
9
  * @summary Container for grouping radio buttons as a single form control.
@@ -51,8 +51,6 @@ export declare class NysRadiogroup extends LitElement {
51
51
  tile: boolean;
52
52
  /** Tooltip text shown on hover/focus of info icon. */
53
53
  tooltip: string;
54
- /** Adjusts colors for dark backgrounds. Applied to all children. */
55
- inverted: boolean;
56
54
  /** Form `id` to associate with. Applied to all children. */
57
55
  form: string | null;
58
56
  /**
@@ -93,7 +91,6 @@ export declare class NysRadiogroup extends LitElement {
93
91
  private _initializeChildAttributes;
94
92
  private _updateRadioButtonsSize;
95
93
  private _updateRadioButtonsTile;
96
- private _updateRadioButtonsInvert;
97
94
  private _updateRadioButtonsShowError;
98
95
  private _updateRadioButtonsForm;
99
96
  private _getSlotDescriptionForAria;
@@ -0,0 +1,3 @@
1
+ export * from "./nys-tab";
2
+ export * from "./nys-tabgroup";
3
+ export * from "./nys-tabpanel";
@@ -0,0 +1,116 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * `<nys-tab>` is a single tab within a `<nys-tabgroup>`.
4
+ *
5
+ * The host element carries `role="tab"`, `tabindex`, `aria-selected`,
6
+ * `aria-controls`, and `aria-disabled` so assistive technologies see the
7
+ * correct ARIA tab semantics on the element that is actually focused.
8
+ * `<nys-tabgroup>` manages `tabindex`, `aria-selected`, and `aria-controls`
9
+ * via `_applySelection`; do not set them directly on this element.
10
+ *
11
+ * @element nys-tab
12
+ *
13
+ * @fires nys-tab-select - Dispatched when the tab is activated via click or
14
+ * Enter / Space. Bubbles and crosses shadow DOM boundaries.
15
+ * `detail: { id: string, label: string }`
16
+ * @fires nys-tab-focus - Dispatched when the host receives focus. Bubbles and
17
+ * crosses shadow DOM boundaries. `detail: { id: string }`
18
+ * @fires nys-tab-blur - Dispatched when the host loses focus. Bubbles and
19
+ * crosses shadow DOM boundaries. `detail: { id: string }`
20
+ *
21
+ * @slot - No slots; content is derived from the `label` property.
22
+ *
23
+ * @example `<nys-tab>` and `<nys-tabpanel>` should always be wrapped by `<nys-tabgroup>`
24
+ * ```html
25
+ * <!-- Always place <nys-tab> elements inside a <nys-tabgroup>. -->
26
+ * <nys-tabgroup name="My Tabs">
27
+ * <nys-tab label="Overview"></nys-tab>
28
+ * <nys-tab label="Details" selected></nys-tab>
29
+ * <nys-tab label="Archived" disabled></nys-tab>
30
+ * <nys-tabpanel><p>Overview content</p></nys-tabpanel>
31
+ * <nys-tabpanel><p>Details content (shown by default)</p></nys-tabpanel>
32
+ * <nys-tabpanel><p>Archived content</p></nys-tabpanel>
33
+ * </nys-tabgroup>
34
+ * ```
35
+ */
36
+ export declare class NysTab extends LitElement {
37
+ static styles: import("lit").CSSResult;
38
+ /**
39
+ * Unique identifier for the tab element.
40
+ * Reflected to the DOM attribute so `aria-controls` references resolve.
41
+ *
42
+ * @attr id
43
+ */
44
+ id: string;
45
+ /**
46
+ * Visible text label rendered inside the inner `<span>`.
47
+ *
48
+ * @attr label
49
+ */
50
+ label: string;
51
+ /**
52
+ * Whether this tab is the currently active tab.
53
+ * Managed by `<nys-tabgroup>`; reflected for CSS attribute selectors.
54
+ *
55
+ * @attr selected
56
+ */
57
+ selected: boolean;
58
+ /**
59
+ * Whether this tab is disabled.
60
+ * Reflected to the DOM attribute for CSS styling.
61
+ *
62
+ * @attr disabled
63
+ */
64
+ disabled: boolean;
65
+ /**
66
+ * Sets `role="tab"` and `tabindex="-1"` on the host (the element that AT
67
+ * will read and that receives keyboard focus). Attaches host-level listeners
68
+ * for keydown, focus, blur, and click so that interaction events work
69
+ * correctly on the host element itself.
70
+ *
71
+ * Click is handled at the host level so iOS VoiceOver double-tap (which
72
+ * dispatches `click` directly on the host because of `role="tab"`, bypassing
73
+ * shadow-DOM children) activates the tab. Normal taps land on the inner
74
+ * `<span>` and bubble up to this listener.
75
+ *
76
+ * `<nys-tabgroup>` overrides `tabindex` to `"0"` on the selected tab.
77
+ */
78
+ connectedCallback(): void;
79
+ disconnectedCallback(): void;
80
+ /**
81
+ * Keeps `aria-disabled` on the host in sync with the `disabled` property so
82
+ * AT perceives the disabled state on the element it actually focuses.
83
+ */
84
+ updated(changed: Map<string, unknown>): void;
85
+ /**
86
+ * Focuses the host element. The host carries `role="tab"` and `tabindex`,
87
+ * so it is the correct element for AT to land on.
88
+ */
89
+ focus(options?: FocusOptions): void;
90
+ /**
91
+ * Enter / Space on the focused host activate the tab.
92
+ * Arrow-key navigation is handled one level up by `<nys-tabgroup>`.
93
+ */
94
+ private _onKeydown;
95
+ /**
96
+ * Host focus → dispatch `nys-tab-focus` for external observers.
97
+ */
98
+ private _onFocus;
99
+ /**
100
+ * Host blur → dispatch `nys-tab-blur` for external observers.
101
+ */
102
+ private _onBlur;
103
+ /**
104
+ * Host-level click handler. Activates the tab regardless of whether the
105
+ * click landed on the inner element (normal pointer/keyboard tap, which
106
+ * bubbles up) or directly on the host (iOS VoiceOver double-tap dispatches
107
+ * `click` on the element with `role="tab"`, bypassing shadow-DOM children).
108
+ */
109
+ private _onClick;
110
+ /**
111
+ * Focuses the host then dispatches `nys-tab-select`. Called from both the
112
+ * click handler and the keydown handler.
113
+ */
114
+ private _handleClick;
115
+ render(): import("lit-html").TemplateResult<1>;
116
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,197 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * `<nys-tabgroup>` is the container for `<nys-tab>` and `<nys-tabpanel>`
4
+ * elements.
5
+ *
6
+ * Accepts tabs and panels as flat light-DOM children in any order (interleaved
7
+ * or grouped). On slot change, children are sorted into dedicated shadow-DOM
8
+ * containers, ARIA relationships are wired, and the first selected (or first)
9
+ * tab is activated.
10
+ *
11
+ * Scroll shadows are rendered on either side of the tab list and toggled via
12
+ * `ResizeObserver` and a `scroll` listener so they accurately reflect whether
13
+ * overflow content exists in each direction.
14
+ *
15
+ * Keyboard navigation follows the
16
+ * {@link https://www.w3.org/WAI/ARIA/apg/patterns/tabs/ ARIA Tabs Pattern}:
17
+ * - Arrow keys move focus without changing selection.
18
+ * - Enter / Space confirm selection on the focused tab.
19
+ *
20
+ * @element nys-tabgroup
21
+ *
22
+ * @slot - Accepts `<nys-tab>` and `<nys-tabpanel>` children. Elements are
23
+ * moved into internal shadow-DOM containers on `slotchange`; the slot
24
+ * itself is not rendered visibly.
25
+ *
26
+ * @example Disable a tab using the `disabled` attribute on `<nys-tab>`.
27
+ * ```html
28
+ * <nys-tabgroup name="Account Settings">
29
+ * <nys-tab label="Profile"></nys-tab>
30
+ * <nys-tab label="Security"></nys-tab>
31
+ * <nys-tab label="Notifications" disabled></nys-tab>
32
+ * <nys-tabpanel><p>Manage your profile information.</p></nys-tabpanel>
33
+ * <nys-tabpanel><p>Update your password and 2FA settings.</p></nys-tabpanel>
34
+ * <nys-tabpanel><p>Notification preferences (coming soon).</p></nys-tabpanel>
35
+ * </nys-tabgroup>
36
+ * ```
37
+ *
38
+ * @example Pre-select a tab using the `selected` attribute on `<nys-tab>`.
39
+ * ```html
40
+ * <nys-tabgroup name="Reports">
41
+ * <nys-tab label="Summary"></nys-tab>
42
+ * <nys-tab label="Details" selected></nys-tab>
43
+ * <nys-tabpanel><p>Summary view</p></nys-tabpanel>
44
+ * <nys-tabpanel><p>Detailed view (shown by default)</p></nys-tabpanel>
45
+ * </nys-tabgroup>
46
+ * ```
47
+ */
48
+ export declare class NysTabgroup extends LitElement {
49
+ static styles: import("lit").CSSResult;
50
+ /**
51
+ * Unique identifier for the tabgroup element.
52
+ * If not provided, one is auto-generated in `connectedCallback`.
53
+ * Reflected to the DOM attribute.
54
+ *
55
+ * @attr id
56
+ */
57
+ id: string;
58
+ /**
59
+ * The name of the tab group.
60
+ * Used for form submission and accessibility purposes.
61
+ *
62
+ * @attr name
63
+ */
64
+ name: string;
65
+ /**
66
+ * Cached in `firstUpdated` and used by `_updateScrollShadows` to read
67
+ * scroll position and dimensions.
68
+ */
69
+ private _tabsEl;
70
+ /**
71
+ * Reference to the left scroll-shadow overlay element.
72
+ * Receives the `is-visible` class when the tab list is scrolled away from
73
+ * its leftmost position.
74
+ */
75
+ private _shadowLeft;
76
+ /**
77
+ * Reference to the right scroll-shadow overlay element.
78
+ * Receives the `is-visible` class when overflow content exists to the right
79
+ * of the current scroll position.
80
+ */
81
+ private _shadowRight;
82
+ /**
83
+ * `ResizeObserver` instance watching `_tabsEl` for size changes.
84
+ * Re-evaluates scroll shadow visibility whenever the tab list is resized
85
+ * (e.g. viewport resize, dynamic tab additions).
86
+ * Stored so it can be disconnected if needed.
87
+ */
88
+ private _resizeObserver?;
89
+ /**
90
+ * Called when the element is inserted into the document.
91
+ * Auto-generates a unique `id` if one was not provided.
92
+ */
93
+ connectedCallback(): void;
94
+ /**
95
+ * Called after the element's shadow DOM has been rendered for the first time.
96
+ *
97
+ * Caches references to the tab list and scroll-shadow elements, performs an
98
+ * initial scroll-shadow evaluation, and attaches:
99
+ * - A `scroll` event listener on `_tabsEl` to update shadows on scroll.
100
+ * - A `ResizeObserver` on `_tabsEl` to update shadows when the container
101
+ * is resized.
102
+ */
103
+ firstUpdated(): void;
104
+ /**
105
+ * Reads the current scroll state of `_tabsEl` and toggles the `is-visible`
106
+ * class on the left and right shadow overlays accordingly.
107
+ *
108
+ * - Left shadow is visible when `scrollLeft > 0`.
109
+ * - Right shadow is visible when `scrollLeft + clientWidth < scrollWidth`
110
+ * (i.e. content exists beyond the right edge).
111
+ *
112
+ * Defined as an arrow function so it can be passed directly as an event
113
+ * listener without losing `this` context.
114
+ *
115
+ * @returns void
116
+ */
117
+ private _updateScrollShadows;
118
+ /**
119
+ * Returns all `<nys-tab>` elements currently residing in the shadow-DOM
120
+ * tabs container, in DOM order.
121
+ *
122
+ * @returns An array of `HTMLElement` references to every `<nys-tab>` child.
123
+ */
124
+ private _getTabs;
125
+ /**
126
+ * Returns all `<nys-tabpanel>` elements currently residing in the
127
+ * shadow-DOM panels container, in DOM order.
128
+ *
129
+ * @returns An array of `HTMLElement` references to every `<nys-tabpanel>` child.
130
+ */
131
+ private _getPanels;
132
+ /**
133
+ * Single source of truth for ARIA wiring, `tabindex`, and panel visibility.
134
+ *
135
+ * For each index `i`:
136
+ * - Sets `selected` / removes `selected` attribute on `tabs[i]`.
137
+ * - Sets `aria-controls` on `tabs[i]` to the `id` of `panels[i]`.
138
+ * - Sets `aria-labelledby` on `panels[i]` to the `id` of `tabs[i]`.
139
+ * - Removes `hidden` from `panels[selectedIndex]`; adds it to all others.
140
+ *
141
+ * Must be called any time the selected tab changes (initial render and
142
+ * subsequent user interactions).
143
+ *
144
+ * @param tabs - Ordered array of `<nys-tab>` elements to update.
145
+ * @param panels - Ordered array of `<nys-tabpanel>` elements to update.
146
+ * Must be the same length as `tabs` for correct pairing.
147
+ * @param selectedIndex - Zero-based index of the tab/panel pair to activate.
148
+ * @returns void
149
+ */
150
+ private _applySelection;
151
+ /**
152
+ * Handles `slotchange` on the default slot.
153
+ *
154
+ * Iterates over all assigned elements and moves each `<nys-tab>` into
155
+ * `.nys-tabgroup__tabs` and each `<nys-tabpanel>` into
156
+ * `.nys-tabgroup__panels`, preserving relative order. After sorting,
157
+ * calls `_applySelection` using the first element that already has a
158
+ * `selected` attribute, or index `0` if none is found.
159
+ *
160
+ * @param e - The `Event` fired by the `<slot>` element on slot change.
161
+ * @returns void
162
+ */
163
+ private _sortChildren;
164
+ /**
165
+ * Handles the `nys-tab-select` custom event bubbled up from a child
166
+ * `<nys-tab>`.
167
+ *
168
+ * Resolves the originating `<nys-tab>` via `composedPath()` (required
169
+ * because the event crosses shadow DOM boundaries), determines its index
170
+ * among the current tab list, and delegates to `_applySelection`.
171
+ *
172
+ * @param e - The `Event` (cast to `CustomEvent`) dispatched by `<nys-tab>`.
173
+ * @returns void
174
+ */
175
+ private _handleTabSelect;
176
+ /**
177
+ * Implements the ARIA radio-button keyboard pattern:
178
+ * - `ArrowRight` — moves focus to the next enabled tab (wraps).
179
+ * - `ArrowLeft` — moves focus to the previous enabled tab (wraps).
180
+ *
181
+ * Focus is moved without changing selection; Enter / Space on the newly
182
+ * focused tab (handled by `<nys-tab>._handleKeydown`) confirm selection.
183
+ *
184
+ * The currently focused tab is resolved via `composedPath()` because focus
185
+ * may sit on a shadow-DOM descendant of `<nys-tab>` rather than the host
186
+ * itself.
187
+ *
188
+ * Disabled tabs are excluded from navigation and will never receive focus
189
+ * via arrow keys.
190
+ *
191
+ * @param e - The `KeyboardEvent` from the tablist `keydown` listener.
192
+ * @returns void
193
+ */
194
+ private _handleKeydown;
195
+ private _handleWheel;
196
+ render(): import("lit-html").TemplateResult<1>;
197
+ }
@@ -0,0 +1,46 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * `<nys-tabpanel>` is a content panel paired with a `<nys-tab>` inside a
4
+ * `<nys-tabgroup>`.
5
+ *
6
+ * Pairing is determined by render order: the Nth `<nys-tabpanel>` child of a
7
+ * `<nys-tabgroup>` corresponds to the Nth `<nys-tab>` child.
8
+ * `aria-labelledby` and the `hidden` attribute are managed externally by
9
+ * `<nys-tabgroup>` via `_applySelection`; do not set them directly.
10
+ *
11
+ * @element nys-tabpanel
12
+ *
13
+ * @slot - Default slot for panel content. Rendered inside a wrapper `<div>`
14
+ * with the `.nys-tabpanel` class for styling.
15
+ *
16
+ * @example Panel content is wrapped by `<nys-tabpanel>`.
17
+ * ```html
18
+ * <!-- Panels are paired by position with <nys-tab> elements in the same <nys-tabgroup>. -->
19
+ * <nys-tabgroup name="Steps">
20
+ * <nys-tab label="Step 1"></nys-tab>
21
+ * <nys-tab label="Step 2"></nys-tab>
22
+ * <nys-tabpanel>
23
+ * <h2>Step 1: Enter your information</h2>
24
+ * <p>Fill out the form below.</p>
25
+ * </nys-tabpanel>
26
+ * <nys-tabpanel>
27
+ * <h2>Step 2: Review and submit</h2>
28
+ * <p>Confirm your details before submitting.</p>
29
+ * </nys-tabpanel>
30
+ * </nys-tabgroup>
31
+ * ```
32
+ */
33
+ export declare class NysTabpanel extends LitElement {
34
+ static styles: import("lit").CSSResult;
35
+ /**
36
+ * Unique identifier for the panel element.
37
+ * If not provided, one is auto-generated in `connectedCallback`.
38
+ * Reflected to the DOM attribute so `aria-controls` references on sibling
39
+ * `<nys-tab>` elements resolve correctly.
40
+ *
41
+ * @attr id
42
+ */
43
+ id: string;
44
+ connectedCallback(): void;
45
+ render(): import("lit-html").TemplateResult<1>;
46
+ }
@@ -22,19 +22,22 @@ export declare class NysTable extends LitElement {
22
22
  private _sortColumn;
23
23
  private _sortDirection;
24
24
  private _captionText;
25
+ private _observer;
25
26
  /**************** Lifecycle Methods ****************/
26
27
  constructor();
27
28
  connectedCallback(): void;
28
- /******************** Functions ********************/
29
29
  firstUpdated(): void;
30
- _handleSlotChange(): void;
31
- _normalizeTableDOM(table: HTMLTableElement): void;
30
+ disconnectedCallback(): void;
32
31
  willUpdate(): void;
33
- _addSortIcons(table: HTMLTableElement): void;
34
- _updateSortIcons(table: HTMLTableElement): void;
32
+ /******************** Functions ********************/
33
+ private _handleSlotChange;
34
+ private _setupMutationObserver;
35
+ private _normalizeTableDOM;
36
+ private _addSortIcons;
37
+ private _updateSortIcons;
35
38
  private _onSortClick;
36
- _sortTable(table: HTMLTableElement, columnIndex: number, direction: "asc" | "desc"): void;
37
- _updateSortedColumnStyles(table: HTMLTableElement): void;
39
+ private _sortTable;
40
+ private _updateSortedColumnStyles;
38
41
  downloadFile(): void;
39
42
  /****************** Event Handlers ******************/
40
43
  /**
@@ -20,6 +20,7 @@ export * from "../packages/nys-radiobutton/src/index";
20
20
  export * from "../packages/nys-select/src/index";
21
21
  export * from "../packages/nys-skipnav/src/index";
22
22
  export * from "../packages/nys-stepper/src/index";
23
+ export * from "../packages/nys-tab/src/index";
23
24
  export * from "../packages/nys-table/src/index";
24
25
  export * from "../packages/nys-textarea/src/index";
25
26
  export * from "../packages/nys-textinput/src/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/components",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "description": "New York State's design system and code component library.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -47,7 +47,7 @@ export interface NysBacktotopProps extends Pick<
47
47
  }
48
48
 
49
49
  /**
50
- * Floating back-to-top button with auto-show behavior and smooth scroll.
50
+ * Floating back-to-top button with auto-show behavior, smooth scroll, and focus management.
51
51
  * ---
52
52
  *
53
53
  */
@@ -42,6 +42,9 @@ export interface NysBadgeProps extends Pick<
42
42
  /** Primary label text displayed in the badge. */
43
43
  label?: NysBadgeElement["label"];
44
44
 
45
+ /** Screen reader text appended after the label for additional context. */
46
+ srText?: NysBadgeElement["srText"];
47
+
45
48
  /** undefined */
46
49
  variant?: NysBadgeElement["variant"];
47
50
 
@@ -11,6 +11,7 @@ export const NysBadge = forwardRef((props, forwardedRef) => {
11
11
  intent,
12
12
  prefixLabel,
13
13
  label,
14
+ srText,
14
15
  variant,
15
16
  ...filteredProps
16
17
  } = props;
@@ -25,6 +26,7 @@ export const NysBadge = forwardRef((props, forwardedRef) => {
25
26
  intent: props.intent,
26
27
  prefixLabel: props.prefixLabel,
27
28
  label: props.label,
29
+ srText: props.srText,
28
30
  variant: props.variant,
29
31
  class: props.className,
30
32
  exportparts: props.exportparts,
@@ -40,9 +40,6 @@ export interface NysCheckboxProps extends Pick<
40
40
  /** Renders as tile with larger clickable area. Apply to group for consistency. */
41
41
  tile?: boolean;
42
42
 
43
- /** Adjusts colors for dark backgrounds. */
44
- inverted?: boolean;
45
-
46
43
  /** undefined */
47
44
  other?: boolean;
48
45
 
@@ -11,7 +11,6 @@ export const NysCheckbox = forwardRef((props, forwardedRef) => {
11
11
  showError,
12
12
  groupExist,
13
13
  tile,
14
- inverted,
15
14
  other,
16
15
  showOtherError,
17
16
  label,
@@ -66,7 +65,6 @@ export const NysCheckbox = forwardRef((props, forwardedRef) => {
66
65
  showError: props.showError ? true : undefined,
67
66
  groupExist: props.groupExist ? true : undefined,
68
67
  tile: props.tile ? true : undefined,
69
- inverted: props.inverted ? true : undefined,
70
68
  other: props.other ? true : undefined,
71
69
  showOtherError: props.showOtherError ? true : undefined,
72
70
  style: { ...props.style },
@@ -30,9 +30,6 @@ export interface NysCheckboxgroupProps extends Pick<
30
30
  /** Renders all checkboxes as tiles with larger clickable area. */
31
31
  tile?: boolean;
32
32
 
33
- /** Adjusts colors for dark backgrounds. Applied to all children. */
34
- inverted?: boolean;
35
-
36
33
  /** Unique identifier. Auto-generated if not provided. */
37
34
  id?: NysCheckboxgroupElement["id"];
38
35
 
@@ -7,7 +7,6 @@ export const NysCheckboxgroup = forwardRef((props, forwardedRef) => {
7
7
  optional,
8
8
  showError,
9
9
  tile,
10
- inverted,
11
10
  id,
12
11
  name,
13
12
  errorMessage,
@@ -40,7 +39,6 @@ export const NysCheckboxgroup = forwardRef((props, forwardedRef) => {
40
39
  optional: props.optional ? true : undefined,
41
40
  showError: props.showError ? true : undefined,
42
41
  tile: props.tile ? true : undefined,
43
- inverted: props.inverted ? true : undefined,
44
42
  style: { ...props.style },
45
43
  },
46
44
  props.children,
@@ -31,9 +31,6 @@ export interface NysRadiobuttonProps extends Pick<
31
31
  /** Marks group as required. Set on radiogroup, not individual radios. */
32
32
  required?: boolean;
33
33
 
34
- /** Adjusts colors for dark backgrounds. */
35
- inverted?: boolean;
36
-
37
34
  /** Renders as tile with larger clickable area. */
38
35
  tile?: boolean;
39
36
 
@@ -8,7 +8,6 @@ export const NysRadiobutton = forwardRef((props, forwardedRef) => {
8
8
  checked,
9
9
  disabled,
10
10
  required,
11
- inverted,
12
11
  tile,
13
12
  other,
14
13
  showOtherError,
@@ -57,7 +56,6 @@ export const NysRadiobutton = forwardRef((props, forwardedRef) => {
57
56
  checked: props.checked ? true : undefined,
58
57
  disabled: props.disabled ? true : undefined,
59
58
  required: props.required ? true : undefined,
60
- inverted: props.inverted ? true : undefined,
61
59
  tile: props.tile ? true : undefined,
62
60
  other: props.other ? true : undefined,
63
61
  showOtherError: props.showOtherError ? true : undefined,
@@ -30,9 +30,6 @@ export interface NysRadiogroupProps extends Pick<
30
30
  /** Renders all radiobuttons as tiles with larger clickable area. */
31
31
  tile?: boolean;
32
32
 
33
- /** Adjusts colors for dark backgrounds. Applied to all children. */
34
- inverted?: boolean;
35
-
36
33
  /** Unique identifier. Auto-generated if not provided. */
37
34
  id?: NysRadiogroupElement["id"];
38
35