@nysds/components 1.18.1 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +799 -372
- package/dist/.vscode/vscode.html-custom-data.json +29 -24
- package/dist/custom-elements.json +799 -372
- package/dist/icons/ac_unit.svg +8 -0
- package/dist/icons/account_balance_filled.svg +8 -0
- package/dist/icons/account_circle.svg +8 -0
- package/dist/icons/add.svg +8 -0
- package/dist/icons/air.svg +8 -0
- package/dist/icons/arrow_back.svg +8 -0
- package/dist/icons/arrow_downward.svg +8 -0
- package/dist/icons/arrow_forward.svg +8 -0
- package/dist/icons/arrow_upward.svg +8 -0
- package/dist/icons/attach_file.svg +8 -0
- package/dist/icons/calendar_month.svg +8 -0
- package/dist/icons/cancel.svg +8 -0
- package/dist/icons/cancel_filled.svg +8 -0
- package/dist/icons/check.svg +8 -0
- package/dist/icons/check_circle.svg +8 -0
- package/dist/icons/chevron_down.svg +8 -0
- package/dist/icons/chevron_left.svg +8 -0
- package/dist/icons/chevron_right.svg +8 -0
- package/dist/icons/chevron_up.svg +8 -0
- package/dist/icons/clear_day.svg +8 -0
- package/dist/icons/close.svg +8 -0
- package/dist/icons/code.svg +8 -0
- package/dist/icons/content_copy.svg +8 -0
- package/dist/icons/coronavirus.svg +8 -0
- package/dist/icons/delete.svg +8 -0
- package/dist/icons/download.svg +8 -0
- package/dist/icons/download_done.svg +8 -0
- package/dist/icons/drive_folder_upload.svg +8 -0
- package/dist/icons/edit_square.svg +8 -0
- package/dist/icons/emergency_home.svg +8 -0
- package/dist/icons/error.svg +8 -0
- package/dist/icons/expand_all.svg +8 -0
- package/dist/icons/filter_alt.svg +8 -0
- package/dist/icons/filter_list.svg +8 -0
- package/dist/icons/height.svg +8 -0
- package/dist/icons/help.svg +8 -0
- package/dist/icons/info.svg +8 -0
- package/dist/icons/language.svg +8 -0
- package/dist/icons/language_filled.svg +8 -0
- package/dist/icons/link.svg +8 -0
- package/dist/icons/lock_filled.svg +8 -0
- package/dist/icons/mail.svg +8 -0
- package/dist/icons/manifest.json +84 -0
- package/dist/icons/menu.svg +8 -0
- package/dist/icons/more_vert.svg +8 -0
- package/dist/icons/notifications.svg +8 -0
- package/dist/icons/open_in_new.svg +8 -0
- package/dist/icons/phone_in_talk.svg +8 -0
- package/dist/icons/print.svg +8 -0
- package/dist/icons/progress_activity.svg +8 -0
- package/dist/icons/publish.svg +8 -0
- package/dist/icons/rainy.svg +8 -0
- package/dist/icons/refresh.svg +8 -0
- package/dist/icons/remove.svg +8 -0
- package/dist/icons/search.svg +8 -0
- package/dist/icons/share.svg +8 -0
- package/dist/icons/sms.svg +8 -0
- package/dist/icons/social_bluesky.svg +8 -0
- package/dist/icons/social_facebook.svg +8 -0
- package/dist/icons/social_flickr.svg +8 -0
- package/dist/icons/social_google_play.svg +8 -0
- package/dist/icons/social_instagram.svg +10 -0
- package/dist/icons/social_linkedin.svg +8 -0
- package/dist/icons/social_pinterest.svg +8 -0
- package/dist/icons/social_rss.svg +10 -0
- package/dist/icons/social_snapchat.svg +8 -0
- package/dist/icons/social_soundcloud.svg +21 -0
- package/dist/icons/social_threads.svg +9 -0
- package/dist/icons/social_tiktok.svg +8 -0
- package/dist/icons/social_tumblr.svg +8 -0
- package/dist/icons/social_vimeo.svg +8 -0
- package/dist/icons/social_x.svg +8 -0
- package/dist/icons/social_youtube.svg +8 -0
- package/dist/icons/sort.svg +8 -0
- package/dist/icons/straight.svg +8 -0
- package/dist/icons/thumb_down.svg +8 -0
- package/dist/icons/thumb_up.svg +8 -0
- package/dist/icons/upload_file.svg +8 -0
- package/dist/icons/visibility.svg +8 -0
- package/dist/icons/visibility_off.svg +8 -0
- package/dist/icons/warning.svg +8 -0
- package/dist/nysds.es.js +3762 -3630
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +342 -865
- package/dist/nysds.js.map +1 -1
- package/dist/packages/mcp-server/src/lib/token-parser.d.ts +19 -31
- package/dist/packages/mcp-server/src/tools/token-tools.d.ts +2 -3
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +2 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +3 -3
- package/dist/packages/nys-button/src/nys-button.d.ts +5 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +2 -1
- package/dist/packages/nys-divider/src/nys-divider.d.ts +2 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +1 -1
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +3 -0
- package/dist/packages/nys-icon/src/icon-cache.d.ts +11 -0
- package/dist/packages/nys-icon/src/icon-library-registry.d.ts +47 -0
- package/dist/packages/nys-icon/src/index.d.ts +3 -0
- package/dist/packages/nys-icon/src/nys-icon.d.ts +40 -11
- package/dist/packages/nys-modal/src/nys-modal.d.ts +1 -0
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +1 -38
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +17 -7
- package/dist/packages/nys-stepper/src/nys-step.d.ts +75 -23
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +81 -9
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +1 -0
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +1 -0
- package/package.json +12 -6
- package/packages/react/NysDivider.d.ts +3 -0
- package/packages/react/NysDivider.js +2 -1
- package/packages/react/NysIcon.d.ts +11 -2
- package/packages/react/NysIcon.js +26 -3
- package/packages/react/NysRadiobutton.d.ts +7 -23
- package/packages/react/NysRadiobutton.js +1 -3
- package/packages/react/NysRadiogroup.d.ts +18 -2
- package/packages/react/NysRadiogroup.js +17 -1
- package/packages/react/NysStep.d.ts +10 -12
- package/packages/react/NysStep.js +1 -12
- package/packages/react/NysStepper.d.ts +6 -6
- package/packages/react/nysds-jsx.d.ts +46 -36
- package/dist/packages/mcp-server/src/lib/format.d.ts +0 -21
|
@@ -419,6 +419,8 @@ export type NysDatepickerProps = {
|
|
|
419
419
|
export type NysDividerProps = {
|
|
420
420
|
/** Adjusts colors for dark backgrounds. */
|
|
421
421
|
inverted?: boolean;
|
|
422
|
+
/** If true, the divider will use a lighter color. */
|
|
423
|
+
subtle?: boolean;
|
|
422
424
|
};
|
|
423
425
|
|
|
424
426
|
export type NysDropdownMenuProps = {
|
|
@@ -530,8 +532,10 @@ export type NysGlobalHeaderProps = {
|
|
|
530
532
|
};
|
|
531
533
|
|
|
532
534
|
export type NysIconProps = {
|
|
533
|
-
/** Icon name from
|
|
535
|
+
/** Icon name to resolve from the selected library. Required. */
|
|
534
536
|
name?: string;
|
|
537
|
+
/** Which registered icon library to use. Defaults to the built-in NYSDS library. */
|
|
538
|
+
library?: string;
|
|
535
539
|
/** Accessible label. When set, removes `aria-hidden` and adds `aria-label` to the SVG. */
|
|
536
540
|
ariaLabel?: string;
|
|
537
541
|
/** Rotation in degrees. Applied via CSS `rotate`. */
|
|
@@ -560,6 +564,8 @@ export type NysIconProps = {
|
|
|
560
564
|
| "32"
|
|
561
565
|
| "40"
|
|
562
566
|
| "50";
|
|
567
|
+
/** Resolves when the current icon load (if any) is complete. */
|
|
568
|
+
updateComplete?: Promise<boolean>;
|
|
563
569
|
};
|
|
564
570
|
|
|
565
571
|
export type NysLabelProps = {
|
|
@@ -644,18 +650,14 @@ export type NysRadiobuttonProps = {
|
|
|
644
650
|
/** */
|
|
645
651
|
showOtherError?: boolean;
|
|
646
652
|
|
|
647
|
-
/** */
|
|
648
|
-
"onnys-error-clear"?: (e: CustomEvent<CustomEvent>) => void;
|
|
649
653
|
/** Fired when selection changes. Detail: `{id, checked, name, value}`. */
|
|
650
|
-
"onnys-change"?: (e: CustomEvent<
|
|
651
|
-
/** Fired when "other" text input value changes. Detail: `{id, name, value}`. */
|
|
652
|
-
"onnys-other-input"?: (e: CustomEvent<CustomEvent>) => void;
|
|
654
|
+
"onnys-change"?: (e: CustomEvent<never>) => void;
|
|
653
655
|
/** Fired when radio gains focus. */
|
|
654
|
-
"onnys-focus"?: (e: CustomEvent<
|
|
656
|
+
"onnys-focus"?: (e: CustomEvent<never>) => void;
|
|
655
657
|
/** Fired when radio loses focus. */
|
|
656
|
-
"onnys-blur"?: (e: CustomEvent<
|
|
657
|
-
/**
|
|
658
|
-
"onnys-
|
|
658
|
+
"onnys-blur"?: (e: CustomEvent<never>) => void;
|
|
659
|
+
/** Fired when "other" text input value changes. Detail: `{id, name, value}`. */
|
|
660
|
+
"onnys-other-input"?: (e: CustomEvent<never>) => void;
|
|
659
661
|
};
|
|
660
662
|
|
|
661
663
|
export type NysRadiogroupProps = {
|
|
@@ -683,6 +685,13 @@ export type NysRadiogroupProps = {
|
|
|
683
685
|
form?: string | null;
|
|
684
686
|
/** Radio size for all children: `sm` (24px) or `md` (32px, default). */
|
|
685
687
|
size?: "sm" | "md";
|
|
688
|
+
/** */
|
|
689
|
+
_showOtherError?: boolean;
|
|
690
|
+
|
|
691
|
+
/** */
|
|
692
|
+
"onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
|
|
693
|
+
/** */
|
|
694
|
+
"onnys-other-input"?: (e: CustomEvent<CustomEvent>) => void;
|
|
686
695
|
};
|
|
687
696
|
|
|
688
697
|
export type NysOptionProps = {
|
|
@@ -744,34 +753,34 @@ export type NysSkipnavProps = {
|
|
|
744
753
|
};
|
|
745
754
|
|
|
746
755
|
export type NysStepProps = {
|
|
747
|
-
/**
|
|
756
|
+
/** Which step is currently being displayed. If not set, defaults to the `current` step.
|
|
757
|
+
Setting this on a step after `current` is silently corrected to match `current`.
|
|
758
|
+
When controlling state from a framework, always set this explicitly. */
|
|
748
759
|
selected?: boolean;
|
|
749
|
-
/**
|
|
760
|
+
/** The furthest step the user has reached (progress boundary). Steps before this are navigable. */
|
|
750
761
|
current?: boolean;
|
|
751
762
|
/** Step label text displayed alongside the step number. */
|
|
752
763
|
label?: string;
|
|
753
|
-
/** URL
|
|
764
|
+
/** URL navigated to when the step is activated, via `window.location.href`.
|
|
765
|
+
Navigation is suppressed if the `nys-step-click` listener calls `e.preventDefault()`.
|
|
766
|
+
Omit for SPA/framework routing and handle navigation in the event listener instead. */
|
|
754
767
|
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. */
|
|
768
|
+
/** Optional function called before `nys-step-click` is dispatched. Use for pre-navigation logic. */
|
|
760
769
|
onClick?: (e: Event) => void | undefined;
|
|
761
|
-
/** Fired when a navigable step is clicked. Detail: `{href, label}`. Cancelable. */
|
|
770
|
+
/** 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
771
|
"onnys-step-click"?: (e: CustomEvent<never>) => void;
|
|
763
772
|
};
|
|
764
773
|
|
|
765
774
|
export type NysStepperProps = {
|
|
766
|
-
/** Unique identifier. */
|
|
775
|
+
/** Unique identifier. Auto-generated as `nys-stepper-{n}-{timestamp}` if not provided. */
|
|
767
776
|
id?: string;
|
|
768
777
|
/** Name attribute for form association. */
|
|
769
778
|
name?: string;
|
|
770
|
-
/** Title displayed above the step counter. */
|
|
779
|
+
/** Title displayed above the step list and compact counter. */
|
|
771
780
|
label?: string;
|
|
772
|
-
/** Progress text (e.g., "Step 2 of 5"). Auto-
|
|
781
|
+
/** Progress text displayed in compact mode (e.g., "Step 2 of 5"). Auto-managed — do not set manually. */
|
|
773
782
|
counterText?: string;
|
|
774
|
-
/** Whether compact mobile view is expanded to show all steps. */
|
|
783
|
+
/** Whether compact mobile view is expanded to show all steps. Toggled by clicking the counter. */
|
|
775
784
|
isCompactExpanded?: boolean;
|
|
776
785
|
};
|
|
777
786
|
|
|
@@ -1294,9 +1303,12 @@ export type CustomElements = {
|
|
|
1294
1303
|
"nys-globalheader": Partial<NysGlobalHeaderProps & BaseProps & BaseEvents>;
|
|
1295
1304
|
|
|
1296
1305
|
/**
|
|
1297
|
-
* SVG icon
|
|
1306
|
+
* SVG icon with swappable library support, size, rotation, and color options.
|
|
1298
1307
|
* ---
|
|
1299
1308
|
*
|
|
1309
|
+
*
|
|
1310
|
+
* ### **Methods:**
|
|
1311
|
+
* - **redraw()** - Called by the icon library registry when the current library changes.
|
|
1300
1312
|
*/
|
|
1301
1313
|
"nys-icon": Partial<NysIconProps & BaseProps & BaseEvents>;
|
|
1302
1314
|
|
|
@@ -1339,21 +1351,15 @@ export type CustomElements = {
|
|
|
1339
1351
|
"nys-pagination": Partial<NysPaginationProps & BaseProps & BaseEvents>;
|
|
1340
1352
|
|
|
1341
1353
|
/**
|
|
1342
|
-
* Radio button for single selection from mutually exclusive options.
|
|
1354
|
+
* Radio button for single selection from mutually exclusive options. This is a READONLY data component.
|
|
1343
1355
|
* ---
|
|
1344
1356
|
*
|
|
1345
1357
|
*
|
|
1346
1358
|
* ### **Events:**
|
|
1347
|
-
* - **nys-
|
|
1348
|
-
* - **nys-change** - Fired when selection changes. Detail: `{id, checked, name, value}`.
|
|
1349
|
-
* - **nys-other-input** - Fired when "other" text input value changes. Detail: `{id, name, value}`.
|
|
1359
|
+
* - **nys-change** - Fired when selection changes. Detail: `{id, checked, name, value}`.
|
|
1350
1360
|
* - **nys-focus** - Fired when radio gains focus.
|
|
1351
1361
|
* - **nys-blur** - Fired when radio loses focus.
|
|
1352
|
-
* - **nys-
|
|
1353
|
-
*
|
|
1354
|
-
* ### **Methods:**
|
|
1355
|
-
* - **getInputElement(): _Promise<HTMLInputElement | null>_** - Functions
|
|
1356
|
-
* --------------------------------------------------------------------------
|
|
1362
|
+
* - **nys-other-input** - Fired when "other" text input value changes. Detail: `{id, name, value}`.
|
|
1357
1363
|
*
|
|
1358
1364
|
* ### **Slots:**
|
|
1359
1365
|
* - **description** - Custom HTML description content.
|
|
@@ -1365,6 +1371,10 @@ export type CustomElements = {
|
|
|
1365
1371
|
* ---
|
|
1366
1372
|
*
|
|
1367
1373
|
*
|
|
1374
|
+
* ### **Events:**
|
|
1375
|
+
* - **nys-change**
|
|
1376
|
+
* - **nys-other-input**
|
|
1377
|
+
*
|
|
1368
1378
|
* ### **Slots:**
|
|
1369
1379
|
* - _default_ - Default slot for `nys-radiobutton` elements.
|
|
1370
1380
|
* - **description** - Custom HTML description content.
|
|
@@ -1414,7 +1424,7 @@ export type CustomElements = {
|
|
|
1414
1424
|
*
|
|
1415
1425
|
*
|
|
1416
1426
|
* ### **Events:**
|
|
1417
|
-
* - **nys-step-click** - Fired when a navigable step is clicked. Detail: `{href, label}`. Cancelable.
|
|
1427
|
+
* - **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
1428
|
*/
|
|
1419
1429
|
"nys-step": Partial<NysStepProps & BaseProps & BaseEvents>;
|
|
1420
1430
|
|
|
@@ -1424,8 +1434,8 @@ export type CustomElements = {
|
|
|
1424
1434
|
*
|
|
1425
1435
|
*
|
|
1426
1436
|
* ### **Slots:**
|
|
1427
|
-
* - _default_ - Default slot for `nys-step` elements.
|
|
1428
|
-
* - **actions** -
|
|
1437
|
+
* - _default_ - Default slot for `nys-step` elements. Only `nys-step` children are accepted; others are removed.
|
|
1438
|
+
* - **actions** - Persistent navigation buttons. Must contain exactly one `<div>` wrapping only `<nys-button>` elements.
|
|
1429
1439
|
*/
|
|
1430
1440
|
"nys-stepper": Partial<NysStepperProps & BaseProps & BaseEvents>;
|
|
1431
1441
|
|
|
@@ -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
|
-
};
|