@nysds/components 1.19.3-alpha-1 → 1.19.4
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 +1243 -203
- package/dist/.vscode/vscode.html-custom-data.json +13 -13
- package/dist/custom-elements.json +1243 -203
- package/dist/nys-icon.library-r6nNUTzA.js +696 -0
- package/dist/nys-icon.library-r6nNUTzA.js.map +1 -0
- package/dist/nysds.es.js +2746 -2617
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +757 -155
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +35 -6
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +8 -3
- package/dist/packages/nys-alert/src/nys-alert.d.ts +81 -4
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +44 -4
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +70 -3
- package/dist/packages/nys-badge/src/nys-badge.d.ts +54 -4
- package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +75 -7
- package/dist/packages/nys-button/src/nys-button.d.ts +62 -7
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +5 -7
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +75 -1
- package/dist/packages/nys-combobox/src/nys-combobox.d.ts +164 -0
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +64 -8
- package/dist/packages/nys-divider/src/nys-divider.d.ts +24 -1
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +19 -12
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +0 -10
- package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +10 -0
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +94 -4
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +50 -7
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +65 -4
- package/dist/packages/nys-icon/src/icon-cache.d.ts +11 -4
- package/dist/packages/nys-icon/src/icon-library-registry.d.ts +33 -16
- package/dist/packages/nys-icon/src/index.d.ts +2 -2
- package/dist/packages/nys-icon/src/nys-icon.d.ts +83 -6
- package/dist/packages/nys-label/src/nys-label.d.ts +32 -2
- package/dist/packages/nys-modal/src/nys-modal.d.ts +130 -5
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +11 -1
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +4 -3
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +74 -1
- package/dist/packages/nys-select/src/nys-option.d.ts +0 -8
- package/dist/packages/nys-select/src/nys-select.d.ts +141 -10
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +2 -2
- package/dist/packages/nys-stepper/src/nys-step.d.ts +0 -13
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +119 -69
- package/dist/packages/nys-tab/src/nys-tab.d.ts +17 -8
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +170 -35
- package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +13 -22
- package/dist/packages/nys-table/src/nys-table.d.ts +80 -1
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +52 -5
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +63 -9
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +40 -4
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +38 -6
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +10 -2
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +54 -8
- package/dist/packages/nys-video/src/nys-video.d.ts +65 -3
- package/package.json +11 -5
- package/packages/react/NysBreadcrumbs.d.ts +1 -1
- package/packages/react/NysButton.d.ts +2 -1
- package/packages/react/NysDropdownMenu.d.ts +1 -1
- package/packages/react/NysFileinput.d.ts +24 -2
- package/packages/react/NysFileinput.js +8 -1
- package/packages/react/NysGlobalHeader.d.ts +6 -1
- package/packages/react/NysLabel.d.ts +4 -1
- package/packages/react/NysTabgroup.d.ts +5 -4
- package/packages/react/NysTable.d.ts +1 -1
- package/packages/react/NysTabpanel.d.ts +11 -4
- package/packages/react/NysTextarea.d.ts +1 -1
- package/packages/react/NysUnavHeader.d.ts +11 -1
- package/packages/react/NysUnavHeader.js +15 -1
- package/packages/react/nysds-jsx.d.ts +64 -19
|
@@ -180,7 +180,7 @@ export type NysBreadcrumbsProps = {
|
|
|
180
180
|
Override when multiple crumbs exist on the same page. */
|
|
181
181
|
ariaLabel?: string;
|
|
182
182
|
/** Controls the visual size of the breadcrumb text and spacing: `sm` for dense layouts, `md` (default) for standard use. */
|
|
183
|
-
size?: "sm" | "md"
|
|
183
|
+
size?: "sm" | "md";
|
|
184
184
|
/** On mobile, renders the trail as a single back-to-parent link pointing to the item before the current page.
|
|
185
185
|
Has no effect on desktop or when only one item is present (which always renders as a back link). */
|
|
186
186
|
backToParent?: boolean;
|
|
@@ -287,6 +287,8 @@ export type NysCheckboxProps = {
|
|
|
287
287
|
showOtherError?: boolean;
|
|
288
288
|
/** */
|
|
289
289
|
_hasDescription?: string;
|
|
290
|
+
/** */
|
|
291
|
+
_isStandalone?: string;
|
|
290
292
|
/** Fired when checked state changes. Detail: `{id, checked, name, value}`. */
|
|
291
293
|
"onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
|
|
292
294
|
/** Fired when "other" text input value changes. Detail: `{id, name, value}`. */
|
|
@@ -496,7 +498,17 @@ export type NysFileinputProps = {
|
|
|
496
498
|
width?: "lg" | "full";
|
|
497
499
|
/** Adjusts colors for dark backgrounds. */
|
|
498
500
|
inverted?: boolean;
|
|
499
|
-
|
|
501
|
+
/** The currently selected files. Read to get the current selection; set to
|
|
502
|
+
replace it (e.g. rehydrating state after navigation, or binding from a
|
|
503
|
+
framework form model). Property-only — a `File[]` cannot round-trip through
|
|
504
|
+
an HTML attribute. Setting this is silent (does not emit `nys-change`),
|
|
505
|
+
matching native input behavior and avoiding feedback loops in two-way bindings. */
|
|
506
|
+
files?: File[];
|
|
507
|
+
/** Single-file convenience accessor (parity with `nys-textinput`'s `value`).
|
|
508
|
+
Reads the first selected file (or `null`); setting replaces the selection. */
|
|
509
|
+
value?: File | null;
|
|
510
|
+
/** Fired when focus leaves the component. Triggers validation. */
|
|
511
|
+
"onnys-blur"?: (e: CustomEvent<Event>) => void;
|
|
500
512
|
/** Fired when files are added or removed. Detail: `{id, files}`. */
|
|
501
513
|
"onnys-change"?: (e: CustomEvent<CustomEvent>) => void;
|
|
502
514
|
};
|
|
@@ -531,7 +543,11 @@ export type NysGlobalHeaderProps = {
|
|
|
531
543
|
agencyName?: string;
|
|
532
544
|
/** URL for the header title link. If empty, title is not clickable. */
|
|
533
545
|
homepageLink?: string;
|
|
534
|
-
/**
|
|
546
|
+
/** Displays the NYS brand mark in the header. Off by default.
|
|
547
|
+
|
|
548
|
+
Enable only for internal, state-employee (back-office) applications that omit
|
|
549
|
+
`nys-unavheader`. Any resident-facing app — even one requiring login — should
|
|
550
|
+
keep `nys-unavheader` for trust and leave this off. */
|
|
535
551
|
nysLogo?: boolean;
|
|
536
552
|
};
|
|
537
553
|
|
|
@@ -862,7 +878,7 @@ export type NysTextareaProps = {
|
|
|
862
878
|
value?: string;
|
|
863
879
|
/** Prevents interaction. */
|
|
864
880
|
disabled?: boolean;
|
|
865
|
-
/** Makes textarea
|
|
881
|
+
/** Makes textarea readonly but focusable. */
|
|
866
882
|
readonly?: boolean;
|
|
867
883
|
/** Marks as required. Shows "Required" flag and validates on blur. */
|
|
868
884
|
required?: boolean;
|
|
@@ -1019,6 +1035,11 @@ export type NysUnavHeaderProps = {
|
|
|
1019
1035
|
searchUrl?: string;
|
|
1020
1036
|
/** The list of languages this site can be translated to, default to use Smartling */
|
|
1021
1037
|
languages?: Language[];
|
|
1038
|
+
|
|
1039
|
+
/** Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect. */
|
|
1040
|
+
"onnys-language-select"?: (e: CustomEvent<never>) => void;
|
|
1041
|
+
/** Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect. */
|
|
1042
|
+
"onnys-search-submit"?: (e: CustomEvent<never>) => void;
|
|
1022
1043
|
};
|
|
1023
1044
|
|
|
1024
1045
|
export type NysVideoProps = {
|
|
@@ -1123,7 +1144,7 @@ export type CustomElements = {
|
|
|
1123
1144
|
* - **nys-breadcrumbs-expand** - Fired when the user clicks the ellipsis to expand the trail.
|
|
1124
1145
|
*
|
|
1125
1146
|
* ### **Slots:**
|
|
1126
|
-
* - _default_ - One or more `
|
|
1147
|
+
* - _default_ - One or more `li` elements defining the trail.
|
|
1127
1148
|
*/
|
|
1128
1149
|
"nys-breadcrumbs": Partial<NysBreadcrumbsProps & BaseProps & BaseEvents>;
|
|
1129
1150
|
|
|
@@ -1138,7 +1159,8 @@ export type CustomElements = {
|
|
|
1138
1159
|
* - **nys-click** - Fired when the button is clicked (mouse or keyboard). Not fired when disabled.
|
|
1139
1160
|
*
|
|
1140
1161
|
* ### **Slots:**
|
|
1141
|
-
* -
|
|
1162
|
+
* - _default_ - Button label text. Use as fallback when `label` prop is not provided.
|
|
1163
|
+
* - **prefix-icon** - Icon before label. Not shown for `text` variant.
|
|
1142
1164
|
* - **suffix-icon** - Icon after label. Not shown for `text` variant.
|
|
1143
1165
|
* - **circle-icon** - Icon for circle mode. Overrides `icon` prop.
|
|
1144
1166
|
*
|
|
@@ -1240,7 +1262,7 @@ export type CustomElements = {
|
|
|
1240
1262
|
"nys-divider": Partial<NysDividerProps & BaseProps & BaseEvents>;
|
|
1241
1263
|
|
|
1242
1264
|
/**
|
|
1243
|
-
*
|
|
1265
|
+
* Action menu with auto-positioning, keyboard support, and screen reader integration.
|
|
1244
1266
|
* ---
|
|
1245
1267
|
*
|
|
1246
1268
|
*/
|
|
@@ -1269,7 +1291,14 @@ export type CustomElements = {
|
|
|
1269
1291
|
*
|
|
1270
1292
|
*
|
|
1271
1293
|
* ### **Events:**
|
|
1272
|
-
* - **nys-
|
|
1294
|
+
* - **nys-blur** - Fired when focus leaves the component. Triggers validation.
|
|
1295
|
+
* - **nys-change** - Fired when files are added or removed. Detail: `{id, files}`.
|
|
1296
|
+
*
|
|
1297
|
+
* ### **Methods:**
|
|
1298
|
+
* - **setFiles(incoming: _File[]_): _Promise<void>_** - Programmatically set the selection and await async validation/processing.
|
|
1299
|
+
* Same as assigning `files`, but resolves once every file has finished its
|
|
1300
|
+
* magic-byte validation and read — use when you need to read `checkValidity()`
|
|
1301
|
+
* or the settled selection immediately after.
|
|
1273
1302
|
*
|
|
1274
1303
|
* ### **Slots:**
|
|
1275
1304
|
* - **description** - Custom HTML description content.
|
|
@@ -1303,6 +1332,7 @@ export type CustomElements = {
|
|
|
1303
1332
|
*
|
|
1304
1333
|
* ### **Slots:**
|
|
1305
1334
|
* - _default_ - Navigation content (typically `<ul>` with `<li><a>` links). Auto-sanitized.
|
|
1335
|
+
* - **user-actions** - User-account controls (e.g. profile link, settings, log-out button) shown in the header.
|
|
1306
1336
|
*/
|
|
1307
1337
|
"nys-globalheader": Partial<NysGlobalHeaderProps & BaseProps & BaseEvents>;
|
|
1308
1338
|
|
|
@@ -1317,7 +1347,10 @@ export type CustomElements = {
|
|
|
1317
1347
|
"nys-icon": Partial<NysIconProps & BaseProps & BaseEvents>;
|
|
1318
1348
|
|
|
1319
1349
|
/**
|
|
1320
|
-
* Internal
|
|
1350
|
+
* **Internal component.** Renders form labels with description, required/optional flag, and tooltip.
|
|
1351
|
+
*
|
|
1352
|
+
* Used internally by form components (textinput, select, checkbox, etc.). Not intended for direct use.
|
|
1353
|
+
* Handles label association via `for`, displays asterisk for required fields, and integrates tooltips.
|
|
1321
1354
|
* ---
|
|
1322
1355
|
*
|
|
1323
1356
|
*
|
|
@@ -1473,9 +1506,10 @@ export type CustomElements = {
|
|
|
1473
1506
|
* elements.
|
|
1474
1507
|
*
|
|
1475
1508
|
* Accepts tabs and panels as flat light-DOM children in any order (interleaved
|
|
1476
|
-
* or grouped). On slot change,
|
|
1477
|
-
*
|
|
1478
|
-
*
|
|
1509
|
+
* or grouped). On slot change, each child is assigned `slot="tab"` or
|
|
1510
|
+
* `slot="panel"` so it is projected into the correct shadow-DOM container
|
|
1511
|
+
* while remaining in the light DOM, ARIA relationships are wired, and the
|
|
1512
|
+
* first selected (or first) tab is activated.
|
|
1479
1513
|
*
|
|
1480
1514
|
* Scroll shadows are rendered on either side of the tab list and toggled via
|
|
1481
1515
|
* `ResizeObserver` and a `scroll` listener so they accurately reflect whether
|
|
@@ -1489,7 +1523,7 @@ export type CustomElements = {
|
|
|
1489
1523
|
*
|
|
1490
1524
|
*
|
|
1491
1525
|
* ### **Slots:**
|
|
1492
|
-
* - _default_ - Accepts `<nys-tab>` and `<nys-tabpanel>` children.
|
|
1526
|
+
* - _default_ - Accepts `<nys-tab>` and `<nys-tabpanel>` children. On `slotchange` they are assigned `slot="tab"` / `slot="panel"` and projected into the tablist and panel containers; they stay in the light DOM. Any other children remain in the default slot, rendered below the panels.
|
|
1493
1527
|
*/
|
|
1494
1528
|
"nys-tabgroup": Partial<NysTabgroupProps & BaseProps & BaseEvents>;
|
|
1495
1529
|
|
|
@@ -1498,14 +1532,21 @@ export type CustomElements = {
|
|
|
1498
1532
|
* `<nys-tabgroup>`.
|
|
1499
1533
|
*
|
|
1500
1534
|
* Pairing is determined by render order: the Nth `<nys-tabpanel>` child of a
|
|
1501
|
-
* `<nys-tabgroup>` corresponds to the Nth `<nys-tab>` child
|
|
1502
|
-
* `aria-labelledby` and the `hidden` attribute are managed
|
|
1503
|
-
* `<nys-tabgroup>` via `_applySelection`; do not set them
|
|
1535
|
+
* `<nys-tabgroup>` corresponds to the Nth `<nys-tab>` child (or by explicit
|
|
1536
|
+
* `aria-labelledby`). `aria-labelledby` and the `hidden` attribute are managed
|
|
1537
|
+
* externally by `<nys-tabgroup>` via `_applySelection`; do not set them
|
|
1538
|
+
* directly.
|
|
1539
|
+
*
|
|
1540
|
+
* The panel container is styled from the light DOM (`nys-tabpanel.light.scss`,
|
|
1541
|
+
* adopted on the document) rather than a shadow-DOM wrapper. This keeps the
|
|
1542
|
+
* slotted panel content in the light DOM — reachable by consumer CSS and
|
|
1543
|
+
* JavaScript — and lets consumers override the panel's own styling (e.g.
|
|
1544
|
+
* `nys-tabpanel { padding: 0 }`), which a shadow wrapper would prevent.
|
|
1504
1545
|
* ---
|
|
1505
1546
|
*
|
|
1506
1547
|
*
|
|
1507
1548
|
* ### **Slots:**
|
|
1508
|
-
* - _default_ - Default slot for panel content. Rendered
|
|
1549
|
+
* - _default_ - Default slot for panel content. Rendered directly under the host, which is the scrollable, focusable (`tabindex="0"`) `role="tabpanel"` region.
|
|
1509
1550
|
*/
|
|
1510
1551
|
"nys-tabpanel": Partial<NysTabpanelProps & BaseProps & BaseEvents>;
|
|
1511
1552
|
|
|
@@ -1520,7 +1561,7 @@ export type CustomElements = {
|
|
|
1520
1561
|
* - **nys-column-sort** - Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior. Detail: { columnIndex: number, columnLabel: string, sortDirection: "asc" | "desc" | "none" }
|
|
1521
1562
|
*
|
|
1522
1563
|
* ### **Slots:**
|
|
1523
|
-
* - _default_ - Accepts a `<table>` element. Only the first table is
|
|
1564
|
+
* - _default_ - Accepts a `<table>` element. Only the first table is used. The table is enhanced in place and stays in the light DOM (projected through a slot, never cloned), so embedded components remain interactive and reachable by consumer CSS/JS. Its cell styling is applied from `nys-table.light.scss`, adopted once onto `document.adoptedStyleSheets`.
|
|
1524
1565
|
*/
|
|
1525
1566
|
"nys-table": Partial<NysTableProps & BaseProps & BaseEvents>;
|
|
1526
1567
|
|
|
@@ -1596,9 +1637,13 @@ export type CustomElements = {
|
|
|
1596
1637
|
"nys-unavfooter": Partial<NysUnavFooterProps & BaseProps & BaseEvents>;
|
|
1597
1638
|
|
|
1598
1639
|
/**
|
|
1599
|
-
*
|
|
1640
|
+
* Universal NYS header with trust bar, search, and translation. Required site-wide.
|
|
1600
1641
|
* ---
|
|
1601
1642
|
*
|
|
1643
|
+
*
|
|
1644
|
+
* ### **Events:**
|
|
1645
|
+
* - **nys-language-select** - Fired when a language is selected. Detail: `{language: {code, label, url?}}`. Cancelable; `preventDefault()` overrides the default Smartling redirect.
|
|
1646
|
+
* - **nys-search-submit** - Fired when a search is submitted. Detail: `{query}`. Cancelable; `preventDefault()` overrides the default search redirect.
|
|
1602
1647
|
*/
|
|
1603
1648
|
"nys-unavheader": Partial<NysUnavHeaderProps & BaseProps & BaseEvents>;
|
|
1604
1649
|
|