@nysds/components 1.18.1 → 1.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +108 -72
- package/dist/.vscode/vscode.html-custom-data.json +13 -19
- package/dist/custom-elements.json +108 -72
- package/dist/nysds.es.js +727 -673
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +105 -78
- package/dist/nysds.js.map +1 -1
- package/dist/packages/mcp-server/src/lib/token-parser.d.ts +19 -31
- package/dist/packages/mcp-server/src/tools/token-tools.d.ts +2 -3
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +2 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +3 -3
- package/dist/packages/nys-button/src/nys-button.d.ts +1 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +2 -1
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +1 -1
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +3 -0
- package/dist/packages/nys-modal/src/nys-modal.d.ts +1 -0
- package/dist/packages/nys-stepper/src/nys-step.d.ts +75 -23
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +81 -9
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +1 -0
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +1 -0
- package/package.json +3 -1
- package/packages/react/NysStep.d.ts +10 -12
- package/packages/react/NysStep.js +1 -12
- package/packages/react/NysStepper.d.ts +6 -6
- package/packages/react/nysds-jsx.d.ts +16 -16
- package/dist/packages/mcp-server/src/lib/format.d.ts +0 -21
|
@@ -744,34 +744,34 @@ export type NysSkipnavProps = {
|
|
|
744
744
|
};
|
|
745
745
|
|
|
746
746
|
export type NysStepProps = {
|
|
747
|
-
/**
|
|
747
|
+
/** Which step is currently being displayed. If not set, defaults to the `current` step.
|
|
748
|
+
Setting this on a step after `current` is silently corrected to match `current`.
|
|
749
|
+
When controlling state from a framework, always set this explicitly. */
|
|
748
750
|
selected?: boolean;
|
|
749
|
-
/**
|
|
751
|
+
/** The furthest step the user has reached (progress boundary). Steps before this are navigable. */
|
|
750
752
|
current?: boolean;
|
|
751
753
|
/** Step label text displayed alongside the step number. */
|
|
752
754
|
label?: string;
|
|
753
|
-
/** URL
|
|
755
|
+
/** URL navigated to when the step is activated, via `window.location.href`.
|
|
756
|
+
Navigation is suppressed if the `nys-step-click` listener calls `e.preventDefault()`.
|
|
757
|
+
Omit for SPA/framework routing and handle navigation in the event listener instead. */
|
|
754
758
|
href?: string;
|
|
755
|
-
/**
|
|
756
|
-
isCompactExpanded?: boolean;
|
|
757
|
-
/** Step number (1-indexed). Auto-assigned by parent stepper. */
|
|
758
|
-
stepNumber?: number;
|
|
759
|
-
/** Custom click handler. Called before `nys-step-click` event. */
|
|
759
|
+
/** Optional function called before `nys-step-click` is dispatched. Use for pre-navigation logic. */
|
|
760
760
|
onClick?: (e: Event) => void | undefined;
|
|
761
|
-
/** Fired when a navigable step is clicked. Detail: `{href, label}`. Cancelable. */
|
|
761
|
+
/** Fired when a navigable (`previous` or `current`) non-selected step is clicked or activated by keyboard. Detail: `{ href: string, label: string }`. Cancelable — call `e.preventDefault()` to suppress `window.location.href` navigation. */
|
|
762
762
|
"onnys-step-click"?: (e: CustomEvent<never>) => void;
|
|
763
763
|
};
|
|
764
764
|
|
|
765
765
|
export type NysStepperProps = {
|
|
766
|
-
/** Unique identifier. */
|
|
766
|
+
/** Unique identifier. Auto-generated as `nys-stepper-{n}-{timestamp}` if not provided. */
|
|
767
767
|
id?: string;
|
|
768
768
|
/** Name attribute for form association. */
|
|
769
769
|
name?: string;
|
|
770
|
-
/** Title displayed above the step counter. */
|
|
770
|
+
/** Title displayed above the step list and compact counter. */
|
|
771
771
|
label?: string;
|
|
772
|
-
/** Progress text (e.g., "Step 2 of 5"). Auto-
|
|
772
|
+
/** Progress text displayed in compact mode (e.g., "Step 2 of 5"). Auto-managed — do not set manually. */
|
|
773
773
|
counterText?: string;
|
|
774
|
-
/** Whether compact mobile view is expanded to show all steps. */
|
|
774
|
+
/** Whether compact mobile view is expanded to show all steps. Toggled by clicking the counter. */
|
|
775
775
|
isCompactExpanded?: boolean;
|
|
776
776
|
};
|
|
777
777
|
|
|
@@ -1414,7 +1414,7 @@ export type CustomElements = {
|
|
|
1414
1414
|
*
|
|
1415
1415
|
*
|
|
1416
1416
|
* ### **Events:**
|
|
1417
|
-
* - **nys-step-click** - Fired when a navigable step is clicked. Detail: `{href, label}`. Cancelable.
|
|
1417
|
+
* - **nys-step-click** - Fired when a navigable (`previous` or `current`) non-selected step is clicked or activated by keyboard. Detail: `{ href: string, label: string }`. Cancelable — call `e.preventDefault()` to suppress `window.location.href` navigation.
|
|
1418
1418
|
*/
|
|
1419
1419
|
"nys-step": Partial<NysStepProps & BaseProps & BaseEvents>;
|
|
1420
1420
|
|
|
@@ -1424,8 +1424,8 @@ export type CustomElements = {
|
|
|
1424
1424
|
*
|
|
1425
1425
|
*
|
|
1426
1426
|
* ### **Slots:**
|
|
1427
|
-
* - _default_ - Default slot for `nys-step` elements.
|
|
1428
|
-
* - **actions** -
|
|
1427
|
+
* - _default_ - Default slot for `nys-step` elements. Only `nys-step` children are accepted; others are removed.
|
|
1428
|
+
* - **actions** - Persistent navigation buttons. Must contain exactly one `<div>` wrapping only `<nys-button>` elements.
|
|
1429
1429
|
*/
|
|
1430
1430
|
"nys-stepper": Partial<NysStepperProps & BaseProps & BaseEvents>;
|
|
1431
1431
|
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Format Utilities
|
|
3
|
-
*
|
|
4
|
-
* Helpers for formatting MCP tool responses.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* JSON replacer that strips null and undefined values from objects.
|
|
8
|
-
* Use with JSON.stringify(obj, stripNulls, 2) for cleaner output.
|
|
9
|
-
*/
|
|
10
|
-
export declare function stripNulls(_key: string, value: unknown): unknown;
|
|
11
|
-
/**
|
|
12
|
-
* Format an object as JSON, stripping null/undefined values and empty arrays.
|
|
13
|
-
*/
|
|
14
|
-
export declare function formatResponse(data: unknown): string;
|
|
15
|
-
/**
|
|
16
|
-
* Create a text content response for MCP tools.
|
|
17
|
-
*/
|
|
18
|
-
export declare function textContent(data: unknown): {
|
|
19
|
-
type: "text";
|
|
20
|
-
text: string;
|
|
21
|
-
};
|